When will AI attack?

dennisg

Warlord
Joined
Jan 16, 2008
Messages
182
Location
Norway
Can somebody point me to the XML that shows what is the cut-off relationship level that an AI will attack on?

What I mean is: What is the most "friendly" relationship level a particular AI will still attack on? Or is it more complicated than that?

I'm asking because I'm in a game where I'm busily gobbling up the world except I have Napolean at my back and his building up a big army. I currently have him at "pleased" but I don't know if that's enough to keep him from attacking me.

thanks!
 
Can somebody point me to the XML that shows what is the cut-off relationship level that an AI will attack on?

What I mean is: What is the most "friendly" relationship level a particular AI will still attack on? Or is it more complicated than that?

I'm asking because I'm in a game where I'm busily gobbling up the world except I have Napolean at my back and his building up a big army. I currently have him at "pleased" but I don't know if that's enough to keep him from attacking me.

thanks!

Are you playing Vanilla or BtS or Warlords?

Each AI has its own "personality". Catherine can attack even when she is "Friendly". Napoleon can attack even at "Pleased" (but not at Friendly). Gandhi won't attack unless Annoyed or worse.

There are a complex set of numbers used by the program to decide when an AI will declare war. You can find it in the Strategy & Tips section. However, what you should really know is that if you go into the Diplo screen with the AI (Napoleon in this case) and see if you can get him to war on someone else by hover over "Declare war on X" option... if it is redded out because of "We have enough on our hands right now", that means he is ALREADY preparing for war (or at war).

If he says "We have enough on our hands right now", you should check the diplo screen to see who his worst enemy is. He could attack anyone that he isn't friendly with, though, so watch out! That is the key phrase to give you warning that he is planning war. No guarantee when... could be next turn, could be 75 turns... conditions could change and he stops planning war altogether. But most likely within 10 turns, usually.
 
I'm playing Bts.

Thanks for the info, but maybe I should put the question like this: Is there a particular relationship level where an AI will NOT attack. For example, according to your statement about Ghandi, if he's cautios (or better) he will never attack. So, in my case, I'm curious about Napolean: I have him at pleased. Does this guarantee that he won't attack me?

Is this type of "cut off" available in an XML file somewhere?
 
No AI will set a warplan against a civ it is friendly toward (but it is possible--rare but possible- for an AI to decide to go to war with a rival at pleased, and then later become friendly, but if the AI made the decision to declare, it will follow through), and most AIs though wol't decide to go to war with civs they are pleased toward as well. Also the AI strongly weights it's attitude when deciding a target to attack, so just having other rivals it dislikes more helps immensely, though it also puts a lot of weight in it's decision based on it's rival's power, so having a weak military is an invitation for an AI to attack.
 
I'm playing Bts.

Thanks for the info, but maybe I should put the question like this: Is there a particular relationship level where an AI will NOT attack. For example, according to your statement about Ghandi, if he's cautios (or better) he will never attack. So, in my case, I'm curious about Napolean: I have him at pleased. Does this guarantee that he won't attack me?

Is this type of "cut off" available in an XML file somewhere?

I link to the BtS v3.13 spreadsheet for AI values here. I got this from Strategy & Tips section, and maybe it is updated for 3.17 (but most of it is probably unchanged) and you can download it here. The way to read this is the line 62 "Declarewarthemrefuse" threshold. The AI will not declare war on another civ that it is at or above this threshold (including the human player's civ).

Hope that helps.

Edit for afterthought: Actually, I think Phungus is correct and I was reading the "above the threshold" comment incorrectly. Catherine is above the threshold for Friendly when she is Friendly. Napoleon is above the threshold for Pleased when he is at pleased. Thus, Napoleon will not attack you if he is Pleased or Friendly. That makes more sense. I think you are safe.
 
Thanks a million. That's exactly what I needed to know...time to build up my border forces :)
 
Another thing to keep in mind is demands/requests. Some AIs (the warmongers) will make a roll if you are below their threshold (usually anything below friendly for a warmonger) if you refuse them to see if they set a warplan against you. So it's often the safe thing to do to just aquiese to AI demands/requests (also it removes you from their target list when they go about making warplans for a few turns, so often if you do do this, they'll pick another target if they really want to go to war, which makes you safe-- the AI will only set about going to war against a single target).

For instance, lets say Shaka comes asking for a tech, and you refuse. Suddenly you see his declare war options are redded out and it says "We have enough on our hands right now" This pretty much means Shaka decided to go to war against you because you refused his demand. Likewise, say you decided to give him the tech, and you check his diplo stance and the same thing happens, You can now be sure Shaka has decided to go after another rival, and you are safe from him.
 
