Changes

Jump to navigation Jump to search
140 bytes removed ,  01:52, 11 March 2017
→‎Mechanics: It's RANDOM. It's all just RANDOM. No item is more likely to appear because the code increments a random number until it finds a valid object #.
Line 16: Line 16:     
==Mechanics==
 
==Mechanics==
The merchant's stock is determined by the game ID (XPath: <code>/SaveGame/uniqueIDForThisGame</code>) and the days played (XPath: <code>/SaveGame/stats/DaysPlayed</code>).
+
The merchant's stock is determined by a random number seeded with the game ID (XPath: <code>/SaveGame/uniqueIDForThisGame</code>) and the days played (XPath: <code>/SaveGame/stats/DaysPlayed</code>).
    
The ''[[#Stock|standard stock]]'' consists of 10 item slots and 1 furniture slot.
 
The ''[[#Stock|standard stock]]'' consists of 10 item slots and 1 furniture slot.
Line 31: Line 31:     
For the furniture slot, a random integer (''num'') in the range [0,1613) is chosen until it there exists a furniture that has ''num'' as its ID and is not blacklisted. The unit price is determined by a random integer in the range of [1,11)*250.
 
For the furniture slot, a random integer (''num'') in the range [0,1613) is chosen until it there exists a furniture that has ''num'' as its ID and is not blacklisted. The unit price is determined by a random integer in the range of [1,11)*250.
  −
Note that some items have a higher chance to appear in the standard stock, because after the random integer is chosen, it is incremented as long as it is not "valid".
      
In addition to the standard stock, the ''[[#Special Stock|special stock]]'' slots may contain items that are selected with different conditions.
 
In addition to the standard stock, the ''[[#Special Stock|special stock]]'' slots may contain items that are selected with different conditions.
105,474

edits

Navigation menu