Merchants: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(more text) |
||
Line 1: | Line 1: | ||
{{As Of Patch|2.0.185.1}} | {{As Of Patch|2.0.185.1}} | ||
Merchants are NPCs that sell their goods and restock on a semi random basis. | Merchants are NPCs that sell their goods and restock on a semi random basis. | ||
==Restocking== | ==Restocking== | ||
Merchants do not keep their wares: they rotate their stock around every 5 to 7 in game days(for more detailed math, view [[#In depth restocking formula]]). When a merchant restocks, their trading inventory is refreshed and new items will repopulate the inventory. These items will generally be of similar tier and type as the initial stock. | |||
For how the trading system works, check [[Commerce]]. | |||
==Legendary Merchants== | |||
Merchants have a chance of spawning Legendary Merchants, loyal to the [[Merchants' Guild]]. They live in their own lairs, and are always guarded by two random hired guards. All stock will contain the Maker's Mark of the Merchant, which is a random [[Modding: Code page 437|Code page 437]] character from 1-254 (in decimal) excluding all alphanumerics, &, ^, and white space.<ref>XRL.World.ZoneBuilders.HeroMaker.MakeHero()</ref> | |||
==In depth restocking formula== | |||
Merchants restock randomly according to their Chance and Restock Frequency. LastRestockTick is the last ingameTick that they have refreshed their wares. Currently, Chance is specified as 71, and RestockFrequency is 5 ingame days, or 6,000 ticks. It calls [[Modding: Random Functions|Stat.Random()]] to find a random integer between half the restock frequency and the restock frequency:<ref>XRL.World.Parts.GenericInventoryRestocker</ref> | Merchants restock randomly according to their Chance and Restock Frequency. LastRestockTick is the last ingameTick that they have refreshed their wares. Currently, Chance is specified as 71, and RestockFrequency is 5 ingame days, or 6,000 ticks. It calls [[Modding: Random Functions|Stat.Random()]] to find a random integer between half the restock frequency and the restock frequency:<ref>XRL.World.Parts.GenericInventoryRestocker</ref> | ||
Line 26: | Line 35: | ||
If a merchant is holding a quest item, they will not destroy the quest item during restock. any other item that contains the tag <code>norestock</code> will also not be restocked. Merchants that are following the player do not restock, and if the player is also a merchant via [[Domination]], they will not restock. | If a merchant is holding a quest item, they will not destroy the quest item during restock. any other item that contains the tag <code>norestock</code> will also not be restocked. Merchants that are following the player do not restock, and if the player is also a merchant via [[Domination]], they will not restock. | ||
[[Category:NPCs]] | [[Category:NPCs]] | ||
==References== | ==References== |