Hearts of Iron IV - BjornB


Hi everyone! At this point we have covered almost all big features of Hearts of Iron IV, so today I thought I would highlight some of the smaller changes we have done and give a little update on where we are in the project. Right now our Release Candidate has been approved which means that no matter what we have something of good quality to release, and the release date 6th of June is safely locked in! At the moment we are working on further balancing and bug fixing for a release day patch.

Straits and Canals

The straits system in HOI4 is our most flexible and moddable yet. Each strait can have different rules to better match historical rules rather than trying to fit it all under a general blanket. Each strait has a list of provinces that needs to be controlled to decide the rules and they can have 4 states in relation to you:
Friendly - you and allies control all provinces.
Contested - Control of provinces is mixed between you and someone you are at war with generally blocking you both.
Enemy - Controlled by enemy, generally blocking you completely although some may let submarines through.
Neutral - You are neither friend or foe. Usually means you can go through unless it's something like the Panama Canal, or the Turkish Straits where only trade is allowed.
For each of these a strait can specify what happens with military transports, fleets, trade and submarines.


Manpower, Anti Air and Naval battles
To better be able to model historical use of manpower and for balance reasons Fleets and Air wings now require quite a bit of manpower tied up in shore/ground crews. This means we can get a much more interesting tradeoff for nations like USA and Britain. If you run out of manpower now you won't be able to form air wings or deploy ships.
We have also done changes to how static anti-air works. It now gives a clear damage reduction to bombing in its state and will also shoot down bombers so it's a much more worthwhile investment. In fact if you combine lots of anti air and the Dispersed Industry track in industry research you can remove the majority of bombing damage letting you fight outnumbered in the air easier.
Oh we also added extra details you can toggle on for naval battle reports if you want to dig into all the details of a combat, looks like this:


Graphics Settings
In an attempt to help out people with less endowed computers we have added a ton of settings to graphics where you can lower texture resolutions and turn off visual features. You can for example turn off all 3D models leaving you with just counters.


Airplanes and art
Japanese and US carrier planes now have awesome unique art where they differed from base model. We also fixed a few odd choices. For example the He 111 no longer has to fill the shoes of strategic bomber for Germany and gets moved to tactical instead. In its early game place we now instead have the Dornier Do 19.


We will now be entering the home stretch push for HOI4 before release, so expect more videos and streams in the coming weeks. In fact we have a special longer World War Wednesday Tuesday planned next week at 17:00 CEST. If you aren't completely busy purging evil xeno fungi across the galaxy in Stellaris you can help as well: Pull your friends away from whatever they are doing and tell them about WW2 and HOI4! At this point our aim is, to quote Churchill: Victory at all costs!

Read original post

Useful links
Official Website
Hearts of Iron IV Wiki
Development Diary Archives
World War Wednesday Stream archive
Hearts of Iron IV - BjornB


Hi everyone! At this point we have covered almost all big features of Hearts of Iron IV, so today I thought I would highlight some of the smaller changes we have done and give a little update on where we are in the project. Right now our Release Candidate has been approved which means that no matter what we have something of good quality to release, and the release date 6th of June is safely locked in! At the moment we are working on further balancing and bug fixing for a release day patch.

Straits and Canals

The straits system in HOI4 is our most flexible and moddable yet. Each strait can have different rules to better match historical rules rather than trying to fit it all under a general blanket. Each strait has a list of provinces that needs to be controlled to decide the rules and they can have 4 states in relation to you:
Friendly - you and allies control all provinces.
Contested - Control of provinces is mixed between you and someone you are at war with generally blocking you both.
Enemy - Controlled by enemy, generally blocking you completely although some may let submarines through.
Neutral - You are neither friend or foe. Usually means you can go through unless it's something like the Panama Canal, or the Turkish Straits where only trade is allowed.
For each of these a strait can specify what happens with military transports, fleets, trade and submarines.


Manpower, Anti Air and Naval battles
To better be able to model historical use of manpower and for balance reasons Fleets and Air wings now require quite a bit of manpower tied up in shore/ground crews. This means we can get a much more interesting tradeoff for nations like USA and Britain. If you run out of manpower now you won't be able to form air wings or deploy ships.
We have also done changes to how static anti-air works. It now gives a clear damage reduction to bombing in its state and will also shoot down bombers so it's a much more worthwhile investment. In fact if you combine lots of anti air and the Dispersed Industry track in industry research you can remove the majority of bombing damage letting you fight outnumbered in the air easier.
Oh we also added extra details you can toggle on for naval battle reports if you want to dig into all the details of a combat, looks like this:


Graphics Settings
In an attempt to help out people with less endowed computers we have added a ton of settings to graphics where you can lower texture resolutions and turn off visual features. You can for example turn off all 3D models leaving you with just counters.


Airplanes and art
Japanese and US carrier planes now have awesome unique art where they differed from base model. We also fixed a few odd choices. For example the He 111 no longer has to fill the shoes of strategic bomber for Germany and gets moved to tactical instead. In its early game place we now instead have the Dornier Do 19.


We will now be entering the home stretch push for HOI4 before release, so expect more videos and streams in the coming weeks. In fact we have a special longer World War Wednesday Tuesday planned next week at 17:00 CEST. If you aren't completely busy purging evil xeno fungi across the galaxy in Stellaris you can help as well: Pull your friends away from whatever they are doing and tell them about WW2 and HOI4! At this point our aim is, to quote Churchill: Victory at all costs!

Read original post

Useful links
Official Website
Hearts of Iron IV Wiki
Development Diary Archives
World War Wednesday Stream archive
Hearts of Iron IV - contact@rockpapershotgun.com (Alice O'Connor)

Don't tell him, Pike!

Adam has been jumping up and down and screaming about Paradox’s brand new strategy game Stellaris, but we’ve neglected to mention that the one of their classics has a new game right around the corner. Hearts of Iron IV [official site], the next in the World War II grand strategy series, will launch on June 6th. So now here’s a new video developer diary to explain a little about warring by land, sea, and air.

… [visit site to read more]

Hearts of Iron IV - BjornB


Good morning!

This weeks topic is brought to you by the embedded Quality Assurance on Hearts of Iron IV, and how we work. My name is Distantaziq and I'm one of the two embedded QA on HoI4. My partner is currently in flux, but at time of writing and until HoI4 is released it is Da9L who holds the position, or maybe you know him more prominently as the person who put the ”Y” in ”Yermany”.

Quality assuring a game is much like quality assuring any other piece of software, except in an arguably more creative setting. If you’re thinking of getting into the business “to get to play games the entire day” you’re more or less signing up for “a fun safari trip” while you’re really enlisting to the corps.

The Quality Assurance department in Paradox Development Studios is divided in two parts; Embedded Testers, that are a part of the project's development team, and Central QA that are more fluid as they jump between the titles.

Central QA are more generalists, and jack-of-all-trades. While the embedded testers are the first to test out all the new features, balance changes etc, the testers in the central group are able to support the embedded testers by providing with more long term gameplay testing, and a “fresh” perspective on things and catch anything that might have slipped through.

The Embedded QA are the true experts in their respective projects. As was mentioned above, we are the first ones to test out any new changes in the game, in order to see any possible problems with the changes, if they are entertaining or not, and provide this feedback to the projects producer/project lead.

We also have the opportunity to specialize in various areas. If we take Da9L as an example, he is the resident expert on AI, which means that a of the project leads can request him for a certain amount of time to have a sweep of the AI, or maybe see how the AI handles the new DLC features that was just implemented.

As two QA who are solely on HoI4 we are a part of the development team and our three main purposes are to assess the risks of the project, monitor the activity/numbers on our bug tracking service JIRA (and subsequently regress the issues) and give continuous feedback on the project, if something works better/worse and why/if it needs to be changed.

The risk assessment is where we analyze the project’s status that week, and pin down specific issues that we think (for instance) are destabilizing the build, or are crippling the AI/other essential features. We also take the time frame into aspect, if we have enough time to assure the quality of implemented changes before deadlines, and/or if a so-called “feature creep” is attempted.

If everything is working smoothly we don't really have anything to report that week, but there are usually crashes or other issues that are worth taking note of for the project leaders and managers.

Regression as such involves reading resolved JIRA issues and getting into the problem at hand and checking if the issue still exists in our latest version (which is why it’s so important when you report bugs to note what version you encountered the issue in). If the issue is fixed, we close the issue and help it pass on to the other side.

Every week we schedule multiplayer with the rest of the HoI4 team to make sure all multiplayer features are up to par (so far pretty good!), and in a perfect world we also get some scenario testing done, to uncover issues we might not have noticed otherwise. (Since one of the most dangerous things about being quality assurance is getting comfortable and losing your edge by following the same motions when you enter the game.)

As you can imagine, working on such a vast game as HoI4, our days are a blur of keeping track of bugs and trying to make sure none of the more severe bugs slip through the cracks.

Like that one time when Soviet had a coup trigger on them that turned into a civil war, and both sides ended up nuking each other to bits (needless to say, the AI received a lot of restrictions on their nuclear usage after that).

We’re therefore really grateful to the betas who provide observations and help testing the game to make sure it’s providing entertainment for as many players as possible. :)


