Changes

Jump to navigation Jump to search
Made information on mushroom type generation a little more specific
Line 17: Line 17:  
===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 with a distribution of 5% [[Purple Mushroom|purple]], 14.25% [[Red Mushroom|red]] and 80.75% [[Common Mushroom|common]].   
+
* 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%).   
 
* 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.
 +
 +
A table is given below for the chance of getting each mushroom type if the Mushroom Log is surrounded by a single type of tree. Mixing trees will result in more complex distributions that need to be individually calculated.
    
===Quality===
 
===Quality===
127

edits

Navigation menu