Hearts of Iron IV - Development Diary 54 - AI

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

SteelVolt

Technomancer
2 Badges
Aug 4, 2014
735
4.201
  • Paradox Order
  • Hearts of Iron IV Sign-up
First of all thank you for answering all of our questions. Its really appreciated.
You said there is no way Players can plan (AI) ally battle plans. Then, Is there a way to make AI prepare for war or coordinate with player or eachother?
How do we coordinate attacks with out fellow AI buddies ? Is this something you want to be focus on future or you think Ally AI's doesnt feel seperated with player? Otherwise how do we make D-day possible ?

Player and AI can see allied plans. The AI will generally wait tith executing plans into enemy territory if they share the front with a stronger ally (particularly if it is a player.)
Functionality beyond this are design questions rather than purely AI.
 
  • 5
Reactions:

SteelVolt

Technomancer
2 Badges
Aug 4, 2014
735
4.201
  • Paradox Order
  • Hearts of Iron IV Sign-up
Thanks everyone for a fine day! Great questions and reactions, and hope you all enjoy the game at release (if, of course, you chose to get it.)

The time at PDX is beer-o-clock now, so I am off for the weekend :)
 
  • 20
  • 4
Reactions:

blackninja9939

Experienced Programmer - Crusader Kings 3
Paradox Staff
78 Badges
Aug 28, 2013
2.401
7.847
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Nemesis
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Crusader Kings II: Conclave
  • Crusader Kings II: The Republic
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Stellaris
  • Mount & Blade: Warband
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Sunset Invasion
Quick question about the ai chance modifiers, are they calculated like in CK2 or like they are said to be done in Stellaris?
In CK2 all additions are done first then multiplications regardless of the order they are written, whereas in the Stellaris modding DD they said that in Stellaris they happen in the order they are written.
Which one does HoI4 follow?
 

JoyAndMisery

Generalfeldmarschall
64 Badges
Nov 2, 2011
198
186
  • Crusader Kings II
  • Sword of the Stars II
  • Semper Fi
  • Magicka
  • Heir to the Throne
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Colonel
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Cities: Skylines Industries
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: Cadet
  • Steel Division: Normandy 44
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Cities in Motion
  • War of the Roses
  • Dungeonland
  • Europa Universalis III: Chronicles
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Leviathan: Warships
  • Europa Universalis IV: Res Publica
  • Ship Simulator Extremes
  • The Showdown Effect
  • Warlock: Master of the Arcane
  • Hearts of Iron IV Sign-up
  • 500k Club
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: El Dorado
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum

Hi Volt,

nice DD. There is one question I do have.
Back in the DD52 I asked about modding in my own fuel (because I am seriously disappointed with thze current supply system)
Asfahr as modding goes we can add a new consumable to units, and add a material to be produced (See here for reference http://forum.paradoxplaza.com/forum...diary-52-modding.920875/page-14#post-21022137 ). The Q I do have now is: Will the understand to produce "fuel" or "medics" from the get go, will there be adjustments needed or is it impossible?

Best wishes and thanks.
 

davewolf

First Lieutenant
40 Badges
Jul 11, 2002
232
54
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cossacks
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Imperator: Rome - Magna Graecia
  • Hearts of Iron III Collection
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
Wanting to take out England before looking east I was covering guarding my coast in case the Allies got and D-Day ambitions, as well as making sure my border with Soviet was covered, while putting as much resources as I could towards building up my forces for a naval invasion of Britain. It was then that England and USA managed to overwhelm BOTH the Italian and Spanish coastal defenses and gain a solid foot hold. Sending troops to back my friends up, once they arrived both England and USA had landed A LOT more troops, overwhelming both the Italian/Spanish defenses as well as my reinforcements.
Isn't it nice when you don't have to cross the Channel to finish off an army (or 2)? ;)

Sounds like great work! :cool:
 

Invictus5966

Captain
73 Badges
Mar 6, 2015
439
371
  • Crusader Kings II: Reapers Due
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Conclave
  • Surviving Mars: First Colony Edition
  • Stellaris
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: No Step Back
  • Crusader Kings III
  • Surviving Mars: First Colony Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cossacks
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Steel Division: Normandy 44 -  Back to Hell
  • Steel Division: Normandy 44
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Federations
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Ancient Relics
  • Crusader Kings II: Holy Fury
  • Europa Universalis 4: Emperor
  • Europa Universalis IV
  • Stellaris: Distant Stars
  • Hearts of Iron IV: La Resistance
  • Imperator: Rome Sign Up
  • Europa Universalis IV: Golden Century
  • Battle for Bosporus
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III: Royal Edition
  • Cities: Skylines Industries
  • Cities: Skylines - Parklife
  • Cities: Skylines
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: El Dorado
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines Deluxe Edition
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
Player and AI can see allied plans. The AI will generally wait tith executing plans into enemy territory if they share the front with a stronger ally (particularly if it is a player.)
Functionality beyond this are design questions rather than purely AI.

Why (particularly if it is a player.)? Does the AI treat players and other AIs differently and if so how?
 

fabius

Field Marshal
65 Badges
Sep 22, 2004
3.222
2.478
  • Stellaris
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Pride of Nations
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Victoria 2: A House Divided
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • 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
  • Imperator: Rome - Magna Graecia
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • March of the Eagles
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Sword of the Stars II
  • Supreme Ruler: Cold War
Agreed with most many others: Great DD. Sounds like so many good things to look forward to from the AI.

Currently these traits are primarily for country leaders, but I hope to expand on it and it would be cool to do something like that.

AI Generals having nuanced behaviour from their traits would be awesome.
 

loup99

