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

  • 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.

^_AC_^

Field Marshal
86 Badges
Feb 24, 2009
5.721
349
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Magicka
  • Leviathan: Warships
  • Knights of Pen and Paper +1 Edition
  • Victoria 2: Heart of Darkness
  • War of the Roses
  • Hearts of Iron IV Sign-up
  • Europa Universalis III Complete
  • The Showdown Effect
  • Warlock 2: The Exiled
  • Crusader Kings II: Conclave
  • 500k Club
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Imperator: Rome
  • Europa Universalis IV: Common Sense
  • Stellaris: Ancient Relics
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Hearts of Iron IV: Cadet
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Stellaris Sign-up
  • Stellaris: Megacorp
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Holy Fury




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

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:

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”;

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

 
Last edited by a moderator:
1) What defines the maximum stockpile level?

2) If supply and oil stockpiles are based on the size of your military, then does this mean that I can no longer for example as Germany import tons of oil pre-war, knowing my oil deals will be cut once war breaks out, because my military simply can't consume that much? If this is so, then I don't really see the logic behind it. Surely one could house oil, or other resources for that matter, in countless warehouses etc. if need be.

3) This may be nitpicking, but why are the levels calculated two days after the start instead of one? Traditionally in HoI2 trading is always best done on the second day of the scenario.

4) So there's absolutely no way to tell which nation gives you the best trade deals other than from your personal experience at trading with various AI countries? In AoD one could see in the trade tab how expensive it would be to trade with a certain country. This feature is realistic because obviously you can tell the willingness of others to trade with you IRL, but I am yet to see it in DH.
 
While I do agree that there should be a limit to the amount of stockpiles I think it´s strange to connect them to the size of your industrial capacity or even worse to the size of your army. Like Fulmen said it doesn´t make sense for countries like GER or JAP not to accumulate as many critical resources as possible before the outbreak of any hostilities that will reduce any trades to almost nothing.
 
Zomg, Automated giving techs to allies!!! Playing as the UK this is very annoying without that feature. You gotta feed USA, France, Australia, Canada techs all game
 
1) What defines the maximum stockpile level?

2) If supply and oil stockpiles are based on the size of your military, then does this mean that I can no longer for example as Germany import tons of oil pre-war, knowing my oil deals will be cut once war breaks out, because my military simply can't consume that much? If this is so, then I don't really see the logic behind it. Surely one could house oil, or other resources for that matter, in countless warehouses etc. if need be.

Hitler said:
You see, Mr. Bond. Before I launched my plan of world domination, I spent the last 4 years buying every drop of oil off the world market. Your patheric king and weak willed allies have no idea that my army can run by itself for the next 5 years! Ha Ha HA!

...No, seriously, I was pretty surprised myself. I thought professional military men and competent government officials would try to stop my plan to build secret oil reservoirs in every city. I asked. They said that they did have some important things to spend money on, like education, infrastructure, new tanks, new guns, supporting fascist movements abroad, police work etc. but they could put that on hold for the oil thing. It was actually pretty great, because we finally got to laugh at this great inside joke that we had been having. You know the one where I tell the army and the German people that the war is going to be quick and victorious? Well it turns out that these guys all knew that I was kidding! I know, right? They had actually been totally down for a 5+ year war all along. Of course, my face was a little red, but let me tell you... Good day or Greatest Day? You really should come to see the new Öl Sees in Straslund, the kids love them.

The nation states in WW2 were not Bond Villains. From the screenshot, the daily oil usage is 23.44 maybe 10 times that much with everyone moving so lets say -234 every day. The max stockpile still gives 238 days of operation with nothing coming in. Storing resources, building warehouses, and taking them out of the civilian economy costs money. At some point, people in Germany are going to want some of that oil to drive on the autobahns, some of that steel to build factories etc. Unlimited stockpiles also break the sub war against Britain as it will happily stockpile enough resources to run autonomously for years.

Churchill said:
"The U boat threat would have been graver, except in my foresight, His Majesty's government had endeavoured to build a mountain of cheese first in Wales and then across the British Isles. From the Cardiff Cheese mountain, I often gazed out over the Atlantic, wondering in my own fanciful way, if a German sub commander was staring back; shaking his fists below the murky depths at his inability to starve us."
 
Well aren't you the funny guy.

Why should the player do the same historical mistakes real life leaders like Hitler did? If there are to be limits against stockpiling they need to be rationally explained. And yes, a more complex money system like in AoD would be very much welcomed by me.
 
Well aren't you the funny guy.

Why should the player do the same historical mistakes real life leaders like Hitler did? If there are to be limits against stockpiling they need to be rationally explained. And yes, a more complex money system like in AoD would be very much welcomed by me.

Well maybe you could have a bigger stockpile level if your Belligerence (or something like that) Is higher....
 
1) What defines the maximum stockpile level?

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 level
With small correction - oil/supply levels are based not on army size, but on all military unit's consumption.

4) So there's absolutely no way to tell which nation gives you the best trade deals other than from your personal experience at trading with various AI countries? In AoD one could see in the trade tab how expensive it would be to trade with a certain country. This feature is realistic because obviously you can tell the willingness of others to trade with you IRL, but I am yet to see it in DH.

In Darkest Hour you do not need that information. Auto-trader is there to do the work for you. I've spend 6 months in development, testing and fine-tunning on this thing :rofl: and based on the feed-back of testers (50+ people, most of which very skeptical about auto-trader before trying it) manual trades are just waste of time and money now. ;)
 
With small correction - oil/supply levels are based not on army size, but on all military unit's consumption.

But I still can't stockpile "for the rainy days" because my military at the time isn't big enough to consume it all? You know why bears in the wild eat tons of food before going into hibernation? To survive the long winter with their supplies of fat. Now why can't I do the same with Germany and oil supplies (or any resource) if I'm facing a long war?

In Darkest Hour you do not need that information. Auto-trader is there to do the work for you. I've spend 6 months in development, testing and fine-tunning on this thing :rofl: and based on the feed-back of testers (50+ people, most of which very skeptical about auto-trader before trying it) manual trades are just waste of time and money now. ;)

If the screenshot shows everything there is to auto-trading then I strongly disagree. You'd be at a clear disadvantage compared to manual trading. Maybe all of your beta testers just hate microing.

For one I don't see an option that allows you to adjust the cost you're willing to pay, only what resources in general you're willing to pay and the percentage of accept chance you're willing to go for (if I understood this right). From what I can see this also only applies to accepting deals, not initiating them. You also apparently cannot tell the trade-AI you just want to trade for example rares from only the cheapest countries, or better yet, from only a select few of them. From Germany's point of view those would be countries such as Yugoslavia, Italy, Finland, etc. Not UK, Holland, France... And so on. Please correct me if I'm wrong though.
 
My intentions were not to create an argument, but to see if my observations are correct.

We'll see how this works then.. I still hope we'd get more info on which countries give us the best trades though, as well as more control over auto-trading.
 
While I do agree that there should be a limit to the amount of stockpiles I think it´s strange to connect them to the size of your industrial capacity or even worse to the size of your army. Like Fulmen said it doesn´t make sense for countries like GER or JAP not to accumulate as many critical resources as possible before the outbreak of any hostilities that will reduce any trades to almost nothing.

I think the idea is that nations had a limited storage capacity for resources allocated to military or strategic needs. As the demands for those resources increased, either through industrial expansion or military expansion, more facilities would be constructed or allocated for resource storage to meet the new requirements of the military.

Now as to the hindsight of stockpiling resources before the war, sure as a player you want to do this, and I see nothing presented here to stop you from doing so. You will suffer some loss now for being over the max limit but so what? It is not like you know you need X amount of a resource and would stop trading when you reached that number, so you keep running the trades until you start war. So long as you are bring in more resources then the decay is eliminating then you are still getting ahead. At some point you might hit a balance where incoming VS decay is balanced and you then have hit your true max stockpile.

I see this as yet another way the game will challenge me to figure out how to win. All looks good to me.

Now the big question is will the trade AI be smart enough to reduce trades when the stockpile has exceeded Max limit so that daily use and incoming trade balance so we maintain our stockpile at or just over Max limit? Then when your use increases does it go looking to get more to maintain the max balance?

I would not mind seeing a money charge as well for being over max stock and not at war and maybe a dissent penalty as well, as all those resources have to be put some where and I would not be happy if it was my backyard!
 
Yes the max stockpile limit system is terrible as a whole: the way the size is determined, the decay effects, the impact it will have on strategy are all obvious game design flaws.
 
Now the big question is will the trade AI be smart enough to reduce trades when the stockpile has exceeded Max limit so that daily use and incoming trade balance so we maintain our stockpile at or just over Max limit? Then when your use increases does it go looking to get more to maintain the max balance

Trade AI is rewritten nearly from the scratch too. It knows very well what is good for it and what is not and is fully aware what Critical, Desired and Max stockpiles are. It is close to impossible to exploit the AI via trades in Darkest Hour. Actually I believe there is no way to do so ;)
 
I think that stockpile limits should be based on:
-how many provinces a country owns
-TC (more accurate than IC i think)
-hawk/dove lobby slider
-techs
-events

The idea is good in general, but as Fulmen stated it may generate some serious limitations which are either ahistorical or simply unrealistic/gamebraking.
 
Perhaps make it (partially) influenced by the free market-centralization slider? As people have pointed out, if Stalin had decided that the USSR must have a large oil stockpile, it could be done (other factors notwithstanding, there is a limit eventually.) On the other hand, if FDR decided to significantly restrict the use of oil in order to build a large reserve, how long would it be before people would be screaming at the high prices of gasoline?
 
I can't believe this. We get a moddable system providing us sth which fixes age-old flaws of HOI games and so many whiners appear. I expected the system to be much worse. I thought that it would be a hard cap. We got a resource attrition effect instead - clearly a better and more realistic option. You can TRY to stockpile more goods, but you must face the consequences of "attrition". Moreover, there are modifiers related to the stockpile limit, which offers us new options for industry techs, ministers, events etc. Finally, hardships of storage are properly represented. At last the Battle of the Atlantic may be plausible and intense. Resources may become very important for the first time in the series. I'm filled with joy.

The reports of the beta testers are even more comforting. Considering the fact that it's practically a game made by fans for the fans, it's a good sign. The only thing that's missing is the option to prioritise certain countries in the auto-trader.

And just look at all those moddable modifiers! We can specify the stockpile limits of puppets. Some trade deals will be classified as "permanent" and therefore harder to break (Japanese-American Oil Trade!). Single trade will no longer be instant (and again - it's moddable)!

Thank you, DH team. You made my day :D

EDIT: And BTW, if you don't like the system:
Stockpile limit. -1 = Disable, else = stockpile for days.-1 # -1
MARVELLOUS!
 
I mostly like the system, however why not add the option to build storage facilities to raise your limit (decision or building)? After all if Germany wants to build massive oil storage facilities they should be allowed to do so, but it should cost them IC/time that could otherwise be invested into troops or more IC.
 
In Darkest Hour you do not need that information. Auto-trader is there to do the work for you. I've spend 6 months in development, testing and fine-tunning on this thing :rofl: and based on the feed-back of testers (50+ people, most of which very skeptical about auto-trader before trying it) manual trades are just waste of time and money now. ;)
I want to bow down and kiss your feet! That will make life so easy now.

I also like the AI have the ability to give blueprints. Makes playing UK much easier.