Modding Events

Democracy has been designed to be easily added to and modified. you can add new events into the game using nothing but a text editor such as MS Notepad. A spreadsheet program such as MS Works Spreadsheet or Microsoft Excel may make it easier.

The events for the game all live in a 'csv' file in:-

"C:\Program Files\Democracy\data\simulation\Events.csv"

A csv file is 'comma separated' which means its a text file with a lot of values separated by a comma on each line.

Before amending the simulation files we recommend you back up the simulation folder by
creating a folder named 'simulationbu' and copying all the files in the simulation folder to it.

You cn either modify the existing events in the events.csv file, or you can add new events by creating a new text file in this directory:

"C:\Program Files\Democracy\data\mods\events"

In this case, each event is a separate text file, although its a text file with just one line in it (Don't add any line breaks!). Whichever method you use, you end up with a line of text like this:

#,EventName,GUIName,description,income,expenditure
,sound,trigger,trigger,#,effect,effect

Here's a breakdown of what they mean: -

# = this is the first value/first column if entering via a spreadsheet), it has to be # and that indicates that this is a valid line in the file.

EventName = this is a piece of text used to uniquely identify the event.this is an 'object name'. (Object Names must not have embedded spaces)

GUI Name = this is the title of the message shown to the player. its the 'human-friendly' name of the event.

description = the text shown to the player when the event dialog is shown

income = this is the amount of money that the government earns as a result of the event being triggered. This is a relative amount, and its scaled depending on the size of the country and the level of difficulty the game is running at.

expenditure - as above, but the cost of the event

sound = the name of the sound file triggered when the event has been displayed.It must live in the sounds directory, and can be either 'ogg' or 'wav' format.

trigger = there can be any number of these. You indicate that there are no more by putting # in the next value/column. They are the 'triggers' that collectively cause the event to become active. the higher the value, the more likely the event will trigger. The format is as follows:

PovertyRate,0+(x*0).

in this example, x is substituted for the value of PovertyRate. the value that gets added to the trigger is then:
0 + (PovertyRate * 0).
so the higher the poverty rate, the more likely the event
you can also use + or - or ^ or / or * in these calculations, but the basic format must stay the same.
the name 'PovertyRate' is an 'object name' object names are the names of events, situations, policies, votergroups or simulation values.
These are in the other csv files inside the data directory.
There are also some 'special' names such as these:


"_random_" = this has a special format where a random value gets calculated from between the lower and higher number (low,high)
"_winning_" = this is a measure of how well the player is doing. you can make bad things happen when he is winning and vice versa.
"_default_" = this is always true, so x is always 1.0
"_debt_" = the severity of the debt problem


# = this next '#' signifies the split between the triggers and the effects

effect = this is the effect that the event has on something. the format is as follows:


objectname,effect,degrade


objectname is the object whose effect gets changed. the object can be anything with an object name, like a votertype, a simulation effect, even another event (or this event, to prevent it retriggering constantly). effect, is the amount of change we want to apply to that object. degrade is the amount by which that effect persists each quarter. here's an example:

Poor,-0.8,0.5

What this does is reduce the happiness of the poor by 0.8 instantly. The next turn, that value is multiplied by 0.5, so its then just -0.4 (they are recovering), then 0.2, then 0.1 etc etc.

More modding information will follow soon. Keep an eye on our messageboard too!

Home  |   Demo  |   Buy Full Version  |   Modding  |   Press  |   Why Buy?                  Positech Games 2007