• 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.
@077
copy .../Darkest Hour/map/Map_1/Province.csv to .../Darkest Hour/Mods/Your Mod/map/Map_1/
open province.csv (a 'comma seperated values' spread sheet) with an appropriate application
if you manage this than infrastructure will be column K

alternatively and less efficiently you can also add infrastructure modifiers in the .inc files within /scenarios. this will allow the game to import the base map values unchanged but alter the infrastructure values during initialization.
example:
.../Darkest Hour/Mods/Darkest Hour Full/scenarios/1914/bases.inc
line 1028: province = { id = 1072 infra =-0.1 } #Kirikkale
this will subtract 10 "percent" of the infrastructure from the province of kirkkale when DH Full 1914 secnario loads. it is a lot easier to make changes in provinces.csv all you need is the proper software and it's manual.
 
Last edited:
@077
copy .../Darkest Hour/map/Map_1/Province.csv to .../Darkest Hour/Mods/Your Mod/map/Map_1/
open province.csv (a 'comma seperated values' spread sheet) with an appropriate application
if you manage this than infrastructure will be column K

alternatively and less efficiently you can also add infrastructure modifiers in the .inc files within /scenarios. this will allow the game to import the base map values unchanged but alter the infrastructure values during initialization.
example:
.../Darkest Hour/Mods/Darkest Hour Full/scenarios/1914/bases.inc
line 1028: province = { id = 1072 infra =-0.1 } #Kirikkale
this will subtract 10 "percent" of the infrastructure from the province of kirkkale when DH Full 1914 secnario loads. it is a lot easier to make changes in provinces.csv all you need is the proper software and it's manual.
Thank you so much really helpful
 
I wonder...

Would it be possible to modify the AI in a way that it combines divisions into single stack armies, instead of forming a front line? Similar to how wars were fought in the 19th and 18th centuries, where campaigns focused on an army or two trying to approach and capture a target city, limited by their logistics and traveling quite slow.

Border provinces that aren't occupied by the main armies could have 'Fort' divisions in them, which would just be beefed up Garrison divisions that take a very long time to destroy (couple months to a year).
 
Can anyone tell me what exactly is wrong with this AI file? Apparently the problem starts at invasions and naval:

# USA 1936 AI File by Lothos
# Modified for the USSA for Back in the USSA by der Kriegsherr

switch = no # [yes/no]
max_front_ratio = 1.2
max_garrison_prop = 0.90
min_garrison_prop = 0.10
neutrality = 80.000
war = 0
reinforcement = 0.0
upgrading = 0.0
strat_redeploy_threshold = 50
max_redeploying = 0.10
exp_force_ratio = 0.03
exp_force_ratios = { }
no_exp_forces_to = { CHC DDR PAN U59 U60 U10 U11 U12 U13 U14 U31 U32 U33 U34 U35 U37 U64 U65 U66 U67 U69 U72 }
evac_islands = no

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

claim_acceptance = -69

liberate = { }

liberate_nation = { CHC DDR PAN U59 U60 U10 U11 U12 U13 U14 U31 U32 U33 U34 U35 U37 U64 U65 U66 U67 U69 U72 }

# Special resistance against "influence" by the listed nations. Value range = [0 - 10]
resistance = {
GER = 8
JAP = 8
RUS = 7
ENG = 7
}
befriend = {
PAN = 50
IRE = 70
SPR = 40
CHC = 20
U59 = 50
U60 = 50
U37 = 50
U13 = 50
U14 = 25
}
protect = {

PAN = 300
U59 = 300
U60 = 300
U37 = 300
U10 = 500
U11 = 500
U12 = 400
U13 = 300
U14 = 300
}

