Wiki menu

Country overrides

How a scenario adds, re-skins, removes and adjusts countries: identity, leaders, population, flags, parties, missiles and starting state.

Last updated for v0.6.5
On this page

A scenario changes the cast of countries with three lists: addCountries adds a country or re-skins an existing one, removeCountries takes countries out, and countryStateOverrides sets the starting economy, politics and military of a country that exists. This page lists every field of the three and explains how leaders, identity, population and a new country’s starting state behave. The lists live in scenario.json or in the split files named below; see Split-folder scenario.

Adding countries

addCountries, in countries_add.json. The only required field is iso3. The Mod Builder’s Country roster page edits the list. Its schema is mod_scenario_countries_add.schema.json.

{ "addCountries": [
  { "iso3": "OTT", "templateISO3": "TUR", "name": "Ottoman Empire", "mapColor": "#C8392B",
    "capital": "Edirne", "capitalProvince": "Edirne", "population": 9000000, "gdp": 30000000,
    "governmentType": "Theocracy", "governmentSubtype": "Sultanate", "ideology": "Islamist",
    "flagPngPath": "flags/OTT.png", "leaderName": "Murad II", "leaderTitle": "Sultan",
    "continent": "Asia", "region": "WesternAsia",
    "dominantReligion": "Islam", "dominantEthnicity": "Turkish", "primaryCulture": "Ottoman" }
] }

Core fields

FieldTypeDescription
iso3stringRequired. Three upper-case letters. Use a code no base-game country has, unless you mean to re-skin that country (see Reusing a base-game code). A code that belongs to a base-game country the scenario removes gives the new country that country’s population pyramid and demographic rates, and the game logs a load warning.
templateISO3stringAn existing country to copy from: economy, military, AI personality, political starting state and every field this entry leaves out. Naming one keeps all of that state; the entry’s starting state fields still win over it. When it is omitted, the country is built on the map, names and geography of the country whose ISO3 sorts first (ABW in the base game), a warning is logged, and the country starts from a clean state instead of that fallback’s; see A new country’s starting state. Ignored for a re-skin.
namestringDisplay name.
mapColorstringMap colour as #RRGGBB.
mapColorVibrant, mapColorGloomystringThe country’s colour in the vibrant and gloomy map palettes, as #RRGGBB. Each falls back to mapColor when absent.
flagPngPathstringThe country’s flag image; see Flag file.
capitalstringDisplay name of the capital city.
capitalProvincestringThe capital’s province: a province name, or a province id written as a string.
populationintTotal population, spread over the country’s provinces. See Population.
areaKm2numberTerritory area in square kilometres.
governmentTypestringSee Government types.
governmentSubtypestringSee Government subtypes.
ideologystringSee Ideologies.
continentstringSee Continents.
regionstringSee World regions.
homelandTermstringThe noun the game uses for the homeland, for example "Federation".
neighborsstring[]ISO3 codes of land neighbours.
seaNeighborsstring[]ISO3 codes of neighbours across the sea.
militaryUnitTypeIdsstring[]The country’s unit roster. Non-empty: the country recruits only these unit types plus any it owns. Empty or omitted: the default set. See Who can recruit a unit type.
neutralboolMilitary neutrality. Omitted keeps the template’s setting. An AI-controlled neutral forms no military alliances or defence pacts, gives no guarantees, joins no coalitions and answers no calls to arms. It honours guarantees it already holds and calls its own allies when attacked. A human player is unrestricted.

Leader and identity fields

FieldTypeDescription
leaderNamestringName of the starting leader.
leaderTitlestringTitle of the starting leader, for example "Chancellor".
leaderGenderstring"male" or "female": the starting leader’s gender, which picks a gender-matched portrait. Omitted: the first leaderNamePool entry decides if it has a gender, otherwise the template’s.
leaderPortraitPathstringA PNG or JPG inside the mod folder, shown for the starting leader instead of the placeholder.
leaderNamePoolobject[]Names later leaders are drawn from, instead of the regional pool. Each entry is { "name": "...", "title": "...", "gender": "male" }; title and gender are optional.
lockLeaderTitlebooltrue keeps leaderTitle on every leader drawn from leaderNamePool, whatever the government becomes.
dominantReligionstringLargest religion, for example "Islam". At most 29 bytes. Drives kinship and the religiosity of the interest groups.
dominantEthnicitystringLargest ethnic group, for example "Turkish". At most 29 bytes. Drives kinship.
primaryCulturestringCulture shown on the country overview, for example "Ottoman". At most 29 bytes.
ethnicHomogeneitynumber0 (very diverse) to 1 (homogeneous). Shown on the country overview when a culture or ethnicity is set.

