I have created several new places in module_parties to trade only food, (the trigger I have used is from the Salt mine merchant) but this trigger says that only items type goods can be traded. This covers all items of type good (itp_type_goods)
What can I do so that the merchant can only sell food? (fish, bread, honey, etc.) and not other things (Leathers, Skins, Tools, etc.)
This is the triggers
What can I do so that the merchant can only sell food? (fish, bread, honey, etc.) and not other things (Leathers, Skins, Tools, etc.)
This is the triggers
Code:
(0.0, 0, 24.0, [], [# Refresh Molinos
(try_for_range, ":molinero", mercader_molino_inicio, mercader_molino_fin),
(troop_clear_inventory, ":molinero"),
(reset_item_probabilities,100),
(set_merchandise_modifier_quality,100),#150
(reset_item_probabilities,100),(set_item_probability_in_merchandise,"itm_bread",800),#700
#(try_for_range, ":alimentos", comercio_molino_inicio, comercio_molino_fin),
(troop_add_merchandise,":molinero",itp_type_goods,num_merchandise_goods),
(try_end),
(store_sub, ":item_to_price_slot", slot_town_trade_good_prices_begin, comercio_molino_inicio),
(try_for_range,":cur_center",towns_begin,towns_end),
(party_get_slot,":cur_merchant",":cur_center",slot_town_merchant),
(reset_item_probabilities,50),#100
(try_for_range, ":cur_goods", comercio_molino_inicio, comercio_molino_fin),
(store_add, ":cur_price_slot", ":cur_goods", ":item_to_price_slot"),
(party_get_slot, ":cur_price", ":cur_center", ":cur_price_slot"),
(call_script, "script_center_get_production", ":cur_center", ":cur_goods"),
(assign, ":cur_probability", reg0),
(call_script, "script_center_get_consumption", ":cur_center", ":cur_goods"),
(val_add, ":cur_probability", reg0),
(val_mul, ":cur_probability", 2),#4
(val_mul, ":cur_probability", average_price_factor),
(val_div, ":cur_probability", ":cur_price"),
(val_mul, ":cur_probability", average_price_factor),
(val_div, ":cur_probability", ":cur_price"),
(val_mul, ":cur_probability", average_price_factor),
(val_div, ":cur_probability", ":cur_price"),
(set_item_probability_in_merchandise,":cur_goods",":cur_probability"),
(try_end),
(troop_add_merchandise,":cur_merchant",itp_type_goods,num_merchandise_goods),
(troop_ensure_inventory_space,":cur_merchant",merchant_inventory_space),
(troop_sort_inventory, ":cur_merchant"),
(store_troop_gold, ":cur_gold",":cur_merchant"),
(lt,":cur_gold",1500),
(store_random_in_range,":new_gold",500,1000),
(call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
(try_end),
]),