Here are the different personalities that determine general behaviour and NIs:
balanced - bit of everything
capital - monies & tech
military - fleet or army
colonial - QFTNW, tariffs, and such
diplomacy - relations
And there are a few other yes/no IA factors:
initialized - I forget what this one does.
consolidate - focusing on cores, diplomacy, balancing the income, regaining manpower
static - this determines whether the IA wants to expand
hre_interest - being the emperor
papacy_interest - being the Holy See
A consolidating=yes static=yes IA won't come to war if they are recovering. These all change based on missions, luck, game-state, and a series of modifiers based on conquer, rival, protect, threat, befriend, and antagonize. These modifiers calculate how much Bohemia wants to protect Aachen, and whether it is because they want to befriend them, conquer them, or otherwise. Higher the value, the more immediate. For example, here is Sweden from a save file I have:
Code:
conquer_prov=
{
id=15 (Jylland)
value=100
}
conquer_prov=
{
id=39 (Kurland)
value=43
threat=
{
id="LIT"
value=259
}
threat=
{
id="TIM"
value=47
antagonize=
{
id="RIG"
value=66
}
befriend=
{
id="SWI"
value=38
}
protect=
{
id="NOR"
value=60
}
protect=
{
id="RIG"
value=35
rival=
{
id="LIT"
value=172
}
rival=
{
id="CAS"
value=101
Based on this Europe:
Sweden wants to take Jylland pretty badly, but still have Kurland on their list. You can see that the Rival of Lithuania is more than Castille, due to its proximity and size. The threat from Lithuania is equally more dangerous than the Timurids, because although the Timurids is larger than Lithuania, they are father away and less of an immediate issue. At the same time, Sweden wants to protect Riga, probably with a Guarantee, they will also send spies or go to war against them since the antagonize value is higher. If a country is already an ally, Trust is used to determine loyalty. So when you want France to ally you and it is Impossible or Unlikely, it is because the befriend is low or they have a higher antagonize/conquer=prov value. IA's often want to befriend rivals/threats that they don't want to conquer, while they still may see an ally as a threat or rival.