Sneaky economy bug in major WB mods

Users who are viewing this thread

Mad Vader

Duhpressed
Duke
Hi all,

I spent days trying to figure this out, and I'd like to share this so others don't have to.
This bug may affect mods that use different party slots, particularly slot_town_trade_good_prices_begin.
The symptoms are inflated prices causing shortages of goods in stores, and also poor prosperity.
In my case, I had two towns with overinflated prices for no good reason, causing inflation everywhere else through caravans.

The bug is in update_trade_good_price_for_party (fix in bold):

#Price of manufactured goods drift towards primary raw material
(try_begin),
(item_get_slot, ":raw_material", ":cur_good", slot_item_primary_raw_material),
(neq, ":raw_material", 0), #fix
(store_sub, ":raw_material_price_slot", ":raw_material", trade_goods_begin),
(val_add, ":raw_material_price_slot", slot_town_trade_good_prices_begin),
(party_get_slot, ":raw_material_price", ":center_no", ":raw_material_price_slot"),
(gt, ":raw_material_price", ":new_price"),
(store_sub, ":raw_material_boost", ":raw_material_price", ":new_price"),
(val_div, ":raw_material_boost", 10),
(val_add, ":new_price", ":raw_material_boost"),
(try_end),

By accident/luck, Native Warband doesn't seem to be affected most of the time (unless a center's slot_center_faction_when_oath_renounced is non-zero).
 
Back
Top Bottom