saamohod
Deity
How is it calculated? I've only captured one AI capital but my Anti-Warmonger penalty is 35% which is quite a lot.
Summon devs. @Gazebo, @Recursive, @iteroiSecond attempt.
Could anyone clarify how the Anti-Warmonger penalty calculated? Couldn't find it in Civilopedia. Is it 35% per foreign capital captured?
Summon devs.@Recursive
Other player military strength compared to us is:
IMMENSE or POWERFUL:
- Subtract 2 if Casus Belli is active
- Subtract 5 if Global Peace Accords is active
- Subtract 1 otherwise
STRONG or AVERAGE:
- Subtract 4 if Casus Belli is active
- Subtract 7 if Global Peace Accords is active
- Subtract 3 otherwise
POOR, WEAK or PATHETIC:
- Subtract 5 if Casus Belli is active
- Subtract 8 if Global Peace Accords is active
- Subtract 4 otherwise
This is buggy code - Global Peace Accords should be decreasing the decay rate, and Casus Belli should be increasing the decay rate more than it is already.
If any of these conditions are true, an individual player won't apply any penalties (and won't add to the # of war declarations counters, either) for this war declaration.
- Attacker is on our team
- Attacker declared war because of a Defensive Pact
- Attacker is a vassal
- Attacker is an unmet player
- We're also at war with the player that was attacked
If the target was a City-State, add 1 to "# of City-States we've seen this player attack".
If the target was a civilization, add 1 to "# of Civilizations we've seen this player attack".
Now apply warmongering penalties.
- For City-States, warmonger modifier begins at 200 plus 10x the # of City-States we've seen this player attack.
- For Civilizations, warmonger modifier begins at 200 plus 10x the # of Civilizations we've seen this player attack.
- Add 50 to warmonger modifier if the attacker's military strength compared to us is STRONG, POWERFUL or IMMENSE, and 25 otherwise.
- If a City-State was attacked, multiply 5 by the warmonger modifier and divide by 100, rounding down.
- If a Civilization was attacked, multiply 10 by the warmonger modifier and divide by 100, rounding down.
- Multiply the result by the game (average) era's Warmonger Percent and divide by 100, rounding down.
Ancient Era: 60
Classical Era: 70
Medieval Era: 80
Renaissance Era: 90
Industrial Era: 100
Modern Era: 110
Atomic Era: 120
Information Era: 130
Add the final value to warmonger amount.
- Warmonger modifier begins at 200 plus 25x the # of times we've been nuked by this player.
- Add 50 to warmonger modifier if the attacker's military strength compared to us is STRONG, POWERFUL or IMMENSE, and 25 otherwise.
- Multiply 20 by the warmonger modifier and divide by 100, rounding down.
- Multiply the result by the game (average) era's Warmonger Percent and divide by 100, rounding down.
Ancient Era: 60
Classical Era: 70
Medieval Era: 80
Renaissance Era: 90
Industrial Era: 100
Modern Era: 110
Atomic Era: 120
Information Era: 130
Add the final value to warmonger amount.
There is a bug which causes this code to be run once plus an additional time for every civ that has met both players, rather than only once, meaning the penalty can be dramatically increased
(the intention was to have all other civs apply warmongering penalties when a nuke is used on any civ, but this isn't currently working).
When a player conquers a city:
- If they're able to liberate the city, they will receive warmongering penalties once they choose to raze, annex or puppet it.
- If they're not able to liberate the city, they will receive warmongering penalties right away.
Under certain conditions, no warmongering penalties are applied. These are:
Condition 1 - Capturing a city from Barbarians
Condition 2 - Recapturing a city you founded
Condition 3 - Recapturing a city that you were the *last* to previously own
Condition 3 Example: Civ A conquers Civ B's city, then Civ B recaptures it. If Civ A captures it a second time, they will not receive additional penalties.
However, if Civ C (any other player) acquires the city at any point, Civ A will receive penalties again if they capture it after that.
If none of the three conditions apply, then all civilizations will apply warmongering penalties (see next code block).
NOTE: "We"/"our" refers to the civ applying the penalties. The conqueror/attacker is the player who captured the city. The victim/conquered is the player who had their city captured.
Don't apply warmongering penalties if any of these conditions are true:
- We're on the conqueror's team
- We're not alive
- We haven't met the conqueror
- We're at war with the victim, and our war score against them is negative (or any of our teammates' war score against them is negative)
Step 1. Base Value
Every turn, the game calculates the economic value of all cities and stores the highest value in memory. Economic value takes into account all city yields, the presence of World Wonders, and luxury/strategic resources.
- Base value starts at (100 * city economic value) / highest economic value of any city (minimum 1), rounded down. Cities are thus rated on a 0-100 scale, where 0 is worthless and 100 is the best city in the world.
- If the city is the victim's capital, base value is increased by 25% (this is potentially bugged; will investigate further).
- If the conqueror has owned the city previously, reduce base value by 10 * the number of times previously owned.
- If Casus Belli is active OR the player is sanctioned (they do not stack), reduce the base value by half, rounded down.
- If Global Peace Accords is active, double the base value.
- Base value is always 1 at minimum.
Step 2. Warmonger Modifier
If the conqueror is a vassal, warmonger modifier is 1.
If the conquered player is our master, warmonger modifier is 150.
Otherwise, warmonger modifier is 100.
Step 3. Warmonger Approach Modifier
Warmonger approach modifier starts at 0.
If we're the victim or we have a Defensive Pact with the victim, add 75 to warmonger approach modifier.
If we're not the victim and we don't have a Defensive Pact with the victim, then compare military strengths.
If the conqueror's military strength compared to us is...
IMMENSE or POWERFUL, add 75.
STRONG or AVERAGE, add 50.
POOR, WEAK or PATHETIC, add 25.
If the victim's military strength compared to us is...
IMMENSE, POWERFUL or STRONG, subtract 50.
AVERAGE, POOR, WEAK or PATHETIC, subtract 25.
Step 4. Warmonger Status Modifier
Warmonger status modifier starts at 0.
If we're also at war with the victim, subtract 25 from warmonger status modifier.
If the victim is a City-State:
- If we're their ally, add 75.
- If we're friends, add 50.
- Otherwise, add 25. (I think this is supposed to be "subtract 25" but it subtracts a negative)
- If we have a Pledge to Protect them, add 75.
- Otherwise, subtract 25.
If we and the conqueror have the same *majority* (note: not official) religion, subtract 25, and if the victim has a different majority religion, subtract an additional 50.
If we and the conqueror have different *majority* (note: not official) religions, add 25, and if the victim has the same majority religion as us, add an additional 50.
If we and the conqueror have the same ideology, subtract 25, and if the victim has a different ideology, subtract an additional 50.
If we and the conqueror have different ideologies, add 25, and if the victim has the same ideology as us, add an additional 50.
If the victim is sanctioned and the victim isn't our master or our vassal, subtract 75.
If Casus Belli is active, subtract 75.
If Global Peace Accords is active, add 75.
If we're an AI player, multiply the current value of warmonger status modifier by (100 + our Diplo Balance flavor + our Warmonger Hate flavor) and divide by 100, rounding down.
If we're a human, assume average values - increase warmonger status modifier by 25%.
Factor in our proximity to the conqueror:
DISTANT: Subtract 25.
FAR: Add 25.
CLOSE: Add 50.
NEIGHBORS: Add 75.
Warmonger status modifier cannot be lower than -75.
Step 5. Apply all modifiers
- Multiply the base value by (100 + Warmonger Modifier) and divide by 100, rounding down.
- Multiply the result by (100 + Warmonger Approach Modifier) and divide by 100, rounding down.
- Multiply the result by (100 + Warmonger Status Modifier) and divide by 100, rounding down.
- Multiply the result by the game (average) era's Warmonger Percent and divide by 100, rounding down.
Ancient Era: 60
Classical Era: 70
Medieval Era: 80
Renaissance Era: 90
Industrial Era: 100
Modern Era: 110
Atomic Era: 120
Information Era: 130
The final value is added to warmonger amount.
NOTE: "We"/"our" refers to the civ applying the bonus. The liberator is the player who liberated the city. The liberated player is the player who had their city liberated.
Don't apply a liberation bonus if any of these conditions are true:
- We're on the liberator's team
- We're not alive
- We haven't met the liberator
- We're at war with the liberated player, and our war score against them is negative (or any of our teammates' war scores against them are negative).
- The city was liberated from our control
Step 1. Base value
Every turn, the game calculates the economic value of all cities and stores the highest value in memory. Economic value takes into account all city yields, the presence of World Wonders, and luxury/strategic resources.
- Base value starts at (100 * city economic value) / highest economic value of any city (minimum 1), rounded down. Cities are thus rated on a 0-100 scale, where 0 is worthless and 100 is the best city in the world.
- If the city is the victim's capital, base value is increased by 25% (this is potentially bugged; will investigate further).
- If the conqueror has owned the city previously, reduce base value by 10 * the number of times previously owned.
- If Casus Belli is active OR the player is sanctioned (they do not stack), reduce the base value by half, rounded down.
- If Global Peace Accords is active, double the base value.
- Base value is always 1 at minimum.
Step 2. Warmonger status modifier
Warmonger status modifier starts at 0.
Add 300 if we're the liberated player.
Subtract 25 if we're at war with the previous owner of the city (before it was liberated).
Subtract 25 if we're at war with the liberator.
If the liberated player is a City-State:
- If we have at least 60 Influence with that City-State, add 75.
- Otherwise, if we have at least 30 Influence with that City-State, add 50.
- Otherwise, subtract 25.
Factor in our proximity to the liberator:
DISTANT: Subtract 25.
FAR: Add 25.
CLOSE: Add 50.
NEIGHBORS: Add 75.
Warmonger status modifier cannot be lower than -75.
Step 3. Apply warmonger status modifier
- Multiply the base value by (100 + Warmonger Status Modifier) and divide by 100, rounding down.
The final value is subtracted from warmonger amount.
Can we have warmonger fervor not apply when defending a vassal's territory? It's kind of weird to see warmonger penalties when defending my vassal.
Base value is warmonger amount.
A player is "untrustworthy" if they've denounced us, we've denounced them, or we consider them (or any of their teammates) a backstabber.
If a player isn't untrustworthy, then reduce the base value based on friendship status:
- If we're currently friends or we have had at least two consecutive DoFs without a denouncement, broken DoF or war declaration since then, then reduce the base value by half, rounded down.
- If this isn't the case, but we DO have a Defensive Pact, then reduce the base value by 25%.
- If neither of these are the case, but we've had at least one DoF in the past without a denouncement, broken DoF or war declaration since then, then reduce the base value by 10%.
If this player isn't untrustworthy and has done any of the following:
- Made a DP with a player we also have a DP with...
- Made a DoF with one of our friends...
- Denounced one of our enemies...
...then reduce the value by 25%.
If this player is untrustworthy, increase the value by 50%.
If this player has denounced any of our friends, made a DoF with any of our enemies, or made a DP with any of our enemies, increase the value by 25%.
If this player resurrected us or we resurrected them, reduce the value by 50%, rounded down.
If we have the same religious interests (either they have our official religion, we have their religion and we didn't found, or we have the same majority religion), then reduce the value by 25%.
If we have opposing religious interests (we both have religions and we don't have the same religious interests, and we're not ignoring religious differences for some reason), then increase the value by 25%.
If we have the same ideology, then reduce the value by 50%.
If we have opposing ideologies and we're not ignoring ideology differences for some reason, then increase the value by 50%.
Multiply the value by our Warmonger Hate flavor (ranges between 1-10) and then divide by 15.
The final value is the Warmonger Score, which is used for the opinion calculation and for warmonger threat.
IMPORTANT NOTE: When at war with a player, only religion, ideology and the Warmonger Hate flavor modify that player's warmonger score.
Check a player's warmonger score (not amount!):
>= 160: Critical Threat
>= 80: Severe Threat
>= 40: Major Threat
>= 10: Minor Threat
If we're on a map with less than 4 players (including City-States) at game start and they've killed at least one player, then override this:
- Warmonger Mod = 10 * (Our Warmonger Hate Flavor - 5); ranges from -40% to +50%.
- Players Killed Percent = 100 * (# of civs *and* City-States they killed) / total number of players
- Add (Players Killed Percent * Warmonger Mod) / 100 to PlayersKilledPercent.
- If PlayersKilledPercent is now at least 40, then warmonger threat is Critical. If it's at least 25, then warmonger threat is Severe.
As always Recursive, another super thorough and wonderful summary! I am now going to try working through an example to see if I understand under everything.
Our story begins with our hero who is in the Classical era. He encounters an Average Military villain who declares war on him.
War Declare in Classical Era
Anti-Warmonger Fervor
- Warmonger Modifier = 200 + 10* 1 (1 civ attacked, me!) + 25 (Villain average military strength) = 235
- 235 * 10 / 100 (a civilization was attacked) = 23.5
- 23.5 * 70 (Classical Era) / 100 = 16.45
16.45 / 100 = .1645 (rounded down) = .16
@Recursive, I am going to assume that you meant to divide by 100 and not 10 from your formula, otherwise you always have a value over 1, which I know is not accurate.
.16 * 1 (Classical Era) = .16 = 16% Anti-Warmonger Fervor
Since I have found a possible error, I will stop here and get confirmation, and then continue the example once I know the formula is correct.
For next hotfix/version, I've cleaned up the code and fixed all the bugs I identified during my examination.
One thing I'll note about all this - it is called warmonger but it is probably, more appropriately, war success. Stuff like defending vassals, defending your own land, taking an owned city back, etc., are all examples of success, and since war is a zero-sum game, it makes other civs nervous.
@Recursive could you take a look at my updated example and see if I am still calculating everything correctly? (this actually led to an interesting forum question...if I edit a post and put a new call out in it, does the user receive that new call out?)