Diplomacy AI Development

Gaining extra cities for almost no trouble is a pretty sweet deal. Or heck just pillage everything for raw monies....I couldn't do a thing to stop them.

If they're Tradition they may not want more cities, particularly if they don't have happiness to spare.

Pillaging may also be less valuable to them than good diplomatic relations. Korea excels at turtling, and trade and friendships help with that. Better to foster good will than give your neighbours a reason to hold grudges.

If it were most civs, I would agree with you. Something else that civs could do when they see you are weak militarily is make a demand of you (which I don't see happen very often). That way they can get your money and still benefit from trade routes with you.
 
Last edited:
Idk if it's because i was only playing on king, but I've had even rome be peacefull towards me till start of renaissance when i have a third of his military might. Granted, Rome seems to be the most peaceful warmonger to me, starting next to huns or mongolia causes a dow in the middle of classical era all the time
 
The AI was aberrantly deleting some units early on due to fears of GPT loss- I've addressed for next version.

G
Yeah I've noticed this a while ago. It really hurts the Aztecs in particular since they choose to disband Jaguars over (Chariot) Archers and Horsemen.

I LOVE puppets as Tradition, free yields and I can easily absorb the unhappiness with strong Tall play.
I'd say not too many puppets, since they count towards your empire modifier IIRC.
 
I see modifier you killed or captured civilians during war. But I am in Ancient era and had no wars yet

Make a bug report on Github, please.
 
Upcoming diplomacy changes for next version:
Code:
Cleaned up backend code, reduced diplo AI memory consumption and file length
- Organized memory related functions for easier future changes

DoF/denounce duration now not affected even if a player dies and is then resurrected

Unfortunately not much on the end user side for this next version, but I'm back in business. :)
 
Recursive, in my current game Songhai have 20 cities on standard-size map at the start of the Renaissance era, having conquered all of Babylon and some of Poland, including the capital. The next nearest civ in size is Carthage with 6 cities. Still, they're facing no real opposition except me who is also having to fight Sweden (that DoWed me despite having a very strong army and only 4 cities, instead of DoWing Songhai). Do you think there should be a "trigger point" for civs that are really far ahead of the pack (in terms of cities, techs or some other criteria) to suffer grave diplomatic penalties, perhaps even to the point of all civs denouncing them? Perhaps we could use the world congress code for selecting the new host to institute an "emergency session" of the WC that triggers if an AI has more than xyz% more cities than the median or xyz more techs than the median, where the only thing that's voted on is whether to sanction them or not? And then have the AI be much more prone to voting in favour of sanctioning them etc.? I dunno, I miss a bit more AI awareness that a civ is a clear threat/runaway and trying to consolidate against it by denouncements, sanctions etc. I understand getting them to be more willing to DoW them is very tricky, but perhaps the denouncement and the sanctions could be of some help?
 
I've just reported a bug on Github (https://github.com/LoneGazebo/Community-Patch-DLL/issues/7268), but I also wanted to report it here because it is quite weird :)

As the screenshot below shows, Theodora decided to be friendly and share some intrigue.

Spoiler Theodora shares intrigue :
Sid Meier's Civilization V (DX11) 06-Dec-20 6_04_50 PM.png


The problem is, I am not the owner of Gao, Askia is, and he is not going to attack his own city :lol: I think Theodora had too much of that good Byzantium wine :lol:
 
Recursive, in my current game Songhai have 20 cities on standard-size map at the start of the Renaissance era, having conquered all of Babylon and some of Poland, including the capital. The next nearest civ in size is Carthage with 6 cities. Still, they're facing no real opposition except me who is also having to fight Sweden (that DoWed me despite having a very strong army and only 4 cities, instead of DoWing Songhai). Do you think there should be a "trigger point" for civs that are really far ahead of the pack (in terms of cities, techs or some other criteria) to suffer grave diplomatic penalties, perhaps even to the point of all civs denouncing them? Perhaps we could use the world congress code for selecting the new host to institute an "emergency session" of the WC that triggers if an AI has more than xyz% more cities than the median or xyz more techs than the median, where the only thing that's voted on is whether to sanction them or not? And then have the AI be much more prone to voting in favour of sanctioning them etc.? I dunno, I miss a bit more AI awareness that a civ is a clear threat/runaway and trying to consolidate against it by denouncements, sanctions etc. I understand getting them to be more willing to DoW them is very tricky, but perhaps the denouncement and the sanctions could be of some help?

I'm working on relationship logic. Don't expect major overhauls in the near future, but this is something I want to address. I'm pondering a kind of "strategic alliance" mechanic.

I've just reported a bug on Github (https://github.com/LoneGazebo/Community-Patch-DLL/issues/7268), but I also wanted to report it here because it is quite weird :)

As the screenshot below shows, Theodora decided to be friendly and share some intrigue.

Spoiler Theodora shares intrigue :


The problem is, I am not the owner of Gao, Askia is, and he is not going to attack his own city :lol: I think Theodora had too much of that good Byzantium wine :lol:

That actually is ilteroi's fault, he changed spy/intrigue code.

Damn it, Theodora...:crazyeye:
 
Preview of upcoming diplomacy changes!

These are not finished yet but for the curious, this is what I'm working on:
Code:
General
- Reduced memory consumption by eliminating useless memory/code
- All turn counters are now unaffected by a player dying and then being resurrected
- Bugfixes
- Performance improvements
- Code cleanup
- Improved anti-bankruptcy war sanity check (AI now will sometimes avoid going under a certain minimum GPT)
- Improvements to AI war selection/prioritization logic
- Attempt to fix issues with coop wars
- Fixed strategic resource valuation (ilteroi)
- Fixed "intrigue to wrong player" bug (ilteroi)

Improved "we bullied your protected City-State" message
- AI might now declare war immediately if you side with your protected City-State
- Makes it more of an actual decision with risks in both cases
- Provides an opportunity to provoke the AI into declaring war on you

Rewrote code for promises to/from the AI
- Major code cleanup here, Firaxis handled this poorly
- All promises are now tracked on individual counters
- AI will now only get mad about demands to not settle near you/spy on you if they reject the request (restored penalty for spy request)

Major improvements to AI opinion logic
- Added promise duration and backstabbing penalty timers to DiploOpinionWeights.sql for customizability
- Duration of opinion modifiers now varies based on AI flavors and scales with game speed
- Most temporary opinion modifiers will decay in value gradually over time on a curve rather than with sudden jumps (based on the % of duration left; although some decay rates may vary)
- "Stacking" opinion modifiers decay more quickly, allowing more opportunities to recover from early game penalties (this also applies to bonuses, however)
- Resurrection bonus is now canceled if you declare war on or capture a city from the resurrected civ
- Increased opinion bonus for city liberation, but decreased it if you've also been capturing cities from that player
- Adjusted victory dispute penalty values; now scales with AI's victory competitiveness flavor, and the increase if you're getting too close to winning now scales with difficulty level (between 1x and 2.5x the normal modifier value)
- Fixed Open Borders swapped modifier bug
- Tweaked some other values

Major improvements to AI backstabbing logic
- Fixed a major bug with broken Declarations of Friendship
- AI can decide to ignore global penalties if they consider it in their strategic interests, and therefore not find a backstabber untrustworthy, at least for a while
- Backstabbers are more likely to tolerate backstabbing as long as they and their friends aren't affected by it
- AI will always ignore backstabbing against a player that backstabbed them previously, or who they have backstabbed previously
- Global penalties are removed from dead players once enough turns have passed
- Reduced duration of backstabbing penalties (longest is 100 turns, scaling with gamespeed, for declaring war on a friend/vassal)
- AI trained to backstab by declaring war occasionally and strategically
- Adjusted denounce friend & end friendship logic
- Improved anti-backstabbing sanity checks and applied them to all war declarations
- AI a bit less susceptible to getting stuck in DP gridlock
- AI a bit more likely to backstab if provoked (e.g. selecting the mean response in dialogue)

Major improvements to AI relationship logic
- General revisions and improvements
- Simplified and sanitized relationship pairing code
- Greatly increased the importance of approach in selecting relationship
- Modified proximity logic
- Rewrote code for DoFs/DPs and fixed bugged DP cap
- AI more likely to make a DP with its friends
- Modified relationship logic to/from vassals
- Reduced weight of religion in diplomatic decisions
- Removed code which treated human players differently when approaching victory

Other
- Added city name to "work has begun on [next item in the production queue]" notification
- Fixed Golden Age ancient ruin bug
 
Last edited:
What is the feeling about city states being attacked by the AI? They are more than just barbarian camps. And a big part of the game is tied up into interacting with them. Why should i bother trying to ally with city states and convert them to my religion when that will just prompt an AI to attack it, thus starting a war with me, and taking it over? Seems like a catch 22. If i dont want to go full warmonger, i should try to influence city states right? But it seems the more successful I am at that, the more I prompt the AI to attack them and me. I feel like there should be a penalty (or more of a penalty) for attacking city states. A penalty that even a war monger seeking a domination victory will have to think twice about. Right now it doesnt feel like there is any.
 
What is the feeling about city states being attacked by the AI? They are more than just barbarian camps. And a big part of the game is tied up into interacting with them. Why should i bother trying to ally with city states and convert them to my religion when that will just prompt an AI to attack it, thus starting a war with me, and taking it over? Seems like a catch 22. If i dont want to go full warmonger, i should try to influence city states right? But it seems the more successful I am at that, the more I prompt the AI to attack them and me. I feel like there should be a penalty (or more of a penalty) for attacking city states. A penalty that even a war monger seeking a domination victory will have to think twice about. Right now it doesnt feel like there is any.
IMHO the ai duress seen a bit too aggressive towards city statesin the new certain. I like that they're generally more aggressive but I agree that city states are getting attacked A LOT now.

\Skodkim
 
From my experience AI will never accept friendship requests made by the player. Can anything be done about this?

Also I find it weird if I pick for example tradition social policy and AI picks progress.
Why do I get negative diplomacy bonus just for that we have different social policy? Why doesn't AI like me for picking tradition? Shouldn't they be happy that I'm not competing with them with same strategy as them? I think you should only get negative bonus if you pick Authority as that means you are propably a warmonger. What do you guys think about this?
 
Last edited:
From my experience AI will never accept friendship requests made by the player. Can anything be done about this?

Also I find it weird if I pick for example tradition social policy and AI picks progress.
Why do I get negative diplomacy bonus just for that we have different social policy? Why doesn't AI like me for picking tradition? Shouldn't they be happy that I'm not competing with them with same strategy as them? I think you should only get negative bonus if you pick Authority as that means you are propably a warmonger. What do you guys think about this?

AI always asks for a DoF the moment they're willing to make one, unless the message is on cooldown. I'm working on relationship logic at the moment.

It's kind of a flavor thing; historically different forms of government had difficulty getting along.

In terms of mechanics, think of it like rock-paper-scissors: if you're a rock, other rocks will be hard to fight against and will result in a lot of attrition - but scissors have vulnerabilities that you can exploit thanks to their different specialization, and paper can exploit your vulnerabilities.

Thus, opposing forms of government can often be major threats. Having Shaka as your neighbor is a greater danger if you're playing as Siam compared to playing as the Aztecs.

Additionally, taking the same Social Policy does not mean you're going for the same victory condition.
 
Hey recursive, really grateful to the entire VP team for making this mod so amazing. I just had some suggestions for the AI which I really think you should consider:

1. I think an AI which plays more like a ruler of a nation rather than a player of the game and makes decisions with that in mind would make so much sense and will make the game so much more enjoyable. Like if all I wanted was to play the game in that spirit of competitiveness I would play multiplayer. I want to play the game simulating being the leader of a nation among others. Why would a nation with puny military declare war on a nation with an army ten times of it, or even denounce it for whatever reasons.

2. I want real alliances, not just some farce that can be and will be broken at the first opportunity. If I go to the lengths of investing time and effort into diplomacy then I should get the returns too.

3. I should be able to donate troops to a civ if I want to. If there is a weak civ fighting against a stronger civ which I dont like, I should be able to send troops to the weak civ.

Now I know these are very subjective suggestions but I hope you think about them.
 
Hey recursive, really grateful to the entire VP team for making this mod so amazing. I just had some suggestions for the AI which I really think you should consider:

1. I think an AI which plays more like a ruler of a nation rather than a player of the game and makes decisions with that in mind would make so much sense and will make the game so much more enjoyable. Like if all I wanted was to play the game in that spirit of competitiveness I would play multiplayer. I want to play the game simulating being the leader of a nation among others. Why would a nation with puny military declare war on a nation with an army ten times of it, or even denounce it for whatever reasons.

2. I want real alliances, not just some farce that can be and will be broken at the first opportunity. If I go to the lengths of investing time and effort into diplomacy then I should get the returns too.

3. I should be able to donate troops to a civ if I want to. If there is a weak civ fighting against a stronger civ which I dont like, I should be able to send troops to the weak civ.

Now I know these are very subjective suggestions but I hope you think about them.

1 - You can turn off victory competition in (1) Community Patch > Core Files > Core Changes > DiploAIOptions.sql. I added this option specifically for players who want to play with a less competitive AI.

2. I'm working on improvements to AI relationship logic. I'm considering a few things to address this, such as increasing the value of positive modifiers if you've been friends for a while.

3. This option was specifically removed by Gazebo a while back as the AI couldn't make use of it. I too want it added but at the moment the AI has no capability of handling it.
 
3. I should be able to donate troops to a civ if I want to. If there is a weak civ fighting against a stronger civ which I dont like, I should be able to send troops to the weak civ.
3. This option was specifically removed by Gazebo a while back as the AI couldn't make use of it. I too want it added but at the moment the AI has no capability of handling it.
This reminds me of an idea I had. It would be enacted through the UN/world Congress, "peacekeeping forces", where each member would lose gold, and forces are sent to one side of a war. Most likely it would only be for CS wars. So if someone declares war on a CS you can enact the resolution and the CS would gain troops. People complain about not being able to protect CS, and this would help that. Also it seems easier for AI logic, vote yes if you like the CS or CS ally, no if you like the offender or don't like the CS or CS ally.

Probably won't be implemented, maybe modmod territory.
 
What is the feeling about city states being attacked by the AI? They are more than just barbarian camps. And a big part of the game is tied up into interacting with them. Why should i bother trying to ally with city states and convert them to my religion when that will just prompt an AI to attack it, thus starting a war with me, and taking it over? Seems like a catch 22. If i dont want to go full warmonger, i should try to influence city states right? But it seems the more successful I am at that, the more I prompt the AI to attack them and me. I feel like there should be a penalty (or more of a penalty) for attacking city states. A penalty that even a war monger seeking a domination victory will have to think twice about. Right now it doesnt feel like there is any.

Part of the reasons for city states to is to provide an easy target for warmonger civs to conquer. If an AI attacks city states another civ is friendly with, then the onus should be on the latter civ to defend them. There's already SV as a victory condition for civs that want to just turtle.
 
Top Bottom