• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

HOI4 Dev Diary - Tech bugaloo II - Dragonslaying

Hi guys! Today's Diary is going to be a bit of a short one as I am away at a conference (it has free breakfast! Two most magic words!)

Last week we celebrated HOI4’s 3 year anniversary and released 1.7 ‘Hydra’ along with Radio Pack and Axis Armor. I hope you enjoyed them :)

After the weekend we looked at our telemetry data after 1.7 released and noticed that the amount of multiplayer out of syncs were more common than before. This indicates that we introduced a new OOS problem. While HOI4 has resync and hotjoin its still pretty annoying when you out of sync so we are currently investigating this for a small hotfix patch (1.7.1). Out of syncs can be really tricky to find and nail down so no definite ETA yet on when the patch is ready as we are still hunting. But we acquired a solid lead on the problem just yesterday, and we're currently working out a good solution.

Technical section (warning!): What is an Out of Sync?
For those interested what an out of sync is I figured I’d dig into it a bit. Feel free to skip this if you are a... normal human being, I guess ;D

An Out of Sync (OOS) happens when the host and clients in a multiplayer game start acting differently. This could for example be something like a battle ending in the favor of Germany on one of the computers and in the favor of Soviets on the other. Usually though its nothing that big as the state difference is usually spotted earlier at say one of those units having a 1% higher organization than the other or the like. Once it happens everyone’s experience will very quickly start diverging, so we stop and alert the players. At this point the host can click a ‘Resync’ button to bring the game back into sync. Resyncing will reset the state of the game, send the current host state over as a savegame and have everyone load that, and then things can resume.

So what can cause an OOS? This is where it gets tricky, and its pretty much always a new reason when a problem appears. Some good candidates are multiplayer between different platforms because underlying code libraries can behave differently in some cases. Other common reasons are multithreading. We thread a lot of our code, yet to stay in sync we must assure that events still happen in the same order on all machines in the end if they affect the world. There can also be issues like touching illegal memory or the like that can alter the game state in unplanned ways (or crash… but those are easy to spot and fix!).

Finding and fixing an OOS can be a long process simply because they are often quite rare occurances and it usually takes many steps and iteration to home in on exactly what it is. To find them we run multiplayer tests with QA with special settings that spit out giant log files (which makes everything horribly slow generally) and once and OOS happens we compare log files and savegames to see what differs. This will usually give us an area to start looking at. Lets say for example that you have a unit’s org being different. This could be due to many reasons - battle damage, weather, bad supply etc. So we add more logging to the relevant code areas and do another test. Hopefully this will tell us which of our guesses was right, and we repeat again with more logs and more details for this area. Of course the most fun-to-find OOS errors disappears when you add logging and framerate slows ;P

Some of this can be done automatically over night as well if the problem is unrelated to players, but this is often not the case.

Once found and fixed this is usually the stage we make an open beta patch to verify that it is indeed fixed, or if we deem it sure that we found the problem we will go straight to regular patch. Speaking of beta patches, thanks for the help testing 1.7! we got something like 30k game sessions of testing on the weekend before the final build which was a great help!

Hopefully this little look into some of the technicalities behind working on HOI4 was interesting. If you got questions feel free to ask away!

The part of the team that isn’t trying to solve this OOS has now moved fully on to 1.8 ‘Husky’ and next expansion work, but its early days and its going to be a while until we have things to show off. So this will be the last dev diary in a while as we go into radio silence (and soon glorious socialist swedish summer vacation!) until we have things that are ready to show off.

See you on the other side! And keep an eye on the forum for announcement about the 1.7.1 hotfix when that is ready.
 
Last edited:
please fix the major bugs of 1.7. there are plenty. i understand that paradox would like you to deliver a dlc before christmas, but some of the new bugs are quite significant and experience-ruining, ex my ww2 ships being ww1 ships with new paint jobs due to the engine bug
 
What devs really should do - focus their view on ONE game at time. Not hundress barrely worked games as it happens right now. Done with it ? Next one.
 
Frankly, I was hoping for more attention to fix bugs in 1.7. My hope was a smooth game in 1.7, but we have still Germany wins in France before Scandinavia and Denmark, Italy joins war in 39 and loses its army and fleet against French, Germany emigrates in Western Africa with whole army, no coordinated lend lease, allies that saturate my frontiline.

You're not longer indie and nice software house, Paradox. Take more cares about your game.
facts and Italy’s Ai is mentally challenged they continue attacking corsica and they get like 50x the casualties that i get
 
A bit late, but I have to say that I really like these technical details. I appreciate when DevDiaries are about tech stuff, bug hunting, underlying code.
The problem with the DDs, it’s always been this way....by the time they share things with us it’s baked in the cake. Now I understand that they don’t want to “show” it until it’s been polished, but that’s no excuse to not TELL us about it. I wish they would a) tell us what features they are working on b) describe it in text c) allow some feedback - all your in good advance to offer feedback the design, before release. D) gives more time to solicit mechanics that PDS has chosen not to do.

Today, DDs are given a few weeks up to release/beta, with the biggest/most difficult ones last. By the time we have feedback, they are already testing it and our suggestions go into the category of “maybe next time”. However, as they have themes to the expansions, it may be several releases before they get that part of the game again. I see no harm in letting us know what’s going on before it’s baked in the cake.
 
