Easy fixes to make diplomacy more bearable?

Colon

King
Joined
Sep 25, 2001
Messages
872
Diplomacy is easily the number one turn off in Civ4 for me. The issue is twofold: AIs too often make demands all of sorts and it usually takes a vast amount of time for them to forget things, often never. Together they combine to create implacable foes and interminable war, at least in marathon games. It's next to impossible not to have enemies (not that should be easy to avoid, but it should at least be possible) and there are usually very rigid camps, with no switching.

It seems it might be possible to improve matters by changing the values of the various ContactRand and MemoryDecay lines in the CIV4LeaderHeadInfos.xml file, but there are hundreds of such values, which means a lot of very tedious work. Hence, is there a simpler fix that achieves the same result? Quicker forgetting especially would make things better I think. Or has someone already done all of this work?
 
That annoying diplomacy is one of the only real tools the AI has outside of bonuses. Just watch Sulla's Suvivor series on Youtube, the AI is truly, truly terrible.

To each his own if you want to nerf it though.
 
I find that most that complain about diplomacy here do not actually understand IV diplomacy or its nuances. Anyway, unmodded, the game is not going to be "fixed". I'm not sure what mods may provide in that regard.

However, I would recommend increasing your knowledge on IV diplomacy, both why AIs may not like you and way you can boost diplo over time. One place to start is this very nice strategy article:

https://forums.civfanatics.com/threads/civ-illustrated-1-know-your-enemy.478563/

It clearly translates the coding variables of leaders into a readable reference guide. Such things as their preferences, peaceweight, unit prob, Plots War at X and so on.

But there are other diplomacy tips and tricks that you can learn from the forum here.

One bit of advice is stop playing Mara/Huge for now and just go with normal settings (standard map/speed and 6 AIs). Start learning diplo from the ground up without dealing with 18 or so ais on a map.
Mara/Huge does you no favors especially if you are inexperienced.

IV diplomacy is one of the more integral and nuanced aspects of the game.
 
That has to be the most condescending piece of "advice" I've ever gotten. Because I don't like how certain aspects of the game work and I'm looking for ways to improve it I need to change my gaming preferences, basically adopt YOUR preferences? I don't even play huge. I haven't for many, many years, possibly even since before you joined this forum.

Now if you'll excuse me, I'll go on to continue not liking the fact that marathon games tend to break down in repetitive wars between the same sides, not like demand spam and not liking the fact that the AI remembers slights for easily half the game (or just forever), and look to mod that, time willing.
 
Last edited:
...is there a simpler fix that achieves the same result?

If by "fix" you mean to make all be friends, you could alway just crank up the <iBaseAttitude> value for all leaders in CIV4LeaderHeadInfos.xml. Set it to something silly, like 100, and all should be friends for eternity. No matter how many requests you deny.

My personal thinking is that this would make games boring. But if the goal is to avoid having enemies, it should suffice. You'll end up with long peaceful games where no-one declares wars.

An alternative is to go into WorldBuilder on turn zero and set all opponents' opinion towards you (the human player) to +100. The result will again be that YOU will not be declared upon. However, this method makes sure you will see AI vs AI wars as normal.

I am sure there are several other methods that I have not thought of yet. Good luck finding the best way to enjoy the game.

PS!
By the way, lymon's answer did not contain any "condescending advice." My guess is that it was your own words that prompted that response. You wrote "It's next to impossible not to have enemies." This statement is dubious at best. It is possible to stay on relatively good terms with AI's in most games. Gifting cities, giving in to demands, having open borders, trading resources, adopting their religions and/or favourite civics... there are many options.
 
One alternative you might consider is to play on one of the archipelago type maps? Whilst this wont get rid of the request spam, due to the decrease of border tension and lack of direct land targets the AI is far less inclined to declare, which is what causes the heavy negative diplo and thus the factionalism. I have had several games on marathon/archipelago where without too much diplo effort the only wars were started by me.

This might allow you the type of game you want without taking away the individual flavour of each AI (there is not that much for some of them as it is). The implacable foes are often due to "you declared on us/on our friend" which does not decay and thus can easily escalate to the situation you dislike.
 
Agreed with Lymond. Diplomacy can be managed. Pick your friends. Accept the AI for what they and and what they do. Don't waste too much time fighting off the unit spammers. Understand who will attack at pleased and at friendly. Don't adopt religions that will make you everyone's worst enemy.

Marathan once you have a military advantage can really give you a big advantage as you have so much time to abuse it. However the AI will spam more units as each tech era lasts that much longer.

