This page is a lookup. The first section lists the permissions a mod declares in mod.json and what each one unlocks. The rest lists the exact values the scenario and country files accept in fields that take a fixed set of names, with a link to the page that documents each field. Write the values as shown.
- Permissions
- Government types
- Ideologies
- Continents
- World regions
- Unit categories
- Air mission types
- Diplomacy clear scopes
- Government subtypes
- Starting diplomacy types
The JSON Schemas are the reference for these lists (see JSON schemas). VALIDATE in the Mod Builder checks your files against them, and a value that is not in a schema’s list is an error in mod.json and in the split scenario files, which stops a Workshop upload. Where the game itself reads more spellings than the schema lists, the section says so.
Permissions
A mod’s scripts and interface files can only do what mod.json declares:
{ "permissions": ["ReadEconomy", "WriteTreasury", "InjectUI", "world.read"] }
A permission has a PascalCase name and, for most, a snake_case name. ReadWorld is also written world.read, and WriteFlags is also written flags.write. The mod’s row on the MOD LOADOUT panel shows a badge for every permission it declares, or NO PERMISSIONS.
| Permission | Other spellings | What it allows |
|---|---|---|
ReadEconomy | read_economy | Nothing. Every economy read (GDP, treasury, stability, manpower, technology level, the date) works without it. The name is accepted so that a manifest which declares it stays valid. |
WriteTreasury | write_treasury | Change a country’s treasury: add_treasury, country_set_treasury. |
FireTriggers | fire_triggers | Queue events and raise reactive triggers: fire_event, fire_trigger, and ModHookBus.FireEvent in C#. |
ReadWorld | world.read | Read the world from a script: the country list and ISO3 lookups (country_count, country_at, country_by_iso3, country_iso3), wars and alliances (country_at_war_with, country_allied_with, country_war_count, country_war_enemy), province owner and controller (province_owner, province_controller), country flags and variables (country_has_flag, country_flag_age_months, country_get_var), lifetime counters (country_lifetime) and the mod’s own state (state_get). In C#, the matching read members of IModServices. |
WriteFlags | write_flags, flags.write | Set or clear a country’s event flags and set or add to its event variables (country_set_flag, country_clear_flag, country_set_var, country_add_var), and write the mod’s own state (state_set, state_add). In C#, SetFlag, ClearFlag, SetVariable, AddVariable, SetState and AddState of IModServices. This is the state that the has_flag, not_has_flag and variable_gt / variable_lt / variable_eq event conditions test (see Flags and variables). It has nothing to do with flag or banner pictures. |
InjectUI | inject_ui | Add interface elements: the UI injection file (toolbar buttons, province and country rows), Content/ui/theme.json, Content/ui/layout.json and Content/ui/hud_trackers.json. Show popups and add end-screen rows from a script: show_mod_popup, show_mod_popup_key, register_end_screen_row. In C#, ModHookBus.ShowPopup, ModHookBus.ShowPopupLocalized, and ShowPopupLocalized and RegisterEndScreenRow of IModServices. |
WriteDiplomacy | write_diplomacy | Found, join, leave and invite to alliance organizations (organization_create, organization_join, organization_leave, organization_invite), and start or end the world ceasefire (world_ceasefire_start, world_ceasefire_end). In C#, CreateOrganization, JoinOrganization, LeaveOrganization, InviteToOrganization, StartWorldCeasefire and EndWorldCeasefire of IModServices. These are the same actions as the organization and world ceasefire event effects (see Alliance organization effects and World ceasefire effects). |
The function names are the WASM imports. Their signatures, and the C# interface, are on the WASM scripting page.
What happens without a permission
- A call that needs a permission the mod did not declare does nothing. It returns a neutral value (0, -1 or false). For the version 4 functions and the
IModServicesmembers, the game also reports it once per function as a warning in the Mod Builder’s RELOAD & TEST list and in the log. - Interface files are ignored. Without
InjectUIthe game does not read the mod’s UI injection file, theme, layout or trackers. - Some scripts do not load at all. The
ReadWorld,WriteFlagsandWriteDiplomacyfunctions,show_mod_popup_keyandregister_end_screen_rowneedwasmAbiVersion4. A core WASM module that imports one of them without version 4, or without the permission the function needs, fails to load, and the load error names the import. VALIDATE reports the same problem as an error before you load the mod. - A name that is not in the table grants nothing. VALIDATE reports it as an error. The game also reads
read_world, but the schema does not list it: writeworld.readorReadWorld.
Write InjectUI in that form. When VALIDATE checks the interface files, it looks for the spelling InjectUI. A mod that declares inject_ui works in the game, but VALIDATE warns as if the permission were missing.
Writes in multiplayer
In a multiplayer game, a write to the simulation (treasury, events and triggers, flags, variables, mod state, organizations, the world ceasefire) is refused when it comes from a UI action handler, such as the handler of a mod’s toolbar button. That handler runs on one player’s computer only. Flag, variable and mod state writes are also refused in multiplayer when no simulation hook is running. Popups stay allowed. Single-player games have neither limit.
Government types
Used by governmentType in addCountries (see Adding countries) and in countryStateOverrides (see State overrides).
Unknown, Democracy, Authoritarian, Hybrid, Monarchy, Theocracy, MilitaryJunta, OneParty, CommunistState, Transitional
Unknownmeans “not set”: the country keeps its template’s (or its current) government type.- The game matches the names without regard to case.
- The game also reads three older labels, with a warning in the log:
military_juntaasMilitaryJunta,failed_stateasTransitional,city_stateasHybrid. The schema does not list them, so VALIDATE reports them as errors. - Any other value is ignored with a warning in the log, and the country keeps its template’s value.
Event files spell these differently. The government_type, continent and region event conditions take lowercase names with underscores, such as military_junta, one_party, europe and northern_africa, not the names on this page. See Conditions.
Ideologies
Used by ideology in addCountries (see Adding countries) and in countryStateOverrides (see State overrides).
Unknown, Liberal, Conservative, Socialist, Nationalist, Islamist, Communist, Fascist, Libertarian, Mixed
Unknownmeans “not set”, as for government types.- The game matches the names without regard to case.
- The game also reads four older labels, with a warning in the log:
progressiveasLiberal,centristandgreenasMixed,theocraticasIslamist. The schema does not list them, so VALIDATE reports them as errors. - Any other value is ignored with a warning in the log.
Continents
Used by continent in addCountries (see Adding countries).
Africa, Americas, Antarctica, Asia, Europe, Oceania, Unknown
The game matches the names without regard to case. A value it does not recognise is ignored, and the country keeps its template’s continent.
World regions
Used by region in addCountries (see Adding countries), by regionName in regionOwnerOverrides (see Province and region ownership), and by region in a demography seed row (see Demography).
AustraliaNewZealand, CentralAsia, EastAsia, EasternEurope, LatinAmericaCaribbean, Melanesia, Micronesia, NorthernAfrica, NorthernAmerica, NorthernEurope, Polynesia, SouthAsia, SoutheastAsia, SouthernEurope, SubSaharanAfrica, Unknown, WesternAsia, WesternEurope
In the scenario files the game matches these names without regard to case. In a demography seed row the name must be written exactly as shown, and a row with any other name is skipped.
Unit categories
Three different lists use the word “category”.
A unit’s category in Content/units.json or in a scenario’s unitsOverrideFile (see Content rosters):
ground, air, naval, missile, special
A unit with any other category is read as ground.
The scenario header’s disabledUnitCategories (see Scenario header fields) names the same five categories with a capital letter:
Ground, Air, Naval, Missile, Special
Any other name in the list switches nothing off.
A unit type’s category in units_define.json (see Custom unit types):
infantry, cavalry, artillery, naval, air, armor, special_forces
It picks the base unit that a unit type copies its cost and requirements from, when no content file defines that unit type’s id:
category | Base unit copied |
|---|---|
infantry, cavalry | infantry (a cavalry unit type keeps its own cavalry map marker) |
artillery | artillery |
armor | armor |
special_forces | special_forces |
naval | frigate |
air | fighter |
Any other value copies from infantry.
Building categories and doctrine branches
The scenario header has two more switch-off lists next to disabledUnitCategories (see Scenario header fields).
disabledBuildingCategories:
Economic, Military, Infrastructure, Research, Social, Defense, Intelligence
A name outside this list is ignored, and the game warns about it when mods load. A building’s own category in Content/buildings.json uses the same seven names in lowercase (economic, military and so on).
disabledDoctrineBranches:
military, government, economy, industry, diplomacy, intelligence, cyber, space, energy, society
These are the branch ids of the Knowledge Network. The game warns about a name that is not a branch id.
Air mission types
Used by missionType in initialAirWings, in units_deploy_air.json (see Air wing stacks).
None, AirSuperiority, CloseAirSupport, StrategicBombing, Reconnaissance, NavalStrike
The schema also accepts these older spellings:
| Spelling | Read as |
|---|---|
cas | CloseAirSupport |
interception, patrol | AirSuperiority |
strategic_bombing | StrategicBombing |
naval_strike | NavalStrike |
standby | None |
The schema rejects any other value. The game reads a value it does not recognise, or an empty one, as None: the wing starts idle at its base. The game also reads close_air_support, air_superiority and recon, but the schema does not list them, so VALIDATE reports them as errors.
Diplomacy clear scopes
Used by clearDiplomacyScope in the scenario header, which applies when clearDiplomaticRelationships is true (see Scenario header fields), and by clearDiplomacyScope in a countryStateOverrides entry, which applies when that entry’s clearRelationships is true (see State overrides).
| Value | Clears for each country it applies to |
|---|---|
core | Alliances, organization memberships, relation values, treaties, trade partners and trade agreements, and timed states such as sanctions, truces and non-aggression pacts. |
extended (default) | Everything in core, and also wars, guarantees, rivalries, opinion and prestige modifiers, starting casus belli, pending diplomatic requests, cooldowns, aggressive expansion, coalition membership, the sphere of influence, multilateral sanctions, trade bloc membership and economic warfare actions. |
- Case does not matter. Any other value stops the scenario from loading, and the error names the field.
- A country entry without its own scope uses the header’s scope.
Wars are in the extended scope. core leaves the wars a country starts with in place. To start a scenario with no inherited wars, use extended.
Government subtypes
Used by governmentSubtype in addCountries (see Adding countries).
None, FeudalMonarchy, Sultanate, Khanate, Shogunate, CityState, Duchy, Emirate, Empire, Tribe, Chiefdom, LiberalDemocracy, IlliberalDemocracy, ParliamentaryMonarchy, AbsoluteMonarchy, MilitaryDictatorship, Stratocracy, Theocracy, OnePartyState, Despotic, Anarchy, Transitional, SocialistRepublic, FederalRepublic
Nonemeans “not set”.- The game matches the names without regard to case.
- The game also reads the older label
city_stateasCityState, with a warning in the log. The schema does not list it, so VALIDATE reports it as an error. - Any other value is ignored with a warning in the log.
Starting diplomacy types
Used inside startingDiplomacy, in diplomacy.json (see Starting diplomacy).
| Field | Values | Notes |
|---|---|---|
Organization type | CollectiveDefense (default), Economic, Political, InternationalOrg | CollectiveDefense is a mutual-defence pact. The others are plain memberships. The game reads any other value as CollectiveDefense, with a warning in the log. |
Alliance type | Military (default), DefensePact | A Military ally can be called into an offensive war. A DefensePact ally only defends. The game reads any other value as Military, with a warning in the log. |
Treaty type | nap, truce, trade_agreement, guarantee | nap is a non-aggression pact. truce needs months of 1 or more, or it is skipped. guarantee means country a guarantees country b. A treaty with any other type is skipped, with a warning in the log. |
War casusBelli | Scripted (default), Territorial, Ideological, Humiliation, Defense, Liberation, Reconquest | The game reads Liberation as Humiliation, and any value outside the list as Scripted. |
The game matches these names without regard to case.
World ceasefire values
The worldCeasefire block of the scenario header (see World ceasefire) takes these forms:
| Field | Form |
|---|---|
startDate, endDate | YYYY-MM-DD. The game’s months have 30 days, so the day is 1 to 30 and the month 1 to 12. |
countries | ISO3 codes. |
untilFlag | The name of an event flag. |