Linking prosperity with food production creates an inescapable downward spiral for fiefs

Users who are viewing this thread

So, where does grain come from? ... (etc) ...

Great write up.

So all villages don't produce something close to a subsistence level of their own food? or is it just Towns/Castles that require imports? I ask because I could only see a separate Food Stocks property in objects that inherit from Fief.

I hadn't noticed the Consumption Budget you described; is implemented via the DefaultSettlementFoodModel class or somewhere else?
 
There really needs to be a way to keep a separate stockpile of food for your garrisons, at minimum. Really though, towns should just not sell their food to the point that they can't survive- that's a bit absurd. The whole market-tied-to-food system doesn't end up making much sense at all, especially not on the short timescales that it ends up impacting. As it stands a high prosperity town that doesn't recieve new food for like three days is already in dire straits.
 
The whole economy of Bannerlord is some the dumbest **** I've ever seen in a video game. If wish they would turn it off food/garrison and anything else that causes trouble and wait until they can hire a different team to do economy stuff, after everything else is done.
 
Great write up.

So all villages don't produce something close to a subsistence level of their own food? or is it just Towns/Castles that require imports? I ask because I could only see a separate Food Stocks property in objects that inherit from Fief.

I hadn't noticed the Consumption Budget you described; is implemented via the DefaultSettlementFoodModel class or somewhere else?
Villages do not seem to consume any goods of any kind. They appear to get a flat +1 per day growth rate (called 'Hearths' for them) for all the days they aren't sacked. Castles only get the passive modifiers from 'land around settlements,' constructed buildings, and the flat bonuses from each village which can be 4/8/12 depending on what the 'Hearth' value is (12 is max). Neither 'use' any items.

Subsistence levels seems to be at the bare minimum to break even for most towns that don't regularly get visited by Grain Villages by mid game. When villagers go to market, they bring about half of their main export from the village's inventory as well as 12-17 grain that seems to be generated from nowhere. This amount of grain does not scale with the town's prosperity. This means towns without grain villages nearby will get 50-100 grain every few days, where those with 2 or more grain villages nearby will get 250-400 grain every few days. Villagers always sell their whole inventory when they reach the market, regardless of prices. The money they earn seems to disappear afterwards I think.

Honestly, I haven't done much sifting through the code. Most of this is empirical evidence from in-game testing. If you own a town in game though, you can go to the "Manage Town" menu, then directly beneath the "Manage" header is a small gray fruit basket that you can hover over for a look at all the goods (including non-food) the town is consuming each day. Perhaps you can see where these values are passed from in the code to work backwards?

The 'consumption value' of food items seem to follow a logarithmic path (based on quantities available) with diminishing returns at high quantities. Prosperity is a multiplier to this function.

