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

NoClass

Captain
74 Badges
Feb 10, 2004
308
7
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Magicka 2
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • 500k Club
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Hearts of Iron II: Armageddon
  • Europa Universalis IV: Call to arms event
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
Have you ever noticed that factory input demand rarely pushes overall demand above supply levels?

Bottom line up front: If a factory input good is supply limited, the demand/supply ratio for that good won't rise much above 1.1 (assuming pops are all satisfied), even if the factories using that good are highly profitable. This prevents the good's price from rising beyond its base value. (see my theory of how Vic 2 pricing works here, and tell me if I'm wrong).

This has three broad negative consequences for the game:

-Pops in RGO's that produce said good don't get a bonus for producing something that's really rare, and are no more likely to stay and produce more of it rather than move and produce something else more common.

-Industries are then limited by rare goods, as RGO's don't produce any more.

-Low prestige nations cannot compete with GP's that suck up all of limited supply, no matter how much more efficiently the small nations are using said supply.




Here's my llong explanation

I've been playing PDM (a mod) lately, in which supplies of coal and rubber are frequently industry limiters (by design, of course). Overall pop demand doesn't meet the total supply for those goods, so factories use up the excess supply. The thing is, no matter how profitable those factories are, they are never able to demand inputs much more than what is supplied on the markets.

They can't, of course, because a factory only demands exactly what it needs to produce it's output, and once it maxes out the available supply, throughput is limited to that level, and input demand is limited as well. Thus, input demand is roughly limited by input supply.

To be sure, a few factories will occasionally flash the tooltip, "not enough good is available on the world market," generally before they start to fail due to the lack of some cheap input. The result is a good demand that is only slightly above supply, and a price that never rises above it's normal value.

Thus, a supposedly rare input good that limits highly profitable industrial production is unlikely to rise in price in Vic2. Because the price stays low, what few high ranking nations that can access that good have industries that expand until all the WM supply is used. Moreover, pops that produce the good in RGO's have no more incentive to produce this good than any other more common good. Finally, no matter how profitable a particular factory could be, if the good is unavailable, that factory will never survive if it's too low in the list.

Of course, I noticed this little inconsistency by playing PDM, but I think the fundamental causes are hardcoded in Vic 2. If I'm wrong and it's just a PDM thing, then hopefully a nice mod will move this thread to the PDM forum.



My suggestion (though incomplete):

Demand generated by factories shouldn't simply be the the amount of a good a factory needs to maintain desired production. A profitable factory should be inclined to produce more, and thus demands more input goods than it is currently using.

Perhaps factory demand should be scaled by it's current profit, perhaps by (1 + profit/input_cost)?

One real problem with a plan like that, though, is the fact that profitable industries would drive up good prices far above what pops can consume. Of course this can happen in real life. Still in Vic 2, this means that what little pops could afford would be sucked up first by skyrocketing industry demand.

Anyone got a better idea?
 
I am seeing this sort of thing all over the place. For example, fish is listed on the trade screen as not in high demand, and the demand is usually exactly the same as the supply, or occasionally a little lower. However, my POPs can't buy a single fish finger because there are not any available to buy and consequently even my most filthy rich POP cant meet its life needs.

One real problem with a plan like that, though, is the fact that profitable industries would drive up good prices far above what pops can consume. Of course this can happen in real life. Still in Vic 2, this means that what little pops could afford would be sucked up first by skyrocketing industry demand.

Factories get the priority anyway regardless of price. (as I found out with fruit, I had to close down a winery so my population could get fruit. It didn't move the price at all, the factory was grabbing all the supply at low price and was highly profitable. I had to close the factory to release the fruit for my POPs to eat.)

I think the price mechanism in Vic2 only works for luxury consumption and is completely borked for basic goods and raw materials. My guess is that they ran out of time to balance it during development and kludged the formulas.
 
Yeah, I'm willing to bet that balancing the economy is a much bigger pain in the ass for the devs than actually implementing a sensible model. I shpuld qualify everything I say in regards to the econ model by saying we're very lucky to have something that even vaguely resembles a real economy, and is still fun to play.


In regards to luxury goods, the d!=d problem can "bork" them pretty good too. Pops "demand" all the they could possibly desire, even if they have no way to pay for them.

This leads to high prices (despite the weird way price responds to demand), on goods that are overproduced ( due to irrational factory overproduction and capi preference for high demand goods production).

The practical consequence of d!=d is that prices are too high for pops to buy, and factories that have no way to profit keep getting built by capis in lieu of better industries.


Of course d!=d was been beaten to death by Naselus in the PDM forum long before I got here. I'm more worried about innacurate factory input demand and pricing.
 
Yeah, I'm willing to bet that balancing the economy is a much bigger pain in the ass for the devs than actually implementing a sensible model. I shpuld qualify everything I say in regards to the econ model by saying we're very lucky to have something that even vaguely resembles a real economy, and is still fun to play.

This is because they don't have a sensible model. A sensible model would be self balancing.

I think one big root of the problem is the lack of separate prices in the separate markets. There are lots of separate markets, with different supply and demand balances in them. However, there is only one global price. This means that supply/demand effects have to be severely constrained. Local markets need to set their price based on local supply/demand factors, and then their surplus supply and demand goes to the global market and sets the price there. Once Paradox had decided to separate out trading into multiple markets, it needed to allow separate prices to be set for each market. So if your country is a big fish producer, fish is in oversupply in the local market, and POPs get to meet their needs for fish at a low price. However, if you have a lack of fish, you pay the global price (which will always be higher than the local one) for as much of the local surpluses as your prestige gives you access to.

Models should always be as simple as you can get away with, but a single price across multiple markets is a simplification too far. One price per market is needed. If there is to only be a global price, there has to be only a global market, and with multiple markets, multiple prices are needed.
 
What strikes me as a potential answer for this question would be to deliberately overproduce raw materials, and then set the base price high enough to balance out the low demand effect, as follows:

e.g. Silk
demand 500
supply 5000
Base price 18 -> drops to 7 from low demand.

In this way, prices would be allowed to rise to the point where high-demand raw materials would no longer be affordable to inefficient factories, causing them to fail.

But it's far from an ideal solution. However, the prestige buying order system and the coomon market -> World market system mean it's more or less the only way to do this sort of thing with V2.
 
Hrmm, that could definitely work, though you'd have to manually balance each good in that way. What do you think the broader effect on the economy would be?

Anyway, the other half of this problem is the fact that RGO that produce rare goods don't seem too fill up very fast, even in old, heavily populated provinces. Dunno if that's a function of poor migration and job selection behavior in transient POPs or of the unrealistically low price of rare input goods (which itself is the result of weird price behavior).





If we're throwing out ideas for simple ways to improve the model, here's the foundation of one of mine. "Mark-ups"

Tariffs are already calculated for each good bought on various markets, so it would be fairly simple (in source code, not a mod) to add a markup for purchases at the common and world market level. The money gained would have to go somewhere (perhaps high maintenance "merchant pops"). Moreover, the size of the markups and the distribution of the money made could be governed by some sort of a trade effeciency tech, if you wanted to get deeper.

This would give pops a huge relative bonus if goods are available locally, and mean a nation would have to be wealthy and advanced to truly compete on the world market.

If you wanted to get REALLY deep, I have a much expanded trade model that I've been thinking about, but there's too many "bright" ideas floating around the forums already, so Ill spare y'all.
 
Anyway, the other half of this problem is the fact that RGO that produce rare goods don't seem too fill up very fast, even in old, heavily populated provinces. Dunno if that's a function of poor migration and job selection behavior in transient POPs or of the unrealistically low price of rare input goods (which itself is the result of weird price behavior).





If we're throwing out ideas for simple ways to improve the model, here's the foundation of one of mine. "Mark-ups"

Tariffs are already calculated for each good bought on various markets, so it would be fairly simple (in source code, not a mod) to add a markup for purchases at the common and world market level. The money gained would have to go somewhere (perhaps high maintenance "merchant pops"). Moreover, the size of the markups and the distribution of the money made could be governed by some sort of a trade effeciency tech, if you wanted to get deeper.

This would give pops a huge relative bonus if goods are available locally, and mean a nation would have to be wealthy and advanced to truly compete on the world market.

If you wanted to get REALLY deep, I have a much expanded trade model that I've been thinking about, but there's too many "bright" ideas floating around the forums already, so Ill spare y'all.

Mark ups would have the same problem as the current system in failing to provide incentive for producing rare goods. The money is all going to the merchants, so there is no reason for the POPs to actually fill up the RGOs that produce them. A significant amount of the mark up has to come back to the farmer or labourer, or they will just head for the nearest factory instead.

Factories need to come lower down the pecking order than they do at the moment. Factories act as huge resource destroyers, due to the stockpiles being trashed every day. This means that goods which are needed by POPs and are also factory inputs, are bought up by factories in excess of their requirements and then trashed without POPs or even governments ever getting a chance to buy them. It can be impossible to build infrastructure that would only take a fraction of a % of the country's timber, because all the timber is going to factories can only use a quarter of it and are trashing the rest. This is why tinned food factories are so unprofitable, if they were balanced so they could actually make money all the world's food supply would be trashed by them before POPs could ever afford to buy any.
 
So factories actually buy far more of their input goods than they use in production each day? Is the input needed not determined by the output being generated?
 
No, input demand is determined by throughput, which itself is limited by the number of workers and the amount of inputs the factory can afford. The problem is that factories frequently produce far more than can be consumed, and that excess product is lost. Thus, a factory takes in inputs and pays workers to produce goods that will be thrown away.
 
So factories actually buy far more of their input goods than they use in production each day? Is the input needed not determined by the output being generated?

No. Its limited by the potential output. So if a factory needs 10 units of one good and 100 of another to occupy its workers in producing 2 units of output, but only 1 of the first and 101 of the second are available, it buys 1 and 100, makes 0.2 units of output and trashes 90 of the second input good. In addition, if demand is weak and it can only sell 0.1 output units, the other 0.1 is trashed. Consequently, an output good that required 0.5 units of the first input and 5 units of the second input to make, destroys an additional 0.5 units of the first and 95 units of the second in the process. As long as supply of all input goods exceeds demand, and demand for the output exceeds supply, there are no losses of material in factories. However, this is a rare state of affairs and most factories are trashing significant quantities of goods most of the time.
 
No. Its limited by the potential output. So if a factory needs 10 units of one good and 100 of another to occupy its workers in producing 2 units of output, but only 1 of the first and 101 of the second are available, it buys 1 and 100, makes 0.2 units of output and trashes 90 of the second input good. In addition, if demand is weak and it can only sell 0.1 output units, the other 0.1 is trashed. Consequently, an output good that required 0.5 units of the first input and 5 units of the second input to make, destroys an additional 0.5 units of the first and 95 units of the second in the process. As long as supply of all input goods exceeds demand, and demand for the output exceeds supply, there are no losses of material in factories. However, this is a rare state of affairs and most factories are trashing significant quantities of goods most of the time.

That's... a really bad setup...
 
That's... a really bad setup...
The game needs a wealth destruction mechanism in it somewhere. The problem is not so much that it is factories destroying goods, but that the factories get priority in goods allocation as well as being the destruction mechanism.

As an example of the destruction levels, in my current game about 1/3 of steel and cement production, about 1/2 of glass production, and about 5/6 of machine tool production is being trashed. The factories making them are still highly profitable and have not yet expanded to the point where coal is no longer available to POPs. However, about 40% of furniture and 60% of paper is being trashed, and the demand of factories for wood has expanded to the point that it is impossible to build infrastructure like ports and railroads due to factories having the prior claim on wood.
 
The game needs a wealth destruction mechanism in it somewhere. The problem is not so much that it is factories destroying goods, but that the factories get priority in goods allocation as well as being the destruction mechanism.

As an example of the destruction levels, in my current game about 1/3 of steel and cement production, about 1/2 of glass production, and about 5/6 of machine tool production is being trashed. The factories making them are still highly profitable and have not yet expanded to the point where coal is no longer available to POPs. However, about 40% of furniture and 60% of paper is being trashed, and the demand of factories for wood has expanded to the point that it is impossible to build infrastructure like ports and railroads due to factories having the prior claim on wood.

What if the excess output goods caused prices to fall? Or if the excess went into the national stockpile?
 
What if the excess output goods caused prices to fall? Or if the excess went into the national stockpile?

They do affect price. But the segmented market with uniform price means the supply/demand/price effect has to be very weak. The real economics are done by trashing. If 5/6 of production is trashed, the effective price is 1/6 of what the nominal price is. Factories get built up until so much is trashed that they are no longer economic, rather than until the price drops so much that they are uneconomic. The competition between factories works fine. Factories that can't afford to trash 5/6 of their machine tool output get driven out of business. What doesn't work is competition between POPs, governments and factories and thats because the factories can trash everything before the others get a chance at the available resources.

Stockpiling on its own would destroy the competition between factories and make matters worse. It needs a functioning price mechanism. Add differentiation in prices between the different markets and it could work.
 
Well it seems like at some point we've hit on some of the biggest game-weakening elements of the Vic 2 economy:

-Factory demand rarely influences overall demand (the subject of this thread).

-Pops demand luxury goods not in quantities they could buy, but in quantities that they could possibly want, destroying those good markets (the infamous d!=d).

-Price doesn't respond to imbalances in supply and demand, but merely ratios of supply and demand, preventing price from moving properly in response to economic forces. (I'm the only person railing about this one, currently).

-Price floors and ceilings that are far too close to a good's base price.

Stockpiling on its own would destroy the competition between factories and make matters worse. It needs a functioning price mechanism. Add differentiation in prices between the different markets and it could work.

I agree wholeheartedly about a properly functioning price mechanism being the key here.

I also think it would be cool to have price differentiation in markets, but I don't think it would make that much of a difference in the Vic 2 economy, and it would make the model far more difficult to calculate. Right now it would be great just to have normal supply and demand response in the market as it is, first.
 
I suspect price floors and ceilings do not exist as hard caps, but exist due to the ratio-based pricing. It's not like it's impossible for prices to fall further or rise higher - just set demand for something to 10000000 and watch what happens to it's price, or take a look at electricity in PDM when the first power plant is built - but there is a cap in place, determined not by pruchasing power but by total possible world demand or surplus.

This means that base price, ceiling and floor are only close together due to the nature of the pricing model - the floor is effectively zero, but only if output is infintely greater than demand, and visa versa.
 
I suspect price floors and ceilings do not exist as hard caps, but exist due to the ratio-based pricing. It's not like it's impossible for prices to fall further or rise higher - just set demand for something to 10000000 and watch what happens to it's price, or take a look at electricity in PDM when the first power plant is built - but there is a cap in place, determined not by pruchasing power but by total possible world demand or surplus.

This means that base price, ceiling and floor are only close together due to the nature of the pricing model - the floor is effectively zero, but only if output is infintely greater than demand, and visa versa.

That makes sense.

Like you pointed out in the economy model thread, it appears that a given target price for a good isn't based based the discrete value of the supply/demand ratio, but ranges of the supply demand ratio. In other words, a good's price will stabilze at the same value for every supply/demand ratio between 1.1 and 1.2. I'm not sure exactly what the ranges are, but they're pretty big.


What I did notice, testing with barrels in a VRRP game, is that there is an effective price floor of about 50% of base price. My government buy order was the only thing fueling barrel demand in this game, and I was the only producer of barrels (the factory was subsidized). I set the buy order to 0 just to see what would happen, and the price fell to half of the value for barrels found in the .txt file. Of course, demand is never truly 0, according to the trade screen. It's always 1 + demand. In this case the ratio of supply to demand was roughly 100.


There's two real questions:

-For the real economists here: is this method of modeling price response to supply and demand even vaguely realistic?

-Does this damage the workings of the Vic2 world economy in a way that makes the game less fun?
 
Demand must never be zero, as it would probably cause a divide by 0 error. That's why the 1 is always there.
 
There's two real questions:

-For the real economists here: is this method of modeling price response to supply and demand even vaguely realistic?

Yes.

A model of this sort is unable to set prices by market clearing because it is clearing markets on prestige, not price. Whether you can buy a good in short supply depends on the prestige you have, not the price you are willing to pay. There is no demand elasticity. As long as buyers have sufficient money and prestige, they buy a fixed amount. If one or the other runs out, they don't buy.

The really unrealistic behaviour is down to having a single price and multiple markets. The price for each market should be set by the conditions in that market. It really doesn't add much complexity to the coding. The complexity comes from the existence of multiple markets. The formulae stay the same, they just have price (market, good) matrices rather than price (good) vectors in them. Add a setprice for every market loop around the price formula and thats it. It probably would have been easier to code from scratch than the current version, because the price formula would be simpler.

It adds extra computing time and memory demand, but compared to whats involved with POPs it is utterly trivial. Its the compute assimilation etc for every POP loops that are the CPU hogs and the POP data which is the memory hog.
 
Yes.

A model of this sort is unable to set prices by market clearing because it is clearing markets on prestige, not price. Whether you can buy a good in short supply depends on the prestige you have, not the price you are willing to pay. There is no demand elasticity. As long as buyers have sufficient money and prestige, they buy a fixed amount. If one or the other runs out, they don't buy.

The really unrealistic behaviour is down to having a single price and multiple markets. The price for each market should be set by the conditions in that market. It really doesn't add much complexity to the coding. The complexity comes from the existence of multiple markets. The formulae stay the same, they just have price (market, good) matrices rather than price (good) vectors in them. Add a setprice for every market loop around the price formula and thats it. It probably would have been easier to code from scratch than the current version, because the price formula would be simpler.

It adds extra computing time and memory demand, but compared to whats involved with POPs it is utterly trivial. Its the compute assimilation etc for every POP loops that are the CPU hogs and the POP data which is the memory hog.

It's not quite as easy: you not only need markets to clear on price, but also you need a marginal rate of substitution. V2 simulates this is life/everyday/luxury goods, but it's not good enough. Needless to say, the computational requirements explode if you model this. Hundreds of thousands of simulatenous equations every day.