combat = {
JAP = 200
GER = 200
ENG = 80
RUS = 90

}
target = {
#Japan
1552 = 100 # Tokyo

#Germany
300 = 100 # Berlin
7266 = 100

#France
56 = 100

}
trade = {
cancel_deal_threshold = 2

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

favored = {
IRE = 90
HOL = 90
SPR = 30
POL = 20
CZE = 20
U59 = 40
U60 = 40
CHC = 40
}

embargo = { }
}
tech_sharing = {
favored = {
PAN = 100
BEL = 90
HOL = 90
IRE = 30
SPR = 20
CZE = 20
}
embargo = { JAP }
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

# Motorized Infantry
1400 = 100
1410 = 100
1420 = 100
1430 = 100
1440 = 100
1450 = 100
1460 = 100

# Mechanized Infantry
1470 = 100
1480 = 100
1490 = 100
1510 = 100
1520 = 100

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

# Light tanks
2020 = 100
2630 = 100
2640 = 100
2650 = 100
2030 = 100
2040 = 100
2050 = 100
2060 = 100

# Marines
1560 = 300
1570 = 300
1580 = 300
1590 = 300
1600 = 300
1610 = 200
1620 = 100
1630 = 100

# Vehicle Assembly
5140 = 100
5150 = 100
5160 = 100
5180 = 100

# Strategic bombers
4220 = 100
4230 = 100
4240 = 100

# Escort/Multirole Fighters
4040 = 100
4050 = 100
4070 = 100
4080 = 100
4100 = 100
4110 = 100

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

# Tactical Bomber
4140 = 100
4150 = 100
4160 = 100
}
}
###################################
# Spying
###################################
spyprefs =
{
percentage_on_spies = 0.2
percentage_foreign_mission = 0.9

# 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 = 3
steal_blueprint = 10
minister_assassination = 5
smear_campaign = 10
coup = 3
sabotage_industry = 10
nuclear_sabotage = 0
found_partisans = 10
massmedia = 10
disrupt_techteam = 10
country = U00
}
spyprefsdata = {
country_priorities = 9
steal_blueprint = 6 # 10
minister_assassination = 1
smear_campaign = 4
coup = 0
sabotage_industry = 10 # 5
nuclear_sabotage = 0
found_partisans = 6 # 2
massmedia = 3
disrupt_techteam = 5
country = GER
}
spyprefsdata = {
country_priorities = 10
steal_blueprint = 6 # 10
minister_assassination = 1
smear_campaign = 4
coup = 0
sabotage_industry = 5
nuclear_sabotage = 0
found_partisans = 8 # 3
massmedia = 3
disrupt_techteam = 5
country = JAP
}
spyprefsdata = {
country_priorities = 1
steal_blueprint = 0
minister_assassination = 0
smear_campaign = 0
coup = 0
sabotage_industry = 5
nuclear_sabotage = 0
found_partisans = 9
massmedia = 8
disrupt_techteam = 0
country = RUS
}
spyprefsdata = {
country_priorities = 6
steal_blueprint = 10
minister_assassination = 1
smear_campaign = 4
coup = 0
sabotage_industry = 5
nuclear_sabotage = 0
found_partisans = 1
massmedia = 3
disrupt_techteam = 5
country = ITA
}
spyprefsdata = {
country_priorities = 2
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
}
}
###################################
# Construction and Tech Research
###################################
#Default values
construction = {
max_factor = 1.0

AA_batteries = no
max_AA_level = 4
AA_provs = {
7242 # Pearl Harbour
662 # Midway
765 # San Francisco
7101 # Los Angeles
761 # San Diego
780 # Seattle
600 # Boston
602 # New York
606 # Washington DC
651 # Miami
}

coastal_fort = no
max_coastal_level = 3
coastal_fort_provs = { }

radar_station = no
max_radar = 4
radar_provs = {
7242 # Pearl Harbor
1736 # Hawaii
662 # Midway
765 # San Francisco
761 # San Diego
780 # Seattle
549 # Anchorage
600 # Boston
602 # New York
606 # Washington DC
651 # Miami
}

air_base = yes
max_air_base = 10
air_base_provs = {
663 # Honolulu
662 # Midway
1766 # Johnson Island
1765 # Phoenix Island
}

naval_base = no
max_naval_base = 10
naval_base_provs = {
}

land_fort = no
max_land_level = 10
fort_borders = { }

ic_at_war = yes
force_ic_until = 1940
ic_end_year = 1948
IC_provs = {
761 # San Diego
780 # Seattle
765 # San Fransisco
7101 # Los Angeles
1878 # Portland
600 # Boston
602 # New York
606 # Washington DC
651 # Miami
616 # Detroit
620 # Chicago
614 # Pitsburgh
603 # Newark
608 # Philladelphia
715 # Dallas
716 # Houston
707 # Denver
733 # Salt Lake City
}

nuclear_reactor = yes
nuclear_reactor_prov = 6182 # Los Alamos
max_nuclear = 10
}
military = {
relative_build_scheme = yes
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 = 10
cavalry = 0
motorized = 10
mechanized = 4
light_armor = 0
armor = 4
paratrooper = 0
marine = 1
bergsjaeger = 0
garrison = 0
hq = 2
militia = 0
# 14 %
interceptor = 2
multi_role = 5
cas = 0
strategic_bomber = 5
tactical_bomber = 6
naval_bomber = 3
transport_plane = 0
flying_bomb = 0
flying_rocket = 0
# 7 %
battleship = 3
carrier = 13
light_carrier = 1
escort_carrier = 1
destroyer = 8
light_cruiser = 9
heavy_cruiser = 0
battlecruiser = 0
submarine = 0
nuclear_submarine = 0
transports = 13
# 79%

#### Brigades
artillery = 15
sp_artillery = 9
cavalry_brigade = 0
sp_anti_air = 0
medium_armor = 0
tank_destroyer = 0
light_armor_brigade = 6
heavy_armor = 0
super_heavy_armor = 5
armored_car = 5
anti_air = 3
police = 0
engineer = 6
amph_armor = 6
glider_armor = 2
glider_artillery = 2

cag = 100.000
light_cag = 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 = { 5540 16020 } # Nuclear
preference = {
# Landdoctrines
6010 6040 6050 6060 6070 6080 6090 6100 6900

# MEDICINE
5600 5610 5620 5630 5640 5650 5660 5670

# Manufacturing
5810 5820 5050 5830 5060 5070 5130 5840 5850 5860

# Construction Engineering
5800 5080 5090 5100 5900 5910

# Applied Assembly lines 5160
5140 5150 5180

# Computers
5310 54010 54020 54030 5320 5330 5340

# Computers
5316 5326 5327 5350 5360 5370 5380 5390 5400 53060 53116

# Electronic Computers
7140 7150 7160 16000 16040

#EQUIPMENT
5980 5990

# Regular Infantry
1010 1020 1030 1040 1050 1060 1070 1080 1090 1100 1110 1120 1130 1140 1150 13000 13010 13020

# Inf support
1910 1920 1930 1940 1950 1960 1970 1980 1990 199100 199110 199120 199130 199140 199150 199160 199170 199180

# Motorized Infantry
1396 1400 1410 1420 1430 1440 1450 1460

# Mechanized Infantry
1470 1480 1490 1510 1520

# Medium tanks
2070 2080 2090 2140 11000 2660 11010 2670

# Light tanks
7600 7610 2010 2630 2640 2646 2650 2030 2040 2050 2060

# Marines
1560 1570 1580 1590 1600 1610 1620 1630 1640 1650 1660

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

# Escort/Multirole Fighters
4040 4050 4070 4080 4100 4110

# Naval Bomber
4700 4710 4190 4200 4210 15140 15150

# Tactical Bomber
4140 4150 4160

# Carrier
3510 3520 3530 3540 3550 12060 3560 3570

# Light Carrier
12100 12110 12120 12130 12140 12150

# Engagement Tactics - Fleet-in-Being colum
8900 8910 8920 8930 8940 8950 8960 8970 8980 81050 81060 81070 81080 81090 81100 81110 81120

# Air Doctrines
9040 9090 9100 9110 9120 9130 9190 9210 9220 9230 9240 9250 9350

# Nuclear
5470 5480 5490 5500 5510 5520 5530 5540 7170 7180 7190 16010 16020

# Rocket
5560 7550 7560 7570 7010 7020 15500
}
ignore = {
# Battlecruisers
3310 3320 3330 3340 3350 12030

# Light / Mountain
1160 1170 1180 1190 1200 1210 1220 1230 1240 1250 1260 1270 1280 1290 1300 13030 13040 13050

# Close Air Support
4400 4170 4280 4450 4180 15120 15130

# Close Air Support Air Doctrines 9040
9050 9060 9070 9080 9270 9280 9290 9300

#EQUIPMENT Winter
5920 5930
}
armor = 4
infantry = 5
industry = 6
aircraft = 6
naval = 6
land_doctrines = 4
secret_weapons = 2
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.5
overseas_multiplier = 1.0
home_peace_cap = 1.0
war_zone_odds = 2.0
key_point_prio_mult = 0.3
revolt_risk_mult = 0.3

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

opposing_alliance = 50 # 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 = {
CAN = 100
MEX = 100
}
province_priorities = {
7242 = 20 #Pearl Harbour
606 = 20 #Washington
765 = 15 #San Francisco
}
area_multiplier = {
7242 = 1.5 #Pearl Harbour
606 = 2.0 #Washington
765 = 1.5 #San Francisco
549 = 0.0 #Alaska
}
ignore = {
# Pacific Islands
2150 # Unalaska
2139 # Unimak
2141 # Juneau
549 # Anchorage
2145 # Nome
1749 # Samoa

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

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

# 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
}
}
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 = 30.0
groundattackdesirability = 40.0
inderdictiondesirability = 20.0
logisticalstrikedesirability = 2.0
runwaycrateringdesirability = 10.0
strategicstrikedesirability = 10.0
installationstrikedesirability = 5.0
navalstrikedesirability = 15.0
portstrikedesirability = 9.0
convoyraiddesirability = 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 = {
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 = 1.0 #higher, avoid worst beaches.
max_distance = 250.0 #About the distance from Japan to Batavia
max_staging_distance = 100 # 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 = 2.0 #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.5
#air_support = 3.0
#redirect = priority
ignore = no
help_allies = no

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 = 1 # 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

#Which provinces to use as bases..
base = {
7242 # Pearl Harbour
765 # San Francisco
1812 # Norfolk
651 # Miami
602 # New York
600 # Boston
1760 # Rabaul
1624 # Agana/Guam
939 # Tunis
348 # Gibraltar
30 # Dublin

}
target = { 38 32 2242 1188 1191
}
core = {
4266
6572
6573
6574
6575
6576
6577
1902
1915
1916
1917
1919
1920
1924
1925
1931
1932
1933
1934
1935
1940
1968
2230
2232
2310
2310
2312
2314
2315
2316
2350
4244
4245
4246
4247
4248
4261
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
7808
7828



#Panama/Guantanamo
7480
7481
7482
7483
4116
4236
4237
4238
4239
4240
4241
4242
4243

#Pearl
1927
1929
1930
1944
1945
1946
1947
2637
}
}
 
