Changes

Added distinction between mature and immature trees counting for different calculations, will fill out remainder of quality table soon
Line 14: Line 14:  
The Mushroom Log produces mushrooms every 4 days, rainy days will cause this to take a day less. Produces mushrooms in all seasons.
 
The Mushroom Log produces mushrooms every 4 days, rainy days will cause this to take a day less. Produces mushrooms in all seasons.
 
===Quantity===
 
===Quantity===
The quantity of mushrooms produced increases with the amount of [[Trees|Wild Trees]] in the 7×7 square around the log. The amount of mushrooms generated, limited to between 1 and 5, is calculated by finding the number of nearby trees and multiplying this by a random number between 0.5 and 1.5.<ref name="code" /> Therefore, the number of nearby trees needed to always gain the maximum amount of 5 is 10.
+
The quantity of mushrooms produced increases with the amount of [[Trees|Wild Trees]] in the 7×7 square around the log, including immature trees. The amount of mushrooms generated, limited to between 1 and 5, is calculated by finding the number of nearby trees and multiplying this by a random number between 0.5 and 1.5.<ref name="code" /> Therefore, the number of nearby trees needed to always gain the maximum amount of 5 is 10.
 
===Type===
 
===Type===
 
The type of mushrooms produced depends on the type of trees nearby. The game code creates a list of possible mushrooms based on nearby trees, and then selects one at random from that list.  
 
The type of mushrooms produced depends on the type of trees nearby. The game code creates a list of possible mushrooms based on nearby trees, and then selects one at random from that list.  
* First the game finds how many trees are in the 7×7 square around it. That number is multiplied by 3/4, rounded down, and that many mushrooms (at least one) are added to the list, randomly chosen between [[Purple Mushroom|Purple Mushrooms]] (5%), [[Red Mushroom|Red Mushrooms]] (14.25%), and [[Common Mushroom|Common Mushrooms]] (80.75%).   
+
* First the game finds how many trees are in the 7×7 square around it, including immature trees. That number is multiplied by 3/4, rounded down, and that many mushrooms (at least one) are added to the list, randomly chosen between [[Purple Mushroom|Purple Mushrooms]] (5%), [[Red Mushroom|Red Mushrooms]] (14.25%), and [[Common Mushroom|Common Mushrooms]] (80.75%).   
* Then, one more mushroom is added for each mature tree. If the tree is a [[Oak Tree]] then the mushroom added will always be a [[Morel]]. The same goes for [[Pine Tree]] with [[Chanterelle]], and for [[Mystic Tree]] with [[Purple Mushroom]]. [[Maple Tree|Maple Trees]] have a 10% chance to give a [[Purple Mushroom]] and a 90% chance to give a [[Red Mushroom]]. If the mature tree is none of these types, the same distribution as in step 1 is used.
+
* Then, one more mushroom is added for each ''mature'' tree. If the tree is a [[Oak Tree]] then the mushroom added will always be a [[Morel]]. The same goes for [[Pine Tree]] with [[Chanterelle]], and for [[Mystic Tree]] with [[Purple Mushroom]]. [[Maple Tree|Maple Trees]] have a 10% chance to give a [[Purple Mushroom]] and a 90% chance to give a [[Red Mushroom]]. If the mature tree is none of these types, the same distribution as in step 1 is used.
 
* Finally, a random mushroom is chosen from that list to generate.<ref name="code" />
 
* Finally, a random mushroom is chosen from that list to generate.<ref name="code" />
 
This process makes it impossible to guarantee a single type of mushroom, as every tree added contributes not only to the chance of its own associated mushroom, but also the chance of [[Red Mushroom|red]], [[Common Mushroom|common]], and [[Purple Mushroom|purple]] mushrooms. Due to the rounding on the number of trees in step 1, adding more trees will not always increase the chance of the associated mushroom.
 
This process makes it impossible to guarantee a single type of mushroom, as every tree added contributes not only to the chance of its own associated mushroom, but also the chance of [[Red Mushroom|red]], [[Common Mushroom|common]], and [[Purple Mushroom|purple]] mushrooms. Due to the rounding on the number of trees in step 1, adding more trees will not always increase the chance of the associated mushroom.
Line 27: Line 27:  
!colspan="19" style="text-align: left;"|Mushroom Probabilities with a Single Tree Type&nbsp;   
 
!colspan="19" style="text-align: left;"|Mushroom Probabilities with a Single Tree Type&nbsp;   
 
|-
 
|-
! Number of <br/> Modifying Trees
+
! Number of Modifying <br/> Mature Trees
 
! Number of Basic <br/> Distribution Mushrooms
 
! Number of Basic <br/> Distribution Mushrooms
 
! % Common Mushroom [[File:Common Mushroom.png|18px]]
 
! % Common Mushroom [[File:Common Mushroom.png|18px]]
Line 74: Line 74:     
===Quality===
 
===Quality===
The quality of the mushrooms produced can vary, but is not affected by the [[Foraging#Foraging Skill|Botanist]] Perk. Instead, the quality is calculated based on the number of nearby trees, and how many of them have moss on them. Each nearby tree is counted, with mossy trees counted twice. This number is then divided by 40 and is used as the chance for the quality to upgrade. This chance occurs repeatedly until it fails or reaches iridium quality.<ref name="code" /> So for example if the count is 20 then the chance is 0.5, meaning there is a 50% chance of regular quality, a 25% chance of silver quality, a 12.5% chance of gold quality, and a 12.5% chance of iridium quality. A complete table of probabilities for each quality of mushroom, depending on the amount of trees and moss, is given below, along with the expected multiplier on sell price.
+
The quality of the mushrooms produced can vary, but is not affected by the [[Foraging#Foraging Skill|Botanist]] Perk. Instead, the quality is calculated based on the number of nearby trees, including immature trees, and how many of them have moss on them. Each nearby tree is counted, with mossy trees counted twice. This number is then divided by 40 and is used as the chance for the quality to upgrade. This chance occurs repeatedly until it fails or reaches iridium quality.<ref name="code" /> So for example if the count is 20 then the chance is 0.5, meaning there is a 50% chance of regular quality, a 25% chance of silver quality, a 12.5% chance of gold quality, and a 12.5% chance of iridium quality. A complete table of probabilities for each quality of mushroom, depending on the amount of trees and moss, is given below, along with the expected multiplier on sell price.
    
{|class="wikitable mw-collapsible mw-collapsed"
 
{|class="wikitable mw-collapsible mw-collapsed"
127

edits