Godogost of Armorica
78 Badges
Jan 22, 2013
16.589
6.380
  • Crusader Kings III
  • Europa Universalis IV
  • Warlock 2: The Exiled
  • 500k Club
  • Pride of Nations
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings Complete
  • Imperator: Rome Deluxe Edition
  • Victoria 2
  • Arsenal of Democracy
  • Cities in Motion
  • Crusader Kings II
  • Darkest Hour
  • Europa Universalis III: Chronicles
  • For The Glory
  • Hearts of Iron III
  • March of the Eagles
  • Rome Gold
  • Sengoku
  • Victoria 2: A House Divided
  • Victoria: Revolutions
  • Cities: Skylines
  • Europa Universalis IV: Pre-order
Great development diary, good to see that the HoI4 AI is very dynamic!
 

Mannstien

General
33 Badges
Jan 4, 2013
1.934
1.273
  • Europa Universalis III
  • Hearts of Iron IV: Expansion Pass
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Ship Simulator Extremes
  • Semper Fi
  • Victoria: Revolutions
  • Heir to the Throne
  • Darkest Hour
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis IV: Res Publica
  • 500k Club
  • Pride of Nations
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Victoria 2
  • Hearts of Iron IV: Field Marshal
  • Steel Division: Normandy 44
  • Steel Division: Normandy 44 Deluxe Edition
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
Thanks everyone for a fine day! Great questions and reactions, and hope you all enjoy the game at release (if, of course, you chose to get it.)

The time at PDX is beer-o-clock now, so I am off for the weekend :)

Thanks SteelVolt for all of the answers and replies, sounds pretty awesome, can't wait to see it in action!!!! Have a great weekend :)
 
  • 1
Reactions:

Calders

Colonel
36 Badges
Jan 4, 2012
1.198
146
  • Crusader Kings II: Legacy of Rome
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Sengoku
  • Semper Fi
  • Victoria: Revolutions
  • March of the Eagles
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Old Gods
  • Hearts of Iron III Collection
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Campus
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
  • Hearts of Iron IV: Together for Victory
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Cities: Skylines
  • 500k Club
  • Victoria 2
The language is our internal scripting language. As was stated in the mod DD and one of my replies here, we are no longer using LUA for scripting.

Gutted... I knew they were taking the Lua code away but I thought they were going to replace it with something other than just the hideously inflexible scripting language (basically just the events language). The issue with this is that you are very limited in how you can format any calculations, in Lua you could basically do any maths you wanted you were only limited by what data you could pull out of HOI and what you could send back. I know paradox always struggled with the Lua code (I won't comment on why), but some mods did great things with it. To then describe this as the most modable game yet seems a bit ridiculous. Whilst in many ways this game looks better than HOI3 it also looks like it is in many ways worse, and that is disappointing.
 
  • 5
  • 1
Reactions:

blackninja9939

Experienced Programmer - Crusader Kings 3
Paradox Staff
78 Badges
Aug 28, 2013
2.401
7.847
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Nemesis
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Crusader Kings II: Conclave
  • Crusader Kings II: The Republic
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Stellaris
  • Mount & Blade: Warband
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Sunset Invasion
Gutted... I knew they were taking the Lua code away but I thought they were going to replace it with something other than just the hideously inflexible scripting language (basically just the events language). The issue with this is that you are very limited in how you can format any calculations, in Lua you could basically do any maths you wanted you were only limited by what data you could pull out of HOI and what you could send back. I know paradox always struggled with the Lua code (I won't comment on why), but some mods did great things with it. To then describe this as the most modable game yet seems a bit ridiculous. Whilst in many ways this game looks better than HOI3 it also looks like it is in many ways worse, and that is disappointing.
You can do a hell of a lot with the current systems, the event system is really quite flexible the only shortcoming imo being an inability to achieve certain effects without a convoluted method and most of the times that is just due to there not being a command to do so and that often gets resolved in a lot of cases if you put a suggestion for it to be added.
You can also probably do the basic calculations you will need in hoi4 as I imagine they will have kept the variable system from other games so you can set a country to have a variable to keep track of things or do whatever else you want.
 
  • 1
  • 1
Reactions:

princeseth

Colonel
106 Badges
Jan 28, 2011
830
86
In the last www Daniel conquered half of Europe with Hungary but the other countries especially Germany did nothing ... how is the AI reacts (or doesn't) to ahistorical situations like these ?
 

Calders

Colonel
36 Badges
Jan 4, 2012
1.198
146
  • Crusader Kings II: Legacy of Rome
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Sengoku
  • Semper Fi
  • Victoria: Revolutions
  • March of the Eagles
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Old Gods
  • Hearts of Iron III Collection
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Campus
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
  • Hearts of Iron IV: Together for Victory
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Cities: Skylines
  • 500k Club
  • Victoria 2
You can do a hell of a lot with the current systems, the event system is really quite flexible the only shortcoming imo being an inability to achieve certain effects without a convoluted method and most of the times that is just due to there not being a command to do so and that often gets resolved in a lot of cases if you put a suggestion for it to be added.
You can also probably do the basic calculations you will need in hoi4 as I imagine they will have kept the variable system from other games so you can set a country to have a variable to keep track of things or do whatever else you want.

So below is a small piece of code I wrote as part of my technology script, and this doesn't even get into iterating through containers holding variable data. We are not in the same ball park here...

if techWeightsArray[1] > 0 then
landBasedSlots = math.max( 1, math.floor(((ResearchSlotsAllowed * techWeightsArray[1]) - landBasedCount) + 0.5 ))
if landBasedSlots > LandLength then
landBasedSlots = LandLength
end
LandTech = ResearchTech(ministerTag, ai, LandTech, landBasedSlots)
ExtraSlots = ResearchSlotsNeeded - landBasedSlots
LandLength = LandLength - landBasedSlots
end
 
  • 1
Reactions: