Diplomacy AI Development

I have a couple things that I noticed that I was wondering about, relating to diplomacy.

I don't know if it's intended, but I noticed that my vassal was getting a positive bonus with me for open borders. You always have open borders with them, so I was just wondering if that was supposed to happen.

Also, once a civ proposed something to the world congress, and then voted against it. I also voted against it, and then they got mad at me for voting against them, when they themselves voted against it.

This is probably more blurred, but a lot of times the AI becomes allies with a CS that you've been allies with for a long time. And when you get it back, they get really mad at you. I understand if you start taking their allies, but this feels bad, especially because they can get mad at me for allying CS but I can't do it back. But I understand that's hard to implement.
 
I don't know if it's intended, but I noticed that my vassal was getting a positive bonus with me for open borders. You always have open borders with them, so I was just wondering if that was supposed to happen.
A vassal is forced to open borders for you, but are you forced to open borders for him too?
 
I have a couple things that I noticed that I was wondering about, relating to diplomacy.

I don't know if it's intended, but I noticed that my vassal was getting a positive bonus with me for open borders. You always have open borders with them, so I was just wondering if that was supposed to happen.

Also, once a civ proposed something to the world congress, and then voted against it. I also voted against it, and then they got mad at me for voting against them, when they themselves voted against it.

This is probably more blurred, but a lot of times the AI becomes allies with a CS that you've been allies with for a long time. And when you get it back, they get really mad at you. I understand if you start taking their allies, but this feels bad, especially because they can get mad at me for allying CS but I can't do it back. But I understand that's hard to implement.

1) Intended.
2) This is due to poorly-implemented Firaxis logic. Thanks for pointing out the problem, I'll see what I can do about it. Problem is that an AI's desire can change between proposing and voting...
3) AIs compete for City-States, and get mad at their opponents; this is intended conflict, much like territorial disputes. The larger the difference in Influence between you two, the less mad they get. The "we're mad that you're allying our CS" message is just an opportunity to try to provoke them to DoW you. It's otherwise just for flavor, and has no other gameplay impact.

A vassal is forced to open borders for you, but are you forced to open borders for him too?

No. Embassies are opened both ways, however.
 
Last edited:
Just wanted to say I'm really enjoying the diplo in my current games. Not sure I've I'm using the very most recent version of the diplo changes but it's pretty recent (I think the only thing I don't have is some of the changes to vassalage).

The AI seems to be making genuinely smart moves in terms of who they befriend and who they denounce. For example, I denounced Persia early in my game to garner approval from the Zulus (who had also denounced them). Later on Persia was invaded by the Aztecs and Russia, so when my denouncement expired I denounced the Aztecs and Russia instead and send Persia a large sum of money. The very next turn, Persia offered me a Declaration of Friendship :). I'm glad that they saw it was now in their interest to align with me even though we were at odds earlier.

Similarly, during this game I also gifted money to Poland; Persia and Poland were on another continent to me so I couldn't intervene directly. This seemed to improve their friendliness towards me, as over time they both offered money back to me! ^^
The larger the difference in Influence between you two, the less mad they get.

Interesting. So using one diplomat to steal a city-state might cause a lot of tension, but using four at the same time might upset them less haha? :)
 
Just wanted to say I'm really enjoying the diplo in my current games. Not sure I've I'm using the very most recent version of the diplo changes but it's pretty recent (I think the only thing I don't have is some of the changes to vassalage).

The AI seems to be making genuinely smart moves in terms of who they befriend and who they denounce. For example, I denounced Persia early in my game to garner approval from the Zulus (who had also denounced them). Later on Persia was invaded by the Aztecs and Russia, so when my denouncement expired I denounced the Aztecs and Russia instead and send Persia a large sum of money. The very next turn, Persia offered me a Declaration of Friendship :). I'm glad that they saw it was now in their interest to align with me even though we were at odds earlier.

Similarly, during this game I also gifted money to Poland; Persia and Poland were on another continent to me so I couldn't intervene directly. This seemed to improve their friendliness towards me, as over time they both offered money back to me! ^^


Interesting. So using one diplomat to steal a city-state might cause a lot of tension, but using four at the same time might upset them less haha? :)

I'm glad you're enjoying diplomacy. What you're describing is the intended type of behavior, and I'm hoping next version's will be even better. :)

Yes, but using diplomats to surpass the old ally's Influence adds 1 to NumTimesTheyLoweredOurInfluence when the alliance is lost, which increases hostility in the AI's competition for ALL City-States they're competing for favor with. So it's not as exploitable as it sounds - it'd be more accurate to say they're recognizing when they're beat. AI does select City-States to send diplomats to based on the effectiveness of the diplomat after all.
 
Last edited:
I'm glad you're enjoying diplomacy. What you're describing is the intended type of behavior, and I'm hoping next version's will be even better. :)

Yes, but using diplomats to surpass the old ally's Influence adds 1 to NumTimesTheyLoweredOurInfluence when the alliance is lost, which increases hostility in the AI's competition for ALL City-States they're competing for favor with. So it's not as exploitable as it sounds - it'd be more accurate to say they're recognizing when they're beat. AI does select City-States to send diplomats to based on the effectiveness of the diplomat after all.

Hmm. OK. I mean if you use 4 diplomats at once it seems like a reasonable investment rather than an exploit anyway lol.

Does this mean that the more times a city-state switches hands the more likely the AI are to get annoyed about it? I mean, I find that annoying too but I didn't realise the AI cared. Useful to know. Does it decay over time at all?
 
Hmm. OK. I mean if you use 4 diplomats at once it seems like a reasonable investment rather than an exploit anyway lol.

Does this mean that the more times a city-state switches hands the more likely the AI are to get annoyed about it? I mean, I find that annoying too but I didn't realise the AI cared. Useful to know. Does it decay over time at all?

Yes, if it keeps changing hands between the same players. No - and honestly as it's more of a value used for tracking than an outright penalty, I think that's fine.
 
Can humans send a warning to an AI about stealing CS allies? Just another way to provoke them to war. Also the "stop protecting the city state that I just bullied" message that's currently one-sided.
 
Something else I noticed is that AI seem to be using vassalage well. I sometimes hear from domination players that they can be more trouble than they are worth, but I'm finding that having another nation to fight at the same time really impedes how easily I can attack warmongers. Even if the vassal doesn't have many units, the fact I have to go to war with another civ means I can't send trade units through their territory of trade with them for luxuries. Certainly I could conquer the vassal cities myself, but that would make me unpopular with my allies (and often I want to be friends with the vassal civ anyway). So that's good in terms of vassals being useful.
 
Can humans send a warning to an AI about stealing CS allies? Just another way to provoke them to war. Also the "stop protecting the city state that I just bullied" message that's currently one-sided.

No. Blame Firaxis. But I'll see if I can add those features at some point.

Something else I noticed is that AI seem to be using vassalage well. I sometimes hear from domination players that they can be more trouble than they are worth, but I'm finding that having another nation to fight at the same time really impedes how easily I can attack warmongers. Even if the vassal doesn't have many units, the fact I have to go to war with another civ means I can't send trade units through their territory of trade with them for luxuries. Certainly I could conquer the vassal cities myself, but that would make me unpopular with my allies (and often I want to be friends with the vassal civ anyway). So that's good in terms of vassals being useful.

That's strategy for you! :)
 
I have a question regarding war and diplomacy.
I have been at war with 3 AI, Siam, Egypt and Byzantium. War was going well, I liberated City-State from Egypt, who was far from me and killed many inits, so we made peace.
With Siam, who is not close also war still goes on, slightly in my favor, he is at war with Japan, Russia and Byzantium, his war weariness is high.
With Theodora I took 5 cities, including capital, forcing also Siam out, killing lots of his units, she has 2 cities left, which I'm sure to take in 2 turns.
Now she becomes vassal of Egypt, who is far from her, I don't see a single Egyptian unit close.
Why is her becoming a vassal of Egypt leads to making peace with me and forces all my units away? Now if I declare a war on her, I will be at war with 3 other civs, who has a Defense Pact with Egypt and her.
Seems like not logical, she DoW on me and I never made peace with her.
When you make ally with CS, it doesn't lead to peace if CS at war, sometime I help them giving units, sometime I pay money/resources.
 
I have a question regarding war and diplomacy.
I have been at war with 3 AI, Siam, Egypt and Byzantium. War was going well, I liberated City-State from Egypt, who was far from me and killed many inits, so we made peace.
With Siam, who is not close also war still goes on, slightly in my favor, he is at war with Japan, Russia and Byzantium, his war weariness is high.
With Theodora I took 5 cities, including capital, forcing also Siam out, killing lots of his units, she has 2 cities left, which I'm sure to take in 2 turns.
Now she becomes vassal of Egypt, who is far from her, I don't see a single Egyptian unit close.
Why is her becoming a vassal of Egypt leads to making peace with me and forces all my units away? Now if I declare a war on her, I will be at war with 3 other civs, who has a Defense Pact with Egypt and her.
Seems like not logical, she DoW on me and I never made peace with her.
When you make ally with CS, it doesn't lead to peace if CS at war, sometime I help them giving units, sometime I pay money/resources.

