Basic Diplomacy Opinion Mechanics Guide - Numbers Behind Diplomatic Actions

OursIstheFury

Chieftain
Joined
Apr 13, 2013
Messages
21
My current hobby is detangling the diplomacy system, which is quite creative and, in other ways, quite a travesty. The easiest part to understand is how the AI forms an opinion about you based on your (and their) actions.

Also, it's important to note that opinions are NOT displayed for you to see anywhere in the game. Note hostile, guarded, etc. are not listed below. The game instead labels this as "approach," which is influenced by the AI's opinion of you (or the other AI in question). So you can think of opinion as how the AI evaluates your civilization in relation to their's, and approach is the action(s) they choose to take based on this.

A final notice is that many, many other factors play a role in the AI's overall behavior. Military strength, economic strength, evaluation of your land value, competing for the same victory type, proximity, competing for the same wonders/City States, warmongering status, etc. The practical value of these weights is to know what kind of impact your diplomatic actions have on the process, but just be mindful that there are other steps that take place that can make all the difference in the AI's behavior.

[TABLE=head]Opinion|Thresholds
Ally|-80
Friend|-40
Favorable|-15
Neutral|-14 to 14(?)
Competitor|15
Enemy|40
Unforgivable|80[/TABLE]

One thing to take heed of is that the common idiom of someone having "a high opinion of you" means quite the opposite in this game. Specifically, negative numbers lead to favorable opinions and positive lead to unfavorable. It is notable that the City State "Influence" system works in exactly the opposite way, thus awarding positive numbers ("weights") for positive actions on your part. It's also important to understand that these weights dictate how the AI's compute the opinions of each other as well.

So here's the grand list. Note that you can sort by clicking on column heads. The category column labels were arbitrarily made by me just for sorting purposes; ignore them otherwise. Finally, note that I say "interpretation" because I only think I understand them correctly. I'm wide open to feedback or differences in opinion about my interpretation, especially on ones marked with a "(?)" at the end. Hence I included the labels used in the database.