Lymond is not condescending! He just spends too much time focusing on the little details in Civ 4 and just knows the game really well.

Do not question the tutor till you are sure you can be the master at civ 4.
 
If by "fix" you mean to make all be friends....

I quite specifically mentioned what annoys me about the way diplomacy works. In both my posts.

You know what: I'll highlight:

"The issue is twofold: AIs too often make demands all of sorts and it usually takes a vast amount of time for them to forget things, often never. Together they combine to create implacable foes and interminable war, at least in marathon games. It's next to impossible not to have enemies (not that should be easy to avoid, but it should at least be possible) and there are usually very rigid camps, with no switching.

The one thing I might amend that "next to impossible not to have enemies" is indeed exaggerated, but at no point have I said I want everyone to be friends. At no point have I asked how to be better at the game. I seek to have more fluid, less repetitive diplomacy. And if your takeaway from that is I need to be given advice how to be better and that I need to have different likes and dislikes, then you're not actually paying attention to the question and being condescending.

And this thread can be closed. I more or less learned what I wanted to know anyway.
 
Last edited:
I wonder if this a problem specific to Marathon speed. I've rarely played on Marathon, but, in theory, in terms of game years, the AI should contact other players at most three times more often than on Normal speed – but should also forget human reactions three times faster. That ought to even out. That said, more wars will be fought too, and those penalties are never forgotten. Imo permanent penalties were a rather bad call by the designers (Soren's call I guess) regardless of game speed.
It seems it might be possible to improve matters by changing the values of the various ContactRand and MemoryDecay lines in the CIV4LeaderHeadInfos.xml file, but there are hundreds of such values, which means a lot of very tedious work. Hence, is there a simpler fix that achieves the same result? Quicker forgetting especially would make things better I think. Or has someone already done all of this work?
It's less tedious to adjust these things in the GameCore DLL, but recompiling that DLL is a somewhat daunting task.

I've added decay values for all memory types in my mod AdvCiv. Those XML changes can't be easily extracted though, in part, because I've changed the XML parser so that a default value can be set in a single place rather than setting the same value for all 52 leaders. The mod also adjusts memory decay and state counters (e.g. open borders, years of peace) to the Golden Age modifier, meaning that decay is two times slower on Marathon than on Normal speed. I guess you wouldn't like that, and you might be right. My current thinking is that contact delays should receive the same adjustment. I'd still tend to leave the ContactRands alone so that it doesn't take the AI too long to respond to a change in circumstances, e.g. someone starting to trade with its worst enemy. Anyway, as it stands, the mod may well make matters worse for you on the bottom line.
 
I think some Ai will demand much less at pleased. Sometimes by leaving a resource for them to demand can work wonders. They can only demand once each 10 turns? Unless that increases on marathan? If you can take out an Ai early on one less to deal with. Some Ai are more prone to demanding. Sittingbull appears to be the worst. 10/10 in terms of demands. So will always be a tricky neighbour.

Gifting resources/ getting open borders/peace for 50+ turns can really help on way to getting AI to pleased. Gifting techs can also help. Some will even gift cities ealy on for +4 fair trade bonus to stop an Ai going war mode. Lots you can do to stem these issues. Taking out an AI also works.

I know a lot on this forum have knocked marathan game play but maybe a Noble club on these settings could be interesting? I think the main issue is time. 1500 turns is a lot of effort. Pending how quickly you could finish the game.
 
@f1rpo : First, thank you.

I was afraid messing with the dll would be the only other option, but that's above my abilities.

I think it's indeed war penalties that do the most to create stale patterns of recurring wars between two sides. Unticking aggressive AI somewhat somewhat slows down this pattern from forming, but no more than that.

It was thinking a possible course might be combing high delay values or quicker decays with stronger relation bonuses and penalities, so as to create more "volatile" relations between two sides. A problem is that gifts don't seem to affect intra-AI relations, which mainly leaves shared civic and religion on the one hand, and open borders and trade on the other as main things to improve relations. The former are in themselves somewhat rigid avenues and the latter don't easily get established between sides that fought a war.
 
