SUPPORT
FORUMS
ABOUT
BLOG
An image

Home

FAQ

Modding

DLC

Press Kit

Forums

Basics

Policies

Dilemmas

Events

Situations

Simulation

Countries

Modding Dilemmas

Dilemmas are not loaded from a CSV file but from individual files for each dilemma within \program files\democracy 3 \data\simulation\dilemmas. Each one has certain criteria that may cause it to trigger. The dilemmas can be shown again and again, but once triggered will not be eligible for triggering again for 32 turns.

Grudges

Grudges are created by various parts of the game. They are basically a hidden 'temporary' object (although theoretically they can have a 100% 'decay' value which means they last forever...) that can have an effect on another game object. For example, many game events create a grudge which has effects on public opinion, allowing them to have a temporary and fading out value as they drift from memory. The grudges are created by a special bit of 'script' which is used a lot in the dilemma code. A grudge has a target object, a value and a decay, although technically it's the inverse of a decay, meaning that a decay of 0.9 means that each turn the value of the grudge is multiplied by 0.9, so gradually fading out. The higher that value, the longer the effect will last. Here is a breakdown of the data you will find in a dilemma file...

[dilemma]

This section loads in a name, used internally by the program

[influences]

This is a numbered list of input 'effects' which are calculated each turn to give the 'likelihood' of this dilemma being triggered. The top dilemma each turn is triggered, unless an event has also triggered that turn. For more on how to format an effect see here, although note you cannot use inertia for these effects. The name at the start of the effect here is the 'source' rather than the target (which is clearly this dilemma). So for example this influence:

1 = Health,0.8-(0.6*x)

Says that the value of this dilemma (Chance of it triggering) has 0.8 added to it, then (0.6*Health) is subtracted from it. In other words, the higher your health value, the less chance of this dilemma being triggered. There is also a special class of effect for these influences which is the random influence which is formatted like this:

0 = _random_,0,0.3

What this means is to generate a random number between 0 and 0.3, and add that number to the dilemmas current value. This is to give some random variation to the probability of this dilemma being triggered. You can have as many influences to a dilemma as you like.

[option0] (and also [option1] and...)

These two (or optionally 3) sections represent the options the player must choose from. Each one has a line called 'OnImplement' which is only processed if this is the option which the player selects. This line is a 'script' which is run to implement the effects of this decision. For example:

OnImplement = CreateGrudge(Health,-0.05,0.9f);CreateGrudge(Liberal,0.10,0.9f);CreateGrudge(Parents,-0.06,0.9f);CreateGrudge(Obesity,0.05,0.9f);

The script is almost always just a string of CreateGrudge() statements separated by a semicolon. Each of these calls creates a new grudge with the given values. For example:

CreateGrudge(Health,-0.05,0.9f);

This creates a new grudge that is targeted at 'Health'. The two values are the 'effect' of the grudge and it's decay. In this case, the grudge reduces Health by 0.05, but that value is itself multiplied by 0.9 each turn. So a turn after the choice, it will be just -0.045, and so on. You can have a high but quickly trailing off effect, or vice-versa, by fiddling with those two numbers. You can also make those effects positive or negative, and the target can be any named object.