[TABLE=head]Category|Value|Description|Label
Border|15|Number of turns before IGNORING a border reuqest is forgiven|OPINION_WEIGHT_BORDER_PROMISE_IGNORED_MAX
Border|15|Ignoring AI's reuqest to quit claiming tiles so close to their borders. |OPINION_WEIGHT_IGNORED_BORDER_PROMISE
Border|20|Max number of turns before breaking a border promise is forgiven.|OPINION_WEIGHT_BORDER_PROMISE_BROKE_MAX
Border|20|Claiming tiles too close to AI's cities after promising you would not.|OPINION_WEIGHT_BROKEN_BORDER_PROMISE
City-State|5|Ignoring AI's request to quit befriending City State under their influence.|OPINION_WEIGHT_SIDED_WITH_THEIR_MINOR
City-State|10|Bullied more than one City-State under the AI's protection|OPINION_WEIGHT_BULLIED_MANY_PROTECTED_MINORS
City-State|10|Weight slightly reduced from "recent"; applied after a set number of turns pass |OPINION_WEIGHT_BULLIED_PROTECTED_MINOR_WHILE_AGO
City-State|10|Raze (and/or Capture?) more than one CS under AI's protection|OPINION_WEIGHT_KILLED_MANY_PROTECTED_MINORS
City-State|10|Number of turns before siding with their City-State is forgiven|OPINION_WEIGHT_SIDED_WITH_THEIR_MINOR_NUM_TURNS_UNTIL_FORGIVEN
City-State|15|Attacked more than one City-State under their protection|OPINION_WEIGHT_ATTACKED_MANY_PROTECTED_MINORS
City-State|15|AI's way of holding a grudge for bullying multiple of their protected CS.|OPINION_WEIGHT_ATTACKED_PROTECTED_MINOR_WHILE_AGO
City-State|15|Max number of turns before being forgiven for attacking city state you agreed not to. |OPINION_WEIGHT_BROKEN_CITY_STATE_PROMISE_WORLD
City-State|15|AI's way of holding a grudge for bullying their protected CS.|OPINION_WEIGHT_BULLIED_PROTECTED_MINOR_RECENTLY
City-State|20|Attacked (but not killed) protected CS recently|OPINION_WEIGHT_ATTACKED_PROTECTED_MINOR_RECENTLY
City-State|20|Threshold (i.e. after 20 turns) for shifting from "recent" (+20) to "while_ago" (+15)?|OPINION_WEIGHT_ATTACKED_PROTECTED_MINOR_RECENTLY_NUM_TURNS
City-State|20|Threshold (i.e. after 20 turns) for shifting from "recent" (+20) to "while_ago" (+15)?|OPINION_WEIGHT_BULLIED_PROTECTED_MINOR_RECENTLY_NUM_TURNS
City-State|30|Number of turns until fully forgiven forattacking a protected CS. |OPINION_WEIGHT_ATTACKED_PROTECTED_MINOR_NUM_TURNS_UNTIL_FORGIVEN
City-State|30|Number of turns until fully forgiven for bullying a protected CS. |OPINION_WEIGHT_BULLIED_PROTECTED_MINOR_NUM_TURNS_UNTIL_FORGIVEN
City-State|40|Attacking a CS that you promised an AI you wouldn't.|OPINION_WEIGHT_BROKEN_CITY_STATE_PROMISE
City-State|50|Turns until capturing a protected CS is finally forgiven.|OPINION_WEIGHT_KILLED_PROTECTED_MINOR_NUM_TURNS_UNTIL_FORGIVEN
Coty-State|15|Ignoring request to withdraw attack on a specific city state.|OPINION_WEIGHT_IGNORED_CITY_STATE_PROMISE
City-State|40|Broke promise that you were not going to invade their lands. |OPINION_WEIGHT_BROKEN_MILITARY_PROMISE
City-State |40|Captured a CS protected by AI.|OPINION_WEIGHT_KILLED_PROTECTED_MINOR
Dec. of Friendship|-15|Player becomes ally a friend of the AI.|OPINION_WEIGHT_DOF_WITH_FRIEND
Dec. of Friendship|15|Allying an enemy of the AI|OPINION_WEIGHT_DOF_WITH_ENEMY
Dec. of Friendship|-35|You and the AI become allies (mutual exchange). |OPINION_WEIGHT_DOF
Denonce|15|Denounce the friend of an AI.|OPINION_WEIGHT_DENOUNCED_FRIEND_EACH
Denounce|-15|Denounce an enemy of the AI.|OPINION_WEIGHT_DENOUNCED_ENEMY
Denounce|-10|Denounced by their friend that third-party AI (common enemy)|OPINION_WEIGHT_DENOUNCED_BY_FRIEND_DONT_LIKE
Denounce|15|Backstabbing a friend via denouncement(?)|OPINION_WEIGHT_DENOUNCED_FRIEND
Denounce|20|People's opinion of you for each of your friends currently denouncing you ()|OPINION_WEIGHT_DENOUNCED_BY_FRIEND_EACH
Denounce|35|Player is denounced by AI. |OPINION_WEIGHT_DENOUNCED_ME
Denounce|35|Either Player's friends or denouncer's friends get this weight after you are denounced.|OPINION_WEIGHT_DENOUNCED_ME_FRIENDS
Embassy|-1|Accept an embassy from the AI's nation.|OPINION_WEIGHT_EMBASSY
Espionage|-10|Choosing to forgive the AI when you catch them spying. |OPINION_WEIGHT_FORGAVE_FOR_SPYING
Espionage|-10|Sharing pertinent espionage intrigue with AI. |OPINION_WEIGHT_INTRIGUE_SHARED_BY
Espionage|10|Asking AI to stop spying on you (not having caught their spy).|OPINION_WEIGHT_ASKED_STOP_SPYING
Espionage|10|Ignore AI's reuqest for you to quit stationing your spy in their city.|OPINION_WEIGHT_IGNORED_SPY_PROMISE
Espionage|20|Getting caught spying on the AI while still under an agreement to cease.|OPINION_WEIGHT_BROKEN_SPY_PROMISE
Expansion|15|Either (1) # of turns until forgiven, or (2) max number of times ignoring opinion penalty can stack, or (3) prevents ignoring from stacking.|OPINION_WEIGHT_EXPANSION_PROMISE_IGNORED_MAX
Expansion|15|Ignoring request not to settle onto their territory|OPINION_WEIGHT_IGNORED_EXPANSION_PROMISE
Expansion|20|Breaking promise not to settle on their territory|OPINION_WEIGHT_BROKEN_EXPANSION_PROMISE
Expansion|20|Either (1) # of turns until forgiven, or (2) max number of times breaking penalty can stack, or (3) prevents breaking penalty from stacking.|OPINION_WEIGHT_EXPANSION_PROMISE_BROKE_MAX
Liberate|-200|Liberate a city/capital for the AI leader when it is "dead", or out of the game (resurrection). |OPINION_WEIGHT_RESURRECTED
Liberate|-80|Liberate a capital belonging to the AI.|OPINION_WEIGHT_LIBERATED_CAPITAL
Liberate|-60|Bonus for liberating a total of two cities.|OPINION_WEIGHT_LIBERATED_THREE_CITIES
Liberate|-50|Bonus for liberating a total of three cities.|OPINION_WEIGHT_LIBERATED_TWO_CITIES
Liberate|-40|Liberated a city belonging to the AI. |OPINION_WEIGHT_LIBERATED_CITY
Liberate|-30|Bonus for liberating one city.|OPINION_WEIGHT_LIBERATED_ONE_CITY
Liberate|-20|Return a captured civilian belonging to the AI.|OPINION_WEIGHT_RETURNED_CIVILIAN

Military|-50|Max bonus you can get for common foe.|OPINION_WEIGHT_COMMON_FOE_MAX
Military|15|Number of turns befoe the weight for breaking a promise not to invade is lifted.|OPINION_WEIGHT_BROKEN_MILITARY_PROMISE_WORLD
Military|15|Ignored promise not to invade(?)|OPINION_WEIGHT_IGNORED_MILITARY_PROMISE
Military|20|Not fulfilling a cooperative war pact made with AI. |OPINION_WEIGHT_BROKEN_COOP_WAR_PROMISE
Military|40|Weight applied to friends of player having war declared on them (?)|OPINION_WEIGHT_WAR_FRIEND_EACH
Military|50|Declaring war on the same AI, regardless of current opinion.|COMMON_FOE_VALUE_PER_OPINION_WEIGHT
Military|25|Number of turns before they no longer care you shared a common foe. |COMMON_FOE_VALUE_PER_TURN_DECAY
Misc|-20|Return a captured (barbarians) civilian belonging to the AI.|OPINION_WEIGHT_RETURNED_CIVILIAN
Misc|30|"Stealing" territory via Great Generals special ability (?)|OPINION_WEIGHT_CULTURE_BOMBED
Misc|35|Expander version of warmonger?|OPINION_WEIGHT_RECKLESS_EXPANDER
Policies|-5|Adopting the same late-game policies as the AI.|OPINION_WEIGHT_SAME_LATE_POLICIES
Policies|5|Adopting different late-game policies as the AI.|OPINION_WEIGHT_DIFFERENT_LATE_POLICIES
Religion|-5|Adopting the religion founded by the AI.|OPINION_WEIGHT_ADOPTING_HIS_RELIGION
Religion|-3|AI adopts your religion (via pressure?)|OPINION_WEIGHT_ADOPTING_MY_RELIGION
Religion|2|Applied per AI citizen converted to your religion via Prophets/Missionaries|OPINION_WEIGHT_PER_NEGATIVE_CONVERSION
Religion|4|Ignoring AI's request to quit converting their cities using Prophets/Missionaries|OPINION_WEIGHT_IGNORED_NO_CONVERT_PROMISE
Religion|8|Converted AI city with Prophet/Missionary after agreeing not to.|OPINION_WEIGHT_BROKEN_NO_CONVERT_PROMISE
Religion|25|Converting an AI's holy city.|RELIGION_DIPLO_HIT_CONVERT_HOLY_CITY
Religion|1|Converting only some of a city's citizens (?)|RELIGION_DIPLO_HIT_INITIAL_CONVERT_FRIENDLY_CITY
Religion|3|Making your religion the dominant faith in a friendly AI's city. |RELIGION_DIPLO_HIT_RELIGIOUS_FLIP_FRIENDLY_CITY
Religion|10|?|RELIGION_DIPLO_HIT_THRESHOLD
Settle|20|Asking AI to stop settling near you.|OPINION_WEIGHT_ASKED_NO_SETTLE
Trade|-30|Give them the "full value" of gold for traded goods (?)|OPINION_WEIGHT_TRADE_MAX
Trade|15|Each time you directly refuse a request from the AI (DoF, donate luxury goods, etc.)|OPINION_WEIGHT_REFUSED_REQUEST_EACH[/TABLE]