Last edited:
I honestly dont know why you even released this patch with how often it desyncs. 36-40 there is about 1-2/year, and after that it balloons to about 1 desync ever fkn 5 minutes... completely unplayable if you want to enjoy the game :mad:
 
Frankly, I was hoping for more attention to fix bugs in 1.7. My hope was a smooth game in 1.7, but we have still Germany wins in France before Scandinavia and Denmark, Italy joins war in 39 and loses its army and fleet against French, Germany emigrates in Western Africa with whole army, no coordinated lend lease, allies that saturate my frontiline.


Nazi Germany attacking France before Scandinavia has a very very very simple Solution. The german focus to get around Maginot simply misses 2 requirements with 1 has to be applicable: first that warshaw and dansk are not polish any more like Weserübung has or second Nazi Germany is not at war with poland.
Actually german Ai has only one choice. It has to take the wrong focus after doing dansk or war. It's so ridiculous easy to fix that. But hey you all read that on the first post, no more bug fixes for this decade...
 
Last edited:
Why shouldn't Germany be able to attack France before Scandinavia? IRL, the Germans were dependent on Swedish iron and shipped it mostly from Narvik (Norway) to Germany. They attacked Norway, when the British and French were preparing to take control of Northern Norway and Sweden. Who got Narvik, got control of the Swedish iron.

If the British and/or the French are not preparing an invasion on Norway, Germany has no historical reason for Weserübung, so it cannot be a reqirement for Around Maginot.
 
Nazi Germany attacking France before Scandinavia has a very very very simple Solution. The german focus to get around Maginot simply misses 2 requirements with 1 has to be applicable: first that warshaw and dansk are not polish any more like Weserübung has or second Nazi Germany is not at war with poland.
Actually german Ai has only one choice. It has to take the wrong focus after doing dansk or war. It's so ridiculous easy to fix that. But hey you all read that on the first post, no more bug fixes for this decade...
Completely ignores the historical circumstances of the invasion of Norway.
 
Completely ignores the historical circumstances of the invasion of Norway.

No the point is Germany can't do Weserübung focus unless they defeated poland, while ignoring Maginot can be done directly after Dansk focus with no precondition. So their is NO OTHER CHOICE possible for the AI. So stop that derailing.

Germany has no historical reason for Weserübung, so it cannot be a reqirement for Around Maginot.

Cmon i told you already in an other thread: Weserübung should not be a requirement for Maginot. Defeating poland (or preace) should be a requirement for Around Maginot. The AI must have a choice between two focusses or no choice. That isn't to hard to understand isn't it?
 
If the British and/or the French are not preparing an invasion on Norway, Germany has no historical reason for Weserübung, so it cannot be a reqirement for Around Maginot.

Norway for Germany wasn't just about the iron ore - there was also (prior to the Fall of France, which was a surprise for everyone) the use of Norway for u-boat bases (super woozy, so could be wrong, but iirc this was the main reason for the initial planning for Weserübung, rather than protecting the iron ore supply).
 
Norway for Germany wasn't just about the iron ore - there was also (prior to the Fall of France, which was a surprise for everyone) the use of Norway for u-boat bases (super woozy, so could be wrong, but iirc this was the main reason for the initial planning for Weserübung, rather than protecting the iron ore supply).

Yes, that was one of the argumets presented in favor of the Weserübung by the German Navy, but not the only reason. And the British and French were really preparing to go to Northern Sweden and possibly to Finland via Narvik; the Finnish government had already been told about that, so it is documented. The Royal Navy of course could have just reacted fast to German invasion, but there were also French ground troops who had been on transit from France long before the Germans attacked.
 
Cmon i told you already in an other thread: Weserübung should not be a requirement for Maginot. Defeating poland (or preace) should be a requirement for Around Maginot. The AI must have a choice between two focusses or no choice. That isn't to hard to understand isn't it?

Sorry, looks like I misunderstood.
 
Yes, that was one of the argumets presented in favor of the Weserübung by the German Navy, but not the only reason. And the British and French were really preparing to go to Northern Sweden and possibly to Finland via Narvik; the Finnish government had already been told about that, so it is documented. The Royal Navy of course could have just reacted fast to German invasion, but there were also French ground troops who had been on transit from France long before the Germans attacked.

I never said it was the only reason (indeed, I suggested iron ore was still a factor) :)

There's no question that the British and French were also planning to invade (and they initially were going to go earlier, but it was called off for some reason iirc) - but the Germans had taking Norway as part of their strategic plan, at a strategic level as far as I understand it, it wasn't a response to the Allied action (which is hardly surprising - getting all the ships, aircraft and ground troops prepped and in the right place for something like that isn't something that happens in a couple of days!) Memory's a bit hazy, though, so I could be jumbling things up.
 
Months after MtGs, and naval warfare in the Pacific is still awful, as it has been since release. I'm so bored of waiting for the naval game to work. For the love of god, fix what you have already sold us before adding any more.

Between MtG's letdown, and the shit show that has been Rome: Imperator, my love of Paradox has taken an absolute nosedive in the last six months.
 
If those disagreeing with the above post can explain to me how naval war in the Pacific is now functioning acceptably, I'd really appreciate it, because to me, sinking the US navy 3 destroyers at a time, without ever seeing a capital ship until the USS Wasp decided to sortie solo into my territory, is not what I signed on for.