1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Adjusting defensive pacts

Discussion in 'Community Patch Project' started by andersw, Oct 31, 2020.

  1. andersw

    andersw Emperor

    Joined:
    Feb 11, 2008
    Messages:
    1,110
    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?
     
  2. Recursive

    Recursive Covets Lands That You Currently Own Moderator

    Joined:
    Dec 19, 2017
    Messages:
    2,373
    Gender:
    Male
    I limited it to 2 per AI civ (plus 1 for every 10 other ingame civs). Are they going above that?
     
    JamesNinelives likes this.
  3. andersw

    andersw Emperor

    Joined:
    Feb 11, 2008
    Messages:
    1,110
    Location:
    sweden
    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
     
  4. AndreyK

    AndreyK Prince

    Joined:
    Mar 31, 2017
    Messages:
    324
    Gender:
    Male
    Location:
    Yakutsk, Russia
    Yes, they have on large map with 11 AI 4, 5 defensive pacts
     
  5. Recursive

    Recursive Covets Lands That You Currently Own Moderator

    Joined:
    Dec 19, 2017
    Messages:
    2,373
    Gender:
    Male
    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!
     
  6. InkAxis

    InkAxis Prince

    Joined:
    Feb 24, 2020
    Messages:
    408
    Gender:
    Male
    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.
     
    Nightmare Dusk likes this.
  7. Recursive

    Recursive Covets Lands That You Currently Own Moderator

    Joined:
    Dec 19, 2017
    Messages:
    2,373
    Gender:
    Male
    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: Nov 1, 2020
  8. InkAxis

    InkAxis Prince

    Joined:
    Feb 24, 2020
    Messages:
    408
    Gender:
    Male
    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.
     
  9. Recursive

    Recursive Covets Lands That You Currently Own Moderator

    Joined:
    Dec 19, 2017
    Messages:
    2,373
    Gender:
    Male
    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.
     
  10. Recursive

    Recursive Covets Lands That You Currently Own Moderator

    Joined:
    Dec 19, 2017
    Messages:
    2,373
    Gender:
    Male
    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: Nov 1, 2020
  11. General_Drax

    General_Drax Warlord

    Joined:
    Sep 23, 2019
    Messages:
    222
    Gender:
    Male
    Location:
    Bologna, Italy
    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.
     
    mcdunne likes this.
  12. Recursive

    Recursive Covets Lands That You Currently Own Moderator

    Joined:
    Dec 19, 2017
    Messages:
    2,373
    Gender:
    Male
    I'm working on it, in between trying not to freak out about the fate of the actual world. :)
     
  13. General_Drax

    General_Drax Warlord

    Joined:
    Sep 23, 2019
    Messages:
    222
    Gender:
    Male
    Location:
    Bologna, Italy
    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:.
     
    JamesNinelives likes this.
  14. Glassmage

    Glassmage The Desert Flame

    Joined:
    Apr 23, 2011
    Messages:
    1,633
    Location:
    USA
    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.
     
  15. myeong1129

    myeong1129 Chieftain

    Joined:
    Feb 5, 2014
    Messages:
    14
    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!
     
  16. General_Drax

    General_Drax Warlord

    Joined:
    Sep 23, 2019
    Messages:
    222
    Gender:
    Male
    Location:
    Bologna, Italy
    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.
     
  17. andersw

    andersw Emperor

    Joined:
    Feb 11, 2008
    Messages:
    1,110
    Location:
    sweden
    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?
     
  18. Glassmage

    Glassmage The Desert Flame

    Joined:
    Apr 23, 2011
    Messages:
    1,633
    Location:
    USA
    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.
     
  19. andersw

    andersw Emperor

    Joined:
    Feb 11, 2008
    Messages:
    1,110
    Location:
    sweden
    Which file where did you say?
     
  20. Glassmage

    Glassmage The Desert Flame

    Joined:
    Apr 23, 2011
    Messages:
    1,633
    Location:
    USA
    civ5technologies.xml. move this line <DefensivePactTradingAllowed>true</DefensivePactTradingAllowed> to atomic theory
     
    Good Ol’ Bender likes this.

Share This Page