I've had some significant problems with getting countries to reinforce beachheads, and the beachheads of their allies. In a current KR playthough, national France is invading France and the US had 90 divisions in the United States and just isn't helping their allies at all. I've tried tweaking a number of different things without luck
To get this to work, you need to do 2 things. First you need to set up an event that fires when for instance, the war starts or whatever. This event has to fire a new AI file which is placed in the switch folder of the AI.
It would have a call to the AI file like this:
command = { type = ai which = "switch/ITA_invadeSPA.ai" }
So what happens here is that the AI will now follow whatever commands are in the AI file, an example of which is below: In this call, Italy is invading Spain.
The AI file is here, I'll explain below what is what:
# USA D-Day AI File by Lothos
#changed to Jap ai invasion of USA by novapaddy for Homeland
#
max_garrison_prop = 0.3
min_garrison_prop = 0.2
exp_force_ratios = {
LIB = 0.20
U49 = 0.1
SPA = 4.0
}
combat = {
SPR = 300
}
ferocity = yes
###################################
# Ground Combat, Leaders and Garrisons
###################################
garrison = {
home_multiplier = 0.5
overseas_multiplier = 0.5
home_peace_cap = 1.0
war_zone_odds = 5.0
key_point_prio_mult = 0.3
revolt_risk_mult = 0.3
# PRIORITIES:
beach = 50 # Beach level 2
capital = 1 # Our capital
human_border = 0 # Ignored for allied human players
opposing_alliance = 20 # For neutrals, all alliances are "opposing"
claim_threat = 0 # If we are neutral, countries with claims on us get this
unstable_border = 0 # Bordering countries at war with someone else get this
ignore = {
}
province_priorities = {
460 = 2000 #madrid
750 = 200
752 = 100
761 = 100
}
}
###################################
# Invasions and Naval
###################################
invasion = {
invasion = yes
base = 0.1 #Relative modifier. (lower = specific targets much more important.)
random = 10.0 #How big a random range. (1.0 = 1%)
coastal = 0.1 #increase to avoid coastal forts more.
beach = 0.01 #higher, avoid worst beaches.
max_distance = 100.0 #About the distance from Japan to Batavia
max_staging_distance = 100.0 # How far should the staging area be from the target invasion point
distance = 0.01 #higher = avoid long distance.
pocket = 20.0 #prioritise pockets, ie provinces with no adjacent controlled by same.
island = 0.01 #prioritise taking pure islands.
enemy = 2.0 #higher = much more vary of troops in province.
adjacentenemy = 2.0 #higher = much more vary of troops nearby
air_base = 1.5
naval_base = 1.5
air_support = 3.0
redirect = priority
ignore = no
help_allies = yes #[yes/no]
staging_province = {
475
422
752
771
396
}
target = {
464 = 2000
440 = 2000
441 = 2000
463 = 2000
473 = 2000
}
}
max garrision tells the ai what percentage of your armies you want to be placed in your home country.
exp_force_ratios = {... see where SPA is set to 4.0, this is telling the AI to send lots of armies to Spain, but also some to LIB etc etc.
combat = {... tells the AI I really want to go to war with SPR
ferocity = yes... I don't want to make any peace deals or accept any offers of white peace etc.
garrison.... I probably just made a few adjustments to the basic file. You can compare what is here to the vanilla ai and see the changes.
staging province:....... where your armies and ships will sail from, ensure these are ports
target: the provinces where you want the armies to land, usually they need to have a beach.
..............
SO you can see that the AI file ONLY contains the minimum it needs to know for the job you want it to do. Compared to a normal vanilla AI file, it is very small.
So... the event fires the AI, the AI does the work, and then later you will need to put the AI back to the vanilla or an adjusted vanilla AI file... this needs another event, another AI call back to the vanilla AI file
Have a look in the DH vanilla AI and SWITCH folders, see how stuff was done originally by Lothos.
Hope this helps.