Welcome to World of Banished!

Main Menu

How To ...

Started by slink, September 13, 2014, 10:23:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Quote from: RedKetchup on September 21, 2014, 05:33:19 AM
me :

1. i do my changes
2. delete bin and build folders
3. launch my .bat in DOS window
4. look how it compiles
5. go in the 2 little Windows folder at top of my screen (kit bin windata and the game windata)
6. click and drag the .pkm from bin/windata to my game windata
7. launch the game with steam launcher
8. start a new game
9. check in game what i did
10. close the game

11+ rince and repeat. with more changes

I noticed the issue of not overwriting files in the bin folder too when trying to get to the bottom of this, so have also been deleting files there in between each buildmod attempt. I genuinely don't understand why that /build command does not work on my end. As long as including all the files I've changed in the ExternalList works, then that is good at least, but it would be nice if all those *.crs files were compiled by the /build command itself. That does not happen for me (without the list).

This is what I'm doing
1. Copy files I want to change into /mymods/newmod, retaining folder structure from /resource
2. Make the changes to the files
3. Delete /bin folder if present
4. Make sure paths are correct in Package.rsc, and include all files I have edited in ExternalList (okay now, but would be a nightmare in big mods). For example:
PackageFile orchard
    String _name = "orchard";
    String _author = "Pangaea";
    String _description = "Improves the lifespan of all orchard trees in the game. By default they live on average ~8 years. With this mod they should live ~20 years on average.";
    String _icon = "icon.png";
    int _userVersion = 1.0;

    // all files in resource directory
    String _includeList
    // exclude package files, mod files, file used for building packages
    String _excludeList

ExternalList list
External _resources

5. Run the .bat file (thanks you slink, as this finally works now)
..\..\bin\Tools-x64.exe /build Package.rsc:list /pathres ../mymods/orchard /pathdat ../mymods/orchard/bin

..\..\bin\Tools-x64.exe /mod Package.rsc:orchard /pathres ../mymods/orchard /pathdat ../mymods/orchard/bin

6. If everything worked well here, and I see all the *.crs files in the modded /bin folder and in the main WinData folder, then it should be ready to go
7. Run a *.bat file that only loads the *.pkms
bin\Application-x64-profile.exe /onlypkg
8. There I check that the mod is available, and tick it and restart if it's not selected
9. Check in the game to see if the mod works as intended (for this orchard mod, that has taken many hours).
10. Close game, rinse and repeat.

I think that was all, and precise, but it's been many hours since I did it now, so maybe my jellyfish brain has forgot something already  ;D :-X


i dunno.  my PackageFile DecorativeItems

my bat:

bin\Tools-x64.exe /build DecorativeItemsResources.rsc /pathres ../fence /pathdat ../fence/bin
bin\Tools-x64.exe /mod Package.rsc:DecorativeItems /pathres ../fence /pathdat ../fence/bin
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .


Hmm. Could it be because you're making your own files, while I'm just editing existing files? I really don't know, but it's an odd one.

As long as @slink 's trick with list works, that is fine enough, though - at least I can create the pkm file now and the mods work, and at the end of the day that is what matters.


A note for makers of mods that create new items, as opposed to overrides, is that the name inside the package.rsc must correspond to the name of the mod you distribute.  Renaming won't work with mods that create new items.  This may or may not have been the case only since the most recent beta, but it is true now regardless.

Because of this, underscores can be used in mod names but not space should not be used.  Likewise disallowed are characters relating to the directory structure such as forward-slash, back-slash, and the period.


From way back at the start of the thread:

Quote from: slink on September 14, 2014, 07:21:35 PM
I use another editor, in Administrator mode, for editing rsc files by simply clicking on them, so that is no problem.

@slink -- just out of curiosity, what editor are you using for the .rsc files?  Notepad is good for a lot of things, but something with a little more oomph would be nice.  Thanks.


I use a program called PFE, short for Programmer's File Editor.  I downloaded it just before the turn of the century.  It is freeware.


personally i open and associated .rsc to notepad :)
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .


I like NotePad++. It's a great program, and has colour highlighting, so I like it better than normal Notepad for a bit more complex tasks. Admittedly there isn't colour highlighting for .rsc files, but I'm sure that could be associated if I bothered to go looking for it. The program is also free.


Thanks to all who replied to the last question about editors.

And special thanks to @slink, whose tutorials  in this thread about override mods have been a great help.  @slink -- your opening posts here have been very helpful.  :)   My first attempt at a mod is an override, and probably pretty useless, but mirroring your examples made it much easier to understand what was going on.


I am trying to follow you tutorial to learn how to mod, but i am stuck where you say to " Change the directory to banishedkit".

I am new to programming and have googled how to open the DOS, but i can't find a way to change the directory.


cd <dir>

cd banishedkit


cd mymods

depending where you put it
<dir> = the folder you want to go

if you need to swap drive you can do


or e:
for example
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .


Sometimes the path must be designated from the root.  In that case the format is:

cd /whatever/whatever2/whatever3

The first "/" says to start from the root directory of that drive.  Otherwise the OS only looks in the current directory for the target.  The opening directory in Windows 7 for an admin level DOS window is \Windows\system32 which is not what you want.


Thank you for the help.

I have a new problem now. When i run the override.bat i get this

An assertion failure has occurred. A crash dump has been saved.

Location: IO\TextReader.cpp(70)
Message: C:\Banmods\MyMod\modded\Package.rsc (0): error: Unexpected character '\' found!
Expression: false


I have tried the tutorial that a link was posted earier and have ran into the same problem when i run the package.bat


copy paste your Package.rsc here
(there is a \ inside where there shouldnt be)
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .


Quote from: slink on December 01, 2014, 06:38:01 AM
The opening directory in Windows 7 for an admin level DOS window is \Windows\system32 which is not what you want.

personally my user account has admins rights. i dont use the 'admin account'

when i open c: command prompt i arrive here:


if we want to go back to c:\ we need to do :

cd ..
cd ..

each time you do cd .. to go back 1 folder closer to the root.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .