When You Warn an AI Of An Impending Attack...

Cicerosaurus

Emperor
Joined
Oct 31, 2007
Messages
1,013
Location
Brisbane Australia
Do they actually do anything about it? That is, apart from thanking you.

I was wondering if they move units to meet the threat. Be a bit hard to tell unless you had a spy in the city I guess.
 
I used to think they didn't. Then, in my game over the weekend, I warned Napoleon that Pachacuti was plotting against him, and he denounced him the next turn, so now I'm not sure...
 
i just assumed they did what i do in the same situation: not do anything about it until war is declared and also think the leader warning me was deserving of my benevolence

and tourism
 
Sometimes you'll get a + diplomacy bonus modifier. I haven't figured out quite how and when you get it, though. But you'll notice it when it shows up, something like "You shared information with us."
 
It makes sense that the AI does actually do something about it. This why the Civ that was going to attack often aborts it s attack when it suddenly notices the other Civ starts amassing defensive forces in preparation...

I remember once my spy told me Attila was gong to make a sneak attack on Siam . I didn`t tell Siam. A few turns later Attila made his surprise attack. If I`d told Siam I bet I would have heard nothing since Attila would`ve likely aborted due to Siam`s defences being up.
 
AI will try to do something about it, of that I'm 100% sure. And it's not so much obvious things you can see like denouncements.

They do the practical things like will move forces back, and decide against an attack they were planning on someone else. They will also cancel ongoing wars if they can.

That said, AI is limited by other Civ AI, the human player and the game mechanics.

They can't magically summon an army to protect their cities, or make peace with someone they are at war with if the terms are not favourable. So if they have a weak army or half their army is in a war somewhere and can't get a peace treaty quickly to pull their forces back, chances are you can warn them and it may still look like they didn't do anything about it. It could well be they tried, but didn't /couldn't get enough forces in-time.
 
I always share the Intel. What is the downside? Maybe they do something. Maybe not. But either way it is a small, free diplomatic bonus.
 
I always share the Intel. What is the downside?

Well, if someone is going to attack my primary rival or the map leader, I definitely want them to have every advantage they can get. If they decide not to attack or if the attack doesn't do well because my rival is prepared, that's a pretty significant downside.

Heck, I might even join in. For sure, I'm not going to warn him.

Now, if it's the other way around (my rival attacking a weaker nation, who might even be my ally), then darn straight I'm passing on the intel.
 
Sometimes you'll get a + diplomacy bonus modifier. I haven't figured out quite how and when you get it, though. But you'll notice it when it shows up, something like "You shared information with us."

Since the XML reveals that the AI uses modifiers that weigh the chances of war, geographic proximity and aggressor strength, my guess is that the more surprising the attack would have been, the stronger the modifier. That would explain why even civs that are "GUARDED" or "HOSTILE" list the share-intrigue as bright green, which suggests that the Player-AI relations are not part of the equation.

So if Atilla plots against Ghandi, and Attila is geographically "far" and military threat "low", as well as the chance of war "high" because of a history of wars or denunciations, the modifier would be weak.
Could be completely wrong though!
 
I searched the entire source code for eIntrigueType which should find anything to do with intrigue. All I found is code that manipulates the diplomacy engine itself, code that changes the diplomacy bonus attitude modifiers and code that allows lua to modify intrigue behavior for modders or scenarios.

I found nothing that actually changes the behavior of the AI's economic or military behavior to incoming intrigue information. My guess is that the code has not been written for this and that the AI's actual behavior to intrigue merely reflects what they are already thinking themselves about the matter anyway. It would be difficult to code the AI to respond intelligently to intrigue if you think about it.

But I could be completely wrong though!
Maybe I am missing something.
 
I searched the entire source code for eIntrigueType which should find anything to do with intrigue. All I found is code that manipulates the diplomacy engine itself, code that changes the diplomacy bonus attitude modifiers and code that allows lua to modify intrigue behavior for modders or scenarios.

I found nothing that actually changes the behavior of the AI's economic or military behavior to incoming intrigue information. My guess is that the code has not been written for this and that the AI's actual behavior to intrigue merely reflects what they are already thinking themselves about the matter anyway. It would be difficult to code the AI to respond intelligently to intrigue if you think about it.

