Civ 5 CBP Wikia
Advertisement

Approach[]

Approach describes an AI civilization's diplomatic "stance" towards you or another player. Every civilization's Approach is updated every turn.

There are seven approaches: NEUTRAL, FRIENDLY, AFRAID, GUARDED, DECEPTIVE, HOSTILE and WAR.

Each turn, AIs perform a calculation which adds weight to each of the seven approach scores, and at the end of the calculation, the approach with the highest score is picked. See the Approach Calculation section below for more details on this.

Note: The WAR approach does not mean you are actually at war, it means that the AI values going to war more than other approaches, and it is preparing to go to war when the time is right (see "War Declarations" below).

Changes in approach happen gradually to prevent rapid jumping between values.

You can see what an AI's visible approach towards you is in the diplomacy screen (or with EUI, by mousing over their portrait in the score list). However, the visible approach is not always the true approach:

  • If the AI's true approach is DECEPTIVE, the visible approach will be FRIENDLY.
  • If the AI's true approach is WAR, the AI will pick a "War Face" based on its next highest Approach score. The visible approach will be FRIENDLY, NEUTRAL, GUARDED or HOSTILE.
  • If the AI has one of the special "approaches" listed below, their approach will not be visible.

Mousing over the visible approach will show you the factors that affect the AI's Opinion of you (see the "Opinion" section below). Opinion is an important factor in determining the AI's approach, although there are many other factors as well.

If the AI's visible approach is FRIENDLY (real or fake), they will hide certain bad opinion modifiers (see below) unless you have the Transparent Diplomacy option enabled.


Effects of Approach[]

Approach is the most important factor in global diplomacy, and affects relations between civilizations in a wide variety of ways. It can be considered an attitude or "relationship level" system.

Note: If you have denounced them, they have denounced you, or they consider you an untrustworthy backstabber, the AI will never adopt the FRIENDLY approach (real or fake) towards you; it will either show up as GUARDED, if their Opinion of you (see below) is Enemy or Unforgivable, or NEUTRAL otherwise.

NEUTRAL - Neutral civilizations are neither friendly nor hostile. Towards you, they have no strong feelings one way or the other. They will tend to ignore you unless you do something which catches their attention. Trade deals with them will tend to be balanced and fair (at least, from their point of view).

FRIENDLY - Friendly civilizations see you in a positive light. Their disposition will be kind, they are more likely to accept requests you make of them, and they are less likely to do anything to harm you. Trade deals with them will tend to be slightly in your favor and easier to achieve.

AFRAID - Afraid civilizations are terrified of your great might, and their dialogue will reflect that they are intimidated. This approach is rarely seen, as it typically requires an overwhelming advantage in strength over them. They will accept requests much more readily, and trade deals with them will be in your favor.

GUARDED - Guarded civilizations are suspicious of your intentions. Their disposition will be defensive, they are more likely to be unfriendly, and they may take actions harmful to you. Trade deals with them will tend to be tilted in their favor and more difficult to achieve.

DECEPTIVE - Deceptive civilizations are pretending to be FRIENDLY, but it's only a show. Outwardly, they will be friendly, but they will secretly plot against you and take actions to harm you, such as bribing other civilizations to declare war on you. Trade deals with them are possible but more difficult, and Deceptive friends will never offer gifts or accept requests for help.

HOSTILE - Hostile civilizations hate you, and they want you to know it. Their disposition will be aggressive, and they will be insulting in their interactions with you. They are very likely to take actions to harm you, and very unlikely to agree to any requests or do anything to help you. Trade deals with them will be heavily tilted in their favor or outright impossible.

WAR - Civilizations with the WAR approach have decided they want to go to war with you. If not already at war, they will pretend to be FRIENDLY, NEUTRAL, GUARDED or HOSTILE while they prepare for war; this is their "War Face". However, they will not declare war unless they have satisfied the conditions for war (see "War Declarations" below). In the meantime, they will display their false approach. They are very likely to plot against you and take actions to harm you, and trade deals with them will tend to be unfavorable or impossible.

Note: If your spies (or another player) informs you that an AI player is "plotting against someone", it means that they either have the DECEPTIVE approach towards that other player, or they have the WAR approach and their visible approach towards that other player is FRIENDLY, NEUTRAL or GUARDED.

Special "Approaches"[]

Note: These are messages you see instead of the AI's approach in the diplomacy screen, not actual approaches! You can see what the AI's actual visible approach is by checking their Opinion modifiers.

WAR! - Indicates that you are currently at war. This is distinct from WAR (which is an actual approach). It is possible for the AI to be at war and yet have a different approach, like HOSTILE or even FRIENDLY. In this case, the other approach will be suppressed until the war has ended. If an AI is at war but its approach is not WAR, they are more likely to offer/accept a peace treaty.

DENOUNCING! - Indicates that the AI has denounced you on the current turn.

RECALLED TO LIFE - Indicates that this AI has been resurrected by you on the current turn (after another player killed them).


Approach Biases[]

Each AI civilization leader has a "bias" for each of the seven approaches. The bias ranges from 1 to 10 and is randomized by +/- 2 each game, to add some variety to the leader's personality.

For example, if a leader's FRIENDLY bias is 6, in every new game it will be set to a random value between 4 and 8, inclusive.

After randomization, an approach bias can be greater than 10, but cannot be smaller than 1.

The randomized approach bias is used many times in the approach calculation below. The higher a leader's bias for an approach, the more likely it is to adopt that particular approach.

A list of all leaders' approach biases is provided here for reference.

Civ Leader WAR HOSTILE DECEPTIVE GUARDED AFRAID FRIENDLY NEUTRAL
America Washington 2 2 2 2 2 8 8
Arabia Harun al-Rashid 4 6 6 4 2 6 2
Assyria Ashurbanipal 8 6 2 4 1 4 4
Austria Maria Theresa 2 4 6 6 6 6 2
Aztecs Montezuma 8 8 2 2 2 2 2
Babylon Nebuchadnezzar 2 2 8 8 4 4 6
Brazil Pedro II 2 2 2 2 2 6 8
Byzantium Theodora 1 4 8 8 6 2 8
Carthage Dido 6 2 8 6 4 4 4
Celts Boudicca 8 6 8 8 6 8 8
China Wu Zetian 2 6 8 6 4 6 8
Denmark Harald Bluetooth 10 8 1 6 1 1 5
Egypt Ramesses II 2 2 2 2 2 2 8
England Elizabeth 2 6 8 8 2 2 6
Ethiopia Haile Selassie 4 6 2 8 6 6 6
France Napoleon 6 6 6 4 1 6 1
Germany Bismarck 2 4 6 6 2 6 9
Greece Alexander 8 6 8 2 2 2 2
Huns Attila 9 8 2 3 1 1 1
Inca Pachacuti 2 2 6 7 4 7 4
India Gandhi 1 1 1 8 8 8 1
Indonesia Gajah Mada 6 2 2 6 4 4 4
Iroquois Hiawatha 1 2 8 8 6 8 4
Japan Oda Nobunaga 6 6 7 8 2 3 3
Korea Sejong 1 1 4 8 6 8 8
Maya Pacal 2 2 6 8 6 6 6
Mongolia Genghis Khan 8 8 2 4 1 4 5
Morocco Ahmad al-Mansur 1 1 1 8 6 8 2
Netherlands William 4 4 2 2 5 8 5
Ottomans Suleiman 6 4 4 6 2 6 4
Persia Darius I 4 6 6 8 6 4 4
Poland Casimir III 6 4 4 6 6 4 4
Polynesia Kamehameha 1 1 6 6 6 8 8
Portugal Maria I 2 4 2 6 6 2 8
Rome Augustus Caesar 9 2 2 2 2 2 8
Russia Catherine 2 2 6 4 2 6 6
Shoshone Pocatello 3 5 6 8 6 2 6
Siam Ramkhamhaeng 2 6 7 6 6 4 8
Songhai Askia 8 8 8 8 2 2 2
Spain Isabella 8 6 4 8 6 4 6
Sweden Gustavus Adolphus 7 2 2 4 2 5 5
Venice Enrico Dandolo 3 3 4 8 6 8 6
Zulus Shaka 9 6 4 4 1 1 3

Approach Calculation[]

Each turn, the AI runs this calculation for most players (special cases are covered below).

All seven approaches start with a weight of 0. As the AI takes various factors into consideration, weight is added to or removed from one or more of the approaches. At the end of the process, the approach with the highest score is picked.

Usually, the randomized approach bias is added/removed whenever a condition makes it more or less favorable to have that approach, although there are exceptions to this.

If the approach with the highest score is the WAR approach, the AI will also pick a "War Face" at this stage (the visible approach that will be shown to the player until the AI goes to war or changes its mind).

Important: Approach scores change gradually from turn to turn!

Without further ado, here is the approach calculation, written in plain text for easy understanding.

Note: We/our/my/etc. refers to the AI that is calculating its approach, and this player/them/their/etc. refers to the player (this can be a human or an AI) that the AI is evaluating.

The approach calculation below, written in pseudocode, is accurate as of the 4-7 beta patch version.

[NOTES ON CERTAIN VARIABLES]

DIPLO TYPE
- At game start, each AI civ is assigned a Diplo Type: CONQUEROR, DIPLOMAT, CULTURAL or SCIENTIFIC.
- This is dependent on the leader's randomized flavors (e.g. leaders with high Offense flavors are more likely to pick CONQUEROR). Weight is also added based on the leader's UA.
- Diplo Type affects which victory condition the AI leader will be extra sensitive to for the current game, and is used several times in this approach function.
- AI civs replacing a human player in MP don't have a Diplo Type and thus, don't use this mechanic.

VICTORY COMPETITION
- The player can disable the AI's victory competitiveness in DiploAIOptions.sql by setting DIPLO_AI_NO_VICTORY_COMPETITION to 1.
- This causes the AI not to apply penalties based on the other player's progress towards winning the game.
- Once the game has been won, victory competition is disabled automatically.

ERA
- For the purposes of the approach function, the Era is 0 in the Ancient Era, 1 in the Classical Era, 2 in the Medieval Era, and so on.
- "Our era" means the evaluating AI player's current era.
- "Their era" means the evaluated player's current era.

BACKSTABBER PENALTY

The AI regularly tests players to determine if they are a "backstabber". Backstabbing penalties can occur if you:
- Break a Declaration of Friendship with a player;
- Denounce a player you're friends with;
- Declare war on a player you're friends with;
- Break a promise not to declare war on a player;
- Break a promise not to conquer a player's protected City-State;
- Declare war on one of your vassals.

AIs will ALSO view you as a backstabber if you've captured their original capital or Holy City (unless they're your capitulated vassal), although only their teammates will agree with this view.

Backstabbing a player can result in global penalties, depending on the severity of the backstabbing and the other AIs' relationships with that player.

Backstabbing penalties do not always occur (for instance, the AI will not care if you declare war on someone who backstabbed them).
They will eventually expire after a number of turns, depending on game speed.

If the AI considers you a "backstabber", or considers anyone on your team a "backstabber", it has a number of negative approach changes throughout this function.


//////////////////////////////////////////////////////
What is the best approach to take towards this player?
Run through the following steps in order.
//////////////////////////////////////////////////////


[PART 1: INITIAL WEIGHTS]


All seven approach scores start at 0.


1. Base Personality Weight

Begin by adding 1x our bias for each approach to our score for that approach.


2. Default Neutral Weight

Add our NEUTRAL bias to the NEUTRAL approach.


3. Last Turn Approach Biases

If our approach last turn was WAR and our war goal towards this player last turn was PREPARE (building up) or CONQUEST (destroy them completely), add our WAR bias to the WAR approach.

If our approach last turn was HOSTILE and we were preparing to demand from this player last turn, add our HOSTILE bias to the HOSTILE approach.


4. Domination Victory Bias

If we're not at war with this player, or we are at war and it's a stalemate or better (GetWarState function), and one of the following is true:
- Our Diplo Type is CONQUEROR, or;
- We're going for a Domination Victory.

... then add our WAR bias to the WAR approach.


5. Easy Target
If these conditions are met:
- We consider this player an easy target;
- We're at war with them already OR we're not at war with any major civilizations.

Then they're considered an "easy target" for the rest of this approach calculation.

If they're an easy target:
- Add our WAR bias to the WAR approach.


6. City-State War Quests

For each City-State that has a quest for us to:
- Declare war on this player, or;
- Liberate a city this player owns, or;
- Capture a city this player owns;

Add one to the war quest counter.

Double the war quest counter if our Diplo Type is DIPLOMAT.

If the war quest counter is above 0, then add our WAR bias plus the war quest counter to the WAR approach.


[PART 2: FRIENDSHIP MODS]


7. Declaration of Friendship

If we currently have a Declaration of Friendship with this player:
- Add our FRIENDLY bias to the FRIENDLY approach.
- Set our WAR approach score to 0.
- Set our HOSTILE approach score to 0.


8. Defensive Pact

If we currently have a Defensive Pact with this player:
- Add our FRIENDLY bias to the FRIENDLY approach.
- Set our WAR approach score to 0.
- Set our HOSTILE approach score to 0.


9. Research Agreement

If we currently have a research agreement with this player:
- Add our FRIENDLY bias to the FRIENDLY approach.
- Set our WAR approach score to 0.
- Set our HOSTILE approach score to 0.


10. Coop War History

Check how many times this player refused to go on a coop war with us.
+1 for each time they refused the request
+2 for each time they refused the request by warning the target AI
+2 for each time they broke a promise to start a coop war with us
-1 for each time they accepted the request and we went to war together

Note #1: The memory value tracking this is set to 0 for both players if one of them capitulates to the other.

Note #2: If one player resurrects the other, then the value is set to 0 for both players *if positive* (bad).

If the total is positive:
- Add our DECEPTIVE bias plus the total to the DECEPTIVE approach.

