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.
Moreover, there are modifiers related to the stockpile limit, which offers us new options for industry techs, ministers, events etc.

Speaking of moddability I found that not all ways to mod this are into the DD(we're busy these days ;)), so here they are directly from the change-log:

Code:
* Minister modifier on stockpiles:
	#	  stockpile - modifiers on stockpiles limit
	#			which = industry / supplies (used for oil too) / all (default)	
	#			when = war / peace / all (default)
	#			value = x.xxxx
* Policy modifier on stockpiles limit MODIFIER_STOCKPILES – set is policy_effects.csv
* Difficulty modifier on stockpiles limit STOCKPILES – set in difficulty.csv
* Event commands and country specific modifiers on max stockpiles:
	- command = { type = stockpile which = (industry / supplies (used for oil too) / all) when = ( war / peace / all ) value = XX }
* New commands to toggle auto-trade options.
	- command = { type = auto_trade which = (oil/energy/metal /rare_materials/supplies/money) when = (import/export/stockpile) value = 1/0 }
		Notes:
		a. Enabling Stockpile will disable Export and enable Import
		b. Enabling Export will disable Stockpile
		c. Disabling Import will disable Stockpile
	- command = { type = auto_trade_reset }	-  reset auto-trade options to defaults ( Stockpile disabled, Import and Export enabled for all resources)
* New trade system triggers:
	- stockpile = oil/energy/metal /rare_materials/supplies/money	- Returns true if Stockpile is set for the given resource.
	- import = oil/energy/metal /rare_materials/supplies/money	- Returns true if Import is enabled for the given resource.
	- export = oil/energy/metal /rare_materials/supplies/money	- Returns true if Export is enabled for the given resource.
	- resource_shortage = oil/energy/metal /rare_materials/supplies/money/all	- Returns true if there is resource shortage for that resource or for any resource when used with “all”. NOTE: This trigger is not very reliable because it is set correctly on the second game day on every game session.

EDIT:
I cannot remember if those are new or just extended commands, but are somehow related to the topic too, so here they are:
Code:
* type = embargo which = TAG where = TAG [value = -2/-1/0/1/2/3] # which – enforcer; where – subject; value: -2 – clear tech embargo; -1 – clear trade embargo; 0 or no value – clear all embargoes; 1 – enforce trade embargo; 2 – enforce tech embargo; 3 – enforce both trade and tech embargoes; If which = where then value =  0 (clear all embargoes the country has), -1 (clears all trade embargoes the country has), -2 (clears all tech embargoes the country has) 
* type =  trade which = TAG where = TAG  [energy = x]  [metal = x]  [rare_materials = x]  [oil = x]  [supplies = x]  [money = x] [when = Days duration / default is 100 years] [value = 1/0 – default, can be broken, 1 = not]
 
Last edited:
This is absolutely grand. The stockpile and trading systems alone will change a good chunk of pre-war gameplay and strategies used by the players. I think that not everyone realised the potential of those systems yet. Just looking at all those modifiers make me happy.

EDIT: Oh, and look! Embargoes! :D

I have some questions, BTW:

1. "Trade duration"? What does it mean?

2. "Days to deliver resources from single trades" - does that in any way imply that the resources sent by single trade offers can be intercepted by convoy raiders? :D

3. "* 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" - is it an option for MP games?

4. "Daily retired Manpower - percentage of the current MP pool0.0 #0.0" - is it a new restriction on MP growth? MP ageing?

5. How is a "major" country defined?

6. "* 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 " - does that mean that civilian oil consumption is in?

7. "Improved trade effectiveness recalculation for landlocked countries during war (trading through neutral countries or ports)" - do we need some sort of "trade rights" for this or is it automatic for countries like Switzerland etc.? Can the player put an embargo on a given country? If yes, then what are its diplomatic consequences?

8. "Modifier on convoy transports capacity - higher this modifier is, more resources could be transported. 1.0 #1.0" - is this changeable by e.g. tech? Could be used to represent increasing freight capacity.
 
Last edited:
Answering some of the questions (we should save something for other DDs or for surprise, shouldn't we? ;) )

1. "Trade duration"? What does it mean?

All trade deals have expiration date. This value defines after how many days this deal will last.

2. "Days to deliver resources from single trades" - does that in any way imply that the resources sent by single trade offers can be intercepted by convoy raiders? :D

Not directly, but reduced trade effectiveness in result of convoy raiding will affect the delivered resources.

3. "* 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" - is it an option for MP games?
It can be used in SP games too, but I added it mostly with MP games in mind.

4. "Daily retired Manpower - percentage of the current MP pool0.0 #0.0" - is it a new restriction on MP growth? MP ageing?
Yes, but we do not use it in Darkest Hour (we use other means to limit army sizes to more historical levels in long games - hopefully that will be covered in a DD before the release). This option is there in case any modder would like to use something like that in his mod.

5. How is a "major" country defined?
IIRC those are hard-coded country TAGs - USA, GER, SOV, JAP etc.

6. "* 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 " - does that mean that civilian oil consumption is in?
No/not yet. But we're considering this idea.

7. "Improved trade effectiveness recalculation for landlocked countries during war (trading through neutral countries or ports)" - do we need some sort of "trade rights" for this or is it automatic for countries like Switzerland etc.? Can the player put an embargo on a given country? If yes, then what are its diplomatic consequences?
All neutral countries that does not have trade embargoes set are "counted" as possible trade partners.

8. "Modifier on convoy transports capacity - higher this modifier is, more resources could be transported. 1.0 #1.0" - is this changeable by e.g. tech? Could be used to represent increasing freight capacity.
This is a global modifier set in misc.txt.

Hmm. I answered more or less all of the questions. Well, that's all from me for today! :p
 
- the AI can automatically share blueprints with Allies and puppets

This, i love
 
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.
Wouldnt it be better if based on TC? Edit: And maybe cost you TC points if the stockpile goes over the limit, no?

USA and UK did not have a large army before ww2 and yet I am sure they had huge stockpiles of ww1 equipment, ammo and of fuel dispersed in the territory/empire ready for use by ships and planes at anytime.
 
Last edited:
Wouldnt it be better if based on TC?

USA and UK did not have a large army before ww1 and yet I am sure they had huge stockpiles of ww1 equipment, ammo and of fuel dispersed in the territory/empire ready for use by ships and planes at anytime.

Exactly. In WWII as well especially USA had practically endless amounts of fuel and supplies.
 
yes i meant ww2, not ww1. How could a nation have ww1 equipement before ww1? :wacko:

Uh, I was simply adding to your statement.. :)

In WWII as well especially USA had practically endless amounts of fuel and supplies.
 
Code:
* Difficulty modifier on stockpiles limit STOCKPILES – set in difficulty.csv

So you have expanded the difficulty.csv? Any chance you could add a production_time and/or build_time modifiers to that file?
 
Wouldnt it be better if based on TC? Edit: And maybe cost you TC points if the stockpile goes over the limit, no?

I think the Devs said it was TC. MartinBG made a correction on the first page of the thread:

With small correction - oil/supply levels are based not on army size, but on all military unit's consumption.

EDIT: Arguments over implimentation aside, I really am looking forward to checking out the supply system and I love any improvements to the trade system!
 
Last edited:
With small correction - oil/supply levels are based not on army size, but on all military unit's consumption.

You just sold the game to me. This is the most brilliantly simple way to limit prewar buildups of oil stockpiles and yet still allow larger tank & navy militaries like Soviet & USA to build up a sizeable stockpile for rainy days. That assumes its based on maximum consumtion and not current (In which case larger navies and airforces contribute nothing in peacetime).

If you guys could combine your efforts with the AoD team and march side by side to Johan and ask nicelly for the HoI3 source code for your next project I would hail you as Messiah ^^ What both of your teams have accomplished sofar is really awesome and surpasses my wildest expectations when first hearing about the licencing of the EU2 engine.
 
With small correction - oil/supply levels are based not on army size, but on all military unit's consumption.
This means 1936 USA will have oil stockpile proportional to its navy size (nearly no army or air fleet), but they had much more reserves than just for its navy....
Again, this is why TC should be used!
 
This means 1936 USA will have oil stockpile proportional to its navy size (nearly no army or air fleet), but they had much more reserves than just for its navy....
Again, this is why TC should be used!
While using TC may be a good idea, it should be noted that the stockpile limit is not a hard cap, but a kind of attrition effect. Just look at the screenshot in this DD. The Soviet Union has ~4k oil above its "max stockpile" limit and by cancelling some trade agreements they could stockpile even more.
 
This means 1936 USA will have oil stockpile proportional to its navy size (nearly no army or air fleet), but they had much more reserves than just for its navy....
No... strategic reserves were and are not that large at all. Even todays massive strategic petroleum reserve in USA is actually tiny compared to their consumption. And it was much smaller back then.

Modern day USAs Strategic Petroleum Reserve when full still only holds enough for 32 days consumption (and only has capacity to withdraw oil at a maximum of 21% of that rate).

Compare this to what you can see in the screenshot where Soviet has a stockpile that will last them 2378 days at peacetime consumption. Even with an extreme wartime consumption of lets say 200 oil per day (assuming values are similar too HoI2) Soviet would last 297 days and be able to withdraw oil at as quick rate thats needed.

It's easy to see that Darkest Hour has very generous stockpile rules when compared to the harsh real world.
 
Modern day USAs Strategic Petroleum Reserve when full still only holds enough for 32 days consumption (and only has capacity to withdraw oil at a maximum of 21% of that rate).
As of August 31, 2009, the current inventory was 724 million barrels (115,100,000 m3). This equates to 34 days of oil at current daily US consumption levels of 21 million barrels a day
If completely filled, the US SPR could theoretically replace about 60 days of oil imports
Remember that during war civilian oil consumption would be significantly decreased. However, I think that we can safely say that the so-called "reserve" or "stockpile" is sth which can be used for months, not years.

I like the fact that stockpiling will no longer be so easy and cheap. I hope that we will have several options to increase our stockpiles ingame, though. Examples may include better technologies, slider positions (central planning should allow a greater stockpile than free market) and minister traits.
 
two big thumbs up!! I love and agree with this approach to trade that you as the leader "influence" it, not directly control, but can step in if wanted or needed. (this should be the system for all areas , like in HOI3 army's theatres, you tell them what you want not the how, but can tell the how if you want/need)

no new resources??, I was hoping you add fuel like in HOI3 (one of the good things in that game), plus i have been bagging PI to add a resource for agriculture products it was such a critical resource for it not to be in the game in some way or other.

other wise i have my money in my hand waiting to pay for this game when it comes out!!!!
 
No... strategic reserves were and are not that large at all. Even todays massive strategic petroleum reserve in USA is actually tiny compared to their consumption. And it was much smaller back then.

Modern day USAs Strategic Petroleum Reserve when full still only holds enough for 32 days consumption (and only has capacity to withdraw oil at a maximum of 21% of that rate).

Compare this to what you can see in the screenshot where Soviet has a stockpile that will last them 2378 days at peacetime consumption. Even with an extreme wartime consumption of lets say 200 oil per day (assuming values are similar too HoI2) Soviet would last 297 days and be able to withdraw oil at as quick rate thats needed.

It's easy to see that Darkest Hour has very generous stockpile rules when compared to the harsh real world.
Ok then, but i still want TC to be used instead of cunsumption for army stockpile calculations!
(As it would limit the army size to your current level of industrialization. eg kenya cant support the same amount of troops as usa)