@der Kriegsherr
savedebug.txt: ERROR : (Missing = in statement.) '38 = {' Line = 814 file = Mods\E3Mod/ai\USA_1936.ai

Admiral and invasion targets must have a value i.e.:

admiral = {
#specific provinces can be targetted to get special bonuses..
target = {
592 = 200 # prov id = priority / higher integers given higher priority by AI
...
}

I checked your target list and it is in the wrong position as well. These are land provinces with beaches and therefore should be within the invasion script not the admiral script which conducts patrols of ocean provinces.
 
Last edited:
Last edited:
I might look at them later. It is simple to correct mistakes. Just look in your savedebug.txt in the root folder. It will indicate at the bottom of the list which error resulted in your CTD.

@der Kriegsherr
As an example when I first initialize after copying your ai folder too my E3Mod I get a crash reported in savedebug as:

ERROR : (ai-prefs : Unexpected field) 'core = {' Line = 279 file = Mods\E3Mod/ai\CHC.ai

So, I open chc.ai with a text editor (leafpad) that displays line numbers. Line 279 is literally "core = {". I check for syntax with 'AI File Modifiers.txt' in the DH modding documentation directory. I discover the problem:
Core must be braced within the admiral script while in your chc.ai it is braced within the invasions script. Invasions doesn't recognize a subheader like core. Admiral recognizes the core subscript which lists it's coveted defensive sea zones. Such as ocean provinces adjacent too major naval bases.

You must either learn how to script the AI properly within syntax displayed in the published "manuals" or contract a scripter for your mod. I doubt anyone will want to correct someone elses bibliography of errors. Thankfully, the AI files are one of the more labor intensive and complex modding tasks. If you are able to complete a set of working scripts for the AI nations than you're half way finished a conversion mod for Europa.
 
Last edited:
I just throw this inside here:
Country A has defined this in the current active AI Setup:

target = {
165 = 10
166 = 50
167 = 10
168 = 20
}
On *random date*, a event triggers which loads "new_file.ai" for Country A.

new_file.ai contains these lines:

target = {
169 = 100
}

How the AI will react after that?
Is the new target Input added to the existing AI Setup?
target = {
165 = 10
166 = 50
167 = 10
168 = 20
169 = 100
}

Or will the new files overwrite the AI Setup completely?
target = {
(165 = 0)
(
166 = 0)
(
167 = 0)
(168 = 0)
169 = 100
}

Would be great if some knows something about this :)
 
