• 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 - Custom Gameplay Rules

Hi everyone! Most of the team is now back after summer so it’s time to spin up the ‘ol diary machine again. Today we are going to be talking about something we have been thinking about adding for a really long time: Custom Gameplay Rules.

First off, let me explain why we are doing this - HOI4 is a game people play in a lot of different ways. Single player, multiplayer, achievement runs, casual relaxing and various other. There is also a big split between people who play “historically” vs people who don’t (it’s around 50/50). A lot of stuff that adds fun and a sense of power in singleplayer are not very balanced for organized competitive multiplayer so organizing these games can be challenging, often including long rulesets and policing by the server host. I personally think a big reason competitive multiplayer isn’t as common (about 6% of MP games are competitive) is because it’s so much harder to set them up when they require reading rulesets, which become fragile when the game itself isn’t enforcing them.
When it comes to single player, players often ask for ways to tailor how they play. For example; some will use console commands to switch nations to set them on certain paths to match their long term plans for the scenario they want to play out etc, but it’s not exactly beginner-friendly, and isn’t possible to do in multiplayer either. So looking at all of these things we decided that we needed to support different rulesets and let players affect how the ai did things in more detail.

So, enter Custom Game Rules. This is a new setting you can do before you start your game, and includes the old buff sliders for majors as well:
main.jpg


It’s possible to store and load presets if you have a couple of prefered profiles you run (say single player and multiplayer?). We have tried to make rules as moddable as possible although when they directly impact hard-coded gameplay mechanics we need to make sure we have worked them in first. We’ll go over the modding aspects towards the end!

So what kind of stuff can you do? We haven’t fully finalized it all, but let’s go through what we got. I am sure people will have tons of suggestions in the comments too ;)

All diplomatic actions have the possibility for rules. So we can restrict or ease up how things work. This is particularly good when you want to tie focus trees into it. The new British tree has a lot of interaction with releasable nations, so this also lets us manage that from scripts and avoid exploits and weird situations (such as the player going down the ‘empire’ path, and yet releasing every colony they own).

release.jpg


rule.jpg


Covert actions are also included here, so you can for example restrict coups and such only to AI nations (a common rule in our own MP sessions).
covert.jpg


There are also other bits and pieces like being able to limit fort levels constructable, limiting paratroopers and such we are playing around with. Other things rules we see people use a lot are for example limiting war declares before certain dates etc. I expect we will be presenting a full listing of options later when we stream stuff closer to release.

You can also affect how you want the AI to act. Mostly this means it will be preferring certain choices and switching to alternate plans. If you want to tailor-make your game experience this is a great way of ensuring certain (a)historical outcomes being attempted by the AI no matter your settings.
ai_ger.jpg


For most there are options for ideology while some like Manchukuo are more relevant to its situation:
man.jpg


Some settings, like this particular one, are dependent on DLC, so without Waking the Tiger (which comes with that focus tree) the option simply won't be there. Otherwise the whole custom rules system is part of the free update and is for sure something we will be building on in the future.

Rules will generally turn off achievements, but its possible to set it by rule so if we introduce something we feel is ok in both it will still work.

Modding
So, when we started with this we realized we couldn't support every tiny rule some MP groups were using and instead we’ve tried to make it as easy as possible to mod things in. It’s my hope that some cool ruleset mods will be developed specifically for competitive multiplayer and the like in the modding workshop. Very popular options may even see inclusion in the base game in the future, who knows :) I expect some of the big mods will want to include custom rules as well for their players.

Rule definitions look like this:
mod1.jpg


They can then be checked from triggers from say the tech tree, focus tree, events etc and in other places we have added support for triggers. Example:
mod2.jpg


Diplo actions are a little special. They each get two possible triggers. This way you can turn on or off the standard game checks (like checks against world tension from game code) with the _TRIGGER_OVERRIDES_GAME. For your own rule checks you use the _ENABLE_TRIGGER for the specific action and the scope will contain the target nation as well so you can do nation specific rules.
This is what the triggers for Guarantees look like:
Screenshot_1.jpg


That’s it! Tune in next week to find out more about what we are up to with Man the Guns and the 1.6 ‘Ironclad’ update.
 
Why Brazil? That country isn't a major, or even has a focus tree.

I think the reason being in multiplayer games, Brazil is a popular choice for a minor nation to play, after nations like China, Spain and Turkey. I suspect that Brazils abundant rubber can make the difference if they join a faction, similarly to turkey being strategic to the major factions, both in game and as it happened in history (from what I have read, the allies spend a lot of time keeping turkey friendly but out of the war, both to keep another nation out the axis and block a land route into the Middle East or the Caucasus, with Turkey joining the allies towards the end of the war).
 
oh btw this is unrelated suggestion but could you make it so puppets can't be majors? this would for example prevent the raj (or even slovakia) to be a major nation in ww2
 
As a player with over 1000 hours competitive mp I am very grateful for your effort to make games of our small community more enjoyable.

However the most glaring issues will not be addressed in the next patch to my knowledge, namely the air warfare and balance issues of units and doctrines. As an example it is not uncommon to have 50k+ planes in mp which leads to situations where both sides run out of air bases.

Will you introduce balance changes with the coming update?
Do you need any more help beta testing your new update?

@podcat
IMO even better than worrying about whether sides will run out of airbases is to use the bases as a limiting factor. One of the things that our mod does is to cut airfield capacity in half, i.e. 100 planes per level instead of 200. This has a large impact on conduct of the war, activity during prewar buildup and overall production priorities. It also gets strategic bombers back within reason instead of being too dangerous.
 
As far as I'm aware, there are no rules which say "DDs need to cover topics in a particular order". I suspect (but am, as ever, happy to be proved wrong :)) most fans are happy getting some news now, rather than being forced to wait until an arbitrary feature is ready before being told about anything. It's definitely my preference.
In fact, since there are obviously many changes being worked on in parallel, and the policy is generally to not talk about them until they are more or less ready, one could apply the logic that the things talked about early are either simpler to implement or didn't run into too many snags. It is that feature in the last DD before release that we may have to worry about. ;)
 
and guys, two more things:
1) do something for fix desyncs
2) if you are not able to do a matchmaking in multiplayer games, at least do something based on number of hours played
As far as I know, the biggest cause of desyncs is when a player had the game open in SP and did not restart the client before joining an MP game. I know it does not make sense for it to be this way, but it is.
 
Can we make sure 1.6 fixes troops going in crazy (and slower) paths when navally transporting or invading? Troops going from America to Europe love to travel up by Iceland on the way there. Yesterday I was invading from northern Spain to western Britain and my troops didn’t follow the arrow and instead wandered into the English Channel and I had to quickly move my fleet over there to save them from getting sunk. The naval invasion arrows follow sea provinces, have the invasion force follow those sea provinces as well.
Actually, if you watch the pathing arrows closely, there is only one port in Spain which does not knick the corner of the English Channel on its way to the Western Approaches, That is the port in the NW corner of Spain (Coruna IIRC). So the invasions are following the arrows, it is simply the logic of the arrow creation that must be improved. It seems reasonable to me to think we might get this in MtG.
 
Sounds good but the biggest challenge for creating a multiplayer game is still the desyncs. FIX DESYNCS!
As far as I know, the biggest cause of desyncs is when a player had the game open in SP and did not restart the client before joining an MP game. I know it does not make sense for it to be this way, but it is.
 
Sounds like a great addition for those of us that play ahistorically. If you could buff all nations and not just the Mayors (Kinda like in Road to '56) that would make it even better
 
I would really like to se sliders for equipment and manpower for each battalion. That way we can choose to play with less divisions in the game but with equal manpower and equipment. Also make the game more challenging in that way.
 
I don't usually play MP, but I like this.

It really allows the player to enforce common MP rules and prevent griefing. I also am very happy I can now finally see the Germans go Kaiser; I've seen every Japanese incarnation, even a couple of democratic runs... but never the Kaiser.
 
Sounds like a great addition for those of us that play ahistorically. If you could buff all nations and not just the Mayors (Kinda like in Road to '56) that would make it even better
Minors are already ahistorically strong in vanilla. Buffing them even more would be just grotesque.
 
hmmm ... so we guide the AI to the rails we want ? but wouldn be more beautiful to 'teach the AI' to react on its own according to players choices instead of pre set what will happen ? i dont even know if that possible in terms of coding ... nevertheless i can wait to test the new Rules ...
If a we can teach the AI stuff like that, I would be worried...
absolutely no expert on this matter but I am afraid this is not possible.

On topic,

I like the custom rules in SP. now I can finally do a run where Germany goes down the kaiser path. For some reason they never do that in my games...
 
You can also affect how you want the AI to act. Mostly this means it will be preferring certain choices and switching to alternate plans. If you want to tailor-make your game experience this is a great way of ensuring certain (a)historical outcomes being attempted by the AI no matter your settings.
View attachment 393776
OMG

YES YES YES!!!
 
This functions will probaly be paylocked... But still looking forward to it
If you look at the code posted in the DD, they are defined in script files. I don't see has_dlc entries which would suggest they are a part of the free patch. But it would be nice for a dev to confirm that. @Bratyn ?
 
If you look at the code posted in the DD, they are defined in script files. I don't see has_dlc entries which would suggest they are a part of the free patch. But it would be nice for a dev to confirm that. @Bratyn ?
This is UI stuff, so I imagine it will be free, but obviously you'll only be able to specify the AI to take focus tree branches that you already own.