• 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.
i preffer dont use lost_national for general reasones.

I see rivers get craizy the ai when its moving the front and get a zone in between rivers or in a river curve. If germany dont take lowney (or something like that) german couldnt go into belgium. Similar in russiaborder, but the front moves slowly becose theres no so much province nexus.

In general it manage good the front and multifront, and the revolt garrisoning. But rivers get mad all the stuff.

I will be changing the AI settings and trying to get the AI to work "normally". If I have any success, I will tell you immediately. If you have any success, please tell me as well. Cheers
 
For proper investigation on AI problems in certain areas of the E3 Map you could start with checking all provinces in the area (connections - types and number (in DH Map we tried to limit those to 6 at most), terrain, infrastructure, cores, revolt risk, IC, resources, VPs etc.). If everything looks OK, then check AI front/combat settings - as a start better reset those to default and start by adding parameters and values one by one with some tests between, until you're getting satisfying results (that could take time and having a map with many provinces and connections only makes this task harder). If noting helps, then look at your mod settings - terrain, weather modifiers, unit stats, missions efficiency, all parameters in misc.txt that alter those. You could also verify balance of powers (techs, IC, armies etc.) of AI countries involved.
 
  • 1
Reactions:
For proper investigation on AI problems in certain areas of the E3 Map you could start with checking all provinces in the area (connections - types and number (in DH Map we tried to limit those to 6 at most), terrain, infrastructure, cores, revolt risk, IC, resources, VPs etc.). If everything looks OK, then check AI front/combat settings - as a start better reset those to default and start by adding parameters and values one by one with some tests between, until you're getting satisfying results (that could take time and having a map with many provinces and connections only makes this task harder). If noting helps, then look at your mod settings - terrain, weather modifiers, unit stats, missions efficiency, all parameters in misc.txt that alter those. You could also verify balance of powers (techs, IC, armies etc.) of AI countries involved.

Thanks for the good advice MartinBG. Cheers
 
i preffer dont use lost_national for general reasones.

I see rivers get craizy the ai when its moving the front and get a zone in between rivers or in a river curve. If germany dont take lowney (or something like that) german couldnt go into belgium. Similar in russiaborder, but the front moves slowly becose theres no so much province nexus.

In general it manage good the front and multifront, and the revolt garrisoning. But rivers get mad all the stuff.

For proper investigation on AI problems in certain areas of the E3 Map you could start with checking all provinces in the area (connections - types and number (in DH Map we tried to limit those to 6 at most), terrain, infrastructure, cores, revolt risk, IC, resources, VPs etc.). If everything looks OK, then check AI front/combat settings - as a start better reset those to default and start by adding parameters and values one by one with some tests between, until you're getting satisfying results (that could take time and having a map with many provinces and connections only makes this task harder). If noting helps, then look at your mod settings - terrain, weather modifiers, unit stats, missions efficiency, all parameters in misc.txt that alter those. You could also verify balance of powers (techs, IC, armies etc.) of AI countries involved.

Just a quick example. In my mod I told the AI to attack Damascus (set to 5000) and a few other places (set to 100). So in dh, it would attack Damascus. Not in the E3 map. I spent a day and a half trying to remedy this, no fix. The AI units would attack anywhere but Damascus, and only eventually Damascus when I had some of the units in Damascus desert their posts...

Thanks to your post and MartinBG's reply, I removed the db/units/div and brig modifiers files. = Immediate 100% improvement. The AI works.

Same game, same everything, the AI units attacked Damascus immediately. They also went on to take all of the Lebanon, which yesterday, they started to attack, and then spent the rest of the day reading newspapers and eating sandwiches.

So, remove the modifiers files in the db/units folder for a quick fix.
 
i could make work belgium invade and the run for the sea, i have to be so tracky but worked, germans need some more advante that they had. now i have to solve some minor problems and balance the huge untis send as expeditionaies, then frech break the front. at south. the time units reagrup to take a new front is huge (its not an error but sometimes is notable the efects) anyway in large fronts is inestable the game , ww1 is too long :/
 
i could make work belgium invade and the run for the sea, i have to be so tracky but worked, germans need some more advante that they had. now i have to solve some minor problems and balance the huge untis send as expeditionaies, then frech break the front. at south. the time units reagrup to take a new front is huge (its not an error but sometimes is notable the efects) anyway in large fronts is inestable the game , ww1 is too long :/

Maybe getting rid of those files is too much?
Maybe either trim the values back, or go back to an earlier dh1.02 version of the same file?

I know that I did a mod for dh1.02 where lots of my AI files worked perfectly, yet when the mod updated to dh1.03, none of it worked after that. I could never figure it out. Maybe that was the reason my invasions never worked in dh1.03 and did in dh1.02?
 
i could make work belgium invade and the run for the sea, i have to be so tracky but worked, germans need some more advante that they had. now i have to solve some minor problems and balance the huge untis send as expeditionaies, then frech break the front. at south. the time units reagrup to take a new front is huge (its not an error but sometimes is notable the efects) anyway in large fronts is inestable the game , ww1 is too long :/

I didn't feel ok with not using any file, a gut feeling. So I went back to my dh1.02 modifiers file and compared it to the dh1.04 file.

I used the dh1.02 file, but the bottom part is from dh1.04. It is only for the basic units. I have tried the file in game, and it works better I think. I have attached the CSV file as a TXT file, so I can post it here.
Maybe try it and see what you think?

Cheers
 

Attachments

  • modifiers.txt
    7,8 KB · Views: 310
mybe i can try it
 
with E3 map imho, ai shouldn't send any expiditionary units to allies, if you want to exp. forces you should prbably add/remove it by event. I didn't test war in europe, but Britain did invasions for my test run (i did some 1897 test scenario) when I pointed them invasion targets.
 
expeditionary arent sent by event, its in ai file, you set ratio of sending trrops and allys to avoid to send. Nothing related to expeditionary unit. it works right in all the games with right definition. i dont undestand the problem.
 
Hello,
I've played few games in different countries and I've found that USA AI is useless. They do nothing. No invasions, no challenges. Last time I seen never ending Pacific War. Is there any solution to improve that AI? (DH 1.04)
 
Well I have a good ww1, was complex to set ai values. I need a event to make support west front until the coming of massive expeditionaries. Principal avoid invasion, done garrison zones to keep a part of German out of west front. And set correctly the expeditionary sets to get it in west front and Mesopotamia.
Reactive is the only set to hold more than one front at time.
 
I asked in the tech support forum, but wanted to also ask here in case anyone can help with it. From what I've been able to track down (savedebug set at 2 shows this file as the last thing the game tries to load before crash), I am getting CTDs from a mildly modified ai file for 1936 England.

