AI Panics Over Troops Near Border

Lee Saxon

Chieftain
Joined
Apr 29, 2016
Messages
37
So it seems to me completely overblown how panicked and furious the AI gets if you have a lot of troops near its border. Especially since this usually happens because you're defending yourself against some warmonger.

Can we tone that down at all? Or get it to recognize when you're defending yourself? Or, alternately, what are the strategies for dealing with this? Will certain diplomatic relations avoid this problem?
 
So it seems to me completely overblown how panicked and furious the AI gets if you have a lot of troops near its border. Especially since this usually happens because you're defending yourself against some warmonger.

Can we tone that down at all? Or get it to recognize when you're defending yourself? Or, alternately, what are the strategies for dealing with this? Will certain diplomatic relations avoid this problem?
Just say you are not after them, and keep your promise. What's wrong?
 
From memory, AI sends the message if one of the following conditions is true:
- You have 5 or more military units they can see near their borders.

- You had no military units they could see last turn, and you moved 3 or more military units near them in a single turn (that they can see).

- Units inside your own borders count as half.

They will not send the message if you were recently at war, if you resurrected them, if you have a Declaration of Friendship, or if they've given you Open Borders.
 
Just say you are not after them, and keep your promise. What's wrong?

I guess one concern I remember from a previous discussion is the AI seem to be more sensitive to you having troops near them than you seem to be able to in order to ask them to move their troops from your borders. I don't know if it's actually the case, but sometimes it seems that it's much easier for the AI to move troops without near you without diplomatic recourse than vice-versa.

I'm pretty sure I've had people ask me what my troops are doing near them from them while I have a DoF with them (although I could be mistaken). Open borders does certainly makes them less worried though.

Also, I think sometimes the AI won't ask you to move your troops even if you position them threateningly if they want to be at war with you. I had this with Sweden recently (after we denounced each other) - it seemed to me like he must have known I was going to attack as it said on the relationship description 'your military position is somewhat threatening'.
 
From memory, AI sends the message if one of the following conditions is true:
They will not send the message if you were recently at war, if you resurrected them, if you have a Declaration of Friendship, or if they've given you Open Borders.
Is information such as this found in the civilopedia?
 
what i don't understand is the AI likes to build their cities close to my border. and i just happen to have troops standing there, doing nothing. its my standing army or i just dont have space to plonk them anywhere else, and i'll get the negative points "your military deployment is threatening"

BRO. YOU PLANTED YOUR CITY NEAR MY TROOPS. I DID NOT PUT MY TROOPS NEAR YOUR CITY. IF MY TROOPS ARE SO THREATENING STOP BUILDING NEAR MY BORDER YOU IDIOT?
 
I guess one concern I remember from a previous discussion is the AI seem to be more sensitive to you having troops near them than you seem to be able to in order to ask them to move their troops from your borders. I don't know if it's actually the case, but sometimes it seems that it's much easier for the AI to move troops without near you without diplomatic recourse than vice-versa.

I'm pretty sure I've had people ask me what my troops are doing near them from them while I have a DoF with them (although I could be mistaken). Open borders does certainly makes them less worried though.

Also, I think sometimes the AI won't ask you to move your troops even if you position them threateningly if they want to be at war with you. I had this with Sweden recently (after we denounced each other) - it seemed to me like he must have known I was going to attack as it said on the relationship description 'your military position is somewhat threatening'.

Pretty sure it uses the same calculation for humans and AI.

If it says "extremely threatening", it means you have 5 or more units near them (units inside your own borders count as half). They will not send the message otherwise unless you go from 0 to 3+ visible units in one turn.

Is information such as this found in the civilopedia?

No, it's in the diplo AI code.

what i don't understand is the AI likes to build their cities close to my border. and i just happen to have troops standing there, doing nothing. its my standing army or i just dont have space to plonk them anywhere else, and i'll get the negative points "your military deployment is threatening"

BRO. YOU PLANTED YOUR CITY NEAR MY TROOPS. I DID NOT PUT MY TROOPS NEAR YOUR CITY. IF MY TROOPS ARE SO THREATENING STOP BUILDING NEAR MY BORDER YOU IDIOT?

In the AI's defense, your troops are there now, and if you move them away the modifier will disappear the next turn.
 
Pretty sure it uses the same calculation for humans and AI.

If it says "extremely threatening", it means you have 5 or more units near them (units inside your own borders count as half). They will not send the message otherwise unless you go from 0 to 3+ visible units in one turn.



No, it's in the diplo AI code.



In the AI's defense, your troops are there now, and if you move them away the modifier will disappear the next turn.
i can't move them away as there's no where to move them to

and THEY planted the city there. THEY chose to put their borders there so there's no defending the AI at all
 
i can't move them away as there's no where to move them to

