8,756
edits
(Created page with "{{As Of Patch|2.0.185.1}} Merchants are NPCs that sell their goods and restock on a semi random basis. ==Restocking== Merchants restock randomly according to their Chance and...") |
m (→Restocking) |
||
Line 10: | Line 10: | ||
which substitutes to | which substitutes to | ||
<math>\text{LastRestockTick} = \text{TickOnCreation} + \text{ | <math>\text{LastRestockTick} = \text{TickOnCreation} + \text{Random}(3000, 6000)</math> | ||
If the current in game turn count-LastRestockTick is greater than RestockFrequency, LastRestockTick is set to equal the current GameTick. | If the current in game turn count-LastRestockTick is greater than RestockFrequency, LastRestockTick is set to equal the current GameTick. | ||
Line 19: | Line 19: | ||
<math>\rightarrow</math> | <math>\rightarrow</math> | ||
If <math>\text{RestockCheck} \ge 100</math> or <math>\text{RestockCheck} \ge \text{ | If <math>\text{RestockCheck} \ge 100</math> or <math>\text{RestockCheck} \ge \text{Random}(1,100)</math>, | ||
the merchant will restock. This means that about 8450-8451 turns (a little more over an ingame week) after the last restock must pass in order to guarantee a restock. The earliest that a merchant can restock is 6,000 turns, with a 71% chance of restocking, or 9,000 turns at a 100% restock if this is the first time the merchant restocks. | the merchant will restock. This means that about 8450-8451 turns (a little more over an ingame week) after the last restock must pass in order to guarantee a restock. The earliest that a merchant can restock is 6,000 turns, with a 71% chance of restocking, or 9,000 turns at a 100% restock if this is the first time the merchant restocks. |