World of Banished

Conversations => Tips and Tricks => Topic started by: FlyingDutchman on September 26, 2019, 04:20:55 PM

Title: Executable Batch File
Post by: FlyingDutchman on September 26, 2019, 04:20:55 PM
These executables, compiled batch files, can be used for building and packaging all your mods. The attached ZIP-archive contains both a 64-bit and a 32-bit version.

How to use

Before using the executable batch files, please carefully read the Requirements!

Copy the executable (bp32.exe or bp64.exe) to the base folder of your mod. Run the executable (in the Command Prompt) with the following command line:

   bp64 modName
   bp32 modName

where modName is the name of your mod.


Why these requirements?

These requirements are necessary to prevent the use of too many parameters in the command line. It also enables you to use one single executable batch file for building and packaging all your mods and it forces you to be consistent in naming your mods and declare types.


You cannot use these executables for building and packaging the examples from the Banished Toolkit as the examples do not meet the above requirements. If you want to do so, you will have to move the mod folders in the example folder to your Banished Toolkit folder and do some renaming of folders and declare types until the requirements are met.


To build and package the whiteChicken example, move the Animal folder to your Banished Toolkit folder. Rename the Animal folder to whiteChicken. There is no need to rename the declare types in Package.rsc and whiteChickenResources.rsc. Open the Command Prompt and enter the following command line:

   bp64 whiteChicken

Another example

The translation example doesn't use a seperate resourcefile. Move the translation folder to your Banished Toolkit folder. Alter the first line in Package.rsc to PackageFile translation. Enter the following command line in the Command Prompt:

   bp64 translation
In both examples bp64.exe should be copied into the whiteChicken and the translation folder. Instead of the 64-bit version you could also use the 32-bit version.

Command Prompt

When activating the Command Prompt it usually opens in C:\Users\yourUserName. If you want the Command Prompt to open in your Banished Toolkit folder, click Start, select All Programs, select Accessories, right-click Command Prompt and choose Properties. In the Command Prompt Properties dialogue window select the Shortcut tab and change the Start in: value to the pathing of your Banished Toolkit folder (see the following image).


EDIT: After installing Windows 10 yesterday, I found that this option is no longer available. Instead you can create a small batchfile with the following contents:

    cmd /k cd [path to your Banished toolkit folder]

e.g.: cmd /k cd c:\BanishedToolkit