• 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.

MartinBG

Darkest Hour Developer
2 Badges
Nov 16, 2007
5.634
257
  • Hearts of Iron II: Beta
  • Hearts of Iron IV Sign-up
In DH Full?! Are sure there was not a big enemy army concentration there?

Nuke AI has been revised in Darkest Hour and some of the old nuke AI parameters have new meaning.

NukeStrikeTolerance is used against target countries IC. If IC is less then this value, then the country is considered not worthy to be be nuked.
NukeStrikeDesirability is used as a modifier on the final "target province score". If it is set to 0 the country will never use nukes. If set too high the country will use nukes more often.
 
Last edited:

makif130289

Field Marshal
78 Badges
Feb 20, 2008
3.631
63
  • Arsenal of Democracy
  • Supreme Ruler: Cold War
  • Europa Universalis IV: Res Publica
  • Iron Cross
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Darkest Hour
  • Crusader Kings II: Conclave
  • Stellaris
  • Imperator: Rome - Magna Graecia
  • Stellaris Sign-up
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • Stellaris: Galaxy Edition
  • Stellaris: Lithoids
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: La Resistance
  • Europa Universalis IV: Dharma
  • Crusader Kings II
  • Stellaris: Nemesis
  • Prison Architect: Psych Ward
  • Stellaris: Ancient Relics
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Battle for Bosporus
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Stellaris: Distant Stars
  • Stellaris: Federations
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Victoria 2
  • Europa Universalis IV: Cradle of Civilization
  • Warlock 2: The Exiled
These are set in air_marshal section in AI files.
Luckily most AI files do not have that defined and (nearly) all countries use just 4 switchable AI files:
ai\air_ground.ai
ai\air_naval.ai
ai\air_strategic.ai
ai\air_supremecy.ai

I searched US_36 ai file of DH Full to find NukeStrikeTolerance and NukeStrikeDesirability modifiers but couldn't locate them. If there is any example, it would be great.
 

MartinBG

Darkest Hour Developer
2 Badges
Nov 16, 2007
5.634
257
  • Hearts of Iron II: Beta
  • Hearts of Iron IV Sign-up
Check the files I listed above.

Here is air_ground.ai
# 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.5 #0.2
icxdayscostfactor = 8.0 # How to value true industrial cost when calculating expect causalties
manpowercostfactor = 80.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
groundattackdesirability = 40.0
inderdictiondesirability = 40.0
logisticalstrikedesirability = 0.0
runwaycrateringdesirability = 0.0
strategicstrikedesirability = 0.0
installationstrikedesirability = 0.0
navalstrikedesirability = 15.0
portstrikedesirability = 1.0
convoyraiddesirability = 1.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.5
groundattacklosstolerance = 1.5
interdictionlosstolerance = 2.5
logisticalstrikelosstolerance = 0.1
runwaycrateringlosstolerance = 0.1
strategicstriketolerance = 0.5
installationstriketolerance = 0.5
navalstriketolerance = 1.5
portstriketolerance = 1.5
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.500 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.200 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.000 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 interdiction = yes ground_attack = 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.000 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 }

nukestriketolerance = -35.0000
nukestrikedesirability = 50.0000
}

EDIT:
Just re-checked my notes and the code. It seems there was yet another revision. Here is how it works currently:

- nukestriketolerance is used as starting value in Nuke evaluation - higher it is, more often the AI will use nukes. It is recommended to be set a bit under 0.0 to order AI to nuke bigger enemy core provinces. Good values: -50 to -20
- nukestrikedesirability is used as before (multiplier on the final value if it is > 0.0). Good value seems to be about 50.0. If set to 0.0 or less AI will not use nukes.
 
Last edited:

korodikrisz

Banned
57 Badges
Jul 19, 2011
751
13
  • Europa Universalis IV: Res Publica
  • Darkest Hour
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Cities: Skylines
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris Sign-up
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Mandate of Heaven
  • Steel Division: Normand 44 Sign-up
  • Stellaris: Distant Stars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Stellaris: Galaxy Edition
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Pillars of Eternity
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Common Sense
  • Stellaris
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
Actually, with the last patch of DH Full, USA still nukes some insane provinces. Especially when Germany receives supremacy in Europe and Africa - they bomb Indonesia, North Africa, Belgium, Denmark, Berlin at least 5 times. By 1952-55 nothing happens at any fronts, only USA keeps sending her nukes...
 

makif130289

Field Marshal
78 Badges
Feb 20, 2008
3.631
63
  • Arsenal of Democracy
  • Supreme Ruler: Cold War
  • Europa Universalis IV: Res Publica
  • Iron Cross
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Darkest Hour
  • Crusader Kings II: Conclave
  • Stellaris
  • Imperator: Rome - Magna Graecia
  • Stellaris Sign-up
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • Stellaris: Galaxy Edition
  • Stellaris: Lithoids
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: La Resistance
  • Europa Universalis IV: Dharma
  • Crusader Kings II
  • Stellaris: Nemesis
  • Prison Architect: Psych Ward
  • Stellaris: Ancient Relics
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Battle for Bosporus
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Stellaris: Distant Stars
  • Stellaris: Federations
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Victoria 2
  • Europa Universalis IV: Cradle of Civilization
  • Warlock 2: The Exiled
Check the files I listed above.

Here is air_ground.ai


EDIT:
Just re-checked my notes and the code. It seems there was yet another revision. Here is how it works currently:


Thanks Martin, there are very helpful. By the way, I realized that nuke damage is also repaired too. In HOI2, nukes leave residual damage, I think this is removed ?
 

makif130289

Field Marshal
78 Badges
Feb 20, 2008
3.631
63
  • Arsenal of Democracy
  • Supreme Ruler: Cold War
  • Europa Universalis IV: Res Publica
  • Iron Cross
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Darkest Hour
  • Crusader Kings II: Conclave
  • Stellaris
  • Imperator: Rome - Magna Graecia
  • Stellaris Sign-up
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • Stellaris: Galaxy Edition
  • Stellaris: Lithoids
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: La Resistance
  • Europa Universalis IV: Dharma
  • Crusader Kings II
  • Stellaris: Nemesis
  • Prison Architect: Psych Ward
  • Stellaris: Ancient Relics
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Battle for Bosporus
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Stellaris: Distant Stars
  • Stellaris: Federations
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Victoria 2
  • Europa Universalis IV: Cradle of Civilization
  • Warlock 2: The Exiled
No, it is not. All province structures, MP (and IIRC resources too) max levels can be reduced permanently on nuking. There is a random chance involved. Current levels for resources/buildings are usually set to 0.

I saw 3 consecutive nukes without any residual damage. In fact, infra levels of the provinces repaired very quickly. I want to make nukes more deadly. Is that random chance is moddable too ?. I would like to increase it.