Enclosing some tidbits of weird things that we've seen throughout the development process:


In for a wild ride...

Border updates took a break.

Who needs ships anyway!

Denied tech.

Sticky player map mode names. Myes.


(Pink IS programmer art.)


Until next time!

Read original post

Useful links
Official Website
Hearts of Iron IV Wiki
Development Diary Archives
World War Wednesday Stream archive
Hearts of Iron IV - BjornB


Good morning!

This weeks topic is brought to you by the embedded Quality Assurance on Hearts of Iron IV, and how we work. My name is Distantaziq and I'm one of the two embedded QA on HoI4. My partner is currently in flux, but at time of writing and until HoI4 is released it is Da9L who holds the position, or maybe you know him more prominently as the person who put the ”Y” in ”Yermany”.

Quality assuring a game is much like quality assuring any other piece of software, except in an arguably more creative setting. If you’re thinking of getting into the business “to get to play games the entire day” you’re more or less signing up for “a fun safari trip” while you’re really enlisting to the corps.

The Quality Assurance department in Paradox Development Studios is divided in two parts; Embedded Testers, that are a part of the project's development team, and Central QA that are more fluid as they jump between the titles.

Central QA are more generalists, and jack-of-all-trades. While the embedded testers are the first to test out all the new features, balance changes etc, the testers in the central group are able to support the embedded testers by providing with more long term gameplay testing, and a “fresh” perspective on things and catch anything that might have slipped through.

The Embedded QA are the true experts in their respective projects. As was mentioned above, we are the first ones to test out any new changes in the game, in order to see any possible problems with the changes, if they are entertaining or not, and provide this feedback to the projects producer/project lead.

We also have the opportunity to specialize in various areas. If we take Da9L as an example, he is the resident expert on AI, which means that a of the project leads can request him for a certain amount of time to have a sweep of the AI, or maybe see how the AI handles the new DLC features that was just implemented.

As two QA who are solely on HoI4 we are a part of the development team and our three main purposes are to assess the risks of the project, monitor the activity/numbers on our bug tracking service JIRA (and subsequently regress the issues) and give continuous feedback on the project, if something works better/worse and why/if it needs to be changed.

The risk assessment is where we analyze the project’s status that week, and pin down specific issues that we think (for instance) are destabilizing the build, or are crippling the AI/other essential features. We also take the time frame into aspect, if we have enough time to assure the quality of implemented changes before deadlines, and/or if a so-called “feature creep” is attempted.

If everything is working smoothly we don't really have anything to report that week, but there are usually crashes or other issues that are worth taking note of for the project leaders and managers.

Regression as such involves reading resolved JIRA issues and getting into the problem at hand and checking if the issue still exists in our latest version (which is why it’s so important when you report bugs to note what version you encountered the issue in). If the issue is fixed, we close the issue and help it pass on to the other side.

Every week we schedule multiplayer with the rest of the HoI4 team to make sure all multiplayer features are up to par (so far pretty good!), and in a perfect world we also get some scenario testing done, to uncover issues we might not have noticed otherwise. (Since one of the most dangerous things about being quality assurance is getting comfortable and losing your edge by following the same motions when you enter the game.)

As you can imagine, working on such a vast game as HoI4, our days are a blur of keeping track of bugs and trying to make sure none of the more severe bugs slip through the cracks.

Like that one time when Soviet had a coup trigger on them that turned into a civil war, and both sides ended up nuking each other to bits (needless to say, the AI received a lot of restrictions on their nuclear usage after that).

We’re therefore really grateful to the betas who provide observations and help testing the game to make sure it’s providing entertainment for as many players as possible. :)