After an ai switch event any cited subscript (target =) will be completely overwritten in the eug database. Therefore, you have too make logical progressive steps if you want to change targets. Although, the ai can target distant provinces while maintaining frontlines and patrolling contiguous sea zones. You have too include the base script call. Otherwise, the eug won't be appended. Scripting this type of directed battleplan you should be mindful that an included nation ai file does not overwrite (switch = yes) this subscript during year change.
This switch will only overwrite target and not other invasion values:

front = {
target = {
165 = 10
166 = 50
167 = 10
168 = 20
169 = 100​
}​
}
edit: changed invasion to front
 
Last edited:
I am having a strange while modding Edge of Darkness. England keeps declaring war on Japan in May of 1939 without an event. This amusingly gives them 111% dissent, but I'm at a standstill until I figure it out. Are there any other variables besides these that anyone knows of that might cause this?

- "Anyone can start war" is turned off.
- No event fires to declare war and nothing looks unusual in the history.txt or savedebug.txt with additional logs enabled.
- The ENG AI files/switches have "war = 1" which I have changed to "war = 0", but it doesn't seem to help. I may need to restart the whole campaign to be sure.
- The ENG AI files/switches do not have "combat = { JAP = X }" set so that looks good.

Thanks in advance for any advice.
 
Last edited:
Can't check against your current released version because the mega.nz link from your facebook returns the unavailable error.
From AI files JAP might have DoWed upon one of ENGs 'protect =' guarantees. Seeing as how you are probably aware of your AI file changes (changelog) I doubt the problem is there. I'm guessing either the scenario .eug was changed or AI aggressiveness was changed from game options. Due to JAPs belligerence and ENGs threshold or thier relations the policy sliders allow for war declarations. If ENG is a democracy than that shouldn't matter if democracy wars are off...
If you upload a compressed savegame.eug before ENG DoWs than I'll take a look.
 