More to come eventually.
 
This is very interesting and really well done. It's a bit depressing to sort by value but that's only to be expected.

Do you know if it's possible to come back from unforgivable? I presume that it's possible to lose Ally.
 
No wonder diplomacy is broken look at all those positif modifiers and almost non negatif modifiers

Policies -5 Adopting the same late-game policies as the AI. Really that doesn't give you a lot of relationboost
 
No wonder diplomacy is broken look at all those positif modifiers and almost non negatif modifiers

Policies -5 Adopting the same late-game policies as the AI. Really that doesn't give you a lot of relationboost

That's because that's not the modifier.

The modifier is -5 * DiploEmphasisLatePolicies.

Ancient - Renaissance:
DiploEmphasisLatePolicies = 0

Industrial:
DiploEmphasisLatePolicies = 4 (-20)

Modern:
DiploEmphasisLatePolicies = 6 (-30)

Atomic:
DiploEmphasisLatePolicies = 4 (-20)

Future:
DiploEmphasisLatePolicies = 2 (-10)


If there are any further questions on specific modifiers on this sheet, I will be able to answer them.

OPINION_WEIGHT_WAR_FRIEND_EACH - We declared war on a person we had a DoF with, diplomatic hit is the weight * duration of opinions. (varies with game speed)
RELIGION_DIPLO_HIT_THRESHOLD - does nothing at all
RELIGION_DIPLO_HIT_INITIAL_CONVERT_FRIENDLY_CITY - convert another player's city to your religion, when that city has no religion in it, and he follows a different religion.
OPINION_WEIGHT_IGNORED_MILITARY_PROMISE - Yes, ignored, not broken, military promise.
OPINION_WEIGHT_DENOUNCED_FRIEND - modifier is number of friends denounced * modifier. Occurs when you denounce a DoF ally.

The source code is telling me OPINION_WEIGHT_INTRIGUE_SHARED_BY is -20, not -10? Also, it's number of times intrigued shared by * OPINION_WEIGHT_INTRIGUE_SHARED_BY
 
Nice. Over the winter I had been asking around for something like this and there was nothing like this guide around... Please expand this and keep it up to date once BNW comes out. I'm sure a lot of diplomacy players like me would find this very helpful! (rather than just my vague ideas of what the AI likes/wants/hates). :clap:
 
It's actually better than I thought (so far). DoF two civs who are friends with each other and you're solidly friends with both of them; share some intrigue, trade a little, denounce their enemies, and you're into ally territory.

Most importantly, the negative modifiers you're most likely to get in a peaceful game (befriending their favorite city-states and spying on them) are pretty small. I'll be curious to see exactly how the "you're building too many cities" modifiers shake out, though.
 
It's actually better than I thought (so far). DoF two civs who are friends with each other and you're solidly friends with both of them; share some intrigue, trade a little, denounce their enemies, and you're into ally territory.

Most importantly, the negative modifiers you're most likely to get in a peaceful game (befriending their favorite city-states and spying on them) are pretty small. I'll be curious to see exactly how the "you're building too many cities" modifiers shake out, though.

The problem with the spying is that it stacks (I assume), and doesn't go away. So, -10 might not seem that bad, but it takes forever to go away and you can't get caught spying on them again. The description the OP gave is wrong, the "asked" category triggers when the AI asks YOU, not when you ask the AI. That's the penalty for being caught basically. There's an additional -10 penalty when you choose to ignore that request, instead of saying "Sorry, I will stop".

Openly Spying: So, if you're going to spy on someone, you get the -10 penalty first time you're caught, then it's -20 cumulative immediately if you don't promise to stop; when you get caught again, it goes to -40, assuming you still don't promise to stop.

Lying About Stopping: If you do promise to stop, it stays at -10, but then goes to -40 the next time you break it (2x ask to stop + 1x break promise), assuming you promise to stop again. This will snowball to -30 each time you're caught, instead of the -20 for just being upfront about spying on them. At any point, you can start being upfront about it, and take an initial -10 hit to go back to the -20 modifier instead of the -30.

Summary: Regardless of what you do, if you're going to consistently be spying on someone (say, the tech leader), each time you are caught: you'll get -10 per negative modifier, then, you'll have the choice of taking another -10 hit immediately, or taking a -20 hit the next time you're caught (basically paying a price to time-delay the diplo hit).
 
