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

Improvement Ideas: Move Troops from Borders Request

Discussion in 'Community Patch Project' started by Recursive, Oct 22, 2019.

  1. Recursive

    Recursive Emperor

    Joined:
    Dec 19, 2017
    Messages:
    1,814
    Gender:
    Male
    So I've seen a fair number of complaints about the current mechanics for the AI requesting that you move your troops from their borders.

    I'll post the current code here, translated into plaintext. If you have any suggestions on how to improve the mechanic, I'd love to hear any replies.

    The AI will send a request that you move your troops from their borders if the following conditions are met:
    Code:
    CvDiplomacyAI::DoAggressiveMilitaryStatement
    
    (note: Player = the player whose troops are near the AI's borders)
    
    Check if *one* of these two conditions are true:
    - Player has a military aggressive posture of HIGH this turn and they didn't last turn
    - Player has a military aggressive posture of MEDIUM this turn, and last turn they had a posture of NONE
    
    If either condition is true, then send the statement, unless one of these is true:
    - Player is already at war with this AI;
    - Player is not able to declare war on this AI;
    - Player resurrected this AI;
    - Player and this AI have a Declaration of Friendship;
    - AI has given this player Open Borders in AI's lands;
    - Player and this AI are at war with any common foe;
    - Player is at war with any of this AI's neighbors (player proximity NEIGHBORS);
    - AI has already sent this message within the past 40 turns.
    
    If none of the above conditions are true, the message is sent.
    
    Military aggressive posture is determined by the following function:
    Code:
    CvDiplomacyAI::DoUpdateOnePlayerMilitaryAggressivePosture
    
    1. Don't run this function for teammates, unmet players, dead players, players with 0 cities, and Barbarians.
    
    2. Don't run this function for players that AI has a Declaration of Friendship with or has given Open Borders to.
    
    3. Store the military aggressive posture last turn, before we update it for this turn.
    
    4. Loop through all of this player's units.
    
    4a. If the unit is a non-combat or scouting unit, ignore it.
    4b. If the unit is on a plot that we can't see, ignore it.
    4c. Assume the unit has 2 movement. If it can't reach any of our cities within 4 turns of movement, ignore it.
    4d. Assume the unit has 2 movement. If the player who owns the unit is at war with another player, AND this unit could reach one of that player's cities within 4 turns of movement, AND that other player is alive, then ignore it.
    
    5. If we got here, then the unit is threatening to us. Add 10 threat value.
    
    6. If the unit is within the player's own borders, halve the threat value to 5 (since they may just be defending their own lands).
    
    7. If threat value is...
    80 or higher: Aggressive posture is INCREDIBLE.
    50-75: Aggressive posture is HIGH.
    30-45: Aggressive posture is MEDIUM.
    10-25: Aggressive posture is LOW.
    0-5: Aggressive posture is NONE.
    
    NOTES
    - You are supposed to be able to request that the AI move their troops if you are not at war with them, you have not requested this within the past 30 turns, and the AI's aggressive posture towards you is at least MEDIUM.

    - If aggressive posture towards the AI is at least LOW, you will see the opinion modifier "Your military deployment is threatening."

    - If it is at least HIGH, you will see the opinion modifier "Your military deployment is extremely threatening."
     
    Last edited: Oct 22, 2019
  2. Moi Magnus

    Moi Magnus Emperor

    Joined:
    Mar 1, 2015
    Messages:
    1,867
    I'm not sure about the logic on open border. If I understand correctly, currently, if I buy open border to an AI and send my army through their territory, they will feel threatened. But if I sell open border to an AI, and put a huge army in front of their border, they will say nothing. That seems wrong to me.

    I see that the aggressivity does not take in account the size of the border (10 units nearby one city, or 10 units along a 10-cities border, are seen as the same). I know that's complex to take in account, and that it is only relevant in corner cases, but that's the first flaw that came to my mind.
     
  3. Arbi

    Arbi Chieftain

    Joined:
    Oct 20, 2019
    Messages:
    18
    I feel like I get those requests when I bulk-upgrade units in one turn, which maybe shouldn't trigger it (as no unit has actually moved towards the AI)?
     
  4. Recursive

    Recursive Emperor

    Joined:
    Dec 19, 2017
    Messages:
    1,814
    Gender:
    Male
    If they have given you Open Borders, they will not feel threatened by your military. You giving them OB does nothing. I updated my wording for clarity.

    It is true that it only counts the number of units, not the concentration in one area, but I'm not sure how that could be improved. Open to suggestions!

    It shouldn't. If you have a save where that happens and it isn't meeting the above conditions, report it on Github.
     
    JamesNinelives likes this.
  5. ridjack

    ridjack King

    Joined:
    Mar 12, 2017
    Messages:
    684
    So I'm curious, what does having this mechanic actually add to the game? It gives you a choice, obviously: Declare now and lose the advantage, or promise not to declare and then decide what to do with it, with appropriate consequences for those actions. This gives the attacked player a one-turn advantage to position their defensive troops and/or eliminate a few attackers. In some cases, this can be a huge difference; in the majority of cases, in my experience, it's basically meaningless since it's not like you were going to swoop in and take that city in one turn anyway. "All wars start as defensive wars" is a quote used often here, and it's true; very often the first thing I do after declaring is immediately press "Next Turn" without actually moving any units, since I'm planning to try to meatgrinder them anyway.

    More importantly, though, is this: Fully 90% of the time I encounter this dialog, it's an incidental trigger from someone I had no intentions of attacking anyway. I very, very rarely run into this from someone I was intending to attack, and if I do, it's probably because I planned to. Once in a blue moon, it catches me a turn or two early and I have to scramble a tiny bit to establish a foothold.

    I would personally be open to the idea of scrapping the "move or declare" interaction entirely and replacing it with a simple warning from the AI that they suspect you of ill intent, simply so that the player knows when they trigger it accidentally so they can move their troops, or something along those lines. I don't personally feel like it adds much to the game, and it's a frequent cause of annoyance.

    I'm sure that won't happen and there's probably good reasons for that which I haven't considered, but that's my thoughts.
     
  6. Recursive

    Recursive Emperor

    Joined:
    Dec 19, 2017
    Messages:
    1,814
    Gender:
    Male
    The AI is being tuned in the next version to avoid starting attack operations if they aren't actually interested in conquest, so that strategy may be less worthwhile soon.

    The purpose of the mechanic is to trigger the "military promise". If the request is sent, you can either declare war, which grants you a permanent opinion penalty with that AI for refusing to move your troops, or promise not to declare war on them for 20 turns. If you break this promise, you get a global diplo penalty with every civ whether they've met you or not, and a larger penalty with the specific AI you betrayed.

    AI players also receive these penalties if they break/ignore the promise, which can be made between AIs too.

    The idea is that the AI is trying to get you to declare now or face a global diplo penalty for trying to get the drop on them.

    This mechanic is a Firaxis decision, not a VP one.
     
    JamesNinelives and ryanmusante like this.
  7. ridjack

    ridjack King

    Joined:
    Mar 12, 2017
    Messages:
    684
    Sure, and I hated it in vanilla a lot more than in VP, since VP enables the player to do it as well. VP made it tolerable.

    Does that mean it's hard coded such that we couldn't do away with it even if we wanted to?
     
  8. saamohod

    saamohod Prince

    Joined:
    Jul 22, 2014
    Messages:
    572
    Location:
    Unoccupied Ukraine
    That makes little sense to me if I understand it correctly. Permanent penalty for refusing to move my troops but not for declaring actual war. I didn't refuse to move my troops, I moved them into his territory right away.


    In my case it's about 50%. AI often spots my effort of accumulating troops close to his borders as I prepare for invasion and presents me a choice of either let him do the first move on his turn or cancelling my attack until I can manage to do a sudden alpha strike next time. I realize many advanced players declare war and don't advance in order to let the stupid AI come to them to be destroyed more easily. Not in my case.
    I quite like this mechanics actually.
     
    JamesNinelives likes this.
  9. Recursive

    Recursive Emperor

    Joined:
    Dec 19, 2017
    Messages:
    1,814
    Gender:
    Male
    It is possible to remove it rather easily. But, personally, I'd be inclined towards improving it rather than removing it - there's no clear consensus that it's a super unpopular mechanic.

    Declaring war normally gets you only the warmongering penalties, plus extra penalties if you declared war on a friend. Declaring war when the AI sends this request gives you an additional permanent opinion penalty with that AI, although it's less severe than the one for breaking a promise, and is not global.

    In summary, after the AI sends the request:

    "You're right to worry, and it's time for you to die. (DECLARE WAR)"
    Declares war with the usual penalties, and also applies an additional permanent penalty: "You refused to remove your troops from their borders when they asked!"

    "We mean no harm. Our troops are merely passing through the area."
    Makes a 20-turn promise not to declare war on that AI. If kept, no diplo penalty. If broken, a large diplo penalty with that AI, and a global diplo penalty with all AIs (both of which are permanent), regardless of if they've met you or not.
     
    JamesNinelives likes this.
  10. Yaviel

    Yaviel Chieftain

    Joined:
    Aug 14, 2019
    Messages:
    45
    I really don't like permanent diplo penalties or any penalties that last more than two eras.
     
  11. saamohod

    saamohod Prince

    Joined:
    Jul 22, 2014
    Messages:
    572
    Location:
    Unoccupied Ukraine
    Thanks for the explanation.
    This sentence makes little sense to me. Like they put an additional blame on me for refusing to move my troops away from their border. I didn't refuse, I declared war on them. Whether I kept them on their borders or moved them away AFTER I've DOW'd them is no longer relevant, imho.


    I generally agree. I'd extend it for about 3 eras, and only for the most severe "crimes", like attacking a friend or attacking after having promised not to.
     
    Coffee Monopoly likes this.
  12. azum4roll

    azum4roll Emperor

    Joined:
    Jul 17, 2018
    Messages:
    1,124
    Gender:
    Male
    Backstabbing and breaking promises should be permanent. Refusing to make a promise or insulting leaders should not.
     
  13. TranceBlossom

    TranceBlossom Warlord

    Joined:
    Nov 21, 2018
    Messages:
    135
    Gender:
    Male
    Location:
    Tokyo
    Being honest about warmongering when asked by the AI shouldn't carry extra penalties. Getting penalized anyway for NOT backstabbing doesn't have good mouthfeel.
     
    Civ Spies&Lies and saamohod like this.
  14. Moi Magnus

    Moi Magnus Emperor

    Joined:
    Mar 1, 2015
    Messages:
    1,867
    I partially agree with it, but I would rather go on the other direction. "Crime" that are currently given a permanent diplo penalty are here to punish the player for exploiting the AI in ways that cannot be effectively predicted by the game. But I'd rather have them being replaced by unbreakable promises.

    For example:

    "You have too many troops nearby, are you about to declare war to us?.
    A: Yes (declare war).
    B: No, I promise you so (unilateral peace treaty for 10 turns)."

    (Note: I'm not sure unilateral peace treaty are a thing possible in the code, but that would be great if it was)
     
    Yaviel likes this.
  15. azum4roll

    azum4roll Emperor

    Joined:
    Jul 17, 2018
    Messages:
    1,124
    Gender:
    Male
    Unilateral peace treaty is just unfair. Better make it mutual if it must be changed.
     
    4CV likes this.
  16. ridjack

    ridjack King

    Joined:
    Mar 12, 2017
    Messages:
    684
    Agreed 100%. It feels like major cheese.

    How so? It seems fine to me; the aggressor is simply reassuring a concerned leader that he's not attacking.



    Though that does bring up an interesting idea; interesting to me, at least. It'd be neat if you could sign some sort of enforced non-aggression pact, and even neater if such a thing could be coded to be usable with civs that don't particularly like you. I know there are many times when the only thing holding me back from taking down a civ that should be a concern to both myself and another neighbor is that self-same neighbor; he doesn't like me and I know if I attack our theoretical mutual enemy, there's a decent chance of being flanked. If we could sign or trade something that said "neither of you can declare war on the other for 30 turns" or whatever, I could focus on the "real enemy."

    Now that's just plain rude.
     
    Last edited: Oct 23, 2019
    Recursive and Yaviel like this.
  17. DoctorDuke

    DoctorDuke Chieftain

    Joined:
    Jan 15, 2016
    Messages:
    87
    Location:
    Hudson Valley
    A condition I find on occasion: the AI has expanded its territory to a tile adjacent to my idling warrior, and by such expansion thereby invokes the 'move it' message.
     
  18. Recursive

    Recursive Emperor

    Joined:
    Dec 19, 2017
    Messages:
    1,814
    Gender:
    Male
    I can remove the diplo penalty for refusing to make the promise, or put it on a timer.

    Any other suggestions?
     
  19. Rekk

    Rekk Emperor

    Joined:
    Dec 9, 2017
    Messages:
    1,075
    Put it on a timer.
    That's his territory now. Move it or make the promise.
     
    4CV likes this.
  20. azum4roll

    azum4roll Emperor

    Joined:
    Jul 17, 2018
    Messages:
    1,124
    Gender:
    Male
    Make all "promise refusals" expire over time, like refusing to not spy, not settle nearby, not send missionaries, etc. Also do it for insults like "You'll pay for this in time."
     
    usadefcon1 and 4CV like this.

Share This Page