Supply and Demand self-balancing economy and how it does work now

heu3becteh

Recruit
M&BWBWF&SNWVC
Best answers
0
I like the economy in the game and trade as it is already, but I feel just a little push is still needed for it to be truly alive. Seeing how current updates address the important issues I can assume it will be done the right way without my feedback/suggestion, but maybe it will be of some use nonetheless.
The economy in the game has a great potential to balance itself without hardcoded limitations.

~ How it does work now ~
Supply and demand​
Base demand is linearly dependant on prosperity (for Luxury goods on prosperity - 3000). Supply is dependant on stock amounts.
Demand and supply change daily and have inertia, base inertia works like that:
Code:
new = old * 0.85 + new * 0.15
Starting from 1.4.1 (removed in beta 1.4.2, yay) demand is additionally increased on:
Code:
0.1f * Math.Max(0f, categoryData.Supply - dailyDemandForCategory - 0.3f * (float)categoryData.InStoreValue)
So the demand increases when the long-term supply surplus is too big, more than 30% of the current supply. That kinda adds some more inertia, demand/prices will not drop too fast when you sell ridiculous stock amounts to town.

Price​
Generally your price is defined like ItemValue * priceFactor, where priceFactor is limited to 0.2-10 for IsTradeGood and IsAnimal, 0.8-1.3 for others. Trade penalty is added too (both ways, when you sell and when you buy).
priceFactor is defined as:
Code:
MathF.Pow(demand / (0.1f * supply + inStoreValue * 0.04f + 2f), 0.5f)
where supply is long-term component (it changes daily and has inertia) related to stock amount, inStoreValue is short-term component (changes with every purchase).

Prosperity​
Town has prosperity property, which single-handedly defines many things: demand, consumption, town gold amounts.
While prosperity value is important, it is relatively static: changes are slow, but steady. You are unlikely to have negative prosperity change, unless your town is starving.

Food​
Food demands defined by prosperity and garrison. Prosperity impact is usually greater: 1 food for 50 prosperity.
That demand is satisfied by surrounding villages with flat value depending on their tier and by food consumed from the market (trade goods with BonusToFoodStores property).
Food has some impact on prosperity. When food storage is full and food change is positive, prosperity will have positive effect of Food Surplus. When food storage is empty and food change is negative, prosperity will have negative effect of Food Shortage.

Consumption​
Items are consumed from the market depending on their demand (demand defined in default value of item category). When item from market is consumed, its market price is added to town gold.

Gold​
Town gold is soft-capped at 7 * prosperity. Gold is getting close to that value 20% of difference per day.

~ What could be improved ~
I did make a mod to address some issues and to demonstrate some of my suggestions: Economy Tweak

Supply and demand​
1. Workshop demands could be taken into account (for price calculation). It was a problem that lead me to suspect something is working strange with economy: towns with higher prosperity clearly had more demand for raw resources than towns with workshops, because of that some workshops were unable to make production.
Decision to not consider workshops explicitly could've been made because:
a) Their demand should not lead to consumption in MakeConsumption(), it should affect the price calculation only.
b) Workshops could be changed by player often, but it is not easily exploited because market has inertia and demand is recalculated daily. And seeing how market will react to your actions is what makes playing with economy fun.

I suggest to create some method for demand addition after base demand depending on prosperity was calculated in GetDailyDemandForCategory().
It could be used to account for some other demands, not only for workshops. Maybe something like tool demands when construction is in progress. There could be AddDemand(Town town, ItemCategory category) method created for pretty much everything and AddPriceDemand(Town town, ItemCategory category) to account for workshops: it will remember the demand added that way to subtract it when MakeConsumption().
In e1.4.1 changes with GetEstimatedDemandForCategory() were introduced, I suggest making this method call some method to check workshop demands at town. In my mod it is done in GetDailyDemandForCategory(). After that I have changed MakeConsumption() to subtract workshop demands (remembered in dictionary) when calculating consumption.
And, as a modder, I would like to request to set all calcultaions outside of protected internal methods when possible. So that GetEstimatedDemandForCategory() would call some other method (which is possible to change) to get the values of change. I had to reverse changes made here in other method. (done in beta 1.4.2)