If the total is negative:
- Add our FRIENDLY bias to the FRIENDLY approach.
- Subtract the total from the FRIENDLY approach (since it's negative; the sign is flipped).


11. Coop War Soon

If we promised to start a coop war with this player against at least one third party:
- Multiply our FRIENDLY bias by the number of coop wars we promised to start with this player, and add that to the FRIENDLY approach.
- Set our WAR approach score to 0.
- Set our HOSTILE approach score to 0.

NOTE: Coop war promises between two players are cancelled if a DoF is ended early via the Discuss menu, or the players denounce/go to war with each other.


12. Liberated Cities

If this player has liberated some of our cities, and all of the following conditions are true:
- We don't view this player as a backstabber (see explanation on backstabbing penalties above).
- This player has not captured our original capital.
- This player has not captured our Holy City.

Then:
- Add our FRIENDLY bias plus the number of our cities they've liberated to the FRIENDLY approach.
- Set our WAR approach score to 0.
- Set our HOSTILE approach score to 0.
- Set our DECEPTIVE approach score to 0.


13. Resurrection

If this player resurrected us OR we resurrected them ("You restored their civilization after they were annihilated!"):
- Add our FRIENDLY bias to the FRIENDLY approach.
- Set all other approaches to -1x their approach bias value.

If BOTH of us resurrected each other, then:
- Add our FRIENDLY bias to the FRIENDLY approach again.
- Subtract an additional -1x approach bias value from all other approaches.


[PART 3: PROVOCATIONS]


14. Denouncements

We've currently denounced this player!
- Add our WAR bias to the WAR approach.
- Add our HOSTILE bias to the HOSTILE approach.
- Set our FRIENDLY approach score to 0.

This player has currently denounced us!
- Add our GUARDED bias to the GUARDED approach.
- Set our FRIENDLY approach score to 0.


15. Backstabbers

If we consider this player a backstabber:
- Add our WAR bias to the WAR approach.
- Add our HOSTILE bias to the HOSTILE approach.
- Add our GUARDED bias to the GUARDED approach.
- Set our FRIENDLY approach score to 0.

If this player is untrustworthy *and* personally betrayed us by:
- Denouncing us while we had a Declaration of Friendship, OR
- Declaring war on us while we had a Declaration of Friendship, OR
- Broke a military promise not to declare war on us, OR
- Broke a promise not to conquer our protected City-State, OR
- Declared war on us while we were their vassal...

Then, apply extra penalties:
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.
- Add 2x our GUARDED bias to the GUARDED approach.


16. Captured Our Major Cities

Skip this check if we're this player's capitulated vassal.

If this player currently owns our original capital:
- Add 2x our WAR bias to the WAR approach.
- Add 2xour HOSTILE bias to the HOSTILE approach.
- Add 2x our GUARDED bias to the GUARDED approach.

If this player currently owns our Holy City:
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.
- Add 2x our GUARDED bias to the GUARDED approach.

If this player is an easy target:
- And they currently own our original capital, add 100 to the WAR approach.
- And they currently own our Holy City, add 5x our WAR bias to the WAR approach.

*NOTE:* Using an Inquisitor on the Holy City to remove its Holy City status will clear the associated penalties.


17. Stolen Territory

If this player has stolen our territory *DURING PEACETIME* with a Great General or America's UA:
- Add our WAR bias plus the number of thefts to the WAR approach.
- Add our HOSTILE bias plus the number of thefts to the HOSTILE approach.

  If they're an easy target:
  - Add 2x our WAR bias to the WAR approach.

NOTE: The number of thefts is reset to 0 for both players when war is declared between them.
Stealing territory while at war does not accrue diplomatic penalties.


18. Attacks on Protected City-States

If this player killed one of our protected City-States within the past 50 turns:
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.
- Set our FRIENDLY approach score to 0.

If they haven't killed any recently, but they *have* attacked one of our protected City-States within the past 30 turns:

  If they have EVER killed one of our protected City-States:
  - Add our WAR bias to the WAR approach.
  - Add our HOSTILE bias to the HOSTILE approach.
  - Set our FRIENDLY approach score to 0.

  Otherwise:
  - Add our HOSTILE bias to the HOSTILE approach.
  - Add our GUARDED bias to the GUARDED approach.


19. Captured Cities

Skip this check if their proximity from us is FAR or DISTANT.

Otherwise, count how many cities we've captured from them, and how many they've captured from us.
Subtract our conquests from their conquests to get the "difference of cities".

NOTE: The captured city count is reset for both players if either player resurrects the other.

If we've captured more cities from them than they've captured from us, check their military strength:

  If they're an easy target:
  - Add our WAR bias plus 2x the difference of cities to the WAR approach.
  - Add our HOSTILE bias plus 2x the difference of cities to the HOSTILE approach.

  Otherwise, if their military strength compared to us is AVERAGE or weaker:
  - Add our WAR bias plus the difference of cities to the WAR approach.
  - Add our HOSTILE bias plus the difference of cities to the HOSTILE approach.

  Otherwise, if they're not our capitulated vassal, expect revenge:
  - Add our GUARDED bias plus the difference of cities to the GUARDED approach.

If they've captured more cities from them than we've captured from them, check their military strength:

  Skip this check if we're their vassal, UNLESS they have previously declared war on one of their own vassals.

  Multiply the difference of cities by -1 (flip the sign).

  If they're an easy target:
  - Add our WAR bias plus 2x the difference of cities to the WAR approach.
  - Add our HOSTILE bias plus 2x the difference of cities to the HOSTILE approach.

  Otherwise, if their military strength compared to us is below AVERAGE:
  - Add our WAR bias plus the difference of cities to the WAR approach.
  - Add our HOSTILE bias plus the difference of cities to the HOSTILE approach.

  Otherwise:
  - Subtract our WAR bias plus the difference of cities from the WAR approach.
  - Subtract our HOSTILE bias plus the difference of cities from the HOSTILE approach.
  - Add our GUARDED bias plus the difference of cities to the GUARDED approach.


[PART 4: KEY PLAYERS]

20. Biggest and Major Competitors

If this player is our biggest competitor (> 18 competitor weight, highest competitor weight of all major civs):
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.

  If they're also an easy target:
  - Add 2x our WAR bias to the WAR approach.

Otherwise, if this player is a major competitor of ours (IsMajorCompetitor function):
- Add our WAR bias to the WAR approach.
- Add our DECEPTIVE bias to the DECEPTIVE approach.

  If they're also an easy target:
  - Add our WAR bias to the WAR approach.

Otherwise, they're NOT a major competitor, so:
- Add our FRIENDLY bias to the FRIENDLY approach.
- Add our NEUTRAL bias to the NEUTRAL approach.


21. Most Valuable DoF

If this player is our most valuable DoF (> 32 DoF weight, and more than all other civs), then:
- Add 2x our FRIENDLY bias to the FRIENDLY approach.

Otherwise, if this player is our most valuable DoF *EXCLUDING OUR CURRENT FRIENDS*:
- Add our FRIENDLY bias to the FRIENDLY approach.


22. Most Valuable DP

Skip this check if we do not have shared embassies, or Defensive Pact trading with this team is not allowed.

If this player is our most valuable DP (> 18 DP weight, and more than all other civs), then:
- Add 2x our FRIENDLY bias to the FRIENDLY approach.

Otherwise, if this player is our most valuable DP *EXCLUDING OUR CURRENT DPs*:
- Add our FRIENDLY bias to the FRIENDLY approach.


23. Relations to Other Key Players

Loop through all other valid major civs (not on our team, not on their team, not unmet, not dead, > 0 cities).

If they're at war with the other player:

  If the other player is our biggest competitor:
  - Add our FRIENDLY bias to the FRIENDLY approach.

  Otherwise, if the other player is our most valuable DoF:
  - Add our WAR bias to the WAR approach.
  - Add our HOSTILE bias to the HOSTILE approach.

  Otherwise, if the other player is our most valuable DP (and we have shared embassies with that player, and Defensive Pact trading with them is allowed):
  - Add our WAR bias to the WAR approach.
  - Add our HOSTILE bias to the HOSTILE approach.

Otherwise, if they have a Defensive Pact with the other player, and the other player's military strength compared to us is AVERAGE or stronger:
- Add our DECEPTIVE bias to the DECEPTIVE approach.
- Subtract our WAR bias from the WAR approach.
- Subtract our HOSTILE bias from the HOSTILE approach.


[PART 5: EVALUATIONS]


24. Military Threat

What is this player's military threat level? (GetMilitaryThreat function)

CRITICAL
- Add 2x our AFRAID bias to the AFRAID approach.

SEVERE
- Add our AFRAID bias to the AFRAID approach.
- Add our GUARDED bias to the GUARDED approach.

MAJOR
- Add our GUARDED bias to the GUARDED approach.
- Add our DECEPTIVE bias to the DECEPTIVE approach.

MINOR
- Add our NEUTRAL bias to the NEUTRAL approach.
- Add our DECEPTIVE bias to the DECEPTIVE approach.

NONE
- Add our FRIENDLY bias to the FRIENDLY approach.


25. Warmonger Threat

What is this player's warmonger threat level? (GetWarmongerThreat function)

CRITICAL
- Add our WAR bias to the WAR approach.
- Add our AFRAID bias to the AFRAID approach.
- Add our HOSTILE bias to the HOSTILE approach.

SEVERE
- Add our WAR bias to the WAR approach.
- Add our GUARDED bias to the GUARDED approach.
- Add our HOSTILE bias to the HOSTILE approach.

MAJOR
- Add our GUARDED bias to the GUARDED approach.
- Add our DECEPTIVE bias to the DECEPTIVE approach.

MINOR
- Add our NEUTRAL bias to the NEUTRAL approach.
- Add our DECEPTIVE bias to the DECEPTIVE approach.

NONE
- Add our FRIENDLY bias to the FRIENDLY approach.


26. Military Strength Compared To Us

What is this player's military strength compared to us? (GetPlayerMilitaryStrengthComparedToUs function)

IMMENSE
- Add 4x our AFRAID bias to the AFRAID approach.
- Subtract 3x our WAR bias from the WAR approach.
- Subtract 3x our HOSTILE bias from the HOSTILE approach.

POWERFUL
- Add our FRIENDLY bias to the FRIENDLY approach.
- Add our GUARDED bias to the GUARDED approach.
- Add 2x our AFRAID bias to the AFRAID approach.
- Subtract 2x our WAR bias from the WAR approach.
- Subtract 2x our HOSTILE bias from the HOSTILE approach.

STRONG
- Add our NEUTRAL bias to the NEUTRAL approach.
- Add our FRIENDLY bias to the FRIENDLY approach.
- Subtract our WAR bias from the WAR approach.
- Subtract our HOSTILE bias from the HOSTILE approach.

AVERAGE
- Add our NEUTRAL bias to the NEUTRAL approach.
- Add our FRIENDLY bias to the FRIENDLY approach.

POOR
- Add our DECEPTIVE bias to the DECEPTIVE approach.
- Add our NEUTRAL bias to the NEUTRAL approach.
- Subtract our AFRAID bias from the AFRAID approach.
- Subtract our GUARDED bias from the GUARDED approach.

WEAK
- Add our WAR bias to the WAR approach.
- Add our HOSTILE bias to the HOSTILE approach.
- Subtract 2x our AFRAID bias from the AFRAID approach.
- Subtract 2x our GUARDED bias from the GUARDED approach.

PATHETIC
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.
- Subtract 3x our AFRAID bias from the AFRAID approach.
- Subtract 3x our GUARDED bias from the GUARDED approach.


27. Economic Strength Compared To Us

What is this player's economic strength compared to us? (GetPlayerEconomicStrengthComparedToUs function)

IMMENSE
- Add 4x our AFRAID bias to the AFRAID approach.
- Subtract 3x our WAR bias from the WAR approach.
- Subtract 3x our HOSTILE bias from the HOSTILE approach.

POWERFUL
- Add our FRIENDLY bias to the FRIENDLY approach.
- Add our GUARDED bias to the GUARDED approach.
- Add 2x our AFRAID bias to the AFRAID approach.
- Subtract 2x our WAR bias from the WAR approach.
- Subtract 2x our HOSTILE bias from the HOSTILE approach.

STRONG
- Add our NEUTRAL bias to the NEUTRAL approach.
- Add our FRIENDLY bias to the FRIENDLY approach.
- Subtract our WAR bias from the WAR approach.
- Subtract our HOSTILE bias from the HOSTILE approach.

AVERAGE
- Add our NEUTRAL bias to the NEUTRAL approach.
- Add our FRIENDLY bias to the FRIENDLY approach.

POOR
- Add our DECEPTIVE bias to the DECEPTIVE approach.
- Add our NEUTRAL bias to the NEUTRAL approach.
- Subtract our AFRAID bias from the AFRAID approach.
- Subtract our GUARDED bias from the GUARDED approach.

WEAK
- Add our WAR bias to the WAR approach.
- Add our HOSTILE bias to the HOSTILE approach.
- Subtract 2x our AFRAID bias from the AFRAID approach.
- Subtract 2x our GUARDED bias from the GUARDED approach.

PATHETIC
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.
- Subtract 3x our AFRAID bias from the AFRAID approach.
- Subtract 3x our GUARDED bias from the GUARDED approach.


28. DoF Level

What is our DoF Level with this player? (GetDoFType function)

DoF Level starts at NEW and is set to UNTRUSTWORTHY if a DoF is broken, or there is a denouncement/DoW in either direction.

Every time a DoF is signed, DoF Level advances as follows based on the old level:
UNTRUSTWORTHY or NEW -> FRIENDS
FRIENDS -> ALLIES
ALLIES -> BATTLE BROTHERS (highest level)

If DoF Level is...

UNTRUSTWORTHY
- Add our WAR bias plus our Era to the WAR approach.
- Add our GUARDED bias plus our Era to the GUARDED approach.
- Add our HOSTILE bias plus our Era to the HOSTILE approach.

NEW
- Add our NEUTRAL bias plus our Era to the NEUTRAL approach.
- Add our FRIENDLY bias plus our Era to the FRIENDLY approach.

FRIENDS
- Add our FRIENDLY bias plus our Era to the FRIENDLY approach.
- Subtract our DECEPTIVE bias plus our Era from the DECEPTIVE approach.

ALLIES
- Add our FRIENDLY bias plus 2x our Era to the FRIENDLY approach.
- Subtract our DECEPTIVE bias plus 2x our Era from the DECEPTIVE approach.

BATTLE BROTHERS
- Add our FRIENDLY bias plus 3x our Era to the FRIENDLY approach.
- Subtract our DECEPTIVE bias plus 3x our Era from the DECEPTIVE approach.


29. Victory Dispute Level

How competitive are we over the same victory condition? (GetVictoryDisputeLevel function)

Skip this check if the game turn is 150 or less, or victory competition is disabled.

(NOTE: Vassals do not compete for victory.)

FIERCE COMPETITION
Opinion Indicator: "They know you are competing with them, and they hate it!"
- Add our GUARDED bias plus their era to the GUARDED approach.
- Add our HOSTILE bias plus their era to the HOSTILE approach.
- Add our WAR bias plus their era to the WAR approach.

STRONG COMPETITION
Opinion Indicator: "They suspect you are competing with them."
- Add our DECEPTIVE bias plus their era to the DECEPTIVE approach.
- Add our GUARDED bias plus their era to the GUARDED approach.
- Add our WAR bias plus their era to the WAR approach.

WEAK COMPETITION
Opinion Indicator: "They fear you are competing with them."
- Add our NEUTRAL bias plus their era to the NEUTRAL approach.
- Add our DECEPTIVE bias plus their era to the DECEPTIVE approach.

NO COMPETITION
- Add our FRIENDLY bias plus their era to the FRIENDLY approach.
- Add our NEUTRAL bias plus their era to the NEUTRAL approach.


30. Victory Block Level

How much do we want to stop this player from winning? (GetVictoryBlockLevel function; the farther you are in the lead, the more they hate you)

Skip this check if the game turn is 150 or less, or victory competition is disabled.

(NOTE: Vassals do not compete for victory.)

(NOTE #2: If Opinion of this major civ is FRIEND or ALLY, no victory block penalties are applied.)

FIERCE DESIRE
Opinion Indicator: "Your behavior infuriates them."
- Add our GUARDED bias plus their era to the GUARDED approach.
- Add our HOSTILE bias plus their era to the HOSTILE approach.
- Add our WAR bias plus their era to the WAR approach.

STRONG DESIRE
Opinion Indicator: "Your behavior angers them."
- Add our DECEPTIVE bias plus their era to the DECEPTIVE approach.
- Add our GUARDED bias plus their era to the GUARDED approach.
- Add our WAR bias plus their era to the WAR approach.

WEAK DESIRE
Opinion Indicator: "Your behavior worries them."
- Add our NEUTRAL bias plus their era to the NEUTRAL approach.
- Add our DECEPTIVE bias plus their era to the DECEPTIVE approach.

NO DESIRE
- Add our FRIENDLY bias plus their era to the FRIENDLY approach.
- Add our NEUTRAL bias plus their era to the NEUTRAL approach.


31. Land Dispute Level

How much do we covet their lands? (GetLandDisputeLevel function)

MULTIPLIER begins at 1.
BONUS begins set to true. (territorial disputes are always important!)
VICTORY CONCERN begins set to false.

If our Diplo Type is CONQUEROR or our UA grants war bonuses:
- Increase MULTIPLIER by 1.

If our era is Ancient or Classical:
- Increase MULTIPLIER by 1.

If our era is Medieval+ and we're going for a Domination Victory:
- Increase MULTIPLIER by 1.
- Set VICTORY CONCERN to true.

If we're close to a Domination Victory:
- Increase MULTIPLIER by 1.
- Set VICTORY CONCERN to true.

If the other player is a reckless expander:
- Increase MULTIPLIER by 1.
- Set BONUS to false.

If victory competition is enabled, add the number of vassals and the number of capitals the other player possesses together.

  If the sum of these is greater than 2 OR they're close to a Domination Victory:
  - Increase MULTIPLIER by 1.
  - Set BONUS to false.

- Land Dispute Check -

Opinion Indicator if WEAK or above: "Territorial disputes strain your relationship."
Opinion Indicator if NONE: "You have no contested borders."

NO DISPUTE
(Only apply a bonus here if BONUS is set to true.)
- Multiply our FRIENDLY bias by the MULTIPLIER, and add that to the FRIENDLY approach.
- Multiply our NEUTRAL bias by the MULTIPLIER, and add that to the NEUTRAL approach.

WEAK DISPUTE
- If Victory Concern is true OR our Diplo Type is CONQUEROR OR our UA grants war bonuses, multiply our WAR bias by the MULTIPLIER, and add that to the WAR approach.
- Multiply our GUARDED bias by the MULTIPLIER, and add that to the GUARDED approach.
- Multiply our DECEPTIVE bias by the MULTIPLIER, and add that to the DECEPTIVE approach.

STRONG DISPUTE
- Multiply our WAR bias by the MULTIPLIER, and add that to the WAR approach.
- Multiply our GUARDED bias by the MULTIPLIER, and add that to the GUARDED approach.
- Multiply our HOSTILE bias by the MULTIPLIER, and add that to the HOSTILE approach.

FIERCE DISPUTE
- If Victory Concern is true, double the multiplier. If false, but our Diplo Type is CONQUEROR OR our UA grants war bonuses, increase multiplier by 1.
- Multiply our WAR bias by the multiplier, and add that to the WAR approach.
- Multiply our HOSTILE bias by the multiplier, and add that to the HOSTILE approach.



32. City-State Dispute Level

How much are we competing with this player for the favor of the same City-States? (GetMinorCivDisputeLevel function)

NOTE: This check is only calculated if the AI has met at least one City-State who is still alive. 
If there are no living City-States in the game, or they haven't met any, no bonus or penalty will be added for this.

MULTIPLIER begins at 1.
BONUS begins set to false.
VICTORY CONCERN begins set to false.

If our Diplo Type is DIPLOMAT or our UA grants diplomacy bonuses:
- Increase MULTIPLIER by 1.
- Set BONUS to true.

If our era is Renaissance+ and we're going for a Diplomatic Victory:
- Increase MULTIPLIER by 1.
- Set BONUS to true.
- Set VICTORY CONCERN to true.

If we're close to a Diplomatic Victory:
- Increase MULTIPLIER by 1.
- Set BONUS to true.
- Set VICTORY CONCERN to true.

If they're close to a Diplomatic Victory and victory competition is enabled:
- Increase MULTIPLIER by 1.
- Set BONUS to false.
- Set VICTORY CONCERN to true.

If they have a diplomatic penalty for performing a City-State coup against us:
- Increase MULTIPLIER by 1.
- Set BONUS to false.

If they've recently attacked (30 turns) or killed (50 turns) our protected City-States, or broke/ignored a promise not to conquer our protected City-State:
- Increase MULTIPLIER by 1.
- Set BONUS to false.

- City-State Dispute Check -

Opinion Indicator if WEAK or above: "You are competing for the favor of the same City-States!"
Opinion Indicator if NONE: "You are not competing for the favor of the same City-States." (only if Diplo Type is DIPLOMAT and no City-State coup penalty)

NO DISPUTE
(Only apply a bonus here if BONUS is set to true.)
- Multiply our FRIENDLY bias by the MULTIPLIER, and add that to the FRIENDLY approach.
- Multiply our NEUTRAL bias by the MULTIPLIER, and add that to the NEUTRAL approach.

WEAK DISPUTE
- If Victory Concern is true OR our Diplo Type is DIPLOMAT OR our UA grants diplomacy bonuses, multiply our WAR bias by the MULTIPLIER, and add that to the WAR approach.
- Multiply our GUARDED bias by the MULTIPLIER, and add that to the GUARDED approach.
- Multiply our DECEPTIVE bias by the MULTIPLIER, and add that to the DECEPTIVE approach.

STRONG DISPUTE
- Multiply our WAR bias by the MULTIPLIER, and add that to the WAR approach.
- Multiply our GUARDED bias by the MULTIPLIER, and add that to the GUARDED approach.
- Multiply our HOSTILE bias by the MULTIPLIER, and add that to the HOSTILE approach.

FIERCE DISPUTE
- If Victory Concern is true, double the multiplier. If false, but our Diplo Type is DIPLOMAT OR our UA grants diplomacy bonuses, increase multiplier by 1.
- Multiply our WAR bias by the multiplier, and add that to the WAR approach.
- Multiply our HOSTILE bias by the multiplier, and add that to the HOSTILE approach.



33. Wonder Dispute Level

How much are we competing with this player for World Wonders? (GetWonderDisputeLevel function)

MULTIPLIER begins at 1.
BONUS begins set to false.
VICTORY CONCERN begins set to false.

If our Diplo Type is CULTURAL or our UA grants cultural bonuses:
- Increase MULTIPLIER by 1.
- Set BONUS to true.

If our era is Renaissance+ and we're going for a Culture Victory:
- Increase MULTIPLIER by 1.
- Set BONUS to true.
- Set VICTORY CONCERN to true.

If we're close to a Culture Victory:
- Increase MULTIPLIER by 1.
- Set BONUS to true.
- Set VICTORY CONCERN to true.

If they're close to a Culture Victory and victory competition is enabled:
- Increase MULTIPLIER by 1.
- Set BONUS to false.
- Set VICTORY CONCERN to true.

If their Influence Level over us is INFLUENTIAL or DOMINANT:
- Increase MULTIPLIER by 1.
- Set BONUS to false.

If their Influence Level over us is POPULAR and their Influence Trend is RISING:
- Increase MULTIPLIER by 1.
- Set BONUS to false.

If this player is a wonder spammer:
- Increase MULTIPLIER by 1.
- Set BONUS to false.

- Wonder Dispute Check -

Opinion Indicator if WEAK or above: "You are competing for World Wonders."
Opinion Indicator if NONE: "You are not competing for World Wonders." (only if Diplo Type is CULTURAL and no wonder spammer penalty)

NO DISPUTE
(Only apply a bonus here if BONUS is set to true.)
- Multiply our FRIENDLY bias by the MULTIPLIER, and add that to the FRIENDLY approach.
- Multiply our NEUTRAL bias by the MULTIPLIER, and add that to the NEUTRAL approach.

WEAK DISPUTE
- If Victory Concern is true OR our Diplo Type is CULTURAL OR our UA grants cultural bonuses, multiply our WAR bias by the MULTIPLIER, and add that to the WAR approach.
- Multiply our GUARDED bias by the MULTIPLIER, and add that to the GUARDED approach.
- Multiply our DECEPTIVE bias by the MULTIPLIER, and add that to the DECEPTIVE approach.

STRONG DISPUTE
- Multiply our WAR bias by the MULTIPLIER, and add that to the WAR approach.
- Multiply our GUARDED bias by the MULTIPLIER, and add that to the GUARDED approach.
- Multiply our HOSTILE bias by the MULTIPLIER, and add that to the HOSTILE approach.

FIERCE DISPUTE
- If Victory Concern is true, double the multiplier. If false, but our Diplo Type is CULTURAL OR our UA grants cultural bonuses, increase multiplier by 1.
- Multiply our WAR bias by the multiplier, and add that to the WAR approach.
- Multiply our HOSTILE bias by the multiplier, and add that to the HOSTILE approach.



34. Tech Competition Level

How far ahead or behind are they in technology? (GetTechDisputeLevel function)

MULTIPLIER begins at 1.
BONUS begins set to false.
VICTORY CONCERN begins set to false.

If our Diplo Type is SCIENTIFIC or our UA grants scientific bonuses:
- Increase MULTIPLIER by 1.
- Set BONUS to true.

If our era is Renaissance+ and we're going for a Science Victory:
- Increase MULTIPLIER by 1.
- Set BONUS to true.
- Set VICTORY CONCERN to true.

If we're close to a Science Victory:
- Increase MULTIPLIER by 1.
- Set BONUS to true.
- Set VICTORY CONCERN to true.

If they're close to a Science Victory and victory competition is enabled:
- Increase MULTIPLIER by 1.
- Set BONUS to false.
- Set VICTORY CONCERN to true.

If they have a diplomatic penalty for spying on us (a broken/ignored promise counts for this):
- Increase MULTIPLIER by 1.
- Set BONUS to false.

- Tech Competition Check -

Opinion Indicator if WEAK or above: "You are competing for technological advancement." (only if Diplo Type is SCIENTIFIC)
Opinion Indicator if NONE: "You are not competing for technological advancement." (only if Diplo Type is SCIENTIFIC)

NO DISPUTE (0 or less techs ahead)
(Only apply a bonus here if BONUS is set to true.)
- Multiply our FRIENDLY bias by the MULTIPLIER, and add that to the FRIENDLY approach.
- Multiply our NEUTRAL bias by the MULTIPLIER, and add that to the NEUTRAL approach.

WEAK DISPUTE (1 or 2 techs ahead)
- If Victory Concern is true OR our Diplo Type is SCIENTIFIC OR our UA grants scientific bonuses, multiply our WAR bias by the MULTIPLIER, and add that to the WAR approach.
- Multiply our GUARDED bias by the MULTIPLIER, and add that to the GUARDED approach.
- Multiply our DECEPTIVE bias by the MULTIPLIER, and add that to the DECEPTIVE approach.

STRONG DISPUTE (3 or 4 techs ahead)
- Multiply our WAR bias by the MULTIPLIER, and add that to the WAR approach.
- Multiply our GUARDED bias by the MULTIPLIER, and add that to the GUARDED approach.
- Multiply our HOSTILE bias by the MULTIPLIER, and add that to the HOSTILE approach.

FIERCE DISPUTE (5 or more techs ahead, or has built spaceship parts)
- If Victory Concern is true, double the multiplier. If false, but our Diplo Type is SCIENTIFIC OR our UA grants scientific bonuses, increase multiplier by 1.
- Multiply our WAR bias by the multiplier, and add that to the WAR approach.
- Multiply our HOSTILE bias by the multiplier, and add that to the HOSTILE approach.



35. War Projection

How well do we a think a war against this player would go? (GetWarProjection function)
Estimated consequences of the war for us:

VERY GOOD
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.

GOOD
- Add our DECEPTIVE bias to the DECEPTIVE approach.
- Add our WAR bias to the WAR approach.

STALEMATE or UNKNOWN
- Add our NEUTRAL bias to the NEUTRAL approach.

DEFEAT
- Add our AFRAID bias to the AFRAID approach.
- Add our GUARDED bias to the GUARDED approach.

DESTRUCTION
- Add 2x our AFRAID bias to the AFRAID approach.
- Add our FRIENDLY bias to the FRIENDLY approach.


36. Target Value

Our assessment of this player's value as a military target (based on overall strength estimate) (GetPlayerTargetValue function)

SOFT
- Add 2x our HOSTILE bias to the HOSTILE approach.
- Add 2x our WAR bias to the WAR approach.

FAVORABLE
- Add our DECEPTIVE bias to the DECEPTIVE approach.
- Add our WAR bias to the WAR approach.

AVERAGE
- Add our NEUTRAL bias to the NEUTRAL approach.
- Add our DECEPTIVE bias to the DECEPTIVE approach.

BAD
- Add our FRIENDLY bias to the FRIENDLY approach.
- Add our NEUTRAL bias to the NEUTRAL approach.

IMPOSSIBLE
- Add our FRIENDLY bias to the FRIENDLY approach.


37. Military Aggressive Posture

How much threat is posed by their military deployment near our borders? (GetMilitaryAggressivePosture function)

*Note:* Aggressive posture is NONE if they've given you Open Borders, you resurrected them, or you have a Declaration of Friendship or Defensive Pact with them.

HIGH or INCREDIBLE
Opinion Indicator: "Your military deployment is extremely threatening."
- Add our HOSTILE bias to the HOSTILE approach.
- Add our WAR bias to the WAR approach.

MEDIUM
Opinion Indicator: "Your military deployment is threatening."
- Add our GUARDED bias to the GUARDED approach.
- Add our DECEPTIVE bias to the DECEPTIVE approach.

LOW
Opinion Indicator: "Your military deployment is threatening."
- Add our NEUTRAL bias to the NEUTRAL approach.

NONE
- Add our FRIENDLY bias to the FRIENDLY approach.


38. Vassalage

38A. They're a Master
If the player we're looking at has vassals:

  For each of their vassals:
  - Get our approach towards them (from the previous time it was updated), and add 1x that approach's bias to that approach's score.
  - EXCEPTION: "Special case" players are always updated before normal players, so their new approaches from this turn's update are used here.


38B. They're Someone Else's Vassal
If the player we're looking at has a master that isn't us:

  If we have the same master as them, add 2x our FRIENDLY bias to the FRIENDLY approach.

  Otherwise, for each player on their master's team:
  - Get our approach towards them (from the previous time it was updated), and add 1x that approach's bias to that approach's score.
  - EXCEPTION: "Special case" players are always updated before normal players, so their new approaches from this turn's update are used here.


38C. They're Our Master

If they're our master, then what do we think about how they've treated us?
Tip: You can view what a vassal thinks of their treatment, and why, in the Vassalage Overview.

If we are a voluntary rather than a capitulated vassal:
- Add 2x our FRIENDLY bias to the FRIENDLY approach.

If they have previously declared war on one of their own vassals:
- Add 5x our GUARDED bias to the GUARDED approach.

CONTENT
Add 5x our FRIENDLY bias to the FRIENDLY approach.
Add 2x our NEUTRAL bias to the NEUTRAL approach.
Subtract 5x our HOSTILE bias from the HOSTILE approach.
Subtract 5x our GUARDED bias from the GUARDED approach.

DISAGREE
Add 2x our FRIENDLY bias to the FRIENDLY approach.
Add 5x our NEUTRAL bias to the NEUTRAL approach.
Add 2x our HOSTILE bias to the HOSTILE approach.
Add 2x our GUARDED bias to the GUARDED approach.

MISTREATED
Add 2x our NEUTRAL bias to the NEUTRAL approach.
Add 5x our HOSTILE bias to the HOSTILE approach.
Add 5x our GUARDED bias to the GUARDED approach.

UNHAPPY
Subtract 2x our FRIENDLY bias from the FRIENDLY approach.
Subtract 2x our NEUTRAL bias from the NEUTRAL approach.
Add 5x our HOSTILE bias to the HOSTILE approach.
Add 5x our GUARDED bias to the GUARDED approach.

ENSLAVED
Subtract 5x our FRIENDLY bias from the FRIENDLY approach.
Subtract 5x our NEUTRAL bias from the NEUTRAL approach.
Add 10x our HOSTILE bias to the HOSTILE approach.
Add 10x our GUARDED bias to the GUARDED approach.


38D. Special Modifiers

We were their vassal and they refused to give us our independence when we asked:
- Add 4x our WAR bias to the WAR approach.
- Subtract 10x our DECEPTIVE bias from the DECEPTIVE approach.
- Subtract 10x our FRIENDLY bias from the FRIENDLY approach.

We were their vassal and they gave us our independence when we asked:
- Subtract 4x our WAR bias from the WAR approach.
- Add 2x our DECEPTIVE bias to the DECEPTIVE approach.
- Add 5x our FRIENDLY bias to the FRIENDLY approach.


[PART 6: STRATEGIC DIPLOMACY]


39. Social Policies

If we have similar Social Policies (visible in the Opinion table) and they're not a backstabber:
- Subtract our WAR bias from the WAR approach.
- Subtract our HOSTILE bias from the HOSTILE approach.
- Subtract our GUARDED bias from the GUARDED approach.

If we have divergent Social Policies (visible in the Opinion table):

  If their military strength compared to us is below AVERAGE:
  - Add our WAR bias to the WAR approach.
  - Add our HOSTILE bias to the HOSTILE approach.

  Otherwise:
  - Add our GUARDED bias to the GUARDED approach.


40. Religion

Skip this check if both of us don't have a majority religion yet (pantheons don't count).

The Diplo Emphasis for Religion (henceforth called "ReligionEmphasis") depends on GAME (i.e. average) era.
Ancient Era = 2
Classical Era = 4
Medieval Era = 6
Renaissance Era = 5
Industrial Era = 4
Modern Era = 3
Atomic Era = 2
Information Era = 1

If they've been converting our cities (unless they promised to stop, and kept the promise).
- Add our WAR bias plus ReligionEmphasis to the WAR approach.
- Add our HOSTILE bias plus ReligionEmphasis to the HOSTILE approach.

If we have the same religion, they're not a backstabber, and they didn't capture our Holy City:
- Add our FRIENDLY bias plus ReligionEmphasis to the FRIENDLY approach, and:
  
  If it's the World Religion and either of us is its founder or Holy City controller, then:
  - Add our FRIENDLY bias plus ReligionEmphasis to the FRIENDLY approach.

If we have different religions:
- Add our WAR bias plus ReligionEmphasis to the WAR approach.
- Add our DECEPTIVE bias plus ReligionEmphasis to the DECEPTIVE approach.
- Add our GUARDED bias plus ReligionEmphasis to the GUARDED approach.

  If their religion is also the World Religion and they're its founder or Holy City controller, then:
  - Add our WAR bias plus ReligionEmphasis to the WAR approach.
  - Add our HOSTILE bias plus ReligionEmphasis to the HOSTILE approach.
  - Add our GUARDED bias plus ReligionEmphasis to the GUARDED approach.


41. Ideology

The Diplo Emphasis for Ideology (henceforth called "IdeologyEmphasis") depends on GAME (i.e. average) era.

Industrial or earlier = 7
Modern = 9
Atomic = 10
Information = 8

If we have the same ideology and they're not a backstabber (having no ideology does not count):
- Add our FRIENDLY bias plus IdeologyEmphasis to the FRIENDLY approach.
- Subtract our WAR bias plus IdeologyEmphasis from the WAR approach.
- Subtract our HOSTILE bias plus IdeologyEmphasis from the HOSTILE approach.
- Subtract our GUARDED bias plus IdeologyEmphasis from the GUARDED approach.

If we have opposing ideologies (having no ideology does not count):
- Subtract our FRIENDLY bias plus IdeologyEmphasis from the FRIENDLY approach.
- Add our WAR bias plus IdeologyEmphasis to the WAR approach.
- Add our HOSTILE bias plus IdeologyEmphasis to the HOSTILE approach.
- Add our GUARDED bias plus IdeologyEmphasis to the GUARDED approach.


42. Global Politics - Good Alliances

Skip this check if they're a backstabber.

Loop through all other valid major civs (not on our team, not on their team, not unmet, not dead, > 0 cities).

NOTE: If we're at war with a player, we have denounced them, or they're a backstabber, then they're an enemy for the purposes of this check.

For each enemy of ours that they're at war with:
- Add 2x our NEUTRAL bias to the NEUTRAL approach.
- If we don't have opposing religions and the enemy does have a religion that opposes ours, then add ReligionEmphasis to the FRIENDLY approach.
- If we don't have opposing ideologies and the enemy does have an ideology that opposes ours, then add IdeologyEmphasis to the FRIENDLY approach.

For each enemy of ours that they've denounced:
- Add our FRIENDLY bias to the FRIENDLY approach.
- Add our NEUTRAL bias to the NEUTRAL approach.
- If we have the same religion and the enemy has an opposing religion, then add ReligionEmphasis to the FRIENDLY approach.
- If we have the same ideology and the enemy has an opposing ideology, then add IdeologyEmphasis to the FRIENDLY approach.

For each non-enemy of ours:
  If both of us have made a Declaration of Friendship with the non-enemy:
  - Add 2x our FRIENDLY bias to the FRIENDLY approach.
  - Subtract our WAR bias from the WAR approach.
  - Subtract our HOSTILE bias from the HOSTILE approach.
  - Subtract our GUARDED bias from the HOSTILE approach.
  
    If all three of us have the same religion:
	- Add ReligionEmphasis to the FRIENDLY approach.

    If all three of us have the same ideology:
	- Add IdeologyEmphasis to the FRIENDLY approach.

  If both of us have made a Defensive Pact with the non-enemy:
  - Add our FRIENDLY bias to the FRIENDLY approach.
  - Subtract our WAR bias from the WAR approach.
  - Subtract our HOSTILE bias from the HOSTILE approach.
  - Subtract our GUARDED bias from the HOSTILE approach.
  
    If all three of us have the same religion:
	- Add ReligionEmphasis to the FRIENDLY approach.

    If all three of us have the same ideology:
	- Add IdeologyEmphasis to the FRIENDLY approach.


43. Global Politics - Bad Alliances

Loop through all other valid major civs (not on our team, not on their team, not unmet, not dead, > 0 cities).

NOTE: If we're at war with a player, we have denounced them, or they're a backstabber, then they're an enemy for the purposes of this check.

For each enemy of ours:
  If this player has made a Declaration of Friendship with the enemy:
  - Add our HOSTILE bias to the HOSTILE approach.
  - Add our GUARDED bias to the GUARDED approach.
  - Subtract our FRIENDLY bias from the FRIENDLY approach.
  - Subtract 2x our NEUTRAL bias from the NEUTRAL approach.

    If they both have the same majority religion, and that religion opposes ours:
    - Add ReligionEmphasis to the WAR approach.
    - Add ReligionEmphasis to the HOSTILE approach.

    If they both have the same ideology, and that ideology opposes ours:
	- Add IdeologyEmphasis to the WAR approach.
	- Add IdeologyEmphasis to the HOSTILE approach.

  If this player has made a Defensive Pact with the enemy:
  - Add our HOSTILE bias to the HOSTILE approach.
  - Add our GUARDED bias to the GUARDED approach.
  - Subtract our FRIENDLY bias from the FRIENDLY approach.
  - Subtract 2x our NEUTRAL bias from the NEUTRAL approach.

    If they both have the same majority religion, and that religion opposes ours:
    - Add ReligionEmphasis to the WAR approach.
    - Add ReligionEmphasis to the HOSTILE approach.

    If they both have the same ideology, and that ideology opposes ours:
	- Add IdeologyEmphasis to the WAR approach.
	- Add IdeologyEmphasis to the HOSTILE approach. 

For each friend (DoF Accepted) of ours:
  If this player is at war with the friend:
  - Add our WAR bias to the WAR approach.
  - Add our HOSTILE bias to the HOSTILE approach.
  - Subtract 2x our FRIENDLY bias from the FRIENDLY approach.
  - Subtract our NEUTRAL bias from the NEUTRAL approach.

    If the friend has the same majority religion as us, and this player has an opposing religion:
	- Add ReligionEmphasis to the WAR approach.
	- Add ReligionEmphasis to the HOSTILE approach.
	
	If all three of us have the same majority religion, then they're a traitor to the faith!
	- Subtract ReligionEmphasis from the FRIENDLY approach.
	- Add ReligionEmphasis to the GUARDED approach.

    If the friend has the same ideology as us, and this player has an opposing ideology:
	- Add IdeologyEmphasis to the WAR approach.
	- Add IdeologyEmphasis to the HOSTILE approach.

	If all three of us have the same ideology, then they're a traitor to the ideology!
	- Subtract IdeologyEmphasis from the FRIENDLY approach.
	- Add IdeologyEmphasis to the GUARDED approach.

  If this player has denounced the friend:
  - Add our WAR bias to the WAR approach.
  - Add our HOSTILE bias to the HOSTILE approach.
  - Subtract 2x our FRIENDLY bias from the FRIENDLY approach.
  - Subtract our NEUTRAL bias from the NEUTRAL approach.

    If the friend has the same majority religion as us, and this player has an opposing religion:
	- Add ReligionEmphasis to the WAR approach.
	- Add ReligionEmphasis to the HOSTILE approach.
	
	If all three of us have the same majority religion, then they're a traitor to the faith!
	- Subtract ReligionEmphasis from the FRIENDLY approach.
	- Add ReligionEmphasis to the GUARDED approach.

    If the friend has the same ideology as us, and this player has an opposing ideology:
	- Add IdeologyEmphasis to the WAR approach.
	- Add IdeologyEmphasis to the HOSTILE approach.

	If all three of us have the same ideology, then they're a traitor to the ideology!
	- Subtract IdeologyEmphasis from the FRIENDLY approach.
	- Add IdeologyEmphasis to the GUARDED approach.
	

44. Trade Value

- Multiply the total gold we're getting from trade routes with this player by 100.
- Multiply the total science we're getting from trade routes with this player by 100.
- Multiply the total culture we're getting from trade routes with this player by 100.

- Multiply the total gold they're getting from trade routes with us by 100.
- Multiply the total science they're getting from trade routes with us by 100.
- Multiply the total culture they're getting from trade routes with us by 100.

- Estimate our total GPT by getting the total GPT from our cities (including trade route yields) and multiply by 100.
- Estimate our total Science per turn by getting the total Science per turn from our cities (including trade route yields) and multiply by 100.
- Estimate our total Culture per turn by getting the total Culture per turn from our cities (including trade route yields) and multiply by 100.
- For the Culture estimate, also add 100x the handicap bonus (FreeCulturePerTurn) to this. The AI doesn't normally receive a Culture per turn boost but humans can add one manually via DifficultyMod.xml.

Calculate the "trade deltas" with this player:
- Gold Delta = (5 * (GPT we get - GPT they get)) / GPT estimate
- Science Delta = (5 * (SPT we get - SPT they get)) / SPT estimate
- Culture Delta = (5 * (CPT we get - CPT they get)) / CPT estimate

* The results from all divisions are rounded down to the nearest integer (any remainder is ignored).
* If any of the estimates are 0 or negative, 1 is used in place of the estimate.

Now add in the value from ongoing trade deals with this player:

[Deal Value Calculation]
Deal value starts at 0.

For each ongoing deal with them:
- If we're getting GPT from this deal, multiply the GPT by the amount of turns left in the deal, and add this to the deal value.

- If we're getting resources from this deal, multiply the number of resources in the deal by the amount of turns left in the deal, and add this to the deal value.

- If this deal allows us Open Borders in their lands, add 10 to deal value.
- If this deal allows them Open Borders in our lands, add 5 to deal value.
- If this deal has a Defensive Pact in it, add 10 to deal value.

[End Deal Value Calculation]

Now that we have the total deal value:
- Add our Diplo Balance and Loyalty leader flavors together (average for each is 5); this determines how much we care about trade loyalty.
- Multiply the total deal value by the sum of the flavors.
- Divide by 20 and discard any remainder.
- Divide by 5, discard any remainder; this is the final deal value we will use in the calculation.

Add the Gold Delta, Science Delta, Culture Delta and Trade Deal Value together.

The total is doubled if the player is considered a "strategic trade partner" (IsStrategicTradePartner function).

If the total is greater than 0:
- Add the total to the FRIENDLY approach.


45. Bankrupt

If our current Gold is 0 and our current GPT is less than or equal to 0:

If going to war with this player would actually increase our GPT (because we're paying them GPT):
- Add our WAR bias plus the amount of GPT we would gain to the WAR approach.
- Add our HOSTILE bias plus the amount of GPT we would gain to the HOSTILE approach.

Otherwise:
- Add our FRIENDLY bias to the FRIENDLY approach.
- Add our NEUTRAL bias to the NEUTRAL approach.
- Subtract our WAR bias from the WAR approach.
- Subtract our HOSTILE bias from the HOSTILE approach.


46. Bankruptcy Sanity Check

Calculate the GPT we would lose by declaring war on this player (this calculation factors in the teammates, masters, vassals, Defensive Pacts, and allied City-States we would also go to war with).

(NOTE! The GPT lost can be less than 0 - for instance, if we're giving them 50 more GPT than we're receiving in our trade deals. Also, if already at war, the calculation will always return 0.)

If the GPT we would lose is greater than 0, and one of the following conditions are true:
- This player is not close to any victory condition;
- Victory Competition was disabled in CoreChanges.sql;

Then perform the following calculation.
- Begin by calculating our current GPT income and subtracting the GPT we would lose from declaring war.
- Calculate the average of our instant Gold yields for this turn and the previous 9 turns, and add this to our GPT income.
- If the total income is negative, then calculate the amount of turns it would take for us to go bankrupt at this adjusted income rate.
- If we would go bankrupt in 30 or less turns, then the "sanity mod" is equal to the adjusted income (so if it would be -20, then the "sanity mod" is -20).
- The sanity mod is reduced by 1% for each turn it would take to go bankrupt after declaring war - if we're already bankrupt, the reduction is 0%; if it would take 30 turns, the reduction is 30%.

After this calculation:
- Subtract the sanity mod from the WAR approach.
- Subtract the sanity mod from the HOSTILE approach.


47. Current Wars

For each other player (not this player or any of their teammates) that we're at war with, analyze the war state (GetWarState function):

Our war state with this other player is CALM or a STALEMATE
- Add our NEUTRAL bias to the NEUTRAL approach.

Our war state with this other player is DEFENSIVE or we're NEARLY DEFEATED
- Add our FRIENDLY bias to the FRIENDLY approach.

If both of us are fighting together against a common foe, and it isn't because of capitulated vassalage:
- Add our FRIENDLY bias to the FRIENDLY approach.

If the player we're evaluating is a neighbor, we want him on our good side, since we're going to war with others:
- Add our FRIENDLY bias to the FRIENDLY approach.
- Add our NEUTRAL bias to the NEUTRAL approach.

If the player we're at war with is a neighbor, we want this guy on our good side, since we're going to war with neighbors:
- Add our FRIENDLY bias to the FRIENDLY approach.
- Add our NEUTRAL bias to the NEUTRAL approach.


48. Dogpiling

If this player is already at war with other major civilizations, we might want to gang up on the guy we're looking at (our potential victim).

Skip this check if we're currently losing all our wars (or nearly defeated in any war). Also skip this check if we're very unhappy.

For each other player that they're at war with, if it's a player that we've met:

If one of the following is true:
- The potential victim is a major competitor of ours;
- The other warring player's proximity to the victim is CLOSE or NEIGHBORS, and their war projection of their ongoing war against our potential victim is GOOD or better.

And the following is NOT true:
- Our war projection of ANY player at war with the victim (and CLOSE or NEIGHBORS with the victim) is STALEMATE or worse.
i.e. if we can't take someone at war with them, we don't want them to sweep over us after finishing with this guy

Then add a dogpiling bonus:
- Add weight for Victory Dispute: 0 if NONE, 1 if WEAK, 2 if STRONG, 3 if FIERCE
- Add weight for Victory Block: 0 if NONE, 1 if WEAK, 2 if STRONG, 3 if FIERCE
- Add weight for our war projection against the potential victim: 0 if DESTRUCTION, 1 if DEFEAT, 2 if STALEMATE, 3 if UNKNOWN, 4 if GOOD, 5 if VERY GOOD
- Add weight for the other warring player's war projection against the potential victim: 0 if DESTRUCTION, 1 if DEFEAT, 2 if STALEMATE, 3 if UNKNOWN, 4 if GOOD, 5 if VERY GOOD

If the total dogpiling bonus for all players at war with them is greater than 0:
- Add 1/2 the dogpiling bonus (rounded down) to the WAR approach.
- Add 1/2 the dogpiling bonus (rounded down) to the HOSTILE approach.


49. Disabled Victory Conditions

 If Science, Culture and Diplomatic Victories are all disabled:
- Add 3x our WAR bias to the WAR approach.
- Add 3x our HOSTILE bias to the HOSTILE approach.


50. They're Close to Victory

If they're close to Domination Victory:
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.
- Add 2x our GUARDED bias to the GUARDED approach.

If they have at least one other major civ's original capital:
- Add our WAR bias plus the number of other major civs' original capitals they control to the WAR approach.
- Add our GUARDED bias plus the number of other major civs' original capitals they control to the GUARDED approach.
- Add our HOSTILE bias plus the number of other major civs' original capitals they control to the HOSTILE approach.

If victory competition has not been disabled:

   If they're close to winning a Science Victory:
   - Add 2x our WAR bias to the WAR approach.
   - Add 2x our HOSTILE bias to the HOSTILE approach.

   If they're close to winning a Culture Victory:
   - Add 2x our WAR bias to the WAR approach.
   - Add 2x our HOSTILE bias to the HOSTILE approach.

   If they're close to winning a Diplomatic Victory:
   - Add 2x our WAR bias to the WAR approach.
   - Add 2x our HOSTILE bias to the HOSTILE approach.

   If we're BOTH close to any victory condition:
   - Add 2x our WAR bias to the WAR approach.
   - Add 2x our HOSTILE bias to the HOSTILE approach.

   If they're close to any victory condition AND they're an easy target:
   - Add 5x our WAR bias to the WAR approach.


51. Grand Strategy Weight - Domination Victory

Skip this step if we're not at least in the Medieval Era (unless we're close to a Domination Victory already).

Skip this step if all of these conditions are FALSE:
- We're aiming for a Domination Victory.
- We're close to a Domination Victory.
- Our Diplo Type is CONQUEROR.


51A. Leader Flavors
Add the average of our Boldness and Offense flavors to the WAR approach.
Add the average of our Meanness and Denounce Willingness flavors to the HOSTILE approach.


51B. Capitals We Control
If we control at least one other major civ's original capital AND still control our own original capital.
- Add our WAR bias plus the number of other major civs' original capitals we control to the WAR approach.
- Add our HOSTILE bias plus the number of other major civs' original capitals we control to the HOSTILE approach.


51C. Capitals They Control
If they control at least one other major civ's original capital:

  If we're close to a Domination Victory:
  - Add 5x our WAR bias multiplied by the number of other major civs' original capitals they control to the WAR approach.
  - Add 5x our HOSTILE bias multiplied by the number of other major civs' original capitals they control to the HOSTILE approach.

  If we're not close to a Domination Victory, and they still own their original capital:
  - Add 2x the number of other major civs' original capitals they control to the WAR approach.
  - Add 2x the number of other major civs' original capitals they control to the GUARDED approach.
  - Add 2x our FRIENDLY bias MINUS 2x the number of other major civs' original capitals they control to the FRIENDLY approach.

  If they're an easy target:
  - Add 5x our WAR bias to the WAR approach.


51D. We're Close To Domination Victory
If we're close to a Domination Victory and the other player still has their original capital:
- Add 5x our WAR bias to the WAR approach.
- Add 5x our HOSTILE bias to the HOSTILE approach.

If they're also an easy target:
- Add 5x our WAR bias to the WAR approach.


51E. Normal Strategic Weight
If we're not close to a Domination Victory, and we still own our original capital:

  If the other player's military strength compared to us is above average:
  - Add our FRIENDLY bias to the FRIENDLY approach.
  - Add our NEUTRAL bias to the NEUTRAL approach.
  - Add our GUARDED bias to the GUARDED approach.
  - Subtract our WAR bias from the WAR approach.
  - Subtract our HOSTILE bias from the HOSTILE approach.
  - Subtract our DECEPTIVE bias from the DECEPTIVE approach.

  If the other player's military strength compared to us is average or weaker:
  - Subtract our FRIENDLY bias from the FRIENDLY approach.
  - Subtract our NEUTRAL bias from the NEUTRAL approach.
  - Subtract our GUARDED bias from the GUARDED approach.
  - Add our WAR bias to the WAR approach.
  - Add our HOSTILE bias to the HOSTILE approach.
  - Add our DECEPTIVE bias to the DECEPTIVE approach.

  If we have a Defensive Pact with this player, and their DP value (from DoRelationshipPairing) is greater than 0:
  - Add our FRIENDLY bias to the FRIENDLY approach.
  - Add our NEUTRAL bias to the NEUTRAL approach.
  - Subtract our GUARDED bias from the GUARDED approach.
  - Subtract our WAR bias from the WAR approach.
  - Subtract our HOSTILE bias from the HOSTILE approach.
  - Subtract our DECEPTIVE bias from the DECEPTIVE approach.

  If the other player's proximity to us is FAR or DISTANT and their economic strength compared to us is above average:
    - Add our NEUTRAL bias to the NEUTRAL approach.

    If our opinion of them is NEUTRAL or better:
    - Add our FRIENDLY bias to the FRIENDLY approach.

    Otherwise:
    - Add our DECEPTIVE bias to the DECEPTIVE approach.

    If we have a Declaration of Friendship with them:
    - Add 2x our FRIENDLY bias to the FRIENDLY approach.


51F. Open Borders
If we have no territorial disputes with them and they allow us Open Borders:
If our opinion of them is FAVORABLE or better:
- Add our FRIENDLY bias to the FRIENDLY approach.

Otherwise:
- Add our NEUTRAL bias to the NEUTRAL approach.


51G. Vassal
If they're our vassal:
- Add our FRIENDLY bias to the FRIENDLY approach.


51H. Coop Wars
If the # of times they've denied a coop war (see step 8 for how this is calculated) is above 0 (bad):
- Subtract 3x the # of denials from the FRIENDLY approach.
- Add 3x the # of denials to the HOSTILE approach.
- Add 3x the # of denials to the DECEPTIVE approach.

If the # of times they've denied a coop war is below 0 (good):
- Add 3x the # of denials to the FRIENDLY approach.
- Subtract 3x the # of denials from the HOSTILE approach.
- Subtract 3x the # of denials from the DECEPTIVE approach.



52. Grand Strategy Weight - Diplomatic Victory

Skip this step if we're not at least in the Renaissance Era (unless we're close to any victory condition already).

