• 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 - Officer Corps Recap & AI Improvements

Hi all, and welcome back to today’s developer diary!

It can be very easy to get super-focused on details when looking at individual systems or parts of features - something we often tend to do when writing developer diaries. Each week, we’re going to give you an overview of a core system that we’ve so far introduced in parts, and will include all of the changes we’ve made to that system over the course of development, since we first looked at it.

In addition to this, we’ll also take a look at some changes coming to the AI in No Step Back, so if that’s more your jam, feel free to skip to the end ;D

We’ll begin with an overview of the Officer Corps:

0.png

This image represents a near-final take on what the office corps screen will look like.

As you can see, the branch chiefs, theorist, and military high command have found their way to the officer corps screen, though for ease of access you may still view and appoint them in the country overview screen like before. This kind of change is the sort of thing that comes up during playtesting - while it made sense to collect similar things together, there was no good reason to change the player’s flow expectations.

The manner in which you’ll appoint advisors has changed a bit. We decided during the officer corps development process, to make a bigger deal out of the advisor ‘level’ (specialist, expert, genius) that all non-theorist advisors possess. In addition to adding a flat command power allocation (reduction of max command power) which is reduced by high advisor ranks, political power costs are raised by having a higher rank advisor.

Branch advisors now grant daily experience gain, meaning stacking your command cadre well is vitally important to the pre-war development of your military. To add to the choices, doctrines now cost experience rather than being something you spend a research line on:

1.png


For owners of No Step Back, military branches also possess several specialization options in the form of Military Spirits, which are also unlocked with experience:

2.png


We found during development that less was more when it came to creating a tightly balanced set of choices, and we’ve limited the number of options in each category to around six, with each category being strongly themed around Academy, Military Service, and Command.

To add slightly more nuance to choices here, we ensured that several options in each category would be made available based on situational factors - ideology, doctrine branch, and in rare cases, country choice, can all make new choices available.

The most important part of cultivating a strong officer corps, is the ability to give your trusted commanders advisory roles. Commander traits earned in active combat can make your characters eligible for specific advisory roles:

3.png


Characters promoted to advisory duties this way will continue to advance their advisory rank as their commander level increases - a highly experienced field commander will grow from specialist to genius over the course of their career.

Lastly, we are introducing the preferred tactics weighting system. This allows you to set a national, field marshal, and commander-level preferred tactic, which will weight the chances of picking said tactic in a combat situation. While the national preferred tactic can be switched out for a cost, selecting a preferred tactic for your commanders and field marshals is something that remains a permanent choice, representing their adherence to a particular doctrinal theory.

Of course, a host of minor changes accompany the officer corps, including new alerts, better resource tooltips, and adding some of this information into intel ledgers for opponent countries.

The AI

And now, on to a topic that is sure not to evoke strong opinions from anybody here: the AI.

During the development of La Resistance, work was begun on adding additional tools through an imgui that allow modders and users to see various internal data. In NSB, a significant amount of time was spent adding to this tooling and providing support for future AI development, as well as laying the groundwork for easier iteration on AI behaviour and more.

4.png

One of our new in-game tools for assessing AI font priorities. These tools will be available for modders, who can continue to fine-tune AI for their own needs through the use of strategies and defines. Here, you can see that the AI has evaluated the topmost defense order as desiring a minimum of 7 divisions, an 'ideal' count of 8, and a maximum count of 50. Defense orders tend to fluctuate quite heavily in 'ideal' unit counts: they tend to be quite elastic to make up for units not needed elsewhere.

While much of the work done here was investment for the future, we’ve also made some pretty big changes to the way the AI evaluates where it commits its troops and more.

While it can be hard to indicate objective improvements in terms of AI, there are several key areas we aimed to improve for this release:

Use of specialized divisions - the AI for assigning armor and special forces to appropriate fronts has received some improvement. The practical upshot of this means you ought to see fewer armor divisions assigned to inappropriate orders (garrisons, pure defensive lines etc), and mountaineers used in frontlines that have the right terrain types.

