Merchants: Difference between revisions

m Legendary Merchants: Item, not trade good
m In-depth Restocking Formula: -currently; mention it appears to be out of date
 
(2 intermediate revisions by 2 users not shown)
Line 9: Line 9:


== Legendary Merchants ==
== Legendary Merchants ==
{{Missing info|Needs the actual formula for the price increase from the Mark}}
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.{{Code Reference | namespace  = XRL.World.ZoneBuilders | class = HeroMaker | method = MakeHero}}
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.{{Code Reference | namespace  = XRL.World.ZoneBuilders | class = HeroMaker | method = MakeHero}}


The maker's mark increases the value of the item, and additionally shows which merchant made the item when looked at.
The maker's mark increases the value of the item by $5{{Code Reference | namespace = XRL.World.Parts | class = GenericInventoryRestocker | method = GetCraftmarkApplication}}, and additionally shows which merchant made the item when looked at.


== In-depth Restocking Formula ==
== 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|<code>Stat.Random()</code>]] to find a random integer between half the restock frequency and the restock frequency:{{Code Reference | class = GenericInventoryRestocker}}
{{Cleanup | Some of this information appears to be out of date, for example, the Chance value. You can help by confirming whether this information is accurate and, if not, updating it. If applicable, also consider listing what method each code reference is localized to (see [[Template:Code Reference]]).}}
 
Merchants restock randomly according to their Chance and Restock Frequency. LastRestockTick is the last ingameTick that they have refreshed their wares. Chance is specified as 71, and RestockFrequency is 5 ingame days, or 6,000 ticks. It calls [[Modding:Random Functions|<code>Stat.Random()</code>]] to find a random integer between half the restock frequency and the restock frequency:{{Code Reference | class = GenericInventoryRestocker}}


When the merchant is first created, LastRestock tick is set to
When the merchant is first created, LastRestock tick is set to