Starting state fields

These set the economy, equipment, AI and parties a country starts with. Each one wins over the template. “The template’s” below means the country’s own value for a re-skin.

FieldTypeDescription
gdpnumberAnnual GDP in the base money unit (not millions), 0 or more. Applied after the header’s gdpScale, so it is not multiplied by it. The opening monthly revenue, expenses, defence and research budgets and the opening trade are re-based on it, and the country’s provinces are put on it. Omitted or 0: the country keeps its template’s GDP (Aruba’s without a templateISO3), and Validate Mod warns.
debtToGdpnumberGovernment debt as a ratio of GDP, 0 or more: 0.6 is 60 %. Omitted: 0 without a templateISO3, the template’s with one.
unemploymentnumberUnemployment as a ratio, 0 to 1: 0.07 is 7 %. Omitted: 0 without a templateISO3, the template’s with one.
hdinumberHuman Development Index, 0 to 1. Omitted keeps the template’s value.
equipmentobjectStarting equipment counts, whole numbers of 0 or more: tanks, aircraft, ships, submarines, helicopters, apcs (armoured personnel carriers) and artillery. A category left out is 0 without a templateISO3, the template’s with one.
aiPersonalityobjectHow the AI plays the country when no player does: an archetype and seven sliders. See AI personality.
partiesobject[]The country’s political parties. See Parties.

The Mod Builder’s Country roster page shows them as GDP (USD), Debt to GDP, Unemployment, Human Development Index, Starting Equipment, AI Personality and Political Parties.

{ "addCountries": [
  { "iso3": "VNC", "name": "Republic of Venice", "gdp": 12000000, "debtToGdp": 0.2, "unemployment": 0.05,
    "equipment": { "ships": 40, "artillery": 20 },
    "aiPersonality": { "ai_type": "trader", "trade_openness": 85, "aggressiveness": 30 },
    "parties": [
      { "id": "ven_merchants", "color": "teal", "bloc": "liberal_capitalist",
        "economic_position": 0.6, "social_position": 0.2, "base_support": 0.6 },
      { "id": "ven_patricians", "color": "navy", "bloc": "nationalist_conservative",
        "economic_position": 0.3, "social_position": -0.4, "base_support": 0.4 }
    ] }
] }

AI personality

KeyValuesMeaning
ai_typebalanced, militarist, expansionist, diplomat, trader, isolationist, opportunist, defenderThe archetype. It also sets which strategic resources the country stockpiles.
aggressiveness0 to 100How readily it goes to war.
diplomacy_priority0 to 100How much it invests in diplomacy.
trade_openness0 to 100How open it is to trade. It is also the country’s economic priority.
alliance_willingness0 to 100How readily it joins and keeps alliances.
expansion_desire0 to 100How much it wants more territory.
risk_tolerance0 to 100How much risk it accepts. It is also the country’s military investment.
nuclear_threshold0 to 100The bar before it would use nuclear weapons. A lower value means readier.

A key left out keeps balanced and 50 without a templateISO3, and the template’s value with one. The sliders are the ones ai_personality_overrides.json uses.

Parties

Each entry of parties is one party, in the row shape of political_parties.json:

KeyTypeDescription
idstringRequired. Unique within the country. It is not shown to players.
colorstringRequired. One of the party colours. Give each party of a country a different one.
blocstringRequired. The ideology bloc the party draws its voters from; see Party colours and blocs.
economic_positionnumber-1 (left) to +1 (right). The government takes it when the party wins.
social_positionnumber-1 (authoritarian) to +1 (libertarian).
base_supportnumberVote share at the start, 0 to 1: 0.4 is 40 %. A country’s parties should add up to about 1.
last_resultnumberOptional. Share won at the last election before the start, shown as history.
can_governboolOptional, default true. false makes an “others” bucket that shows in the standings but never wins.
  • A party is shown as its colour plus its bloc, for example Red Socialists.
  • Without parties, a new country gets generic parties by ideology bloc. A re-skin without parties keeps its own; with parties, the list replaces them.
  • Party rosters are not saved. They are added again from the scenario each time a game starts or loads.