Skip this step if all of these conditions are FALSE:
- We're aiming for a Diplomatic Victory.
- We're close to a Diplomatic Victory.
- Our Diplo Type is DIPLOMAT.


52A. Base Friendship Increase
If the other player is not close to winning the game (or victory competition is disabled):
- Add our FRIENDLY bias plus the average of our DoF Willingness and Diplomacy flavors to the FRIENDLY approach.

   If we're also close to a Diplomatic Victory:
   - Add 2x our FRIENDLY bias to the FRIENDLY approach.


52B. Long-Term Alliances
Get the DoF Level for this player (see step 28).

DOF LEVEL: UNTRUSTWORTHY
- Add our WAR bias to the WAR approach.
- Add our GUARDED bias to the GUARDED approach.
- Add our HOSTILE bias to the HOSTILE approach.

DOF LEVEL: NEW
- Add our NEUTRAL bias to the NEUTRAL approach.

DOF LEVEL: FRIENDS
- Add our FRIENDLY bias to the FRIENDLY approach.
- Subtract our WAR bias from the WAR approach.
- Subtract our HOSTILE bias from the HOSTILE approach.

DOF LEVEL: ALLIES
- Add 2x our FRIENDLY bias to the FRIENDLY approach.
- Subtract 2x our WAR bias from the WAR approach.
- Subtract 2x our HOSTILE bias from the HOSTILE approach.
- Subtract 2x our DECEPTIVE bias from the DECEPTIVE approach.

