A Couple of Questions About AI War Plotting

dankok8

Elected World Leader
Joined
May 30, 2007
Messages
1,325
Location
Canada
1) Do they take defensive pacts into account? For instance, if I sign a defensive pact with the strongest civ is that a deterrent to declarations or does it simply mean I'll just have a strong ally if they do declare? That can be a pretty important consideration if I'm low on military.

2) Are they opportunistic? I've heard of dagger war declarations. Are those more likely if you have a particularly vulnerable (maybe undefended) city on the border?

3) Is there any reliable way to make the AI stop plotting if they already started to without bribing someone to declare on them? I know that sometimes AI's change or abandon plans.

I've read DanF's explanations about everything else and I pretty much get the whole dynamic but these I'm curious about and couldn't find answers. Thanks in advance.
 
CvTeamAI::AI_doWar() calls CvTeam::getDefensiveStrength() for evaluating targets, which includes the strength of all vassals and defensive pact partners in what it returns. So presumably AIs do count those as part of deterrence.

Vulnerable or undefended cities on the border don't make the AI more likely to go looking for war targets. They make the decision on whether to go to war first, then pick out a target. When considering targets, they don't think tactically; they care about overall defensive strength, and that is a simple yes/no check: are you too strong to safely attack? Having literally 0 military units, or having just 1 warrior less than the threshold to be considered too dangerous with your entire army gathered right on their border, is all the same from their perspective.

Not sure about the third one.
 
The only way I can think of is to quickly whip out (or rush-buy or what have you) a big bunch of technologically superior units and park them in the city that the AI is planning on attacking, based on where they're amassing their stack. I've seen one instance where Julius was thinking of getting cute with a Praetpult attack, but a dozen Crossbows in his target city later and he eventually cancelled his war plans.

I don't think this is a viable method to use on anything but very low difficulties, though. Trying to quickly out-tech and out-produce a Deity Shaka is probably a futile endeavour.
 
The nice thing about AIs that plot at Pleased is the ability to beg 5g off them to get a 10 turn treaty.

I had a war ally dagger me when I took the capital of our AI enemy a turn before my ally would have. Vassals were turned off, so it wasn't a case of vassal diplomacy shenanigans.
 
3) Is there any reliable way to make the AI stop plotting if they already started to without bribing someone to declare on them? I know that sometimes AI's change or abandon plans.
The only thing that forces them to drop random war plotting is them engaging in a war regardless of who declares it. Bribes, dragged in by defensive pacts, holy wars, dogpiles all will do this. This does NOT apply to wars plotted over refused tribute demands, which they can continue to persecute (seemingly indefinitely, in some cases), even at war or with no land route to you.

Or they could become a vassal, though not sure if they can do that in war prep or not (certainly never seen it before).

Technically if they are plotting and you are the ONLY available target, a beg/demand may cause them to drop war plans entirely as they can't consider other targets. Doesn't always work. Other enforced peace treaties (successful stopped war vote) presumably work the same way. Peace treaties buy time, they don't always mean you're in the clear.
 
Thank you for the input. One other thing that I learned a few days ago is that the BUG AI gives you misleading information about peace treaties. For instance I beg Shaka for 10 gold because hes's Pleased and plotting war me, he accepts and we have a 10 turn peace treaty. If he comes in say 7 turns (still 3 turns left on the peace treaty) and demands Civil Service and I give it to him, the peace treaty doesn't get extended. It still expires in 3 turns and yet the active deals screen says that I have a peace treaty for 10 more turns. 3 turns later, Shaka can actually declare on me if he's plotting!

All in all you can't extend peace treaties; only create a new one after the current one expires.
 
IIRC the problem in that case is that if one peace treaty with a given civ expires than every peace treaty with that civ expires. If so I'd personally call it a bug, but yes, it does happen.

Note, by the way, that even outside that situation peace treaties aren't 100% solid protection anyway. There are situations that can force a DoW through a peace treaty, so be weary if you've got Random Events on (I think some random events can cause that to happen) or if the AP is in play (a Crusade called against someone forces DoWs through a peace treaty, IIRC).
 
IIRC the problem in that case is that if one peace treaty with a given civ expires than every peace treaty with that civ expires. If so I'd personally call it a bug, but yes, it does happen.

Note, by the way, that even outside that situation peace treaties aren't 100% solid protection anyway. There are situations that can force a DoW through a peace treaty, so be weary if you've got Random Events on (I think some random events can cause that to happen) or if the AP is in play (a Crusade called against someone forces DoWs through a peace treaty, IIRC).

Can't defensive pacts also cause war during a peace treaty?
 
IIRC they can, yes. There could be other circumstances as well, those two were just the ones that came to mind (slight hint as to how often defensive pacts come up in my games :mischief:).
 
Last edited:
1) Do they take defensive pacts into account? For instance, if I sign a defensive pact with the strongest civ is that a deterrent to declarations or does it simply mean I'll just have a strong ally if they do declare? That can be a pretty important consideration if I'm low on military.

2) Are they opportunistic? I've heard of dagger war declarations. Are those more likely if you have a particularly vulnerable (maybe undefended) city on the border?

3) Is there any reliable way to make the AI stop plotting if they already started to without bribing someone to declare on them? I know that sometimes AI's change or abandon plans.

I've read DanF's explanations about everything else and I pretty much get the whole dynamic but these I'm curious about and couldn't find answers. Thanks in advance.
Can you link that thread?
 
CvTeamAI::AI_doWar() calls CvTeam::getDefensiveStrength() for evaluating targets, which includes the strength of all vassals and defensive pact partners in what it returns. So presumably AIs do count those as part of deterrence.
Interesting, this is news to me. Based on my own experience, it hasn't seemed like AIs care about defensive pacts, or vassals for that matter. If they dislike you, they'll declare (and suicide), even if up against overwhelming military power.

Code diving beats subjective experiences though ;)
 
Interesting, this is news to me. Based on my own experience, it hasn't seemed like AIs care about defensive pacts, or vassals for that matter. If they dislike you, they'll declare (and suicide), even if up against overwhelming military power.
AI power rating is usually a lot higher than it would seem from their actual army. They have spammed barracks and castles everywhere and keep 4-5 units/city to boost their power, while you probably have only some warriors as MP in a few cities while the bulk of your power rating comes from your standing army. Usually if you're at equal power rating with an AI you can easily walk over them, and some AI are even willing to declare war if your power rating is higher than theirs. The biggest lunatics in this regard, capable of attacking you at 1.3x their power rating, are Isabella, Monty and somewhat interestingly Sitting Bull. On the other hand, SB should never consider you a valid target if you're not his neighbor.

Also, if you are at war your opponent's power rating is subtracted from yours in the calculations, making you seem like an easier target. It's also a lot cheaper to bribe civs to war against civs who already are at war.
 
Back
Top Bottom