All goods are consumed the moment the day 'ticks' over for the town. Interestingly, not all towns tick over at the same time of day, it varies and can seemingly be any time of day. Individual towns always tick over at the same time though. You can get a rough estimate of the "consumption budget" by ensuring town inventories have equal numbers of certain food items as the day ticks over then hover over the Food tooltip to see how much of each item was consumed that day (make sure villagers and caravans don't sneak in and buy/sell right before the day ticks to throw off quantities).

Prosperity can still increase in towns without a food surplus through the "Aqueducts" and "Goods From Market" modifiers. Haven't been able to decode the "Goods From Market" modifier yet other than it's mostly tied to non-food goods and horses.

Edit: Here's the difference in what a grain villager and non-grain villager bring to market.
Grain-Villager-Copy.png
Non-Grain-Villager-Copy.png
 
Last edited:
Everything someone would associate with a rich town works the other way round in Bannerlord, no body can understand what's happening, why and how to fix it.
I am quite sure that I understand the main problem and propose a valid fix for it though.
I believe prosperity should decrease when the food is decreasing. Right now the death waves happen because:
1. Prosperity continues to increase even while food amount in storage decreases, making it decrease even faster. So even if you will just increase food storage amount - it will not help right away. Prosperity should be increased only with positive food balance. Or maybe even food shortage should be added to calculation like now, but not the food shortage below 0 (when starving), but food shortage even when town still has something in storage.
2. Food storage is small and lasts a couple of days. It does not bring much stability. I guess it should be around 10 times larger.
3. Prices are jumping faster when difference between current and stable price is higher (maybe that change follows some exponential equation too, see the topic about price formulation), so if some trader brings huge amounts of food - price drops faster than it will rise back after the food is eaten.
4. Food is eaten at much faster pace when it is available in larger amounts (overconsumption). And it even brings 10 times less prosperity.
With 1 and 2 it should already shift the food-prosperity waves equilibrium towards full granary, without garrison dying.
Maybe it is written the hard way to read. Basically...

The core of the problem is that prosperity can decrease only with starvation, but prosperity fluctuations are natural and inevitable process. So your garrison inevitably dies.
There should be larger food storage to give some time to solve the food problem and prosperity should be able to decrease before starvation to make it possible.

I did write much more details, but it seems that it only frightens people from reading it.
I again ask for some feedback to that. My post just vanish in others about bandits and suggestions to remove garrison starvation as a thing from the game.

One way would be to hand over your town to the enemy and crush prosperity down by starving them all to death for some years. Seems realistic but lets be honest: Nobody except people like those discussing here will understand it and it's frustrating for the regular/casual player. A fix is inevitable.
Well, you can do crazy things to decrease prosperity, but obviously that is not intended game design (:

Garrison losses from starvation should happen only when soldiers consume more food that it come into city. In this case food income is greater tahn garrison needs so troops are fed but popualtion suffer(prosperity go down)
...
Troops would starve only in sieges where food is cut off and food reserves are gone.
You will always have some food from "lands around" and "villages" to feed quite significant garrison. I can spell that another way - turn off the garrison starvation unless it is siege. There is already a mod for that.
But I do not think it is a good solution to throw features out of the game when some simple tuning is needed.

Prosperity is a separate concern, likely involving wealth and civil infrastructure and systems. As I wrote above though, I don't think "Prosperity" makes a good game resource as described here. That doesn't mean "Prosperity'" would make a bad reporting variable to the player (that's the game dressing, not the model).
The wealth and civil systems can be described as a Gold value (i would think); that is a combination of capital goods (inventory on-hand in the market, buildings, etc.), financial capital (i.e. gold coins in the treasury), and human capital (the size of the working population). I didnt make that up; that's classical economics 101.
Are villages using Gold to conduct their transactions? They seem to have a magical 1,000 Gold in their markets. When I buy/hire a troop unit who gets paid? The trooper? Is it a signing bonus or am I paying the settlement? for his gear?
Are cities using Gold? Their markets normally have considerably more.
That said, it isnt clear the markets are actually in any way related to the wealth of the settlement.
I think these questions are a good fit for another topic.
That said, it isnt clear the markets are actually in any way related to the wealth of the settlement.
In that topic there is information about price formulation.
Price depends on prosperity and stock amount. So market and prosperity are related closely in the game.

If you look at the tooltip of a healthy settlement you'll notice one number that usually dwarfs the others: +Grain. This number is actually how much of that item the settlement consumes daily from the town's Trade Menu. The breakdown of the foods consumed is based on a Consumption Budget (invisible to the player) and overall Prosperity (see mexxico's post here). The consumption of grain is 2-3x higher than the next best food item, fish, and it only gets worse from there (that is, 500 grain may give a high prosperity town a +90 food modifier, while 500 fish will only give +35 or so). High consumpetion actually adds to a town's food stores. The higher the settlement prosperity the more weigh grain holds relative to the other modifiers, especially because the passive modifiers don't scale with town Prosperity.
I really do not understand why the cap for grain consumption is so much higher than for other food. Shouldn't it be around the same? Well, I can understand you can not be feed by wine or oil alone, but fish is good enough to eat it in big quantities (:
Oh, and yeah, 500 fish and 500 grain give different consumption values not only because they have different logarithmic functions for consumtion - the have a cap too. So 1000 olives and 10000 olives will give pretty much the same around 20 olives. And grain would be capped at around 130 at the same time.

This makes towns such as Zeonica or Sanela the cool kids on the block because they have multiple villages bringing huge amounts of grain to them very rapidly. The further you get from these grain producing centers of the map the less prosperous towns are (poor Sturgia) because caravans simply don't place enough value distributing this grain to the towns far from the grain producing centers, and the grain concentrates in certain towns it's 'made in.' This leads to a prosperity runaway effect as, more grain available => higher Food Surplus properity bonus => greater prosperity growth => higher grain consumption => even greater properity bonus, and so on (other foods have an effect to a lesser extent). Places that have been besieged only really start to recover once grain villagers start showing up with bunches of 120, and those who have none nearby simply don't recover fully naturally (fish won't quite cut it; anything else isn't even close).
That is an issue (I have already described somewhere) which leads to faster reaching the next prosperity-food garrison death wave, but not the core of the issue - you will have the moment prosperity will decrease anyway. And that momen should be able to pass without the garrison dying.
 
I'd like to throw my 2 cents out there about the Prosperity/Food Production system.

I think the key issue here is that there is one trade commodity that is leagues above the rest: GRAIN.
There seems to be a disconnect between grain's value as a commodity and it's impact to a settlement.

Quick recap first; when you look at a town's Food Production tooltip you'll see all the numbers that add and subtract together to get the 'Expected Change' in a town's food supply. Prosperity is the main negative to this number with 2% of total Properity being subtracted from the Food Production and a variety modifiers on the positive side, such as: food items based on a consumption budget, passive bonuses from operational villages, town improvments, and a flat passive for 'lands around settlement.'

If you look at the tooltip of a healthy settlement you'll notice one number that usually dwarfs the others: +Grain. This number is actually how much of that item the settlement consumes daily from the town's Trade Menu. The breakdown of the foods consumed is based on a Consumption Budget (invisible to the player) and overall Prosperity (see mexxico's post here). The consumption of grain is 2-3x higher than the next best food item, fish, and it only gets worse from there (that is, 500 grain may give a high prosperity town a +90 food modifier, while 500 fish will only give +35 or so). High consumpetion actually adds to a town's food stores. The higher the settlement prosperity the more weigh grain holds relative to the other modifiers, especially because the passive modifiers don't scale with town Prosperity.

So, where does grain come from? Well, caravan's trade up to a few dozen per trip if you are lucky (many times none at all), and villagers will bring roughly 12-17 with them to market when they bring other goods, except in the case of Grain Villages, which bring 120-150 most times. This effectively makes Grain Villages 8-10x more valuable than other villages for the purposes of Food Production. When your food stocks hit the max cap, then the Expected Change is added to Prosperity as a bonus modifier at a rate of 10% of the value (decimal truncated) which is called Food Surplus.

This makes towns such as Zeonica or Sanela the cool kids on the block because they have multiple villages bringing huge amounts of grain to them very rapidly. The further you get from these grain producing centers of the map the less prosperous towns are (poor Sturgia) because caravans simply don't place enough value distributing this grain to the towns far from the grain producing centers, and the grain concentrates in certain towns it's 'made in.' This leads to a prosperity runaway effect as, more grain available => higher Food Surplus properity bonus => greater prosperity growth => higher grain consumption => even greater properity bonus, and so on (other foods have an effect to a lesser extent). Places that have been besieged only really start to recover once grain villagers start showing up with bunches of 120, and those who have none nearby simply don't recover fully naturally (fish won't quite cut it; anything else isn't even close).

So, I think in order to balance this either: the food consumption budget needs to be reworked to place less importance on grain and more on other food items, or the grain villages need to be redistributed more evenly to reach towns which currently don't get visited by them, or non-grain villages need to carry more grain with them to the market with the other items, or the caravans need to put much higher value in getting grain out to towns without at least a few hundred in stock (could be others too or a combination of the above).

TL;DR: Grain is the golden goose of Calradia. It's disproportionately beneficial to towns compared to other food items, those with it get richer, those without do not. The citizens of the kingdom are picky eaters who scoff at fruits, fish, and meats and will only eat Wonder Bread with the crust cut off.

Sorry I for the wall of text haha. I actually have more to point out if anyone is interested, but I decided to cut it off because it was getting long.

Great post. I also noticed the situation with grain-producing villages contribute waaaayyy more than others, but I wasn't nearly as analytical as you.

The distribution of villages definitely needs another pass. Some towns are just much worse off than other due to their villages production. For example, among my current fiefs, Charas has only 2 villages, 1 olive and 1 horse, and as a result has essentially no food storage. Food production is nearly always negative, with brief period of positive (from caravans?? I have no idea why) to build up some food store, then it soon drops back to 0 again. Nothing I do matters. I tried constantly patrol around town to ward off bandit, the garrison is tiny with 50-ish man, and that cause the Security rating to drop (what does this do anyway?). I build the Lime Kilns, Granary to max level, I put default action to Irrigation when the town is not building anything, I pushed for all the Food-producing policies to get passed, but the Bonuses are all super tiny (+1, +2...) compare to actual consumption, so nothing feels like it matters. Now, I just kind of leave it alone, and occasionally visit to drop off some looters and peasants to restore the garrison, I'm not going to keep them anyway.

The nearby Jaculan, meanwhile, has FOUR villages, and while none of them produce grain, still contribute a constant food surplus of +20-30ish. Galend has three villages and has a smaller surplus and can occasionally dip into the negative due to banditry, but still has a healthy food store. In a real world setting, there would surely be a constant flow of food coming from Jaculan to Charas, I'm not sure that is happening in game. Also why is straightforward famine relief not a thing in game? Manually selling tons of food to the market seems to work, but again the effect is kind of opaque so I'm not sure. I have enough food for months, I don't really need the money, I just kinda want to straight up put food in storage, and even pay the merchant to direct food from Jaculan to Charas, I'm their ruler anyways and that is the first thing pop up in my head when I see a town starving.

I mean you can share food with starving army to gain influence but can't share food with starving civilians???
 
I think these questions are a good fit for another topic.

I read your post. Where in the source is the code that supports all of that?

I don't think prosperity is a synonym for demand. Many commodities would have higher demand in low prosperity environments.

Price depends on prosperity and stock amount.

Where is that located? Price should depend on supply and demand.



The game knows the demand for each commodity, because it's recording the transactions. The model already knows volume and price of transactions.

If there is an "all other goods, but food" consumption budget, I'd love to see it in the source.
 
Last edited:
I'd like to throw my 2 cents out there about the Prosperity/Food Production system.

I think the key issue here is that there is one trade commodity that is leagues above the rest: GRAIN.
There seems to be a disconnect between grain's value as a commodity and it's impact to a settlement.

Quick recap first; when you look at a town's Food Production tooltip you'll see all the numbers that add and subtract together to get the 'Expected Change' in a town's food supply. Prosperity is the main negative to this number with 2% of total Properity being subtracted from the Food Production and a variety modifiers on the positive side, such as: food items based on a consumption budget, passive bonuses from operational villages, town improvments, and a flat passive for 'lands around settlement.'

If you look at the tooltip of a healthy settlement you'll notice one number that usually dwarfs the others: +Grain. This number is actually how much of that item the settlement consumes daily from the town's Trade Menu. The breakdown of the foods consumed is based on a Consumption Budget (invisible to the player) and overall Prosperity (see mexxico's post here). The consumption of grain is 2-3x higher than the next best food item, fish, and it only gets worse from there (that is, 500 grain may give a high prosperity town a +90 food modifier, while 500 fish will only give +35 or so). High consumpetion actually adds to a town's food stores. The higher the settlement prosperity the more weigh grain holds relative to the other modifiers, especially because the passive modifiers don't scale with town Prosperity.

So, where does grain come from? Well, caravan's trade up to a few dozen per trip if you are lucky (many times none at all), and villagers will bring roughly 12-17 with them to market when they bring other goods, except in the case of Grain Villages, which bring 120-150 most times. This effectively makes Grain Villages 8-10x more valuable than other villages for the purposes of Food Production. When your food stocks hit the max cap, then the Expected Change is added to Prosperity as a bonus modifier at a rate of 10% of the value (decimal truncated) which is called Food Surplus.

This makes towns such as Zeonica or Sanela the cool kids on the block because they have multiple villages bringing huge amounts of grain to them very rapidly. The further you get from these grain producing centers of the map the less prosperous towns are (poor Sturgia) because caravans simply don't place enough value distributing this grain to the towns far from the grain producing centers, and the grain concentrates in certain towns it's 'made in.' This leads to a prosperity runaway effect as, more grain available => higher Food Surplus properity bonus => greater prosperity growth => higher grain consumption => even greater properity bonus, and so on (other foods have an effect to a lesser extent). Places that have been besieged only really start to recover once grain villagers start showing up with bunches of 120, and those who have none nearby simply don't recover fully naturally (fish won't quite cut it; anything else isn't even close).

So, I think in order to balance this either: the food consumption budget needs to be reworked to place less importance on grain and more on other food items, or the grain villages need to be redistributed more evenly to reach towns which currently don't get visited by them, or non-grain villages need to carry more grain with them to the market with the other items, or the caravans need to put much higher value in getting grain out to towns without at least a few hundred in stock (could be others too or a combination of the above).

TL;DR: Grain is the golden goose of Calradia. It's disproportionately beneficial to towns compared to other food items, those with it get richer, those without do not. The citizens of the kingdom are picky eaters who scoff at fruits, fish, and meats and will only eat Wonder Bread with the crust cut off.

Sorry I for the wall of text haha. I actually have more to point out if anyone is interested, but I decided to cut it off because it was getting long.


One thing to add is that all villages produce grain, not only grain villages.
The game shows You the main product of the village but there are always other products. If You visit a village You'll see that they produce more things.
For example I have Pen Cannoc with 3 villages mainly producing clay. All other nearby villages are hostile but still I'm swimming in grain. This grain comes from my villages only and they are not grain villages.
 
For example I have Pen Cannoc with 3 villages mainly producing clay. All other nearby villages are hostile but still I'm swimming in grain. This grain comes from my villages only and they are not grain villages.

It appears that when a village sends a mobile party to the town, it magically adds a stack of grain to the inventory. That party is apparently forging, because they dont consume any food while mobile.
 
I am quite sure that I understand the main problem and propose a valid fix for it though.

Maybe it is written the hard way to read. Basically...

The core of the problem is that prosperity can decrease only with starvation, but prosperity fluctuations are natural and inevitable process. So your garrison inevitably dies.
There should be larger food storage to give some time to solve the food problem and prosperity should be able to decrease before starvation to make it possible.

I did write much more details, but it seems that it only frightens people from reading it.
I again ask for some feedback to that. My post just vanish in others about bandits and suggestions to remove garrison starvation as a thing from the game.


Well, you can do crazy things to decrease prosperity, but obviously that is not intended game design (:


You will always have some food from "lands around" and "villages" to feed quite significant garrison. I can spell that another way - turn off the garrison starvation unless it is siege. There is already a mod for that.
But I do not think it is a good solution to throw features out of the game when some simple tuning is needed.


I think these questions are a good fit for another topic.

In that topic there is information about price formulation.
Price depends on prosperity and stock amount. So market and prosperity are related closely in the game.


I really do not understand why the cap for grain consumption is so much higher than for other food. Shouldn't it be around the same? Well, I can understand you can not be feed by wine or oil alone, but fish is good enough to eat it in big quantities (:
Oh, and yeah, 500 fish and 500 grain give different consumption values not only because they have different logarithmic functions for consumtion - the have a cap too. So 1000 olives and 10000 olives will give pretty much the same around 20 olives. And grain would be capped at around 130 at the same time.


That is an issue (I have already described somewhere) which leads to faster reaching the next prosperity-food garrison death wave, but not the core of the issue - you will have the moment prosperity will decrease anyway. And that momen should be able to pass without the garrison dying.
Since a developer announced a first attempt to fix it and offered to send in save games I stopped thinking about that for now. I will wait for 1.3.0 and give feedback if something has improved over time. If not, we can point fingers to your excellent studies.
 
I read your post. Where in the source is the code that supports all of that?
Thank you. It will make more sense to reply there, I guess.
I did not research the source code, my assumptions are based on the empiric data, experiments/measurements inside the game.
I don't think prosperity is a synonym for demand. Many commodities would have higher demand in low prosperity environments.
I absolutely agree that prosperity should not be a synonym to demand.
But I did not notice these commidities though. Three cities I did study with different prosperity had almost linear dependance between stable price and prosperity. At least for the goods I have experimented with.
The game knows the demand for each commodity, because it's recording the transactions. The model already knows volume and price of transactions.
In my experiments I did get that price is being shifted on the hyperbolic function by both "short-term" (when you sell and purchase) and "long-term" (when the date changes and price shifts towards stable) changes. And you could say that demand is related to these "long-term" changes. And they seem to depend on prosperity.
Since a developer announced a first attempt to fix it and offered to send in save games I stopped thinking about that for now. I will wait for 1.3.0 and give feedback if something has improved over time. If not, we can point fingers to your excellent studies.
Thank you~
 
It's ok for those who want to enjoy without contributing here. I decided to put pressure on Taleworlds but also to stay (relatively) calm, give objective feedback and reports and trigger improvements in the games core. That's the only way we can make big progress with this Early Access and prevent the game from becoming a modded mess.

Don't get me wrong: I love mods and I want to make my own or take part in someone elses project (something like Persistent World/Feudal World butte better). But I think it's not the right time and strategy to fill the game with mods if you are a hardcore fan. I want this game to be ****ing awesome without mods. Newbies should enjoy it without mods and stay in the community. At the moment I'm shocked how fast the player base dropped, that's not good. Looking at the charts, Bannerlord looses 50.000 active Steam players every week!
 
"I want to work on the native game and improve it."

That's the number 1 reason people make and use mods ^_^

And that’s great for finished products. The point is at this stage, it takes away from the development of the actual game to plug in a bunch of mods.

Hard to report bugs properly when you are sure what’s causing them
 
Maybe it is written the hard way to read. Basically...

You have identified well the key problem in the system, or atleast one that if fixed should give the whole system far greater stability.
So I will restate your point with the hopes of better expressing it.

If a city is producing less food than it consumes you will see a negative rate say -10 this means you are in a food shortage producing not enough food for daily consumption demands.

Towns have a food stockpile or granary that has a capacity ranging from 100-160 . This capacity fills up from 0 during times of food surplus.

After being in a food shortage for a number of turns the granary stockpile will hit zero putting the town in a state of starvation as long as the shortage persists.

As prosperity increases so does food consumption.

Currently prosperity only begins to fall when you are already in a state of starvation rather than when the shortage first begins. This results in the granary stores serving the opposite function to their intended purpose. Rather than being a buffer against starvation during food shortages, because prosperity continues to climb while the granary is being depleted it instead has the function of increasing the size of the shortage and hence eventual starvation.

So if instead prosperity fell as soon as a shortage began this would mean the granary would operate correctly as a buffer providing a number of turns for prosperity to fall reducing the size of the shortage. If during these turns provided by the granary stores food supply can meet demand or exceed it into a surplus then starvation will have been avoided. For further balancing: increasing the size of the granary will increase the tolerance to food supply shocks
 
Back
Top Bottom