• 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.
Hello Fernando,

Hummm, Germ defend italy? the only way that i have seen it work is that say after Sicily is conquered, you have a new gov. and you then make it a puppet of Ger. You could try to put some troops by thier border, ready to move in.

Second, Jap naval ai. I think i have it working pretty well in my IC mod. I will add those changes next and let you know how it goes. I could send you something to look at, if you like.

I have added most of my USA events to DH. I added my 3 coast Dday but left the trigger the same. Worked on most 33 start files. added some that used the 36 start.

I think i changed some numbers in ENG switch files, but anyway, i had 3 invasions in Norway and one from canada, i think, after Ger annexed it. I had to beat them out, tough.


Enjoying the game, :)
 
Last edited:
Right on, I will post an update, or should I send it to you?

I tried to send you a PM but your box was full.

Yeah, sounds great, i was going to try WIF, and whenever i play a game, i start modding the files, :). send me a PM.
 
Hi all,

I wanted to get some feed back on my japan ai changes. I start from the 33 scen. and it takes awhile for me to get to 42 to see how japan is working.

files include 33 start file and almost all jap switch files. you don't have to start from 33 but there could be one thing that won't be set right and that is " home_peace_cap " have it = 35. i haven't even looked at the 36 or 39 start files.

Here is the file. install into DH folder in mods section Full Version. there is a readme file called DbjapAi.txt. it is in the ai folder.

http://www.mediafire.com/download/83bche4fc70zsm7/DB's_Japan_ai_for_DH.rar

Let me know how you like the changes or things you would like to see.

Fernando, I think these changes will work in WIF2. I will try to add them tomorrow and post in the WIF2 thread.
 
Last edited:
That is fine, I will post some questions on wif2 thread and any later updates. :)
 
Some theories on AI amphib/naval performance:
Would lowering the amount of individual island provinces into larger archipelagos improve AI performance?
Could larger 'empty' sea provinces on the map could funnel ships into historical combat/traffic sea ares?
Would creating river/canal prov connections among islands of atolls and archipelagos improve island warfare?
Can a massive increase in shore bombardments stats coy the AI to group combat ships with TPs, and make the AI's support of amphic attacks better?
 
Hi JRHindo,

some good ideas, but i don't think they are needed. I wish i had some better feedback on my changes but based off what i am seeing AI amph. assaults are working fine. If you don't tell the ai what to do in the files then it will just sit there and do nothing.

I am seeing almost every invasion succeed and then they back that up with 7 more divisions and you have work hard to beat them back. My old way of protecting the coast with one division is not going work. I have several areas with 3 divs. and a couple divs back a prov. to reinforce defending a beach.

USA events needed some help and i am still looking at them but i think US will follow some order and not go straight into Dday.

Cheers,
 
Hey DrBob!

You did some great job there with the AI! Now that D-Day works would it also be possible to make the US invade Southern France for Operation Dragoon? That'd be great! ;)

eeeex
 
Hi eeeex,

thanks, What i have in place now with the usa events is a possible landing one of three coasts, normandy, Atlantic, or Med, the other coasts are listed in each file but just with lower numbers so that they might attack another coast.

Hummm, might be tough to write an event for another landing for Dday but what if the first one failed? Would they attack the same coast or try to attack another, that might be interesting.

Cheers, DB
 
Hi eeeex,

thanks, What i have in place now with the usa events is a possible landing one of three coasts, normandy, Atlantic, or Med, the other coasts are listed in each file but just with lower numbers so that they might attack another coast.

Hummm, might be tough to write an event for another landing for Dday but what if the first one failed? Would they attack the same coast or try to attack another, that might be interesting.

Cheers, DB
Historically, Dragoon was made on the demand of the French and for the need of more ports to supply the Allies in France. So a Dragoon would have been needed if a DDay had happened. Dragoon was made from obligation, but plans had been made by the British and Americans to land in the Balkans (Serbia or Bulgaria, to then cut off Greece).

If DDay had failed, the Allies would have been obligated to launch another attack since Stalin had asked for a second European front.
 
Uh... Basically, my whole thing is broken...

https://www.mediafire.com/?cmiid3eauqi7aaq

Pretty much, when i start the scenario i added (French Civil War), the units that are there (for both sides), just start going in random directions no matter what id do or don't go anywhere no matter what id do. i don't know if this is a problem in the AI files, or scenario files, or whatever. But could someone please help me fix this? (your supposed to install it over Kaiserreich)

EDIT: Uh... it does not seem to be a AI problem... when i deleted the .ai file for FRA in this scenario, nothing was different. Could you please still help me with this?
 
Last edited:
Hi JRHindo, It has been awhile,

i have been looking/working on ai invasions and it is working quite well. Excellent work by the DEVS. I am even seeing 12 unit invasions. that might be to many for amphib. assault but it can beat one div. Ai reacts to my switch files, however, i have to start to list beaches in the ignore sections cause ai will go for the easiest invasion. Smart, but not for going into Yugo. mountains. My files have been evolving along those lines.

I am hoping that by listing the french med coast in the dday files, the USA will attack there. Cheers.
 
Hmm that sounds real good.
The second part of the amphib invasion problem, is the lack of the follow up in the invasion. Units are sent out but get no reinforcements for a real scale invasion, like UK or USA sending only 1 unit at a time. This lack of staged invasion, really makes things unrealistic in the AI planning and completely screws in the immersion consistently since HoI1. (An old solution I remember, is to give Southampton to USA so it stacks units there and make landings on Europe.)
The third problem, is the lack of invasion protection. AI really loves to send transports unescorted. And even without considering that transports tend to run away from everything, it is easy to make a "TP net" with a couple of fleets around islands the enemy like to invade. I could get 1 million US deaths in the Pacific like that as Japan in WiF2, after destroying the US navy they kept sending troops naked against carriers.

I have no idea if any of the above is possible, but really thanks for your work Dr.

A thing, kinda unrelated, is that beaches shouldnt be linked to province terrains. The troops of overlord didnt attack mountains, marines didnt attack Mt Suribachi at Iwo Jima and the British didnt plan to attack the Balkan mountains but Dubrovnik and the lows land coast. All beaches of DH are real invadable beaches, and things like pointe du hoc are abstracted or not possible in game. Removing the terrain out of the equation, all beaches would be equal and the AI would just attack as directed by the preferences of the files.
Also I really hate provinces... How to simulate a 2 prov plateau land? Its not hilly if you attack from 1 end of the flat plateau top to the other... Etc. If only the provinces use the % system of EU3-4, or atleast espoused the land more.
 
Is it possible to make the AI construct a building in their capital, without reference to the province ID.
I need to know how because in KR (which I am trying to mod), the capital for certain nations is not always in the same spot each and every time.
 
Is it possible to make the AI construct a building in their capital, without reference to the province ID.
I need to know how because in KR (which I am trying to mod), the capital for certain nations is not always in the same spot each and every time.

You can use triggers to commands in Darkest Hour.
This trigger should allow you to execute the following command in the capital:

capital = { province = a [data = tag] } # check if that province is the capital of TAG (or country in question if not specified)

Example:

command = { trigger = { capital = { province = 300 data = GER } } type = construct which = IC where = 300 value = 1 }
 
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
 
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.