You can move your spies in and out of the capitol to avoid stealing a tech. If you're stealing big techs past the Renaissance Era, you have bigger issues on your hands than being caught stealing.
 
Most of the numbers look fine to me. It's more the "we are allies", "hey, lets sign this research agreement", "DoW" in consecutive turns that annoys me.
If backstabbing would be something unique it could be fun, but if you play some Immortal/Deity games you quickly get it that your friends are not going to let you live in peace, they just wait for an opportunity to shed all the diplo plusses and get some tasty piece of your empire.
 
I'm wondering if somebody can fish out how backstabbing works exactly and how it ties into the game in details.. unless we know that by now.. I mean I know there's a"backstabbing" personality value but still.
 
This is great, most of the penalty numbers could be "felt" through play but I had always been looking for a source of the penalty durations! Keep the good work.

There appears to be missing info about trades. Max gained from trades is set to -30 but there should be a small gain per actual trade event maybe -1 like embassies or slightly more so that -30 is actually achievable. This actually goes towards a comment. Since you appear to still be working on figuring it all up, I suggest you look into the possibility of all of the _MAX as a cap on the total penalty from a source that can be iterated. For instance, the land purchase max is 20 but each occurrence is also 20 which could seem redundant. However, it means that if you purchase tiles more than once, you won't get any additional penalties for the behavior. It could also be there just because the game is moddable or a scenario-specific implementation.


Also, there seem to be too few weights associated with trades. I'd guess it's hidden in a function of the "price paid" to the AI calculated value (like if you sell a lux for 150g when AI would pay 240g you'd get a larger portion of the small gain as if the AI values it as 171g and you sold for 150g). Small gains (1-5 per trade maybe? capping to 30 according to the above)
 
Which is the value for if I ask another leader to stop settling near me? None of the first 4 modifiers seem to fit exactly. I ask because in a recent game I asked a neighbour not to settle near me around 60 turns in and he had a bright red negative modifier for that request for the rest of the game. This seemed to be as big a deal as if I'd backstabbed him which was a big surprise to me.
 
Need a mod that shows you the invisible opinion in the diplo screen. No wonder some civs seem to hate my guts, even though it says friendly. :rolleyes:
 
This "Liberated Cities" modifier, does it only apply if a Civ is "killed" ? For example, say China has lost two of it's cities to Alexander the Great, but is still around in game. If I end up at war with Alex, capture these two cities and then trade them back to the Chinese, do we get any relations boost from that? Or is it just a normal trade as far as they're concerned, like i gave them some GPT or something?
 
I'm fairly certain that liberated cities modifier only applies if you liberate the city upon capture: IE you never took control at all. Taking control then trading it is not the same as liberating the city.

Unless I'm mistaken, of course.

-S
 
The values are not that bad, but some things are really flawed.
Denouncing is totally messsed up.
Other civs will denounce you and denounce each other etc to the point everyone hates everyone. Bah.
Warmonger status is also pretty flawed.

Another thing is the way some trivial things give you a malus for millenniums.
4000 BC: "Please don't plop cities right next to my borders, will you?" "HOW DARE YOU!"
2000 AC: "I still hate you for that thing in 4000 BC. Never forget."
 
So one thing I can never find answered anywhere:

What exactly makes a civ DOF you or Denounce you? Also, what makes them willing to accept a DOF? If they're already in the "friend zone"?
 
The values are not that bad, but some things are really flawed.
Denouncing is totally messsed up.
Other civs will denounce you and denounce each other etc to the point everyone hates everyone. Bah.
Warmonger status is also pretty flawed.

Another thing is the way some trivial things give you a malus for millenniums.
4000 BC: "Please don't plop cities right next to my borders, will you?" "HOW DARE YOU!"
2000 AC: "I still hate you for that thing in 4000 BC. Never forget."

I don't see what flaws the system has. The good players can totally control diplomacy.

The only problem is that, it's not easy to learn diplomacy, so their is some logic issue where the game play is either missing telling us things or is non obvious, since a lot, me included, had a hard time learning why we messed up and turned AI's hostile.

I think the NUMBER ONE mistake people makes is that they don't keep track of DoF and end up joining a war request against a AI they have a DoF with, this turn everyone negative. Not entirely a player fault, the UI should give us an overview of our action.
 
Back
Top Bottom