Flag file

flagPngPath names a PNG. The game does not enforce a size; the base game’s flags are 320 pixels wide.

  • A relative path is looked up in the mod folder (the one holding mod.json) first, then in the scenario folder (the split scenario folder, or the folder of a single-file scenario).
  • The path must stay inside the mod folder. An absolute path, or one whose .. leaves the mod folder, is refused: Validate Mod reports an error and the flag does not load.
  • A path that matches no file is reported with the mod’s load problems. The country then shows the base game’s flag for its ISO3 (a re-skin) or an empty flag frame (a new code).
  • A changed flag shows when the scenario is loaded again: a new game, or the Mod Builder’s RELOAD & TEST.

Leader identity

  • leaderName, leaderTitle and leaderGender set the starting leader. A country with a leaderNamePool but no leaderName starts with the pool’s first entry: its name, its title if it has one, its gender. A country that declares neither keeps the template’s leader.
  • leaderNamePool replaces the regional name pool for that ISO3. It also replaces a base-game pool when the entry re-skins a base-game country. Elections, coups, revolutions and leader deaths draw from it. An entry’s title overrides the title the government type would give.
  • Names hold at most 61 bytes of UTF-8 and titles 29. Longer ones are shortened, and Validate Mod says so.
  • lockLeaderTitle: true gives every pool entry the country’s leaderTitle, so successors keep it whatever the government type becomes. It needs both leaderTitle and a leaderNamePool. Without a pool, the regional pool picks successors and the title follows the government type; Validate Mod warns.
  • leaderPortraitPath is shown for the starting leader. A relative path is tried against the mod folder, then the scenario folder, and the file must lie inside the mod folder. An absolute path, or one that climbs out with ../, is refused: an error in Validate Mod, and the placeholder is shown.
  • Leaders who take over later use the mod’s portraits/<ISO3>/ folder when you ship it: files named <ISO3>_m_01.jpg for men and <ISO3>_f_01.jpg for women (.jpg, .jpeg or .png, numbered from 01). The picture is chosen by leader number, so every player sees the same one. Without that folder they get the base game’s portrait for that country if it has one, otherwise the placeholder.

Leader titles and homeland terms are shown translated when your localization files define a key for them under country.leader_title. and country.homeland.term.; otherwise the text is shown as written.

The name pools are rebuilt from the loaded scenario each session. They are not saved, and a loaded game gets them back.

Reusing a base-game code

An entry whose iso3 the base game already has (for example FRA in a 1450 scenario) does not create a second country. It is a re-skin: its fields are applied onto the existing country.

  • Applied: name, map colours, leader, government, ideology (which reseeds the electorate, as a state override does), neutrality, homeland term, area, capital, continent, region, the identity fields, population and the starting state fields (parties replaces the country’s own parties).
  • militaryUnitTypeIds and flagPngPath apply per ISO3 in either case.
  • Not applied: templateISO3, neighbors and seaNeighbors.
  • Anything the entry leaves out keeps the existing country’s value. The country keeps its own provinces, economy, military, relations and politics. Use State overrides and Province and region ownership to change those.
  • The country keeps its starting missile stockpile (nuclear warheads, cruise and ballistic missiles) unless a state override sets the missile fields. Listing Missile in disabledUnitCategories switches off missile units, not the stockpile.
  • If addCountries lists the same ISO3 twice, only the first entry is applied, with a warning.
  • A new name replaces the base game’s country.name.<ISO3> text in every language your localization CSV does not translate. Put translations there; see Localization.

A re-skinned country keeps its base-game land. It keeps every base-game province that no ownership override reassigns, even when removeCountries also lists it, and its declared population is spread over those provinces too. A 1450 COL (Electorate of Cologne) that is only given one German province also owns every province Colombia has in the base game, and most of its people would live there. Give each such province to a country in provinces_ownership.json, or leave it unowned as described under Removing countries.

Identity and kinship

Two countries with the same dominantReligion, or the same dominantEthnicity, are kin: their relations warm over time, and the AI is slower to attack them and quicker to ally with them.

  • These labels are never kin, and neither is an empty value: Other, Mixed, None, Unknown, Black, White, European, European_Descent, South_Asian.
  • A label is stored in 29 bytes of UTF-8. That is 29 ASCII letters, but fewer accented or non-Latin ones: a Cyrillic letter takes 2 bytes, a CJK character 3. A longer label is cut short and a warning is logged. The schema’s maxLength counts characters, so it cannot catch this.
  • Each of the four identity fields (dominantReligion, dominantEthnicity, primaryCulture, ethnicHomogeneity), when omitted, keeps the template’s value. Without a templateISO3 all four start empty rather than inheriting the fallback’s, and the country has no kin. A re-skin applies the fields it sets and keeps the rest.
  • Labels are shown translated through the localization keys demographics.religion.<Label> and demographics.identity.<Label>. A label without a key is shown as written, with underscores as spaces.

A new country’s starting state

A new country is a copy of its template. Without templateISO3 the template is only a fallback, so the country does not inherit that fallback’s state:

  • Every equipment count is 0, and government debt and unemployment are 0.
  • The central bank starts at its neutral rate.
  • The AI personality is balanced with every slider at 50, and the strategic resource stockpile targets follow that archetype.
  • The parties are the generic ones by ideology bloc.
  • Religion, ethnicity, culture and homogeneity start empty, as described under Identity and kinship.

GDP, population and the map, names and geography still come from the fallback (ABW, Aruba, in the base game), so set gdp and population. This clean start has nothing to do with the neutral field: military neutrality is still the fallback’s unless the entry sets it.

A named templateISO3 keeps the template’s state, because you chose it. In both cases the starting state fields are applied on top and win, and countryStateOverrides is applied after them and wins over them.

Validate Mod warns when an added country sets no gdp, neither in its addCountries entry nor in countryStateOverrides: it would keep its template’s GDP, and its provinces would be scaled to that. A re-skin is not flagged.

Population

A declared population is made true of the provinces, not only of the country record.

  • Once removeCountries and the ownership overrides are done, the country’s provinces are rescaled in proportion to their base-game populations so that they sum exactly to the declared figure. Each province keeps at least 100 people when the total allows it.
  • A country that owns no province keeps the figure only until the first monthly population update; a warning is logged.
  • A countryStateOverrides population does the same for any country and wins over the addCountries one.
  • An addCountries population below the template’s (or, for a re-skin, below the country’s own) also scales down the AI’s peacetime army floor, which the country otherwise inherits from its template. A country with a tenth of the people keeps a tenth of it. A larger population does not raise it, and a countryStateOverrides population does not change it.
  • Provinces left unowned keep their base-game people unless the header sets unownedProvincePopulationScale; see Scenario header fields.
  • A single province’s population can be set directly with Scenario province data, which is applied after the country totals.

All of this happens once, when a new game starts. Saves and multiplayer joins keep the populations they carry.

Removing countries

removeCountries, in countries_remove.json: an array of ISO3 strings.

{ "removeCountries": ["XXX", "YYY"] }
  • An ISO3 that addCountries also lists is never removed. Its entry re-skins the existing country instead, and the country keeps every base-game province that no ownership override reassigns.
  • To leave a province unowned, assign it in provinces_ownership.json to a country your scenario removes and does not add back. After the ownership overrides, land held by a removed country becomes unowned land.
  • A removed country takes its base-game military with it: its armies, fleets and air wings are destroyed at game start.
  • Loading a save never removes stacks. The save already holds the stacks the game had.

State overrides

countryStateOverrides, in countries_state.json: one entry per country whose starting state you change. The Mod Builder’s Starting states page edits the list. Its schema is mod_scenario_countries_state.schema.json.

