Recent content by heu3becteh

  1. heu3becteh

    SP - Economy balance prosperity to avoid food shortage

    That is done in my mod, you can check it out:
  2. heu3becteh

    SP - Economy main income should be taxes. not battle loot.

    I believe that the gear costs should be dictated by supply and demand too (and the base cost of components like iron and wood, effort made during production).
    Many players will complain when that is a case though.
  3. heu3becteh

    SP - Economy Economy suggestions

    By the way you can try to tune some aspects of economy in my mod:
    For example, the cost of loot is reduced if there is too much of it and the town has low demand for equipment.
  4. heu3becteh

    SP - Economy Tools to balance food and prosperity. Detailed suggestions for food shortages.

    For me all the issues regarding food, prosperity and starvation are fixed by my mod since June.
    The only problem now is that garrison starvation during sieges is way too underrated.
  5. heu3becteh

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

    After installing this mod, I have to say, this mod is great, it perfectly solves the problem of prosperity and food, for which I would like to praise it greatly. The only shortcoming is that the price of the equipment is so low that the player’s loot can’t be sold for much and the equipment costs very little, but the salary will be relatively difficult to pay. Fortunately, I can change the equipment demand a little higher in the config.xml file. Finally, I recommend this mod.
    Thank you~

    Equipment prices are the most complicated, I hope changing their category demand helps enough.
  6. heu3becteh

    SP - Economy Disable garrison food consumption until you fix it, or set it to a constant of -1

    But it's not a good idea to make garrisons completely immune to starvation. Minus 1 is almost the same to 0 in this case.
    I understand that you want fast and simple solution.
    But this will lead to other problems. F.e. during sieges garrisons won't ever starve without food. You may have unlimited garrisons, which is bad for balance too. Etc.
    So it's just exchanging one problem on another.
    Yep. I am playing with my mod and something irregular should happen for city to starve.
    The problem now is that town lose laughable amount of troops under siege. Even while having -50 food shortage and zero food stocks town loses around 8/300 militia and 8/300 garrison troops per day. The siege needs to continue for more than two weeks after starvation did start to decrease the garrison by half.
  7. heu3becteh

    SP - Economy Tie prosperity to food supply change rate instead of food supply

    Hence prosperity should already start to drop when daily food supply change is negative (not only when current food stocks are at zero), creating a much shorter balancing cycle between prosperity and food, without the need to go through a painful famine every couple of weeks.
    That is something I suggest for quite a long time.
    You can check out my mod making that and some other economy-related changes to see how it is working.
  8. heu3becteh

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

    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.
  9. heu3becteh

    SP Top Suggestions

    • Thread title: Supply and Demand self-balancing economy and how it does work now
    • Category: Economy
    • Why should it be featured in this thread: It addresses the features being changed now and issues persistent for a continuous time with sample changes (mod on nexus) made according to the suggestions.
    • Brief summary (maximum 100 words): In this thread current base economy mechanics are described with a specific ways to improve them without too significant changes (and some more complex changes discussed).
    • Does it meet Top Activity criteria? Nope, 516 views, 13 replies (7 of them by me).
  10. heu3becteh

    SP Native Economy Tweak

    A self balancing economy sounds great.
    I think it is pretty much included in the game core already (:
    There are just some strange behaviours like prosperity-starvation waves, which seem not too hard to fix for me. With a simple changes economy looks quite reasonable for me.
  11. heu3becteh

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

    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.
  12. heu3becteh

    SP Native Economy Tweak

    ------------ Economy Tweak mod by heu3becteh ------------ You can download the modification here: https://www.nexusmods.com/mountandblade2bannerlord/mods/1828 While I like economy the in game, there is still room for improvements to realize its potential. I have tried to make economy in the...
  13. heu3becteh

    OSP Kit [Release] Mod Template for Visual Studio (Automatically configs, adds references and more!)

    Thank you, that is useful~

    I do not think that needs improvement, it works well, but if it would be modified, I guess some templates to work with xml-files could be added, to copy them like SubModule.xml.
  14. heu3becteh

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

    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.
  15. heu3becteh

    SP - Economy Banditry based on prosperity (lack of) and Refugee villagers

    Security value for now seems to be 100 almost all the time for me, maybe some more depth will be added to it, and that value will influence bandit spawn and other "criminal stuff"...
    For now it looks like bandits are spawn around everywhere, in war-depraved regions it is more noticeable, maybe primarily because nobody cleans them up?
Back
Top Bottom