Last edited:
@mccarty.geoff I really appreciate your time. I'm truly hoping that this was a freak incident due to the vanilla setting of "war = 1" in England's .ai files that I have since corrected. I've ran 12 new hands-off test games since I changed the value to 0 in all files and I can't reproduce the problem again. A few months ago I had the same issue with the USA declaring war on JAP and it was resolved by changing their "war" value to 0 in the AI files.

Here's a save game where ENG declares war within a week or so of loading. If you load up as ENG yourself, you do indeed have the option of declaring war at a 111.1% dissent cost:

https://www.dropbox.com/s/tcas4iwe3jy43w4/Edge of Darkness ENG DoW Japan.zip?dl=1
 
Found the moddir. Reminder that the Facebook link to the mod is incorrect.
policy_effects.csv. MODIFIER_USE_BELLIGERENCE_FOR_DOW is enabled within the Democratic table and with ENGs interventionism at 7 they are allowed to DoW on a nation with 19 belligerence. There are also strange values in the relationships DoW in that table. Don't believe Relationships_DoW is implemented properly yet.
Personally, I like what was done with policy effects especially the belligerence modifier. Democratic nations are not peace loving humble societies. I suggest reducing the DoW dissent cost because it looks to me like Britain was in a good position too wreck some Japanese shipping and pull China's butt out of the fire. You'd have to have a good UK v. Jap naval war switch and possibly expeditionary forces to NatChi. Historically, the Kingdom was prepared for this through their "Singapore Strategy" though in '39 they were cowed by German expansionism and a probable reoccurence of the great war.
They should make the ideology matrix optional. Add three more policy 'sliders'. Square away the UI. Add a dozen more policy effects. Then clean up the csv so it doesn't look like a stupid combat resolution table. I'll post this issue as a bug report.
 