2. Demands need to be fulfilled. Now town just consumes what is has in stock depending on the demand, but does nothing when there is nothing in stock.
In my mod I have added changes to prosperity depending on demands fulfilled (positive effect on prosperity) or not (negative effect on prosperity).

3. Food demand should increase during food shortage. It will help to:
a) Consume more food that town has on market and better try to prevent starvation.
b) Increase prices to indicate that town needs more food bringed by caravans, to indicate that town do not want caravans to buy food there now.
In my mod there is a check for town.FoodChange in GetDailyDemandForCategory().

4. Demand could be tuned for stocks to be better distributed. Now in game many things balance around 0, which is not very good. There generally should be more stocks in game for economy to have material to work with.
In my mod raw resource production is increased on 50%, basic demand is halved, equipment demand is increased (increases equipment prices and reduces equipment stock surplus), stocks are generally divided into more or less, and not into absent or present.
And to transfer these increased stocks caravans should carry more or their quantity should be increased.

5. Inertia equation could be changed to work better both sides.
Now inertia is introduced with
Code:
new = old * 0.85 + new * 0.15
equation. It has a downside that value increases faster than decreases. Because of that if you will sell large (the larger the more significant that effect is) amounts of trade good to town, wait for daily changes to take place and then buy it back, inertia equation could increase the value significantly in one day, but than decrease it linearly on 15% maximum. And nobody will sell these goods for low price to the town that has high demand for it really. Caravans can even buy food from a starving town because it is cheap.
Change made in GetEstimatedDemandForCategory() may help with that, but I suggest changing the inertia equation itself.
In my mod inertia equation is changed to
Code:
new = old * (new / old)^0.2
with that equation value can decrease faster depending on the change significance, and it does not increase as fast.

Price​
Price calculation in game generally does its job. There is a long-term and short-term component, it makes goods cheaper where there is a surplus, more expensive where there is a shortage. But I suggest rebalancing relative impact of short-term and long-term components.
Now it is like that:
Code:
demand / (0.1 * long-term supply + short-term supply * 0.04 + 2)
If long-term component is big, short-term component has less of an impact even when reaching 0. Bacause of that it is often makes sense to buy all the stock from town, to sell all the stock to town. That makes supply fluctuations fast and large. And it does make sense for a town merchants to sell the last of the goods in town for higher price. Especially if demands need to be fulfilled and are not disregarded. And it does not make much sense for town merchants to buy ridiculous amounts of goods that will drop in price on the next day.
You can see that long-term and short-term components work separately, they are added, not multiplied.

In my mod price is calculated like:
Code:
(optimal stock amount + demand + 1) / (actual stock amount + demand + 1)
where optimal stock amount is N days worth of demand. Long-term and short-term components work together, they are multiplied to form priceFactor. Short-term component influence is more than long-term, so all towns aspire to have at least some of goods to satisfy their demands, that helps to distribute goods better.

Food​
I feel that is so strange that notorious garrison starvation problem still persists.
For a long time I suggest for prosperity to decrease with food stocks. The closer stocks are to 0, the faster it decreases.
In my mod following equation for prosperity change is used during food shortages:
Code:
MathF.Clamp(FoodChange - MathF.Pow(-Math.Min(0f, FoodDeficiency), globalConstants.FoodShortageProsperityExpValue), -TownProsperity * 0.05f, 0f)
where FoodShortageProsperityExpValue = 0.5 (default), FoodDeficiency:
Code:
FoodStocks + FoodChange * globalConstants.OptimalStockPeriodFood - TownProsperity / 50
Towns will aspire to have stocks more than Prosperity / 50 + FoodChange * OptimalStockPeriodFood.
That change is capped at 5% of prosperity, so town could still starve during sieges and in some peculiar conditions, when all the food from market is suddenly bought and garrison is large, for example.

Consumption​
Now the town just consumes part of items on its market depending on demand. When there is nothing to consume, nothing is done, category demand is not even considered when there is not a single item of that category on the market.
With my mod demands are checked after consumption is done and affect the prosperity positively or negatively.
When item is consumed, not only its price is added to town gold, but also the default value of trade good category items is added to prosperity. So fulfillment of demands not only transfer wealth from one form to another, but brings the new wealth.
I used default values of trade goods here, because felt it would not be right to bring market price fluctuations to flat prosperity value.
Also I did use default values when determining demand in number of items to consume: it would be strange when you demand 100 denars worth of grain, be it 1 grain or 20 grain depending on price variations. You demand set amound of grain you want to eat, and market makes it possible or not. Demand is calculated using default values to begin with. So I think default values should be used when converting demand from value to item count in MakeConsumption().
That change is somehow controversial, because it will make town to gain more gold when prices are higher, and it could later become prosperity too.

Gold​
Now town gold is spawned and despawned too easily. It appears from nothing and disappears to nowhere.
In my mod I linked town gold with prosperity, so that it converts from one to another with 1 prosperity = 100 gold ratio.

Generally with mod enabled prosperity changes faster, which makes economy more dynamic. But, while fluctuations are faster, they are approaching equilibrium state, which could be stable enough, but not static.

~ Discussion ~
I would like to see the economy in the game where everything converts from one form to another, without disappearing and appearing out of nowhere, conservation laws are being followed.
Sources of wealth would be villages producing raw goods and added value of workshop production, fulfilled demands, sinks would be destructive actions of men, unfulfilled demands, starvation.
System could stay close to the current one:
In brackets indicated remote transfer, without them - it needs to be delivered by a party.
Villagers take produced raw resources, bring them to city for gold. That gold is then returned to village and paid as tax, surplus is gradually convetred to hearths (if village have no gold to pay taxes, it pays with hearths). Some of villagers remain at town as recruits (they fill recruit positions immediately). Villagers bring back to treir village tools, simple cloting, simple weapons, simple armour, some other goods in demand. These goods are gradually converted to hearths.
Prosperity in towns could be gradually converted to gold and back, is linked to market and food situation (as described above). Towns and castles send militia patrols to bring security to surrounding villages.
Lords could not only raid villages and siege fortifications, but invest some gold too.

Some additional sources of demands could be added: tools are in greater demand duting construction (their consumption speeds up construction speed), equipment/weapons are in greater demand when many recruits are spawned (recruits may require consumption of higher level equipment to have higher level).
Seasonal changes of demand and production could be introduced: hardwood is in greater demand during snowy time, grapes are growing better during summer.

With flexible demand and price formulation economy will reach stable conditions when no events of significance are changing them them and will adapt to ocurring events, possibly reaching other stable conditions.
These conditions will have fluctuations, but they should be reasonable: not the long period of inevitable prosperity growth and the long period of inevitable starvation. Things should be able to fluctuate without such extremes.

To make interacting with economy even more interesting, there may be a way to change village production. For example, adding secondary village production, which player can choose and invest in. For every village there may be efficiency coefficients for different production types.
I believe there should be no restrictions for player to own many workshops (especially at owned fiefs). Or at least there should be much more of them for high-level clan. There could be income penalty for workshops when you have too many of them.
For the cases when the player will have too much of an income, some additional gold sinks could be added: player can increase village production/prosperity for gold, train recruits better, start feasts, festivals, tournaments, gain more influence, invest in new clan formation for your companions, militia training, road maintainance, there could be many ways.

If things will be consistent, economy will be alive and will be able to balance itself without need for hardcoded caps on everything and spawn-despawn of things when situation goes wrong. Economy in game is potentially close to that.
Maybe without limitations and spawn-despawn of neccessary things something can be broken, but I do not see a way for that to happen (unless there is kinda bug) and did not experience anything of sort during the tests of my mod. Things are balanced and if one aspect goes wrong, it will be fixed by other.

One more note about stable conditions - I believe there should no be one-way forward progress, there should always be fluctuations back and forth. Now as I get it from the beginning you have less bandits, you have towns without structures. And while in-game timer passes structures are build, you have more and more bandits and prosperity at towns. I think there should be not only sources, but sinks for everything. For example, sieges could destroy structures at town, bandit spawn could be dependant on security/smth, not on days passed from campaign initialization.

There could also be more economy-related diplomacy and policies, like rights for caravans to pass through the lands of kingdom, trade with its towns.
There could be small "neutral" caravans which do not belong to any kingdom, sort of like merchant mercenaries.
Generally there could be more stocks and more caravans transferring them.

While economy gets better and better with patches and has great potential to be interesting without my suggestions, I hope some solutions from modifications and community could help to make the unmodified game batter too during development.

My previous suggestions and tests in that message.

Best regards.

 
Last edited:

imgran

Squire
Best answers
0
I really feel like it should be much more elemental than that.

Each castle should have an adjustable budget for buying food. Lower budget, governors buy less food and only buy when the local prices are low. Higher budget, they make sure the barns are full as a top priority. These budgets would interact with the market based on the nearest source of buyable grain and the funds come out of the castle's income, like unit wages do..

It could even be as simple as a three button option, Low, Medium and High. Low buys Grain at 5% below market, Normal buys grain at market rates, and High spends 5% above the market to make sure the barns are full.

Tight fisted lords would keep their budgets low. Generous lords would spend what it takes to keep their people happy and well fed.

This is all it has to be.

And I like the idea of the militia sending out parties to buy food at the nearest Grain producing village, there's usually one close enough as long as you keep the bandits under control. And it also means that razing local grain producing villages would be a great way to starve out a castle whose garrison is too strong to take normally.

Cities, of course, would buy their grain from the market, most towns have at least some grain in the market to allow the governors to accumulate the stuff.
 
Last edited:

Ichon

Sergeant
Best answers
0
I really feel like it should be much more elemental than that.

Each castle should have an adjustable budget for buying food. Lower budget, governors buy less food and only buy when the local prices are low. Higher budget, they make sure the barns are full as a top priority. These budgets would interact with the market based on the nearest source of buyable grain and the funds come out of the castle's income, like unit wages do..

It could even be as simple as a three button option, Low, Medium and High. Low buys Grain at 5% below market, Normal buys grain at market rates, and High spends 5% above the market to make sure the barns are full.

Tight fisted lords would keep their budgets low. Generous lords would spend what it takes to keep their people happy and well fed.

This is all it has to be.

And I like the idea of the militia sending out parties to buy food at the nearest Grain producing village, there's usually one close enough as long as you keep the bandits under control. And it also means that razing local grain producing villages would be a great way to starve out a castle whose garrison is too strong to take normally.

Cities, of course, would buy their grain from the market, most towns have at least some grain in the market to allow the governors to accumulate the stuff.
+1
 

heu3becteh

Recruit
M&BWBWF&SNWVC
Best answers
0
I really feel like it should be much more elemental than that.

Each castle should have an adjustable budget for buying food. Lower budget, governors buy less food and only buy when the local prices are low. Higher budget, they make sure the barns are full as a top priority. These budgets would interact with the market based on the nearest source of buyable grain and the funds come out of the castle's income, like unit wages do..

It could even be as simple as a three button option, Low, Medium and High. Low buys Grain at 5% below market, Normal buys grain at market rates, and High spends 5% above the market to make sure the barns are full.

Tight fisted lords would keep their budgets low. Generous lords would spend what it takes to keep their people happy and well fed.

This is all it has to be.

And I like the idea of the militia sending out parties to buy food at the nearest Grain producing village, there's usually one close enough as long as you keep the bandits under control. And it also means that razing local grain producing villages would be a great way to starve out a castle whose garrison is too strong to take normally.