DOF LEVEL: BATTLE BROTHERS
- Add 3x our FRIENDLY bias to the FRIENDLY approach.
- Subtract 3x our WAR bias from the WAR approach.
- Subtract 3x our HOSTILE bias from the HOSTILE approach.
- Subtract 3x our DECEPTIVE bias from the DECEPTIVE approach.


52C. City-States - Provocations
NOTE: This check is only calculated if the AI has met at least one City-State who is still alive. If there are no living City-States in the game, or they haven't met any, no bonus or penalty will be added for this.

Add the number of times they lowered our influence directly (spies, Great Diplomats, etc) to the number of times they've performed a coup against us.

(NOTE: Performing a coup also awards a penalty for lowering influence, so coups are counted twice here.)

Multiply the total by 3, and add it to the WAR and GUARDED approaches.


52D. City-States - Protection
If they haven't lowered our City-State Influence directly and our dispute level over City-States is NONE or WEAK:

For each City-State that we're protecting OR allied to, that they're protecting:
- Add 2 to the FRIENDLY approach.
- Add 2 to the NEUTRAL approach.
- Subtract 2 from the WAR approach.
- Subtract 2 from the HOSTILE approach.
- Subtract 2 from the DECEPTIVE approach.


52E. World Congress Competition
Skip this step if the World Congress has not yet been founded.
Skip this step if Victory Competition was disabled.

If this player has more World Congress votes than any other player not on our team:
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.
- Add 2x our DECEPTIVE bias to the DECEPTIVE approach.

  If they're also an easy target:
  - Add 2x our WAR bias to the WAR approach.
  - Add 2x our HOSTILE bias to the HOSTILE approach.

  If we're also close to winning a Diplomatic Victory:
  - Add 5x our WAR bias to the WAR approach.
  - Add 5x our HOSTILE bias to the HOSTILE approach.


If this player has more votes than we do:
- Add 2x our DECEPTIVE bias to the DECEPTIVE approach.
- Add 2x our GUARDED bias to the GUARDED approach.

   If they're also an easy target:
   - Add 2x our WAR bias to the WAR approach.
   - Add 2x our HOSTILE bias to the HOSTILE approach.

   If we're also close to winning a Diplomatic Victory:
   - Add 5x our WAR bias to the WAR approach.
   - Add 5x our HOSTILE bias to the HOSTILE approach.


If this player does not have more votes than we do:
- Add 2x our FRIENDLY bias to the FRIENDLY approach.
- Subtract 2x our WAR bias from the WAR approach.
- Subtract 2x our HOSTILE bias from the HOSTILE approach.



53. Grand Strategy Weight - Cultural Victory

Skip this step if we're not at least in the Renaissance Era (unless we're close to any victory condition already).

Skip this step if all of these conditions are FALSE:
- We're aiming for a Cultural Victory.
- We're close to a Cultural Victory.
- Our Diplo Type is CULTURAL.


53A. They Have Influence Over Us
If their Influence level over us is at least POPULAR, and one of these two conditions is true:
- Their Influence over us is at least INFLUENTIAL, OR
- Their Influence trend is RISING;

Then, if victory competition is enabled:
- Add 2x our WAR bias to the WAR approach.
- Add 2x our GUARDED bias to the GUARDED approach.

  If they're also an easy target:
  - Add 2x our WAR bias to the WAR approach.
  - Add 2x our HOSTILE bias to the HOSTILE approach.


53B. Tourism Bonuses
Skip this step if any weight was added in step 53A.

If we're allowing them Open Borders:
- Add our FRIENDLY bias to the FRIENDLY approach.

   If we're also already influential on half of the civs we need in order to win a Cultural Victory:
   - Add our FRIENDLY bias to the FRIENDLY approach.

If they're our vassal:
- Add our FRIENDLY bias to the FRIENDLY approach.


53C. They're the civ we have the lowest Influence on
Skip this if we're already Influential.

If they're an easy target, and victory competition is enabled:
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.

   If we're also close to winning a Cultural Victory:
   - Add 5x our WAR bias to the WAR approach.
   - Add 5x our HOSTILE bias to the HOSTILE approach.

If they're not an easy target:
- Add 2x our FRIENDLY bias to the FRIENDLY approach.
- Add 2x our DECEPTIVE bias to the DECEPTIVE approach.

    If we're also close to winning a Cultural Victory:
    - Add 2x our FRIENDLY bias to the FRIENDLY approach.


53D. Influence Level and Trend
Skip this step if any weight was added in step 53C.

If we're close to winning a Cultural Victory:
- Add our FRIENDLY bias to the FRIENDLY approach.

Check our influence level over them:

UNKNOWN
- Add 2x our DECEPTIVE bias to the DECEPTIVE approach.
- Add our FRIENDLY bias to the FRIENDLY approach.

EXOTIC
- Add our DECEPTIVE bias to the DECEPTIVE approach.
- Add our FRIENDLY bias to the DECEPTIVE approach.

FAMILIAR
- Add our DECEPTIVE bias to the DECEPTIVE approach.
- Add 2x our FRIENDLY bias to the FRIENDLY approach.

POPULAR
- Add 2x our FRIENDLY bias to the FRIENDLY approach.
- Add our NEUTRAL bias to the NEUTRAL approach.

INFLUENTIAL
If our Influence Trend is NOT Rising:
- Add 2x our FRIENDLY bias to the FRIENDLY approach.
- Add our NEUTRAL bias to the NEUTRAL approach.

If our Influence Trend is Rising and our Opinion of them is FAVORABLE or better:
- Add 2x our FRIENDLY bias to the FRIENDLY approach.

If our Influence Trend is Rising and our Opinion of them is COMPETITOR or worse:
- Add our WAR bias to the WAR approach.
- Add our HOSTILE bias to the HOSTILE approach.

  If they're also an easy target:
  - Add 2x our WAR bias to the WAR approach.
  - Add 2x our HOSTILE bias to the HOSTILE approach.

DOMINANT
If our Opinion of them is FAVORABLE or better:
- Add our FRIENDLY bias to the FRIENDLY approach.

If our Opinion of them is COMPETITOR or worse:
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.

  If they're also an easy target:
  - Add 3x our WAR bias to the WAR approach.
  - Add 3x our HOSTILE bias to the HOSTILE approach.



54. Grand Strategy Weight - Spaceship Victory

Skip this step if we're not at least in the Renaissance Era (unless we're close to any victory condition already).

Skip this step if all of these conditions are FALSE:
- We're aiming for a Spaceship Victory.
- We're close to a Spaceship Victory.
- Our Diplo Type is SCIENTIFIC.


54A. Spaceship Competition
If the other player's team has built at least 1 spaceship part OR they're close to a Science Victory and we aren't:

   If victory competion is enabled:
   - Add 5x our WAR bias to the WAR approach.
   - Add 5x our HOSTILE bias to the HOSTILE approach.

If they're NOT a spaceship competitor and we're close to Science Victory:
- Add 2x our FRIENDLY bias to the FRIENDLY approach.
- Add 2x our NEUTRAL bias to the NEUTRAL approach.


54B. Normal Strategic Weight
Skip this step if any weight was added in step 54A.

They have a tech lead of 4 or more techs:
- Add our WAR bias to the WAR approach.
- Add our GUARDED bias to the GUARDED approach.
- Add our HOSTILE bias to the HOSTILE approach.

   If they're also an easy target:
   - Add our WAR bias to the WAR approach.
   - Add our HOSTILE bias to the HOSTILE approach.

They have a tech lead of 2 to 3 techs:
- Add 2x our DECEPTIVE bias to the DECEPTIVE approach.
- Add 2x our GUARDED bias to the GUARDED approach.

   If they're also an easy target:
   - Add our WAR bias to the WAR approach.
   - Add our DECEPTIVE bias to the DECEPTIVE approach.

We're equal in tech count, or within 1 tech of each other:
- Add our DECEPTIVE bias to the DECEPTIVE approach.
- Add our NEUTRAL bias to the NEUTRAL approach.

    If their military strength compared to us is at least AVERAGE:
    - Add our FRIENDLY bias to the FRIENDLY approach.

We have a tech lead of 2 to 3 techs:
- Subtract our DECEPTIVE bias from the DECEPTIVE approach.
- Subtract our GUARDED bias from the GUARDED approach.

    If their military strength compared to us is at least AVERAGE:
    - Add our FRIENDLY bias to the FRIENDLY approach.
    - Subtract our WAR bias from the WAR approach.
    - Subtract our HOSTILE bias from the HOSTILE approach.

