• Register

By fans, for the fans, Developed by a team of experienced modders from the Paradox Interactive forums, Darkest Hour is a stand-alone Hearts of Iron game featuring a mixture of short and in-depth campaigns set across the darkest chapters of the 20th century, from the outbreak of the Great War up to the onset of the Cold War. Darkest Hour will introduce a new artificial intelligence that is now able to react to hundreds of different situations simultaneously, along with a dynamic diplomatic system that will allow the player to have a real impact on the course of history.

Post feature Report RSS Darkest Hour - Dev Diary #16 - Trade & Stockpile systems

This dev diary deals with the new trade and stockpile systems.

Posted by on


Darkest Hour - Dev Diary #16 - Trade & Stockpile systems

Follow us on:

Hello and Happy 2011 to everyone of you! 2011 will surely be a great year as it will see the release of Darkest Hour!

It is time to talk about our improved trade system. It can be surely described as easy to use and effective. Here's a screenshot:

Darkest Hour Screenshot

As you can see you can automate the following tasks:
- the AI can propose trades to other countries;
- the AI can accept trades propose by other countries;
- the AI can cancel existing trades;
- the AI can automatically help allies that are lacking certain resources by sending them for free;
- the AI can automatically share blueprints with Allies and puppets;
- the AI can automatically accept blueprints from other countries (single offers);
Moreover, there's a slider to regulate the AI that accepts deals with other countries so that you can choose to make it accept only the best deals or even deals that are not so convenient. Finally, with the Trade Policies section you can set the behavior of the AI regarding each resources. If a resource can be imported, the AI will try to obtain it, whereas is it can be exported the AI will be able to give it to other countries in exchange for other resources. A resource that we want to stockpile is a resource that the AI will not export and will do its best to acquire from the market.

This new trading system aims at putting players in the position of leaders during the darkest hours of the XXth century. You do not have to negotiate every single commercial deal. All you have to do is let your diplomats, advisors and trade specialists know exactly what kind of deals you believe your country has to reach for. However you can still get personally involved in these trades for you will eventually decide what kind of Head of State you wish to be!
Overall, this new system if very easy to configure and intuitive. Playing with the sliders and the trade policies will help to solve any problem or shortage concerning your resources stockpiles.

Speaking of which, let me know introduce you to one of the biggest innovation of Darkest Hour, its Stockpile system. Each resource (with the exception of money) cannot be stockpiled ad infinitum anymore. As you can see from the following screenshot, there are three different levels:
- if a resource is below the critical stockpile level, the trade AI will try to acquire this resource instead of giving it away;
- the AI will try to bring each resource above the desired stockpile level;
- if a resource is over the maximum stockpile level, the AI will not try to import that resource anymore and some of it will be lost because of the “over stockpile limit loss”;

Darkest Hour Screenshot

The “over stockpile limit loss” is proportional to the quantity of resource over the maximum stockpile level: if you're just above the threshold the loss will be minimal, but it will soon grow.
How are the stockpile level calculated? First of all, they are dynamic and are set by the engine two days after the start of each game. The levels for energy, metal and rare materials are based on the IC whereas the levels for supplies and oil are based on the size of your Army. This means that the stockpile levels grow with the growth of the Industrial Capacity and the size of the Army of your country.
But there are also over factors that can influence the stockpile levels, for example there are new modifiers for ministers and political sliders that influence the stockpile levels (as we've shown in Dev Diary 14),

Here are another screenshot and some of the code involved in the new trade and stockpile systems:

code:
Added optional stockpiles limit (can be set from misc.txt
(“economy” section)).
– New trade parameters in misc.txt (“trade” section):
* Days between trade offers to a country
* Delay in days on each game start/reload before allowing any new trades (AI, auto-trade and Diplomacy) 2 #0
* Desired stockpile threshold
* Critical stockpile threshold
* Desired supply stockpile (for X days)
* Desired oil stockpile (for X days)
* Days to deliver resources from single trades
* Percentage of max supplies that can be produced (using [total IC
- IC for CG] as a base) and traded away by auto-trade (0.20)
* Percentage of produced money that can be traded away by autotrade (0.20)
* Merge trade deals. 0 = do not merge, 1 = merge all active trade deals except those that cannot be canceled
* Manual trade deals (players only, Diplomacy). -1 = Disable manual trade deals, [0 to 100] = Offer value threshold - AI returns 0 accept chance if bellow this
* Percentage to over-import when below the desired threshold (0.20)
* Stockpile. Values: > 0.0 - extra import (Percentage) on top of what is needed when "Stockpile" option is enabled for that resource, else export all other exceeding resources in order to import more; -1 = export all exceeding resources; -2 = export all exceeding resources and supplies; -3 = export all exceeding resources and money; -4 = export all exceeding resources, supplies and money; 0.30 #0.0
* puppets send supplies and money to masters. 0 - disabled; 1 - send only supplies; > 1 -send supplies + money (when more then this value).
* Auto-merge trade deals (optional – misc.txt).
* Puppets max pool for oil, energy, metal and rare materials - give all above this value to the master. Use negative number to set max pool as percentage of the critical stockpile (for example -1.2 sets the max pool to 1.2 * critical stockpile). -1.2 #1000
* Multiplier on puppets critical supply stockpile - all supplies above THIS * puppet's critical supply stockpile can be sent to Master. Used when the previous setting is above 0.1.5 #1.5
– New modifiers in misc.txt (trade):
* Critical oil stockpile threshold (in days). 30 # 1 month
* Critical supplies stockpile threshold (in days). 15
* Should puppets send supplies and money to masters? 0 - disabled; 1 - send only supplies (NOTE – only for neighboring countries!) when above the desired stockpile; > 1 -send supplies + money (when more then this value).0 # 0.
* Puppets max pool for oil, energy, metal and rare materials - give all above this value to the master. 1000 # 1000

– New trade parameters in misc.txt (“diplomacy” section)
* Relationship hit for cancel of a trade deal. Not used for trades between allies, puppet<->master, inactive trades or trades with efficiency less then 45%.
* Relationship hit for cancel by players of trade deals that are set as permanent. Not used for trades between allies, puppet<->master, inactive trades or trades with efficiency less then 45%.
* Force puppets to join their master's alliance (creating a new alliance if Master is not already in one). Check alliances each day. 0 – No

– New modifiers in misc.txt (“economy” section):
* Peacetime Manpower Multiplier (multiplied on the other)1.0 #1.0
* Wartime Manpower Multiplier (multiplied on the other)1.0 #1.0
* Daily retired Manpower - percentage of the current MP pool0.0 #0.0
* Military Strength to Total IC ratio during Peacetime for AI countries (do not build new units if above this ratio). Use -1.0 to disable this.-1.0 #-1.0
* Military Strength to Total IC ratio during Wartime for AI countries (do not build new units if above this ratio). Use -1.0 to disable this.-1.0 #-1.0
* Military Strength to Total IC ratio for AI major countries (multiplied on the other).1.0 #1.0
* Stockpile limit. -1 = Disable, else = stockpile for days.-1 # -1
* Over stockpile limit daily loss (percentage of the exceeding resource). 1.0 = 100%.0.0 # 0.0

– New/changed modifiers in misc.txt:
* Wartime Desired Stockpile multiplier - multiplier on the Desired Stockpile for all resources and supplies when at war 1.0 # 1.0
* New trade deals min effectiveness threshold - do not make new trades if effectiveness is bellow this value (0..100). Used by auto-trade 45 #45
* Cancel trade deals if effectiveness is bellow this value (0..100). Used by auto-trade 33 #33
* Stockpile limit multiplier for industry resources (energy, metal, rare materials). -1 = Disable, else = Desired Stockpile * this -1 # -1
* Stockpile limits multiplier for supplies and oil. -1 = Disable, else = desired stockpile * this -1 # -1
* Extra import (Percentage) on top of what is needed when "Stockpile" is selected for that resource. This also increases the Desired Stockpile for that resource 0.30 #0.0
* Stockpile limit multiplier for industry resources (energy, metal, rare materials). -1 = Disable, else = Desired Stockpile (unmodified) * this -1 # -1
* Stockpile limits multiplier for supplies and oil. -1 = Disable, else = Desired Stockpile (unmodified) * this -1 # -1

– New modifiers in misc.txt (trade section)
* Peacetime modifier on desired oil import (it is a function of the max possible daily consumption which in peacetime is about 10 times more then actual consumption). 0.15 # 1.0
* Wartime modifier on desired oil import (it is a function of the max possible daily consumption which in wartime is about 20-50% more then actual consumption). 0.75 # 1.0
– Improved trade effectiveness recalculation for landlocked countries during war (trading through neutral countries or ports) and use closest ports between countries in the calculation. This model can be enabled from misc.txt (“mod” section).

– New modifiers in misc.txt (mod section):
* Trade Efficiency calculation system and re-calculation interval selection. Any negative integer is number of days between trade efficiency calculations using default Armageddon system (-3 = 3 days). Any positive integer is the number of days between trade efficiency calculations using the new more intelligent but CPU demanding system. 0 is default Armageddon system, set to 1 day. 5 #0
* Merge and relocate provincial depots to the best province in the area. This is new and more intelligent but CPU demanding system. 0 - Disabled (use the old system). Any positive integer is the number of days between areas analyzing using the new system. 7 #0

New modifiers in misc.txt (economy section):
* Max provincial energy/metal/rare materials depot size. 9999 #9999
* Max provincial oil/supplies depot size. 9999 #9999
* Max Manpower. 9999 #9999
* Desired provincial stockpiles for oil and supplies (needed to supply friendly units in that area for X days). Used by autoconvoying. 7 #7
* Modifier on convoy transports capacity - higher this modifier is, more resources could be transported. 1.0 #1.0

– New (modified) option in misc.txt (trade section) - Puppets max pool for oil, energy, metal and rare materials - give all above this value to the master. Use negative number to set max pool as percentage of the critical stockpile (for example -1.2 sets the max pool to 1.2 * critical stockpile). -1.2 #1000
– New modifier in misc.txt (trade section):
* Multiplier on puppets critical supply stockpile - all supplies above THIS * puppet's critical supply stockpile can be sent to Master. Used when the previous setting is above 0. 1.5 #1.5
* Auto-trade (and AI) single resource trade deals (only at war when an ally badly needs a resource/oil/supplies and trade effectiveness is high enough). 0 - Disabled, 1…100 – Trade deal effectiveness threshold. 0.75 #0

Darkest Hour Screenshot

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: