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
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
Hearts of Iron IV - BjornB


Hi everyone, this weeks diary is going to get really technical! We will be talking modding and improvements we have made for the modders in HOI4. This is also going to be a very long one :)

When starting out we decided we wanted to make HOI4 our most moddable game yet. That meant not hard coding things (HOI3 had a lot of hard coded logic and references to certain nations). In HOI4 all these things are in soft code, or part of scenario script setups making it a much better platform for cool mods. We have also decided to include the tool we use (more further down), and while it is provided as-is and not really polished compared to the real game its very useful. The game is also much better at letting you know when you have made mistakes and everything that can go wrong will usually let you know with logs etc.

Tools and Getting Started
Getting started with the creation of mods are now easier than ever before!
Using the launchers mod tool will allow you to create an empty mod for the game without any hassle and without even starting the game.


Then starting the game with the “--debug” flag will enable the “modder mode” that adds some extra sanity checks and enabling tools useful for modifying the game.
For example the in game Nudger tool that provides a simple interface to modify the properties of the map.


Here I created the awesome state of Östergötland by redistributing some provinces from Småland and tweaked the positions of the buildings.
The Nudger tool will then validate my changes and save them to the appropriate files for me and my mod, just in a few mouse clicks.

These files are of course human readable and can easily be edited with your favorite text editor for more advanced scripting or making smaller changes, most of the files (like state history setup) also have the option to be opened with a external program from the Nudger so you do not even need to find them in the filesystem.


Another nice tool is the instant feedback system aka “Error Dawg” appearing in the lower right corner that will give you instant feedback about scripting errors and oddities during gameplay. Clicking on it will of course open the error log for you, painfully reminding you about things you have forgotten or otherwise faulty scripted.


When satisfied with your mod and fixed all the errors you are just one click away from sharing it with the rest of the HoI4 community by uploading it to the steam workshop with the Mod tool.


Another thing we have put a lot of effort into is reloadability. You can reload interfaces (even automatically as the game will check if files are modified and you will see changes instantly ingame) as well as several game systems. For example focus trees will reload with your changes making it really quick and easy to work with making them and not forcing you to restart the game all the time.

Scripting & Language Improvements
One of the small help functions we’ve put in is the console command “trigger_docs”. This will print a list of all the triggers and effects we have in the game along with a small description of how they are used. We hope this can be a useful tool for new modders to find what they’re looking for and old modders to discover hidden possibilities. We of course still have the beloved debug dog to bark at you when something is wrong.

We’re continuously trying to improve the user-friendliness in our script language itself. Therefore we try to take the good practices that has been introduced in our other games and integrate them to all of our titles. One of the later additions that we’ve ported over is scripted effects and triggers which function is that you can basically macro that can be referenced in the various script files of the game that will execute a whole block of an effect or a trigger respectively.

An example of this could be that you might want to show one event option for Germany's neighbors that they are not in a faction with and a different event option for the rest of the world. This could be a common occurrence for all of your events and this would require all of those event options to have the following trigger:

any_neighbor_country = { tag = GER } NOT = { is_in_faction_with = GER }
This could instead be created as a scripted trigger which we would define in the scripted_triggers folder in the game files as the following:

is_neighbor_not_in_german_faction = { any_neighbor_country = { tag = GER } NOT = { is_in_faction_with = GER } }
Which could then be referenced in the different event option triggers as a one-line trigger (is_neighbor_not_in_german_faction = yes) in place of the multiple lines previously required.

As commonly used combinations of triggers and effects grow increasingly complex this script feature has two big functions. Firstly in that it decreases the amount of code duplication that would otherwise have been needed. And secondly it will also make the code easier to maintain since when you find yourself in the position that you have to change something in your common conditions for your events you could just add it inside the scripted trigger and just have to update one place instead of having to find all of the different places that would need to be updated.

Another great addition to the script language is the functionality of defining a particular scope as an event target inside an event or event chain, this feature has seen great usage in the script language of Crusader Kings II which always had an overload of scope changes.

The event targets makes it easier to reference different provinces and nations in the event text and execute effects on the correct targets without the need to have a huge amount of hidden bounce events to get the event scopes to evaluate correctly and keep track of different actors or locations. And if you want to get really creative you can try to combine these two script features and define event targets which you then use inside your scripted trigger or effect to have it act as a sort of sub-routine.

The AI
The AI in HOI3 was run though Lua scripts, but we decided to abandon these for several reasons in HOI4 (lack of lua knowledge at the company and low performance was the big ones). The AI is still however very moddable and has a lot of scripts to modify. I think its best to wait and talk about that in the dedicated dev diary on AI stuff I'll make SteelVolt write before release though :)

Next week we'll have Sideburnout talk about all things 2D art and interface for HOI4. See you then!

p.s whoever makes a Battletech mod first will forever live on in my heart.