Enclosing some tidbits of weird things that we've seen throughout the development process:


In for a wild ride...

Border updates took a break.

Who needs ships anyway!

Denied tech.

Sticky player map mode names. Myes.


(Pink IS programmer art.)


Until next time!

Read original post

Useful links
Official Website
Hearts of Iron IV Wiki
Development Diary Archives
World War Wednesday Stream archive
Hearts of Iron IV - BjornB


Hi guys!

You can now download the Clausewitz Maya Exporter, which will allow you to create your own 3D models to use in your mods for Hearts of Iron IV, Stellaris, Europa Universalis IV or Crusader Kings II (the two latter titles are not fully supported due to an older version of Clausewitz).

The Exporter is free for anyone with a Paradox Account.

We plan to release our .mesh formats to enable our community to make a similar exporter to use with other software like Blender as well.

We are really looking forwards to seeing what you, the community, can make with this tool.

Links
Download the Clausewitz Maya Exporter for free (requires a Paradox Account)
Guide on the Clausewitz Maya Exporer - this is Stellaris specific at the moment. But hopefully you can figure it out. We'll release Hearts of Iron IV instructions later.
The official Clausewitz Maya Exporter forum
Hearts of Iron IV - BjornB


Hi guys!

You can now download the Clausewitz Maya Exporter, which will allow you to create your own 3D models to use in your mods for Hearts of Iron IV, Stellaris, Europa Universalis IV or Crusader Kings II (the two latter titles are not fully supported due to an older version of Clausewitz).

The Exporter is free for anyone with a Paradox Account.

We plan to release our .mesh formats to enable our community to make a similar exporter to use with other software like Blender as well.

We are really looking forwards to seeing what you, the community, can make with this tool.

Links
Download the Clausewitz Maya Exporter for free (requires a Paradox Account)
Guide on the Clausewitz Maya Exporer - this is Stellaris specific at the moment. But hopefully you can figure it out. We'll release Hearts of Iron IV instructions later.
The official Clausewitz Maya Exporter forum
Hearts of Iron IV - BjornB


Greetings every one!

This weeks DD is about something I know many of you have been hoping and waiting for a long time; AI!

"The field of ridiculously high expectations and abysmally low standards." - Wiz

Being the only one crazy enough to want to take on the AI in HoI4 as Wiz went on to other projects, I was thrown in to it over a year ago now, and while it has been the hardest job I have ever had, it has also been the most fun and rewarding one.

So, lets jump in, shall we?

Right off the bat there were a couple of MASSIVE challenges in making the HoI4 AI;
1: Maintaining plausible historical behavior in a relatively dynamic and sandbox oriented game
2: Making the execution of player drawn battle plans solid enough that it would feel beneficial to use it.

Rest assured that significant amounts of sweat, blood and tears have been shed to tackle these issues.

For the first challenge, a couple of things sets the AI of Heart of Iron apart from the other PDS titles. First of all the chronologically compact and recent nature means people have different expectations on the HoI AI to act more or less according to history. While HoI4 is more of a sandbox experience than at the very least its latest predecessor, the set up is still historical and there were often reasons for countries to take certain actions at the times that they did. The challenge here was to have an AI capable of handling new situations dynamically in a way that makes at least some sense, regardless of if they are historical or not.

Our approach to this problem is a dynamic AI as a foundation, with game mechanics pushing countries in certain directions both for players and AI. The primary mechanic for this is, of course, the national foci, which have been covered in previous diaries. These direct the player and AI towards various goals both before and during the great war that eventually happens. But how does the AI pick focuses? This can either be strictly scripted on a per country basis and activated by playing the game in 'historical focus mode'. While it is fully moddable a historical setup for this is included. When that mode is NOT active, the AI picks foci using a combination of scripted weights and dynamic underlying systems that look at the situation of the country.

That dynamic system pushed by scripted weights is something that runs throughout all of the AI. Aside from well over 200 tweakable defines which tweak various aspects of the internal dynamic AI behavior, the weights can pretty much always be tweaked using the trigger system discussed in the modding DD. All in all there are practically no aspect of the AI which cannot be touched through defines, weight tweaks or both.

For example, the desire for Austria to accept the Anschluss event could look like this:
ai_chance = { base = 30 modifier = { add = -25 GER = { has_army_size = { size < 20 } } } modifier = { factor = 10 GER = { has_army_size = { size > 19 } } } }