We have a tech lead of 4 or more techs:
- Subtract 2x our DECEPTIVE bias from the DECEPTIVE approach.
- Subtract 2x our GUARDED bias from the GUARDED approach.

    If their military strength compared to us is at least AVERAGE:
    - Add 2x our FRIENDLY bias to the FRIENDLY approach.
    - Subtract 2x our WAR bias from the WAR approach.
    - Subtract 2x our HOSTILE bias from the HOSTILE approach.


54C. Defensive Pact/Research Agreement
Skip this step if any weight was added in step 54A.

If they don't have a tech lead of 4 or more techs, we have a Defensive Pact, and their DP value is above 0:
- Add 2x our FRIENDLY bias to the FRIENDLY approach.
- Add 2x our NEUTRAL bias to the NEUTRAL approach.

If they don't have a tech lead of 4 or more techs, we have a Research Agreement, and we haven't already researched every tech:
- Add 2x our FRIENDLY bias to the FRIENDLY approach.
- Add 2x our NEUTRAL bias to the NEUTRAL approach.



[PART 7: ADDITIONAL FACTORS]


55. Nukes

If the other player is a human (or Gandhi :) ), assume their chance of nuking us is 100%.

If the other player is an AI:
- If nukes have been used already by either of us against the other, assume their chance of nuking us is 100%.
- Otherwise, get the other leader's Use Nuke flavor, add 1 to it and multiply it by itself. The result is their % chance of nuking us.

We have nukes and they don't
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.

   If they're also an easy target:
   - Add 2x our WAR bias to the WAR approach.
   - Add 2x our HOSTILE bias to the HOSTILE approach.

They have nukes and we don't, and their probability of nuking us is greater than 50%
- Add 2x our AFRAID bias to the AFRAID approach.

We both have nukes, and their probability of nuking us is greater than 25%
- Add 2x our GUARDED bias to the GUARDED approach.

If they've previously nuked us:
- Add 3x our WAR bias to the WAR approach.
- Add 3x our HOSTILE bias to the HOSTILE approach.
- Add 3x our GUARDED bias to the GUARDED approach.


56. Unique Units

If our civilization has at least one Unique Unit (UU):

If we've unlocked a UU technology and have at least one UU currently active:
- Add our WAR bias to the WAR approach.
- Add our HOSTILE bias to the HOSTILE approach.

  If we're also going for (or close to) a Domination Victory:
  - Add our WAR bias to the WAR approach.
  - Add our HOSTILE bias to the HOSTILE approach.

  If they're also an easy target:
  - Add our WAR bias to the WAR approach.

If we've unlocked a UU technology but we don't have at least one UU currently active:
- Add our DECEPTIVE bias to the DECEPTIVE approach.
- Add our WAR bias to the WAR approach.

If we don't have a UU technology, but will have one soon:
- Add our DECEPTIVE bias to the DECEPTIVE approach.


57. We're Cramped (a lot of nearby land is owned by others)

If the other player is one of our NEIGHBORS:
- Add our WAR bias to the WAR approach.
- Add our GUARDED bias to the GUARDED approach.


58. We're very unhappy AND we have more than 0 war weariness:
- Add our FRIENDLY bias plus 1/5th of our current war weariness to the FRIENDLY approach.
- Add our NEUTRAL bias plus 1/5th of our current war weariness to the NEUTRAL approach.


59. Reckless Expander

If we believe this player is a reckless expander (IsPlayerRecklessExpander function):

Opinion Indicator: "They believe we are expanding our empire too aggressively!"
- Add our WAR bias to the WAR approach.
- Add our DECEPTIVE bias to the DECEPTIVE approach.
- Add our HOSTILE bias to the HOSTILE approach.

If our diplo type is CONQUEROR:
- Add our WAR bias to the WAR approach.
- Add our HOSTILE bias to the HOSTILE approach.

If they're also an easy target:
- Add our WAR bias to the WAR approach.


60. Wonder Spammer

If we believe this player is a wonder spammer (IsPlayerWonderSpammer function):

Opinion Indicator: "They believe we are building World Wonders too aggressively!"
- Add our WAR bias to the WAR approach.
- Add our DECEPTIVE bias to the DECEPTIVE approach.
- Add our HOSTILE bias to the HOSTILE approach.

If our diplo type is CULTURAL or CONQUEROR:
- Add our WAR bias to the WAR approach.
- Add our HOSTILE bias to the HOSTILE approach.

If they're also an easy target:
- Add our WAR bias to the WAR approach.


61. Duel
If there's only two major civilizations alive:

If we're going for or close to a Domination Victory:
- Add 1000 to the WAR approach.

If victory competition is enabled:
- Add our WAR bias to the WAR approach.

  If they are also close to any victory condition and an easy target:
  - Add 1000 to the WAR approach.


62. Coop War Against This Player

If we promised another player to go to war against this player (third-party war bribery counts):
- Add our WAR bias to the WAR approach.


63. War Bonus

(This entire section is ignored for vassal players.)

War bonus starts at 0.

If our diplo type is CONQUEROR or our leader traits give us bonuses towards war:
- Add 3 to the war bonus, and also see below:

  If they're an easy target:
  - Add our WAR bias to the WAR approach.

  If our civilization has at least one Unique Unit (UU), we have the technology for a UU unlocked, AND at least one active:
  - Add our WAR bias to the WAR approach.
  - Add our HOSTILE bias to the HOSTILE approach.

  If we have a UU, a UU tech, at least one UU active, and we're going for (or are close to) a Domination Victory:
  - Add our WAR bias to the WAR approach.
  - Add our DECEPTIVE bias to the DECEPTIVE approach.

If we unlocked Authority:
- Add 1 to the war bonus.

If we completed Authority:
- Add 1 to the war bonus.

If we unlocked Imperialism:
- Add 1 to the war bonus.

If we completed Imperialism:
- Add 2 to the war bonus.

If our Ideology is Autocracy:
- Add 3 to the war bonus.

If we have a temporary attack bonus (e.g. from Global Wargames)
- Add 2 to the war bonus.


If the war bonus is greater than 0:
- Add our WAR bias plus the war bonus to the WAR approach.
- Add our HOSTILE bias plus the war bonus to the HOSTILE approach.

  If they're also an easy target:
  - Add our WAR bias to the WAR approach.


64. Difficulty Bonus

(This entire section is ignored for vassal players.)

If our Opinion of this player is COMPETITOR or worse, a bonus is also added for difficulty:

Difficulty bonus starts at 0.

- Add AIDifficultyBonusBase (see AI and Difficulty) to the difficulty bonus. This ranges from 0 (Settler) to 9 (Deity).
- If less than 0, difficulty bonus is set to 0; if greater than 10, difficulty bonus is set to 10.
- Subtract 4 if this is a COMPETITOR, 2 if this is an ENEMY, and 0 if they're UNFORGIVABLE.

If the difficulty bonus is greater than 0:
- Add our WAR bias plus the difficulty bonus to the WAR approach.
- Add our HOSTILE bias plus the difficulty bonus to the HOSTILE approach.
- Add our DECEPTIVE bias plus the difficulty bonus to the DECEPTIVE approach.

  If they're also an easy target:
  - Add our WAR bias to the WAR approach.


65. Leader Personality

(This entire section is ignored for vassal players.)

Currently only Ashurbanipal, Montezuma and Gandhi have extra weight added for this.
NOTE: The check evaluates whether the AI has the relevant traits, not the leader name.

If we are Assyria, and we haven't researched every tech already:
   If they have more techs than we do:
   - Add our WAR bias plus their tech lead to the WAR approach.

   If we have more techs than they do:
   - Add our FRIENDLY bias plus our teach lead to the FRIENDLY approach.

   If we have the same number of techs:
   - Add our NEUTRAL bias to the NEUTRAL approach.


If we are Montezuma:
- Add our WAR bias to the WAR approach.
- Add our HOSTILE bias to the HOSTILE approach.

  If the era is Medieval or earlier:
  - Add our WAR bias to the WAR approach.
  - Add our HOSTILE bias to the HOSTILE approach.


If we are Gandhi:
- Add our FRIENDLY bias to the FRIENDLY approach.

   If the other player has zero warmonger penalty with us:
   - Add our FRIENDLY bias to the FRIENDLY approach.

   If we currently have at least one nuke or have previously nuked them, and Nuclear Gandhi is enabled (DiploAIOptions.sql, active by default), then:
   - Add 100 to the WAR approach.
   - Add 100 to the HOSTILE approach.
   - Set our FRIENDLY approach score to -1000.
   - Set our NEUTRAL approach score to -1000.
   - Set our AFRAID approach score to -1000.
   - Set our DECEPTIVE approach score to -1000.


66. World Congress Resolutions

(This entire section is ignored for vassal players, or if the World Congress is disabled/hasn't been founded yet.)

If the United Nations has been constructed, and we're going for (or close to) a Diplomatic Victory:
- Add our FRIENDLY bias to the FRIENDLY approach.
- Subtract our WAR bias from the WAR approach.
- Subtract our HOSTILE bias from the HOSTILE approach.

If one of us is sanctioned by the World Congress:
- Add our WAR bias to the WAR approach.
- Add our HOSTILE bias to the HOSTILE approach.

If the Casus Belli resolution is active:
- Subtract 2x our FRIENDLY bias from the FRIENDLY approach.
- Subtract 2x our NEUTRAL bias from the NEUTRAL approach.
- Add 2x our WAR bias to the WAR approach.
- Add 2x our HOSTILE bias to the HOSTILE approach.

If the Global Peace Accords resolution is active:
- Add 2x our FRIENDLY bias to the FRIENDLY approach.
- Add 2x our NEUTRAL bias to the NEUTRAL approach.
- Subtract 2x our WAR bias from the WAR approach.
- Subtract 2x our HOSTILE bias from the HOSTILE approach.

If the Cold War resolution is active, and we can't make trade routes to at least one major civilization that we've met:

If this player has the same ideology (having no ideology doesn't count):
- Add our FRIENDLY bias plus IdeologyEmphasis to the FRIENDLY approach.
- Add our NEUTRAL bias plus IdeologyEmphasis to the NEUTRAL approach.
- Subtract our WAR bias plus IdeologyEmphasis from the WAR approach.
- Subtract our HOSTILE bias plus IdeologyEmphasis from the HOSTILE approach.
- Subtract our GUARDED bias plus IdeologyEmphasis from the GUARDED approach.

If this player has an opposing ideology (having no ideology doesn't count):
- Subtract our FRIENDLY bias plus IdeologyEmphasis from the FRIENDLY approach.
- Subtract our NEUTRAL bias plus IdeologyEmphasis from the NEUTRAL approach.
- Add our WAR bias plus IdeologyEmphasis to the WAR approach.
- Add our HOSTILE bias plus IdeologyEmphasis to the HOSTILE approach.
- Add our GUARDED bias plus IdeologyEmphasis to the GUARDED approach.


[PART 8: PRIORITIZATION]


67. Prioritization

Prioritize our approaches to avoid adopting the same approach towards too many players. This allows for more variance and strategy.

(Skip this step if there is only one player to update approaches for this turn, not counting "special case" players.)

GetBestApproachTowardsMajorCiv is called twice for each player. 

On the first pass through this function, step 67 is skipped, and the final totals for each civ's approach scores are recorded at the end of this function.

If this is the second pass through this function, then for EACH of the seven approaches:
  - Collect all civilizations' first pass approach scores for this approach.
  - Rank them in order from highest approach score to lowest approach score.
  - If this civilization has the highest approach score for the approach, do not subtract any weight.
  - If this civilization is ranked second, subtract -1x the approach bias for that approach from the current score.
  - If this civilization is ranked third, subtract -2x the approach bias, and so on.
  - Ties are broken by player order (player 1 is first priority, player 2 is second priority, etc.)


68. Negative Approach Weights

At this point in the function, if any approach weight is negative, set it to 0 instead.


[PART 9: MULTIPLIERS]


69. Too Many Vassals Multiplier

If this player is not our master, and they have vassals:

- Increase the WAR approach score by 10% for each vassal they have.
- Increase the GUARDED approach score by 10% for each vassal they have.


70. Proximity Multiplier

The farther away a player is, the less likely we are to care about them!

If this player is personally able to declare war on us right now, then they CAN ATTACK US.
(They might not be able to; e.g. if a peace treaty prevents it; if the Permanent War or Peace game option is enabled.)

Check if we have a valid military attack target for this player (i.e. we can pathfind to them for an attack).
If we do have a valid attack target, then check if we WANT CONQUEST against this player.

We want conquest if any of the following conditions are true:
- We're going for Domination Victory.
- We're close to a Domination Victory.
- We promised another player to go to war against them (coop/3rd party war).
- They're a backstabber.
- Our Opinion of them is ENEMY or UNFORGIVABLE and they're our biggest competitor.
- Our Opinion of them is ENEMY or UNFORGIVABLE and they're an easy target.
- Our Opinion of them is UNFORGIVABLE and our War Projection of a war against them is GOOD or VERY GOOD.
- They're a reckless expander.
- They're a wonder spammer.
- They are close to any victory condition and victory competition is enabled.

Now, on to the proximity multiplier!

If proximity is...

NEIGHBORS
- If we want conquest, increase WAR and HOSTILE approach scores by 100%. Otherwise, if we have a valid attack target, increase them by 50%.
- If they can attack us, increase AFRAID approach score by 50%.
- Increase FRIENDLY approach score by 50%.
- Increase DECEPTIVE approach score by 50%.
- Increase GUARDED approach score by 50%.

CLOSE
- If we want conquest, increase WAR and HOSTILE approach scores by 50%. Otherwise, if we have a valid attack target, increase them by 25%.
- If they can attack us, increase AFRAID approach score by 25%.
- Increase FRIENDLY approach score by 25%.
- Increase DECEPTIVE approach score by 25%.
- Increase GUARDED approach score by 25%.

FAR
- If we want conquest and we're able to cross ocean tiles, increase WAR and HOSTILE approach scores by 25%.
- No other changes.

DISTANT
- If we don't want conquest OR we're not able to cross ocean tiles, decrease WAR and HOSTILE approach scores by 25%.
- Decrease FRIENDLY approach score by 25%.
- Decrease AFRAID approach score by 25%.
- Decrease GUARDED approach score by 25%.
- Decrease DECEPTIVE approach score by 25%.


71. Domination Victory Disabled

If Domination Victory is disabled:
- Divide the WAR approach score by 2.
- Divide the HOSTILE approach score by 2.


72. Opinion

Opinion is applied as a +/- % modifier to Approach scores after all other modifiers have been considered.

However, each leader also has several personality values which affect how much a positive or negative opinion will change their approach. These personality values are once again based on AI flavors, which are randomized slightly from game to game to be less predictable.

The higher a modifier for an approach is, the more having a positive opinion (above Favorable) or negative opinion (below Competitor) will affect that approach.

This applies both ways (a leader with a high War modifier will add more weight to the War approach if their opinion is negative, but will also remove more weight from the War approach if their opinion is positive). In contrast, a leader with a low War modifier will add or remove less weight based on opinion.

The modifiers are as follows:
WarMod = WAR bias * Boldness
HostileMod = HOSTILE bias * Denounce Willingness
DeceptiveMod = DECEPTIVE bias * Meanness
GuardedMod = GUARDED bias * (10 - Forgiveness)
AfraidMod = AFRAID bias * (10 - Boldness)
FriendlyMod = FRIENDLY bias * Loyalty
NeutralMod = NEUTRAL bias * Diplo Balance * 2

Note that in the code, good modifiers subtract opinion (negative is good) and bad modifiers add opinion (positive is bad).

IF OPINION IS GREATER THAN 30 (Competitor)

Increase hostility and fear:

- Multiply WAR approach score by (100 + WarMod + Opinion).
- Divide WAR approach score by 100.

- Multiply HOSTILE approach score by (100 + HostileMod + Opinion).
- Divide HOSTILE approach score by 100.

- Multiply DECEPTIVE approach score by (100 + DeceptiveMod + Opinion).
- Divide DECEPTIVE approach score by 100.

- Multiply GUARDED approach score by (100 + GuardedMod + Opinion).
- Divide GUARDED approach score by 100.

- Multiply AFRAID approach score by (100 + AfraidMod + Opinion).
- Divide AFRAID approach score by 100.

Decrease friendliness and neutrality:

- Multiply FRIENDLY approach score by 100.
- Divide FRIENDLY approach score by (100 + FriendlyMod + Opinion).

- Multiply NEUTRAL approach score by 100.
- Divide NEUTRAL approach score by (100 + NeutralMod + Opinion).


IF OPINION IS LOWER THAN -30 (Favorable)

- Multiply Opinion by -1.

Increase friendliness:

- Multiply FRIENDLY approach score by (100 + FriendlyMod + Opinion).
- Divide FRIENDLY approach score bv 100.

Decrease hostility, fear and neutrality:

- Multiply WAR approach score by 100.
- Divide WAR approach score by (100 + WarMod + Opinion).

- Multiply HOSTILE approach score by 100.
- Divide HOSTILE approach score by (100 + HostileMod + Opinion).

- Multiply DECEPTIVE approach score by 100.
- Divide DECEPTIVE approach score by (100 + DeceptiveMod + Opinion).

- Multiply GUARDED approach score by 100.
- Divide GUARDED approach score by (100 + GuardedMod + Opinion).

- Multiply AFRAID approach score by 100.
- Divide AFRAID approach score by (100 + AfraidMod + Opinion).

- Multiply NEUTRAL approach score by 100.
- Divide NEUTRAL approach score by (100 + NeutralMod + Opinion).


IF OPINION IS IN THE -30 TO 30 RANGE (Neutral)

Increase neutrality:
- Multiply NEUTRAL approach score by (100 + NeutralMod).
- Divide NEUTRAL approach score by 100.


73. Modder Bonus/Penalty

If base approach weight (flat or percentage) was added or subtracted in DiploApproachWeights.sql, add or subtract it now.

Flat weight is factored in before percentage weight.


[PART 10: ZERO-OUT CONDITIONS]

"Scratch value" = the approach score towards this player last turn. Used in the approach curve (part 11).
"Scratch value override" = an override for last turn's approach score. The overrides, instead of using last turn's value for the approach curve, use the specified value.

The scratch value overrides are meant to ensure that, for instance, an AI that has no valid attack target (step 75) doesn't declare war anyway because of the approach curve's slower decay.
Scratch value overrides are set to -1 by default. If set to a value of 0 or higher below, they will be used in the approach curve calculation.


74. No Valid Attack Target

If we don't have a valid attack target for this player:
- Set our WAR approach score to 0.
- Set our HOSTILE approach score to 0.
- Set the scratch value override for the WAR approach to 0.
- Set the scratch value override for the HOSTILE approach to 0.


75. Can't Attack Us

If this player can't declare war on us:
- Set our AFRAID approach score to 0.
- Set the scratch value override for the AFRAID approach to 0.


76. Recent Peace Treaty

If we signed a Peace Treaty recently, war and hostility weight is removed for a time.

On Settler difficulty, WAR, HOSTILE and DECEPTIVE weights are set to 0 for 20 turns after a peace treaty is signed.

On difficulties above Settler, the AIDifficultyBonusBase (see AI and Difficulty) is subtracted from 20 to determine how many turns the AI has no WAR/HOSTILE/DECEPTIVE weight for. 
The minimum is 11 turns.

While the weights are set to 0, the WAR, HOSTILE and DECEPTIVE scratch value overrides are also set to 0.


77. Resurrection Chill-ifier

If this player resurrected us:
- Set our HOSTILE approach score to 0.
- Set our scratch value override for the HOSTILE approach to 0.


78. Coop War Soon

If we promised this player to start a coop war against another civilization "soon" and we haven't started the war yet:

If they're not close to any victory condition OR victory competition has been disabled:
- Set our WAR approach score to 0.
- Set our scratch value override for the WAR approach to 0.


79. Recent Liberation

If this player has recently liberated a city from us (within the past 20 turns), and all of the following conditions are true:
- This player is not close to any victory condition OR victory competition has been disabled.
- This player does not currently own our original capital or Holy City.
- This player is not a backstabber.

Then:
- Set our WAR approach score to 0.
- Set our scratch value override for the WAR approach to 0.


80. Vassal of Someone Else

If they're a vassal of someone else...

If we're not at war with them:
- Set our WAR approach score to 0.
- Set our scratch value override for the WAR approach to 0.

If we are at war with them, we just started the war, and our approach score towards them last turn was 0:
- Set our scratch value override to the current WAR approach score for this turn.


81. Vassal of Our Team

If they're our vassal...

If they're a major competitor of ours (this bar is set very high for vassals) or they control other major civs' original capitals, skip this next step.

If we're going for or close to a Domination Victory and they still have their original capital, skip this next step.

Otherwise:
- Set our WAR approach score to 0.
- Set our HOSTILE approach score to 0.
- Set our scratch value override for the WAR approach to 0.
- Set our scratch value override for the HOSTILE approach to 0.


82. We're Someone's Vassal

If we're someone's vassal...

If we're not at war with this player:
- Set our WAR approach score to 0.
- Set our scratch value override for the WAR approach to 0.

If we are at war with this player, we just started the war, and our approach score towards them last turn was 0:
- Set our scratch value override to the current WAR approach score for this turn.

If this player isn't our master or a backstabber, then:
- Set our HOSTILE approach score to 0.
- Set our scratch value override for the HOSTILE approach to 0.


83. Backstabbing is Bad

If we have a DoF with this player or we'd otherwise backstab a friend by going to war with them:
- Backstab a friend;
- Backstab a player we have a Defensive Pact with;
- Backstab a player we have an Opinion of ALLY towards;
- Break a military promise (not to declare war).

Then set our WAR approach score to 0 and our scratch value override for the WAR approach to 0.


84. War Disallowed By Game Options

If war against this player has been disabled in DiploAIOptions.sql:
- Set our WAR approach score to 0.
- Set our scratch value override for the WAR approach to 0.


[PART 11: THE APPROACH CURVE]


85. Make Approach Change Gradually
Approach scores change gradually from turn to turn to avoid rapid jumping between values, which would be erratic and exploitable.

For each of the approaches:

A. Retrieve the approach weight we had for this approach last turn, and store it for logging.

B. Check if there's a scratch value override for this approach with a value of 0 or higher. If so, set last turn's value to the scratch value override's value.

C. Calculate the "average" value of this turn's score and the last turn's score using this formula: (0.5 + (Approach Score * 0.10) + (Approach Score Last Turn * (1 - 0.10)))

D. Round down to remove any remainder.

E. If the average is the same as the value last turn, but the value this turn increased/decreased, then add/subtract 1 from the average so it changes by at least 1.

F. Set the approach value for this approach to the average value.

! EXCEPTION TO STEP 85: Players who have just been resurrected have outdated diplo approach values. 
Therefore, the first time they update their approaches, they ignore steps 85C-E and instead use the current turn's value as last turn's value.


[PART 12: APPROACH SELECTION]


86. Select the Approach with the Highest Weight

Example: The GUARDED approach has 112 weight. The next highest approach, FRIENDLY, has 98 weight. Thus, GUARDED will be chosen.

If all approaches have 0 weight, NEUTRAL is chosen by default.

If several approaches are tied with > 0 weight, the order of priority is WAR, HOSTILE, DECEPTIVE, GUARDED, AFRAID, FRIENDLY, NEUTRAL.


87. "No Friendly" Override

If we've denounced them, they've denounced us, or they're a backstabber...

And our selected approach is FRIENDLY or DECEPTIVE, then:
- If our Opinion of them is ENEMY or UNFORGIVABLE, set our selected approach to GUARDED.
- Otherwise, set our selected approach to NEUTRAL.


88. Recent Liberation Override

If our selected approach is HOSTILE...

If this player has recently liberated a city from us (within the past 20 turns), and all of the following conditions are true:
- This player is not close to any victory condition OR victory competition has been disabled.
- This player does not currently own our original capital or Holy City.
- This player is not a backstabber.

Then set our selected approach to GUARDED.


89. War Face

If the selected approach is WAR, the AI is planning a war.

The AI will then pick a "War Face", which determines how it will act towards you until war is declared or WAR isn't the highest approach anymore.

If the selected approach is NOT the WAR approach, then it resets the War Face type (so that a new one can be decided on next time).

If the AI had a War Face last turn, it will use that one. Otherwise, it will figure out the next-highest approach score (after WAR), and based on the result, pick a war face.

If several next-highest approaches are tied, the order of priority is WAR, HOSTILE, DECEPTIVE, GUARDED, AFRAID, FRIENDLY, NEUTRAL.

If the next-highest approach score is:

HOSTILE
- AI will act HOSTILE to you until it's ready for war.

GUARDED
- AI will act GUARDED to you until it's ready for war.

DECEPTIVE
- AI will act NEUTRAL to you until it's ready for war.

AFRAID
- AI will act HOSTILE to you until it's ready for war.

FRIENDLY
- AI will act FRIENDLY to you until it's ready for war.

OTHERWISE
- AI will act NEUTRAL to you until it's ready for war.



90. War Face Overrides

If the "No Friendly" override is in place (step 87) and the selected War Face (whether or not it was changed this turn) is FRIENDLY:
- If our Opinion of them is ENEMY or UNFORGIVABLE, set our selected approach to GUARDED.
- Otherwise, set our selected War Face to NEUTRAL.

If they previously resurrected us and the currently-selected War Face is HOSTILE:
- Set our selected War Face to GUARDED.


91. Record Approach Weights

The approach weights for all seven approaches are recorded. 
If this is the first pass of GetBestApproachTowardsMajorCiv for all civs, these recorded weights will be used in step 67 on the second pass.


92. Log and Update

If this is the second pass of GetBestApproachTowardsMajorCiv, then the approach has been updated, so:
- Update our approach towards this player.
- Update our War Face towards this player.
- If logging is enabled, the new approach, the approach weight, and the approach weight deltas.


93. Visible Approach

If at war, the message "WAR!" is shown in place of the approach.

If we just denounced this player, the message "DENOUNCING!" is shown in place of the approach.

If this player resurrected us this turn, the message "RECALLED TO LIFE" is shown in place of the approach.

If the true approach is DECEPTIVE, then the visible approach will be FRIENDLY.

If the true approach is WAR, then the visible approach will be the AI's War Face (step 89): HOSTILE, GUARDED, NEUTRAL or FRIENDLY.

Otherwise, the visible approach is the AI's true approach.

If the AI's visible Approach is something other than NEUTRAL, then a message explaining it can be seen in their Opinion modifiers.

Special Case Approach Updates[]

Under specific circumstances when updating approaches towards major civs, the AI will (rather than go through the full two passes of GetBestApproachTowardsMajorCiv) use a simpler method of updating approaches to improve on performance and effectiveness.

These special case approach updates (if any) occur before the normal approach updates for the turn and are described in pseudocode below:

There are five SPECIAL CASES for approach updates:

TEAMMATES
- Have a FRIENDLY score of 9999 and a score of 0 for all other approaches.
- AI always adopts the FRIENDLY approach and NO_WAR_FACE_TYPE war face towards teammates.


PERMANENT WAR
- The "Always War" and "Permanent War or Peace" game options allow for permanent war. You can activate them with Really Advanced Setup.
- When at permanent war, AI has a WAR approach score of 9999 and a score of 0 for all other approaches.
- AI always adopts the WAR approach and NEUTRAL war face when at permanent war.


HUMAN SHADOW AI
- The human player has a shadow diplo AI. While it does not interact with other players, it still selects and updates approaches.
- Since doing a lengthy calculation would be wasteful, it uses the following simpler method.

[At War]
Approach = WAR
War Face = NEUTRAL

[Not At War]
Check if we agreed to a coop war "soon" against this player with any other player. If so, set Approach to WAR and bCoopWarAgainst to true.

If human denounced this player OR player currently owns human's original capital OR player currently owns human's Holy City:
- bCoopWarAgainst false: Set Approach to HOSTILE.
- bCoopWarAgainst true: Set War Face to HOSTILE.

If human was denounced by this player:
- bCoopWarAgainst false: Set Approach to GUARDED.
- bCoopWarAgainst true: Set War Face to GUARDED.

If human made a DoF with this player OR has a Defensive Pact with this player OR made a coop war promise "soon" to this player:
- bCoopWarAgainst false: Set Approach to FRIENDLY.
- bCoopWarAgainst true: Set War Face to FRIENDLY.

If none of these are true:
- bCoopWarAgainst false: Set Approach to NEUTRAL.
- bCoopWarAgainst true: Set War Face to NEUTRAL.

Set the selected approach's score to 5 and all other approach scores to 0.



AI HAS NO CAPITAL
- If the AI has no capital city (possible at game start or with the Complete Kills game option), then it selects and updates approaches towards all other players quickly.

[At War]
Approach = WAR
War Face = NEUTRAL

[Not At War]
Check if we agreed to a coop war "soon" against this player with any other player. If so, set Approach to WAR and bCoopWarAgainst to true.

If AI denounced this player OR player currently owns AI's original capital OR player currently owns AI's Holy City OR AI considers player a backstabber:
- bCoopWarAgainst false: Set Approach to HOSTILE.
- bCoopWarAgainst true: Set War Face to HOSTILE.

If AI was denounced by this player:
- bCoopWarAgainst false: Set Approach to GUARDED.
- bCoopWarAgainst true: Set War Face to GUARDED.

If AI made a DoF with this player OR has a Defensive Pact with this player OR made a coop war promise "soon" to this player OR was previously resurrected by this player:
- bCoopWarAgainst false: Set Approach to FRIENDLY.
- bCoopWarAgainst true: Set War Face to FRIENDLY.

If player has previously captured some of the AI's cities:
- bCoopWarAgainst false: Set Approach to GUARDED.
- bCoopWarAgainst true: Set War Face to GUARDED.

If none of these are true:
- bCoopWarAgainst false: Set Approach to NEUTRAL.
- bCoopWarAgainst true: Set War Face to NEUTRAL.

Set the selected approach's score to that approach's bias value and all other approach scores to 0.



PLAYER HAS NO CAPITAL
- Towards players that have no cities, a lengthy approach update is a waste of time, and may return erroneous results (e.g. due to their lack of military/economic strength).
- Players with no cities are disregarded for most diplomacy AI purposes, but approaches will still be selected for them using this simple method.

[At War]
Approach = WAR
War Face = NEUTRAL

[Not At War]
Check if we agreed to a coop war "soon" against this player with any other player. If so, set Approach to WAR and bCoopWarAgainst to true.

If AI denounced this player OR AI considers player a backstabber:
- bCoopWarAgainst false: Set Approach to HOSTILE.
- bCoopWarAgainst true: Set War Face to HOSTILE.

If AI was denounced by this player:
- bCoopWarAgainst false: Set Approach to GUARDED.
- bCoopWarAgainst true: Set War Face to GUARDED.

If AI made a DoF with this player OR has a Defensive Pact with this player OR made a coop war promise "soon" to this player OR was previously resurrected by this player:
- bCoopWarAgainst false: Set Approach to FRIENDLY.
- bCoopWarAgainst true: Set War Face to FRIENDLY.

If none of these are true:
- bCoopWarAgainst false: Set Approach to NEUTRAL.
- bCoopWarAgainst true: Set War Face to NEUTRAL.

Set the selected approach's score to that approach's bias value and all other approach scores to 0.

Opinion[]

IMPORTANT: THIS SECTION ON OPINION IS OUTDATED. Up-to-date information will be posted here shortly.

Opinion describes the AI's diplomatic view on the basic role another major civilization has within their game. It is a major factor in calculating Approach. Every civilization's Opinion towards other players is updated every turn. To calculate Opinion, the AI checks a number of conditions ("opinion modifiers") which add or subtract from that civilization's opinion score/weight.

Opinion can then determined by consulting the table below. Unlike Approach, Opinion does not change gradually, and large changes can happen within a single turn.

Some conditions which add/subtract from the Opinion score will also affect Approach directly, but not all of them.

Important Note: In the game code, good opinion modifiers subtract from the score (negative is good) and bad opinion modifiers add to the score (positive is bad).

When using Transparent Diplomacy, good modifiers are shown ingame as positive (+) and bad modifiers are shown ingame as negative (-) to avoid confusing the player.

Opinion Score Opinion of Player
-160 or lower Ally
-80 to -159 Friend
-30 to -79 Favorable
Between -29 and 29 Neutral
30 to 79 Competitor
80 to 159 Enemy
160 or higher Unforgivable

Note: For teammates, this calculation is ignored entirely. An AI's Opinion of its teammates is always Ally, regardless of what modifiers are present.


Effects of Opinion[]

If an AI has a positive opinion of another player, trade deals with them will be more favorable, they will be more willing to accept requests from that player, and they will generally be kinder. They will also be more likely to adopt the FRIENDLY approach.

If an AI has a negative opinion of another player, trade deals with them will be less favorable, they will be less willing to accept requests from that player, and they will generally be meaner. They will also be more likely to adopt the WAR, HOSTILE, DECEPTIVE, GUARDED and AFRAID approaches.

If the AI has a neutral opinion of another player, they will be more likely to adopt the NEUTRAL approach, and they will generally be neither helpful nor harmful to the other player.


Opinion Modifiers[]

The modifiers which are affecting another civilization's Opinion of you can be seen by mousing over their current (visible) Approach.

However, if their visible approach is FRIENDLY[1] (whether it's real or fake), some bad modifiers will be hidden, such as territorial disputes and warmongering. Even if a modifier is hidden, it still counts towards your score.

With the Transparent Diplomacy option enabled in advanced game settings, you will always be able to see all opinion modifiers, even if they would normally be hidden. Their number value for the Opinion score will also be shown, and you can use this information to calculate that player's Opinion based on the table above (note: as said above, you must use the opposite +/- sign).

Keeping Other Civilizations Happy[]

It is much easier to make another civilization angry with you than it is to please them, and some conflict is inevitable, especially when it comes to border disputes. However, here are a few ways to keep another AI player happy with you:

  • Work to earn positive modifiers to counteract any negatives and make them happier. Offering them trade deals in their favor, befriending their friends and denouncing their enemies are some examples of this.
  • Avoid doing things that will anger the AI, such as settling near them, denouncing them, or befriending their enemies.
  • Never choose the "You'll pay for this in time." dialogue option when the AI sends you messages; this will give you an opinion penalty for insulting them, even if they don't declare war on you.[2]
  • When an AI asks that you promise not to do something, either keep the promises that you make, or refuse to make them. The opinion penalty for breaking a promise is always worse than the penalty for refusing to agree to the AI's request.
  • Many diplomatic penalties (such as for ignored requests) will expire on their own over time. Denouncements will also expire, although they can be renewed once they expire (unless the players are at war).
  • Resurrecting an AI civilization that has been killed by another player will eliminate almost all previous bad modifiers. They will also gain a very large bonus to their Opinion of you.
  • Most previous negatives will also be eliminated if you defeat another civilization in war and they become your vassal through capitulation (this does not work for voluntary vassals). However, neither resurrection nor capitulation prevent you from obtaining more diplomatic penalties in the future, if the AI doesn't like your actions.

Remember that diplomacy in Vox Populi is a game of global politics, and while you can usually make some civilizations happy, trying to befriend everyone will not usually succeed.

If possible, it is advisable to try to form a coalition or "bloc" of friends with the same players. Denouncing players with a poor global reputation is also helpful in getting other players to like you.


Good Opinion Modifiers - Negative is Good[]

Ingame, good modifiers with a value of -10 opinion or less will be displayed in a dark green color. Good opinion modifiers with a value of -11 opinion or more will be displayed in a bright green color. Good modifiers are shown in an AI player's "opinion table" in descending order by value, from highest to lowest. If two modifiers have the same value, they are shown in alphabetical order.

Value Opinion Modifier Reason(s) Notes
-200 You restored their civilization after they were annihilated! Liberate a city from a dead civilization, bringing that player back into the game Bonus is permanent.

Resurrecting a player clears almost all previous bad opinion modifiers. While not at war, it also opens permanent two-way embassies, and grants the resurrector a permanent Open Borders treaty in the resurrected player's lands.

-10 to -100 You have both chosen to adopt the X Ideology. Same ideology Vassals will automatically adopt the master's ideology.

Bonus depends on era:

-10 pre-Industrial Era

-70 in Industrial Era

-90 in Modern Era

-100 in Atomic Era

-80 in Information Era

-80 You liberated their original capital. Liberate a major civ's original capital from another player's control Bonus is permanent unless you declare war on them[3] or capture one of their cities.

Does not stack with the bonus for liberating other cities.

-30 to -60 You have liberated some of their people! Liberated some of their cities after capturing them from another civilization -30 for liberating one city

-50 for liberating two cities

-60 for liberating three or more cities

Resurrecting a player will also give you the bonus for liberating one city, in addition to the other bonuses.

Score bonus is halved after the duration of one trade deal[4], and set to zero after the duration of two. Liberating another of their cities resets the turn counter.

Bonus is removed if you declare war on them[3] or capture one of their cities.

Does not stack with the bonus for liberating the original capital.

-1 to -50 We fought together against a common foe. Both players were at war with the same major civilization at the same time Increases based on the amount of damage done to the foe. Capturing cities, killing units and plundering trade routes counts towards this.

Bonus decays over time, and is removed if you declare war on them.[3]

You do not receive this bonus with your capitulated vassals, and it is removed upon capitulation (if present).

-8 to -40 You have adopted their religion in the majority of your cities. The religion they founded is your majority religion Bonus depends on era:

-8 in Ancient Era

-24 in Classical Era

-40 in Medieval Era

-32 in Renaissance Era

-24 in Industrial Era

-24 in Modern Era

-16 in Atomic Era

-8 in Information Era

-1 to -35 We are trade partners. Gave them gifts/favorable trade deals

Trade routes between the players

Bonus is equal to the recent trade value divided by 5, rounded down. Recent trade value is capped at 175 and decays by 1 each turn (so the bonus is reduced by 1 every 5 turns).

Trade deals that are beneficial to the AI add 1/10th of their value to recent trade value, rounded down.

Gifts and trade deals which are worth at least 100 Gold to the AI (or where they're getting more than 5x what they're giving up) will instead add 1/5th of their value to recent trade value, rounded down.

Trade routes (regardless of who sends them) use the following calculation:

- Add 10x the Culture, Science and Gold yields for the AI together

- Add the Culture, Science, Gold and Diplomacy flavors for the AI together

- Add both totals together

- Divide by 4, round down, then add to recent trade value

Recent trade value for both players is set to 0 if either player declares war on each other, including through vassalage or a Defensive Pact.

-30 We have made a public Declaration of Friendship! Declaration of Friendship Ending a Declaration of Friendship early through war, denouncing or discussion results in diplomatic penalties.
-1 to -30 Your recent diplomatic actions please them. Warned the target AI when one of your friends offers to start a coop war against them

Bribing a player at war with them into making peace

If caused by warning the target AI of coop war plans, a bonus is also applied to the target AI's teammates and Defensive Pacts.

If caused by bribing another player into making peace with them, the full bonus is also applied to the target AI's teammates.

Disappointing the AI with your diplomatic actions will decrease your "recent assist value", and may replace this modifier entirely.

Bonus decays over time, and is removed if you declare war on them.[3]

-20+ (see notes) You built a Landmark in their territory. Built a Landmark instead of extracting an artifact from an Antiquity Site in their territory Score bonus is halved after the duration of one trade deal[4], and set to zero after the duration of two. Building another Landmark resets the turn counter.

Bonus is removed if you declare war on them.[3]

-20 We helped relocate the World Congress to their lands. / We helped them become the host of the United Nations. Voted for them as host of the World Congress / United Nations, and they won the vote. The amount of delegates you use to vote for them is irrelevant, as long as they win the vote.

Lasts 45 turns.

-10 to -20 You have shared intrigue with them. Warned the target AI when your spies catch another AI player plotting against or sneak attacking them

Warned the target AI when one of your friends offers to start a coop war against them

-10 for sharing intrigue once

-15 for sharing intrigue twice

-20 for sharing intrigue three or more times

Warning the target AI of coop war plans will also count as sharing intrigue to the target AI's teammates and Defensive Pacts

After the duration of one trade deal[4], the number of times intrigue was shared is reduced by one. Sharing intrigue again during this time resets the turn counter (in addition to adding to the number of times intrigue was shared).

Bonus is removed if you declare war on them.[3]

-4 to -20 They have happily adopted your religion in the majority of their cities. The religion you founded is their majority religion Not applied if they're spreading their own religion, or you have an opinion penalty for capturing their Holy City.

Bonus depends on era:

-4 in Ancient Era

-12 in Classical Era

-20 in Medieval Era

-16 in Renaissance Era

-12 in Industrial Era

-12 in Modern Era

-8 in Atomic Era

-4 in Information Era

-18 We have Denounced the same leaders! Both players have denounced the same civilization You only need one mutual denouncement to get this bonus; it does not stack.
-18 We have made Declarations of Friendship with the same leaders! Declaration of Friendship with same player You only need one mutual friend to get this bonus; it does not stack.
-5 to -18 We have similar Social Policies. Unlocked the same Social Policy Branches AI checks how many Social Policy branches each player has unlocked. Ideologies do not count towards this.

+1 per branch both players have unlocked

-1 per branch only one player has unlocked

If the total from this is positive, then it subtracts 5 or the total from the Opinion score, whichever is greater.

Bonus is doubled if the AI player's Neediness flavor is greater than 7.

The number of individual policies obtained in each branch is not considered.

-15 They liked our proposal to the World Congress / United Nations. Liked your World Congress / United Nations proposal Hovering over the options for proposed resolutions will indicate whether an AI player would be happy or unhappy with a given resolution.

Even if they change their mind later, the bonus or penalty applied at the time of proposing the resolution will count.

Lasts 30 turns, or until you propose a resolution they do not like.

-10 to -15 You have no contested borders. No territorial (border) disputes Land Dispute level of NONE.

-10 base bonus.

If one of these conditions is true:

- AI's era is Ancient or Classical;

- AI's leader traits provide war bonuses;

Then an additional -5 bonus is added.

-12+ (see notes) We have Pledged to Protect the same City-States. Both players have Pledged to Protect the same City-State(s) The amount subtracted is 12 or 3x the number of City-States both players have protected, whichever is greater.
-12 We have opened our borders to each other. Both players have given each other Open Borders Being at war does not count for this.

Replaces the two Open Borders bonuses below (doesn't apply twice).

-10+ (see notes) You freed their captured citizens! Captured and freed their enslaved Workers, Settlers or Missionaries from Barbarians, City-States or other civilizations -10 for first unit returned, -5 for subsequent units

Score bonus is halved after the duration of one trade deal[4], and set to zero after the duration of two. Returning another unit resets the turn counter.

If you liberate many stacked civilian units at once, you will receive a bonus for each one returned.

Bonus is removed if you declare war on them.[3]

-10 We have made a Defensive Pact! Defensive Pact Defensive Pacts are ended early if a Declaration of Friendship is broken between two players.
-10 We helped them pass their proposal in the World Congress / United Nations. Voted for their World Congress / United Nations proposal, and the proposal passed The amount of delegates you use to vote for it is irrelevant, as long as the resolution passes.

Lasts 30 turns.

-8 We have opened our borders to them. You have given them Open Borders Being at war does not count for this.

They automatically gain Open Borders (and this bonus) if they are your master.

-5 We have made a Defensive Pact with the same leaders! Defensive Pact with same player You only need one mutual DP to get this bonus; it does not stack.
-5 We have made a Research Agreement! Research Agreement Research Agreements must be enabled in Advanced Settings.
-5 You forgave them for spying. Chose to forgive the AI when you catch their spy stealing from you Lasts for the duration of one trade deal[4]. Forgiving them again during this time resets the turn counter.

The bonus does not stack if you forgive them multiple times.

If you choose the dialogue option to not forgive them for spying, the bonus will be removed (if present).

-4 They have opened their borders to us. They have given you Open Borders Being at war does not count for this.

You automatically gain Open Borders (and this bonus) if they are your vassal or you have resurrected them.

-3 We have shared embassies. Both players have an embassy in the other's capital Replaces both of the embassy bonuses below (doesn't apply twice).

Embassies are closed if either player denounces or declares war on the other.

-2 They have an embassy in your capital. You accepted their embassy in a trade deal Embassies are closed if either player denounces[5] or declares war on the other.
-1 We have an embassy in their capital. They accepted your embassy in a trade deal Embassies are closed if either player denounces[5] or declares war on the other.

Exclusive to Civilization IV Diplomatic Features[]

You must have the Vox Populi version of Putmalk's Civilization IV Diplomatic Features enabled to obtain these modifiers.

Value Opinion Modifier Reason(s) Notes
-50 You granted their nation independence! Free an AI player from vassalage Currently bugged.

Applies to both voluntary and capitulated vassals.

Bonus is removed if they later become your vassal again.

Lasts 100 turns.

Up to -50 You protected their cities while they were your vassal! Protect their cities while they are your vassal Currently bugged.
-30 We are vassals of the same master! Both players are vassals of the same master For human players, Allow Human Vassalage must be enabled in Advanced Settings.
-20 You are their vassal state, and they like it! You are the AI's vassal For human players, Allow Human Vassalage must be enabled in Advanced Settings.
-5 They are our voluntary vassal state. Voluntary vassal Opinion penalties for mistreating a voluntary vassal are increased by 20%.

Capitulated vassals do not receive this bonus.

Varies They are content with your treatment of them as their master. Vassal treatment is at the content level and has a positive value You can see the factors affecting this score in the Vassal Overview.

Bad Opinion Modifiers - Positive is Bad[]

Ingame, bad modifiers with a value of 10 opinion or less will be displayed in a dark red color. Bad opinion modifiers with a value of 11 opinion or more will be displayed in a bright red color. Bad modifiers are shown in an AI player's "opinion table" in descending order by value, from lowest to highest. If two modifiers have the same value, they are shown in alphabetical order.

In this list, modifiers in italics will be hidden if the civilization's visible approach towards you is FRIENDLY (unless you have the Transparent Diplomacy option enabled). Modifiers in bold will not be removed by an AI player's resurrection or capitulation.

Value Opinion Modifier Reason(s) Notes
+160 You captured their original capital. You possess their original capital Penalty applies as long as you possess their original capital. It does not matter who first conquered it, or if you obtained it in a trade deal (although trading it back to them will remove the penalty).

Penalty is halved if the AI is your capitulated vassal.

+100 We made a Declaration of Friendship with them and then declared war on them! You declared war on (backstabbed) them while you had a Declaration of Friendship with them The AI will only apply the highest Opinion penalty from all five "traitor opinion" modifiers; they do not stack. However, the text key[6] for declaring war on the AI while you were friends takes precedence over the one for declaring war on other friends, even if that penalty is higher.

Declaring war on an AI player while you're friends will cause them to consider you a backstabber.

Declaring war on human friends does not count for this, and if a backstabbed AI friend's slot is filled by a human player in multiplayer, the penalty is ignored.

Vassals do not obtain backstabbing penalties.

Penalty is removed after 3x the length of one deal duration (150 turns on standard speed).[4]

Resurrecting a player will remove this penalty, but having them capitulate to you will not, unlike most modifiers.

+100 You nuked them! Nuked them Penalty applies if any of their units or tiles are caught within the blast radius (and it also causes you to declare war on them), so be careful where you aim!
+10 to +100 You have chosen to adopt the X Ideology, but they believe in Y. Opposing ideologies If you have no ideology, you will not receive a penalty.

Vassals will automatically adopt the master's ideology.

Penalty depends on era:

+10 pre-Industrial era

+70 in Industrial Era

+90 in Modern Era

+100 in Atomic Era

+80 in Information Era

+80 You captured their Holy City! You possess their Holy City Penalty applies as long as you possess their Holy City, if it is still a Holy City. Using an Inquisitor on the city will remove its Holy City status, and this penalty.

It does not matter who first conquered the city, or if you obtained it in a trade deal (although trading it back to them will remove the penalty).

Penalty is halved if the AI is your capitulated vassal.

+15 to +60 Territorial disputes strain your relationship. Territorial (border) disputes Penalty depends on the Land Dispute Level, which is primarily based on the number of nearby contested tiles.

WEAK dispute level: +15 opinion

STRONG dispute level: +25 opinion

FIERCE dispute level: +40 opinion

AI's era is Ancient or Classical: +10 opinion

AI's leader traits provide war bonuses: +10 opinion

+40 to +50 You have killed City-States under their protection! Killed (conquered) City-States under their protection Penalty is forgotten after 50 turns since the most recent conquest, although the number of killed City-States is still stored in memory.[7]

Annexing a City-State via Mongolia's Unique Ability counts as killing them, not bullying them.

Penalty applies on top of any penalties for ignoring/breaking City-State conquest promises.

+40 base penalty, +10 if you've killed multiple protected City-States

+20 to +47 They know you are competing with them, and they hate it! (Fierce)

They suspect you are competing with them. (Strong)

They fear you are competing with them. (Weak)

Competing with the AI for the same victory condition (Victory Dispute) Penalty is not applied until at least 150 turns into the game, and depends on the Victory Dispute Level[8].

Dispute Level WEAK: +20 opinion

Dispute Level STRONG: +30 opinion

Dispute Level FIERCE: +40 opinion

For each era after the Ancient Era, +1 opinion is added to this.

Vassal civilizations do not apply this penalty to any other players.

It is possible, if you are successful in general, to have both this penalty and a Victory Block penalty.

50+ You have Declared War on leaders you've made Declarations of Friendship with! You declared war on (backstabbed) players while you had a Declaration of Friendship with them The AI will only apply the highest Opinion penalty from all five "traitor opinion" modifiers; they do not stack.

The penalty is 50 * the number of backstabbed friends.

You will not receive this penalty if you declare war via a Defensive Pact or vassalage.

Declaring war on any of your friends will cause all AI players to consider you a backstabber.

Declaring war on human friends does not count for this, and if a backstabbed AI friend's slot is filled by a human player in multiplayer, the penalty is ignored.

Vassals do not obtain backstabbing penalties.

+40 You made a promise not to conquer their protected City-State, and then broke it! Broken City-State conquest promise Promise is only broken if you actually kill (conquer) the City-State.
+40 You made a promise not to declare war on them, and then broke it! Broken military promise Breaking a promise not to declare war on the AI also results in a global penalty with other civilizations, and the betrayed civilization will consider you a backstabber.
+8 to +40 You made a promise to stop converting their cities, and then broke it! Broken religious conversion promise The AI will request that you stop converting their cities if you have at least 5 "religious conversion points" (see below), and they haven't previously made the request[7]. If you promise to stop your conversions, your points will be set to 4.

If your points are subsequently increased to 5 or higher, you are considered to have broken the promise.

Penalty depends on era:

+8 in Ancient Era

+24 in Classical Era

+40 in Medieval Era

+32 in Renaissance Era

+24 in Industrial Era

+24 in Modern Era

+16 in Atomic Era

+8 in Information Era

+5 to +40 You excavated their cultural artifacts! Extracted artifacts from Antiquity Sites in the AI's territory Extracted 1 artifact: +20 opinion

Extracted 2 artifacts: +30 opinion

Extracted 3+ artifacts: +40 opinion

Every 25 turns, if 3 or less thefts were performed, the penalty for one theft is reduced by 5. Every 50 turns, the penalty for one theft is removed.

Making a promise not to steal more artifacts and keeping it will reduce the penalty by 10.

Note: If the theft happens while at war, the penalty will decay until a certain point (10 turns left), but will not be fully removed until the AI has confronted you about the stolen artifacts.[9][7]

+10 to +37 Your behavior infuriates them. (Fierce)

Your behavior angers them. (Strong)

Your behavior worries them. (Weak)

Ahead of the AI in victory competition for different victory conditions than the AI is pursuing (Victory Block) Penalty is not applied until at least 150 turns into the game, and depends on the Victory Block Level[8].

Penalty is not applied if your Opinion score is 150 or higher (Ally).

Block Level WEAK: +10 opinion

Block Level STRONG: +20 opinion

Block Level FIERCE: +30 opinion

For each era after the Ancient Era, +1 opinion is added to this.

Vassal civilizations do not apply this penalty to any other players.

+35 We made a Declaration of Friendship with them and then denounced them! You denounced (backstabbed) them while you had a Declaration of Friendship with them The AI will only apply the highest Opinion penalty from all five "traitor opinion" modifiers; they do not stack. However, the text key[6] for denouncing the AI while you were friends takes precedence over the one for denouncing other friends, even if that penalty is higher.

Denouncing an AI player while you're friends will cause them to consider you a backstabber.

In multiplayer games, if you denounce an AI friend and their slot is subsequently filled by a human player, the penalty will be ignored.

Vassals do not obtain backstabbing penalties.

+35 We have denounced them! Denounced them Denouncements close embassies for both players[5], and last for one deal duration.[4]

You cannot denounce human players or AIs you are currently at war with.

+35 They have denounced us! Denounced by them Denouncements close embassies for both players[5], and last for one deal duration.[4]
+35 They believe we are expanding our empire too aggressively! Reckless expansion Applied if all of the following conditions are met:

- Your city count is greater than 1.5x the global average.[10]

- You have more cities than the AI.

- You have at least 4 cities.

- Your proximity to the AI is CLOSE or NEIGHBORS.

- Your military strength compared to the AI's is below average.

Founded and conquered cities both count towards this penalty.

+15 to +35 You have attacked City-States under their protection! Attacked (declared war on) City-States under their protection Penalty is not applied if you have an opinion penalty for killing City-States under their protection.

If the City-State declares war on you, this penalty does not apply. Declaring war as part of a Defensive Pact or vassalage also does not apply a penalty.

Penalty is forgotten after 30 turns since the most recent war declaration, although the number of attacked City-States is still stored in memory.[7]

+20 opinion if the most recent war declaration was less than 20 turns ago, +15 opinion if it was 20 to 29 turns ago.

+15 additional penalty if you've declared war on multiple protected City-States.

30+ You stole their territory! Stole land from them during peacetime using a Great General (Construct a Citadel)

Bought their plots using America's Unique Ability

Penalty is 30x the amount of times land was stolen.

Stealing territory while at war does not incur this penalty, and going to war clears the penalty for both players.

+30 You made a promise to stop excavating their artifacts, and then broke it! Broken extract artifact promise AI will still remember if you stole artifacts previously (even if the modifier for stealing artifacts has been removed).
+10 to +30 You are competing for the favor of the same City-States! Competition with the AI over Influence with the same City-States Penalty depends on the Minor Civ Dispute Level.

WEAK dispute level: +10 opinion

STRONG dispute level: +20 opinion

FIERCE dispute level: +30 opinion

You can receive this penalty even if you aren't the City-State's ally, if your Influence total is close enough to the AI's and/or if you've lowered their Influence with Great Diplomats and World Congress resolutions.

City-States that are the AI's permanent allies or that have an Open Door resolution are not considered for this penalty.

+6 to +30 Religious differences strain your relationship. Different majority religions Pantheons and having no majority religion do not count towards this.

Penalty depends on era:

+6 in Ancient Era

+18 in Classical Era

+30 in Medieval Era

+24 in Renaissance Era

+18 in Industrial Era

+18 in Modern Era

+12 in Atomic Era

+6 in Information Era

+1 to +30 Your recent diplomatic actions disappoint them. Ended a Declaration of Friendship early through the Discuss menu

Refused a request for help from an AI friend

Refused a request to start a coop war with an AI friend (worse penalty if you also warn the target AI)

Chose insulting dialogue options[2]

One of your AI friends warned the target AI about your coop war request

AI caught you bribing another player into declaring war on them

Penalty depends on the "recent assist value", and decays over time. Pleasing them with your diplomatic actions can reduce or erase this penalty.

You will also receive the penalty for ending a Declaration of Friendship if you do so by denouncing them or declaring war on them.

If your AI friend warns the target AI of your coop war intentions, you will also receive a penalty with the target AI's teammates and Defensive Pacts.

The AI will catch you bribing another player into declaring war on them if their spies have established surveillance in any of the bribed AI's cities.

+10 to +25 You have bullied City-States under their protection! Demanded tribute from City-States under their protection Penalty applies on top of any penalty for attacking/killing protected City-States.

Annexing a City-State via Mongolia's Unique Ability counts as killing them, not bullying them.

Penalty is forgotten after 30 turns since the most recent bullying, although the number of bullied City-States is still stored in memory[7].

+15 opinion if the most recent bullying was less than 20 turns ago, +10 opinion if it was 20 to 29 turns ago.

+10 additional penalty if you've bullied multiple protected City-States.

20+ You were caught stealing from them. Your spies were caught stealing (or trying to steal) their technologies/Great Works

Plundered trade routes when not at war[11]

Other AI players were caught plotting against this AI (see "Effects of Approach" above for explanation)

Penalty is 20x the total of:

- Times player was caught stealing;

- If other player is an AI, times the other AI player was caught plotting against this AI are added to this as well.

The AI finds out about plotting through their spies or when intrigue is shared to them.

Plundering a trade route when not at war counts as stealing twice from the owner, and stealing once from the destination civilization.[12]

After the length of one deal duration[4], the number of times the player was caught stealing is reduced by 1. If the other player is an AI, the number of times they were caught plotting is also reduced by 1. Getting caught stealing or plotting again during this time resets the turn counter, in addition to adding to the number of thefts/plots.

20+ Your spies lowered their City-State Influence in a coup d'état. Lowered the AI's City-State Influence by performing a successful City-State coup Penalty is 20x the total of coups performed.

After the length of one deal duration[4] since the player last stole from the AI or lowered their Influence in a coup, the number of coups performed is reduced by 1. Performing another coup or getting caught stealing again during this time resets the turn counter, in addition to adding to the number of thefts/coups.

+20 Your friends found reason to Denounce you! Your (former) friends denounced you while they had a Declaration of Friendship with you The AI will only apply the highest Opinion penalty from all five "traitor opinion" modifiers; they do not stack.

You only need to be denounced by one friend to get this penalty; it does not stack.

The AI will only apply this penalty if their opinion (the ranking i.e. Neutral/Favorable/etc., not the score) of the player who denounced you is better than their opinion of you.

The AI will disregard denouncements by players they view as backstabbers.

In multiplayer games, if AI friends denounce you and their slot is subsequently filled by a human player, the penalty will be ignored.

Vassals do not obtain backstabbing penalties.

+20 You made a promise to stop expanding near them, and then broke it! Broken expansion promise Whether the promise was broken is determined by comparing the old and new distances between the two closest cities.

Decays over time.

+20 You made a promise to stop buying land near them, and then broke it! Broken border (land buying) promise Decays over time.
+20 You made a promise to stop spying on them, and then broke it! Broken spy promise If war is declared, spying promises are cancelled for both players.
+20 You made a promise to stop demanding tribute from a City-State protected by them, and then broke it! Broken City-State bullying promise Annexing a City-State via Mongolia's Unique Ability counts as killing them, not bullying them.
+20 You made a promise to start a cooperative war against another empire, and then broke it! Broken coop war promise Does not apply to teammates. Decays over time.

Ending a Declaration of Friendship through the Discuss menu or by denouncing/declaring war on them also applies this penalty.

+20 They asked you to stop excavating their artifacts, and you ignored them! Ignored (request to make an) extract artifact promise Penalty is not applied if you have an opinion penalty for breaking an extract artifact promise.

Decays over time.

+20 We helped their proposal fail in the World Congress / United Nations. Voted against their World Congress / United Nations proposal, and the proposal failed The amount of delegates you use to vote against it is irrelevant, as long as the resolution fails.

Lasts 30 turns.

+10 to +20 You are competing for World Wonders. You beat the AI by completing World Wonders first Only applied to players that the AI has met, and if the AI had partially built the Wonder(s) at the time. Penalty depends on the Wonder Dispute Level.

WEAK dispute level: +10 opinion

STRONG dispute level: +15 opinion

FIERCE dispute level: +20 opinion

+10 to +20 You demanded they not settle near their lands! "Don't settle new Cities near us." in the Discuss menu Penalty is halved after 50 turns and removed after 100 turns. It is applied regardless of whether the AI agrees to the request.
+5 to +20 Your military deployment is extremely threatening. (High or Incredible)

Your military deployment is threatening. (Low or Medium)

Your military units are near the AI's borders, and they feel threatened Penalty is not applied if you have a Declaration of Friendship or Defensive Pact with the target, or they have given you Open Borders.

The penalty still applies while at war, although the modifier is not visible. It depends on the number of your units the AI can see within 4 tiles of one of their cities.

0 units: Aggressive posture NONE

1-2 units: Aggressive posture LOW

3-4 units: Aggressive posture MEDIUM

5-7 units: Aggressive posture HIGH

8+ units: Aggressive posture INCREDIBLE

The opinion penalty is 5x the aggressive posture (Low = 1, Incredible = 4).

Units inside your own borders count as half, and the AI doesn't count units that are within 4 tiles of a city owned by another player you're at war with.

Civilian and scouting units are disregarded.

+4 to +20 They asked you to stop converting their cities, and you ignored them! Ignored religious conversion promise Penalty is not applied if you have an opinion penalty for breaking a religious conversion promise.

The AI will request that you stop converting their cities if you have at least 5 "religious conversion points" (see above), and they haven't previously made the request[7].

Penalty depends on era:

+4 in Ancient Era

+12 in Classical Era

+20 in Medieval Era

+16 in Renaissance Era

+12 in Industrial Era

+12 in Modern Era

+8 in Atomic Era

+4 in Information Era

+18 You have Denounced a leader they made a Declaration of Friendship with! Denounced one of their friends You only need to denounce one of their friends to get this penalty; it does not stack.
+18 You have made a Declaration of Friendship with one of their enemies! Declaration of Friendship with a player they (currently have) denounced You only need one befriended enemy to get this penalty; it does not stack.
+5 to +18 We have divergent Social Policies. Unlocked different Social Policy branches AI checks how many Social Policy branches each player has unlocked. Ideologies do not count towards this.

+1 per branch only one player has unlocked

-1 per branch both players have unlocked

If the total from this is positive, then it adds 5 or the total to the Opinion score, whichever is greater.

Penalty is doubled if the AI player's Neediness flavor is greater than 7.

The number of individual policies obtained in each branch is not considered.

+15 You made a promise not to declare war on another civilization, and then broke it! Broken military promise (global penalty) This global penalty is not applied if the player broke a promise not to declare war on this specific AI.
+15 They asked you to stop expanding near them, and you ignored them! Ignored expansion promise Penalty is not applied if you have an opinion penalty for breaking an expansion promise with them.

Decays over time.

+15 They asked you to stop buying land near them, and you ignored them! Ignored border (land buying) promise Penalty is not applied if you have an opinion penalty for breaking a border (plot buying) promise with them.

Decays over time.

+15 They asked you to stop attacking their protected City-State, and you ignored them! Ignored City-State conquest promise Penalty is not applied if you have an opinion penalty for breaking a City-State conquest promise.

Decays over time.

+15 They disliked your proposal to the World Congress / United Nations. Disliked your World Congress / United Nations proposal Hovering over the options for proposed resolutions will indicate whether an AI player would be happy or unhappy with a given resolution.

Even if they change their mind later, the bonus or penalty applied at the time of proposing the resolution will count.

Lasts 30 turns, or until you propose a resolution they do like.

10+ You have Denounced leaders you've made Declarations of Friendship with! You denounced (backstabbed) players while you had a Declaration of Friendship with them The AI will only apply the highest Opinion penalty from all five "traitor opinion" modifiers; they do not stack.

Denouncing 2 or more friends will cause all AIs to view you as a backstabber, unless you're a vassal.

The penalty is 15 * the number of friends you denounced if the AI views you as a backstabber.

If they do not view you as a backstabber, the AI will apply a penalty of +10 for each friend you denounced if their opinion (ranking, not score) of the friend you denounced is greater than their opinion of you.

In multiplayer games, if you denounce an AI friend and their slot is subsequently filled by a human player, the penalty will be ignored.

Vassals do not obtain backstabbing penalties.

10+ You made a trade demand of them! Demanded Gold, resources, etc. from them If you are friends with the AI, you can Request Help instead of making a demand, which does not carry a penalty.

The penalty is 10x the amount of demands made; however, after the first two demands, the demand is only counted if it was accepted by the AI.

+10 You have made a Defensive Pact with one of their enemies! Defensive Pact with a player they've denounced You only need one DP with an enemy to get this penalty; it does not stack.
+10 You killed or captured civilians during war! Opinion penalty of 50+ for capturing/killing civilians with any player Penalty is only applied if the AI's opinion (ranking, not score) of you is less than Favorable, and you don't have a Declaration of Friendship or Defensive Pact with them.

The global penalty applies on top of the penalty for capturing/killing civilians with this AI, if any.[13]

+10 They asked you to stop spying on them, and you ignored them! Ignored spy promise Penalty is not applied if you have an opinion penalty for breaking a spy promise.

Decays over time.

+10 They asked you to stop demanding tribute from a City-State protected by them, and you ignored them! Ignored City-State bullying promise Annexing a City-State via Mongolia's Unique Ability counts as killing them, not bullying them.

Penalty is not applied if you have an opinion penalty for breaking a City-State bullying promise.

Decays over time.

+10 They mistreated your protected City-States, and you didn't look the other way! Refused to side with the AI after they bullied or attacked your protected City-States Lasts 10 turns.
+10 You asked them not to spy on you. "Stop spying on me." in the Discuss menu Penalty is halved after 50 turns and removed after 100 turns. It is applied regardless of whether the AI agrees to the request.
5+ You plundered their trade routes! Plundering a trade route connected to one of their cities Penalty is applied twice for the trade route owner, and (for external trade routes) once for the destination civ, every time a trade route is plundered.

After half the length of one deal duration[4], the penalty for plundering one trade route is removed. Plundering another trade route during this time resets the turn counter, in addition to worsening the penalty.

Plundering a trade route also applies a temporary opinion penalty with the owner for killing/capturing their civilian units. This penalty is +10 in the Ancient Era, and lower in later eras.

2+ They are spreading their own religion, but you converted some of their cities to your religion. Converted AI's cities with Missionaries and/or Great Prophets, if they're spreading their own religion Spreading religion without actually converting the city will not give a penalty. Passive spreading of religion (through pressure, trade routes, and spies) will not give a penalty.

The base penalty is 2x the # of "religious conversion points". These are earned as follows:

Converting one of their cities (their religion was not the previous majority): +1 point

Converting one of their cities (their religion was the previous majority): +3 points

Converting their Holy City: +25 points

The AI will request that you stop converting their cities if you have at least 5 points, and they haven't previously made the request[7]. If you promise to stop your conversions, your points will be set to 4.

The base penalty is then multiplied by an era multiplier, and then added to Opinion:

Ancient: 1x multiplier

Classical: 3x multiplier

Medieval: 5x multiplier

Renaissance: 4x multiplier

Industrial: 3x multiplier

Modern: 3x multiplier

Atomic: 2x multiplier

Information: 1x multiplier

After the length of one deal duration[4], religious conversion points are reduced by 1. Converting another city during this time will reset the turn counter (in addition to adding more points).

1+ You killed or captured their civilians! Killed or captured their civilians

Plundered their trade units Razed their cities after capturing them

Razing their cities will add no penalty in the Ancient Era, and 5 * the era number thereafter for every Population decrease from razing. The penalty decays over time, and decays faster if your current relationship with them is friendly.

Killed Great People apply a worse penalty than normal units, particularly if the turn # is less than 100. The penalty also scales based on game speed.

If you have a penalty of 50+ with any AI, you will also receive a global penalty.

Warmongering Penalties[]

Value Opinion Modifier Reason(s) Notes
5+ (see notes) They have some early concerns about your warmongering. (Minor)

They clearly see the potential threat posed by your warmongering. (Major)

They believe your warmongering has become an issue of global prominence. (Severe)

They fear your warmongering will soon sink the world into a new Dark Age! (Critical)

Followed by one of:

(They overlook modest warmongering.)

(They dislike warmongers.)

(They hate warmongers!)

Warmongering penalties from declaring war and capturing cities Warmongering penalties are accumulated by declaring war and capturing cities, and slowly decay over time. It is possible to accumulate very high penalties for warmongering.

The calculation for warmongering penalties is too complicated to display here and involves numerous factors; however, some important caveats are noted below.

The severity of the indicator message depends on your Warmonger Threat rating (which ranges from NONE to CRITICAL).

AI leaders have a Warmonger Hate flavor which determines how much they care about warmongering. If the flavor is 7 or higher, "they hate warmongers". If it's 5 or 6, "they dislike warmongers". If it's below 5, "they overlook modest warmongering".

Opinion penalties of +1 to +4 are treated as 0.

Vassals do not obtain warmongering penalties; they also don't care about their master's warmongering, and upon vassalization, any previous warmongering penalty is cleared for both players.

You will not obtain penalties for declaring war with players who are also at war with the target.

You will not obtain penalties for declaring war if it was done because of a Defensive Pact or vassalage.

If the City-State Diplomacy mod is active, the Global Peace Accords resolution will increase warmongering penalties and decrease the decay rate. The Casus Belli resolution will decrease warmongering penalties and increase the decay rate.

Sanctioned players will also have warmonger penalties against them halved, and they will decay faster.

Exclusive to Civilization IV Diplomatic Features[]

You must have the Vox Populi version of Putmalk's Civilization IV Diplomatic Features enabled to obtain these modifiers.

Value Opinion Modifier Reason(s) Notes
+1 to +9 (Content)

+10 to +29 (Disagree)

+30 to +59 (Mistreated)

+60 to +99 (Unhappy)

+100 or worse (Enslaved)

They are content with your treatment of them as their master. (Content)

They disagree with some of your policies as their master. (Disagree)

They believe they are being mistreated as your vassal! (Mistreated)

They are extremely unhappy with your rule over them! (Unhappy)

They believe they are being enslaved by your rule over them! (Enslaved)

Vassal treatment You can see the factors affecting this score in the Vassal Overview.
+50 You refused to grant them independence when they asked! Refuse to grant them independence Refusing to grant a vassal independence causes you to declare war on them.

Lasts 100 turns.

Up to +50 You failed to protect their cities while they were your vassal! Your vassal's cities are captured

Your vassal's units are killed while near their own cities

Units within 3 tiles of one of their cities count against this. Possibly bugged.

Only applies if they're currently your vassal.

+40 You declared war on them while they were your vassal! Declare war on your own vassal All players on the master's team will receive this penalty with all players on the vassal's team.

Penalty is removed after 3x the length of one deal duration (150 turns on standard speed).[4]

20+ They fear your acquisition of multiple vassals! You are the master of multiple vassals Penalty is not applied for vassals and friends.

AI must have actually met a vassal to count them towards the opinion penalty.

You do not obtain an opinion penalty for having one vassal; if you have two or more, the penalty is 10x the number of vassals you have.

Each player on a team counts as one vassal.

Neutral Opinion Modifiers - No Effect[]

These modifiers are displayed to give information to the player, but do not affect your Opinion score. Neutral modifiers are displayed in white text.

Opinion Modifier Reason(s) Notes
We are on the same team. Teammates Has a "value" of 99999 with Transparent Diplomacy, but does not actually affect Opinion.
You are at war! At war with them Has a "value" of -99999 with Transparent Diplomacy, but does not actually affect Opinion.
You have gone to war in the past. Previously at war Does not appear if at war. Only appears if their visible approach is GUARDED, HOSTILE, or NEUTRAL (if dialogue is hostile[14]).
You have been at war in the past, but they do not seem to hold a grudge. Previously at war Does not appear if at war. Only appears if their visible approach is FRIENDLY, AFRAID, or NEUTRAL (if dialogue is not hostile[14]).
They are our vassal state. Capitulated vassal Voluntary vassals get an Opinion bonus instead.
They are content with your treatment of them as your master. Vassal treatment at the Content level and value is 0 You can see the factors affecting this score in the Vassal Overview.
There haven't been any major incidents which have shaped your relationship. Visible approach of NEUTRAL Only appears if there are no other modifiers visible.
They desire friendly relations with our empire. Visible approach of FRIENDLY Does not appear if at war.
They fear our great might! Visible approach of AFRAID Does not appear if at war.
They suspect we might be a threat to them. Visible approach of GUARDED Does not appear if at war.
They don't want anything to do with us right now. Visible approach of HOSTILE Does not appear if at war.
You promised not to settle near them for another # turn(s). Expansion promise (you) Ends early if war is declared.
You promised not to buy land near them for another # turn(s). Border promise (you) Ends early if war is declared.
You promised not to declare war on them for another # turn(s). Move troops promise (you) Ends early if war is declared.
They promised not to settle near you for another # turn(s). Expansion promise (them) Ends early if war is declared.
They promised not to declare war on you for another # turn(s). Move troops promise (them) Ends early if war is declared.
Some modifiers for teammates Certain bad modifiers (such as making a Declaration of Friendship with a civilization's enemy, or having a different ideology) will still be displayed for teammates, but with a value of 0.

This is only to give information to the player, since AI teammates don't use or calculate Opinion score.

Other modifiers (like warmongering) don't apply to teammates and won't appear at all in the list of modifiers.

Base Opinion Modifier[]

The player or modders can make the game easier or more difficult by adding a "base opinion modifier" for the AI towards human players and/or AI players. This modifier is 0 by default, but can be changed to a positive or negative value in the DiploOpinionWeights.sql file.

If non-zero, the modifier will be hidden unless you enable "Show Base Opinion Score" in DiploAIOptions.sql or the Transparent Diplomacy game option has been activated.

If shown, the associated messages that will be displayed in the opinion table are:

Opinion Score Change Opinion Modifier
-20 or better They instinctively like you!
-1 to -19 They instinctively view you more favorably.
+1 to +19 They instinctively view you as a competitor.
+20 or worse They instinctively hate you!

War Declarations[]

Normal War Declarations[]

For the AI civilization to declare war on a major civilization through the normal process, the following conditions must be met:

  • The AI must be able to declare war;
  • The AI must be in position to declare war, i.e. their troops are ready to attack;
  • The AI must have the WAR approach towards its target (some exceptions[15]);
  • The AI's war declaration would not backstab any of their friends[16];
  • The AI must not be already at war with any other major civilization[17].

If all of these conditions are met, the AI will declare war on its turn.


Other War Declarations[]

While the AI will not declare war on other players normally unless all of the above conditions are met, it can also declare war under the following circumstances:

  • As part of a cooperative war agreement ("coop war") with another civilization. When this happens, both civilizations will declare war at once. Only civilizations that are friends with each other can start cooperative wars.
  • If it was bribed by another player to declare war (Third Party - Declare War under the Trade screen).
  • If the AI makes a demand of another player and it is refused, the AI might declare war.
  • If one of the AI's vassals demands independence and the master refuses, they will declare war on the vassal.
  • If a human player picks the insulting response ("You'll pay for this in time.") when the AI makes certain statements, the AI might declare war.

The AI is intelligent enough to factor in a player's Defensive Pacts, masters/vassals and teammates, and will aim to avoid declaring war on friends or powerful neighbors.

Notes[]

  1. This includes if the AI has the RECALLED TO LIFE "special" approach because you just resurrected them; if their visible approach underneath that is FRIENDLY, the modifiers will be hidden. This is rarely important, however, because resurrecting a player clears most negative modifiers.
  2. 2.0 2.1 Responding with "You'll pay for this in time." to a declaration of war on you will not result in any penalties.
  3. 3.0 3.1 3.2 3.3 3.4 3.5 3.6 Declaring war as part of a Defensive Pact/vassalage will not remove the bonus (but declaring war because a teammate declares war will remove it).
  4. 4.00 4.01 4.02 4.03 4.04 4.05 4.06 4.07 4.08 4.09 4.10 4.11 4.12 Deal duration (in turns) depends on game speed.
  5. 5.0 5.1 5.2 5.3 Masters and vassals have permanent two-way embassies with each other. This is also the case if either player has previously resurrected the other (while not at war).
  6. 6.0 6.1 Text key = the text shown for the opinion modifier in the AI's opinion table.
  7. 7.0 7.1 7.2 7.3 7.4 7.5 7.6 If you resurrect the AI or they capitulate to you, the AI's memory of this will be cleared.
  8. 8.0 8.1 You can disable the penalties for victory competition in CoreChanges.sql, under "Diplo AI Aggression Options".
  9. Does not apply if it's a permanent war (advanced game options), the game is multiplayer, or you have previously ignored/broken a promise to stop excavating artifacts.
  10. Major civilizations and City-States with 2 or more cities count towards the global average. Barbarians, dead players, players the evaluating AI hasn't met, players with no cities, and City-States with only one city do not count.
  11. Morocco has a hidden component to their Unique Ability: if they plunder a trade route while not at war, the trade route owner and destination civilization will only be informed of the plundering if they have visibility of the plot where the trade route was plundered. If they do not have visibility, the notification will state that Barbarians were responsible. This means that Morocco will not receive diplomacy penalties if they plunder trade routes while they're out of sight.
  12. If the destination civilization is at war with the owning civilization, they will not add a penalty if the trade route is plundered.
  13. If you have both a global penalty and a civ-specific penalty, the civ-specific penalty "You killed or captured their civilians!" will be displayed, and +10 opinion will be added to the displayed penalty for that modifier (until you no longer have a global penalty with them).
  14. 14.0 14.1 Dialogue will be hostile if your Opinion score is 70 or higher (Enemy).
  15. Exceptions: 1) AIs with the HOSTILE approach can declare war if they're aiming for a Domination Victory. 2) AIs that are close to winning a Domination Victory can declare war if their approach is HOSTILE or DECEPTIVE. 3) If the target player is close to winning the game, the AI can declare war if their approach is HOSTILE or DECEPTIVE.
  16. If the AI's war declaration would cause them to be at war with a player they have a Declaration of Friendship with, they will not declare war. This also applies to Defensive Pacts, players that have an Opinion score of -150 or lower (ALLY), players who have resurrected them, players who they've resurrected, and players who they've promised not to attack for a number of turns. The AI also performs this check when declaring war through other means.
  17. Does not apply if all of the AI's wars are going well for them, the target player is nearby, and it believes the target player would be easy to conquer (must meet all three conditions to allow another war declaration).
Advertisement