Add Moddable Policy Priorities (#6390)

* Fixed G&K policy eras

Patronage should be Medieval and Freedom should be Industrial in G&K

* Added 'priorities' object to policy branch entries

* Fixed Vanilla policy eras

Also set testing priorities in advance

* Partial code formatting

* Reworked how the AI chooses a policy to newly adopt

* Removed debugging codes

* Update Civilization-related-JSON-files.md

Added Branch priorities

* Assigned actual priorities to each branch

Also fixed a debugging value in Ruleset.kt (-1 -> 0)
This commit is contained in:
청하늘
2022-03-25 03:33:42 -11:00
committed by GitHub
parent dd529db297
commit 84561e7ad4
7 changed files with 1544 additions and 975 deletions

View File

@ -2,80 +2,128 @@
{ {
"name": "Tradition", "name": "Tradition",
"era": "Ancient era", "era": "Ancient era",
"uniques": ["[+3 Culture] [in capital]", "[-25]% Culture cost of natural border growth [in all cities]"], "priorities": {
"Neutral": 30,
"Cultural": 30,
"Diplomatic": 0,
"Domination": 0,
"Scientific": 30
},
"uniques": [
"[+3 Culture] [in capital]",
"[-25]% Culture cost of natural border growth [in all cities]"
],
"policies": [ "policies": [
{ {
"name": "Aristocracy", "name": "Aristocracy",
"uniques": ["[+15]% Production when constructing [All] wonders [in all cities]", "[+1 Happiness] per [10] population [in all cities]"], "uniques": [
"[+15]% Production when constructing [All] wonders [in all cities]",
"[+1 Happiness] per [10] population [in all cities]"
],
"row": 1, "row": 1,
"column": 1 "column": 1
}, },
{ {
"name": "Legalism", "name": "Legalism",
"uniques":["Provides the cheapest [Culture] building in your first [4] cities for free"], "uniques": [
"Provides the cheapest [Culture] building in your first [4] cities for free"
],
"row": 1, "row": 1,
"column": 3 "column": 3
}, },
{ {
"name": "Oligarchy", "name": "Oligarchy",
"uniques": ["Units in cities cost no Maintenance", "[+50]% Strength for cities <with a garrison> <when attacking>"], "uniques": [
"Units in cities cost no Maintenance",
"[+50]% Strength for cities <with a garrison> <when attacking>"
],
"row": 1, "row": 1,
"column": 5 "column": 5
}, },
{ {
"name": "Landed Elite", "name": "Landed Elite",
"uniques": ["[+10]% growth [in capital]", "[+2 Food] [in capital]"], "uniques": [
"[+10]% growth [in capital]",
"[+2 Food] [in capital]"
],
"requires": ["Legalism"], "requires": ["Legalism"],
"row": 2, "row": 2,
"column": 2 "column": 2
}, },
{ {
"name": "Monarchy", "name": "Monarchy",
"uniques": ["[+1 Gold, +1 Happiness] per [2] population [in capital]"], "uniques": [
"[+1 Gold, +1 Happiness] per [2] population [in capital]"
],
"requires": ["Legalism"], "requires": ["Legalism"],
"row": 2, "row": 2,
"column": 4 "column": 4
}, },
{ {
"name": "Tradition Complete", "name": "Tradition Complete",
"uniques": ["[+15]% growth [in all cities]","Provides a [Aqueduct] in your first [4] cities for free"] "uniques": [
"[+15]% growth [in all cities]",
"Provides a [Aqueduct] in your first [4] cities for free"
]
} }
] ]
}, },
{ {
"name": "Liberty", "name": "Liberty",
"era": "Ancient era", "era": "Ancient era",
"priorities": {
"Neutral": 30,
"Cultural": 0,
"Diplomatic": 30,
"Domination": 30,
"Scientific": 0
},
"uniques": ["[+1 Culture] [in all cities]"], "uniques": ["[+1 Culture] [in all cities]"],
"policies": [ "policies": [
{ {
"name": "Republic", "name": "Republic",
"uniques": ["[+1 Production] [in all cities]", "[+5]% Production when constructing [All] buildings [in all cities]"], "uniques": [
"[+1 Production] [in all cities]",
"[+5]% Production when constructing [All] buildings [in all cities]"
],
"row": 1, "row": 1,
"column": 1 "column": 1
}, },
{ {
"name": "Citizenship", "name": "Citizenship",
"uniques": ["[-25]% tile improvement construction time", "Free [Worker] appears"], "uniques": [
"[-25]% tile improvement construction time",
"Free [Worker] appears"
],
"row": 1, "row": 1,
"column": 4 "column": 4
}, },
{ {
"name": "Collective Rule", "name": "Collective Rule",
"uniques": ["[+50]% Production when constructing [Settler] units [in capital]", "Free [Settler] appears"], "uniques": [
"[+50]% Production when constructing [Settler] units [in capital]",
"Free [Settler] appears"
],
"requires": ["Republic"], "requires": ["Republic"],
"row": 2, "row": 2,
"column": 1 "column": 1
}, },
{ {
"name": "Representation", "name": "Representation",
"uniques": ["Each city founded increases culture cost of policies [33]% less than normal", "Empire enters golden age"], "uniques": [
"Each city founded increases culture cost of policies [33]% less than normal",
"Empire enters golden age"
],
"requires": ["Citizenship"], "requires": ["Citizenship"],
"row": 2, "row": 2,
"column": 3 "column": 3
}, },
{ {
"name": "Meritocracy", "name": "Meritocracy",
"uniques": ["[+1 Happiness] [in all cities connected to capital]", "[-5]% Unhappiness from [Population] [in all non-occupied cities]"], "uniques": [
"[+1 Happiness] [in all cities connected to capital]",
"[-5]% Unhappiness from [Population] [in all non-occupied cities]"
],
"requires": ["Citizenship"], "requires": ["Citizenship"],
"row": 2, "row": 2,
"column": 5 "column": 5
@ -89,39 +137,62 @@
{ {
"name": "Honor", "name": "Honor",
"era": "Ancient era", "era": "Ancient era",
"uniques": ["[+33]% Strength <vs [Barbarian] units>", "Earn [100]% of killed [Barbarian] unit's [Strength] as [Culture]", "priorities": {
"Notified of new Barbarian encampments"], "Neutral": 0,
"Cultural": 0,
"Diplomatic": 10,
"Domination": 10,
"Scientific": 10
},
"uniques": [
"[+33]% Strength <vs [Barbarian] units>",
"Earn [100]% of killed [Barbarian] unit's [Strength] as [Culture]",
"Notified of new Barbarian encampments"
],
"policies": [ "policies": [
{ {
"name": "Warrior Code", "name": "Warrior Code",
"uniques":["[+15]% Production when constructing [Melee] units [in all cities]", "Free [Great General] appears"], "uniques": [
"[+15]% Production when constructing [Melee] units [in all cities]",
"Free [Great General] appears"
],
"row": 1, "row": 1,
"column": 2 "column": 2
}, },
{ {
"name": "Discipline", "name": "Discipline",
"uniques":["[+15]% Strength <for [Melee] units> <when adjacent to a [Melee] unit>"], "uniques": [
"[+15]% Strength <for [Melee] units> <when adjacent to a [Melee] unit>"
],
"row": 1, "row": 1,
"column": 4 "column": 4
}, },
{ {
"name": "Military Tradition", "name": "Military Tradition",
"uniques":["[+50]% XP gained from combat <for [Military] units>"], "uniques": [
"[+50]% XP gained from combat <for [Military] units>"
],
"requires": ["Warrior Code"], "requires": ["Warrior Code"],
"row": 2, "row": 2,
"column": 2 "column": 2
}, },
{ {
"name": "Military Caste", "name": "Military Caste",
"uniques": ["[+1 Happiness, +2 Culture] [in all cities with a garrison]"], "uniques": [
"[+1 Happiness, +2 Culture] [in all cities with a garrison]"
],
"requires": ["Discipline"], "requires": ["Discipline"],
"row": 2, "row": 2,
"column": 4 "column": 4
}, },
{ {
"name": "Professional Army", "name": "Professional Army",
"uniques": ["[-33]% Gold cost of upgrading <for [Military] units>", "[+1 Happiness] from every [Walls]", "uniques": [
"[+1 Happiness] from every [Castle]", "[+1 Happiness] from every [Arsenal]", "[+1 Happiness] from every [Military Base]" "[-33]% Gold cost of upgrading <for [Military] units>",
"[+1 Happiness] from every [Walls]",
"[+1 Happiness] from every [Castle]",
"[+1 Happiness] from every [Arsenal]",
"[+1 Happiness] from every [Military Base]"
], ],
"requires": ["Military Caste"], "requires": ["Military Caste"],
"row": 3, "row": 3,
@ -129,18 +200,34 @@
}, },
{ {
"name": "Honor Complete", "name": "Honor Complete",
"uniques": ["Earn [10]% of killed [Military] unit's [Cost] as [Gold]"] "uniques": [
"Earn [10]% of killed [Military] unit's [Cost] as [Gold]"
]
} }
] ]
},{ },
{
"name": "Piety", "name": "Piety",
"era": "Classical era", "era": "Classical era",
"uniques": ["[+100]% Production when constructing [Shrine] buildings [in all cities]", "[+100]% Production when constructing [Temple] buildings [in all cities]", "priorities": {
"Only available <before adopting [Rationalism]>"], "Neutral": 0,
"Cultural": 10,
"Diplomatic": 10,
"Domination": 10,
"Scientific": 0
},
"uniques": [
"[+100]% Production when constructing [Shrine] buildings [in all cities]",
"[+100]% Production when constructing [Temple] buildings [in all cities]",
"Only available <before adopting [Rationalism]>"
],
"policies": [ "policies": [
{ {
"name": "Organized Religion", "name": "Organized Religion",
"uniques": ["[+1 Faith] from every [Shrine]","[+1 Faith] from every [Temple]"], "uniques": [
"[+1 Faith] from every [Shrine]",
"[+1 Faith] from every [Temple]"
],
"row": 1, "row": 1,
"column": 2 "column": 2
}, },
@ -159,7 +246,10 @@
}, },
{ {
"name": "Reformation", "name": "Reformation",
"uniques": ["[+33]% [Culture] [in all cities with a world wonder]", "Empire enters golden age"], "uniques": [
"[+33]% [Culture] [in all cities with a world wonder]",
"Empire enters golden age"
],
"requires": ["Organized Religion"], "requires": ["Organized Religion"],
"row": 2, "row": 2,
"column": 3 "column": 3
@ -173,65 +263,97 @@
}, },
{ {
"name": "Piety Complete", "name": "Piety Complete",
"uniques": ["[Faith] cost of purchasing items in cities [-20]% ", "[+3 Gold, +3 Culture] from every [Holy site]"] "uniques": [
"[Faith] cost of purchasing items in cities [-20]% ",
"[+3 Gold, +3 Culture] from every [Holy site]"
]
} }
] ]
}, },
{ {
"name": "Patronage", "name": "Patronage",
"era": "Classical era", "era": "Medieval era",
"priorities": {
"Neutral": 0,
"Cultural": 10,
"Diplomatic": 20,
"Domination": 0,
"Scientific": 10
},
"uniques": ["[-25]% City-State Influence degradation"], "uniques": ["[-25]% City-State Influence degradation"],
"policies": [ "policies": [
{ {
"name": "Philantropy", "name": "Philantropy",
"uniques":["Gifts of Gold to City-States generate [25]% more Influence"], "uniques": [
"Gifts of Gold to City-States generate [25]% more Influence"
],
"row": 1, "row": 1,
"column": 2 "column": 2
}, },
{ {
"name": "Aesthetics", "name": "Aesthetics",
"uniques":["Resting point for Influence with City-States is increased by [20]"], "uniques": [
"Resting point for Influence with City-States is increased by [20]"
],
"row": 1, "row": 1,
"column": 4 "column": 4
}, },
{ {
"name": "Scholasticism", "name": "Scholasticism",
"uniques":["Allied City-States provide [Science] equal to [25]% of what they produce for themselves"], "uniques": [
"Allied City-States provide [Science] equal to [25]% of what they produce for themselves"
],
"requires": ["Philantropy"], "requires": ["Philantropy"],
"row": 2, "row": 2,
"column": 2 "column": 2
}, },
{ {
"name": "Cultural Diplomacy", "name": "Cultural Diplomacy",
"uniques": ["[+100]% resources gifted by City-States", "uniques": [
"[+50]% Happiness from luxury resources gifted by City-States"], "[+100]% resources gifted by City-States",
"[+50]% Happiness from luxury resources gifted by City-States"
],
"requires": ["Scholasticism"], "requires": ["Scholasticism"],
"row": 3, "row": 3,
"column": 2 "column": 2
}, },
{ {
"name": "Educated Elite", "name": "Educated Elite",
"requires": ["Scholasticism","Aesthetics"], "requires": ["Scholasticism", "Aesthetics"],
"uniques": ["Allied City-States will occasionally gift Great People"], "uniques": [
"Allied City-States will occasionally gift Great People"
],
"row": 3, "row": 3,
"column": 4 "column": 4
}, },
{ {
"name": "Patronage Complete", "name": "Patronage Complete",
"uniques": ["Influence of all other civilizations with all city-states degrades [33]% faster", "uniques": [
"Triggers the following global alert: [Our influence with City-States has started dropping faster!]"] "Influence of all other civilizations with all city-states degrades [33]% faster",
"Triggers the following global alert: [Our influence with City-States has started dropping faster!]"
]
} }
] ]
}, },
{ {
"name": "Commerce", "name": "Commerce",
"uniques": ["[+25]% [Gold] [in capital]"],
"era": "Medieval era", "era": "Medieval era",
"priorities": {
"Neutral": 0,
"Cultural": 10,
"Diplomatic": 10,
"Domination": 10,
"Scientific": 10
},
"uniques": ["[+25]% [Gold] [in capital]"],
"policies": [ "policies": [
{ {
"name": "Naval Tradition", "name": "Naval Tradition",
"uniques": ["[+1] Movement <for [{Military} {Water}] units>", "[+1] Sight <for [{Military} {Water}] units>", "uniques": [
"Free [Great General] appears" //, "[+2] Movement <for [Great Admiral] units>" "[+1] Movement <for [{Military} {Water}] units>",
"[+1] Sight <for [{Military} {Water}] units>",
"Free [Great General] appears"
// "[+2] Movement <for [Great Admiral] units>"
// ToDo: Should be "Free [Great Admiral] appears" // ToDo: Should be "Free [Great Admiral] appears"
], ],
"row": 1, "row": 1,
@ -239,7 +361,11 @@
}, },
{ {
"name": "Trade Unions", "name": "Trade Unions",
"uniques": ["[-33]% maintenance on road & railroads", "[+1 Gold] from every [Harbor]", "[+1 Gold] from every [Seaport]"], "uniques": [
"[-33]% maintenance on road & railroads",
"[+1 Gold] from every [Harbor]",
"[+1 Gold] from every [Seaport]"
],
"row": 1, "row": 1,
"column": 4 "column": 4
}, },
@ -252,8 +378,13 @@
}, },
{ {
"name": "Mercantilism", "name": "Mercantilism",
"uniques": ["[Gold] cost of purchasing items in cities [-25]%", "[+1 Science] from every [Mint]", "[+1 Science] from every [Market]", "uniques": [
"[+1 Science] from every [Bank]", "[+1 Science] from every [Stock Exchange]"], "[Gold] cost of purchasing items in cities [-25]%",
"[+1 Science] from every [Mint]",
"[+1 Science] from every [Market]",
"[+1 Science] from every [Bank]",
"[+1 Science] from every [Stock Exchange]"
],
"requires": ["Trade Unions"], "requires": ["Trade Unions"],
"row": 2, "row": 2,
"column": 4 "column": 4
@ -267,7 +398,9 @@
}, },
{ {
"name": "Commerce Complete", "name": "Commerce Complete",
"uniques": ["[+1 Gold] from every [Trading post]", "[+100]% Gold from Great Merchant trade missions", "uniques": [
"[+1 Gold] from every [Trading post]",
"[+100]% Gold from Great Merchant trade missions",
"May buy [Great Merchant] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>" "May buy [Great Merchant] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>"
] ]
} }
@ -276,24 +409,42 @@
{ {
"name": "Rationalism", "name": "Rationalism",
"era": "Renaissance era", "era": "Renaissance era",
"uniques": ["[+15]% [Science] <while the empire is happy>", "Only available <before adopting [Piety]>"], "priorities": {
"Neutral": 0,
"Cultural": 10,
"Diplomatic": 10,
"Domination": 10,
"Scientific": 20
},
"uniques": [
"[+15]% [Science] <while the empire is happy>",
"Only available <before adopting [Piety]>"
],
"policies": [ "policies": [
{ {
"name": "Secularism", "name": "Secularism",
"uniques": ["[+2 Science] from every specialist [in all cities]"], "uniques": [
"[+2 Science] from every specialist [in all cities]"
],
"row": 1, "row": 1,
"column": 2 "column": 2
}, },
{ {
"name": "Humanism", "name": "Humanism",
"uniques": ["[+1 Happiness] from every [University]","[+1 Happiness] from every [Observatory]", "uniques": [
"[+1 Happiness] from every [Public School]"], "[+1 Happiness] from every [University]",
"[+1 Happiness] from every [Observatory]",
"[+1 Happiness] from every [Public School]"
],
"row": 1, "row": 1,
"column": 5 "column": 5
}, },
{ {
"name": "Free Thought", "name": "Free Thought",
"uniques": ["[+1 Science] from every [Trading post]", "[+17]% [Science] from every [University]"], "uniques": [
"[+1 Science] from every [Trading post]",
"[+17]% [Science] from every [University]"
],
"requires": ["Secularism"], "requires": ["Secularism"],
"row": 2, "row": 2,
"column": 1 "column": 1
@ -314,7 +465,8 @@
}, },
{ {
"name": "Rationalism Complete", "name": "Rationalism Complete",
"uniques": ["[2] Free Technologies", "uniques": [
"[2] Free Technologies",
"May buy [Great Scientist] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>" "May buy [Great Scientist] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>"
] ]
} }
@ -322,8 +474,19 @@
}, },
{ {
"name": "Freedom", "name": "Freedom",
"era": "Renaissance era", "era": "Industrial era",
"uniques": ["[+25]% Great Person generation [in all cities]", "Only available <before adopting [Autocracy]>", "Only available <before adopting [Order]>"], "priorities": {
"Neutral": 50,
"Cultural": 50,
"Diplomatic": 50,
"Domination": 40,
"Scientific": 50
},
"uniques": [
"[+25]% Great Person generation [in all cities]",
"Only available <before adopting [Autocracy]>",
"Only available <before adopting [Order]>"
],
"policies": [ "policies": [
{ {
"name": "Constitution", "name": "Constitution",
@ -339,7 +502,9 @@
}, },
{ {
"name": "Civil Society", "name": "Civil Society",
"uniques": ["[-50]% Food consumption by specialists [in all cities]"], "uniques": [
"[-50]% Food consumption by specialists [in all cities]"
],
"row": 1, "row": 1,
"column": 5 "column": 5
}, },
@ -352,14 +517,18 @@
}, },
{ {
"name": "Democracy", "name": "Democracy",
"uniques": ["[-50]% Unhappiness from [Specialists] [in all cities]"], "uniques": [
"[-50]% Unhappiness from [Specialists] [in all cities]"
],
"requires": ["Civil Society"], "requires": ["Civil Society"],
"row": 2, "row": 2,
"column": 5 "column": 5
}, },
{ {
"name": "Freedom Complete", "name": "Freedom Complete",
"uniques": ["[+100]% Yield from every [Great Improvement]", "[+50]% Golden Age length", "uniques": [
"[+100]% Yield from every [Great Improvement]",
"[+50]% Golden Age length",
"May buy [Great Artist] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>" "May buy [Great Artist] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>"
] ]
} }
@ -368,8 +537,19 @@
{ {
"name": "Autocracy", "name": "Autocracy",
"era": "Industrial era", "era": "Industrial era",
"uniques": ["[-33]% maintenance costs <for [All] units>", "Upon capturing a city, receive [10] times its [Culture] production as [Culture] immediately", "priorities": {
"Only available <before adopting [Order]>", "Only available <before adopting [Freedom]>"], "Neutral": 50,
"Cultural": 40,
"Diplomatic": 40,
"Domination": 50,
"Scientific": 40
},
"uniques": [
"[-33]% maintenance costs <for [All] units>",
"Upon capturing a city, receive [10] times its [Culture] production as [Culture] immediately",
"Only available <before adopting [Order]>",
"Only available <before adopting [Freedom]>"
],
"policies": [ "policies": [
{ {
"name": "Populism", "name": "Populism",
@ -385,14 +565,20 @@
}, },
{ {
"name": "Fascism", "name": "Fascism",
"uniques": ["Quantity of strategic resources produced by the empire +[100]%", "[+2] Movement <for [Great General] units>"], "uniques": [
"requires": ["Populism","Militarism"], "Quantity of strategic resources produced by the empire +[100]%",
"[+2] Movement <for [Great General] units>"
],
"requires": ["Populism", "Militarism"],
"row": 2, "row": 2,
"column": 3 "column": 3
}, },
{ {
"name": "Police State", "name": "Police State",
"uniques": ["[+3 Happiness] from every [Courthouse]", "[+100]% Production when constructing [Courthouse] buildings [in all cities]"], "uniques": [
"[+3 Happiness] from every [Courthouse]",
"[+100]% Production when constructing [Courthouse] buildings [in all cities]"
],
// There are also some uniques regarding espoinage, which as of this writing is not yet implemented // There are also some uniques regarding espoinage, which as of this writing is not yet implemented
"requires": ["Militarism"], "requires": ["Militarism"],
"row": 2, "row": 2,
@ -400,8 +586,11 @@
}, },
{ {
"name": "Total War", "name": "Total War",
"uniques": ["[+25]% Production when constructing [Military] units [in all cities]", "New [Military] units start with [15] Experience [in all cities]"], "uniques": [
"requires": ["Police State","Fascism"], "[+25]% Production when constructing [Military] units [in all cities]",
"New [Military] units start with [15] Experience [in all cities]"
],
"requires": ["Police State", "Fascism"],
"row": 3, "row": 3,
"column": 4 "column": 4
}, },
@ -418,46 +607,71 @@
{ {
"name": "Order", "name": "Order",
"era": "Industrial era", "era": "Industrial era",
"uniques": ["[+1 Happiness] [in all cities]", "Only available <before adopting [Autocracy]>", "Only available <before adopting [Freedom]>"], "priorities": {
"Neutral": 50,
"Cultural": 40,
"Diplomatic": 50,
"Domination": 40,
"Scientific": 50
},
"uniques": [
"[+1 Happiness] [in all cities]",
"Only available <before adopting [Autocracy]>",
"Only available <before adopting [Freedom]>"
],
"policies": [ "policies": [
{ {
"name": "United Front", "name": "United Front",
"uniques": ["Militaristic City-States grant units [2] times as fast when you are at war with a common nation"], "uniques": [
"Militaristic City-States grant units [2] times as fast when you are at war with a common nation"
],
"row": 1, "row": 1,
"column": 1 "column": 1
}, },
{ {
"name": "Planned Economy", "name": "Planned Economy",
"uniques": ["[+25]% [Science] from every [Factory]", "[+100]% Production when constructing [Factory] buildings [in all cities]"], "uniques": [
"[+25]% [Science] from every [Factory]",
"[+100]% Production when constructing [Factory] buildings [in all cities]"
],
"row": 1, "row": 1,
"column": 3 "column": 3
}, },
{ {
"name": "Nationalism", "name": "Nationalism",
"uniques": ["[+15]% Strength <for [All] units> <when fighting in [Friendly Land] tiles>"], "uniques": [
"[+15]% Strength <for [All] units> <when fighting in [Friendly Land] tiles>"
],
"row": 1, "row": 1,
"column": 5 "column": 5
}, },
{ {
"name": "Socialism", "name": "Socialism",
"requires": ["Planned Economy"], "requires": ["Planned Economy"],
"uniques": ["[-15]% maintenance cost for buildings [in all cities]"], "uniques": [
"[-15]% maintenance cost for buildings [in all cities]"
],
"row": 2, "row": 2,
"column": 3 "column": 3
}, },
{ {
"name": "Communism", "name": "Communism",
"requires": ["Socialism"], "requires": ["Socialism"],
"uniques": ["[+2 Production] [in all cities]", "[+1 Production] from every [Mine]", "[+1 Production] from every [Quarry]"], "uniques": [
"[+2 Production] [in all cities]",
"[+1 Production] from every [Mine]",
"[+1 Production] from every [Quarry]"
],
"row": 3, "row": 3,
"column": 3 "column": 3
}, },
{ {
"name": "Order Complete", "name": "Order Complete",
"uniques": ["[+2 Food, +2 Production, +2 Science, +2 Gold, +2 Culture] [in all cities]", "uniques": [
"[+2 Food, +2 Production, +2 Science, +2 Gold, +2 Culture] [in all cities]",
"May buy [Great Engineer] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>" "May buy [Great Engineer] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>"
] ]
} }
] ]
} }
] ]

View File

@ -2,81 +2,128 @@
{ {
"name": "Tradition", "name": "Tradition",
"era": "Ancient era", "era": "Ancient era",
"uniques": ["[+3 Culture] [in capital]", "[-25]% Culture cost of natural border growth [in all cities]"], "priorities": {
"Neutral": 40,
"Cultural": 40,
"Diplomatic": 0,
"Domination": 0,
"Scientific": 40
},
"uniques": [
"[+3 Culture] [in capital]",
"[-25]% Culture cost of natural border growth [in all cities]"
],
"policies": [ "policies": [
{ {
"name": "Aristocracy", "name": "Aristocracy",
"uniques": ["[+15]% Production when constructing [All] wonders [in all cities]", "[+1 Happiness] per [10] population [in all cities]"], "uniques": [
"[+15]% Production when constructing [All] wonders [in all cities]",
"[+1 Happiness] per [10] population [in all cities]"
],
"row": 1, "row": 1,
"column": 1 "column": 1
}, },
{ {
"name": "Legalism", "name": "Legalism",
"uniques":["Provides the cheapest [Culture] building in your first [4] cities for free"], "uniques": [
"Provides the cheapest [Culture] building in your first [4] cities for free"
],
"row": 1, "row": 1,
"column": 3 "column": 3
}, },
{ {
"name": "Oligarchy", "name": "Oligarchy",
"uniques": ["Units in cities cost no Maintenance", "[+100]% Strength for cities <with a garrison> <when attacking>"], "uniques": [
"Units in cities cost no Maintenance",
"[+50]% Strength for cities <with a garrison> <when attacking>"
],
"row": 1, "row": 1,
"column": 5 "column": 5
}, },
{ {
"name": "Landed Elite", "name": "Landed Elite",
"uniques": ["[+10]% growth [in capital]", "[+2 Food] [in capital]"], "uniques": [
"[+10]% growth [in capital]",
"[+2 Food] [in capital]"
],
"requires": ["Legalism"], "requires": ["Legalism"],
"row": 2, "row": 2,
"column": 2 "column": 2
}, },
{ {
"name": "Monarchy", "name": "Monarchy",
"uniques": ["[+1 Gold, +1 Happiness] per [2] population [in capital]"], "uniques": [
"[+1 Gold, +1 Happiness] per [2] population [in capital]"
],
"requires": ["Legalism"], "requires": ["Legalism"],
"row": 2, "row": 2,
"column": 4 "column": 4
}, },
{ {
"name": "Tradition Complete", "name": "Tradition Complete",
"uniques": ["[+15]% growth [in all cities]","[+2 Food] [in all cities]"] "uniques": [
"[+15]% growth [in all cities]",
"Provides a [Aqueduct] in your first [4] cities for free"
]
} }
] ]
}, },
{ {
"name": "Liberty", "name": "Liberty",
"era": "Ancient era", "era": "Ancient era",
"priorities": {
"Neutral": 40,
"Cultural": 0,
"Diplomatic": 40,
"Domination": 40,
"Scientific": 0
},
"uniques": ["[+1 Culture] [in all cities]"], "uniques": ["[+1 Culture] [in all cities]"],
"policies": [ "policies": [
{ {
"name": "Collective Rule", "name": "Republic",
"uniques": ["[+50]% Production when constructing [Settler] units [in capital]", "Free [Settler] appears"], "uniques": [
"[+1 Production] [in all cities]",
"[+5]% Production when constructing [All] buildings [in all cities]"
],
"row": 1, "row": 1,
"column": 1 "column": 1
}, },
{ {
"name": "Citizenship", "name": "Citizenship",
"uniques": ["[-25]% tile improvement construction time", "Free [Worker] appears"], "uniques": [
"[-25]% tile improvement construction time",
"Free [Worker] appears"
],
"row": 1, "row": 1,
"column": 4 "column": 4
}, },
{ {
"name": "Republic", "name": "Collective Rule",
"uniques": ["[+1 Production] [in all cities]", "[+5]% Production when constructing [All] buildings [in all cities]"], "uniques": [
"requires": ["Collective Rule"], "[+50]% Production when constructing [Settler] units [in capital]",
"Free [Settler] appears"
],
"requires": ["Republic"],
"row": 2, "row": 2,
"column": 1 "column": 1
}, },
{ {
"name": "Representation", "name": "Representation",
"uniques": ["Each city founded increases culture cost of policies [33]% less than normal", "Empire enters golden age"], "uniques": [
"Each city founded increases culture cost of policies [33]% less than normal",
"Empire enters golden age"
],
"requires": ["Citizenship"], "requires": ["Citizenship"],
"row": 2, "row": 2,
"column": 3 "column": 3
}, },
{ {
"name": "Meritocracy", "name": "Meritocracy",
"uniques": ["[+1 Happiness] [in all cities connected to capital]", "[-5]% Unhappiness from [Population] [in all non-occupied cities]"], "uniques": [
"[+1 Happiness] [in all cities connected to capital]",
"[-5]% Unhappiness from [Population] [in all non-occupied cities]"
],
"requires": ["Citizenship"], "requires": ["Citizenship"],
"row": 2, "row": 2,
"column": 5 "column": 5
@ -90,39 +137,62 @@
{ {
"name": "Honor", "name": "Honor",
"era": "Ancient era", "era": "Ancient era",
"uniques": ["[+25]% Strength <vs [Barbarian] units>", "Earn [100]% of killed [Barbarian] unit's [Strength] as [Culture]", "priorities": {
"Notified of new Barbarian encampments"], "Neutral": 0,
"Cultural": 0,
"Diplomatic": 0,
"Domination": 10,
"Scientific": 0
},
"uniques": [
"[+33]% Strength <vs [Barbarian] units>",
"Earn [100]% of killed [Barbarian] unit's [Strength] as [Culture]",
"Notified of new Barbarian encampments"
],
"policies": [ "policies": [
{ {
"name": "Warrior Code", "name": "Warrior Code",
"uniques":["[+15]% Production when constructing [Melee] units [in all cities]", "Free [Great General] appears"], "uniques": [
"[+15]% Production when constructing [Melee] units [in all cities]",
"Free [Great General] appears"
],
"row": 1, "row": 1,
"column": 2 "column": 2
}, },
{ {
"name": "Discipline", "name": "Discipline",
"uniques":["[+10]% Strength <for [Melee] units> <when adjacent to a [Military] unit>"], "uniques": [
"[+15]% Strength <for [Melee] units> <when adjacent to a [Melee] unit>"
],
"row": 1, "row": 1,
"column": 4 "column": 4
}, },
{ {
"name": "Military Tradition", "name": "Military Tradition",
"uniques":["[+50]% XP gained from combat <for [Military] units>"], "uniques": [
"[+50]% XP gained from combat <for [Military] units>"
],
"requires": ["Warrior Code"], "requires": ["Warrior Code"],
"row": 2, "row": 2,
"column": 2 "column": 2
}, },
{ {
"name": "Military Caste", "name": "Military Caste",
"uniques": ["[+1 Happiness, +2 Culture] [in all cities with a garrison]"], "uniques": [
"[+1 Happiness, +2 Culture] [in all cities with a garrison]"
],
"requires": ["Discipline"], "requires": ["Discipline"],
"row": 2, "row": 2,
"column": 4 "column": 4
}, },
{ {
"name": "Professional Army", "name": "Professional Army",
"uniques": ["[-33]% Gold cost of upgrading <for [Military] units>", "[+1 Happiness] from every [Walls]", "uniques": [
"[+1 Happiness] from every [Castle]", "[+1 Happiness] from every [Arsenal]", "[+1 Happiness] from every [Military Base]" "[-33]% Gold cost of upgrading <for [Military] units>",
"[+1 Happiness] from every [Walls]",
"[+1 Happiness] from every [Castle]",
"[+1 Happiness] from every [Arsenal]",
"[+1 Happiness] from every [Military Base]"
], ],
"requires": ["Military Caste"], "requires": ["Military Caste"],
"row": 3, "row": 3,
@ -130,17 +200,34 @@
}, },
{ {
"name": "Honor Complete", "name": "Honor Complete",
"uniques": ["Earn [10]% of killed [Military] unit's [Cost] as [Gold]"] "uniques": [
"Earn [10]% of killed [Military] unit's [Cost] as [Gold]"
]
} }
] ]
},{ },
{
"name": "Piety", "name": "Piety",
"era": "Classical era", "era": "Classical era",
"uniques": ["[+15]% Production when constructing [Culture] buildings [in all cities]", "Only available <before adopting [Rationalism]>"], "priorities": {
"Neutral": 0,
"Cultural": 10,
"Diplomatic": 0,
"Domination": 0,
"Scientific": 0
},
"uniques": [
"[+100]% Production when constructing [Shrine] buildings [in all cities]",
"[+100]% Production when constructing [Temple] buildings [in all cities]",
"Only available <before adopting [Rationalism]>"
],
"policies": [ "policies": [
{ {
"name": "Organized Religion", "name": "Organized Religion",
"uniques": ["[+1 Happiness] from every [Monument]","[+1 Happiness] from every [Temple]","[+1 Happiness] from every [Monastery]"], "uniques": [
"[+1 Faith] from every [Shrine]",
"[+1 Faith] from every [Temple]"
],
"row": 1, "row": 1,
"column": 2 "column": 2
}, },
@ -159,86 +246,126 @@
}, },
{ {
"name": "Reformation", "name": "Reformation",
"uniques": ["[+33]% [Culture] [in all cities with a world wonder]", "Empire enters golden age"], "uniques": [
"[+33]% [Culture] [in all cities with a world wonder]",
"Empire enters golden age"
],
"requires": ["Organized Religion"], "requires": ["Organized Religion"],
"row": 2, "row": 2,
"column": 3 "column": 3
}, },
{ {
"name": "Free Religion", "name": "Free Religion",
"uniques": ["Free Social Policy","[+1 Culture] from every [Monument]","[+1 Culture] from every [Temple]","[+1 Culture] from every [Monastery]"], "uniques": ["[-10]% Culture cost of adopting new Policies"],
"requires": ["Mandate Of Heaven", "Reformation"], "requires": ["Mandate Of Heaven", "Reformation"],
"row": 3, "row": 3,
"column": 4 "column": 4
}, },
{ {
"name": "Piety Complete", "name": "Piety Complete",
"uniques": ["[-10]% Culture cost of adopting new Policies"] "uniques": [
"[Faith] cost of purchasing items in cities [-20]% ",
"[+3 Gold, +3 Culture] from every [Holy site]"
]
} }
] ]
}, },
{ {
"name": "Patronage", "name": "Patronage",
"era": "Classical era", "era": "Medieval era",
"priorities": {
"Neutral": 0,
"Cultural": 0,
"Diplomatic": 20,
"Domination": 0,
"Scientific": 0
},
"uniques": ["[-25]% City-State Influence degradation"], "uniques": ["[-25]% City-State Influence degradation"],
"policies": [ "policies": [
{ {
"name": "Philantropy", "name": "Philantropy",
"uniques":["Gifts of Gold to City-States generate [25]% more Influence"], "uniques": [
"Gifts of Gold to City-States generate [25]% more Influence"
],
"row": 1, "row": 1,
"column": 2 "column": 2
}, },
{ {
"name": "Aesthetics", "name": "Aesthetics",
"uniques":["Resting point for Influence with City-States is increased by [20]"], "uniques": [
"Resting point for Influence with City-States is increased by [20]"
],
"row": 1, "row": 1,
"column": 4 "column": 4
}, },
{ {
"name": "Scholasticism", "name": "Scholasticism",
"uniques":["Allied City-States provide [Science] equal to [25]% of what they produce for themselves"], "uniques": [
"Allied City-States provide [Science] equal to [25]% of what they produce for themselves"
],
"requires": ["Philantropy"], "requires": ["Philantropy"],
"row": 2, "row": 2,
"column": 2 "column": 2
}, },
{ {
"name": "Cultural Diplomacy", "name": "Cultural Diplomacy",
"uniques": ["[+100]% resources gifted by City-States", "uniques": [
"[+50]% Happiness from luxury resources gifted by City-States"], "[+100]% resources gifted by City-States",
"[+50]% Happiness from luxury resources gifted by City-States"
],
"requires": ["Scholasticism"], "requires": ["Scholasticism"],
"row": 3, "row": 3,
"column": 2 "column": 2
}, },
{ {
"name": "Educated Elite", "name": "Educated Elite",
"requires": ["Scholasticism","Aesthetics"], "requires": ["Scholasticism", "Aesthetics"],
"uniques": ["Allied City-States will occasionally gift Great People"], "uniques": [
"Allied City-States will occasionally gift Great People"
],
"row": 3, "row": 3,
"column": 4 "column": 4
}, },
{ {
"name": "Patronage Complete", "name": "Patronage Complete",
"uniques": ["Influence of all other civilizations with all city-states degrades [33]% faster", "uniques": [
"Triggers the following global alert: [Our influence with City-States has started dropping faster!]"] "Influence of all other civilizations with all city-states degrades [33]% faster",
"Triggers the following global alert: [Our influence with City-States has started dropping faster!]"
]
} }
] ]
}, },
{ {
"name": "Commerce", "name": "Commerce",
"uniques": ["[+25]% [Gold] [in capital]"],
"era": "Medieval era", "era": "Medieval era",
"priorities": {
"Neutral": 0,
"Cultural": 10,
"Diplomatic": 10,
"Domination": 20,
"Scientific": 10
},
"uniques": ["[+25]% [Gold] [in capital]"],
"policies": [ "policies": [
{ {
"name": "Naval Tradition", "name": "Naval Tradition",
"uniques": ["[+1] Movement <for [{Military} {Water}] units>", "[+1] Sight <for [{Military} {Water}] units>", "uniques": [
"Free [Great General] appears" //, "[+2] Movement <for [Great Admiral] units>", "Free [Great Admiral] appears" - todo "[+1] Movement <for [{Military} {Water}] units>",
"[+1] Sight <for [{Military} {Water}] units>",
"Free [Great General] appears"
// "[+2] Movement <for [Great Admiral] units>"
// ToDo: Should be "Free [Great Admiral] appears"
], ],
"row": 1, "row": 1,
"column": 2 "column": 2
}, },
{ {
"name": "Trade Unions", "name": "Trade Unions",
"uniques": ["[-33]% maintenance on road & railroads", "[+1 Gold] from every [Harbor]", "[+1 Gold] from every [Seaport]"], "uniques": [
"[-33]% maintenance on road & railroads",
"[+1 Gold] from every [Harbor]",
"[+1 Gold] from every [Seaport]"
],
"row": 1, "row": 1,
"column": 4 "column": 4
}, },
@ -251,74 +378,115 @@
}, },
{ {
"name": "Mercantilism", "name": "Mercantilism",
"uniques": ["[Gold] cost of purchasing items in cities [-25]%", "[+1 Science] from every [Mint]", "[+1 Science] from every [Market]", "uniques": [
"[+1 Science] from every [Bank]", "[+1 Science] from every [Stock Exchange]"], "[Gold] cost of purchasing items in cities [-25]%",
"[+1 Science] from every [Mint]",
"[+1 Science] from every [Market]",
"[+1 Science] from every [Bank]",
"[+1 Science] from every [Stock Exchange]"
],
"requires": ["Trade Unions"], "requires": ["Trade Unions"],
"row": 2, "row": 2,
"column": 4 "column": 4
}, },
{ {
"name": "Protectionism", "name": "Protectionism",
"uniques": ["[+1] Happiness from each type of luxury resource"], "uniques": ["[+2] Happiness from each type of luxury resource"],
"requires": ["Mercantilism"], "requires": ["Mercantilism"],
"row": 3, "row": 3,
"column": 4 "column": 4
}, },
{ {
"name": "Commerce Complete", "name": "Commerce Complete",
"uniques": ["[+1 Gold] from every specialist [in all cities]"] "uniques": [
"[+1 Gold] from every [Trading post]",
"[+100]% Gold from Great Merchant trade missions",
"May buy [Great Merchant] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>"
]
} }
] ]
}, },
{ {
"name": "Rationalism", "name": "Rationalism",
"era": "Renaissance era", "era": "Renaissance era",
"uniques": ["Science gained from research agreements [+50]%", "Only available <before adopting [Piety]>"], "priorities": {
"Neutral": 0,
"Cultural": 10,
"Diplomatic": 0,
"Domination": 0,
"Scientific": 20
},
"uniques": [
"[+15]% [Science] <while the empire is happy>",
"Only available <before adopting [Piety]>"
],
"policies": [ "policies": [
{ {
"name": "Secularism", "name": "Secularism",
"uniques": ["[+2 Science] from every specialist [in all cities]"], "uniques": [
"[+2 Science] from every specialist [in all cities]"
],
"row": 1, "row": 1,
"column": 2 "column": 2
}, },
{ {
"name": "Humanism", "name": "Humanism",
"uniques": ["[+1 Happiness] from every [University]","[+1 Happiness] from every [Observatory]", "uniques": [
"[+1 Happiness] from every [Public School]"], "[+1 Happiness] from every [University]",
"[+1 Happiness] from every [Observatory]",
"[+1 Happiness] from every [Public School]"
],
"row": 1, "row": 1,
"column": 5 "column": 5
}, },
{ {
"name": "Free Thought", "name": "Free Thought",
"uniques": ["[+1 Science] from every [Trading post]", "[+17]% [Science] from every [University]"], "uniques": [
"[+1 Science] from every [Trading post]",
"[+17]% [Science] from every [University]"
],
"requires": ["Secularism"], "requires": ["Secularism"],
"row": 2, "row": 2,
"column": 1 "column": 1
}, },
{ {
"name": "Sovereignty", "name": "Sovereignty",
"uniques": ["[+15]% [Science] <while the empire is happy>"], "uniques": ["[+1 Gold] from all [Science] buildings"],
"requires": ["Humanism"], "requires": ["Humanism"],
"row": 2, "row": 2,
"column": 5 "column": 5
}, },
{ {
"name": "Scientific Revolution", "name": "Scientific Revolution",
"uniques": ["[2] Free Technologies"], "uniques": ["Science gained from research agreements [+50]%"],
"requires": ["Free Thought"], "requires": ["Free Thought"],
"row": 3, "row": 3,
"column": 1 "column": 1
}, },
{ {
"name": "Rationalism Complete", "name": "Rationalism Complete",
"uniques": ["[+1 Gold] from all [Science] buildings"] "uniques": [
"[2] Free Technologies",
"May buy [Great Scientist] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>"
]
} }
] ]
}, },
{ {
"name": "Freedom", "name": "Freedom",
"era": "Renaissance era", "era": "Renaissance era",
"uniques": ["[+25]% Great Person generation [in all cities]", "Only available <before adopting [Autocracy]>", "Only available <before adopting [Order]>"], "priorities": {
"Neutral": 30,
"Cultural": 30,
"Diplomatic": 20,
"Domination": 0,
"Scientific": 20
},
"uniques": [
"[+25]% Great Person generation [in all cities]",
"Only available <before adopting [Autocracy]>",
"Only available <before adopting [Order]>"
],
"policies": [ "policies": [
{ {
"name": "Constitution", "name": "Constitution",
@ -334,7 +502,9 @@
}, },
{ {
"name": "Civil Society", "name": "Civil Society",
"uniques": ["[-50]% Food consumption by specialists [in all cities]"], "uniques": [
"[-50]% Food consumption by specialists [in all cities]"
],
"row": 1, "row": 1,
"column": 5 "column": 5
}, },
@ -347,22 +517,39 @@
}, },
{ {
"name": "Democracy", "name": "Democracy",
"uniques": ["[-50]% Unhappiness from [Specialists] [in all cities]"], "uniques": [
"[-50]% Unhappiness from [Specialists] [in all cities]"
],
"requires": ["Civil Society"], "requires": ["Civil Society"],
"row": 2, "row": 2,
"column": 5 "column": 5
}, },
{ {
"name": "Freedom Complete", "name": "Freedom Complete",
"uniques": ["[+100]% Yield from every [Great Improvement]", "[+50]% Golden Age length"] "uniques": [
"[+100]% Yield from every [Great Improvement]",
"[+50]% Golden Age length",
"May buy [Great Artist] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>"
]
} }
] ]
}, },
{ {
"name": "Autocracy", "name": "Autocracy",
"era": "Industrial era", "era": "Industrial era",
"uniques": ["[-33]% maintenance costs <for [All] units>", "Upon capturing a city, receive [10] times its [Culture] production as [Culture] immediately", "priorities": {
"Only available <before adopting [Order]>", "Only available <before adopting [Freedom]>"], "Neutral": 30,
"Cultural": 0,
"Diplomatic": 0,
"Domination": 30,
"Scientific": 0
},
"uniques": [
"[-33]% maintenance costs <for [All] units>",
"Upon capturing a city, receive [10] times its [Culture] production as [Culture] immediately",
"Only available <before adopting [Order]>",
"Only available <before adopting [Freedom]>"
],
"policies": [ "policies": [
{ {
"name": "Populism", "name": "Populism",
@ -378,72 +565,113 @@
}, },
{ {
"name": "Fascism", "name": "Fascism",
"uniques": ["Quantity of strategic resources produced by the empire +[100]%"], "uniques": [
"requires": ["Populism","Militarism"], "Quantity of strategic resources produced by the empire +[100]%",
"[+2] Movement <for [Great General] units>"
],
"requires": ["Populism", "Militarism"],
"row": 2, "row": 2,
"column": 3 "column": 3
}, },
{ {
"name": "Police State", "name": "Police State",
"uniques": ["[+3 Happiness] from every [Courthouse]", "[+100]% Production when constructing [Courthouse] buildings [in all cities]"], "uniques": [
"[+3 Happiness] from every [Courthouse]",
"[+100]% Production when constructing [Courthouse] buildings [in all cities]"
],
// There are also some uniques regarding espoinage, which as of this writing is not yet implemented
"requires": ["Militarism"], "requires": ["Militarism"],
"row": 2, "row": 2,
"column": 5 "column": 5
}, },
{ {
"name": "Total War", "name": "Total War",
"uniques": ["[+15]% Production when constructing [Military] units [in all cities]", "New [Military] units start with [15] Experience [in all cities]"], "uniques": [
"requires": ["Police State","Fascism"], "[+25]% Production when constructing [Military] units [in all cities]",
"New [Military] units start with [15] Experience [in all cities]"
],
"requires": ["Police State", "Fascism"],
"row": 3, "row": 3,
"column": 4 "column": 4
}, },
{ {
"name": "Autocracy Complete", "name": "Autocracy Complete",
"uniques": ["[+25]% Strength <when attacking> <for [Military] units> <for [30] turns>"] "uniques": [
"[+25]% Strength <when attacking> <for [Military] units> <for [50] turns>",
"May buy [Great General] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>",
"May buy [Great Admiral] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>"
]
} }
] ]
}, },
{ {
"name": "Order", "name": "Order",
"era": "Industrial era", "era": "Industrial era",
"uniques": ["[+1 Happiness] [in all cities]", "Only available <before adopting [Autocracy]>", "Only available <before adopting [Freedom]>"], "priorities": {
"Neutral": 30,
"Cultural": 0,
"Diplomatic": 30,
"Domination": 0,
"Scientific": 20
},
"uniques": [
"[+1 Happiness] [in all cities]",
"Only available <before adopting [Autocracy]>",
"Only available <before adopting [Freedom]>"
],
"policies": [ "policies": [
{ {
"name": "United Front", "name": "United Front",
"uniques": ["Militaristic City-States grant units [2] times as fast when you are at war with a common nation"], "uniques": [
"Militaristic City-States grant units [2] times as fast when you are at war with a common nation"
],
"row": 1, "row": 1,
"column": 1 "column": 1
}, },
{ {
"name": "Planned Economy", "name": "Planned Economy",
"uniques": ["[+25]% [Science] from every [Factory]"], "uniques": [
"[+25]% [Science] from every [Factory]",
"[+100]% Production when constructing [Factory] buildings [in all cities]"
],
"row": 1, "row": 1,
"column": 3 "column": 3
}, },
{ {
"name": "Nationalism", "name": "Nationalism",
"uniques": ["[+15]% Strength <for [All] units> <when fighting in [Friendly Land] tiles>"], "uniques": [
"[+15]% Strength <for [All] units> <when fighting in [Friendly Land] tiles>"
],
"row": 1, "row": 1,
"column": 5 "column": 5
}, },
{ {
"name": "Socialism", "name": "Socialism",
"requires": ["Planned Economy"], "requires": ["Planned Economy"],
"uniques": ["[-15]% maintenance cost for buildings [in all cities]"], "uniques": [
"[-15]% maintenance cost for buildings [in all cities]"
],
"row": 2, "row": 2,
"column": 3 "column": 3
}, },
{ {
"name": "Communism", "name": "Communism",
"requires": ["Socialism"], "requires": ["Socialism"],
"uniques": ["[+2 Production] [in all cities]", "[+10]% Production when constructing [All] buildings [in all cities]"], "uniques": [
"[+2 Production] [in all cities]",
"[+1 Production] from every [Mine]",
"[+1 Production] from every [Quarry]"
],
"row": 3, "row": 3,
"column": 3 "column": 3
}, },
{ {
"name": "Order Complete", "name": "Order Complete",
"uniques": ["[+1 Food, +1 Production, +1 Science, +1 Gold, +1 Culture] [in all cities]"] "uniques": [
"[+2 Food, +2 Production, +2 Science, +2 Gold, +2 Culture] [in all cities]",
"May buy [Great Engineer] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>"
]
} }
] ]
} }
] ]

View File

@ -14,10 +14,7 @@ import com.unciv.logic.map.MapUnit
import com.unciv.logic.map.TileInfo import com.unciv.logic.map.TileInfo
import com.unciv.logic.trade.* import com.unciv.logic.trade.*
import com.unciv.models.Counter import com.unciv.models.Counter
import com.unciv.models.ruleset.Belief import com.unciv.models.ruleset.*
import com.unciv.models.ruleset.BeliefType
import com.unciv.models.ruleset.ModOptionsConstants
import com.unciv.models.ruleset.VictoryType
import com.unciv.models.ruleset.tech.Technology import com.unciv.models.ruleset.tech.Technology
import com.unciv.models.ruleset.tile.ResourceType import com.unciv.models.ruleset.tile.ResourceType
import com.unciv.models.ruleset.unique.UniqueType import com.unciv.models.ruleset.unique.UniqueType
@ -393,35 +390,72 @@ object NextTurnAutomation {
} }
} }
private object PolicyPriorityMap {
//todo This should be moddable, and needs an update to include new G&K Policies
/** Maps [VictoryType] to an ordered List of PolicyBranch names - the AI will prefer them in that order */
val priorities = mapOf(
VictoryType.Cultural to listOf("Piety", "Freedom", "Tradition", "Commerce", "Patronage"),
VictoryType.Scientific to listOf("Rationalism", "Commerce", "Liberty", "Order", "Patronage"),
VictoryType.Domination to listOf("Autocracy", "Honor", "Liberty", "Rationalism", "Commerce"),
VictoryType.Diplomatic to listOf("Patronage", "Commerce", "Rationalism", "Freedom", "Tradition")
)
}
private fun adoptPolicy(civInfo: CivilizationInfo) { private fun adoptPolicy(civInfo: CivilizationInfo) {
/*
# Branch-based policy-to-adopt decision
Basically the AI prioritizes finishing incomplete branches before moving on, \
unless a new branch with higher priority is adoptable.
- If incomplete branches have higher priorities than any newly adoptable branch,
- Candidates are the unfinished branches.
- Else if newly adoptable branches have higher priorities than any incomplete branch,
- Candidates are the new branches.
- Choose a random candidate closest to completion.
- Pick a random child policy of a chosen branch and adopt it.
*/
while (civInfo.policies.canAdoptPolicy()) { while (civInfo.policies.canAdoptPolicy()) {
val incompleteBranches: Set<PolicyBranch> = civInfo.policies.incompleteBranches
val adoptableBranches: Set<PolicyBranch> = civInfo.policies.adoptableBranches
val adoptablePolicies = civInfo.gameInfo.ruleSet.policies.values // Skip the whole thing if all branches are completed
.filter { civInfo.policies.isAdoptable(it) } if (incompleteBranches.isEmpty() && adoptableBranches.isEmpty()) return
// This can happen if the player is crazy enough to have the game continue forever and he disabled cultural victory val priorityMap: Map<PolicyBranch, Int> = civInfo.policies.priorityMap
if (adoptablePolicies.isEmpty()) return var maxIncompletePriority: Int? =
civInfo.policies.getMaxPriority(incompleteBranches)
var maxAdoptablePriority: Int? = civInfo.policies.getMaxPriority(adoptableBranches)
val policyBranchPriority = PolicyPriorityMap.priorities[civInfo.victoryType()] // This here is a (probably dirty) code to bypass NoSuchElementException error
?: emptyList() // when one of the priority variables is null
val policiesByPreference = adoptablePolicies if (maxIncompletePriority == null) maxIncompletePriority =
.groupBy { policy -> maxAdoptablePriority!! - 1
policyBranchPriority.indexOf(policy.branch.name).let { if (it == -1) 99 else it } if (maxAdoptablePriority == null) maxAdoptablePriority =
maxIncompletePriority - 1
// Candidate branches to adopt
val candidates: Set<PolicyBranch> =
// If incomplete branches have higher priorities than any newly adoptable branch,
if (maxAdoptablePriority <= maxIncompletePriority) {
// Prioritize finishing one of the unfinished branches
incompleteBranches.filter {
priorityMap[it] == maxIncompletePriority
}.toSet()
}
// If newly adoptable branches have higher priorities than any incomplete branch,
else {
// Prioritize adopting one of the new branches
adoptableBranches.filter {
priorityMap[it] == maxAdoptablePriority
}.toSet()
} }
val preferredPolicies = policiesByPreference.minByOrNull { it.key }!!.value // branchCompletionMap but keys are only candidates
val candidateCompletionMap: Map<PolicyBranch, Int> =
civInfo.policies.branchCompletionMap.filterKeys { key ->
key in candidates
}
// The highest number of adopted child policies within a single candidate
val maxCompletion: Int =
candidateCompletionMap.maxOf { entry -> entry.value }
// The candidate closest to completion, hence the target branch
val targetBranch = candidateCompletionMap.filterValues { value ->
value == maxCompletion
}.keys.random()
val policyToAdopt: Policy =
if (civInfo.policies.isAdoptable(targetBranch)) targetBranch
else targetBranch.policies.filter { civInfo.policies.isAdoptable(it) }.random()
val policyToAdopt = preferredPolicies.random()
civInfo.policies.adopt(policyToAdopt) civInfo.policies.adopt(policyToAdopt)
} }
} }
@ -441,9 +475,7 @@ object NextTurnAutomation {
val unitToDisband = civInfo.getCivUnits() val unitToDisband = civInfo.getCivUnits()
.filter { it.baseUnit.requiresResource(resource) } .filter { it.baseUnit.requiresResource(resource) }
.minByOrNull { it.getForceEvaluation() } .minByOrNull { it.getForceEvaluation() }
if (unitToDisband != null) { unitToDisband?.disband()
unitToDisband.disband()
}
for (city in civInfo.cities) { for (city in civInfo.cities) {
if (city.hasSoldBuildingThisTurn) if (city.hasSoldBuildingThisTurn)

View File

@ -3,7 +3,7 @@ package com.unciv.logic.civilization
import com.unciv.logic.map.MapSize import com.unciv.logic.map.MapSize
import com.unciv.models.ruleset.Policy import com.unciv.models.ruleset.Policy
import com.unciv.models.ruleset.Policy.PolicyBranchType import com.unciv.models.ruleset.Policy.PolicyBranchType
import com.unciv.models.ruleset.unique.StateForConditionals import com.unciv.models.ruleset.PolicyBranch
import com.unciv.models.ruleset.unique.UniqueMap import com.unciv.models.ruleset.unique.UniqueMap
import com.unciv.models.ruleset.unique.UniqueTriggerActivation import com.unciv.models.ruleset.unique.UniqueTriggerActivation
import com.unciv.models.ruleset.unique.UniqueType import com.unciv.models.ruleset.unique.UniqueType
@ -26,11 +26,62 @@ class PolicyManager {
var freePolicies = 0 var freePolicies = 0
var storedCulture = 0 var storedCulture = 0
// TODO: 'adoptedPolicies' seems to be an internal API.
// Why is it HashSet<String> instead of HashSet<Policy>?
internal val adoptedPolicies = HashSet<String>() internal val adoptedPolicies = HashSet<String>()
var numberOfAdoptedPolicies = 0 var numberOfAdoptedPolicies = 0
var shouldOpenPolicyPicker = false var shouldOpenPolicyPicker = false
get() = field && canAdoptPolicy() get() = field && canAdoptPolicy()
/** A [Map] pairing each [PolicyBranch] to its priority ([Int]). */
val priorityMap: Map<PolicyBranch, Int>
get() {
val value = HashMap<PolicyBranch, Int>()
for (branch in branches) {
value[branch] = branch.priorities[civInfo.victoryType().name] ?: 0
}
return value
}
/** A [Set] of adopted [PolicyBranch]es regardless of its completeness. */
val adoptedBranches: Set<PolicyBranch>
get() = branches.filter { isAdopted(it.name) }.toSet()
/** A [Set] of newly adoptable [PolicyBranch]es. */
val adoptableBranches: Set<PolicyBranch>
get() = branches.filter { isAdoptable(it) }.toSet()
/** A [Set] of incomplete [PolicyBranch]es including newly adoptable ones. */
val incompleteBranches: Set<PolicyBranch>
get() {
val value = HashSet<PolicyBranch>()
for (branch in branches) {
if (branch.policies.any { isAdoptable(it) }) value.add(branch)
}
return value
}
/** A [Set] of completed [PolicyBranch]es. */
val completedBranches: Set<PolicyBranch>
get() {
val value = HashSet<PolicyBranch>()
for (branch in branches) {
if (branch.policies.all { isAdopted(it.name) }) value.add(branch)
}
return value
}
/** A [Map] pairing each [PolicyBranch] to how many of its child branches are adopted ([Int]). */
val branchCompletionMap: Map<PolicyBranch, Int>
get() {
val value = HashMap<PolicyBranch, Int>()
for (branch in branches) {
value[branch] = adoptedPolicies.count {
branch.policies.contains(getPolicyByName(it))
}
}
return value
}
/** A [Set] of all [PolicyBranch]es. */
private val branches: Set<PolicyBranch>
get() = civInfo.gameInfo.ruleSet.policyBranches.values.toSet()
// Only instantiate a single value for all policy managers // Only instantiate a single value for all policy managers
companion object { companion object {
private val turnCountRegex by lazy { Regex("for \\[[0-9]*\\] turns") } private val turnCountRegex by lazy { Regex("for \\[[0-9]*\\] turns") }
@ -51,25 +102,29 @@ class PolicyManager {
fun getPolicyByName(name: String): Policy = getRulesetPolicies()[name]!! fun getPolicyByName(name: String): Policy = getRulesetPolicies()[name]!!
fun setTransients() { fun setTransients() {
for (policyName in adoptedPolicies) for (policyName in adoptedPolicies) addPolicyToTransients(
addPolicyToTransients(getPolicyByName(policyName)) getPolicyByName(policyName)
)
} }
fun addPolicyToTransients(policy: Policy) { fun addPolicyToTransients(policy: Policy) {
for (unique in policy.uniqueObjects) { for (unique in policy.uniqueObjects) {
// Should be deprecated together with TimedAttackStrength so I'm putting this here so the compiler will complain if we don't // Should be deprecated together with TimedAttackStrength so
// I'm putting this here so the compiler will complain if we don't
val rememberToDeprecate = UniqueType.TimedAttackStrength val rememberToDeprecate = UniqueType.TimedAttackStrength
if (!unique.text.contains(turnCountRegex) && unique.conditionals.none { it.type == UniqueType.ConditionalTimedUnique }) if (!unique.text.contains(turnCountRegex) && unique.conditionals.none { it.type == UniqueType.ConditionalTimedUnique }) policyUniques.addUnique(
policyUniques.addUnique(unique) unique
)
} }
} }
fun addCulture(culture: Int) { fun addCulture(culture: Int) {
val couldAdoptPolicyBefore = canAdoptPolicy() val couldAdoptPolicyBefore = canAdoptPolicy()
storedCulture += culture storedCulture += culture
if (!couldAdoptPolicyBefore && canAdoptPolicy()) if (!couldAdoptPolicyBefore && canAdoptPolicy()) {
shouldOpenPolicyPicker = true shouldOpenPolicyPicker = true
} }
}
fun endTurn(culture: Int) { fun endTurn(culture: Int) {
addCulture(culture) addCulture(culture)
@ -80,7 +135,7 @@ class PolicyManager {
fun getCultureNeededForNextPolicy(): Int { fun getCultureNeededForNextPolicy(): Int {
var policyCultureCost = 25 + (numberOfAdoptedPolicies * 6).toDouble().pow(1.7) var policyCultureCost = 25 + (numberOfAdoptedPolicies * 6).toDouble().pow(1.7)
// https://civilization.fandom.com/wiki/Map_(Civ5) // https://civilization.fandom.com/wiki/Map_(Civ5)
val worldSizeModifier = with (civInfo.gameInfo.tileMap.mapParameters.mapSize) { val worldSizeModifier = with(civInfo.gameInfo.tileMap.mapParameters.mapSize) {
when { when {
radius >= MapSize.Huge.radius -> 0.05f radius >= MapSize.Huge.radius -> 0.05f
radius >= MapSize.Large.radius -> 0.075f radius >= MapSize.Large.radius -> 0.075f
@ -89,12 +144,9 @@ class PolicyManager {
} }
var cityModifier = worldSizeModifier * (civInfo.cities.count { !it.isPuppet } - 1) var cityModifier = worldSizeModifier * (civInfo.cities.count { !it.isPuppet } - 1)
for (unique in civInfo.getMatchingUniques(UniqueType.LessPolicyCostFromCities)) for (unique in civInfo.getMatchingUniques(UniqueType.LessPolicyCostFromCities)) cityModifier *= 1 - unique.params[0].toFloat() / 100
cityModifier *= 1 - unique.params[0].toFloat() / 100 for (unique in civInfo.getMatchingUniques(UniqueType.LessPolicyCost)) policyCultureCost *= unique.params[0].toPercent()
for (unique in civInfo.getMatchingUniques(UniqueType.LessPolicyCost)) if (civInfo.isPlayerCivilization()) policyCultureCost *= civInfo.getDifficulty().policyCostModifier
policyCultureCost *= unique.params[0].toPercent()
if (civInfo.isPlayerCivilization())
policyCultureCost *= civInfo.getDifficulty().policyCostModifier
policyCultureCost *= civInfo.gameInfo.gameParameters.gameSpeed.modifier policyCultureCost *= civInfo.gameInfo.gameParameters.gameSpeed.modifier
val cost: Int = (policyCultureCost * (1 + cityModifier)).roundToInt() val cost: Int = (policyCultureCost * (1 + cityModifier)).roundToInt()
return cost - (cost % 5) return cost - (cost % 5)
@ -116,7 +168,9 @@ class PolicyManager {
if (policy.policyBranchType == PolicyBranchType.BranchComplete) return false if (policy.policyBranchType == PolicyBranchType.BranchComplete) return false
if (!getAdoptedPolicies().containsAll(policy.requires!!)) return false if (!getAdoptedPolicies().containsAll(policy.requires!!)) return false
if (checkEra && civInfo.gameInfo.ruleSet.eras[policy.branch.era]!!.eraNumber > civInfo.getEraNumber()) return false if (checkEra && civInfo.gameInfo.ruleSet.eras[policy.branch.era]!!.eraNumber > civInfo.getEraNumber()) return false
if (policy.getMatchingUniques(UniqueType.IncompatibleWith).any { adoptedPolicies.contains(it.params[0]) }) return false if (policy.getMatchingUniques(UniqueType.IncompatibleWith)
.any { adoptedPolicies.contains(it.params[0]) }
) return false
if (policy.uniqueObjects.filter { it.type == UniqueType.OnlyAvailableWhen } if (policy.uniqueObjects.filter { it.type == UniqueType.OnlyAvailableWhen }
.any { !it.conditionalsApply(civInfo) }) return false .any { !it.conditionalsApply(civInfo) }) return false
return true return true
@ -125,8 +179,7 @@ class PolicyManager {
fun canAdoptPolicy(): Boolean { fun canAdoptPolicy(): Boolean {
if (civInfo.cities.isEmpty()) return false if (civInfo.cities.isEmpty()) return false
if (freePolicies == 0 && storedCulture < getCultureNeededForNextPolicy()) if (freePolicies == 0 && storedCulture < getCultureNeededForNextPolicy()) return false
return false
//Return true if there is a policy to adopt, else return false //Return true if there is a policy to adopt, else return false
return getRulesetPolicies().values.any { civInfo.policies.isAdoptable(it) } return getRulesetPolicies().values.any { civInfo.policies.isAdoptable(it) }
@ -138,8 +191,9 @@ class PolicyManager {
if (freePolicies > 0) freePolicies-- if (freePolicies > 0) freePolicies--
else if (!civInfo.gameInfo.gameParameters.godMode) { else if (!civInfo.gameInfo.gameParameters.godMode) {
val cultureNeededForNextPolicy = getCultureNeededForNextPolicy() val cultureNeededForNextPolicy = getCultureNeededForNextPolicy()
if (cultureNeededForNextPolicy > storedCulture) if (cultureNeededForNextPolicy > storedCulture) throw Exception(
throw Exception("How is this possible??????") "How is this possible??????"
)
storedCulture -= cultureNeededForNextPolicy storedCulture -= cultureNeededForNextPolicy
numberOfAdoptedPolicies++ numberOfAdoptedPolicies++
} }
@ -156,34 +210,47 @@ class PolicyManager {
} }
for (unique in policy.uniques) { for (unique in policy.uniques) {
if (unique.equalsPlaceholderText("Triggers the following global alert: []")) if (unique.equalsPlaceholderText("Triggers the following global alert: []")) triggerGlobalAlerts(
triggerGlobalAlerts(policy, unique.getPlaceholderParameters()[0]) policy, unique.getPlaceholderParameters()[0]
)
} }
for (unique in policy.uniqueObjects) for (unique in policy.uniqueObjects) UniqueTriggerActivation.triggerCivwideUnique(
UniqueTriggerActivation.triggerCivwideUnique(unique, civInfo) unique, civInfo
)
// This ALSO has the side-effect of updating the CivInfo statForNextTurn so we don't need to call it explicitly // This ALSO has the side-effect of updating the CivInfo statForNextTurn so we don't need to call it explicitly
for (cityInfo in civInfo.cities) for (cityInfo in civInfo.cities) cityInfo.cityStats.update()
cityInfo.cityStats.update()
if (!canAdoptPolicy()) shouldOpenPolicyPicker = false if (!canAdoptPolicy()) shouldOpenPolicyPicker = false
} }
private fun triggerGlobalAlerts(policy: Policy, extraNotificationText: String = "") { /**
* Return the highest priority ([Int]) among the given [Set] of [PolicyBranch]es.
* Would return null if the given [Set] is empty.
*/
fun getMaxPriority(branchesToCompare: Set<PolicyBranch>): Int? {
val filteredMap = priorityMap.filterKeys { branch -> branch in branchesToCompare }
return filteredMap.values.maxOrNull()
}
private fun triggerGlobalAlerts(
policy: Policy, extraNotificationText: String = ""
) {
var extraNotificationTextCopy = extraNotificationText var extraNotificationTextCopy = extraNotificationText
if (extraNotificationText != "") { if (extraNotificationText != "") {
extraNotificationTextCopy = "\n${extraNotificationText}" extraNotificationTextCopy = "\n${extraNotificationText}"
} }
for (civ in civInfo.gameInfo.civilizations.filter { it.isMajorCiv() }) { for (civ in civInfo.gameInfo.civilizations.filter { it.isMajorCiv() }) {
if (civ == civInfo) continue if (civ == civInfo) continue
val defaultNotificationText = val defaultNotificationText = if (civ.getKnownCivs().contains(civInfo)) {
if (civ.getKnownCivs().contains(civInfo)) {
"[${civInfo.civName}] has adopted the [${policy.name}] policy" "[${civInfo.civName}] has adopted the [${policy.name}] policy"
} else { } else {
"An unknown civilization has adopted the [${policy.name}] policy" "An unknown civilization has adopted the [${policy.name}] policy"
} }
civ.addNotification("${defaultNotificationText}${extraNotificationTextCopy}", NotificationIcon.Culture) civ.addNotification(
"${defaultNotificationText}${extraNotificationTextCopy}", NotificationIcon.Culture
)
} }
} }

View File

@ -2,5 +2,6 @@ package com.unciv.models.ruleset
class PolicyBranch : Policy() { class PolicyBranch : Policy() {
var policies: ArrayList<Policy> = arrayListOf() var policies: ArrayList<Policy> = arrayListOf()
var priorities: HashMap<String, Int> = HashMap<String, Int>()
lateinit var era: String lateinit var era: String
} }

View File

@ -251,17 +251,32 @@ class Ruleset {
val policiesFile = folderHandle.child("Policies.json") val policiesFile = folderHandle.child("Policies.json")
if (policiesFile.exists()) { if (policiesFile.exists()) {
policyBranches += createHashmap(jsonParser.getFromJson(Array<PolicyBranch>::class.java, policiesFile)) policyBranches += createHashmap(
jsonParser.getFromJson(Array<PolicyBranch>::class.java, policiesFile)
)
for (branch in policyBranches.values) { for (branch in policyBranches.values) {
// Setup this branch
branch.requires = ArrayList() branch.requires = ArrayList()
branch.branch = branch branch.branch = branch
for (victoryType in VictoryType.values()) {
if (victoryType.name !in branch.priorities.keys) {
branch.priorities[victoryType.name] = 0
}
}
policies[branch.name] = branch policies[branch.name] = branch
// Append child policies of this branch
for (policy in branch.policies) { for (policy in branch.policies) {
policy.branch = branch policy.branch = branch
if (policy.requires == null) policy.requires = arrayListOf(branch.name) if (policy.requires == null) {
policy.requires = arrayListOf(branch.name)
}
policies[policy.name] = policy policies[policy.name] = policy
} }
branch.policies.last().name = branch.name + Policy.branchCompleteSuffix
// Add a finisher
branch.policies.last().name =
branch.name + Policy.branchCompleteSuffix
} }
} }

View File

@ -2,6 +2,7 @@
- [Buildings.json](#buildingsjson) - [Buildings.json](#buildingsjson)
- [Nations.json](#nationsjson) - [Nations.json](#nationsjson)
- [Policies.json](#policiesjson) - [Policies.json](#policiesjson)
- [Branch priorities](#branch-priorities)
- [Quests.json](#questsjson) - [Quests.json](#questsjson)
- [Religions.json](#religionsjson) - [Religions.json](#religionsjson)
- [Specialists.json](#specialistsjson) - [Specialists.json](#specialistsjson)
@ -109,6 +110,7 @@ Each policy branch can have the following properties:
|-----------|------|-----------|-------| |-----------|------|-----------|-------|
| name | String | Required | | | name | String | Required | |
| era | String | Required | Unlocking era as defined in [Eras.json](Miscellaneous-JSON-files.md#erasjson) | | era | String | Required | Unlocking era as defined in [Eras.json](Miscellaneous-JSON-files.md#erasjson) |
| priorities | Object | Default empty | Priorities for each victory type, [see here](#branch-priorities)
| uniques | List | Default empty | List of effects, [see here](../Modders/Unique-parameter-types.md#general-uniques) | | uniques | List | Default empty | List of effects, [see here](../Modders/Unique-parameter-types.md#general-uniques) |
| policies | List | Default empty | List of member policies | | policies | List | Default empty | List of member policies |
@ -121,6 +123,16 @@ Each member policy can have the following properties:
| requires | List | Default empty | List of prerequisite policy names | | requires | List | Default empty | List of prerequisite policy names |
| uniques | List | Default empty | List of effects, [see here](../Modders/Unique-parameter-types.md#general-uniques) | | uniques | List | Default empty | List of effects, [see here](../Modders/Unique-parameter-types.md#general-uniques) |
#### Branch priorities
The "priorities" object lists its branch's priorities for each victory type. The AI refers to this when deciding which branch to prioritize, also taking its preferred victory type into consideration. If two or more candidate branches have the same priority, the AI chooses a random branch among the candidates. All values are set to 0 if the object itself is missing or empty.
| Attribute | Type | Optional? | Notes |
|-----------|------|-----------|-------|
| Neutral | Int | Default 0 | Priority value when the AI's preferred victory type is Neutral |
| Cultural | Int | Default 0 | Priority value when the AI's preferred victory type is Cultural |
| Diplomatic | Int | Default 0 | Priority value when the AI's preferred victory type is Diplomatic |
| Domination | Int | Default 0 | Priority value when the AI's preferred victory type is Domination|
| Scientific | Int | Default 0 | Priority value when the AI's preferred victory type is Scientific |
## Quests.json ## Quests.json
[Link to original](/jsons/Civ%20V%20-%20Vanilla/Quests.json) [Link to original](/jsons/Civ%20V%20-%20Vanilla/Quests.json)