You can't see it anywhere because it is used in the trade screen which is a hardcoded presentation that can't be seen in the module system.gdwitt said:Thank you for pointing that out.
I don't see anything in the scripts that shows the increment that changes price for each consecutive buy or sell.
I am able to modify the penalty_factor to make things less difficult on the players.
("game_get_item_sell_price_factor",
But is the increment of 6-8% for consecutive transactions just part of the game engine?[
(store_script_param_1, ":item_kind_id"),
(assign, ":price_factor", 100),
(call_script, "script_get_trade_penalty", ":item_kind_id"),
(assign, ":trade_penalty", reg0),
(try_begin),
(is_between, "$g_encountered_party", centers_begin, centers_end),
(is_between, ":item_kind_id", trade_goods_begin, trade_goods_end),
(store_sub, ":item_slot_no", ":item_kind_id", trade_goods_begin),
(val_add, ":item_slot_no", slot_town_trade_good_prices_begin),
(party_get_slot, ":price_factor", "$g_encountered_party", ":item_slot_no"),
(val_mul, ":price_factor", 100),#normalize price factor to range 0..100
(val_div, ":price_factor", average_price_factor),##gdw1000 in module constants
(else_try),
#increase trade penalty while selling weapons, armor, and horses
(val_mul, ":trade_penalty", 3),#gdw from 4 to 3 reduced to ease
(try_end),
(store_add, ":penalty_divisor", 100, ":trade_penalty"),
(val_mul, ":price_factor", 100),
(val_div, ":price_factor", ":penalty_divisor"),
(assign, reg0, ":price_factor"),
(set_trigger_result, reg0),
]),
I think I see an increment in game_event_buy_item
("game_event_buy_item",
But I don't see this script being called anywhere except for buying cattle. Does this script change the increment?[
(store_script_param_1, ":item_kind_id"),
(store_script_param_2, ":reclaim_mode"),
(try_begin),
(is_between, ":item_kind_id", trade_goods_begin, trade_goods_end),
(store_sub, ":item_slot_no", ":item_kind_id", trade_goods_begin),
(val_add, ":item_slot_no", slot_town_trade_good_prices_begin),
(party_get_slot, ":multiplier", "$g_encountered_party", ":item_slot_no"),
(try_begin),
(eq, ":reclaim_mode", 0),
(val_add, ":multiplier", 16),##gdw was at 20
(else_try),
(val_add, ":multiplier", 24),##gdw was at 30
(try_end),
(store_item_value, ":item_value", ":item_kind_id"),
(try_begin),
(ge, ":item_value", 100),
(store_sub, ":item_value_sub_100", ":item_value", 100),
(store_div, ":item_value_sub_100_div_8", ":item_value_sub_100", ,
(val_add, ":multiplier", ":item_value_sub_100_div_8"),
(try_end),
(val_min, ":multiplier", maximum_price_factor),
(party_set_slot, "$g_encountered_party", ":item_slot_no", ":multiplier"),
(try_end),
]),
Cheers!