And if they refuse, Germanys attitude towards them can be altered like this:
anschluss_rejected = { # Conditions enable = { tag = GER has_completed_focus = GER_anschluss country_exists = AUS } abort = { NOT = { country_exists = AUS } } # Modification if strategy is enabled ai_strategy = { type = antagonize id = "AUS" value = 300 } }

To give even more flavor to the behavior of countries, there are ways to modify things like the attitude towards other countries with...well, modifiers. These modifiers can be attached to to things like ministers, laws or even leader traits. This means that depending on who is in charge of a country, their interactions with other countries can vary, not just because of their ideology. This is something I want to look at expanding on even more in the future, but the modding possibilities are already notable.

Such a trait may look like this:
warrior_code = { random = no ai_call_ally_desire_factor = -40 }

Or this:
warmonger = { random = no ai_focus_aggressive_factor = 0.5 }

A couple of areas that gives the modder extra freedom is division template design, where you can tweak target templates, weight which stats the dynamic system should prioritize for specific division types, per country. The dynamic system will even pick up on if they have an unused equipment type and make a template design to accommodate it.
The other noteworthy system is how the AI scores its options in peace deals, which is fully scriptable, both per ideology as well as per country, if you so wish. Big thanks to Groogy for spending the time required on that!

The second big challenge; making the execution of player drawn battle plans good enough to feel useful. Whenever you give over control of a system to the computer, you expose all the weaknesses of the system for player scrutiny. An AI country that makes mistakes with its own troops can often get away with it, but messing up with the players units will lead to frustration.
The solution to this is mainly design; the system is not intended or built to be a magical "win war" button, but rather a tool to organize large numbers of units when every single detail is not critical. Both the AI and the player is expected to oversee critical operations, but they will not have to think about no-brainer situations, and is thus free to handle much much bigger armies and operations than if they had to micromanage them. This means that the internal workings of how the AI handles the units that are part of plans needs fewer bells and whistles, and by extension has fewer things that can go bonkers.
Even so, making it has been as hard as it has been rewarding.

So lets have a peek behind the curtains, into the mind of the AI.
In this situation, Germany has just gone to war against Poland. This tooltip tells us about the general, long term attitude of a country towards other countries. Germany, as we can see, is looking with unkind eyes towards its closest democracies while being supportive towards its fascist faction members.



Netherlands, meanwhile, is feeling the heat. Being threatened by Germany, they either want to see it weakened or to be their friend, but do not want to openly antagonize them at the clear risk of being crushed:



A more detailed look at Englands attitude towards Netherlands at this time shows us they want to protect the democratic minor of western Europe:



But as England has entered the war against Germany moments later, Netherlands is very reluctant to join the Allies, being at clear risk of ending up under the heel of Germany at this time:



And lastly, I want to give you a peek at how the AI determines troop levels for orders. Keep in mind that many groups need to share troops, and they may end up with less than they want or need if another group has a much higher priority:



Exactly which types of troops end up in which order is also done dynamically, but I have no cool tooltip screenshot of that.

I would say that the proudest moment for any AI developer is when their own creation defeats them in an unexpected manner. For me, such a moment came about two weeks ago when I was playing singleplayer as Germany. I had taken over western Europe easily enough through careful planning and superior weaponry. 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. I could probably have taken on one of them, but both together with such a solid hold in southern Europe was more than I could manage.
Save for that, my best days are when Da9l comes and tells me the AI kicked his ass in one way or another, or just forcing him to change his plans.

A few bullet points that should answer the most burning questions:
* There is no 'hard coding' outside of the scripts. No where in the code does it say "if country is X, then do Y" or similar.
* The dynamic AI systems does not cheat. They use the same information as is available to the player, including estimating enemy forces based on intel numbers.
* Save for boosting party popularity, there is no feature in the game that the AI is completely barred from using. It being intended more as a sandbox feature for players. We have also had to limit it a lot when it comes to staging coups.

Extra kudos goes out to Wiz as head AI honcho, who makes sure I don't fuck everything up, and Groogy, who has gotten to step in and help out when the work load has become too much for one person. I would also like to extend gratitude towards all the amazing beta testers, who have provided tons of valuable feedback and support!

As a closing comment I just want to say that, while no one can hope to meet everyones hopes and expectations of the 'best' possible AI for a game like this, we at Paradox fell it is shaping up really well, and I really hope you all will enjoy playing HoI4 as much, and even more, as I have had making and playing it.

Read original post

Useful links
Official Website
Hearts of Iron IV Wiki
Development Diary Archives
World War Wednesday Stream archive
Hearts of Iron IV - BjornB


Greetings every one!

This weeks DD is about something I know many of you have been hoping and waiting for a long time; AI!

"The field of ridiculously high expectations and abysmally low standards." - Wiz

Being the only one crazy enough to want to take on the AI in HoI4 as Wiz went on to other projects, I was thrown in to it over a year ago now, and while it has been the hardest job I have ever had, it has also been the most fun and rewarding one.

So, lets jump in, shall we?

Right off the bat there were a couple of MASSIVE challenges in making the HoI4 AI;
1: Maintaining plausible historical behavior in a relatively dynamic and sandbox oriented game
2: Making the execution of player drawn battle plans solid enough that it would feel beneficial to use it.

Rest assured that significant amounts of sweat, blood and tears have been shed to tackle these issues.

For the first challenge, a couple of things sets the AI of Heart of Iron apart from the other PDS titles. First of all the chronologically compact and recent nature means people have different expectations on the HoI AI to act more or less according to history. While HoI4 is more of a sandbox experience than at the very least its latest predecessor, the set up is still historical and there were often reasons for countries to take certain actions at the times that they did. The challenge here was to have an AI capable of handling new situations dynamically in a way that makes at least some sense, regardless of if they are historical or not.

Our approach to this problem is a dynamic AI as a foundation, with game mechanics pushing countries in certain directions both for players and AI. The primary mechanic for this is, of course, the national foci, which have been covered in previous diaries. These direct the player and AI towards various goals both before and during the great war that eventually happens. But how does the AI pick focuses? This can either be strictly scripted on a per country basis and activated by playing the game in 'historical focus mode'. While it is fully moddable a historical setup for this is included. When that mode is NOT active, the AI picks foci using a combination of scripted weights and dynamic underlying systems that look at the situation of the country.

That dynamic system pushed by scripted weights is something that runs throughout all of the AI. Aside from well over 200 tweakable defines which tweak various aspects of the internal dynamic AI behavior, the weights can pretty much always be tweaked using the trigger system discussed in the modding DD. All in all there are practically no aspect of the AI which cannot be touched through defines, weight tweaks or both.

For example, the desire for Austria to accept the Anschluss event could look like this:
ai_chance = { base = 30 modifier = { add = -25 GER = { has_army_size = { size < 20 } } } modifier = { factor = 10 GER = { has_army_size = { size > 19 } } } }

And if they refuse, Germanys attitude towards them can be altered like this:
anschluss_rejected = { # Conditions enable = { tag = GER has_completed_focus = GER_anschluss country_exists = AUS } abort = { NOT = { country_exists = AUS } } # Modification if strategy is enabled ai_strategy = { type = antagonize id = "AUS" value = 300 } }

To give even more flavor to the behavior of countries, there are ways to modify things like the attitude towards other countries with...well, modifiers. These modifiers can be attached to to things like ministers, laws or even leader traits. This means that depending on who is in charge of a country, their interactions with other countries can vary, not just because of their ideology. This is something I want to look at expanding on even more in the future, but the modding possibilities are already notable.

Such a trait may look like this:
warrior_code = { random = no ai_call_ally_desire_factor = -40 }

Or this:
warmonger = { random = no ai_focus_aggressive_factor = 0.5 }

A couple of areas that gives the modder extra freedom is division template design, where you can tweak target templates, weight which stats the dynamic system should prioritize for specific division types, per country. The dynamic system will even pick up on if they have an unused equipment type and make a template design to accommodate it.
The other noteworthy system is how the AI scores its options in peace deals, which is fully scriptable, both per ideology as well as per country, if you so wish. Big thanks to Groogy for spending the time required on that!

The second big challenge; making the execution of player drawn battle plans good enough to feel useful. Whenever you give over control of a system to the computer, you expose all the weaknesses of the system for player scrutiny. An AI country that makes mistakes with its own troops can often get away with it, but messing up with the players units will lead to frustration.
The solution to this is mainly design; the system is not intended or built to be a magical "win war" button, but rather a tool to organize large numbers of units when every single detail is not critical. Both the AI and the player is expected to oversee critical operations, but they will not have to think about no-brainer situations, and is thus free to handle much much bigger armies and operations than if they had to micromanage them. This means that the internal workings of how the AI handles the units that are part of plans needs fewer bells and whistles, and by extension has fewer things that can go bonkers.
Even so, making it has been as hard as it has been rewarding.

So lets have a peek behind the curtains, into the mind of the AI.
In this situation, Germany has just gone to war against Poland. This tooltip tells us about the general, long term attitude of a country towards other countries. Germany, as we can see, is looking with unkind eyes towards its closest democracies while being supportive towards its fascist faction members.



Netherlands, meanwhile, is feeling the heat. Being threatened by Germany, they either want to see it weakened or to be their friend, but do not want to openly antagonize them at the clear risk of being crushed:



A more detailed look at Englands attitude towards Netherlands at this time shows us they want to protect the democratic minor of western Europe:



But as England has entered the war against Germany moments later, Netherlands is very reluctant to join the Allies, being at clear risk of ending up under the heel of Germany at this time:



And lastly, I want to give you a peek at how the AI determines troop levels for orders. Keep in mind that many groups need to share troops, and they may end up with less than they want or need if another group has a much higher priority:



Exactly which types of troops end up in which order is also done dynamically, but I have no cool tooltip screenshot of that.

I would say that the proudest moment for any AI developer is when their own creation defeats them in an unexpected manner. For me, such a moment came about two weeks ago when I was playing singleplayer as Germany. I had taken over western Europe easily enough through careful planning and superior weaponry. 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. I could probably have taken on one of them, but both together with such a solid hold in southern Europe was more than I could manage.
Save for that, my best days are when Da9l comes and tells me the AI kicked his ass in one way or another, or just forcing him to change his plans.

A few bullet points that should answer the most burning questions:
* There is no 'hard coding' outside of the scripts. No where in the code does it say "if country is X, then do Y" or similar.
* The dynamic AI systems does not cheat. They use the same information as is available to the player, including estimating enemy forces based on intel numbers.
* Save for boosting party popularity, there is no feature in the game that the AI is completely barred from using. It being intended more as a sandbox feature for players. We have also had to limit it a lot when it comes to staging coups.

Extra kudos goes out to Wiz as head AI honcho, who makes sure I don't fuck everything up, and Groogy, who has gotten to step in and help out when the work load has become too much for one person. I would also like to extend gratitude towards all the amazing beta testers, who have provided tons of valuable feedback and support!

As a closing comment I just want to say that, while no one can hope to meet everyones hopes and expectations of the 'best' possible AI for a game like this, we at Paradox fell it is shaping up really well, and I really hope you all will enjoy playing HoI4 as much, and even more, as I have had making and playing it.

Read original post

Useful links
Official Website
Hearts of Iron IV Wiki
Development Diary Archives
World War Wednesday Stream archive
Hearts of Iron IV - BjornB


Hey people, this weeks topic is about the 2d art, everyone's favourite yay! Let me start by introducing myself, I'm Mats Virtanen, aka Sideburnout, I´ve done most of the 2d art in the game, from the cover, loading screens, interfaces, icons down to the smallest land battle modifier (only made a handful of the portraits though). I´m a classic forum lurker so I seldom post stuff, but rest assured i read as much as I can, the forum is always a good place to check out if I need references, a good laugh or just inspiration.

So, how do you go about to create the graphical profile of Hearts of Iron 4. First of, get in the mood. Glenn Miller is always a nice start ;) Since the beginning i´ve watched countless documentaries, war movies, series like band of brothers etc. Other ww2 games ofc and the team itself! I love the 30-40ies music and wartime posters so these were a natural inspiration too.

So, we knew that HoI3 was a bit... clunky when it came to accessibility and frankly a bit daunting for many because of that. Changing this was our first priority when we started out. With lots of good lessons learned from EU4 and with a UX designer aboard from the start for the first time, a lot has changed compared to HoI3. We skipped the fullscreens and went for smaller windows instead for example, this way you can still keep an eye on the map and it´s really needed in MP. As in EU4 we went for the icon+tooltip solution instead of excel-sheets filled with text. In general we have tried to streamline the interface, ranging from less clicks to reach important screens, trying to show more info from the map itself, using alerts etc, making it easier for the player to play the game and not fumbling around in the UI. One problem we had in EU4 was window sizes in higher resolutions, forcing us to painstakingly recreate bigger sizes of most of the main windows so players would benefit from higher res, ie showing longer lists etc. In HoI4 we solved this by creating all main windows with a tiling background as a basis.

Another change from hoi3 is a more detailed and decorated look and feel, the general windows have this gritty and dark look so the more saturated or detailed icons will pop out more! Speaking about icons, since we skipped the photos this time we knew there would be a lot of them but i was never prepared on the scale of it. The game kept growing and growing and HoI4 now has over 1200 tech, idea and focus icons combined. Over 420 leader portraits and over like 1600 or something different UI elements.




Here is some early concepts of the ui panels, at this stage we were only trying to catch a general feeling.


When it comes to making historically accurate tanks, equipment, leader portraits etc we use all kinds of references. Thankfully the second world war is thoroughly documented with blueprints of basically every kind of equipment used or not-used in the war and it can quite easily be found online. We however take it a bit longer and try to depict how tanks that never even reach the concept-stage would look, ie fantasy-tanks :D Here we tried to follow the look and feel of the tanks that were actually built, besides searching online for absurd ideas etc, we found some neat references i the forums as well.

We faced numerous problems here and there during the process of making the game obviously but the text would be lengthy if i got into the details, instead i´ll try to answer as many questions as i can in the thread, and maybe we can set up a separate thread with tips n tricks for 2d mods.

Anyway, here's some tanks!



[SIZE=5]2D Modding[/size]
Ok, time for some technical stuff. Another priority we've had since the beginning is to make the game more mod friendly than ever. For this we've created some tools and new tech which has been extremely helpful. For example we use a new gui-windowtype called "containerWindowType" which basically uses a tiling background (can use a fixed one aswell ofc) and is vastly superior to our older windowtypes. In this type of gui-element you can set the size in either pixels, or just let it fill a certain % amount of the screen. You can also use overlaying tiling backgrounds, add icons that are centered in a tiling window and so on, you can ofc create containerwindows inside other containerwindows. There is an assortment of tiling backgrounds and overlays ready for use in the game btw. Another new and very nifty thing we use is the gridbox, gone is the days with our old clunky listtypes. The gridbox is tied to a containertype window and works as a gridbox, you can set size in pixels or %amount of parent window, you can set max amount of entries to be shown vertically or horizontally. Ofc the containerwin uses automagic scrollbars, making life a bit simpler :)

