AI says 'our worst enemy'

when the AI is deciding whether to trade with you or not, they're evaluating their attitude towards your "team". usually a team is a PA, and/or a team you set up in the custom game screen. but for tech trades, it gets weird, because your team there is defined to also include any vassals you have.

Is that true only for trading or war declarations as well? Because that would explain why there are so many threads out there about AI declaring war on people although they claim they have been friendly for centuries. I researched this a bit and this one says that for war declarations, team attitude is used. It classifies which instances use the player attitude vs team attitude. (e.g. civic change is player attitude but declare war is team attitude) I assume you're familiar with all this since there's a lot of posts of yours in there too. :) So my question is, does all that info apply to BTS as well?

My other question is that you seemed to imply there might be different versions of team attitude. One that takes only PA into account and one that takes vassals also. How does that work?

(A more practical example: In my current game Isabella is friendly with me although our borders are super close. I just got a vassal and now she gives me WFYABTA because I checked and she's pleased towards my new vassal, which averages to pleased because of the rounding down. Now, could she declare war on me now if she wanted to, or is the war declaration based on player attitude only and I have nothing to fear?)

EDIT: Reading about all this stuff has been quite eye opening for me btw. I put a lot of energy into diplomacy too and it seems like making a colony has a pretty big penalty on your diplomatic relations, when you are sure to lose friendly status with ALL the AIs. (since no vassal is going to start friendly with them)
 
It turns out that the default CvTeamAI::AI_getAttitude call does in fact check vassals as well as team members. I'd guess that function is used in general to check attitudes, so it very well could be causing problems with war declarations.

edit: Hmm, curiously there's another call for the actual attitude value (the previous just returns the attitude type), CvTeamAI::AI_getAttitudeVal which does not take vassals into consideration, just actual teammates.

edit2: Well, it definitely looks like it's using the former function when checking for war declarations, so I'd say with reasonable certainty that even if your are Friendly, if you have vassals, and they aren't Friendly, you could still get declared on.

Bh
 
My other question is that you seemed to imply there might be different versions of team attitude. One that takes only PA into account and one that takes vassals also. How does that work?

how it works and when one is used vs. the others is code-y i guess, as Bhruic explained there are two "functions" it can call and it uses one function for some purposes and another function for other purposes. he can read code and i can't, i just read posts about the code.

those two versions of teams act decidedly differently. true "we are joined forever in every way" teams, which are PAs and/or teams formed in custom options before the game starts share all techs instantly. i learn it, you know it, we don't have to trade, there's actually no way for me to stop you from learning it with me. that's the AI_getAttitudeVal.

this "for some purposes" definition of a team to include vassals (AI_getAttitude) isn't sharing wonders and techs that way. if my vassal learns something i have to trade with him to learn it too. often he won't trade, sometimes because i have another vassal and the two of them are bickering. dorks.

i really don't know why they made the game decision to treat tech trades the "true team" way, since i quite frankly don't give my vassals everything i learn. that would often be suicide since they might then go trading it with others (if the circumstances allow trading blah blah), or somebody might demand it off them. if you're allowed to demand things from vassals, not the master, if it's not your vassal? i dunno, nobody has vassals but me in the game i have running now. but even if he doesn't share the knowledge with anybody else, the more people that know a tech, the cheaper it is for others. so if i want to hang on to my privateer glory days when they can't make frigates, nobody's getting chemistry from me, not even my best buddy vassal. not to mention that he'd have frigates to attack my privateers, and nothing stops him from attacking them even tho i'm the master! *giggle*
 
It's interesting some of the "gimmicky" stuff that the variation of the code allows. For example, when checking for "worst enemy", it uses vassals to determine if the overall average attitude type is Cautious. But then when it checks to see how much it hates that team (assuming the attitude is worse than Average), it doesn't use vassals. So you can actually have a situation where the AI hates your team the most (based on raw attitude numbers) but doesn't consider you their "worst enemy" because they really like one of your vassals. :)

Luckily the reverse can never be true - if one of your vassals is dragging down your "team average", because that vassal is actually considered on a separate team, then the AI will hate that vassal specifically, and not your team in general.

Oh, and as for why they decided to consider vassals for tech trades - you might not give your vassals all your techs, but the AI does. So for AI <-> AI trades, it's important that they take that into consideration. But it just goes to illustrate what I said above - if you're going to take a vassal, try and take a really popular one. It's going to open up a lot more diplomatic options for you.

Oh, and here's something I didn't know - if you happen to share a common enemy with an AI player, they will always grant an Open Borders treaty. Even if you've recently cancelled an Open Borders treaty with them. And even if they consider you their "worst enemy". It's a good way to sneak in Missionaries.

Bh
 
It's interesting some of the "gimmicky" stuff that the variation of the code allows. For example, when checking for "worst enemy", it uses vassals to determine if the overall average attitude type is Cautious. But then when it checks to see how much it hates that team (assuming the attitude is worse than Average), it doesn't use vassals. So you can actually have a situation where the AI hates your team the most (based on raw attitude numbers) but doesn't consider you their "worst enemy" because they really like one of your vassals. :)

let me see if i'm reading that right. when checking whether it has any worst enemy at all, that "if i'm cautious or higher with everybody i have no worst enemy" check, it uses vassals. but then when deciding which enemy is the worst, because they're annoyed/furious with one or more people, then it doesn't include vassals for that part? if so, cool!

if i am getting that right (chances are high that i'm not), then what would happen in the case that my team is the only one on the map that he's lower than cautious with, but i would (if there was competition) not be the winner of the "worst" prize? does it not go thru the "how to pick a worst" code unless there are two enemies in contention, so in that case i'm worst enemy by default i'm guessing?

"Oh, and as for why they decided to consider vassals for tech trades - you might not give your vassals all your techs, but the AI does. So for AI <-> AI trades, it's important that they take that into consideration."

yeah, they do sometimes, good point. i see some people say they always give their vassals every tech and that sure doesn't match what i see *giggle*.

"Oh, and here's something I didn't know - if you happen to share a common enemy with an AI player, they will always grant an Open Borders treaty. Even if you've recently cancelled an Open Borders treaty with them. And even if they consider you their "worst enemy". It's a good way to sneak in Missionaries."

spiffy thanks! i'm assuming you mean "common enemy" as in you're both at war with somebody?
 
Tell me a good reason why they consider vassals...?

Now, if you told me a good reason for my question above, tell me a good reason why the modifiers about it should be hidden...?
 
let me see if i'm reading that right. when checking whether it has any worst enemy at all, that "if i'm cautious or higher with everybody i have no worst enemy" check, it uses vassals. but then when deciding which enemy is the worst, because they're annoyed/furious with one or more people, then it doesn't include vassals for that part? if so, cool!

Basically, it checks each team, to see if their "average" attitude is lower than Cautious. This includes vassals attitudes. If the team's average is lower than Cautious, it then checks the numerical value for the attitude. The numerical value does not include vassals attitudes.

Let me give an example. Assume that you are the only player on your team, and you have one vassal (Shaka, just to pick a name). Now let's say that Alexander is checking to see who his worst enemy is. Alexander is Furious with you, but he is Friendly with Shaka.

So, the first thing it does is check to see if your "team" attitude is less than Cautious. Your actual team attitude with Alexander is, of course, Furious since you are the only team member. But because it takes vassals into consideration, it also counts Shaka - who is Friendly. Since "Friendly + Furious" / 2 = Cautious, your "team" attitude with Alexander is considered Cautious - and therefore you cannot be Alexander's worst enemy.

if i am getting that right (chances are high that i'm not), then what would happen in the case that my team is the only one on the map that he's lower than cautious with, but i would (if there was competition) not be the winner of the "worst" prize? does it not go thru the "how to pick a worst" code unless there are two enemies in contention, so in that case i'm worst enemy by default i'm guessing?

True, if there is only one team with an attitude lower than Cautious, that team is automatically the worst enemy. Only if there is more than one does it compare the numerical values. Of course, this can also work in your favour. Let's use the same Civs as above, but adjust the attitudes - Alexander is Cautious with you, and Furious with Shaka. "Cautious + Furious" / 2 = Annoyed, so you qualify to be worst enemy. So then it checks the numerical value, which doesn't take Shaka into consideration. Since you are only Cautious with Alexander, your numerical value is going to be in the -2 to 2 range. However, any other team that was less than Cautious is most likely going to be -3 or lower, because that's where Annoyed sets in. So once again, as long as there is another team that is less than Cautious with Alexander, you are likely to avoid the worst enemy tag.

spiffy thanks! i'm assuming you mean "common enemy" as in you're both at war with somebody?

Sorry, yes, that's what I meant, you are both at war with the same enemy.

Bh
 
Tell me a good reason why they consider vassals...?

Because vassals are semi-team members. Let's take my first example to KMadCandy - Alexander is Furious with you, but Friendly with your vassal Shaka. So if he's in a situation where he wants to go to war, he has to consider if he wants to go to war with someone who is Friendly with him, because if he goes to war wih you, he goes to war with Shaka. The "master/vassal" complete attitude is pretty important.

The same is true with tech trades, as mentioned above. If you give a tech to the AI, and tech trading is on, the AI will almost always give that tech to its vassal. So therefore, when the AI is trading with another AI player, it's important that it consider if it wants to give both AIs the tech.

Now, if you told me a good reason for my question above, tell me a good reason why the modifiers about it should be hidden...?

They aren't "hidden", exactly. It's just one of the game mechanics that isn't exposed to the player. Most of the game is like that.

bh
 
Let's take my first example to KMadCandy - Alexander is Furious with you, but Friendly with your vassal Shaka.

maybe your example applies better for Arlborn than it does for me. Alex has never once been furious with me i'll have you know! he's my bestest buddy! ;) but the example worked, because i understand it, so thank you :)
 
Thanks for all the explanation and great examples, Bhruic and KMadCandy! :)I've learned a lot from this thread and I find this stuff very interesting.
 
They aren't "hidden", exactly. It's just one of the game mechanics that isn't exposed to the player. Most of the game is like that.

bh

Yes, OK, but I disagree with the part of not hidden. Yes, they are, and no, I don't see reason for it to be hidden. If it was a very difficulty calculation, with codes and son, OK, but it is the outcome here we are talking about, and this is easy enough to show. I would love to see why an AI hates me though I got good relationship with it, and I am sure that most of the players would too. After all, you didn't yourself no? So you also wanted to see it, and it proves it is not impossible to put it in-game.

After all, it is a complex strategy game we are talking about here! It is pretty important to our strategic considerations to see what would be the outcome of one of our actions, don't you think? Or, maybe, why something is happening! No?


EDIT: Hey, it is no rant against you/firaxis, nor flaming, please! Just a suggestion! Or something like it! :crazyeye:
 
Back
Top Bottom