Changes

Jump to navigation Jump to search
52 bytes added ,  18:49, 4 November 2021
m
Text replacement - "tt>" to "samp>"
Line 4: Line 4:     
==Raw data==
 
==Raw data==
Crop data is stored in <tt>Content\Data\Crops.xnb</tt>, which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]. Here's the raw data as of {{version|1.5.1}} for reference:
+
Crop data is stored in <samp>Content\Data\Crops.xnb</samp>, which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]. Here's the raw data as of {{version|1.5.1}} for reference:
    
{{collapse|Data|content=<syntaxhighlight lang="json">
 
{{collapse|Data|content=<syntaxhighlight lang="json">
Line 80: Line 80:  
|-
 
|-
 
| 2
 
| 2
| Index in Sprite Sheet <small>(<tt>Content\TileSheets\Crops.xnb</tt>)</small>
+
| Index in Sprite Sheet <small>(<samp>Content\TileSheets\Crops.xnb</samp>)</small>
 
| 1
 
| 1
 
| 29
 
| 29
Line 131: Line 131:  
#chanceForExtraCrops
 
#chanceForExtraCrops
   −
The game determines the number of crops gained at a single harvest using the following code from <tt>Crops.cs::harvest()</tt>, where <tt>num</tt> is the number of crops gained:
+
The game determines the number of crops gained at a single harvest using the following code from <samp>Crops.cs::harvest()</samp>, where <samp>num</samp> is the number of crops gained:
    
<syntaxhighlight lang="C#">
 
<syntaxhighlight lang="C#">
Line 145: Line 145:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
The result (''i.e.'', <tt>num</tt>) of <code>random.Next(this.minHarvest, Math.Min(this.minHarvest + 1, this.maxHarvest + 1 + Game1.player.FarmingLevel / this.maxHarvestIncreasePerFarmingLevel))</code> is '''always the minHarvest''', for 2 reasons.
+
The result (''i.e.'', <samp>num</samp>) of <code>random.Next(this.minHarvest, Math.Min(this.minHarvest + 1, this.maxHarvest + 1 + Game1.player.FarmingLevel / this.maxHarvestIncreasePerFarmingLevel))</code> is '''always the minHarvest''', for 2 reasons.
#Taking the <tt>Math.Min</tt> of (<tt>minHarvest + 1</tt>) and (<tt>this.maxHarvest + 1 + Game1.player.FarmingLevel / this.maxHarvestIncreasePerFarmingLevel</tt>) always results in (<tt>minHarvest + 1</tt>)
+
#Taking the <samp>Math.Min</samp> of (<samp>minHarvest + 1</samp>) and (<samp>this.maxHarvest + 1 + Game1.player.FarmingLevel / this.maxHarvestIncreasePerFarmingLevel</samp>) always results in (<samp>minHarvest + 1</samp>)
#<tt>random.Next</tt> uses an inclusive lower bound and an exclusive upper bound, so it is effectively calculating a random number between <tt>minHarvest</tt> and <tt>minHarvest</tt>
+
#<samp>random.Next</samp> uses an inclusive lower bound and an exclusive upper bound, so it is effectively calculating a random number between <samp>minHarvest</samp> and <samp>minHarvest</samp>
 
Therefore, as of v1.2, only 3 seeds always give more than one crop per harvest, and that number is equal to the minHarvest:
 
Therefore, as of v1.2, only 3 seeds always give more than one crop per harvest, and that number is equal to the minHarvest:
 
*Coffee Bean (433) -- 4 Beans
 
*Coffee Bean (433) -- 4 Beans
Line 153: Line 153:  
*Cranberry Seeds (493) -- 2 Cranberries
 
*Cranberry Seeds (493) -- 2 Cranberries
   −
The value in <tt>chanceForExtraCrops</tt> may add additional crops to a harvest, calculated independently of the other 3 variables.  For example, each harvest of a Potato Seed (475) has &#8776;20% chance of yielding an extra potato, in addition to the one Potato given as standard harvest.  Each harvest of a Blueberry Seed (481) has &#8776;2% chance of yielding an extra Blueberry, in addition to the 3 Blueberries given as standard harvest.
+
The value in <samp>chanceForExtraCrops</samp> may add additional crops to a harvest, calculated independently of the other 3 variables.  For example, each harvest of a Potato Seed (475) has &#8776;20% chance of yielding an extra potato, in addition to the one Potato given as standard harvest.  Each harvest of a Blueberry Seed (481) has &#8776;2% chance of yielding an extra Blueberry, in addition to the 3 Blueberries given as standard harvest.
    
===Raised seeds===
 
===Raised seeds===
106,764

edits

Navigation menu