logo logo logo
Demo Buy it! Forums Support Educational Modding
==> Check Out The Current Mods <==

Like our other games, Democracy 2 is very easy to modify should you feel the urge. All of the data that controls the game is in easily accessible spreadsheets, you can even use Excel or a similar editor to tweak the game to your liking. Most of the games data is found inside the data/simulation folder, and a lot of the commonly modded stuff is in '.csv' files, which can be opened in Excel or similar. Always make sure that you save the files in the same format. they are NOT xls spreadsheets! If in doubt, use a text editor like textpad instead. We strongly recommend backing up all the data before you try editing. As well as supporting user-edits to the existing data in the 'csv' files, you can also add new data to the game in text files, as extra files inside your MyDocuments\Democracy2\Mods directory.

Adding new dilemmas
Dilemmas are he easiest thing to mod because they are in the same format as a mod as they are in the game. Take a look at the Democracy2\data\simulation\dilemmas folder. Each file is a new dilemma, and they are simple text files that can be edited. The data has the following function:

"name" -This is the unseen 'internal' name used by the game. It should be unique, but in the case of a dilemma it is hardly used.
"guiname" - This is the name used in the game for messages about that dilemma, as a title for the dilemma window, and used in other screens when an effect of that dilemma choice is being shown.
"description" - This is the text shown at the top of the dilemma window describing the dilemma in general.
"[prereqs] "-This section is not always present. If it is, it lists a number of special modules that must be active for the dilemma to be considered. Check the custom country stuff later on to see where these are set.
"[influences]"- This section can contain any number of lines. these are the different 'inputs' to the dilemma that make the dilemma more likely to be triggered. This format is used widely throughout the game. Each turn, the highest scoring dilemma is selected to be shown, although there are other rules preventing too many dilemmas happening in sequence. the format of each line is as follows:

Number = "ObjectName,Equation"

Number must be in sequence, going up (actually they just need to be unique). Objectname is the special 'internal' name of some variable within the game. Everything in the game has a name, and they can all be referenced anywhere. Examples of objects are 'simulation values' such as GDP, Voter happiness (names after each group) Voter group sizes (defined as Votername_perc) , Policies (where the value is the current slider value). Situations (current intensity of the situation) etc. There are also some special ones such as '_debt_' for national debt and '_globaleconomy_' for the current state of the economic cycle, and '_security_' for how well funded and supported by law your security services are.
Equation is where the real number crunching takes place. The format can only be Z op (Y op X). Where special value is given to 'x' which gets replaced with the objectname. the 'ops' can be add, subtract, multiply divide or power which is shown as '^'. It sounds complex, but it isn't, here is an example:


This means, take the value '0' and then add 0.33 multiplied by the current level of GDP. This final result then gets added up with the results of the other influences to give a 'score' for this dilemma. Dilemmas cannot be triggered twice, and the highest scoring dilemma wins. Note there is a special exception where you want a random number to be mixed in, you can do this : "_random_,0.2,0.4" which means "pick a random number between these two values". Note that a value can be negative.

"[Option0]" - This is the data for the first option. you have 2 lots of data, one for each option. they consist of the Description, which is just displayed text, the Name, which is also displayed, and then the special 'OnImplement' line. This bit defines what effect this dilemma will have, and it is very similar to the influence stuff listed above. Basically the OnImplement line defines a 'script' of stuff to do. The two most used options are PlaySound and CreateGrudge.

PlaySound(name) - This plays the ogg or wav file located in the place defined in 'name'.

CreateGrudge(src,target,value,degrade) - This creates a special value in the game which will have an effect through time. The 'src' value should be set to the 'object name' of the current dilemma. The 'target' is the 'object name' of the targeted object. That could be a simulation value, a voter group, or maybe 'votername_freq' which is the membership rate of a certain group. The value is the initial value of the effect, positive or negative, and the degrade is the value that this effect gets multiplied by each turn. Set it to 1.0 for a never ending effect, or 0.5 for an effect which halves each turn (and thus is short lived).

Adding new events and policies...

Demo Buy it! Forums Support Educational Modding
Fill out your e-mail address to receive our newsletter!