If someone can take a look at the following and see if I missed something that is causing the problem (all the other AI files are modded to be similar to this, and don't seem to be causing problems).

# England 1936 AI File by Lothos
# Modified by DH team

switch = no # [yes/no]
max_front_ratio = 1.2
max_garrison_prop = 0.30
min_garrison_prop = 0.20
neutrality = 80.000
war = 1
upgrading = 0.0
reinforcement = 0.0
strat_redeploy_threshold = 50
max_redeploying = 0.05
exp_force_ratio = 0.05 # 0.4 # 0.05
exp_force_ratios = {
FRA = 1.0
}
no_exp_forces_to = { NOR POL DEN CZE U01 }
evac_islands = no

###################################
# Diplomacy
###################################
combat = { }

claim_acceptance = -69

liberate = { AFG ALB ARM AST AZB BEL BHU BLR BUL CAN CHI CZE DEN EGY ETH EST FIN FRA GEO GRE HOL HUN INO IRQ ITA JAP KAZ KOR KYG LAT LIB LIT LUX MON NEP NOR NZL OMN PAK PER PHI POL POR ROM RUS SAF SCH SPR SWE TAJ TAN TIB TRK TUR U02 U24 UKR USA UZB YUG }
liberate_nation = { AFG ALB ARM AST AUS AZB BEL BLR BUL CHI CZE DEN DFR ETH EST FIN FRA GEO GRE HOL HUN INO ITA KAZ KOR KYG LAT LIB LIT LUX MON NOR PAK PER PHI POL POR ROM RUS SAF SCH SPR SWE TAJ TAN TIB TRK TUR UKR USA UZB YUG }

befriend = {
VEN = 50
USA = 100
#BEL = 70
#HOL = 70
EGY = 20
SPR = 40
#POL = 80
AUS = 30
CZE = 40
TUR = 10
IRQ = 20
PER = 20
POR = 20
CHI = 20
}
protect = {
FRA = 150
CAN = 150
AST = 150
NZL = 150
BEL = 150
HOL = 150
U02 = 150
EGY = 150
USA = 150
SPR = 20
#POL = 250
CZE = 250
TUR = 50
IRQ = 10
PER = 10
POR = 10
CHI = 10
}
target = {
#Japan
1552 = 100 # Tokyo

#Germany
163 = 100 # Berlin

419 = 80 # Rome
750 = 25 # Tripoli
}
trade = {
cancel_deal_threshold = 2

energy = -1
rare_materials = -1
metal = -1
oil = -1
supplies = -1
money = -1

favored = {
VEN = 100
FRA = 100
U02 = 100
CAN = 100
AST = 100
NZL = 100
USA = 100
SAF = 100
BEL = 90
HOL = 90
SPR = 30
POL = 20
CZE = 20
TUR = 10
IRQ = 100
PER = 100
POR = 10
CHI = 10
}
embargo = { }
}
tech_sharing = {
favored = {
FRA = 100
U02 = 100
CAN = 100
AST = 100
NZL = 100
USA = 100
SAF = 100
BEL = 90
HOL = 90
SPR = 30
POL = 20
CZE = 20
TUR = 10
IRQ = 100
PER = 100
POR = 10
CHI = 10
}
embargo = { }
not = { }
prioritized = {
# Agriculture
5700 = 100
5710 = 100
5020 = 100
5030 = 100
5040 = 100

# Production
5810 = 100
5820 = 100
5050 = 100
5830 = 100
5060 = 100
5070 = 100
5110 = 100
5120 = 100
5130 = 100
5180 = 100

# Inf support
1310 = 100
1320 = 100
1330 = 100
1340 = 100
1350 = 100
1360 = 100

# Naval Bomber
4190 = 100
4200 = 100
4210 = 100

# Motorized Infantry
1230 = 100
1240 = 100
1250 = 100

# Medium tanks
2070 = 100
2080 = 100
2090 = 100

# Light tanks
2020 = 100
2030 = 100
2040 = 100
2050 = 100
2060 = 100

# Strategic bombers
4220 = 100
4230 = 100
4240 = 100
}
}
###################################
# Spying
###################################
spyprefs =
{
percentage_on_spies = 0.2
percentage_foreign_mission = 0.8

# Used for Intell efficiency and for setting minimum chance to succeed for the AI to do that particular type of mission
spyprefsdata =
{
NumberOfSpies = 20
min_number_of_spies = 5
steal_blueprint = 10
minister_assassination = 5
smear_campaign = 10
coup = 3
sabotage_industry = 10
nuclear_sabotage = 5
found_partisans = 10
massmedia = 10
disrupt_techteam = 10
country = ENG
}
spyprefsdata = {
country_priorities = 10
steal_blueprint = 6 # 10
minister_assassination = 1
smear_campaign = 4
coup = 0
sabotage_industry = 8 # 5
nuclear_sabotage = 0
found_partisans = 5 # 3
massmedia = 3
disrupt_techteam = 5
country = GER
}
spyprefsdata = {
country_priorities = 7
steal_blueprint = 1 # 10
minister_assassination = 1
smear_campaign = 4
coup = 0
sabotage_industry = 8 # 5
nuclear_sabotage = 0
found_partisans = 2
massmedia = 3
disrupt_techteam = 5
country = ITA
}
spyprefsdata = {
country_priorities = 2 # 5
steal_blueprint = 10
minister_assassination = 0
smear_campaign = 0
coup = 0
sabotage_industry = 0
nuclear_sabotage = 0
found_partisans = 0
massmedia = 0
disrupt_techteam = 0
country = SOV
}
spyprefsdata = {
country_priorities = 7
steal_blueprint = 8 # 10
minister_assassination = 1
smear_campaign = 4
coup = 0
sabotage_industry = 7 # 5
nuclear_sabotage = 0
found_partisans = 4 # 2
massmedia = 3
disrupt_techteam = 5
country = JAP
}
spyprefsdata = {
country_priorities = 3
steal_blueprint = 1
minister_assassination = 1
smear_campaign = 4
coup = 1
sabotage_industry = 5
nuclear_sabotage = 0
found_partisans = 1
massmedia = 1
disrupt_techteam = 5
country = SPA
}
spyprefsdata = {
country_priorities = 1
steal_blueprint = 1
minister_assassination = 1
smear_campaign = 4
coup = 1
sabotage_industry = 5
nuclear_sabotage = 0
found_partisans = 0
massmedia = 1
disrupt_techteam = 5
country = HUN
}
}
###################################
# Construction and Tech Research
###################################
#Default values
construction = {
max_factor = 0.9

AA_batteries = no
max_AA_level = 5
AA_provs = { 29 24 18 22 26 27 }

coastal_fort = atwar
max_coastal_level = 3
coastal_fort_provs = {
429 # Malta
# England Coast
26 # Dover
25 # Norwich
27 #Portsmouth
23 # Plymouth
}

radar_station = atwar
max_radar = 3
radar_provs = {
26 # Dover
25 # Norwich
27 # Portsmouth
20 # Plymouth
18 # Shefield
5 # Scapa Flow
}

air_base = atwar
max_air_base = 5
air_base_provs = { }

naval_base = no
max_naval_base = 5
naval_base_provs = { }

land_fort = no
max_land_level = 5
fort_provs = {
348 # Gibraltar
790 # Alexandria
}
fort_borders = { }

ic_at_war = no
force_ic_until = 1938
ic_end_year = 1940
IC_provs = { 4 5 6 7 11 13 36 35 }
}
military = {
relative_build_scheme = no
max_batch_peace = 680
max_batch_war = 320
max_batch_home_front = 180
extra_convoys_war = 0.0500
extra_convoys_peace = 0.0500


#### Divisions etc...
infantry = 38
cavalry = 0
motorized = 0
mechanized = 0
light_armor = 4
armor = 0
paratrooper = 1
marine = 1
bergsjaeger = 0
garrison = 0
hq = 3
militia = 0
# 28 %
interceptor = 10
multi_role = 0
cas = 0
strategic_bomber = 0
tactical_bomber = 6
naval_bomber = 3
transport_plane = 1
flying_bomb = 0
flying_rocket = 0
# 19 %
battleship = 0
d_01 = 0
d_02 = 0
d_03 = 0
d_04 = 0
d_07 = 0
d_08 = 0
d_09 = 0
d_10 = 0
d_13 = 3
d_14 = 0
d_15 = 0
d_17 = 0
d_18 = 1
d_19 = 1
d_21 = 0
d_22 = 0
d_23 = 0
d_25 = 0
d_26 = 0
d_27 = 0
d_28 = 0
d_29 = 0
d_30 = 0
d_32 = 0
d_33 = 0
d_34 = 0
d_35 = 0
d_37 = 0
d_38 = 0
d_39 = 0
d_40 = 0
d_41 = 0
carrier = 0
d_05 = 0
d_06 = 0
d_11 = 0
d_12 = 0
d_16 = 0
d_20 = 0
d_24 = 0
d_31 = 0
d_36 = 0
d_45 = 0
d_46 = 0
d_50 = 0
d_51 = 0
d_55 = 0
d_59 = 0
d_60 = 0
d_64 = 0
d_65 = 0
d_70 = 0
d_71 = 1
d_72 = 0
d_73 = 1
d_74 = 0
d_75 = 0
d_76 = 0
d_77 = 1
d_78 = 0
d_79 = 0
d_80 = 0
d_81 = 1
d_82 = 0
d_83 = 0
escort_carrier = 0
destroyer = 9
light_cruiser = 9
heavy_cruiser = 0
battlecruiser = 0
d_42 = 0
d_43 = 0
d_44 = 0
d_47 = 0
d_48 = 0
d_49 = 1
d_52 = 0
d_53 = 0
d_54 = 0
d_56 = 0
d_57 = 0
d_58 = 0
d_61 = 0
d_62 = 0
d_63 = 0
d_66 = 0
d_67 = 0
d_68 = 0
d_69 = 0
submarine = 0
nuclear_submarine = 0
transports = 5
# 53 %

#### Brigades
artillery = 25
sp_artillery = 9
cavalry_brigade = 0
sp_anti_air = 0
medium_armor = 0
tank_destroyer = 0
light_armor_brigade = 6
heavy_armor = 5
super_heavy_armor = 0
armored_car = 0
anti_air = 7
police = 0
engineer = 6

cag = 100.000
light_cag = 100.000
b_01 = 100.000
b_02 = 100.000
b_03 = 100.000
b_04 = 100.000
b_05 = 100.000
b_06 = 100.000
b_07 = 100.000
escort = 100.0000

naval_asw = 20.0000
naval_anti_air_s = 20.0000
naval_radar_s = 20.0000
naval_fire_controll_s = 20.0000
naval_improved_hull_s = 10.0000
naval_torpedoes_s = 10.0000
naval_anti_air_l = 0.0000
naval_radar_l = 0.0000
naval_fire_controll_l = 0.0000
naval_improved_hull_l = 0.0000
floatplane = 0.0000
}

technology = {
endgoal = { }
preference = {
# Regular Infantry / Mot Inf.
1110 1120 1396 1400 1410 1420 1430 1440 1450 1460

# Inf support
#1970 1980 1990 199100 199110 199120 199130 199140 199150 199160 199170 199180

# Light tanks
2630 2640 2646 2650 2030 2040 2050

# Medium tanks
2070 2080 2090 2140 11000 2660 11010 2670

# Intercepters
4510 4520 4530 4540 4550 4010 4020 4030 4060 4090 15000 15010 15020 4560 4570 4580

# Tactical bombers
4120 4130 4140 4150 4160 15100 15110 4640 4650

# Naval Bomber
#4700 4710 4190 4200 4210 15140 15150

# Strategic bombers
4800 4810 4820 4220 4230 4240 15160 15170 16030 4246

# Manufactoring
5810 5820 5050 5830 5060 5070 5130 5110 5120 5840 5850 5860

# CONSTRUCTION
5100 5900 5910

# Applied Assembly lines 5160 5180
5140 5150

# Computers
5330 5340

#EQUIPMENT Desert
5960 5970

# Computers
5327 5350 5360 5370 5380 5390 5400 53060 53116

# MEDICINE
5640 5650 5660 5670

# Electronic Computers
7140 7150 7160 16000 16040

# Rocket Test, Rocket & Turbojet engine, Practical Turbojet
7550 7560 7570 15500

# Land Doctrines / Armored Divisions
6030 6120 6110 6130 6900 6140 6170 6200 14070 6790 6800 6730 6750 6760 6880 6890 6850

# Naval Doctrines
8210 81380 81300 8200 8220 8230 8240 8250 8260 8310 8320 8330 8340 8350

# Commerce Defense
8170

# Air Doctrines
9040 9090 9100 9110 9120 9130 9210 9220 9230 9240 9250 9350
}
ignore = {
#EQUIPMENT Winter
5920 5930

# Light / Mountain
1240 1250 1260 1270

# Mechanized Infantry
1470 1480 1490

# Marines
1560 1570 1580

# Airborne Infantry
1670 1680 1690

# Armoured Cars
2150 2160 2890 11110

#Tank Destroyer
2190 2200 2210 11020

# SP Rocket Artillery
2980 2260

# Self-Propelled Anti-Air
22910 22920

# Battlecruisers
3360 3370 3380 12030 12040 12050 12060 12070 12080 12090

# Modern BB
3960 3490 3500 12170 12180 12186 12192 12198 12204

# Superheavy Battleships
3520 3964 3968 3530 12210 3972 3976 12220 12230 3980 3984 12240 12250 12260 12270 12280

# Close Air Support
4400 4170

# Air Transports
4250 4260

# Rocket Assembly, Rocketry
5170 7580 7590

# Synthetic Oil
5190 5200

# Nuclear
5490 5500

# Raider Patrols
8550 8560 8570

# Trade Interdiction Submarine
8610 8620 8630 8640 8650 8660 8700 8710 8720 8730 8740 8750

# Amphibious Warfare
82300 82310 82320 82330

# Logistic Support
82500 82510 82520 82530

# Close Air Support Air Doctrines
9050 9060 9070
}
armor = 4
infantry = 5
industry = 6
aircraft = 5
naval = 6
land_doctrines = 4
secret_weapons = 1
air_doctrines = 5
naval_doctrines = 5
}
###################################
# Ground Combat, Leaders and Garrisons
###################################
leader_ratio = {
land_field_marshal =0.02
land_general =0.031
land_lt_general =0.41

sea_grand_admiral =0.02
sea_admiral =0.061
sea_vice_admiral =0.401

air_marshal =0.02
air_general =0.091
air_lt_General =0.11
}
garrison = {
defend_overseas_beaches = yes
home_multiplier = 1.3
overseas_multiplier = 0.5
home_peace_cap = 20 # 100
war_zone_odds = 2.0
key_point_prio_mult = 1.0
revolt_risk_mult = 1.0

# PRIORITIES:
beach = 20 # Beach level 2
capital = 40 # Our capital
human_border = 0 # Ignored for allied human players
war_target = 50 # The next country targeted for attack by this AI

opposing_alliance = 30 # 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

# Borders with specific countries
country_priorities = {
BEL = -1
HOL = -1
LUX = -1
GER = 100
SPA = 5
SPR = -1
ITA = 50
ETH = -1
SCH = -1
FRA = -1
CAN = -1
AST = -1
NZL = -1
POR = -1
CYN = -1
TUR = -1
SIK = -1
TIB = -1
AFG = -1
PER = -1
SAU = -1
IRE = 10
IRQ = -1
}
ignore = {
# India
1532
1518
1522
1521
1512
1513
1503
1504
1494
1493
1477
1471

# Burma
1450
1431
1420
1416

# Singapore
1435
1436
1438
1437

#Actual Beaches to Ignore
1005 # Sharm el-Sheikh
1010 # Eilat
1009 # Gaza
851 # Tanga
1004 # El-Arish
850 # Dar es Salaam

#Libya
773 #Al Jaghbun
754 #Aujila
774 #Calanslo
751 #Ghadames
755 #Sorno

#Egypt/East Africa
800 #Siwa
801 #AinDalla
806 #El Atiun
808 #El Obeid
809 #Waw
807 #Malakal
805 #Omdurman
812 #Gallabal
811 #Kassala
843 #Marsabit
849 #Lindi

#Ethiopia
817 #Asmara
819 #Adwa
822 #Gonder
820 #Debre
829 #Gambela
830 #Jima
826 #Moyale
821 #Denakil
823 #Dese
818 #Diredawa
827 #Ogaden
837 #Bardera

#Belgian Congo
904 #Stanleyville
903 #Buta
905 #Costermanville
906 #Coquihatville
898 #Abertville
902 #Kindu-Port-Empain
901 #Leopoldville
}
province_priorities = {
348 = 30 # Gibraltar
429 = 30 # Malta
790 = 30 # Alexandria
900 = 30 # Suez

# England Coast
23 = 30 # Plymouth
25 = 30 # Norwich
26 = 30 # Dover
27 = 30 # Portsmouth

12 = 20 # Edinburg
22 = 20 # Cardif
20 = 10 # Exeter

17 = 10 # Manchester
11 = 10 # Glasgow
36 = 10 # Belfast

49 = 30 # Calais
51 = 30 # Dunkerque
52 = 30 # Lille

382 = 30 # Iraklion
}
area_multiplier = {
# India and Burma
1538 = 0.3
1517 = 0.3
1495 = 0.3
1415 = 0.3

348 = 2.0 # Gibraltar
429 = 2.0 # Malta
790 = 1.5 # Alexandria
}
}
front = {
recklessness = 1 # 0-3
distrib_vs_ai = even
distrib_vs_human = even

enemy_reinf_days = 6
reserve_prop = 0.1
panic_ratio_vs_ai = 2.5
panic_ratio_vs_human = 2.5
base_attack_odds = 1.3
min_attack_odds = 1.1
max_attack_odds = 3.0
reinforce_odds = 1.3
withdraw_odds = 0.6

strength = 1.0
organisation = 1.0
soft_attack = 1.0
hard_attack = 1.0
ground_defense = 1.0
dig_in = 1.0 # Against defender

frozen_attack = 1.0
snow_attack = 1.0
blizzard_attack = 1.0
storm_attack = 1.0
muddy_attack = 1.0

occupied = 0.7
owned = 0.7

jungle_attack = 1.0
mountain_attack = 1.0
swamp_attack = 1.0
forest_attack = 1.0
hill_attack = 1.0
urban_attack = 1.0
river = 1.0

enemy_handicap = { }
passivity = { }
}
###################################
# Air bombardment and defense
###################################
# Air AI File For Ground Bombings as priority
# bomber is now obsolete and NOT USED AT ALL replace and use Air Marshal instead

air_marshal = {
min_mission_strength_org = 0.8
icxdayscostfactor = 10.0 # How to value true industrial cost when calculating expect causalties
manpowercostfactor = 100.0 # How to value manpower cost when calculating expect causalties
destructionriskthreashold = 0.2 # when to fear a divisiopn might be destroyed

# desirability is a multiplier used when calcualting the mission desirability
airsuperioritydesirability = 60.0 # 30.0
groundattackdesirability = 20.0 # 40.0
inderdictiondesirability = 40.0 # 20.0
logisticalstrikedesirability = 2.0
runwaycrateringdesirability = 1.0 # 10.0
strategicstrikedesirability = 10.0
installationstrikedesirability = 5.0
navalstrikedesirability = 25.0 # 15.0
portstrikedesirability = 30.0 # 9.0
convoyraiddesirability = 1.0 # 9.0

# tolerance is the required kill:loss ration expected to do
# mission, 2.0 accept twice the losses of your enemy, 0.5 accept half
airsuperioritylosstolerance = 1.0
groundattacklosstolerance = 1.0
interdictionlosstolerance = 2.0
logisticalstrikelosstolerance = 0.5
runwaycrateringlosstolerance = 1.5
strategicstriketolerance = 4.5
installationstriketolerance = 1.5
navalstriketolerance = 1.0
portstriketolerance = 1.0
convoyraidtolerance = 1.0

# efficency is a tweakable param to adjust according to how
# much actual damage comes from doing this mission (not to be confused with desirability)
logisticalstrikeefficency = 0.01
runwaycrateringefficency = 0.01
strategicstrikeefficency = 0.01
installationstrikeefficency = 0.01

taskforcetype = { name = "Air Superiority" desiredratio = 0.400 rangeweight = 10.000 airkillpowerweight = 2000.000 hardkillpowerweight = 0.000 softkillpowerweight = 0.000 navalkillpowerweight = 0.000 strategickillpowerweight = 0.000 transportcapacityweight = -1000000.000 airvulnurabilityweight = -1.000 surfacevulnurabilityweight = 0.000 idle = yes reorganize = yes air_superiority = yes }
taskforcetype = { name = "Soft Bombing" desiredratio = 0.250 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = 0.000 softkillpowerweight = 2000.000 navalkillpowerweight = 0.000 strategickillpowerweight = 0.000 transportcapacityweight = -1000000.000 airvulnurabilityweight = 0.000 surfacevulnurabilityweight = -1.000 idle = yes reorganize = yes interdiction = yes ground_attack = yes }
taskforcetype = { name = "Hard Bombing" desiredratio = 0.100 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = 2000.000 softkillpowerweight = 0.000 navalkillpowerweight = 0.000 strategickillpowerweight = 0.000 transportcapacityweight = -1000000.000 airvulnurabilityweight = 0.000 surfacevulnurabilityweight = -1.000 idle = yes reorganize = yes interdiction = yes ground_attack = yes }
taskforcetype = { name = "Strategic Bombing" desiredratio = 0.100 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = 0.000 softkillpowerweight = 0.000 navalkillpowerweight = 0.000 strategickillpowerweight = 2000.000 transportcapacityweight = -1000000.000 airvulnurabilityweight = -0.500 surfacevulnurabilityweight = -0.500 idle = yes reorganize = yes logistical_strike = yes runway_cratering = yes strategic_bombardment = yes installation_strike = yes }
taskforcetype = { name = "Naval Bombing" desiredratio = 0.050 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = 0.000 softkillpowerweight = 0.000 navalkillpowerweight = 2000.000 strategickillpowerweight = 0.000 transportcapacityweight = -1000000.000 airvulnurabilityweight = 0.000 surfacevulnurabilityweight = -1.000 idle = yes reorganize = yes naval_strike = yes port_strike = yes convoy_air_raiding = yes }
taskforcetype = { name = "Airlift" desiredratio = 0.100 rangeweight = 10.000 airkillpowerweight = 0.000 hardkillpowerweight = -2000.000 softkillpowerweight = -2000.000 navalkillpowerweight = 0.000 strategickillpowerweight = -2000.000 transportcapacityweight = 1000000.000 airvulnurabilityweight = -1.000 surfacevulnurabilityweight = 0.000 idle = yes reorganize = yes airborne_assault = yes air_supply = yes }
}
###################################
# Invasions and Naval
###################################
invasion = {
invasion = yes
base = 0.1 #Relative modifier. (lower = specific targets much more important.)
random = 1.0 #How big a random range. (1.0 = 1%)
coastal = 0.1 #increase to avoid coastal forts more.
beach = 0.1 #higher, avoid worst beaches.
max_distance = 250.0 #About the distance from Japan to Batavia
max_staging_distance = 250 # 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.1 #prioritise taking pure islands.
enemy = 1.0 #higher = much more vary of troops in province.
adjacentenemy = 0.5 #higher = much more vary of troops nearby
air_base = 1.5
naval_base = 1.0
#air_support = 3.0
#redirect = priority
ignore = no
help_allies = yes #[yes/no]

staging_province = {
5 # Scapa flow
23 # Plymouth
429 # Malta
747 # Tunis
348 # Gibraltar
}
target = { }
}
admiral = {
min_org = 100 # NEW: Percent of org gained back before the unit can leave port
min_dmg = 98 # NEW: Percent of dmg gained back before the unit can leave port
return_org = 60 # NEW: PERCENT OF ORG LOST BEFORE RETURNING TO PORT applies to all fleets/ships
return_dmg = 80 # NEW: PERCENT OF DMG LOST BEFORE RETURNING TO PORT for repairs applies to all fleets/ships
min_core_attack_fleets = 2 # Minimum amount of attack fleets to defend CORE provinces (default 0)
num_attack_fleets = 4 # ENG/USA default 3, JAP default 2 everyone else is 1

ignore = {
"Southeast Northsea"
"kattegat"
"Bothnian Bay"
"northern baltic"
"southern baltic"
"East North Sea"
"Norwegian Sea"

#Central Mediterranean
"Adriatic Sea"
}
#Which provinces to use as bases..
base = {
5 # Scapa Flow
17 # Liverpool/Manchester
348 # Gibraltar
789 # Alexandria
1517 # Bombay
1432 # Singapore
1707 # Canberra
717 #Rabat
728 #Oran
727 #Algiers
748 #Bizerte
747 #Tunis
750 #Tripoli
761 #Benghazi
765 #Tobruk
429 #Malta
}
target = {
2682 = 100
2683 = 100
2684 = 100
}
core = {
#british coast
2716
2685
2683
2682
2698
2700
2709
2708
#### Gibraltar, suez, malta, cyprus
2430
2740
2176
2181
}
}
 
I asked in the tech support forum, but wanted to also ask here in case anyone can help with it. From what I've been able to track down (savedebug set at 2 shows this file as the last thing the game tries to load before crash), I am getting CTDs from a mildly modified ai file for 1936 England.

If someone can take a look at the following and see if I missed something that is causing the problem (all the other AI files are modded to be similar to this, and don't seem to be causing problems).

I think it would be very unusual for an ai file to crash the game. Usually it will just give an ERROR. I suggest you use WinMerge to compare this file and a similar file and hopefully it will highlight a difference, which you can investigate.

Turn off this file and see if the game still crashes?
 
Thanks for the advice.

yeah I cleaned out any errors I found, but still CTD. I was able to get the scenario to load with a vanilla DH Full England AI file, so something in the modded file above has to be causing the CTD.
 
Thanks for the advice.

yeah I cleaned out any errors I found, but still CTD. I was able to get the scenario to load with a vanilla DH Full England AI file, so something in the modded file above has to be causing the CTD.

The file looks ok when compared to another. The only thing I would suspect are all those d_xx or b_xx units? Are you sure you have matching files for them all?
Switch the debugger back to 1 and see if it gives you an error?

Delimit the b_xx in the units list and see if that is it?

have you counters for all those d_xx units, and are the b_xx units also on the auxillary.bmp?
 
yeah all of the units are defined and all have counters. I went through and changed from vanilla bit by bit and isolated it to the techs under BB and SHBB. I removed some of them and it worked. Too tired at the moment to find the exact one or two that are causing the issue, but will come back to it. At any rate, there is forward progress again. Thanks for the assistance. Those AI files are intimidating, especially since I'm going to need to go through and change a ton of files due to my new units/techs.
 
It is usually controlled by event.
But an AI can declare war all by itself, if it is in the AI file to do so, or it is bellligerent enough. There are lots of reasons.

Do you want to get your AI to declare war?
No, I want to control ROM. It starts a War with the USSR seemingly randomly. I can see no event that would trigger that in its event files and its belligerence is 0.