The way to read this is the line 62 "Declarewarthemrefuse" threshold. The AI will not declare war on another civ that it is at or above this threshold (including the human player's civ).
This threshold is only relevant for bribing an AI into an ongoing war with another player. When the AI leaders consider to start a new war on their own their NoWarProbs are the critical xml-values.

NWP.png


Napoleon has the NoWarProbs 10|50|90|100 for his attitudes Annoyed|Cautious|Pleased|Friendly which means that after he rolled the dice to start a war, the chances of other players to become a valid target are 90%|50%|10%|0% (100%-NoWarProb, chances > 0% can also be higher if Nappy uses Dagger strategy). Thus you are not completely safe from a pleased Napoleon!!

There are 3 leaders that can be bribed into a war vs. a "friend" who they would not decide to DoW on their own:
Bribe.png


The best known example is Cathy who can be bribed by a player she is friendly with (DecW > Pleased) vs. another player she is also friendly with (DecWThem <= Friendly), although her NoWarProb for Friendly is 100. The same holds for De Gaulle and Suleiman and the attitude Pleased.

All values taken from the zipped file attached to this post.
 
Wow, thanks DanF5771! I knew this topic was one I would learn some new things -- not the least of which is how to make sense of all those numbers.

:thanx:
 
Another thing to keep in mind is demands/requests. Some AIs (the warmongers) will make a roll if you are below their threshold (usually anything below friendly for a warmonger) if you refuse them to see if they set a warplan against you. So it's often the safe thing to do to just aquiese to AI demands/requests (also it removes you from their target list when they go about making warplans for a few turns, so often if you do do this, they'll pick another target if they really want to go to war, which makes you safe-- the AI will only set about going to war against a single target).

For instance, lets say Shaka comes asking for a tech, and you refuse. Suddenly you see his declare war options are redded out and it says "We have enough on our hands right now" This pretty much means Shaka decided to go to war against you because you refused his demand. Likewise, say you decided to give him the tech, and you check his diplo stance and the same thing happens, You can now be sure Shaka has decided to go after another rival, and you are safe from him.


but if you have a higher power rating then shaka he would not attack you.

The key to determine whether a AI will attack you or not is the power level. if you have a lower power level and you don't give tribute then the AI will attack you. If you have a higher power level with a few exceptions the Ai will not attack you regardless of how insulting you are.
 
So, in my case, I'm curious about Napolean: I have him at pleased. Does this guarantee that he won't attack me?

You can't trust Napolean. Even though he's not one of the Aggressive civs he should be. If he sees an opportunity he will take advantage of it. Make sure you stay more powerful than he is, that will be a poweful incentive for him not to attack. He likes to prey on weakness.
 
but if you have a higher power rating then shaka he would not attack you.

That's not true, I've had him declare even though I've been much more powerful than he was. He will declare on you just because. He's one of the wigged out characters in the game and just likes to scrap for the sake of it. Military power has little to do with his decision, you only have to piss him off in other ways.
 
That's not true, I've had him declare even though I've been much more powerful than he was. He will declare on you just because. He's one of the wigged out characters in the game and just likes to scrap for the sake of it. Military power has little to do with his decision, you only have to piss him off in other ways.

Are you sure someone didn't bribe him? Only times he declare on me when i have a higher power rating was because i was in a war with someone else and that someone else bribe him to declare on me.
 
Are you sure someone didn't bribe him? Only times he declare on me when i have a higher power rating was because i was in a war with someone else and that someone else bribe him to declare on me.

No, I've had him declare just because he was more powerful than everyone else but me. He tends to get cocky after awhile if he's managed to beat the crap out of a few other civs. As long as he doesn't have any vassals in tow he usually fairly reasonable as far as the power levels are concerned, but once that happens he just gets stupid. And it doesn't take much of an advantage for him to make an enemy of you. If you are just on par with him, you're not safe. You have to be clearly more powerful, not just a little bit more. I consider Shaka the most dangerous neighbour I could possibily have in the game. Not only does he like to build very large armies but he'll expand like crazy until he becomes downright uncontrollable. The plus side is that he doesn't usually tech very well so if you can survive him until later in the game you can gain superiority with him on that front.
 
re. the deterrence effect of power:

You need at least 150% of the leaders' iMaxWarNearbyPowerRatio to prevent a direct neighbor (with whom you share a long enough border) from plotting a war against you.

Shaka: you need at least 135% of his power
Nappy: you need at least 180% of his power
Monty: you need at least 195% of his power :eek:

This is a hard cut-off threshold --> if you miss one Soldier then deterrence = 0!

If you are already at war with someone, an AI-leader contemplating to join in dogpile-style adds the power of your current enemies to his own, then you need at least 67% of this total power to prevent a dogpile war.

In all calculations the powers of vassals are included in their master's power.
 
Back
Top Bottom