|
|||||||
|
|||||||
What can be modded in the game? | |||||||
Democracy 4 is certainly a complex game, and coding and designing it was no easy task, but actually, modding the game is surprisingly easy. Almost all of the simulation elements within the game are loaded from simple text or csv files, which can be edited using any (free) text editor or spreadsheet program. You don't need to download any SDK, learn any languages or install any software. Anyone can mod Democracy 4, even if you've never done any modding or scripting of a game before. You can add new countries, situations, dilemmas, policies and more, using nothing more than a copy of windows notepad (or similar). You may need a graphics program to create any new icons for your policies though... | |||||||
The basic modding principles | |||||||
Democracy 4's simulation engine is based on a neural network. This is a computer simulation designed to work in a similar way to the human brain. Pretty much everything in the game is simulated in the same way, such as a voter, a group of voters, a policy or an event. All of these 'objects' are connected to each other by 'effects'. So an object might be 'IncomeTax' and an effect might be the link between IncomeTax and the happiness of the middle class voter group. The objects and effects in the game are not hard coded, they are all loaded in from 'csv' files, which can be opened in a text editor, or more conveniently by a spreadsheet program such as Microsoft Excel. You can edit these files, and save them, then start a new game and immediately play with the changed simulation. | |||||||
CSV Files | |||||||
You will find the majority of the CSV files for the game inside the games \program files\democracy 4 \data\simulation folder. the names should be pretty self-explanatory. The most interesting one is probably 'policies.csv'. You should be able to open this up directly using Microsoft Excel. If you edit and then save this file be SURE that it gets saved out as a CSV file, if you let the file format change in any way, it will be unusable by the game, and you will need to start again. For this reason, always back up any files before you edit them! The CSV files for the game all have the same format with a line that starts with '#' indicating that this is an object that should be loaded into the game. Any line without a starting '#' is effectively ignored, so can be used as a comment, to help you organize things. | |||||||
Effects | |||||||
Looking at the policies file, you will see a whole bunch of columns in there that load in various bits of data, but towards the end of the list of columns you will see the 'effects' for that policy. For clarity, the effects are denoted as any column to the right of the '#effects' column, and there can be as many there as you like. Some policies have a few effects, some have many, but each effect entry takes up one 'cell' and has the same format which is... | |||||||
Installation and Preparation | |||||||
Each mod is basically a folder containing subfolders that mirror the folder structure of the base game. The folders all sit within a master mod folder in \my documents\my games\democracy 4\mods. (This location is different when steam workshop installs the mod). | |||||||
Translated text | |||||||
All of the text that is display to the player is located outside the folder structure described on the other modding pages. To isolate the text to make it easy to provide translations for a mod, the human-readable text is within folders found inside a 'translations' folder for each mod. These file exactly mirror the data inside the translations folder in the main game. | |||||||
Custom Pre-Requisites | |||||||
The game comes with a list of special hidden 'pre-requisite' values which may be set to 1 or 0 depending on which country is played, or other factors. You can see the list of these values in this file: data/simulation/prereqs.txt |