• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Tomnoddy

Captain
8 Badges
Jan 11, 2012
423
30
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Darkest Hour
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Semper Fi
  • 500k Club
I've just done my first "mod", an event chain that lets you customise an Allied peace treaty with Germany, in the early defeat scenario (USA and USSR not involved). Basically, it gives you the chance to rewrite the treaty of versailles, and like the first one, there is the possibility of revanchism if you go too far.

In any case, I want there to be the possibility for Germany, if non-democratic, to continue to have expansionist tendencies.

So what causes the AI to go to war? Obviously, events are a fail safe, but it seems it will do it on its own sometimes.

What determines this/how do i tweak this? The AI seems to have an awareness of force ratios too, and only picks a fight when the opponent's army is smaller.

I've noticed in the ger_1939.ai file :

combat = { }

target = {
#Austria
373 = 80 # Lech
377 = 80 # Innsbruck
462 = 80 # Salzburg
461 = 80 # Klagenfurt
465 = 80 # Linz
464 = 80 # Hollabrunn
463 = 80 # Vienna
460 = 80 # Graz

#Czech
472 = 60 # Liberec
471 = 60 # Usti
466 = 60 # Strakonice
467 = 60 # Tabor

#Poland
303 = 50 # Danzig

#Baltic States
206 = 50 # Memel
}

that's where i need to look then?
 
a lot is triggered by event, eg

################
# Italy invades Greece
#############################################
event = {
id = 26002
random = no
country = ITA

trigger = {
ai = yes
local_flag = ITAInvadeGreece
NOT = { local_flag = ITADefendItaly }
OR = {
NOT = { exists = GRE }
AND = {
NOT = { exists = YUG }
control = { province = 390 data = ITA }
control = { province = 391 data = ITA }
}
AND = {
exists = GRE
NOT = { war = { country = ITA country = GRE } }
NOT = { alliance = { country = GER country = GRE } }
NOT = { alliance = { country = ITA country = GRE } }
random = 15
NOT = { war = { country = ITA country = USA } }
control = { province = 390 data = ITA }
control = { province = 391 data = ITA }
OR = {
garrison = { country = ITA province = 390 type = land size = 4 area = no } # Tirana
garrison = { country = ITA province = 391 type = land size = 4 area = no } # Vlore
}
OR = {
month = 9 # October
AND = {
month = 0 # January
NOT = { month = 1 } # Febuary
}
}
NOT = { local_flag = ITADefendItaly }
OR = {
exists = VIC
control = { province = 56 data = GER } # Paris
}
}
}
}

name = "AI_EVENT"
style = 0

date = { day = 1 month = january year = 1936 }
offset = 1
deathdate = { day = 29 month = december year = 1999 }

action_a = {
command = { type = war which = GRE }
command = { type = ai which = "switch/ITA_Greece_Attack.ai" }
command = { type = sleepevent which = 26001 }
command = { type = local_clrflag which = ITAInvadeGreece }
}
}
################
# Italy atwar with Russia
#############################################

from ai_ita