• 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:
In my games we had several games with Subs 3 allowed, with a UK and USA working together heavily to counter them. Even then it only kinda works. USA build up to 75 dockyards, just to produce enough destroyers. With DD3, modern Radar and Sonar it seems to work, we the Axis lost most of our Subs 3 in ~1941/1942. But we still sank hundreds and hundreds of convoys until then, without really loosing anything in return, since what else should our dockyards do?

The problem is, we didn't build any dockyards, just used captured stuff, build some Subs III we just manually researched in 1939 without a research bonus, put them somehwere and mostly forget about them. The Allies meanwhile have to go to great effort to stop them, and even then they are really effective in the start and completly wreck UK until USA joins and can help out. UK still has to plan ahead, either taking Azores from Portugal or Iceland from Iceland, build Radar and Airbase and quite a few Tacs.

With this they have problems holding France and Africa, and for example me as Italy, I can capture atleast Tunis/Algier+Gibraltar, and push to El-Alamein and stay there, but then go into the Atlantic and taking West-Coast Africa and maybe even South America to get the Aluminium there, so the Allies are even more fucked in this aspect.

All of this kinda screws the Allies, although Subs 3 in principle are conterable, just the effort difference is to small, because the Axis just have to do 1 research (Sub 3 Hull) and the Allies so much more (Naval Doctrine, Tacs, Radar, Sonar, DD Tech, build Dockyards, build Airbases, always look out for a new route which is raided, loosing rubber and/or fuel)
 
I mean kinda, but only because the Germans als heavily invested into Submarine technology. We don't research Wolfpack Naval Doctrine, don't research encryption to have our Subs hidden, we don't use snorkel (since the -10% visibilty change), no improved Torpedos or better Mines. So minimal effort on the Axis side in game, although historical there was more effort.
 
Last edited:
I've seen people post that advanced convoy escorts (EG: DD3) are not the way to go - that you're better off with hordes of DD1s with sonar, depth charges, and very little else for the convoy escort role.

There's definitely a massive "effort gap" in the Atlantic War - the research and player input required to have an effective submarine force is very small (research submarines, send to sea zone) while the research and player input required to counter it is pretty vast. (multiple types of ships, RADAR, air base construction, naval/tactical bomber deployments etc)
 
yeah having lots of DD1 is fine for the start, producing dozens of them to get your convoys trough without sinking really helps. But later on you should switch to DD3, atleast partly to also kill the Subs effectivly.
 
There's definitely a massive "effort gap" in the Atlantic War - the research and player input required to have an effective submarine force is very small (research submarines, send to sea zone) while the research and player input required to counter it is pretty vast. (multiple types of ships, RADAR, air base construction, naval/tactical bomber deployments etc)

This is 100% historical. The allies invested about 10 times as much resources replacing and protecting their convoys compared to the German investment into submarine raiding.


The problem with HoI4 is that the allies don't have their historical advantage in dockyard / MIC count or naval/air research well modeled.
 
yeah having lots of DD1 is fine for the start, producing dozens of them to get your convoys trough without sinking really helps. But later on you should switch to DD3, atleast partly to also kill the Subs effectivly.

What advantages do DD3 have over DD1 in the convoy escort role?
 
The convoy escort role only how ships enter combat. At 100% convoy escort, your ships enter the battle as soon as the subs attack, and with that screen your convoys from attacks. The battle afterwards just commences normally.

Now after Subs don't get detected after their first volley (4% vs 50% before) they stay in combat longer, and fire even when retreating. With this you don't only need screening so you convoys don't sink an depth charge level 1 so the DD kill the revealed submarines, but instead you need:

Speed on DD so they evade Torpedos fired on them, higher engine, higher DD tech
Sub Detection, so they detect unrevealed Subs while they are in battle, so modern Radar+Sonar

You still don't need much depth charges, one tech 2 module is probably fine to atleast safe some production cost.

But: I mainly play the Axis side, so not direct knowledge, but what the Allied players tell me afterwards.
 
You still don't need much depth charges, one tech 2 module is probably fine to atleast safe some production cost.

But: I mainly play the Axis side, so not direct knowledge, but what the Allied players tell me afterwards.

well, its a kind of odd historically accurate, yet odd balance atm. since more than anything, UK needs to focus on a load more civilian factories to get enough radars, air bases, and NAV2 alongside destroyer spam.

one way to help fight Sub3 is to have another allied player buy a whole bunch of resources and/or license products early on from UK, so the UK player can have better industrial base to begin an early buildup for few extra radars and dockyards from early on to start up with if the UK player is not a semi-pro in ASW.
 
I know...
I was critiquing the ambiguity of the given statement, hoping to get "we'll fix the essential stuff before that" or "yes, mid August". Even a simple "yes" or "no" would work.
It was ambiguous on purpose. They will resume after we all return from summer break. When podcat sets a date for the next dev diary, he will definitely let you know!
 
Will there be any updates to the Puppets system any time soon? I feel there should be a way to create puppets without giving them certain provinces/allowing the transfer of provinces to them. For example I may want to keep France annexed for factories until Barbarossa, but then create a puppet for more of their divisions for garrisons, but in doing so I am forced to give them Alsace Lorraine or Corsica which I was keeping for planes, ships, and bordergore reasons. It would also be handy if you could transfer provinces to a puppet after the fact, if for example I wanted to make a North African puppet to handle the ports and manpower of North Africa, I would either have to release several puppets or have already had puppets lined up before a peace deal. It's not a big thing, but something I feel could make the puppets more manageable and enticing to players able to split their lands that they conquer.