{ "countryStateOverrides": [
  { "iso3": "FRA", "governmentType": "Monarchy", "stability": 0.6, "corruption": 0.3,
    "treasury": 2500000, "gdp": 40000000, "manpower": 60000, "population": 15000000 }
] }
FieldTypeDescription
iso3stringRequired. The country to change.
clearRelationshipsboolClears this country’s diplomatic state. Default false.
clearDiplomacyScopestring"core" or "extended"; see Diplomacy clear scopes. An entry without one uses the header’s scope.
governmentTypestringNew government type; see Government types.
ideologystringNew ideology; see Ideologies. Changing it reseeds the country’s electorate.
techLevelintStarting Knowledge Network level, 0 to 10. Tiers 1 to techLevel of every doctrine branch start completed, except branches hidden by disabledDoctrineBranches. A branch has 5 tiers, so 6 to 10 act as 5. Tiers the country already has are kept. New games only. 0 or omitted grants nothing.
stabilitynumber0.0 to 1.0, a fraction of full stability. 0 or omitted keeps the current value.
corruptionnumber0.0 to 1.0. Omitted keeps the current value; 0 sets no corruption.
treasurynumberTreasury balance in the game’s base money unit (US dollars in the base game, not millions). 0 or omitted keeps the current value.
gdpnumberAnnual GDP in the base money unit (not millions). 0 or omitted keeps the current value.
manpowerintAvailable manpower in people (not thousands). 0 or omitted keeps the current value.
reserveintReserve pool in people (not thousands). 0 or omitted keeps the current value.
populationintStarting population, spread over the country’s provinces as described under Population. Wins over an addCountries population for the same country. 0 or omitted keeps the current one.
neutralboolSets (true) or clears (false) military neutrality. Omitted keeps the country’s setting.
nuclearWarheadsintStarting nuclear warheads, 0 or more. 0 disarms the country: no starting warheads, and the missile-production tech waiver a nuclear power gets is gone too. Omitted keeps the country’s own count.
hasIcbmboolWhether the starting nuclear stock includes intercontinental ballistic missiles (ICBMs). false removes them from a country that has them. Omitted keeps the country’s own setting.
hasSlbmboolThe same for submarine-launched ballistic missiles (SLBMs).
cruiseMissilesintStarting conventional cruise missiles, 0 or more. 0 removes the country’s stock. Omitted keeps it.
tacticalBallisticMissilesintStarting conventional tactical ballistic missiles. Same rules as cruiseMissiles.
exportsnumberOpening exports for a whole year, in the base money unit (not millions), 0 or more. 0 is a value: no exports. Omitted keeps the starting figure.
importsnumberOpening imports for a whole year. Same rules as exports. The tariff revenue follows it.
militaryUnitTypeIdsstring[]Gives an existing country a unit roster. It replaces an addCountries roster for the same country.
dominantReligionstringSets the largest religion (see Identity and kinship). Omitted keeps the current one.
dominantEthnicitystringSets the largest ethnic group. Omitted keeps the current one.
primaryCulturestringSets the culture shown on the country overview. Omitted keeps the current one.
ethnicHomogeneitynumber0 to 1. Omitted keeps the current value.

treasury, gdp, exports and imports are absolute: they are applied after the header’s gdpScale and are not multiplied by it. A state override is applied after the addCountries starting state fields, so its gdp wins over theirs.

Starting missiles

The five missile fields match the five figures every base-game country has in its own data. The game rewrites those figures and seeds that one country’s missile stock from them, the way it seeds every country at the start. The starting stock, the production waiver for the missile types a country starts with and what the AI thinks the country holds then agree. The warheads are split over missile types by the same rule as for every country, guided by hasIcbm and hasSlbm. A country with no missile field set is left exactly as it was.

The stock is placed after the ownership overrides, so it sits in a province the country ends up owning. The fields apply to new games. A loaded game keeps the stock it saved.

Starting trade

exports and imports set the monthly trade level (the yearly figure divided by 12) that the economy keeps the country’s trade near every month. The figure therefore lasts for the AI and the player alike instead of fading back to the base game’s number. They are applied after gdp and gdpScale. The displayed totals, the trade balance and the tariff revenue start from the new figures. A side set to 0 has no level to keep: it shows 0 at the start, and the game then works out that side’s trade from the country’s own production and consumption, at most twice its monthly GDP.

The Mod Builder’s Starting states page has these fields as Nuclear Warheads, Has ICBMs, Has SLBMs, Cruise Missiles, Tactical Ballistic Missiles, Annual Exports (USD) and Annual Imports (USD).

Play Global Protocol: New World Order

Out now in Early Access on Steam, with online multiplayer for 2–8 players.