All country specific equipment has a country tag so it's easy to add new equipment, for example "GFX_USA_tactical_bomber2_medium" = "GFX_countrytag_equipmentname_medium", just by adding the country tag before the equipment name the game will automagically place your pic in the relevant techtree and every other place the equipment icon is used. When it comes to leaders you'll just have to go into the script files and change the path to the asset said leader uses.

You can also add generic leaders to the list of portraits this country will use when generating new ones. The file is located in \common\portraits Also you will no longer have to search through the gui files for certain elements, we now shift+alt right click on a object and choose open in a small popup to get you directly to the line in the gui where the element is placed. Most changes you make in the gui will automatically reload the interface so no need to manually go in and reload like in our older games. I could go into detail with this for hours but i´ll cut it with this ugly pic instead.

Here´s a quick 3 min "mod" of the diplo win, im using our "guibounds" tool here that shows the size of the element i'm currently hovering over, also seen is the shift+alt right click popup that takes me directly to the right line in the correct gui-file. All i did was resized the windows, the decorative elements and entries are fixed sizes though so here it looks fuggly :), you need to make new art or photoshop the ingame assets (old school style) to make it good looking, but i think that there is a lot to choose from ingame if you want to fiddle with ui mods! This is just a super quick mini example of how the new windows works.




I'm really looking forward to see how you'll mod the game, would love to see some badass total conversions.

Anyways, since i didn't give you any new gameplay info in this DD i thought i´ll give you two huge wallpapers instead :p 'ere you go:




It's been a really fun yet sometimes bumpy road but we're nearing release now :D Can't wait for it! Keep the sand out of your weapons, keep those actions clear. I'll see you on the beach.

Original post with better images

Official Website
Hearts of Iron IV Wiki
Development Diary Archives
World War Wednesday Stream archive
...