Skip to content

Civilization-related JSON files

Beliefs.json

link to original

This file contains the beliefs that can be chosen for religions in your mod.

Each belief has the following structure:

Attribute Type Default Notes
name String Required
type Enum Required Type of belief. Value must be Pantheon, Founder, Follower or Enhancer
uniques List of Strings empty List of unique abilities this belief adds to cities following it
civilopediaText List empty See civilopediaText chapter

Buildings.json

link to original

This file contains all the buildings and wonders you want to use in your mod.

Each building has the following structure:

Attribute Type Default Notes
name String Required
cost Integer -1 Amount of production required to build the building. If -1, the buildingCost from requiredTech column is used
<stats> Float 0 Per-turn yield produced by the building
maintenance Integer 0 Maintenance cost of the building
isWonder Boolean false Whether this building is a global wonder
isNationalWonder Boolean false Whether this building is a national wonder
requiredBuilding String none A building that has to be built before this building can be built. Must be in Buildings.json
requiredTech String none The tech that should be researched before this building may be built. Must be in Techs.json
requiredResource String none The resource that is consumed when building this building. Must be in TileResources.json
requiredNearbyImprovedResources List of Strings empty The building can only be built if any of the resources in this list are within the borders of this city and have been improved. Each resource must be in TileResources.json
replaces String none The name of a building that should be replaced by this building. Must be in Buildings.json
uniqueTo String none If supplied, only the nation with this name can build this building. Must be in Nations.json
cityStrength Integer 0 Strength bonus the city in which this building is built receives
cityHealth Integer 0 Health bonus the city in which this building is built receives
hurryCostModifier Integer 0 When this building is bought using gold or faith, the price is increased by this much percent
quote String none If this building is a (national) wonder, this string will be shown on the completion popup
uniques List of Strings empty List of unique abilities this building has
replacementTextForUniques String none If provided, this string will be shown instead of all of the uniques
percentStatBonus Object none Percentual bonus for stats provided by the building. Same format as specialized stats (numbers are in percent. i.e. [30] represents 30% bonus to a stat)
greatPersonPoints Object none Great person points by this building generated per turn. Valid keys are the names of units (Great Scientist, Warrior, etc.), valid values are Integers
specialistSlots Object none Specialist slots provided by this building. Valid keys are the names of specialists (as defined in Specialists.json), valid values are Integers, the amount of slots provided for this specialist
civilopediaText List empty See civilopediaText chapter

Nations.json

Link to original

This file contains all the nations and city states, including Barbarians and Spectator.

Each nation has the following structure:

Attribute Type Default Notes
name String Required
leaderName String none Omit only for city states! If you want LeaderPortraits, the image file names must match exactly, including case
style String none Modifier appended to pixel unit image names
cityStateType String none Distinguishes major civilizations from city states (must be in CityStateTypes.json)
startBias List of strings empty Zero or more of: terrainFilter or "Avoid [terrainFilter]". [^S]
preferredVictoryType String Neutral The victory type major civilizations will pursue (need not be specified in VictoryTypes.json)
personality String none The name of the personality specified in Personalities.json
favoredReligion String none The religion major civilization will choose if available when founding a religion. Must be in Religions.json
startIntroPart1 String none Introductory blurb shown to Player on game start...
startIntroPart2 String none ... second paragraph. NO "TBD"!!! Leave empty to skip that alert.
declaringWar String none Another greeting, voice hook supported [^V]
attacked String none Another greeting, voice hook supported [^V]
defeated String none Another greeting, voice hook supported [^V]
introduction String none Another greeting, voice hook supported [^V]
neutralHello String none Another greeting, voice hook supported [^V]
hateHello String none Another greeting, voice hook supported [^V]
tradeRequest String none Another greeting, voice hook supported [^V]
innerColor List of 3× Integer black RGB color for outer ring of nation icon
outerColor List of 3× Integer Required RGB color for inner circle of nation icon
uniqueName String none Decorative name for the special characteristic of this nation
uniqueText String none Replacement text for "uniques". If empty, uniques are listed individually
uniques List empty List of unique abilities this civilisation has
cities List empty City names used sequentially for newly founded cities. Required for major civilizations and city states
civilopediaText List empty See civilopediaText chapter

[^S]: A "Coast" preference (unless combined with "Avoid") is translated to a complex test for coastal land tiles, tiles next to Lakes, river tiles or near-river tiles, and such civs are processed first. Other startBias entries are ignored in that case. Other positive (no "Avoid") startBias are processed next. Multiple positive preferences are treated equally, but get no "fallback". Single positive startBias can get a "fallback" region if there is no (or no more) region with that primary type: any leftover region with as much of the specified terrain as possible will do. Multiple "Avoid" entries are treated equally (and reduce chance for success - if no region is left avoiding all specified types that civ gets a random one). When combining preferred terrain with "Avoid", the latter takes precedence, and preferred terrain only has minor weight when choosing between regions that are not of a type to avoid. These notes are only valid when playing on generated maps, loaded maps from map editor get no "regions" and startBias is processed differently (but you can expect single-entry startBias to work best). [^V]: See Supply Leader Voices

Personalities.json

This file contains all Personalities for computer players.

Each personality has the following structure:

Attribute Type Default Notes
name String Required
preferredVictoryType String Neutral The victory type major civilizations will pursue (need not be specified in VictoryTypes.json)
<stats> Float 5 Amount of focus on the stat the computer player will have. Typically ranges from 0 (no focus) to 10 (double focus)
military Float 5 Amount of focus on the military growth the computer player will have. Typically ranges from 0 (no focus) to 10 (double focus)
priorities Object none Priorities for each policy branch [^B]
uniques List empty List of unique abilities this personality has
civilopediaText List empty See civilopediaText chapter
warMongering Float 5 Amount of focus on declaring war the computer player will have. Typically ranges from 0 (no focus) to 10 (double focus)

[^B]: Similar to policy priorites The "priorities" object defines the priority major civilizations' AI give to a policy branch. The AI chooses the policy branch with the highest number for their preferred victory type. If two or more candidate branches have the same priority, the AI chooses a random branch among the candidates.

The object maps policy branches to priority values for the major civilization using the policy branches name and integers. Any branches not listed have a default value of 0

The code below is an example of a valid "priorities" definition.

"priorities": {
    "Tradition": 30,
    "Liberty": 20,
    "Honor": 10
}

CityStateTypes.json

Link to original

This optional file is used for defining new types of city states. These types determine the benefits major civilizations gets when they befriend or ally the city state with influence. If the file is ommitted, the following are automatically added: Cultured, Maritime, Mercantile, Militaristic, Religious.

Each city state type has the following structure:

Attribute Type Default Notes
name String Required
friendBonusUniques List of Strings empty List of unique abilities granted to major civilizations when friends with this city state
allyBonusUniques List of Strings empty List of unique abilities granted to major civilizations when allied to city state
color List of 3× Integer [255, 255, 255] RGB color of text in civilopedia

Policies.json

Link to original

This file contains all the available social policies that can be "bought" with culture.

They are organized in 'branches', each branch has an 'opener', one or more 'member' policies, and a 'finisher'. Therefore this file is organized using two levels - branch and member policy.

The properties of the 'opener' are defined with the branch level, while the 'finisher' is an entry on the member level which must be named as branch name + " Complete", case sensitive. For example, the finisher of a policy branch "Tradition" will have the name "Tradition Complete".

Branch structure

Each policy branch has the following structure:

Attribute Type Default Notes
name String Required
era String Required Unlocking era as defined in Eras.json
priorities Object none Priorities for each victory type, see here
uniques List empty List of unique abilities this policy branch grants upon adopting it
policies List empty List of member policies and branch 'finisher' - pay attention to the nesting of {} and []

Member policy structure

Attribute Type Default Notes
name String Required
row Integer Required Placement in UI, each unit approximately half the icon size
column Integer Required Placement in UI, each unit approximately half the icon size
requires List empty List of prerequisite policy names
uniques List empty List of unique abilities this policy member grants upon adopting it

Branch finisher structure

Attribute Type Default Notes
name String Required
uniques List empty List of unique abilities this finisher grants upon adopting all the policy members in the branch

Branch priorities

The "priorities" object defines the priority major civilizations' AI give to a policy branch. The AI chooses the policy branch with the highest sum of the peferred victory type listed here and the number flisted in the personality's priority. If two or more candidate branches have the same priority, the AI chooses a random branch among the candidates.

The object maps victory types to priority values for the major civilization using strings and integers. If the preferred victory type is not specified, the default priority value is set to 0.

The code below is an example of a valid "priorities" definition.

"priorities": {
    "Neutral": 0,
    "Cultural": 10,
    "Diplomatic": 0,
    "Domination": 0,
    "Scientific": 10
}

Quests.json

Link to original

This file contains the quests that may be given to major civilizations by city states.

Each quest has the following structure:

Attribute Type Default Notes
name String Required Defines criteria of quest, see below
description String Required Description of the quest shown to players. Can add extra information based on name, see below
type Enum Individual Individual or Global
influence Float 40 Influence reward gained on quest completion
duration Integer 0 Maximum number of turns to complete the quest. If 0, there is no turn limit
minimumCivs Integer 1 Minimum number of Civs needed to start the quest. It is meaningful only for type = Global
weightForCityStateType Object none Relative weight multiplier to this quest for each city state type or city state personality (Friendly, Neutral, Hostile, Irrational), see below

Quest name

The name of the quest defines the criteria for the quest. If they are not defined in the predefined enum, they will have no behavior. In the description, square brackets [] in the description of the quest is replaced with extra information (except for Invest). The list of predefined quest names are as follows:

Name Criteria Additional info
Route Connect the city state to the major civilization's capital using roads or railways
Clear Barbarian Camp Destroy the target barbarian camp
Construct Wonder Construct the target wonder target wonder
Connect Resource Connect the target resource to the major civilization's trade network target tileResource
Acquire Great Person Acquire the target great person target greatPerson
Conquer City State Defeat the target city state target cityState
Find Player Meet the target major civilization target civName
Find Natural Wonder Find the target natural wonder target naturalWonder
Give Gold Donate gold to the city state (amount does not matter) civName "bully" for city state
Pledge to Protect Pledge to protect city state civName "bully" for city state
Contest Culture Be the major civilization with the highest increase to culture during the duration major civilization's cultureGrowth
Contest Faith Be the major civilization with the highest increase to faith during the duration major civilization's faithGrowth
Contest Technology Be the major civilization with the most technologies researched during the duration major civilization's techsResearched
Invest Donating gold yield extra Influence based on value provided IMPORTANT: value in square brackets is the extra influence in percent. i.e. [50] means 50%
Bully City State Demand tribute from the target city state target city state
Denounce Civilization Denounce the major civilization which "bullied" the city state civName "bully" for city state
Spread Religion Spread major civilization's religion to the city state major civilization's religionName

Quest weight

The "weightForCityStateType" object determines the quest's weight multiplier. When a city state initiates a quest, the initial weight is 1, and it is multiplied by values based on city state type and personality (Friendly, Neutral, Hostile, Irrational). The AI then randomly selects a quest based on the final weighted values.

The object maps city state type and personality to the weight multipliers for the city state using strings to floats. If the preferred victory type is not found, the default multiplier is 1.

The code below is an example of a valid "weightForCityStateType" definition. In this case, a friendly militaristic city state will be 0.4 (0.2 × 2) times as likely to pick this quest than a quest with weight 1.

"weightForCityStateType": {
    "Hostile": 2,
    "Friendly": 0.2,
    "Militaristic": 2
}

Religions.json

Link to original

This is just a list of Strings specifying all predefined religion names. Corresponding icons must exist, that's all to it. After all, they're just containers for beliefs.

Specialists.json

Link to original

This file should contain a list of all possible specialists that citizens can be assigned to.

Each specialist has the following structure:

Attribute Type Default Notes
name String Required
<stats> Float 0 Per-turn yield produced by the specialist
color List of 3× Integer Required Color of the image for this specialist
greatPersonPoints Object none Great person points generated by this specialist per turn. Valid keys are the names of units (Great Scientist, Warrior, etc.), valid values are Integers

Techs.json

Link to original

This file contains all the technologies that can be researched with science. It is organized into an outer list of 'columns', which in turn contains one or more tech each.

Column structure

Each tech column has the following structure:

Attribute Type Default Notes
columnNumber Integer Required Horizontal placement in the Tech Tree
era String Required Determines era reached after researching any technologies in this column. Must be in Eras.json
techCost Integer 0 Default cost of the techs in this column
buildingCost Integer Required Default cost of buildings requiring this tech
wonderCost Integer Required Default cost of wonders requiring this tech
techs List Required List of techs - pay attention to the nesting of {} and []

Tech structure

Attribute Type Default Notes
name String Required
row Integer 0 Vertical placement in the Tech Tree, must be unique per column
cost Integer Column techCost The amount of science required to research this tech
prerequisites List of Strings empty A list of the names of techs that are prerequisites of this tech. Only direct prerequisites are necessary
quote String none A nice story presented to the player when they research this tech
uniques List of Strings empty List of unique abilities this technology grants
civilopediaText List empty See civilopediaText chapter