Hi, how do you like Victoria 2? I have somewhere read that V2 has potential to be best paradox game. That's exactly my view.
Introduction
My biggest issue with v2 is its economical model. I'm a PhD student in Economics. I've analysed current model and its issue. Pops are not spending their money. Than comes lower demand than supply for every good. Than factory not selling and pops not making money. Pops needs compared to production is too small with high tech and vice versa with low tech. This ratio should be something like 1:1 regardless of tech or year. When you are high tech country, you have to much money, so have your pops and you can't sell your surplus production on the market. If you have low tech country you have no money so your pops. It is like one or zero not anything between.
Also I've Mgr (equivalent of MSc) in IT. I've some ideas how to fix it. I've tried to mod them into the game. Check pops cash_reserves and rise needs through poor_life_needs etc. But current modding tools are too weak for this. Also if these ideas make it into vanila, everyone can benefit. Here is my model and something like source code for it.
New model - Real economy
I could make better one, but this is enough for V2 needs. And it is huge improvement compared to current one.
Victoria benefits
+ simple model, configurable by parameters
+ working economy for small, big, low tech, high tech country, any year
+ fixes problems of current economical model
+ primary purpose of model is better gameplay
+ model's characteristics are close to real word
+ player doesn't have to be economics expert
+ no good characteristic of old model is lost
+ no impact on game speed
+ easy to implement (actually I've already did it for PI)
1. Making pops spend their money (modeling consumption function)
Pops' cash reserves shouldn't go to infinite (maybe it should, but by logarithmic function not arithmetic one). It should be: the bigger cash reserves the bigger spending. Some pops like farmers would keep smaller reserves other like capitalists bigger.
variables (skip it!):
function (skip it!):
example:
Pop has 100 money. cash = 100
They need 2 money every day for buy all goods. cash_daily_needs = 2
reserves_days = 200/2 = 50
They are farmers.
farmers.txt minimal_reserves_days = 10 surplus_reserves_days_impact = 0.002 # can be modded
goods_need_modifier = 1 + (50 - 10) *0.002 = 1.08
They would buy +8% goods
grain = 10 * 1.08 = 10.8
cattle = 5 * 1.08 = 5.4
They need 10 grain and 5 cattle but they will buy 10.8 grain and 5.4 cattle.
IMPLEMENTATION NOTE: State paid pop's cash reserves and their potential spending increases shouldn't influence state spending (loop danger - pops spend more -> higher maintenance -> bigger wages -> pops spend more).
2. Influencing pops demands by goods prices (modeling demand curve and marginal utility)
If some good is too expense its demand is dropping and vice versa. So pop is making 50 money and buy 10 grain for 2 each and 6 cattle for 5 each. If price of cattle rise to 10. Pop shouldn't buy 10g + 6c. In real world it would be something like 15g + 1c. But this would by harder to implement (not much, 10-30 code lines). Easy to implement would be to scale demand by price. So pop would buy 10 grain and something between 2 cattle (same spending - unitarily elastic) and 6 cattle (same count - perfectly inelastic).
variables (skip it!):
function (skip it!):
example:
Pop needs 5 steel.
Starting price of steel is 10. Pop would spend 50 to get needed steel (with price 10). But current price of steel on the global market is 20. Impact of price change is 0.5.
base_good_need = 5 / (1 + (20 - 10) / 10 * 0.5) = 5 / 1.5 = 3.33
Pop will need 3.33 of steel (instead of 5) and will spend 66 (it would be 100 for original 5 with price of 20).
3. Setting goods prices on global market by demand and supply (NEW)
I has been thinking that this is actually working in vanila. But marshman and shikaka opened my eyes.
If demand is bigger then supply, price should rise and vice versa.
My observing:
1.Demand in market is "virtual demand", what would pops buy if the have money. This is definitely wrong. I think it would be changed in some patch. Demand should be based only on pops which can afford good.
2.Price almost doesn't change (at last down). I think this is on purpose by PI. If they allow real price changes, their current economics system would crash in no time.
How to do it right:
We know supply. Here is no problem in vanila now. We just need to get real demand. When pops buy some goods, we add it demand. When pop wants to buy some good and that isn't on the market we add it to demand. We add states buying. We have real demand now. We can calculate price for next day.
price change function (skip it!):
price_change_speed - set speed of dropping and raising of price (between 0 - no changes and 1 - fast, I guess optimum would be something like 0.02)
example 1:
Good is steel. Its demand is 25000 and supply is 15000. Price is 5.
price_change_speed = 0.1 (0.1 - this would be fast)
price = 5 * (1 + 2 * 10000/40000 * 0.1) = 5 * 1.05 = 5.25
Price of steel for next day would be 5.25.
example 2:
Good is grain. Its demand is 15000 and supply is 25000. Price is 5.
price_change_speed = 0.01 (0.01 - this would be slow)
price = 5 * (1 + 2 * (-10000)/40000 * 0.01) = 5 * 0.995 = 4.975
Price of grain for next day would be 4.975.
Conclusion
It's complex and simple. I have speend too much time thinking about this. So I would be happy for any feedback from you.
Regards to Naselus, way2co0l, KonradRichtmark, Valentin the II and others from "Reworked POP needs to stimulate demand" team. Also Brownbeard, he is working on BROWNBEARDS pop overhaul. You are doing great job.
Have fun! D.
Introduction
My biggest issue with v2 is its economical model. I'm a PhD student in Economics. I've analysed current model and its issue. Pops are not spending their money. Than comes lower demand than supply for every good. Than factory not selling and pops not making money. Pops needs compared to production is too small with high tech and vice versa with low tech. This ratio should be something like 1:1 regardless of tech or year. When you are high tech country, you have to much money, so have your pops and you can't sell your surplus production on the market. If you have low tech country you have no money so your pops. It is like one or zero not anything between.
Also I've Mgr (equivalent of MSc) in IT. I've some ideas how to fix it. I've tried to mod them into the game. Check pops cash_reserves and rise needs through poor_life_needs etc. But current modding tools are too weak for this. Also if these ideas make it into vanila, everyone can benefit. Here is my model and something like source code for it.
New model - Real economy
I could make better one, but this is enough for V2 needs. And it is huge improvement compared to current one.
Victoria benefits
+ simple model, configurable by parameters
+ working economy for small, big, low tech, high tech country, any year
+ fixes problems of current economical model
+ primary purpose of model is better gameplay
+ model's characteristics are close to real word
+ player doesn't have to be economics expert
+ no good characteristic of old model is lost
+ no impact on game speed
+ easy to implement (actually I've already did it for PI)
1. Making pops spend their money (modeling consumption function)
Pops' cash reserves shouldn't go to infinite (maybe it should, but by logarithmic function not arithmetic one). It should be: the bigger cash reserves the bigger spending. Some pops like farmers would keep smaller reserves other like capitalists bigger.
variables (skip it!):
Code:
good_need # from popfiles modified by pop size, events etc. (current model buying)
cash # how much money they have
cash_daily_needs # how much money they need every day for buy all goods they need (it is already calculated)
reserves_days # how many days can pop be without income and buy all goods
minimal_reserves_days # when pop starts spending more money (different for all pop types, saved in popfiles)
surplus_reserves_days_impact # rate of spending increases (different for all pop types, saved in popfiles, could be also different for needs # everyday, life, luxury)
(something like [COLOR="Cyan"]marginal propensity to consume[/COLOR])
goods_need_modifier # modifier of original values
final_good_need # result of function
function (skip it!):
Code:
reserves_days = cash / cash_daily_needs
goods_need_modifier = 1
if (reserves_days > minimal_reserves_days) {
goods_need_modifier = 1 + (reserves_days - minimal_reserves_days) * surplus_reserves_days_impact
}
for (goods) {
final_good_need = goods_need_modifier * good_need
}
example:
Pop has 100 money. cash = 100
They need 2 money every day for buy all goods. cash_daily_needs = 2
reserves_days = 200/2 = 50
They are farmers.
farmers.txt minimal_reserves_days = 10 surplus_reserves_days_impact = 0.002 # can be modded
goods_need_modifier = 1 + (50 - 10) *0.002 = 1.08
They would buy +8% goods
grain = 10 * 1.08 = 10.8
cattle = 5 * 1.08 = 5.4
They need 10 grain and 5 cattle but they will buy 10.8 grain and 5.4 cattle.
IMPLEMENTATION NOTE: State paid pop's cash reserves and their potential spending increases shouldn't influence state spending (loop danger - pops spend more -> higher maintenance -> bigger wages -> pops spend more).
2. Influencing pops demands by goods prices (modeling demand curve and marginal utility)
If some good is too expense its demand is dropping and vice versa. So pop is making 50 money and buy 10 grain for 2 each and 6 cattle for 5 each. If price of cattle rise to 10. Pop shouldn't buy 10g + 6c. In real world it would be something like 15g + 1c. But this would by harder to implement (not much, 10-30 code lines). Easy to implement would be to scale demand by price. So pop would buy 10 grain and something between 2 cattle (same spending - unitarily elastic) and 6 cattle (same count - perfectly inelastic).
variables (skip it!):
Code:
original_good_need # from popfiles
good_price # base price of good - goods.txt (not price from yesterday)
market_good_price # current in game price on the global market
price_change_impact # impact of price changes, between 0 (same count - [COLOR="cyan"]perfectly inelastic[/COLOR]) and 1 (same spending - [COLOR="Cyan"]unitarily elastic[/COLOR]) (saved in defines.lua, could be also different for needs # everyday, life, luxury)
([COLOR="cyan"]price elasticity[/COLOR] with opposite sign)
base_good_need # modified popfiles value
function (skip it!):
Code:
for (pop_types) { # it is global for pop types, function is started only once a day
for (good_needed) {
base_good_need = original_good_need / (1 + (market_good_price - good_price) / good_price * price_change_impact)
}
}
example:
Pop needs 5 steel.
Starting price of steel is 10. Pop would spend 50 to get needed steel (with price 10). But current price of steel on the global market is 20. Impact of price change is 0.5.
base_good_need = 5 / (1 + (20 - 10) / 10 * 0.5) = 5 / 1.5 = 3.33
Pop will need 3.33 of steel (instead of 5) and will spend 66 (it would be 100 for original 5 with price of 20).
3. Setting goods prices on global market by demand and supply (NEW)
I has been thinking that this is actually working in vanila. But marshman and shikaka opened my eyes.
If demand is bigger then supply, price should rise and vice versa.
My observing:
1.Demand in market is "virtual demand", what would pops buy if the have money. This is definitely wrong. I think it would be changed in some patch. Demand should be based only on pops which can afford good.
2.Price almost doesn't change (at last down). I think this is on purpose by PI. If they allow real price changes, their current economics system would crash in no time.
How to do it right:
We know supply. Here is no problem in vanila now. We just need to get real demand. When pops buy some goods, we add it demand. When pop wants to buy some good and that isn't on the market we add it to demand. We add states buying. We have real demand now. We can calculate price for next day.
price change function (skip it!):
Code:
price = old_price * (1 + 2 * (demand - supply) / (demand + supply) * price_change_speed)
example 1:
Good is steel. Its demand is 25000 and supply is 15000. Price is 5.
price_change_speed = 0.1 (0.1 - this would be fast)
price = 5 * (1 + 2 * 10000/40000 * 0.1) = 5 * 1.05 = 5.25
Price of steel for next day would be 5.25.
example 2:
Good is grain. Its demand is 15000 and supply is 25000. Price is 5.
price_change_speed = 0.01 (0.01 - this would be slow)
price = 5 * (1 + 2 * (-10000)/40000 * 0.01) = 5 * 0.995 = 4.975
Price of grain for next day would be 4.975.
Conclusion
It's complex and simple. I have speend too much time thinking about this. So I would be happy for any feedback from you.
Regards to Naselus, way2co0l, KonradRichtmark, Valentin the II and others from "Reworked POP needs to stimulate demand" team. Also Brownbeard, he is working on BROWNBEARDS pop overhaul. You are doing great job.
Have fun! D.
Last edited: