World of Banished

Conversations => Tips and Tricks => Topic started by: Gordon Dry on March 01, 2015, 08:16:38 AM

Title: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Gordon Dry on March 01, 2015, 08:16:38 AM
Finally!

I created a batch script to create a text file with a sorted list of mods in it.

I should mention that you have to unpack it into the main Banished folder.

Right click on the "Create sorted list of Banished mods.cmd" and choose "Run as Administrator".

The list is sorted by load order.
For testing I added a dummy entry to the registry with load order 999.
It looks like this (by 2016-07-30):
#######################################################
#    List of Banished mods sorted by load order       #
#                    created with                     #
#       'Create sorted list of Banished mods'         #
#                     release 6b                      #
#                    by Gordon Dry                    #
#######################################################
################### ugly simple soft ##################
#  http://worldofbanished.com/index.php?topic=790.0   #
#######################################################

debugging - - - - - - MOD DISABLED
Deutschmod
CategoryNames
ColonialHouse
BlacksmithTools
SettlersTents
InedibleCoffeeBeans
InedibleGrapes
InedibleOlives
InedibleVegetableOil
InedibleSoybeans
InedibleSugarBeets
InedibleSunflowers
InedibleChicken
InedibleBeef
InedibleBisonMeat
InedibleCharki
InedibleCheval
InedibleDuckMeat
InedibleFish
InedibleMutton
InediblePork
InedibleVenison
InedibleBarley
InedibleCanola
InedibleCorn
InedibleOats
InedibleRice
InedibleRye
InedibleSorghum
InedibleWheat
InedibleButter
InedibleCheese
InedibleCream
InedibleMilk
CastleSlightlyRidiculousStorage
SlightlyRidiculousStorage
BakeryPlus
Charburner
GoHunting
HappinessRadius
UnhappinessRadius
MyPrecious
CCNoSmoke
HotCrops
BlackLiquidRain
DSStorage
DSFences
DSRoads
OldBakeryHouse
OldBlacksmith
OldHunterHut
OldTailorHouse
BasicClothes
TequilaMod
MWPlants
TentWithFire
TreeGrowth
NewFlora
banishedUI
warehouse
coalfurnace
ToolbarButtons
FCastle
gardenshed
RedCottage
nordichouses
StatuePlus
CallofNatureSoundtrack
ColonialCharterIcon
CCMineQuarryOverride
Radius
bigminimap
oneyearisoneyear
FirebundlerFirewood
betterharvesting
GrassyRoads
wintinAudioTweak
vBetterRainSound
JapaneseFacilities
Covering
ForestOutpost
marketpuzzle
rowhouse
elfStorageCarts
ebbarn
SJGL_Small_Markets
ebfarmstand
EBFarmhouses
wintinCoastalhouse
littlehouse
zSoapiary
coldrealism
BrusselSprouts
IdleCamellia
IdleJatrophaIntegerrima
IdleRose
IdleViolet
HorsesForTrade
TradersAcceptAll
MagazineMaterials
MiniBuildings
big_rings
elfSmallerVendors
extleather
BusyPastures
LegalizedMarijuana
TownArrivalNomads
ManyTownArrival
EasyMenus
ColonialCharterTFA
newmedievaltown
TropicalGreenhouse
Stable
RiceCrop
newmedievalCastle
FastFoodStand
SoupKitchen
GrowGinger
GrowRoots
FishFarmEdit
FishFarm
Cathedral
DUMMY - - - - - - NO MORE in WinData folder


Ah!

If you don't trust me, here is the script alone:
http://pastebin.com/k25t3Usd (http://pastebin.com/k25t3Usd)

There is also a folder cmsort in with the "Freeware Command Line Sort Utility CMSort" by Christian Maas.
a readme.txt, a .pdf and an .url is included.

Here it is:
Title: Re: Create sorted list of Banished mods (by Gordon Dry)
Post by: Paeng on March 02, 2015, 07:28:42 AM
Quote from: Gordon Dry on March 01, 2015, 08:10:31 AMI created a batch script to create a text file with a sorted list of mods in it.

Good idea.

Hmmm... when I run the cmd I get a textfile back as expected, but it lists only one mod - but I have plenty installed...?

D:\Shining Rock Software LLC\Banished
      |_ Sorted List of Banished mods.txt      <-  generated file
      |_ Create sorted list of Banished mods.cmd
      |_ cmsort
                  |_ cmsort.exe


Am I missing sth.?
Title: Re: Create sorted list of Banished mods (by Gordon Dry)
Post by: Gordon Dry on March 03, 2015, 02:02:02 PM
Hmm.

Is it a limited windows account?
I mean no admin account, limited rights or something?

That sounds odd to me.

Did you try to right click the 'Create sorted list of Banished mods.cmd' and launch as administrator?

Edit:

Or is it THE administrator account and no more accounts existing?

It could be that in this case banished writes to the HKML path inside the registry...


I just updated the thing, please tell me if that works better for you!
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 3)
Post by: Paeng on March 03, 2015, 11:13:53 PM
No, doesn't make a difference whether as admin or not... and yes, I got another "user" as well...


Okay, now I got a listing... that's good, for starters  ;)


Not sure if this is relevant, but  the script complains (see attached image) -

Temp List of...Mods.txt could not be found
Temp2 List of...Mods.txt could not be found
Temp3 List of...Mods.txt could not be found



And after what criteria is it sorted? Could you make it alphabetical?


Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 4)
Post by: Gordon Dry on March 04, 2015, 11:33:16 AM
Quote from: Paeng on March 03, 2015, 11:13:53 PM
Not sure if this is relevant, but  the script complains (see attached image) -

Temp List of...Mods.txt could not be found
Temp2 List of...Mods.txt could not be found
Temp3 List of...Mods.txt could not be found


Everything is okay. But to make it clear in release 4 it checks if the file exists before the deletion attempt.

Quote from: Paeng on March 03, 2015, 11:13:53 PM
And after what criteria is it sorted? Could you make it alphabetical?

It is of course sorted by the load order - that was the reason to create the whole thing initially...

Edit:

release 5 says "List of Banished mods sorted by load order:" in first line
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 4)
Post by: Paeng on March 04, 2015, 10:43:15 PM
Quote from: Gordon Dry on March 04, 2015, 11:33:16 AMrelease 5 says "List of Banished mods sorted by load order:" in first line

Cool... yeah, I had misunderstood that.

Just shows that for us 'typing monkeys' such things need to be spelled out in the most precise manner possible!  ;)

Thanks!
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 5b)
Post by: chillzz on March 10, 2015, 12:08:51 PM
awsome! even a reg "cleaner" for removed mods..

lol @ 20 seconds to comply by silver bullet ;) nice old school hip hop / hip house breakbeat  8)
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 5b)
Post by: michbret on June 26, 2015, 08:23:16 AM
Hello Gordon Dry

Nice work but a minor improvement is needed to make it more robust (and less dangerous):

If Steam (or banished) is not installed on drive C: the batch file fails miserably and if you are not cautious it will delete a lot of registry settings.

So I have to add the following line near the beginning of the file (after cls):
cd /d "%~dp0"

With this small add it works.


IMPORTANT:
All the files must be installed in the game directory
You must right click and select "run as an administrator" to launch it.

My configuration is Win 7 pro, 64 bit with Steam and Banished installed on drive K:

Thanks for sharing this useful tool.

Best regards
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 5b)
Post by: Gordon Dry on June 26, 2015, 08:35:31 AM
Quote from: michbret on June 26, 2015, 08:23:16 AM
If Steam (or banished) is not installed on drive C: the batch file fails miserably and if you are not cautious it will delete a lot of registry settings.

Okay, the "Run as Administrator" thing I could add to the description.

But about the other points you mentioned - I don't think so:

Neither my Steam nor my games are on partition C: and it works for me.

And about the registry settings - why do you say it deletes a lot of them?

But okay, I changed it.
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6)
Post by: Gordon Dry on August 23, 2015, 08:45:05 AM
Updated to release 6.

- It now shows the mods' file name without extension (.pkm) inside the list
- It now shows if a mod is disabled
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6a)
Post by: Gordon Dry on August 23, 2015, 01:42:40 PM
Updated to release 6a:

- the script checks itself if it's run with administrative privileges
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Gordon Dry on August 29, 2015, 01:51:23 PM
Updated to release 6b:

- the text file output now contains information where to get the script
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: gerns on September 02, 2015, 01:56:18 PM
i need help .i have 2 mods i use all the time and they show up green in my mod list but dont show up in game since i put in colonial 1.5 ,does anyone have any ideas
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: RedKetchup on September 02, 2015, 05:52:56 PM
Quote from: gerns on September 02, 2015, 01:56:18 PM
i need help .i have 2 mods i use all the time and they show up green in my mod list but dont show up in game since i put in colonial 1.5 ,does anyone have any ideas

which ones ?
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: irrelevant on September 18, 2015, 05:08:58 PM
@Gordon Dry Apologies, I don't understand the instructions. It says to unpack the .zip into the Banished folder. But when I do that and then run it, it gives me a report of the mods that are in that folder. All I have in that folder is the ones I'm not using, the active mods are in the WinData folder that is in the Banished folder.

What are the correct instructions?
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Gordon Dry on September 18, 2015, 07:26:15 PM
The "Create sorted list of Banished mods.cmd" should be in the game folder where the game .exe is.

It checks for files in the WinData folder.
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: irrelevant on September 18, 2015, 08:07:11 PM
Okay, got it; thanks for the help, and thanks for sharing this.
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Gatherer on February 19, 2017, 01:50:56 AM
Sorry for necromancing...but can anyone help me with a small problem.

I only get a list of mods in alphabetical order and NOT in load order. How to fix this?
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: QueryEverything on February 21, 2017, 10:11:00 PM
following along too Gatherer :D  I'd like to know if it can be updated :D
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: QueryEverything on May 27, 2017, 03:01:01 AM
Necro bump for @Gordon Dry :)
Or anyone else who wishes to pick up the mantle :)

The bat now only exports out an alphabetised mod list, it doesn't output mods in Load Order.
I would certainly be interested in getting this mod some love, to get it to list the mods by Load Order or by Alphabetical (via a yes/no in the screen prompts.

It's a bit above my coding knowledge and I don't know enough about Banished installations to alter the code myself.

Any takers, or is Gordon lurking somewhere close?
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Paeng on May 27, 2017, 06:54:30 AM
Quote from: QueryEverything on May 27, 2017, 03:01:01 AMThe bat now only exports out an alphabetised mod list, it doesn't output mods in Load Order.

That's odd - reading back from the initial thread for this mod the author states -

QuoteIt is of course sorted by the load order - that was the reason to create the whole thing initially...

???

Or has it been overrun by recent Banished updates?

Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: QueryEverything on May 27, 2017, 08:05:52 AM
Yeah, it's why I've downloaded it a couple of times since Feb, to see if there were any changes, and still, same version today, as the one I downloaded 20th Feb, both do the same thing - output by alphabetical order.

I can see in the code where it reorders the information, but, I'm only entry level coder, and I lost the link a fair bit in.

Shame @Paeng , but it is what it is atm.  :( 

I've been using it regardless to keep a history of the mods at any given time, but, not the load order :(
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Kristahfer on May 27, 2017, 08:40:20 AM
Odd, I just ran the tool, with 113 mods and it sorted by load order.


Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: QueryEverything on May 27, 2017, 08:44:14 AM
@Kristahfer what version is that though?  Is it 6B (it would have it in the .txt output.

Is it possible to upload the zip package please?  I will take a look at the code over the next week if Gordon isn't around and see if I can find the difference.  :)  Most likely not though, it's a complex (for me) file - but can give it a shot.  :D
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Kristahfer on May 27, 2017, 09:09:19 AM
Yes it is the 6b version. Post a picture of it in edited post.


Here is a copy of the original file I am running.



Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Paeng on May 27, 2017, 09:41:14 AM
Well, I ran a quick test again, too... but still, I get rather strange results... it's always been like this, the tool has never shown me my mod folder's reality   :-[

See attached - all these mods that are reported as "Disabled", well, they're not - all my mods in windata are *enabled*... which is why I never really used the tool <shrug>...


* However, the mods that are listed below the allegedly disabled ones (and the actual list is much longer, screenshot is just partial) are showing the Load Order... though again, it does not reflect my load order as I see it in my mod list, it's rather... chaotic.

Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: RedKetchup on May 27, 2017, 10:40:27 AM
sad to see all my mods disabled :S
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Paeng on May 27, 2017, 11:24:02 AM
Quote from: RedKetchup on May 27, 2017, 10:40:27 AMsad to see all my mods disabled :S

LOL, yeah... that would be sad indeed   :D

However, as I said - all the mods I put into WinData are always enabled, I never play with any mods disabled... I have no idea where the script gets this totally wrong (des)information...  :(
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Gatherer on May 27, 2017, 01:59:25 PM
I'm also using 6b version of this mod and only get the mods listed alphabetically. I've tried it on 1.0.6. and 1.0.7.
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: QueryEverything on May 27, 2017, 08:52:41 PM
I had a thought, how are your installations all?

Mine was an original .exe then I linked it to Steam, and I have it in my D drive (not C), so perhaps it's having an issue with the location of the files - though reading previous comments, that doesn't seem to be the case, as it's handled (I guess, and running an eye over the code), through the game registry values, and not so much the drive links.

Thoughts?  We need someone who knows how to write .bats to take a look at it - it shouldn't be a case of needing someone who knows how to mod, as it's a completely different language. 
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Gatherer on May 28, 2017, 05:29:12 AM
I've purchased the game directly from Luke's website and installed it on C drive.
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: QueryEverything on May 29, 2017, 02:33:20 AM

Hi all,


After staring at this all day, and running a compare on the files (thankful for a plugin in my programs, so I didn't have to do it manually ), I have found why my issue is happening.

This may or may not be the reason some of you aren't seeing the results in 'Enabled order', and are only getting it in 'Alphabetical order', there may be a folder missing. 
Please read the below steps guide to make sure you have everything as required:


Before starting the steps please note:
        •  #1)  Banished folder means the folder which contains your "WinData" folder, that may be in Steam ( X:\Program Files (x86)\Steam\steamapps\common\Banished\WinData ) or
            standalone installation (any other legitimate store files), do not install into the WinData folder, you will have gone 1 folder too far!!            

Make sure your zip file has the 2 items: 
        •  #1)  Create sorted list of Banished mods.cmd (a command file)
        •  #2)  cmsort (a folder)


For the mods list to be sorted by Enabled Order
   •  Unzip the package directly into your Banished folder - OR - (if you unzip to another folder, then move) unzip into an empty folder
   •  Make sure you have 2 items:  #1)  Create sorted list of Banished mods.cmd (a command file) and #2)  cmsort (a folder)
      ••  If you unzipped them into an empty folder:  Move both the .cmd file & the cmsort folder into your Banished folder
   •  Right click on the Create sorted list of Banished mods.cmd file, Run As Administrator, wait for the User Account Control to pop up - let the file run
   •  Interact with the prompts in the CMD file screen (yes / no answers are needed for backups etc)
   •  Let the CMD screen close
   •  Open the newly generated file: Sorted List of Banished mods.txt  (it will automatically save in your Banished folder)
   •  For safe keeping, save the file to another folder, or simply move it
   •  All done, you now have the Sorted List of Banished mods file with mods listed in their "Enabled" order


For the mods list to be sorted by Alphabetical Order
   •  Unzip the package directly into your Banished folder - OR - (if you unzip to another folder, then move) unzip into an empty folder
   •  Make sure you have 2 items:  #1)  Create sorted list of Banished mods.cmd (a command file) and #2)  cmsort (a folder)


      ••  If you unzipped them into an empty folder:  Move only the .cmd file into your Banished folder
   • New step:  Move or delete the cmsort folder from the Banished folder (if you unzipped directly to the Banished folder, - we do not want it in this stepthru,
                               moving it to a backup folder keeps it for a later date if you want to sort the list by enabled mods


   •  Right click on the Create sorted list of Banished mods.cmd file, Run As Administrator, wait for the User Account Control to pop up - let the file run
   •  Interact with the prompts in the CMD file screen (yes / no answers are needed for backups etc)
            *** note: if you have your Banished folder viewable, you will see files being added, then deleted in the folder - this is normal, the .CMD is designed to create 'helper' files.
                               These allow the main file system to work correctly - they will be deleted during the process, and are harmless - no danger here.
   •  Let the CMD screen close
   •  Open the newly generated file: Sorted List of Banished mods.txt  (it will automatically save in your Banished folder)
   •  For safe keeping, save the file to another folder, or simply move it
   •  All done, you now have the Sorted List of Banished mods file with mods listed in their "Alphabetical" order


Notes
   •--  Where referenced above, 'Banished Folder' / Banished Folder, Banished folder, etc etc; this refers to the folder that contains all the Banished 'admin' files, including the WinData folder (which houses the mods).
      -- In my case, running on Steam it is:  D:\Program Files (x86)\Steam\steamapps\common\Banished
      -- Do not use the folder system located in the "My Documents" (My Docs / Docs) folder system where the save games and screenshots are stored


   •--  The reason it is recommended that you use an empty folder to Unzip into is so that you can make sure there were 2 components, unlike me (and any others) who unzipped into another occupied folder and didn't realise there was a folder, not just the file.  It happens ... :)


   •--  When the Sorted List of Banished mods.txt is generated it will overwrite the existing file in the folder, if you want to keep the list for historical purposes move (or copy) the file to another folder, keeping the file in the Banished folder will not cause any problems moving forward


   •--  The cmsort folder and it's contents is what changes the "Alphabetical" list to the "Enabled" list, keep it safe, move it in and out of the Banished folder as needed


Disclaimers
   •--  Whilst this walkthru worked for me, and now the mod works as intended, it may not work for all users.
   •--  I have not edited the .CMD or altered any files in the folder system to make the mod work - they are just placed where they should




Good luck, please offer any feedback to the process, and if the steps were clear, or need editing.
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Gatherer on May 29, 2017, 02:45:24 AM
Thank you @QueryEverything . It works for me. I would have never figured it out myself.
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Gordon Dry on September 14, 2017, 07:33:46 AM
Sorry for late reply:

It should be crystal clear, you have to extract the whole zip into your Banished folder incl. the cmsort folder of course to have it sorted by load order.

And it still works correctly on latest Banished 1.0.7 build 170910
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Abandoned on September 14, 2017, 08:33:11 AM
Thank you @Gordon Dry for 1:1 aging update.  I use it on almost every map.  :)
Title: Re: Create sorted list of Banished mods (by Gordon Dry - release 6b)
Post by: Gordon Dry on September 16, 2017, 05:16:46 AM
The only thing I'm still missing is a way to extract the proper mod name (not the file name) out of the .pkm files ...