and THEY planted the city there. THEY chose to put their borders there so there's no defending the AI at all

It wouldn't be performance effective to spend memory on tracking whether individual units were present before an individual city was settled; it would be hard to code too.

Furthermore, it means that your military units were near their Settler before it founded the city, which is a smart thing to worry about, and currently, your units are trapped, making it more likely you'll declare war on them to get them untrapped.

I think the diplo AI is fine in this specific situation, personally. :)

Getting units trapped can be really annoying, though. Try to be careful of where Settlers are to prevent that from happening.
 
yeah i understand there's coding limitations, i just find it mildly irritating that they choose to live next to you then whine about you having troops.

we're otherwise quite friendly and i didn't want to settle where they settled anyway so there's no border tensions from my end, as long as they behave themselves they're welcome there.

like OP i just wish there was a way to sort of, let the AI know we're friendly and remove those red penalties in special circumstances
 
Maybe if you pick "our troops are just passing through" it should remove the negative modifier as long as the promise holds?
 
It wouldn't be performance effective to spend memory on tracking whether individual units were present before an individual city was settled; it would be hard to code too.

Furthermore, it means that your military units were near their Settler before it founded the city, which is a smart thing to worry about, and currently, your units are trapped, making it more likely you'll declare war on them to get them untrapped.

I think the diplo AI is fine in this specific situation, personally. :)

Getting units trapped can be really annoying, though. Try to be careful of where Settlers are to prevent that from happening.
I don't see what your problem is.
Do you want to attack that player? Do it. Congrats, you gain more room for placing your units.
You don't want to attack? Just tell them you mean no harm, and don't attack them in a while. If you usually keep your word, they'll trust you.
You might end up fighting anyway, but not for this reason.
 
I'm not sure if we're not all playing the same mod or what, but agreeing not to settle near someone [even though they settled near you], promising troops are just passing through, etc, none of those work in CPP 9-25. Even if you have an absolutely 100% track record of keeping your word. You just get denounced and a few turns later the declaration of war comes.
 
I'm not sure if we're not all playing the same mod or what, but agreeing not to settle near someone [even though they settled near you], promising troops are just passing through, etc, none of those work in CPP 9-25. Even if you have an absolutely 100% track record of keeping your word. You just get denounced and a few turns later the declaration of war comes.
Are you sure you get denounced for this reason? Do you have AI logging active? If so, check AI strategy and opinions. My guess is that you get denounced because they want your land, not because you have units nearby.
 
I am always afraid if for no reason someone is moving in my field of vision. About how AI works now, it’s very similar. And this is not a panic, it is a concern for their safety.
 
I'm not sure if we're not all playing the same mod or what, but agreeing not to settle near someone [even though they settled near you], promising troops are just passing through, etc, none of those work in CPP 9-25. Even if you have an absolutely 100% track record of keeping your word. You just get denounced and a few turns later the declaration of war comes.

Military posturing and settling near the AI will raise their aggression even if you agree to stop and keep your word. It just makes them less hostile than if you told them to shove it.

Also, if the AI really wants to declare war, they'll declare war regardless of what you agree to.
 
I didn't get a picture of it at the time, but the Shoshone brought one of their ships within the rough vicinity of the red square, saw the lined up ships (which included all those Ironclads at the time) and asked me to move my troops from their borders.

Spoiler :


I understand there are mechanical reasons for this behavior, but if it's possible to be tweaked or adjusted to not do that, I think it would make things more pleasant. On a purely non-mechanical level, there's really no good justification for that behavior that I can see. Maybe he's worried I was lining up to sail over and attack him (I wasn't), and it'd be to fine for him to use that info to prepare defenses. I certainly would. But it's not overtly aggressive; in point of fact, in this case, it was a defensive preparation of my own based on information from my spies.

Honestly, at this point I'd be fine with the whole "move your troops pls" mechanic going away entirely. It feels frustratingly inconsistent both to use and in the way the AI uses it, and IIRC it's been a source of bugs in the relatively recent past. Switch it out for a simple warning from the AI ("I see your army. Know that we're prepared.") so the player is aware there's a problem, along with the relevant diplomatic modifiers that we have now.
 
And hey presto! An example presents itself.

Spoiler :


How am I not able to ask Shaka to move his troops in this situation?

EDIT: Oh, look at that, as soon as I hit next turn!

Spoiler :


I could've declared on him, of course, but then I would have gotten warmonger penalties. Meanwhile, I have AIs moving five - six tiles away from their border, seeing two ships and screaming at me to move my units "away from their borders."

Infuriating.
 
Last edited:
That looks like a bug. Were at least five of his ships visible to you at the start of your turn?
 
All the ships you can see there were visible at the start.

EDIT: The pictured city is puppeted, FWIW.
 
Top Bottom