@f1rpoI was afraid messing with the dll would be the only other option, but that's above my abilities.
Seems possible to do some things in Python too. Crucially, CvPlayer::AI_changeMemoryCount is exposed to Python. In terms of effort, adding memory decay values for each leader in XML is probably still the lower hanging fruit. Unfortunately, one can't accomplish smooth decay through XML for memory with an attitude penalty greater than 100%. E.g. "you declared war on us" will go from -3 to 0 when a decay roll succeeds. Increasing the memory attitude values would exacerbate the abruptness.
A problem is that gifts don't seem to affect intra-AI relations [...].
AI civs don't ask each other for favors, so "you gave us help," or "accepted our religion" don't occur between AI civs. Conversely, static personality-based modifiers (shown as part of "a first impression is a lasting one" by the BULL mod) play a bigger role between AI civs than when human civs are involved. Oh, but "fair and forthright" and "traded with worst enemy" do occur between AI civs.

I had implemented (through the DLL) a mechanism that reduced the impact of bad actions when the AI was already annoyed or furious and vice versa, but I ended up disabling this again for the sake of simplicity; it didn't really seem necessary once memory decay for war etc. was in place. So perhaps decay is really the main thing that'll help.
 
That has to be the most condescending piece of "advice" I've ever gotten.
On the one hand, I can see why lymond's response could come across as condescending or patronizing. Imagine if you were having a discussion about American Football, and you wanted to discuss whether or not the kick-off play should be replaced with just starting on the 25 yard-line, due to concerns with brain injury. But then, someone comes and says, "Here's the rule-book. Did you know that a touch-down is worth 6 points?"
But with your brusque response, it also is easy for others to conclude that you came in with a chip on your shoulder, even while lymond was just trying to help.
So, the best thing to do in these situations is give the benefit of the doubt, politely clarify your position so that it's clear that beginner's guides don't address your issue, and then things will move on smoothly. :)

Sittingbull appears to be the worst.
Related:
Spoiler :
2y60f.jpg


Catherine is arguably worse, though. At least with Sitting Bull, if you get him to Pleased somehow, he'll shut up. And I believe that with f1rpo's AdvCiv mod, if you get Sitting Bull to pleased, he won't attack you with Espionage missions.
But with Catherine, if you fall into the trap of trying to get on her good side, she'll never shut up with her requests. And she's notoriously capable of being bribed into war against you, even at Friendly! For good measure, I always just try to kill her when possible.
 
crullerdonut, your meme made me LOL.
 
Seems possible to do some things in Python too. Crucially, CvPlayer::AI_changeMemoryCount is exposed to Python. In terms of effort, adding memory decay values for each leader in XML is probably still the lower hanging fruit. Unfortunately, one can't accomplish smooth decay through XML for memory with an attitude penalty greater than 100%. E.g. "you declared war on us" will go from -3 to 0 when a decay roll succeeds. Increasing the memory attitude values would exacerbate the abruptness.

I don't really know anything other than to change basic things in XML files though, so I'm not sure what I can do with CvPlayer.cpp (and CvPlayerAI.cpp too perhaps?) and AI_changeMemoryCount.
 
Python – I'll put this in a spoiler because it's strictly technical, and the General forum isn't really the place for that.
Spoiler :
In Assets\Python\CvEventManager.py, there's a function onBeginPlayerTurn that gets called from the DLL at the start of each player turn, just before the DLL (randomly) decreases memory counters. If you can learn some Python basics and how to consult the Python class reference, you should be able to randomly decrease the various memory counters that don't have decay values in XML. That avoids the effort of changing the XML for each leader. (Though doing it in XML is arguably cleaner and not that much work either.) You could also adjust the decay probability to game speed, or use any kind of probability distribution. That said, the DLL will still do its thing afterwards ... Achieving smooth decay through Python would seem trickier. For example, after a DoW, declared-war memory will be at 1 and the DLL will turn that into a -3 penalty because of the -300% memory attitude in XML. I guess you'd have to change the XML to -100% and increase the declared-war memory counter two extra times in onChangeWar (CvEventManager.py). Sounds like it should work, but I could well be missing some obstacle here.

You're right that AI_changeMemoryCount is ultimately a CvPlayerAI function. It gets exposed to Python via CvPlayer, and CyPlayer is the class to work with in Python. Most other AI functions aren't exposed to Python.
And I believe that with f1rpo's AdvCiv mod, if you get Sitting Bull to pleased, he won't attack you with Espionage missions.
Cautious should already be safe unless he has a war plan. I don't think he'll do spy attacks at Pleased in unmodded BtS either; BBAI introduced that. And only with Aggressive AI as far as I can tell, otherwise only at Cautious or lower. Edit: :hmm: Actually I'm not sure at all how it works in unmodded BtS.
 
Last edited:
Back
Top Bottom