Ok so there is a double effect based on stock levels. One is immediate, the other a short term average. So, the product of a workshop will pretty much always be cheaper in that town, because the average stock level will be higher. So while there is no arbitrary modifier, the effect in the end is the same.
FOUR separate supply/demand based modifiers, one completely arbitrary and the rest simulationist. I think you only need one, not four. But whatever, this is what we've got.
I'm guessing the reason they've added the hysteresis to the price model (meaning the price is slower to change in one direction) is because of the way caravans work vs. how the player and/or other NPCs interact with the market.
I'll probably botch the explanation of this, but here it goes:
When a caravan is deciding what to buy and where to go next (I think) it checks the price of a good in the town it's currently in against the prices of all the viable towns in the world and weighs it vs. other factors such as distance, buying/selling prices of other goods, and how long it's been since they've returned home to calculate a "Trade Score" for each town. So it uses the current price of a good in a town all the way across the world, even though the price of that good may change by the time it travels there.
Well, towns with local production of a good through workshops and villages will usually have a higher quantity of a particular item in stock at any given time compared to other towns. For instance, Argoron has a few fishing villages that supply it with fish, so it usually has a high quantity of fish in stock. So even if the player or another NPC comes and buys all the fish Argoron has in stock it will usually return to having a high quantity of fish within a few days or a week due to the constant local production.
If the price of fish were to skyrocket immediately when the stock was cleaned out, then any caravans who entered a town across the world within those few days would say, "Oh look, the good people of Argoron need fish and are offering a great price. I'd better go sell them some," and you'd have caravans racing off to sell Argoron fish. However, by the time they reach Argoron the fish will have returned to the market from the local village production and the price will have fallen again, meaning the profits will vanish. So this "stickiness" in the price is needed for when temporary dips in the quantity of goods happen from player/NPC intervention, otherwise the Trade Scores of caravans would be thrown off by this happening all over.
That's all just a guess as to the reason it works that way though. It makes sense to me. I really think the economy would be worse off without it.
By the way, what are the four modifiers you're counting? I'm only getting three.
One problem here is that prosperity seems to apply an offset or multiplier to prices. Currently it (probably) looks something like this:
I does indeed apply a flat multiplier of some value, and I agree that the prosperity multiplier has too great an effect on prices at either end of the extremes; it definitely could stand to be toned down a little bit. It's a little more favorable than the first graph you show though, because even at very high prosperity, the price of a high quantity item will usually still be lower than the price of the item in a low prosperity town with a low quantity of it. It only really breaks down at ultra low prosperity values in the range of like 0-500 or so.
You're second graph looks good to me though. The game already sorts out low, mid, and high prosperity values I believe (but not for pricing).
Since having very low prosperity breaks so many of the mechanics tied to prosperity, I think it might be wise to add a conditional statement to the game logic that defaults to using 1000 prosperity to calculate everything even if a town dips below that. So like:
If (Prosperity >= 1000)
Use normal prosperity number as variable
else
Use 1000 as prosperity variable
That would allow item prices, construction rates, money on hand, food consumption rates, etc. to be semi-normal even at very low prosperity values, allowing them to pull themselves out of the hole if they went past the point of no return. You would need to override the negative prosperity modifier to food to use the actual prosperity value though.
For towns to grow, the granary must be full. If growth > 0 and granary < full, growth = 0
I'm lukewarm about this idea. I'd like to see it in practice through a mod or something, but I don't think it would end up working the way you'd want it to. It would definitely slow down prosperity growth rates, but when a town reached it's maximum prosperity I think the food stock would still slowly chip away a little bit at a time as caravans and NPCs bought food and caused a minor food deficits for short periods. Then, because it's still at its limit where all of the food modifiers tend to cancel each other out, I have a feeling it would still just sit around 0 food in the granary give or take a little most of the time.
Maybe not though; it would be interesting to test.
Towns should consume as much food and other goods as they need, if the food is available. They should not over-consume like they do now, and only buy as much as they need.
They already do base their consumption of goods on the quantity available to some extent. At high quantity they consume marginally more (to a point), and at low quantity they consume marginally less (to a point). There are caps in either direction on how much they consume of any one type of good at a given prosperity level. Whether there is 3000 or 30000 grain in the market they will still consume as though there is only 3000 or less. I know what you're getting at though.
Good post overall.
Hope those informations can be usefull to you (i suck at theorycrafting :p)
Thanks for adding that context! 1.4.1 definitely has its fatal flaws!