An image
Basics Policies Dilemmas Events Situations Simulation Countries
Modding Countries

Adding a new country to the game takes some work, but can be done. The countries are folders under the path \democracy 4\data\missions. Each folder contains a number of additional files and information.

File Structure

Inside the folder for your new country you need one text file and two more folders. The folders are 'overrides' and 'scripts' and the file is called countryname.txt where countryname is the same as the folder. That text file contains the majority of the information for controlling the state of the country, split into four sections called [config], [options], [stats] and [policies].This file should be saved in UTF8 format, so that symbols like the Euro are preserved.

[config]

There are a large number of lines in this section which control how the country looks and behaves. Here is a breakdown:

currency This is the text used to denote the currency for this country as is used throughout the GUI. See note above about UTF8
population This is the amount of voters represented by each simulated voter. there are 2,000 simulated voters so divide the countries true population by 2,000 to get this figure
economic_cycle_start The global economic cycle works on a sine wave, and this shows the percentage through the route of that sine wave that the missions starts at with regards to the state of the global economy. Experiment to see different resylts. value 0 to 1
min_income and max_income The range, in the currency listed above, which voters salaries are distributed between. Makes no difference to the simulation, it is entirely for visual purposes.
min_gdp,max_gdp Only the max works, and it is used as a scalar against which debt is measured to calculate debt as a percentage of GDP, and thus credit ratings. It is probably best calculated by comparing as nations debt against an existing mission nations debt and adjusting accordingly.
wealth_mod A relative multiplier showing the cost and income of things relative to other countries. All policy costs and incomes and other values are multiplied by this amount. So again, it's best to compare a country to an existing one and pick an appropriate value based on the size of their economy.
fx_rate_to_pound Set this to be the exchange rate between this countries currency and the UK pound (GBP).
starting_debt The level of government debt at the start of the missions.
name Used internally
names_file filename of the file used to load in a list of first, last and surnames for ministers and citizens in this country. That file can of course be modded.
flag small flag icon used in some screens. Thgis should be a dds file (or png) found inside your mods 'bitmaps' folder.
apathy Default value. This affects the likelihood of people voting, and should be adjusted based on real world turnout in the country.
map The filename of an SVG (vector) file that shows an outline map (white color, will get re-colored by the game) of the country. Should be inside this mods 'svg' folder, and can be made using the free app inkscape available here.
GUID Used to locate the mission in the list of missions on the choose mission screen.

[policies]

Each line in this section is a policy name and it's starting value. There are some 'uncancellable' policies which are always set (like labourlaws) and if their value is not overidden here, those policies will default to a value of 0.5. Any policy listed here is automatically set as active, with the slider set to the given value. It is entirely implemented at the start of the mission, and it's effects should be fully worked-through the simulation at the start of the game. Not that this section also includes any entries from the \data\simulation\prereqs.txt that would apply to this country.

Options

Any special options that apply to the country such as MULTIPLEPARTIES or COMPULSORY_VOTING.

The overrides files

if you open up the folder called 'overrides' in any of the mission folders you will find a new bunch of text files. This is where you can put files that denote changes to the simulation that take place only for that mission. Each file represents a single override, and you can have as many as you like. The format is as follows:

TargetName This helps identify the effect that you want to change in the game. This is the object name of the target of the effect. There does not already have to be an effect with this combination, it can be used to create entirely new effects between items just for this mission.
HostName As above, but this is the target of the effect.
Equation Either a new standard 'effect' style equation for this effect (perhaps stronger or weaker than the existing one) or the word DELETE meaning just remove the existing effect.
Inertia Inertia that is applied to the given effect.

The scripts files

This folder contains scripts run at the start of that mission, basically to create grudges. See the 'Events' modding page for more details. The most obvious uses here are to create changes in the composition of voter groups for each country, but you may also wish to start off a country with a GDP boost or cut, or some other temporary or permanent feature to it's economy or society.