But I could be completely wrong though!
Maybe I am missing something.

Well, you are correct regarding eIntrigueType, but on the other hand, the lua code for the Discussion Dialog window clearly points to a gameplay function of some sort where the information about the shared plot is being sent. If you follow the action corresponding to the "Share plot" button from within the lua code, you end up inside a function within the CvGame.cpp file, where the information for the plot being shared by the human is marked as SHARED.

I couldn't follow that lead any further right now, but to me it clearly suggests that something is being done by the code, somewhere, with the information related to an intrigue (in which intrigueType is only one variable of many). Without having investigated further, I would say there is a list of intrigues being maintained by the game at all times, of which only those marked as SHARED are accessible for the AI for further decision making.
 
It makes sense that the AI does actually do something about it. This why the Civ that was going to attack often aborts it s attack when it suddenly notices the other Civ starts amassing defensive forces in preparation...

I remember once my spy told me Attila was gong to make a sneak attack on Siam . I didn`t tell Siam. A few turns later Attila made his surprise attack. If I`d told Siam I bet I would have heard nothing since Attila would`ve likely aborted due to Siam`s defences being up.

Interesting. I always shared because I thought it 'costs' nothing and gains some diplo points. If it prevents that war, I may be wrong! I'll think harder about it next time.
 
It would be difficult to code the AI to respond intelligently to intrigue if you think about it.

Hmm. There are some basics that would be easy. Move a few units to the cities nearest the threat. Increase priority of building military.

That is what I do when I suspect a neighbor is up to no good. Seems the AI could too.

Having one or two units extra in the city that gets attacked can make a real difference, buying time for a better response.
 
Computer players don't even attack me when they're "plotting" against me. Seems unlikely it has any effect on anything anyway.

"Plotting" against you is actually very relevant. It means they're willing to break agreements or do obviously hostile things like convert your cities or dig up your artifacts. The fact that you haven't noticed it meaning anything just means you're not paying very close attention.
 
"Plotting" against you is actually very relevant. It means they're willing to break agreements or do obviously hostile things like convert your cities or dig up your artifacts. The fact that you haven't noticed it meaning anything just means you're not paying very close attention.

That`s right. Plotting don`t necessarily mean attacking. Just be aware that the `plotting` Civ is not thinking of doing anything good for you. It might be war, it might be something else.

If it`s war, and you build up in preparation, as I have done, then don`t be surprised if nothing happens, since the Plotter has probably decided to abort, seeing your readiness. A Player can test this by doing nothing when he gets a warning and see what happens?
 
Speaking of 'Plotting against' - Sometimes its almost like an A.I. is lieing to me about whom is actually plotting against me. For a few times already now, I have had someone whom I have had definite problems with tell me that my best friend was plotting against me, right before the person whom I have ill relations with declared an attack on me themself, sometimes even backstabbing.
I'm curious if this is a thing as well, where an A.I. will try and use deceit with such a message to have your focus elsewhere for a while.
 
Speaking of 'Plotting against' - Sometimes its almost like an A.I. is lieing to me about whom is actually plotting against me. For a few times already now, I have had someone whom I have had definite problems with tell me that my best friend was plotting against me, right before the person whom I have ill relations with declared an attack on me themself, sometimes even backstabbing.
I'm curious if this is a thing as well, where an A.I. will try and use deceit with such a message to have your focus elsewhere for a while.

NO. Code is clear in that sense; there is no "lying" part. Intrigues are discovered by spies in an enemy city, and put on a list. If some intrigue is shared by an AI, that intrigue is marked as SHARED in said list, and made available to the affected AI for decision making.

Bottom line, all intrigues are true. That is NOT a guarantee that they will come into effect, as the Strategy AI has complex dynamic code that shifts strategies on the go according to environment and changing conditions (that is why, for example, some players report "false intrigues" of imminent attacks when, in fact, their reaction to the shared intrigue changed the conditions of the game and made the plotter AI shift strategies from Sneak Attack to something else, effectively cancelling the initial plot).

It's all in the CvMilitaryAI.cpp file.
 
Back
Top Bottom