Help with item abundance

Users who are viewing this thread

SirKeeper

Recruit
Hello
In the making of my mod I am adding plenty of items, and I'd like to ask what is it that item abundance means exactly? One would thin a higher abundance means higher chance of spawn, but reducing it seems to actually make the new items more common.  I haven't been able to find a clear explanation.
Also, is it possible to increase the amount of items in merchants' inventories?
Thank you

SirKeeper
 
SirKeeper said:
One would thin a higher abundance means higher chance of spawn
That's how it works but you should also take into account how refresh_center_ scripts and troop_add_merchandise_with_faction work.
If certain faction only has a few items of a certain type and all of them have low abundance, but the script forces the game to add, say, 8 boots to the armourer, these low-abundance items will still be added.

And as for you last question: refresh_center_ scripts (e.g. refresh_center_armories) are the answer.
 
Thank you very much
So is the maximum 100, or can I go over?
I am also attributing all items to certain factions (including the vanilla ones) so that info there about the script is very helpful.
 
Here it is, for the inventory change:
# script_refresh_center_armories
  ("refresh_center_armories",
  [
  (reset_item_probabilities,100),
  (set_merchandise_modifier_quality,150),
  (try_for_range, ":cur_merchant", armor_merchants_begin, armor_merchants_end),
(store_sub, ":cur_town", ":cur_merchant", armor_merchants_begin),
(val_add, ":cur_town", towns_begin),
(troop_clear_inventory, ":cur_merchant"),
(party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_body_armor, 16),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_head_armor, 16),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_foot_armor, 8 ),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_hand_armor, 4),
(troop_ensure_inventory_space, ":cur_merchant", merchant_inventory_space),
(troop_sort_inventory, ":cur_merchant"),
(store_troop_gold, reg6, ":cur_merchant"),

Do I need to alter the numbers after the item types (16, 16, 8 and 4) in order to change the amount of each item that is present?
 
Back
Top Bottom