How to Prepare a Capitalism Lab MOD File
----------------------------------------
Each subfolder under \MOD_kit\Images has its own PACK.BAT for the files in that folder.
When you update the files in one of these subfolders (e.g. \MOD_kit\Images\Persons), run the PACK.BAT
in that folder to pack its files into a resource file.

After you have done this for every folder you changed, run \MOD_kit\PACK.BAT. It combines the resource
files from all the folders, together with the files in \MOD_kit\Data, into a single MOD file named CAPMOD.RES.

Rename this file to the name you want for your mod and place it in the Capitalism Lab\MOD folder.
Be sure to also create a .TXT file with the same name. For example, if you rename the mod file to MyMOD.RES,
create a matching MyMOD.TXT.

For full details on how to set up the .TXT file and use the MOD Kit, please visit: https://www.capitalismlab.com/mod/



Common Issue When Running PACK.BAT
----------------------------------
PACK.BAT uses several helper tools to create the resource files. If your anti-virus software is running
in the background and blocks these tools, PACK.BAT may fail. To avoid this, add the tools to your
anti-virus software's list of allowed programs (whitelist).

The tools are in the \MOD_kit folder:
- LibResXL.exe
- LibResDir.exe
- MakeSprite.exe



Optional_Data and Optional_Images Folders
-----------------------------------------
The files in \MOD_kit\Optional_Data are not part of a mod by default. To use one of them in your mod,
copy it into the \MOD_kit\Data folder before you run \MOD_kit\PACK.BAT.


Trees.dbf
---------
If you copy \MOD_kit\Optional_Data\Trees.dbf into the \MOD_kit\Data folder, also copy the
\MOD_kit\Optional_Images\Trees folder into the \MOD_kit\Images folder.


Music.dbf
---------
Music.dbf lets your mod choose its own background music: your own music files, the game's original
music, or a mix of both. To use it, copy \MOD_kit\Optional_Data\Music.dbf into the \MOD_kit\Data folder
and edit it with a DBF (dBASE) editor. Each record in the file is one music track and has two fields:

  MUSICTYPE  - where the music file is and how it is used (see the codes below).
  MUSICFILE  - the file name of the music file, including its extension, e.g. music-01.mp3
               (30 characters at most).

MUSICTYPE must be one of these codes:

  ORIGINAL   - a music file that comes with the game, in the Capitalism Lab\MUSIC folder.
  MOD        - a music file of your own. Put your music files in a MUSIC folder inside a folder that has
               the same name as your mod, in the Capitalism Lab\MOD folder. For example, for the mod
               MyMOD.RES, put them in Capitalism Lab\MOD\MyMOD\MUSIC.
  OPENING-M  - your own music for the game's opening screen, used instead of the game's opening music.
               It goes in the same folder as the MOD music files. Use this code for one record only.

Notes:
- When your mod has a Music.dbf, the game plays only the music listed in it. To keep the game's
  original music and add your own, keep the ORIGINAL records and add a MOD record for each of your files.
  To replace the game's music completely, delete the ORIGINAL records.
- A mod can have up to 100 MOD music files.
- Records with an empty MUSICFILE field are ignored.
- If a listed music file cannot be found, the game skips it. If none of the listed files can be found,
  the game plays its normal music.
- The music files themselves are not packed into the MOD file. When you share your mod, include the
  Capitalism Lab\MOD\<mod name>\MUSIC folder with it.
