Food Shortage

正在查看此主题的用户

Previously there were additional 10 food bonus for towns and 5 food bonus for castles named "lands around town" this is removed and a project is added for this, I see Argoron has not gotr this project so Argoron's expected change is not much even it has cheap foods. If we look formulas because demand is directly effected from prosperity if prosperity is low then town buys less food. This make surplus food less and town cannot grow if it lose its prosperity once. At least it cannot get surplus food bonus even food is cheap.
Something else to point out is that construction rates are driven primarily by prosperity for NPC owned towns (Prosperity x 0.01). It doesn't seem like they use the reserves system at all, and Engineering skills are generally low for NPC governors. So if Argoron's prosperity is 369, then their construction rate will be ~3.96 per day (if Workshops aren't completed). At that rate of construction, level 1 of the Orchards project will take ~216 days to complete, and that's if they are even working on it. To complete the other 2 levels it will take another ~840 days.

When towns fall to that low of prosperity they will never be able to complete projects to boost their food income because the construction rate falls with it.
 
Something else to point out is that construction rates are driven primarily by prosperity for NPC owned towns (Prosperity x 0.01). It doesn't seem like they use the reserves system at all, and Engineering skills are generally low for NPC governors. So if Argoron's prosperity is 369, then their construction rate will be ~3.96 per day (if Workshops aren't completed). At that rate of construction, level 1 of the Orchards project will take ~216 days to complete, and that's if they are even working on it. To complete the other 2 levels it will take another ~840 days.

When towns fall to that low of prosperity they will never be able to complete projects to boost their food income because the construction rate falls with it.

Yes I suggested (base 10) + (prosperity x 0.005) instead of (prosperity x 0.01) last week but for now it is not accepted. Current (prosperity x 0.01) formula is not a good formula it create so big difference between different settlements some settlements finish their projects so fast and some cannot finish in 100s days. Also workshops are OP currently.
 
Yes I suggested (base 10) + (prosperity x 0.005) instead of (prosperity x 0.01) last week but for now it is not accepted. Current (prosperity x 0.01) formula is not a good formula it create so big difference between different settlements some settlements finish their projects so fast and some cannot finish in 100s days. Also workshops are OP currently.
Good to know you're already working on it!

Also, where can I find these formulas for all the rest of items?:
I examined formula and every town spend (prosperity x 0.04) + if prospeirty > 3000 then ((prosperity - 3000) x 0.04) for buying fish every day.
Argoron's prosperity is 369 so Argoron will spend 369 x 0.04 = 14.76 for buying fish (fish cost is 5 so town buy 2 fish)

Similarly for buying grain they spend (prosperity x 0.12) + if prospeirty > 3000 then ((prosperity - 3000) x 0.03)
Argoron's prosperity is 369 so Argoron will spend 369 x 0.12 = 44.28 for buying grain (grain cost is 9 so town buy 4 grain)
 
One another addition which will make things better is AI currently does not care what is town's prosperity while determining ideal garrison size at fortifications. If we make AI to assign less garrisons in towns with less prospeirty and more garrison towns with high prosperity then there will be less food problem in towns with less prospeirty.

What is good for game balance is :
There can be food problems in towns with high prosperity even it sounds weird but if we create more problems in towns with less prosperity its hard to balance things.
 
Also, where can I find these formulas for all the rest of items?:

3oihE.png


You need to divide by 1000 to find demand ratio.
 
最后编辑:
I must say, that is extremely rare, for a dev to post actual code, even indie dev. Activision lawyers would be having a seizure. Self-published betas are always more fun.
 
One another addition which will make things better is AI currently does not care what is town's prosperity while determining ideal garrison size at fortifications. If we make AI to assign less garrisons in towns with less prospeirty and more garrison towns with high prosperity then there will be less food problem in towns with less prospeirty.

What is good for game balance is :
There can be food problems in towns with high prosperity even it sounds weird but if we create more problems in towns with less prosperity its hard to balance things.
That sounds like a much needed fix.

I've been trying to think of a function equation that would help with speeding up prosperity impact while also eventually slowing down once at a certain point so there isn't infinite growth. I realize in your equation that cut off is seemingly 3K, but it doesnt seem like their is a top level cap after that, so once a town hits 6000 prosperity it outgrows the equation (if x >3000 then (x-3000)) keeps things within the 0 - 3000 range for prosperity between 0 - 6000 but at 6001 we get 3001 and infinite growth from there. Wouldn't it be best if we put a cap on prosperity? Like what is the max prosperity before food bonus becomes unbalanced (hard question but you can no doubt figure it out)? Correct me if i'm mistaken or missing something!
 
最后编辑:
So on my current campaign (1.3 main branch) I've been given control of two towns to manage, I thought "wow great, I get to experience management of towns!"... oh boy, was I going for a ride.

The food shortage problem is quite an issue, both my towns are nowhere near battlefronts but every time a random noble visits the city, the food supply just tanks.

I think the main issue is connecting the food supply of the town to the tradable food that you can buy or sell. It makes sense for a town to be depleted of food during a lengthy siege or after a successful siege a invading army taking all the food but buying food in the market = less food on supply doesn't make much sense given that a town (or village) probably would only sell food surplus and not the food needed to.. you know... live.

This issue is also open for abuse, for example in order to help the issue of my towns, I just went to towns that belonged to other factions and buy all their food. You do this a few times and after a while, of no food, their towns just start losing militia and garrison which leaves it open for an easier siege.

I think more events could be added to take a toll on food supply like a disease event for example but removing the food supply from the food sold seems like the correct thing to do.

What do you guys think?

I would prefer the opposite approach: Make the town's food supply even more interactive with the food commodities available in the town market. If the market really responded appropriately to low food, the market should make the price increasingly prohibitively high. As in, if you visit a city and it has 500 grain at N price, the city vendors should only be willing to sell their last 100 grain at like 5*N price or something. As long as caravans and lords had some minimal market knowledge, they would buy some food, watch the price skyrocket, and then decide to stop buying at that city (and instead wait to buy more food at other cities where the price may not be so high). Also, if the price skyrockets, caravans would be more willing to travel to the city to sell it more food, which would bring the supply up. (This already happens, but the effect should be way stronger.)
 
最后编辑:
@drallim33 I examined your save file find a party going for raid to Tevea and see that raiding score is a big number. When going deeper I see it raiding Tevea is set to -1000000 because it is tutorial village and someone tried to disable raiding to there but they did it for all game unfortunately. Then I see this -1000000 is multiplied with another negative constant like -0.01 because party is starving and party's food variable is something negative (because we have a system party's food can be negative it is something like food debt, so when party buys food it will be paid and negative morale effect is gone). This secondary score should be capped to 0 even party has food debt. So in current situation two negative value (which one is 1000000) is multiplied and result is big positive number then they go raiding Tevea. It will be fixed with next hotfix.

Tomorrow I will continue working on starving towns problem.
 
最后编辑:
Here's a question, to those more knowledgeable than me, about fundamental premises behind this discussion: When a merchant (an AI noble, the player, a caravan, etc.) visits a city and considers buying and selling commodities, how many parties does the game recognize: 2 or 3? A 2 party system, presumably, would be: Party 1 = external vendor; Party 2 = the city itself, which buys, sells, and consumes commodities. A 3 party system, however, would recognize different incentives and interests for 1) the external visiting merchant, 2) the city's merchants, and the 3) city's consumers. It occurs to me that a 2 party system might create basic market dynamic issues, whereas a 3 party system would be more stable.

Consider a 3 party system with food: The city vendors, which have say 500 units of grain, would, at the moment of transaction with the external merchant buying or selling it grain, have to consider the price that the city consumers would be willing to pay for that same grain, which would be tied to the city's consumption rates. If the city vendor is willing to sell grain at a low price (call it N), that would only be because he cannot get a better price with the city consumers - because the city's consumption rate is much lower than 500 units (numbers made up for hypothetical example). But, once the player had bought 250 units of grain, leaving 250 in stock, the price the town consumers would be willing to pay the city vendors would go up a lot - maybe N*2 (if the 250 is much closer to the town's daily consumption rate). (The equation/relationship would of course be non linear - just making that up to illustrate the point.) And if this dynamically increasing price for city vendor - city consumer exchanges goes up by N*X, X would get higher and higher the lower the supply became. That higher price that the city vendor could command with the city consumer, then, would result in a higher price that the city vendor would be willing to pay, or charge for, facing the external vendor (e.g. the player).

All of the above would fall apart, though, if the city vendors were only interested in making $ on their commodities transactions, which they only made with external visiting merchants - and thus did not consider the profits they might be able to make selling those commodities to the city consumers, who might be willing to pay high prices as local supplies approached 0. Basically, if the city consumers were rational, they should always be willing to spend their way out of a food shortage.

(Spending extra money when food prices were high should also come from somewhere of course. e.g. Extra flat negative modifier to prosperity?)
 
But you are right this town has cheap food and less prosperity so it should grow fast at least it should grow fast until some point. Actually every town with less prosperity (like < 1500) should grow fast for the health & balance of game.

Problem is every town has 100-200-300-400 garrison inside. So they consume food too. It is fixed consumption and there is fixed food addition from villages. In terms lets assume these two balance themselves. We can take these two out of formula. However if prosperity is less surplus food become less and if prosperity drop 0 then there is no consumption at all no surplus food. Thats why current design has problems. If prosperity drops once it is so hard to get it back without projects.

What I see in first look is :
-Removing lands around castle / town make things worse because when town has low prosperity somehow surplus food should increase to balance things. Of course this is not only problem. Even food is cheap it is bought less because buying item formula(1) is directly effected by prosperity.
@mexxico, I don't know if you've already accounted for this or not, but as the game progresses the average party size increases as well, because clan ranks rise, stewardship levels grow, Noble Retinues and Royal Guards policies pass, the player adds new companion parties to the map, etc.

There are approximately 64 noble clans in the game. If each clan contributes an average of 2.5 vassal parties, that makes 160 total vassal parties on the map. If the average party size is 80 at the beginning of the game then there would be a total of 12800 troops max in the world at a time (not counting garrisons). If the average party size then increases to 120 after 10 years then that makes a maximum of 19200 troops in the world at a time. If that 6400 troop difference consumes 0.05 food a day that's an extra (6400*0.05) 320 food consumed per day by year 10. That's like adding an extra 3-4 medium sized towns to the map that don't contribute any production of goods and don't have any bound villages or orchards. Also, when a party is defeated I don't know if most of their food gets destroyed with them, but if it does that could add another unaccounted for food sink.

Maybe food production and/or consumption rates need to have a dynamic scaling element to account for these changes.

One thing that could maybe happen is that this number could decrease as the filled portion of the food stocks drops:

Food-Tooltip-140.png


So when the food stocks were half full it could drop by, say 15%, to -119. Then at a totally empty food stock the number could drop by 30% to -98. It would represent a form of "rationing" by the town population when food is low. That might give food stocks a chance to recover without completely nullifying the effect of starvation. Of course those numbers could be tuned to find a proper balance. That wouldn't prevent a town from growing over the limit to prosperity that its food supply can handle, but would help with the issue of NPCs buying all the food.

Now that you mention daily defaults I can`t hold myself back and have to ask - is it intended that they don`t have an effect while you have building projects going on?
I can answer this. Yes, it's intended. It gives towns a place to dump their unused construction points everyday after they have completed all of the construction projects they want. It's a very common mechanic in 4X type games.

OH MY GOD mexx.... if you have chimed in just a lil' bit earlier, it would have probably saved us of like 3 pages from this thread!!!! LOL
The daily defaults being overpowered was mentioned on the very first page though lol :smile:! The next three pages were all just discussion on the way the rest of the system works. I was trying to bring people up to speed with the current mechanics.

I generally don't think people appreciate how much thought has gone into the current system. It's not just a jumble of random ideas thrown together without a plan. Just because it still has issues doesn't mean it's fundamentally flawed and should be scrapped. Those issues can be overcome with less effort than it would take to totally overhaul the mechanic.

I think you're missing my point a little. Increasing production rates will not increase stock levels, because the towns will just grow bigger and end up consuming more. That's the problem. Arbitrarily tweaking production/consumption rates will not help.
Sure, you could accomplish it by doing it that way. But the stock levels absolutely can be increased by tweaking the consumption rates. Take tool consumption in a 3100 prosperity town for example. With the formula and multipliers mexxico provided we can see that they would spend [(3100 x 0.035) + ((3100 - 3000) x 0.07)] = 115 denars on tools each day. Here is the price of tools at low quantities in a ~3100 prosperity town:

3100-Prosperity-Tools-Price.png


So because 115 < 186 they won't buy/consume any tools that day (no idea if partial consumption is a thing. They might have 230 denars to spend on the second day). But as the stock of tools increases, the price will fall and eventually they will cost <115, so the town will consume one tool a day until the price rises back over 115. If the price falls to 57 denars a piece because of a large surplus of stock, then the town will buy/consume two tools a day because (57 x 2) = 114 is less than the 115 they are willing to spend on tools a day. If they tweak the multipliers for tools so a town is only willing to spend 80 denars a day on tools at 3100 prosperity, then the stock will accumulate until the price of tools falls below 80 and they begin consuming them (assuming caravans don't cart them away first). You can also raise the production rates of tools to increase the amount there are to spread around in the world. They've specifically set it up this way so they can easily tinker with the numbers.

Edit: After a little bit of testing, it does appear that towns will roll over their budget for an item to the next day if they don't have enough allocated for an item. For example, if a town of 3000 prosperity has a budget of 24 denars a day for wine, but the price of one bottle of wine is 90 denars, then the town will consume it after the 4th day.

Edit 2: There may be some bugs with consumption budgets though. I had a period where my town consumed a bottle of wine multiple days in a row when the budget should not have been able to afford that according to the formula. It went back to normal consumption eventually though. Might be worth investigating a bit more. It's also possible there's more to the consumption mechanic than the above equations.

When going deeper I see it raiding Tevea is set to -1000000 because it is tutorial village and someone tried to disable raiding to there but they did it for all game unfortunately.
@Badcritter Looks like you called it haha!
 
最后编辑:
I don't know if you've already accounted for this or not, but as the game progresses the average party size increases as well, because clan ranks rise, stewardship levels grow, Noble Retinues and Royal Guards policies pass, the player adds new companion parties to the map, etc.

...

Maybe food production and/or consumption rates need to have a dynamic scaling element to account for these changes.

I'd think that increasing food production at the village level would be the best solution. I.e. Villages would make more food if they could sell more food, as they would in a real market economy (and they could sell more food if cities demanded more food via higher in-city consumption + external party sales via the cities).

Now, medieval technology should limit this scaling increase to food production to a hard upper ceiling. That upper ceiling to total food production per village would, ultimately, cause upper limits to civilian population size (prosperity) and net military population, with increasingly large and numerous armies competing for food with larger cities and vice versa, food prices increasing, etc.

But isn't that what should happen in a medieval simulation? Food production technology limitations should eventually limit all populations if military causes (e.g. net raiding of villages across the continent, resulting in less than optimal village food production) don't limit population first.
 
There are really two incompatible things here. They really have to pick one or the other.

...

So you have two layers of economy mechanics, one that wants to do free market supply and demand simulation, and another that is arbitrarily setting prices based on board game style abstractions. And you end up with a complete mess where nothing makes any sense.

They need to pick one, either go full simulation and remove the prosperity and workshop-based price modifiers, so that prices are entirely supply and demand based. If stocks are high, prices are low, and vice versa, end of story. You lose direct control over things doing this since the system will auto adjust to even things out.

I could well be missing something; forgive me if so. But isn't 'prosperity' the dev's central method for channeling demand mechanics, basically? Some of the modifiers do complicate / problematize a free market economy for sure. But I think the prosperity based modifiers don't fall into that category - they are supposed to be ways of representing demand in aggregate, considering that it's not feasible to have thousands if individual buyers/sellers per city.
 
3100-Prosperity-Tools-Price.png


So because 115 < 186 they won't buy/consume any tools that day (no idea if partial consumption is a thing. They might have 230 denars to spend on the second day). But as the stock of tools increases, the price will fall and eventually they will cost <115, so the town will consume one tool a day until the price rises back over 115. If the price falls to 57 denars a piece because of a large surplus of stock, then the town will buy/consume two tools a day because (57 x 2) = 114 is less than the 115 they are willing to spend on tools a day. If they tweak the multipliers for tools so a town is only willing to spend 80 denars a day on tools at 3100 prosperity, then the stock will accumulate until the price of tools falls below 80 and they begin consuming them (assuming caravans don't cart them away first). You can also raise the production rates of tools to increase the amount there are to spread around in the world. They've specifically set it up this way so they can easily tinker with the numbers.


@Badcritter Looks like you called it haha!

Ok @Bannerman Man + @mexxico, so here's a more concrete way, based on the above excision, to ask my earlier questions about the premises of this discussion. If we're clear on this, hopefully that will help this thread make sense for the majority of us dummies :smile: :

When we say that the city consumes tools at the rate shown above, what does that mean?

Does that mean that the city consumers (in aggregate) are buying the tools from the city's vendors? If so, where does the city get its money to buy tools from the city's vendors? Does the city, in other words, have agency and money separate from the vendors with which the player interacts (and other AI merchants interact)? If not, is the city just buying tools from itself, such that the city consumer and the city vendor are amalgamated? Where does the money for that consumption come from, where does it go, etc.?

A breakdown of premises and questions:
  • I assume that the commodity stocks shown to the player belong to the city's vendors.
  • I assume that, when the city 'consumes' X quantity of any given commodity, that consumption decreases the stock of that same commodity with the vendor.
  • But I also assume that the $ shown in the upper left of the trade screen belongs to the city's vendors, not the city's consumers.
  • Thus, if the city is consuming commodities and thus removing stock from the city's vendors, what money is it using to do that? It is not using the city's own money shown to the player on the trade screen, correct?
  • If not, does the city consumer aggregate agent have an infinite pool of money invisible to the player - such that the cities consumption is impacted by prosperity (demand) and price (supply) generally but not specifically by a finite pool of $, correct?
  • If the city's consumers are buying commodities from the city's vendors, does that mean that the city vendor $ (shown in the top left corner of the trade screen) goes up when the city consumers buy things?
  • Or, does 'consumption' here just refer to a rate, proportionate to 'prosperity', by which the stocks of commodities carried by the city vendors passively goes down with no money changing hands? In other words, is there no distinction between city vendors and city consumers?
  • Or, is none of this true? Basically, is it just not the case that the city is looking out for its market interests in the way that I'm outlining above? Is the city just a place that primarily consumes stuff but will secondarily sell you stuff for gameplay reasons? Basically, is the city not even trying to make money from merchant transactions?
    • Basically, is it easiest to think of the city as a socialist commune that will buy/sell outside parties things based on what it needs to consume but is a) not trying to make $ from the outside and b) not composed of different competing market forces inside the city?
 
最后编辑:
When we say that the city consumes tools at the rate shown above, what does that mean?
That means the item is removed from the town's marketplace (i.e. the trade menu) on a 1:1 basis. From there it is essentially destroyed, and is gone from the game for good. Some items are converted to modifiers during this process that affect the Food or Prosperity balance.

For example, If a town consumes/buys/removes 100 grain from the market it is represented by the "Grain: +100" modifier on the Food tooltip. If the town consumes/buys/removes 1 fur then it is represented by "Goods from Market: +0.1" in the Prosperity tooltip (only horses, sumpter horses, and fur count toward this bonus). Those individual bonuses only last for one day, but the town will consume more the next day. However, if there are no goods of that type left in the market on the following day, or if the price is too high for the town to consume/buy/remove it (based on the formula mexxico provided), then the modifier is removed.

I don't know where the money to buy those items comes from. That's a question for mexxico or someone else. As far as I know, no money is actually spent, and it's only a representation of a transaction taking place.

Money does however change hands when the town is buying/selling goods from villager parties, trade caravans, or NPCs. If the town has no money to purchase goods then a villager party will enter a town then immediately exit and go back home without selling anything for the day. This is especially noticeable at very low prosperity where a town might only have a few hundred denars available a day to buy items.

Each day, towns generate or remove a portion of money from their trade menus until they reach a target value determined as (7 x Prosperity). That way, if a player sells something for the total amount of money a town has on hand it will still be able to buy goods from incoming villagers or caravans the follwing day without having to sell anything first. Likewise, if a player buys an expensive item then the money will slowly be removed from the town's trade menu until that target value is hit. So while they do not have infinite money for trade on any given day, they will automatically generate more over time if needed.

Basically caravans are the entities who are trying to make money through the buying and selling of goods. Towns are just the venue for them to do so as they serve as a source of demand. While villages serve as the source of supply. Caravans are the movers.

Prices will rise over time if there is a shortage of a particular good in a town, and these shortages are created when a town consumes various items each day.

Hopefully that's clear enough!
 
最后编辑:
@drallim33 I examined your save file find a party going for raid to Tevea and see that raiding score is a big number. When going deeper I see it raiding Tevea is set to -1000000 because it is tutorial village and someone tried to disable raiding to there but they did it for all game unfortunately. Then I see this -1000000 is multiplied with another negative constant like -0.01 because party is starving and party's food variable is something negative (because we have a system party's food can be negative it is something like food debt, so when party buys food it will be paid and negative morale effect is gone). This secondary score should be capped to 0 even party has food debt. So in current situation two negative value (which one is 1000000) is multiplied and result is big positive number then they go raiding Tevea. It will be fixed with next hotfix.

Tomorrow I will continue working on starving towns problem.

Mystery of Tevea black hole solved..!!
 
Thanks Bannerman man! That makes sense. So no $ changes hands when a city consumes a commodity. And prosperity impacts the price # at which the city will consume something, which impacts supply, which impacts price in a cyclically rebalancing system.
 
The problem with the prosperity based demand system above: the city should have a certain inelastic demand for food that makes it willing to “consume” food even when the price is high regardless of prosperity. And concurrently, the price of food should be dynamically sensitive to supply - such that when supply gets low, even in the middle of a caravan visit , the price gets very high - high enough to scare off further caravan purchases.

Taken together, these two measures would protect the town from predatory merchants buying up all the food and driving the food death spiral. Actually, external caravans / parties would become an asset rather than a liability in terms of a city's food needs; they would sell food to cities that needed it the most (because those cities would see very high prices for food when their shortages were most acute), not just to rich cities where the prices for everything tend to be higher.

Now, this willingness of the town to consume market food even at high prices should cost something - and if consumption is not measured via $ changing hands, then the cost needs to come from somewhere else. Maybe an additional negative prosperity modifier proportional to consumption at higher than standard food prices?
 
最后编辑:
后退
顶部 底部