Creating packaged mods

Democracy 3 is intended to be as moddable as possible. Although you can edit all of the values currently in the game, add new files to the folders that exist etc, this is very messy and hard to 'undo' and can leave both modders and mod-players in an unfortunate mess. To avoid this, Democracy 3 has been designed with a modular modding system in place. Essentially this is a system for allowing mods to be placed in discrete folders (yet still be loaded) and allowing the player to enable or disable mods at will from a special modding control panel.

The mods folder

There is an (empty) folder here \democracy 3\data\mods. This is where a config file for each installed mod should be placed. It has a special format and should be a text file (mymod.txt for example). It should be laid out like this:

name = "sample mod"
path = "sample_mod"
guiname = "sample mod"
author = "cliffski"
description = "Mod description goes here"

This should be fairly self explanatory. It mostly describes the information seen on the 'mods' window selected from the main menu of the game, but the special part is the 'path' line. This says where the root folder for the mod will be from the Democracy3 folder. So in this example, the mods files will be found within \program files\democracy3\sample_mod

What this system does is allow the player to install half a dozen mods, without changing anything at all in the main folders for the gam, and then enable or disable the mods at will. Disabled mods are entirely ignored, none of their data is loaded or can be referenced by anything else.

Placing Mod files

Once you have your 'sample_mod' folder, you need to create subfolders under it that match the main game to place new data. For example, you should create these folders:
\data (empty)
items placed in these folders should be happily loaded in by the game just as if they were in the main folder.

Installing your mod

So in summary, to install a mod so it uses the cunning new system, you need to drop a single file into the \program files\democracy 3 \data\mods folder, and then you create another folder for your mod, and dump everything else in a mirrored directory structure from that. I strongly recommend using the completely free inno setup program: Grab it here,. To make it easy, here the 'is' script file I use with inno setup to create the games installer, which might help you work out how to use it to install your mod: Installer file.

More Games from Positech

  • Gratuitous Space Battles 2
  • Gratuitous Tank Battles
  • Big Pharma