Advanced Modding – Buildings

Capitalism Lab supports user modifications of specific buildings.

Under the folder MOD_Kit\Images, you will find the following folders related to buildings:

  • Buildings
  • Buildings (Original)
  • Buildings_Icons

How to Modify a Building Image

Here are the steps:

1) Find the building you want to modify in the “Buildings (Original)” folder, and copy the building subfolder to the “Buildings” folder.

For example, if you want to modify the building image of Apartment 4 (the 4th apartment building), you can copy the subfolder “Apart4” from the “Buildings (Original)”  folder to the “Buildings” folder. The copied folder will be located at MOD_Kit\Images\Buildings\Apart4.

If you cannot figure which file to copy, you can look up the file name of the building you want to modify from the Excel file “Building filenames lookup.xls” in the “Buildings (Original)” folder.

2) Open the building folder that you have just copied to, and you will find the following subfolders and files:

  • “L” folder
  • “M” folder
  • “S” folder
  • FILELIST.TXT file
  • PACK.BAT – batch processing file

The 3 different zoom levels of building images are placed in the “L”, “M” and “S” folders respectively. When you modify the image files or create new ones to replace the existing ones, please make sure that the new image files conform to the following specifications:

a) The file must be in PNG 32 bit format (24 bits of RGB values + 8 bits of Alpha channel)

b) The background should be defined in the Alpha channel. (If you are not familiar with the alpha channel, you may read this introductory article: http://asktimgrey.com/2017/11/27/what-is-an-alpha-channel/)

If you are looking for an image editor capable of handling alpha channel, we recommend Paint.Net, which can be downloaded for free from: https://www.getpaint.net/

You could find articles about how to create transparent background using Paint.net by searching on the Internet with keywords like “how to create transparent images in paint.net”.

c) The base of the building must be centered on the PNG image. Please see the existing building images for reference.

d) If the building is animated, the image files of the animation must be in alphabetical order.

e) If the building is animated, the number of individual image files in each of the “L’, “M” and “S” folders must be the same.

f) If the building is not animated, there should be only a single file in each of the “L’, “M” and “S” folders.

For example, below is the image file Apart4_1.PNG in the \MOD_kit\Images\Buildings (Original)\Apart4\L folder:

3) When you have finished modifying the building images, edit PACK.BAT using a text editor like Notepad and change the output file name.

The default content of PACK.BAT is as follows:
..\..\..\MakeSprite FILELIST.TXT ..\<output file name.SPR>

In this example, you have modified the Apartment 4 building and the building code for it is “Apart4“. So you have to change the text to the following:
..\..\..\MakeSprite FILELIST.TXT ..\Apart4.SPR

4) Now run the modified PACK.BAT file to compile the PNG files into a sprite file with .SPR file extension.
e.g. Run \Mod_Kit\Images\Buildings\Apart4\PACK.BAT to produce Apart4.SPR

5) Go back to the building group folder Mod_Kit\Images\Buildings and run PACK.BAT to build BUILDING.RES which will comprise of all customized building files.
i.e. Run \Mod_Kit\Images\Buildings\PACK.BAT to build BUILDINGS.RES

6) Go to the Mod_kit’s root folder and run PACK.BAT to build a new MOD resource file.
i.e. Run \Mod_Kit\PACK.BAT to build CAPMOD.RES 


How to update the Building Icon file 

1) When you have modified the building image file, you may want to update the building’s icon file as well.

You can find building icon files under the folder \MOD_kit\Images\Building_Icons. Here are the specifications of the building icon files:

  • PNG 24 bit format (24 bits for RGB values only, no Alpha channel)
  • Size: 60×60 pixels

Below is an example of the Apartment 4 icon:

2) Go to the folder Mod_Kit\Images\Buildings_Icons and run PACK.BAT to build BUILDING_ICONS.RES.

3) Go to the Mod_kit’s root folder and run PACK.BAT to build a new MOD resource file.