Post feature RSS Darkest Hour - Dev Diary #20 - Production screen & AI

A dev diary about the production screen and the AI.

Posted by on

Darkest Hour - Dev Diary #20 - Production screen & AI

Follow us on:

It is time to talk about our enhacement to the Production screen and especially to the production AI!
Here's a screenshot that will help you understand the changes (the red numbers are not in the game, they're there to help us explain the changes):

Darkest Hour Screenshot

So, let's start with the enhanced sliders. The first checkbox (1) simply enables or disables the AI control over the production. You'll want this enabled 99% of the time.

The first set of checkboxes (2) are a further tuning to enable or disable IC allocation for the AI. So if it is disabled, the AI will never allocate IC on that slider.
The second set of checkboxes (3) are very important and allow prioritizing some sliders over others. In particular, the sliders are divided in two groups. It is possible to to prioritize Consumer Goods over Supply Production and viceversa (in the screenshot, CG are prioritized). The AI will then use this choice in combination with the stockpiles. For example, if the supplies are above the critical thresold and CG are prioritized then more IC will be allocated to on CG (to produce money) whereas Supply Production will get only the IC necessary to not lose supplies. On the other hand, if Supplies are below the critical threshold, they still get some IC in order to reach the critical threshold (as in the screenshot). Production, Reinforcements and Upgrades are considered another group: in the screenshot above, Production and Reinforcements are prioritized over Upgrade. Since Production is prioritized, it gets the necessary IC (if there is enough!). What's left is given to Reinforcements and, if there's still some IC left, it is given to Upgrades. This system is easy to master and will allow you to instruct the AI on how to allocate the IC, giving you enough control without turning it in micromanagement hell. If for example you want money or supplies because you want to enact a particular decision, you can prioritize CG or Supplies for a while until you've reached the wanted quantity and then change the priorities.

Let's take a look at the Production Queue now.
First of all, it is possible to extend or shorten the serial production of units and building (4): in the screenshot above, the Graf Spee would have been completed on January 7th 1936 but with a click I extended the serial production of another Deutschland class cruiser (which will take 3 more years). There are three shortcuts available, as you can see from the tooltip displayed above: Shift will extended the serial build by 5 units, Control by 10 and Shift + Control to the maximum allowed number of units (usually 99). Moreover the completion date of the current unit/building in the queue for serial queues is now displayed (see red line).
Next to + and - buttons to extend or shorten the serial production, there is a checkbox (5) which enables or disables the auto-upgrade of units. This means that if the checkbox is selected, then at the completion of the current unit the next one will be built as the latest possible model (at the expense of the gearing bonus). So for example, if the checkbox of the Graf Spee (Deutschland class cruiser, CA model 5) is selected, at its completion on January 7th a new unit would be built; however, it wouldn't be another Deutschland class cruiser, but the more advanced Admiral Hipper class (CA model 6). This choice however would reduce the gearing bonus so instead of October 1939 it would be completed on January 1940.
Lastly, since now the production queue is a bit more crowded, we don't want the players to cancel the production of units because they clicked on the wrong button. So pressing on the cancel button (6) a window will appear to confirm or cancel the deletion (as you can see in the bottom right of teh screenshot).

As usual, we've added new tooltips to make it easier for the player to find the information he needs. Here's an example:

Darkest Hour Screenshot

Moreover, a tooltip on the unit or on the brigade icon will let you know exactly which model you're producing. So for example you'll get information on the Deutschland class cruiser or on the Artilley model you'll build. And a tooltip on the value of a unit will let you know exactly which value it is.

Darkest Hour Screenshot

Now, let's talk a bit about the improvement in the Production AI. In fact, the real improvements here are in the engine: the way it handles priorities and most importantly the way AI works with sliders and utilizes its IC. It is greatly improved an enhanced, making the AI country stronger as they are now able to make a better use of their IC and thus posing a better challenge to the human player. Here are some examples:

  • now IC is used only by units in the queue that requires Manpower, so when there is no Manpower the AI will not allocated IC to units that require MP while keeping them in the queue; this alone is a great improvement for the AI;
  • now the AI will not insert countless divisions on top of the list filling up the queue way beyond its IC and never completing anything;
  • the AI that allocated IC to Supply production now take into account trades, extremely low supply stockpile and maximum consumption;
  • the supply production is halted if the Supply stockpile is over the desired supply threshold;
  • new land units for production are prioritize only when its completion time is less then the unit/building on top of the list;
  • new console command: “unitinfo TAG/world” that saves in savedebug.txt all units by type (deployed and in production) and also oil and supply estimated consumption (by own or allied troops) for a country (TAG) or for all existing countries (world);
  • fixed a bug on production cost calculation for units with 5 brigades (5th brigade was for free);
  • fixed a bug on production cost calculation – policy bonus was applied twice for brigades;
  • allowed up to 10 items to be viewable at once in the production queue (was 8);
  • fixed many AI bugs with production of provincial AA:
    • AA_batteries = atwar and not_atwar are correctly read from AI files now (only no/yes were read before);
    • AA_provs was not used at all. Fixed so AA will be built only on provinces in that list;
    • max_AA_level was not used at all. It is taken into account now;

The line upgrade/change option is fully moddable as it is usual for DH:

# Enable production line edit (auto-upgrade and serial builds lengths): 1 - Enabled, 0 - Disabled
  1 #0
# Gearing bonus loss per level of upgrade for unit. Values 0.0 (0% or no gearing bonus lost) to 1.0 (100% or all gearing will be lost)
  0.1 # -10% gearing bonus per level of upgrade
# Gearing bonus loss per level of brigade/attachment (added for every upgraded br./att.). Values 0.0 (0% or no gearing bonus lost) to 1.0 (100% or all gearing will be lost)
  0.05 # -5% gearing bonus per level of upgrade

Here is another production panel screen showing some tool-tips, CTRL/Shift shortcuts in use as well the correct unit stats (Org/Morale etc.) which use all current modifiers for the country so you would know exactly how good this unit will be even before ordering its training.

Darkest Hour Screenshot
Here's another screenshot of the production screen, this time from 1914! See you next week!

Darkest Hour Screenshot

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.