|
|||||||
|
|||||||
Modding Situations Situations are rows loaded in from the CSV file found at \program files\democracy 4\data\simulation\situations.csv. Each line that starts with a '#' is a situation that is loaded in and may be triggered. The game will pre-calculate to see if any situations should be running given the situation at the start of the game. From left to right, the different columns of data are as follows... Name The internally used 'object' name of the situation, not shown in the game. Department This picks which area of the main screen shows this situation PreReqs The names of any pre-requisites for this situation to trigger, such as requiring a coastline, or WMD tech. Icon The name of the file used to display this situation. This is an SVG file (vector graphics) which you can create using a free program like inkscape, available here. It should be inside the mods 'svg' folder. Positive A value of 1 means this situation is shown in the game with a green background. 0 means a red background. Start and stop triggers These are the values for this situation that conform to triggering a 'start' or a 'stop'. By default these values are all set with a similar gap, but you can set them however you want, although I can't vouch for what happens if they are reversed or the same! Cost per turn This is a fixed value spent each turn that the situation is on-going. This crude value are then multiplied by the multiplier value set up in each country's country file to get the final figure applied in the game. CostFunction The equation determining how costs are calculated, at a base level. Best to leave this at 0+(1.0*x) to get a nice smooth linear increase in cost as the situation strength goes from 0 to 1 Income per turn This is a fixed value earned each turn that the situation is on-going. This crude value are then multiplied by the multiplier value set up in each country's country file to get the final figure applied in the game. IncomeFunction The equation determining how income is calculated, at a base level. Best to leave this at 0+(1.0*x) to get a nice smooth linear increase in cost as the situation strength goes from 0 to 1 Inputs and Effects All the remaining entries represent the effects for this situation, but some are inputs which cause the event to trigger (or to stop) and the others are the outputs which represent the impact this situation has on everyone else when it is running. The effects are all inputs, up until the '#' entry, after which the remaining ones are effects. Obviously with inputs, the first item is the source of the effect, and with outputs the first item is the target of the effect. There is support for a special 'default' object, which can be used to set a 'base' level for the situation. |