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?