Last edited:
Surely they were totally winded in the Russian brawl, Russia took Vienna once and Budapest twice, but was ultimately repelled and Germany was 50 miles from Moscow when the Soviets ended the war. §Just want to add some details to the Russian front: it wasn't a back and forth wall like 1940's. Germany shot up through the Baltic and Pytorgrad, but retardedly wasted eight months outside an empty Moscow while the bulk of the Russian force was diving over the Carpathians and into Austria.

I'm sure this is a recurring issue among any mods, simply due to the base game coding. Yeah, I had a game with an AI Germany that was one province away from Moscow but after eight months, never managed to occupy it, instead closing up a few gaps around the city because other troops advanced past it and then going in opposite directions to fight a couple partisans, only a few really.
I remember it being August 1917 seeing the Germans literally one province away, thinking, wow they could finish this before winter, but as I spent time on my nation, the game elapsed until summer of 1918 before Soviets took control. They had been roosting outside the city the entire time. It might not have ended the war maybe because the Russians had occupied nearly all Hungary and Bohemia, but should have been a priority to capture it by the AI.
 
hi there

I have this 2 files:

Darkest Hour/ai/mod/RCW/UKR_1936.ai
Code:
# UKR 1936 AI File


ferocity = yes

&

Darkest Hour\db\events\AI\RussianCivilWar\UKR.txt
Code:
####################################
# RCW AI events UKR
####################################

################
# UKR init
#############################################
event = {
    id = 1936890
    random = no
    country = UKR
   
    trigger = {
        ai = yes
       
    }

    name = "AI_EVENT"
    style = 0  
   
    date = { day = 1 month = january year = 1933 }
    offset = 1
    deathdate = { day = 29 month = december year = 1963 }

    action_a = {
        command = { type = ai which = "mod/RCW/UKR_1936.ai" }
    }
}

The Event 1936890 triggers correctly on game start, but there is absolute no Change in the UKR AI. Why? something have to be wrong, but I don't see throu it.

Since the Event triggers how it should, the error have to be at the command line or the ai file itself. Nevertzhless, for me everything Looks allright, but the game doesn't load the UKR_1936.ai....


Edit: even if I change the ai-file dir to the Standard and use the Command "command = { type = ai which = "switch/UKR_1936.ai" }", it doesn't work :(
 
Last edited:
In misc.txt you can enable an AI logger (look for "switch" it's near the end of the file IIRC). With that enabled, all AI switches are logged so you can see if the file is correctly loaded (and if maybe there's another file loaded after that one).
 
Are you sure that the directories are correct (Darkest Hour/ai/mod/RCW/... has to be wrong or just bad structure)? Did you include this event in your scenario database load? How do you know that Ukraine wasn't switched to ferocity, did you check the .eug? Ferocity means no peace deals. This parameter should be within the countries base ai file which is loaded on initialization through it's .inc file through the scenario .eug file. Then it would be active on day 1. If left as an event than it should be preceeded by a 'switch = yes' and load on day 2 or later so that it isn't immediately overwritten or inadvertently overwritten next year.
 
Last edited:
In misc.txt you can enable an AI logger (look for "switch" it's near the end of the file IIRC). With that enabled, all AI switches are logged so you can see if the file is correctly loaded (and if maybe there's another file loaded after that one).

Thanks I will try this asap :)

Are you sure that the directories are correct (Darkest Hour/ai/mod/RCW/... has to be wrong or just bad structure)? Did you include this event in your scenario database load? How do you know that Ukraine wasn't switched to ferocity, did you check the .eug? Ferocity means no peace deals. This parameter should be within the countries base ai file which is loaded on initialization through it's .inc file through the scenario .eug file. Then it would be active on day 1. If left as an event than it should be preceeded by a 'switch = yes' and load on day 2 or later so that it isn't immediately overwritten or inadvertently overwritten next year.

hm, I'm pretty sureabout the path, yes. Neverthless I will check it twice. The Event fires on gamestart (which works), I've started a game, saved on january 2. In the savegame I chekced if the Event was in history (=true) and the ai Setup for UKR/ferocity (=false). This way I can tell that the Event has fired, but without any effect. I can try it with a "Switch", but I don't think this is the issue since lot of DH Full ai-files are loaded without the Switch line (and working).