Formula for items prices

正在查看此主题的用户

  Does anyone know formula by which base prices are calculated? It would be very helpful, it's boring and unreliable to balance new items' prices "by hand".
 
The base price is defined in your module, which is I believe for the buying price if you and the merchant both have 0 trading.
Look at get_trade_penalty, where the player's relation to towns and their efects on prices are defined. The two triggers (buy/sell) both above and below it deals with the economic effect of the player's purchase.
If you're looking for item modifier prices, then those are hard-coded, look on strategiwiki for the percentages.
 
It's actually a lot more complex than that, I found.

I'll talk about that later, when I show the code I used to rebuild the entire economy.  Basically, what you see in the merchant code is just the tip of a very large iceberg, especially for trade goods.
 
Trade goods and their effect on the economy are obviously more complex, what with consumption and production all factored in. This is simply the price modifier portion, and the effect of the player's relationship are described in trade_get_penalty. I'm sure there's more to it, especially with each town's dependence on the availability of certain goods to make an item available, but the original poster simply asked for a way of balancing prices, and since I don't see trade goods being "balanced" by hand I assume this is for other equipment. This base price is usually for imod_plain, which was why I also gave the link to those table on strategywiki, which should have based on experimental data.
 
Oh, sorry, wasn't trying to imply that what you're saying wouldn't work  :oops: 

It will, and that's a good immediate solution.  It's just that there's a lot more going on under the hood.
 
Somebody 说:
The base price is defined in your module, which is I believe for the buying price if you and the merchant both have 0 trading.
Look at get_trade_penalty, where the player's relation to towns and their efects on prices are defined. The two triggers (buy/sell) both above and below it deals with the economic effect of the player's purchase.
If you're looking for item modifier prices, then those are hard-coded, look on strategiwiki for the percentages.
  Thank you. But I meant not exactly that (if I understand you right). Sorry, maybe I wasn't able to express my question correctly.
  For example, some items from module_items

  bastard_sword_a - 294
  bastard_sword_b - 526
  one_handed_war_axe_a - 87
  one_handed_battle_axe_a - 142

  unlikely if prices like 294, 526, 87, 142 were set by hand, more likely they are autocalculated by some formula, based on item type, stats, weight, difficulty, etc  When implementing new weapon or armor, for defining price I usually find similar item which is slightly better and another similar item which is slightly worse. Price of new item is somewhere between. But I am sure there is formula (maybe with exceptions for some items).
  Can I ask how are you setting prices for custom items?
 
I arbitrarily increase/decrease price based on performance compared to a native item in the same class. In most cases, armors are just reskins of a base model. If the texture is fancy, I just call it "Ornamental" and increase the price more, otherwise I try to judge by their functionality and balance accordingly.

The game isn't meant to be balanced, and there is no "formula" per se, except that stats and how often they appear on troops usually determine the price, with different prices for certain exotic faction items. If you look at Native footwear, you'll see that ankle_boots, khergit_leather_boots, and sarranid_boots_b all have weight 1 and foot armor 12, but they have different prices. Otherwise, there's no discernible pattern. Unless you plot it into excel (weight factor are ignored, although you could have a separate graph), from wrapping boots to black greaves.
grapha.png

By the time they can afford the armor class, the price becomes neglible anyways as most people just look for stats and won't care too much about the price difference between your items and the one in native.
 
Oh, yeah... on that area, it appears that Native was first balanced using a formula including weapon length and other factors, but the current "balance", including price, is pretty noisy, with a lot of differentials based on things that were added over time. 

Not being satisfied with that, I just started all over again, and got rid of Native's "good/bad" code, since the difference in price vs. performance for a "masterwork", etc. weapon bears no reasonable relationship with its actual, in-game performance at all.
 
后退
顶部 底部