Cities, of course, would buy their grain from the market, most towns have at least some grain in the market to allow the governors to accumulate the stuff.
But isn't it more complicated than what I have described? Basically it can include elemental things about supply, demand and prices I have described, but adding one more setting on top of it - adjustable budget for buying food.
Unless you are impliying that prices should be constant value without fluctuations, which would remove trade as a thing from the game.

I did write many letters about details of simple thing. To sum it up, prices should be demand-based. Everything other (maybe even everything) is already in the game somehow like that.
 

imgran

Squire
Best answers
0
Like I said, prices should be based on the price of the nearest grain supply, which is usually going to be a grain producing village.
 

heu3becteh

Recruit
M&BWBWF&SNWVC
Best answers
0
Like I said, prices should be based on the price of the nearest grain supply, which is usually going to be a grain producing village.
So I guess you mean constant values depending on the region.
Wouldn't that "turn off" the economy - interesting part of the game? The trade will still work, but it will be constant and not interesting.
I personally like the economy in the game, non-stagnant trade process.
 

imgran

Squire
Best answers
0
Only for granaries in forts and castles. Military budgets are often weird like that. Even in a food shortage the army will horde grain for its garrisons, for example.
 

Diavolo

Knight
M&BWB
Best answers
0
Well I would love it if bannerlord became the Victoria 3 we have all been waiting for. Although proper economic simulations seem to be very hard to make. I hope they make some "boundary conditions" to avoid stupid things like we have now where a trader buys all the grain of a city and it ends up starving.
 

heu3becteh

Recruit
M&BWBWF&SNWVC
Best answers
0
Well I would love it if bannerlord became the Victoria 3 we have all been waiting for. Although proper economic simulations seem to be very hard to make. I hope they make some "boundary conditions" to avoid stupid things like we have now where a trader buys all the grain of a city and it ends up starving.
I do not know much about Victoria, but I would love to see more sandbox economy in the game.

Now the problem is more with prosperity-food balance, I guess. Even if all "trading good" food will be bought, there is still "passive" food in granary. If prosperity will increase only when food balance is positive, it will shift prosperity-food equilibrium from starving conditions to full granary conditions. That is another topic though.

And demand-based prices will help avoiding that too: if city has not enough food, it will be expensive for trader to buy it all.
But if you will intend to make a diversion against your enemy - you can buy off all the food, even if it is expensive. But then all the traders will sell even more food, and you will have to lose quite an amount of gold. I find things like that interesting too. If economy will be alive, you will have more options to interact with it.
 

Sikkimoto

Recruit
Best answers
0
Thanks for the explanation. I love how the economy works. But we really need more tooltips or atleast a more meaningful ingame wiki on this topic. All mentioned ideas for denar sinks sound great. At the moment i collect more money than a can reasonably spend with just a poor castle and 3 workshops.
 

heu3becteh

Recruit
M&BWBWF&SNWVC
Best answers
0
Thanks for the explanation. I love how the economy works. But we really need more tooltips or atleast a more meaningful ingame wiki on this topic. All mentioned ideas for denar sinks sound great. At the moment i collect more money than a can reasonably spend with just a poor castle and 3 workshops.
I am sure that ingame encyclopedia is in progress. The page about "Trading goods" is clearly just a placeholder. I guess all the explanations should be there.

I did upgrade some information about how economy is working now, about some problems and possible solutions.
 

heu3becteh

Recruit
M&BWBWF&SNWVC
Best answers
0
In e1.4.1 patch one of the changes is:
Town prices now model purchases made by caravans and other parties while determining supply and demand.
Can somebody explain how it does work?

P.S. Did some research. I will update OP afterwards.
 
Last edited:

heu3becteh

Recruit
M&BWBWF&SNWVC
Best answers
0
So I did update OP with some code of how prices do work now.

I do not quite understand how that change from 1.4.1 work, but it seems that demand/prices did become somehow more reasonable.
At least now leather is cheaper in town with a tannery in it and it is supplied with hides to produce it by caravans.

I think there is also some change to get rid of overproduced goods. Maybe that is current solution for items which do not have any real demand/sink (like weapons)? That may be "quick and dirty", but can possibly work. I do hope for a better solution though.
 

heu3becteh

Recruit
M&BWBWF&SNWVC
Best answers
0
I did make a mod to address some issues and to demonstrate some of my suggestions:
----- Economy Tweak mod by heu3becteh, version 0.2. -----

I am modifying the OP now, my previous tests/suggestions will be preserved in this message:

Below are results of my empirical tests from before version e1.4.1 (these results may be outdated to some extent).

Generally all prices in the game follow some hyperbolic function (y=k/x^n, where k seems to be linearly dependent on prosperity):
Figure 1. Price distribution

Price has some caps: minimum and maximum prices. It is broken when too close to both of these caps. For example, velvet prices crack to 1 above 2000 or something price tag.
For velvet the lowest price is around 32.5 (30 to sell, 35 to buy), for leather 28 (26 to sell, 30 to buy). For Aserai Horse it is 370 (342 to sell, 398 to buy on one skill level, 345 to sell, 394 to buy on another skill level).
As you can see, trade penalty is applied on both sides.
When you purchase and sell some goods - price shifts on that graph.
The other time when price shifts on that graph is when day changes, and price is not stable for the current stock amount.
Figure 2. Stable prices

When day changes, price is getting closer to stable for that stock amount and prosperity.
It seems like change amount follows exponential function too, it will take one day to greatly shift prices with huge stock towards much lower values, but with zero stock prices rise back almost linearly.
As I see it, for now amount of goods consumed is based solely on prosperity. And town with higher prosperity can use per day more raw material without workshop than another town with workshop using that raw material.
So in the end price is based on the stock amount/prosperity, which depends on the amount being consumed, so generally prices are higher where demand (aka prosperity) is higher and lower where villages produce resources (they increase stock amount in town, which shifts prices towards lower). You can say that this is exactly what do you want. But I think simply linking the demand to prosperity is not the best solution.

For equipment there seems to be no demand/sinks whatsoever, so it is just stockpiled at town producing it. Prices for equipment are constant (do not change when you buy/sell).
There is a group pricing for mounts now, I guess it could be used for equipment too.

While it may seem easier to make everything as simple as possible, to add hardcoded caps and spawn/despawn things to fix problems, it does not always work well, and tuning needed to always stabilize hardcoded values can be more problematic that just making things work as they are, allowing them to reach equilibrium and balance themselves.

Self-balancing economy
It could be done that resources/gold do not appear/disappear, they change their form from one to another. That could mean that overall resource quantity is fixed, which is not something you really want, there need to be some sources and sinks: villages with raw resource production and town workshops (value of produced goods is higher that raw resources used) can serve as sources, destructive actions of men (sieges, raids) and resource shortage/starvation can serve as sinks (sieges should lower the level of structures too).
If resources/gold spawn will be turned off, there need to be some ways for everything needed to appear where it is needed. If there would be supply and demand, market and trade can help with that.

1. Demand
Towns
demand food, clothing, tools (especially during construction works), hardwood (especially during winter at cold regions), other trade goods (like salt). With high prosperity they start to require high quality clothing and jewelry. Requirements of workshops are added to Town requirements. Towns themselves require the very minimal amount of raw resources used by workshops. They consume some very minimal amount of equipment too.
Castles require food (“passive”, see below).
Villages require tools (especially during construction works), hardwood (especially during winter at cold regions), simple clothing, salt. As well as gold to pay taxes.
Total demand is based on prosperity of a town, level of workshops.

Food could be divided into "passive" food in granaries and "trading good" food that could be sold and bought. "Passive" food transfers without villagers carrying it. "Trading good" food can be transferred to "passive" food.
While food demand could be fulfilled only by "passive" food to prevent starvation, towns require varied food too.
Food demand is distributed evenly by all the "trading good" food types. If some types are not available, town will consume available ones instead. Wine and beer demand is half of other food types demand.
When granary with "passive" food storage decreases with time, "trading good" food consumption is increased to cover up the shortage.

Depending on demands fulfilled or not, prosperity will increase or decrease, proportional to the cost of consumed goods. That cost is deducted from the gold supply of a town.
Prosperity will not increase if food amount in storage decreases with time.

To have weapon/armour demand recruits in town may require some equipment: depending on recruit level different level of equipment. If there is not enough equipment of high level, recruit level decreases and demand for high-level equipment rises. Then that demand decreases with time to default values. When there are enough weapons/armour (that may be determined proportional to prosperity, for example), workshop produces only tools.
So demand for equipment will be higher at towns where more troops are recruited frequently, and equipment will not be stored in enormous amount without being needed by anyone.

If village have no gold to pay taxes, it pays it from prosperity.
Towns can convert gold-prosperity too, to have some amount of gold to trade. Excess gold converts to prosperity.
So whenever there are some problems with denars, it could be solved through prosperity conversion.

2. Prices
Generally prices do what the should do already. They help to distribute goods from places with surplus to places with shortage. If instead of prosperity demand (amount required - amount produced) as above would be used, they will help to distribute goods better.

I did think of some simple equations myself, I guess I will post it here.
First of all, Cost should be defined for different trade goods, it could be based on the amount produced daily by a village with default production speed. It may be better to use overall (whole map) daily production in case it could change considerably. Anyway, some default prices are already defined in the game.
Then with Cost and Demand (amount required - amount produced) following equations could be used.

Optimal stock amount = 10 days worth of Demand
Price base
= Cost * (Optimal stock amount + 10)/(Available stock amount + 10)
Price multiplier (recalculated daily) = Previous price multiplier * (((Optimal stock amount + 10)/(Available stock amount + 10))/Previous price multiplier)^0.1
Resulting price = Price base * Price multiplier * Trading penalty

All the constant (10 and 0.1) values could be changed and tuned accordingly, but some kind of balance should be achieved anyway, with different absolute price values (constant 10) and inertia (constant 0.1).
With these equations there will be a quick-changing base price, reacting on the supply-demand instantly (even while you buy-sell), and inert price multiplier that will change daily, adding stability to market.
All the towns will try to stay at their Optimal stock amount, dependant on the Demand.

Advantage in comparison with current equations used will be better stability (price multiplier changes very slowly because of 0.1 exponentiation). Now you can stock huge amount of resource, sell it at evening, and on the next day prices at this town will fluctuate a lot, even after you buy everything back.
It will take one day to greatly shift prices with huge stock towards much lower values, but with zero stock prices rise back almost linearly, much slower.

That will be price formation at towns.
Villages will sell their production at price forming from the nearest town (or multiple towns) buying price.

3. Logistics
Villagers
provide raw resources and recruits for town by travelling there with these resources, taken from village stock when their Available stock amount reaches half of the Optimal stock amount at town. Only one group of villagers per village, it gets bigger with village prosperity increase.
Villages will not sell goods apart from their production (they will fulfill their demands and increase prosperity) and will not have these 1000 denars spawned to buy anything. Goods sold by a player are available for trade for some time.
Town produce goods for town itself and villages (like tools and clothes), accumulate gold for villages to pay taxes, villagers take excess (after deducting taxes) of gold back to the village. That gold will be available for village to trade and will transfer to prosperity with time.
If villages are intercepted by some brigands, everything they carry will transfer to these brigands (as much as they can carry).

There should be generally more resources and less overconsumption.
Now usual amount of everything in town is for several days. If stocks would be larger, that will grant much more stability to economy. It will react to changes before the storage is already empty.
One of the reasons there are prosperity-food garrison death waves - is that towns consume the food much, much faster when they have surplus, and starve when they have eaten everything, as their granary is small (one-two days worth).
Granary should be around one dozen times larger, and prosperity should not rise when food quantity is decreasing (that should be already “food shortage” in prosperity change calculation, not when there is nothing left in granary anymore). That should help to shift prosperity-food equilibrium towards full granary, not towards empty granary and dead garrison. Together with turned off overconsumption (“trading goods” food is consumed more than standard demand only to compensate town food shortage) that should solve the problem.
Overconsumption should appear when there is just so much goods that surplus is maintained for a long time. So I guess it should need time to increase, while it can drop drastically much faster and can be turned off as soon as there are less than Optimal stock amount in the town.

While there should be minimum demand for raw resources without workshops, workshops should be more productive and gain levels to produce even more.

Local caravans should always have in mind that they will return to their town and prioritize trade offers profitable for that town, especially their own workshop needs.
There should be some non-local “neutral” caravans travelling everywhere. Generally there should be considerably more “neutral” caravans. And caravans should transfer more resources.
Diplomacy could allow an option to prohibit caravans of specific faction entering the lands of kingdom. Making it possible to attack them freely when they disregard that restriction and making economic situation for enemy harder.

Roads could be added to map, allowing to travel with better speeds, but brigands could ambush caravans at roads. There could be road maintenance and security policies at cost of militia quantity.
Then, when the economy is stable enough, you could set up your trade routes for the caravan to follow and note what and where should it buy.

4. More interactions
To make interacting with economy even more interesting, there may be a way to change village production. For example, adding secondary village production, which player can choose and invest in. For every village there may be efficiency coefficients for different production types. Primary and secondary production could be the same.

I believe there should be no restrictions for player to own many workshops (especially at owned fiefs). There could be income penalty for workshops when you have too many of them.
There should be a way for workshop owner to change workshop production, for village to change production (if that option would be added) without order from the player. To better react on the current market situation. And that could help with cases when player purchases all workshops, change their production to something bizarre and sells them again. Another way to deal with it is to just return the workshop production to the default one.

For the cases when the player will have too much of an income, some additional gold sinks could be added: player can increase village production/prosperity for gold, train recruits better, start feasts, festivals, tournaments, invest in new clan formation for your companions, militia training, road maintenance, there could be many ways.
If prosperity increase would be slower, player can boost it with denars. Everything could be upgraded. There could be more policies to decrease taxes/income for better prosperity/production/militia/whatever.

5. Current issues and possible solutions
Prosperity-food garrison death waves
is pretty much another topic. I touched it here too, but more in depth discussion is there.
Equipment has no demand. It just stockpiles in towns in crazy amounts. Recruits can make demand. Some equipment could be slowly consumed by town, and while there is enough, workshop produces tools instead.
You/towns gain no hide by slaughtering cows.
Demand should be reconsidered with less raw resources consumption without workshop, with higher workshop productivity, other suggestions check above.
Amounts of everything is too small, leading to instability. You have only one-two days worth of reserve. Overconsumption should be avoided (until it is necessary), stocks increased, especially granary volume.
“Long-term” (changed daily) prices can fluctuate too fast with sudden stock changes, which leads to instability (especially together with little stock amounts and overconsumption). Maybe speed, at which price is approaching “stable” value should be decreased (details see above), especially for huge stocks lowering prices greatly. I did write some other equations too, but the ones used in game at this time could be tuned, I assume.

The reason I did write so much is that I like how economy in this game looks, and will appreciate if its potential will have a solid realisation.

Best regards.
 
Last edited:

Piconi

Fashionista
Count
M&BWBWF&SNWVC
Best answers
0
Amazing effort and a very interesting concept!
I personally would like to see first what @Duh_TaleWorlds would think of this, as it needs an in-depth look from someone knowing the current mechanics well, in order to anticipate if the changes to improve could be implemented with little to no downsides.

 

heu3becteh

Recruit
M&BWBWF&SNWVC
Best answers
0
Amazing effort and a very interesting concept!
I personally would like to see first what @Duh_TaleWorlds would think of this, as it needs an in-depth look from someone knowing the current mechanics well, in order to anticipate if the changes to improve could be implemented with little to no downsides.
Thank you~
It would be great to see any of my suggestions helping to make the game even better.