Read original post with larger images

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


Hi everyone, this weeks diary is going to get really technical! We will be talking modding and improvements we have made for the modders in HOI4. This is also going to be a very long one :)

When starting out we decided we wanted to make HOI4 our most moddable game yet. That meant not hard coding things (HOI3 had a lot of hard coded logic and references to certain nations). In HOI4 all these things are in soft code, or part of scenario script setups making it a much better platform for cool mods. We have also decided to include the tool we use (more further down), and while it is provided as-is and not really polished compared to the real game its very useful. The game is also much better at letting you know when you have made mistakes and everything that can go wrong will usually let you know with logs etc.

Tools and Getting Started
Getting started with the creation of mods are now easier than ever before!
Using the launchers mod tool will allow you to create an empty mod for the game without any hassle and without even starting the game.


Then starting the game with the “--debug” flag will enable the “modder mode” that adds some extra sanity checks and enabling tools useful for modifying the game.
For example the in game Nudger tool that provides a simple interface to modify the properties of the map.


Here I created the awesome state of Östergötland by redistributing some provinces from Småland and tweaked the positions of the buildings.
The Nudger tool will then validate my changes and save them to the appropriate files for me and my mod, just in a few mouse clicks.

These files are of course human readable and can easily be edited with your favorite text editor for more advanced scripting or making smaller changes, most of the files (like state history setup) also have the option to be opened with a external program from the Nudger so you do not even need to find them in the filesystem.


Another nice tool is the instant feedback system aka “Error Dawg” appearing in the lower right corner that will give you instant feedback about scripting errors and oddities during gameplay. Clicking on it will of course open the error log for you, painfully reminding you about things you have forgotten or otherwise faulty scripted.


When satisfied with your mod and fixed all the errors you are just one click away from sharing it with the rest of the HoI4 community by uploading it to the steam workshop with the Mod tool.


Another thing we have put a lot of effort into is reloadability. You can reload interfaces (even automatically as the game will check if files are modified and you will see changes instantly ingame) as well as several game systems. For example focus trees will reload with your changes making it really quick and easy to work with making them and not forcing you to restart the game all the time.

Scripting & Language Improvements
One of the small help functions we’ve put in is the console command “trigger_docs”. This will print a list of all the triggers and effects we have in the game along with a small description of how they are used. We hope this can be a useful tool for new modders to find what they’re looking for and old modders to discover hidden possibilities. We of course still have the beloved debug dog to bark at you when something is wrong.

We’re continuously trying to improve the user-friendliness in our script language itself. Therefore we try to take the good practices that has been introduced in our other games and integrate them to all of our titles. One of the later additions that we’ve ported over is scripted effects and triggers which function is that you can basically macro that can be referenced in the various script files of the game that will execute a whole block of an effect or a trigger respectively.

An example of this could be that you might want to show one event option for Germany's neighbors that they are not in a faction with and a different event option for the rest of the world. This could be a common occurrence for all of your events and this would require all of those event options to have the following trigger:

any_neighbor_country = { tag = GER } NOT = { is_in_faction_with = GER }
This could instead be created as a scripted trigger which we would define in the scripted_triggers folder in the game files as the following:

is_neighbor_not_in_german_faction = { any_neighbor_country = { tag = GER } NOT = { is_in_faction_with = GER } }
Which could then be referenced in the different event option triggers as a one-line trigger (is_neighbor_not_in_german_faction = yes) in place of the multiple lines previously required.

As commonly used combinations of triggers and effects grow increasingly complex this script feature has two big functions. Firstly in that it decreases the amount of code duplication that would otherwise have been needed. And secondly it will also make the code easier to maintain since when you find yourself in the position that you have to change something in your common conditions for your events you could just add it inside the scripted trigger and just have to update one place instead of having to find all of the different places that would need to be updated.

Another great addition to the script language is the functionality of defining a particular scope as an event target inside an event or event chain, this feature has seen great usage in the script language of Crusader Kings II which always had an overload of scope changes.

The event targets makes it easier to reference different provinces and nations in the event text and execute effects on the correct targets without the need to have a huge amount of hidden bounce events to get the event scopes to evaluate correctly and keep track of different actors or locations. And if you want to get really creative you can try to combine these two script features and define event targets which you then use inside your scripted trigger or effect to have it act as a sort of sub-routine.

The AI
The AI in HOI3 was run though Lua scripts, but we decided to abandon these for several reasons in HOI4 (lack of lua knowledge at the company and low performance was the big ones). The AI is still however very moddable and has a lot of scripts to modify. I think its best to wait and talk about that in the dedicated dev diary on AI stuff I'll make SteelVolt write before release though :)

Next week we'll have Sideburnout talk about all things 2D art and interface for HOI4. See you then!

p.s whoever makes a Battletech mod first will forever live on in my heart.

Read original post with larger images

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