Adjusting defensive pacts

andersw

Emperor
Joined
Feb 11, 2008
Messages
1,787
Location
sweden
Been testing different settings for a more enjoyable game and have come to defensive pacts.
(warmongering off didnt do much difference, no bribe wars made a huge difference)
Is there a way to adjust, limit or turn defensive pacts off?
 
I limited it to 2 per AI civ (plus 1 for every 10 other ingame civs). Are they going above that?
 
I limited it to 2 per AI civ (plus 1 for every 10 other ingame civs). Are they going above that?

So I think to start with, why join a defensive pact with someone who is on the other side of the map?
I dont see this as good behaviour, and if possible I would like to see some distance modifier when they look for a DP.

And yes, here are some image from current game
4,5 and 3 (with more to come?) defensive pacts.

Spoiler :

upload_2020-10-31_21-33-59.png

upload_2020-10-31_21-34-25.png

upload_2020-10-31_21-34-51.png

 
So I think to start with, why join a defensive pact with someone who is on the other side of the map?
I dont see this as good behaviour, and if possible I would like to see some distance modifier when they look for a DP.

And yes, here are some image from current game
4,5 and 3 (with more to come?) defensive pacts.


Yes, they have on large map with 11 AI 4, 5 defensive pacts

The relationship code is unnecessarily complicated and probably something's getting lost at some point in the function.

I'll work on this. Thanks for reporting the issue!
 
On standard size,the Zulus have made 3 DP. That is everyone they have met. They are you authority. Not sure how the Zulus plan on going to war, and that's not to mention the diplomatic gridlock they have put my game in, because even enemies end up being in DPs.

Edit: every AI on my continent is now in a DP with everyone else. It's really annoying.
 
UPDATE: I have a bit of free time, I'm rewriting and simplifying the logic for this so that AIs can't exceed the caps.

...and I think I've solved the problem with AIs refusing to make DPs and DoFs. Bear with me!
 
Last edited:
UPDATE: I have a bit of free time, I'm rewriting and simplifying the logic for this so that AIs can't exceed the caps.

...and I think I've solved the problem with AIs refusing to make DPs and DoFs. Bear with me!
That's great! Will you also be adjusting their logic to make DPs because they seem to make it with everyone and even humans if they don't hate them.
 
That's great! Will you also be adjusting their logic to make DPs because they seem to make it with everyone and even humans if they don't hate them.

Yes. Total relationship logic overhaul. Been meaning to do this for a while, so I'll buckle down and fix it while I have the opportunity.
 
Problems involving excessive friendliness and inappropriate DP selection arose from the way in which approach and friendship/enemy willingness functions were interdependent on each other.

Essentially, it was an apples-to-oranges comparison where the gradual curve made AI approaches change slowly, but friendship/enemy willingness could change rapidly from turn to turn.

Trying to fix these problems just ended up making things more difficult. But I've come up with a new idea on how to interlink these sensibly which should result in much saner code that is also easier to adjust in response to feedback and allows for more AI adaptation to circumstances.
 
Last edited:
I hope we can fix this DPs spam sooner than later.

Border friction within AIs seems to have no effect: everyone got a DP with all Civs inside the same continent and sometime even on the other

Every single game you know you are against the whole world. Sometimes I can provoke a civ to declare war on me but often i have to attack first.

In this iteration I'd advise deploying a warmonger civ who specifically feed on units (Aztecs): you really do not lack targets: do not try a peaceful game. Just won't work at all.

Vassals and CS are the only reliable trading routes.
 
I hope we can fix this DPs spam sooner than later.

Border friction within AIs seems to have no effect: everyone got a DP with all Civs inside the same continent and sometime even on the other

Every single game you know you are against the whole world. Sometimes I can provoke a civ to declare war on me but often i have to attack first.

In this iteration I'd advise deploying a warmonger civ who specifically feed on units (Aztecs): you really do not lack targets: do not try a peaceful game. Just won't work at all.

Vassals and CS are the only reliable trading routes.

I'm working on it, in between trying not to freak out about the fate of the actual world. :)
 
I'm working on it, in between trying not to freak out about the fate of the actual world. :)

Take your time :).

I'm not in a hurry. About Diplo there are two main points that need addressing both you can fix in a way or another already:

_ Bribed Wars: there are options to disable them already in place. Need just tweaking the requirements imho. You could bribe another Civ to a war but a very higher price. Now AIs are accepting bribes of 7 gpt + 1 luxury for a 15 turn war.

_ Defensive Pacts interlaced. For this I adapted my current playing to warmonger only. Added ENW and EAW for that purpose.

Take care :thumbsup:.
 
Thank you for working on this defensive pact problem! I’m playing a 22 CIV game where an AI made 7 DPs with other AIs across the map. Also this spam could be reduced if you only allow civs with DoF to make DP.
 
For now I just personally moved the tech that unlocks defensive pact to Atomic Theory and it quite works...
Now it is more like the late game alliance of AIs to prevent anyone from winning through domination.
Anyway, I'm looking forward to next update. Thanks to those who develop and patch this wonderful mod!
 
For now I just personally moved the tech that unlocks defensive pact to Atomic Theory and it quite works...
Now it is more like the late game alliance of AIs to prevent anyone from winning through domination.
Anyway, I'm looking forward to next update. Thanks to those who develop and patch this wonderful mod!

This is overkill: it means you can snipe easily the weakest civ near you up to end game without risks of a multiple front war. In Atomic era most of the time a warmonger player already got the critical mass of troops to melt any resistance, defensive pact or not.

Anyway moving to Industrial can be a good and simple workaround improvement. Many civs get a powerspike around late Renaissance and early industrial.

A good QoL feature could be displaying how much the def pact lasts so you can time your DoW.
 
For now I just personally moved the tech that unlocks defensive pact to Atomic Theory and it quite works...
Now it is more like the late game alliance of AIs to prevent anyone from winning through domination.
Anyway, I'm looking forward to next update. Thanks to those who develop and patch this wonderful mod!

Does that mean no castles or stables until atomic in your game?
Im a bit curious to try it out, how did you do it?
 
No. Don’t know how that guy did it but for me I just move the allow trading defensive pact line code under the Chivalry tech in the technologies xml in expansion 2 to atomic theory. Works great except the text in the diplomacy still say (require Chivalry) though.
 
No. Don’t know how that guy did it but for me I just move the allow trading defensive pact line code under the Chivalry tech in the technologies xml in expansion 2 to atomic theory. Works great except the text in the diplomacy still say (require Chivalry) though.

Which file where did you say?
 
Top Bottom