5.png

Did I mention the AI likes tanks?

Unit weight distribution - combined with the new supply system, the AI evaluation of where to put units has been totally overhauled. In practical terms, this is likely to manifest as seeing the AI commit more troops to defend key areas (ports & coasts), care more about the active supply situation on frontlines, and provide something slightly resembling a defense in depth for their own core territory, even during active frontline pushes elsewhere.


6.png


You can see that the AI considers supply carefully when assessing front unit distribution. There are certain circumstances in which the logical supply capacity of a front can be exceeded by the AI - notably when a defensive frontline is facing a numerically superior foe, or when the AI determines that it needs to win a war fast.

7.png

Once Moscow has fallen, the supply situation can get pretty dire as you push east.

Naval Invasions - logic for AI naval invasions has seen significant improvement. You should be encountering larger, less frequent naval invasions overall. The Ai will try to take advantage of weak points in coastal defences, and generally be more keen to invade to support theaters. This got so scary we had to turn the new capabilities down several times (of course, these can be tuned back up).

Counters - while it can be difficult to determine a ‘right’ time to switch templates or create a specialized template, we’ve improved logic for majors utilizing specialized divisions such as Tank Destroyers in relevant circumstances. You should see the AI care a little more about what you throw at it.

Buffer Fronts - Several AI strategies now involve the use of buffer fronts. These are specially defined area defense orders which will request a proportion of national divisions to man them. Where these differ from regular garrison orders, is that these fronts will ‘loan’ their unit distribution counts to nearby fronts or invasion orders.

For example, the heatmap below show the distribution of US troops several months prior to Overlord. The troops stationed in Alexandria and the UK are using buffer fronts, which will supply frontlines in europe, in order to avoid having to relocate troops from much further away. Here you can see the (somewhat anachronistic) defense of Greek territory being supplied by the buffer front in Alexandria, which is in turn supplied with divisions from the US mainland (arriving through the Mediterranean).


8.png

The locations and weightings of these are instructional only.
 
  • 195Like
  • 77Love
  • 10
  • 8
  • 2
  • 1Haha
Reactions:
I'm a little curious how the Officer Corps system works for CHI. Are Von Falkenhausen and Stilwell advisors in this military command? Have you turned some of the Chinese national spirits debuffs that China starts with into military spirits? This would be important since now you would have to invest Army XP instead of Political Power to get rid of them, and farming Army XP is crucial for CHI in the 2nd Sino-Japanese War. It's a delicate balance is what I mean and I'm just wondering how much attention you've paid to that particular front even though it's not the focus of the expansion.
 
  • 10Like
  • 5
Reactions:
Will you change soviet infantry models so they will not run around in trenchcoats all year? Where are infamous uniforms in the colour of potatoes?
 
  • 10Like
Reactions:
View attachment 764782
Is that AI Bulgaria producing medium tank divisions?

If so thats great because I've only seen Germany and a few allied majors ever produce medium templates
Maybe the tank designer means the AI has an easier time building tanks that suit their economy?

Before NSB, the AI's choice was basically between "cheap and bad", "More expensive and pretty good", and "Hella expensive and very good"

With the tank designer at its disposal, I imagine the AI is making sure to design the best tank it deems to be cost-efficient for the size of the economy, which probably means we'll see more medium and even heavy tanks from the AI.
 
  • 3Like
  • 1Love
Reactions:
Will there be a way of asking the AI to support you in a front?
For example, as Mexico I almost capitulated the USA and just needed some German back up, but they never came, alongside with it, Japan always declines my requests to join their faction, though Mexico was a historical ally of Japan, and it's the backdoor to the USA, so it made no sence to why Japan considered allying with Mexico against their "plans"
 
Last edited:
  • 5Like
  • 1
Reactions:
Good to see more tanks. I hope, that also means, that UK finally start building them.
I am just hoping that the US and Soviet AIs make good tanks when I play as Germany and vice versa. There is nothing more disheartening than playing as the Soviets and finding out the German tanks can't make any type of breakthrough.
 
  • 5
  • 1Like
Reactions:
After losing one of my pet Guinea Pigs yesterday. This is something that has brought a smile to my face.
I am hoping we get a released date for October 31st as something fun to do for Haloween or we get it on the October Revolution since that'd fit so well.
 
  • 3Love
Reactions:
Shouldnt the ai determine that it needs to win every war as fast as possible?

Not really. Consider it like aggressiveness settings / the faster you push, the more careless or expensive orders might be.


Any changes to the yellow exclamation mark that causes front lines to freeze? many atime this has resulted in divisions not reacting or moving at all leading to easy encirclments and gaps in the front line

You can override this with order execution settings. 'Aggressive' will ignore supply status for movement, balanced will take some care, and careful will act as before.

My test for the AI is going to be if UK AI is finally gonna keep a garrison on their isles at all times instead of leaving it undefended or only a skeleton garrison which happens like 90% of the time.

This was a bug actually, which we have fixed.

I saw in the polish playthrough dev diary that :
1) AI wasn't actively prioritising railways defense (Caucasus screenshot, 7 divisions defending Rostov, 30 divisions fighting in Caucasus mountains)
2) AI wasn't evacuating by sea low supplied encircled coastal pockets

Questions after today :
3) Can we have more details on those defense orders?
4) Is there any change to tank usage other than front allocation priority?
5) How is the AI dealing with variable terrain combat width?

1. Unlikely to change, it is not trivial to work out when this is a good idea (computationally). In addition, logistics defense orders require an enormous number of divisions outside of specific situations.

2. No change here. You still need a port.

5. Not sure what you mean. There's always been rudimentary handling of frontage. The AI has updated templates to account for some terrain width changes.

I really hope buffer fronts means the end of empty Egypt and British Isles because the UK likes to ferry it's troops all over the world

Yep, that's the idea.

Love the new changes to the AI especially the increased weighting of AI defending ports and supply centers. Some questions considering this the AI DD,

In your guys and gals test runs with NSB, how has Russia been doing against the Axis? Is it starting to (on historical) consistently start to push the Axis harder?

Still undergoing work, but things are broadly looking good.

Has the Japanese AI been reworked to not, or limit, its invasions of India on historical. Especially considering that they'll often have a land route via Vietnam and Laos. (Naval invasions of Burma are fine and historical, its just annoying to see the India, Australia, and New Zealand all capitulate on historical).

I try and steer away from outright banning AI from doing certain things. If a player US decides not to invest in the pacific theater, for example, I would expect Japan to run wild there for longer. Where a player is involved, you can't expect things to turn out historically, and railroading them to do so just makes situations that deviate from what is expected, look even weirder.

How have the Allies been handling the supply changes, especially around D-day and other naval invasions. This tends to be their fatal weakness RN, so some comments on this would be helpful.

Currently they overstack frontlines a little, but no more than they can handle. Floating harbors help their initial invasions considerably. One important factor here is that we've tried to normalize being low on supply, a bit. Where previously low supply penalties were quite binary, there's a lot more scaling based on supply status now.

Has AI Spam been addressed at all with the current changes?

Define AI Spam?
 
  • 34
  • 28Like
  • 1Love
Reactions:
I really like that ai frontline behaviour becomes modable.
Now I hope that in this update or later with mods the ai will be able to concentrate its amored forces and attack strategic targets
 
  • 1Like
Reactions:
Safe-Keeper: I wonder if they will improve the AI.
Devs: so the new AI for NSB is so scary we're gonna have to nerf it a bit.
Safe-Keeper: sounds good.

btw, is "Coordination" a new stat?
 
  • 5Like
Reactions:
Is there any update on AI with respect to equipment production and the Tank Designer? Here are my specific questions.
1. How does the AI design its tanks when there is no special consideration that might bias the AI towards tank destroyers, etc, etc.

2. What determines the AI choices towards which tank modules? Are there default selections or weights for certain types of tank modules? Does this change over time in the war? For example, 1938 tanks are weighted with certain modules vs 1944 tanks, etc, etc.

3. How does the AI change its tank module selection or weights based on the nation it is playing as? Does Germany favor certain modules vs the Soviets vs the US?

4. Are these tank module AI weights moddable?

5. Does the AI take into account the resources available to it when using weights/selections for tank modules? For example, if Germany is IC-poor or is lacking tungsten/chromium, does the AI design and produce cheaper less resource-intensive tanks?
 
  • 2
  • 1Like
Reactions:
Hi all, and welcome back to today’s developer diary!

It can be very easy to get super-focused on details when looking at individual systems or parts of features - something we often tend to do when writing developer diaries. Each week, we’re going to give you an overview of a core system that we’ve so far introduced in parts, and will include all of the changes we’ve made to that system over the course of development, since we first looked at it.

In addition to this, we’ll also take a look at some changes coming to the AI in No Step Back, so if that’s more your jam, feel free to skip to the end ;D

We’ll begin with an overview of the Officer Corps:

View attachment 764652
This image represents a near-final take on what the office corps screen will look like.

As you can see, the branch chiefs, theorist, and military high command have found their way to the officer corps screen, though for ease of access you may still view and appoint them in the country overview screen like before. This kind of change is the sort of thing that comes up during playtesting - while it made sense to collect similar things together, there was no good reason to change the player’s flow expectations.

The manner in which you’ll appoint advisors has changed a bit. We decided during the officer corps development process, to make a bigger deal out of the advisor ‘level’ (specialist, expert, genius) that all non-theorist advisors possess. In addition to adding a flat command power allocation (reduction of max command power) which is reduced by high advisor ranks, political power costs are raised by having a higher rank advisor.

Branch advisors now grant daily experience gain, meaning stacking your command cadre well is vitally important to the pre-war development of your military. To add to the choices, doctrines now cost experience rather than being something you spend a research line on:

View attachment 764653

For owners of No Step Back, military branches also possess several specialization options in the form of Military Spirits, which are also unlocked with experience:

View attachment 764654

We found during development that less was more when it came to creating a tightly balanced set of choices, and we’ve limited the number of options in each category to around six, with each category being strongly themed around Academy, Military Service, and Command.

To add slightly more nuance to choices here, we ensured that several options in each category would be made available based on situational factors - ideology, doctrine branch, and in rare cases, country choice, can all make new choices available.

The most important part of cultivating a strong officer corps, is the ability to give your trusted commanders advisory roles. Commander traits earned in active combat can make your characters eligible for specific advisory roles:

View attachment 764655

Characters promoted to advisory duties this way will continue to advance their advisory rank as their commander level increases - a highly experienced field commander will grow from specialist to genius over the course of their career.

Lastly, we are introducing the preferred tactics weighting system. This allows you to set a national, field marshal, and commander-level preferred tactic, which will weight the chances of picking said tactic in a combat situation. While the national preferred tactic can be switched out for a cost, selecting a preferred tactic for your commanders and field marshals is something that remains a permanent choice, representing their adherence to a particular doctrinal theory.

Of course, a host of minor changes accompany the officer corps, including new alerts, better resource tooltips, and adding some of this information into intel ledgers for opponent countries.

The AI

And now, on to a topic that is sure not to evoke strong opinions from anybody here: the AI.

During the development of La Resistance, work was begun on adding additional tools through an imgui that allow modders and users to see various internal data. In NSB, a significant amount of time was spent adding to this tooling and providing support for future AI development, as well as laying the groundwork for easier iteration on AI behaviour and more.

View attachment 764656
One of our new in-game tools for assessing AI font priorities. These tools will be available for modders, who can continue to fine-tune AI for their own needs through the use of strategies and defines. Here, you can see that the AI has evaluated the topmost defense order as desiring a minimum of 7 divisions, an 'ideal' count of 8, and a maximum count of 50. Defense orders tend to fluctuate quite heavily in 'ideal' unit counts: they tend to be quite elastic to make up for units not needed elsewhere.

While much of the work done here was investment for the future, we’ve also made some pretty big changes to the way the AI evaluates where it commits its troops and more.

While it can be hard to indicate objective improvements in terms of AI, there are several key areas we aimed to improve for this release:

Use of specialized divisions - the AI for assigning armor and special forces to appropriate fronts has received some improvement. The practical upshot of this means you ought to see fewer armor divisions assigned to inappropriate orders (garrisons, pure defensive lines etc), and mountaineers used in frontlines that have the right terrain types.

View attachment 764657
Did I mention the AI likes tanks?

Unit weight distribution - combined with the new supply system, the AI evaluation of where to put units has been totally overhauled. In practical terms, this is likely to manifest as seeing the AI commit more troops to defend key areas (ports & coasts), care more about the active supply situation on frontlines, and provide something slightly resembling a defense in depth for their own core territory, even during active frontline pushes elsewhere.


View attachment 764658

You can see that the AI considers supply carefully when assessing front unit distribution. There are certain circumstances in which the logical supply capacity of a front can be exceeded by the AI - notably when a defensive frontline is facing a numerically superior foe, or when the AI determines that it needs to win a war fast.

View attachment 764659
Once Moscow has fallen, the supply situation can get pretty dire as you push east.

Naval Invasions - logic for AI naval invasions has seen significant improvement. You should be encountering larger, less frequent naval invasions overall. The Ai will try to take advantage of weak points in coastal defences, and generally be more keen to invade to support theaters. This got so scary we had to turn the new capabilities down several times (of course, these can be tuned back up).

Counters - while it can be difficult to determine a ‘right’ time to switch templates or create a specialized template, we’ve improved logic for majors utilizing specialized divisions such as Tank Destroyers in relevant circumstances. You should see the AI care a little more about what you throw at it.

Buffer Fronts - Several AI strategies now involve the use of buffer fronts. These are specially defined area defense orders which will request a proportion of national divisions to man them. Where these differ from regular garrison orders, is that these fronts will ‘loan’ their unit distribution counts to nearby fronts or invasion orders.

For example, the heatmap below show the distribution of US troops several months prior to Overlord. The troops stationed in Alexandria and the UK are using buffer fronts, which will supply frontlines in europe, in order to avoid having to relocate troops from much further away. Here you can see the (somewhat anachronistic) defense of Greek territory being supplied by the buffer front in Alexandria, which is in turn supplied with divisions from the US mainland (arriving through the Mediterranean).


View attachment 764660
The locations and weightings of these are instructional only.
good see all this now the IA no more idiot with supplies and use things rare ,your can removed ,IA received equipment when encircled or no have fabrics arms ,port
 
  • 1Haha
Reactions:
Define AI Spam?

In general, the AI producing an insanely high quantity of divisions. For examples, El Salvador will usally max out with 25 divisions normally (About 12 divisions per tile), with some majors producing upwards of 500+ divisions. Not only does it slow the game down, it can be off putting for new players to see that Germany has 465 divisions, while they've got 32.
If a player US decides not to invest in the pacific theater, for example, I would expect Japan to run wild there for longer. Where a player is involved, you can't expect things to turn out historically, and railroading them to do so just makes situations that deviate from what is expected, look even weirder.

This is if a player US decides to not invest in the Pacific, but historically the US sent the vast majority of its naval resources to the Pacific. RN the US AI is scripted to send all available resources to Europe, which seems odd because they usually start off 1V1 against Japan and tend to do quite well, but once they join the Allies they suddenly cease all activity in the Pacific. The solution would be to have the US send all available land and air resources to Europe, while its navy continues to hold the Pacific.
 
  • 5
  • 1Like
  • 1
  • 1
Reactions: