Changes

Jump to navigation Jump to search
1,285 bytes added ,  10:59, 16 October 2016
→‎Mechanics: New section.
Line 11: Line 11:  
The '''{{PAGENAME}}''' is a [[:Category:Stores|shop]] consisting of a wagon, pulled by a pig wearing a fez and spectacles. If you try to interact with the pig, it just oinks at you. It appears south of [[The Farm]], in [[Cindersap Forest]], on Fridays and Sundays.  
 
The '''{{PAGENAME}}''' is a [[:Category:Stores|shop]] consisting of a wagon, pulled by a pig wearing a fez and spectacles. If you try to interact with the pig, it just oinks at you. It appears south of [[The Farm]], in [[Cindersap Forest]], on Fridays and Sundays.  
   −
The merchant sells all sorts of random items in limited quantities, but usually at inflated prices that vary from visit to visit. It is possible for the same item to be listed multiple times at different prices. Sometimes prices are deflated (if you are very fortunate) as you can find gold ore for as little as {{price|100}}, whereas its normal price at the [[Blacksmith]] is {{price|400}}, though since you can only buy 1 it hardly has an impact. Another example, and almost guaranteed deflation of price are [[Trees|saplings]], as they often appear with a price less than [[Pierre%27s_General_Store|Pierre's General Store]] offers them for.
+
The merchant sells all sorts of random items in limited quantities, but usually at inflated prices that vary from visit to visit. It is possible for the same item to be listed multiple times at different prices. Sometimes prices are deflated (if you are very fortunate) as you can find gold ore for as little as {{price|100}}, whereas its normal price at the [[Blacksmith]] is {{price|400}}, though since you can usually only buy 1 it hardly has an impact. Another example, and almost guaranteed deflation of price are [[Trees|saplings]], as they often appear with a price less than [[Pierre's General Store]] offers them for.
    
Since it can offer items outside the current seasons, it can be helpful for completing [[bundles]].
 
Since it can offer items outside the current seasons, it can be helpful for completing [[bundles]].
   −
Most furniture items sold at [[Carpenter's Shop|Robin's Shop]] have a chance to be sold at the cart, with prices ranging between {{price|250}} - 2500g. This could mean paying more or less than regular price depending on the piece and the price it happens to have that day.
+
Most furniture items sold at [[Carpenter's Shop|Robin's Shop]] have a chance to be sold at the cart, with prices in the range of {{tprice|furniture}}. This could mean paying more or less than regular price depending on the piece and the price it happens to have that day.
 +
 
 +
==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 ''[[#Stock|standard stock]]'' consists of 10 item slots and 1 furniture slot.
 +
 
 +
For each item slot, a random integer (''num'') in the range [2,790) is chosen. ''num'' is then incremented and wrapped to the range [0,790) until there exists an item that satisfies all of the following conditions:
 +
* ID is equal to ''num'';
 +
* not blacklisted;
 +
* has a category;
 +
* price greater than 0;
 +
* not named "Weeds";
 +
* type is not "Quest", "Minerals", or "Arch".
 +
 
 +
The unit price is determined by the largest of 2 random integers in the ranges of [1,11)*100 and [3,6)*base_price. The stack size has a 90% chance to be 1, and 10% chance to be 5.
 +
 
 +
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.
    
==Special Stock==
 
==Special Stock==
Special stock are sold in addition to the standard 10 items and 1 furniture.
  −
   
{| class="wikitable"
 
{| class="wikitable"
 
! colspan=2 | Item !! Unit price !! Season !! Notes
 
! colspan=2 | Item !! Unit price !! Season !! Notes
270

edits

Navigation menu