When a civ becomes a vassal they adopt the master's war/peace state. They have no independence of their own. In order to attack the vassal you must attack the master - the point of vassalage is protection.

Egypt being far may make it a poor strategic choice, but the DPs are obviously a deterrent to you so it isn't entirely a bad one.

City-States are not vassals. You can declare war on a City-State without attacking its ally.
 
Hi just asking if anyone ever encountered this scenario, in this latest update I'm playing a game with Russia I like the diplomacy part of it all nowadays. I'm finding the AI super but really super intelligent compared to vanilla and even the last stable vox populi version. The times the AI buys you strategic resources is getting much better, still exploitable though but I try to keep that to a minimum (Like for example the AI only having 50 gpt and still buying my strategic resources even though the trade leaves them with only 4/5 gpt and don't have the money for maybe upgrading or build the units they were meant to build with my deal in the first place).
I know this is hard to code and needs a lot of "ifs" and I don't know personally how to adress the issue I just pointed out, i'm not being that constructive :undecide: Sorry

Another thing I would like to adress is the fact that with all the updates to the Diplomacy AI it's normal to have some bugs or not intended mechanics, lately I have found that when I spy on a Civ and they first know it is me who is bringing caos into their capital they warn me about getting the Spy out and I oblige. I say that I will not spy on them anymore, move the spy to another Civ and everything goes fine (The diplomacy menu shows a little negative modifier for that). Until inevitably they start spying on me as i'm the tech leader or something, I kill their spy and get the notification that they apologies for spying on me, when I go to their diplomacy menu they hate me because I "Continued spying on them after they told me not to" I deliberatly took my spy out of their city as soon as they told me and they like assumed that their spy dying in my capital is the same as mine in theirs?
This as actually happened 3 times the first I was oblivious of the reason why I just noticed when the civ don't remember which, denounced me out of nowhere and I noticed the massive modifier (They were Neutral before and I was trying to stay that way minimum).
The next time was when Brasil asked me to stop spying on their turn and them I said I would not spy anymore, when I start my turn to take my spy out of the city I sudenly stole a tech from them! as you know it's an obligatory action to take if you want to continue the game so I got the modifier. (This second time I understand why I got it even if I don't agree it makes sense)
This last time was a few days ago when the thing I just told in the beginning happened with Brasil (again), I didn't have a spy in their cities, I just had a Spy in my capital and I killed one of their spies.
It just caught me off guard I really enjoy the mod and I try to help in everything I can! I really see the positive diference Recursive is doing on the Diplo AI and I love it. I understand it needs tweaks but I think his solution with adding "Flavour" and "diferent personalities" with the approaches make the game better.
 
Noob question but what is the consequence of having bad relations with your vassals? Can they revolt?
 
Hi just asking if anyone ever encountered this scenario, in this latest update I'm playing a game with Russia I like the diplomacy part of it all nowadays. I'm finding the AI super but really super intelligent compared to vanilla and even the last stable vox populi version. The times the AI buys you strategic resources is getting much better, still exploitable though but I try to keep that to a minimum (Like for example the AI only having 50 gpt and still buying my strategic resources even though the trade leaves them with only 4/5 gpt and don't have the money for maybe upgrading or build the units they were meant to build with my deal in the first place).
I know this is hard to code and needs a lot of "ifs" and I don't know personally how to adress the issue I just pointed out, i'm not being that constructive :undecide: Sorry

Another thing I would like to adress is the fact that with all the updates to the Diplomacy AI it's normal to have some bugs or not intended mechanics, lately I have found that when I spy on a Civ and they first know it is me who is bringing caos into their capital they warn me about getting the Spy out and I oblige. I say that I will not spy on them anymore, move the spy to another Civ and everything goes fine (The diplomacy menu shows a little negative modifier for that). Until inevitably they start spying on me as i'm the tech leader or something, I kill their spy and get the notification that they apologies for spying on me, when I go to their diplomacy menu they hate me because I "Continued spying on them after they told me not to" I deliberatly took my spy out of their city as soon as they told me and they like assumed that their spy dying in my capital is the same as mine in theirs?
This as actually happened 3 times the first I was oblivious of the reason why I just noticed when the civ don't remember which, denounced me out of nowhere and I noticed the massive modifier (They were Neutral before and I was trying to stay that way minimum).
The next time was when Brasil asked me to stop spying on their turn and them I said I would not spy anymore, when I start my turn to take my spy out of the city I sudenly stole a tech from them! as you know it's an obligatory action to take if you want to continue the game so I got the modifier. (This second time I understand why I got it even if I don't agree it makes sense)
This last time was a few days ago when the thing I just told in the beginning happened with Brasil (again), I didn't have a spy in their cities, I just had a Spy in my capital and I killed one of their spies.
It just caught me off guard I really enjoy the mod and I try to help in everything I can! I really see the positive diference Recursive is doing on the Diplo AI and I love it. I understand it needs tweaks but I think his solution with adding "Flavour" and "diferent personalities" with the approaches make the game better.

There was a bug in the spy logic, the code for "killed my spy" and "spied on us" was mixed up. Already fixed for next version.

Your spy committing an action on the same turn (thus making it unavoidable) as you promised to stop is a new one, though. I could set it so that if you agree you have a 1-turn window when your spies can be cleared out without stealing.

Flavors were already in existence; diplo personality types are my own addition.

Noob question but what is the consequence of having bad relations with your vassals? Can they revolt?

Yes, but vassals only revolt rarely. They can do so if you allow their cities to get captured or if they grow sufficiently in cities/population, if the master doesn't have the Iron Fist tenet that blocks revolts.

If they revolt, you have the choice of granting them independence or going to war with them.

Content vassals will also tend to leave you alone diplomatically and (as of 4-17) support you in the World Congress. Mistreated vassals are more likely to spy on you, denounce you, etc. and their denouncements can anger their friends which could cause you trouble. They are also more likely to vote against you in the World Congress.

However, I blocked AI vassals from spreading religion, stealing artifacts, planting citadels, or stealing tiles because it's really annoying and borderline warfare, and for the AI's benefit as well.
 
Last edited:
I've added the requested feature to show the number values of opinion modifiers while still allowing them to hide negative modifiers when FRIENDLY.

Can be turned on/off in DiploAIOptions.sql in the next version.
 
Being to anxious to start a thread by myself I figured I'd just ask it here instead.

Anyone else feel like the defense pact spamming of the AI have gone too far? Like as soon as defensive pacts are unlocked, every AI in the game are going to have at least 2 pacts for the rest of the game. It doesn't seem to matter if they're hated or weak or anything like that, they're going to have the defensive pacts anyways.
Compared to this the AI seems to be extremely unwilling to sign defensive pacts with a human player. There are exceptions to this, some games I'm able to sign defensive pacts if I have a relevant tech level and a large standing army, but these situations feels more like exceptions and I can't remember ever signing more than one pact at the same time.

Defensive pacts themselves also do feel extremely strong in civ, acting like full blown alliances, as you are forced to honor them and the aggressor seems to be forced to do all the DoWing mechanically. As soon as an AI neighbor has his free 2+ defensive pacts then any form of diplomacy is just out the window, he can citadel your tiles, spy on you, convert your cities and whatever else he wants, and the only thing you can do about it is declaring a war which probably makes you backstab two of your declared friends and cost you all your trade-routes as well as most of your potential city-states.
Assuming the AI puts defensive pacts into consideration, this might also be why from the mid-game and onward warring in general just seems to slow down (at least between AI civs, since I can't form a defensive pact to save my life I'm still fair game)

Well, enough ranting, am I missing something? Is there a way to deal with these defense-pact spams besides making your neighbor angry and hoping he attacks you first?

Re-posting on this thread... I agree 100%. Once defensive pacts happen I no longer feel like I'm playing against individual nations anymore.
 
Maybe defensive pacts need to have their length shortened (25 turns on standard time)? I personally don't experience issues with them (recently), but I can understand the problems others have; ultimately I think the dp's are actually just doing they're job by agitating other players (humans included), and dissuading them from using physical force. I think it's just the nature of the feature, and maybe others might be inclined to just play with dp's disabled if that were an option. Maybe set a limit so that a player may only have 1 active dp at a time? It's not really ideal, but people might enjoy that kind of thing.

My only gripe has always been that there's no way to see how many turns remain in dp's between AI (although I understand the reasoning behind this as well). It's just an annoyance for me.
 
Back
Top Bottom