Changes

Jump to navigation Jump to search
1,037 bytes removed ,  16:55, 13 February 2021
→‎Complete Formula: update formulas, remove analysis that's outdated with 1.5 changes
Line 79: Line 79:     
====Complete Formula====
 
====Complete Formula====
{|class="mw-collapsible mw-collapsed"
+
The probability that a crop's quality increases is linear with respect to your farming level and the soil fertilizer quality (0 for normal soil, 1 for [[Basic Fertilizer]], 2 for [[Quality Fertilizer]], and 3 for [[Deluxe Fertilizer]]). That is, the probability increases the same amount with each level for the same fertilizer quality, and with each fertilizer quality for the same farming level. The formulas used in the game's code is as follows:
 +
 
 +
{| class="wikitable"
 +
|-
 +
! quality
 +
! formula
 +
|-
 +
| gold
 +
| <code>0.2 * (farming level / 10) + 0.2(fertilizer level) * ((farming level + 2) / 12) + 0.01</code>
 
|-
 
|-
!style="text-align: left;"|Details&nbsp;
+
| silver
 +
| <code>2 * chance for gold quality</code> (capped at 75%)
 
|-
 
|-
| The probability that a crop is gold quality is linear with respect to both farming level and fertilizer quality. That is, the probability increases the same amount with each level for the same fertilizer quality, and with each fertilizer quality for the same farming level. The formula used in the game's code is as follows:
+
| iridium
 
+
| <code>chance for gold quality / 2</code>
<code>
+
|}
P(gold) = 0.01 + 0.2 * (lvl/10 + q * (lvl+2)/12)
  −
</code>
  −
 
  −
where '''lvl''' is your farming level and '''q''' is the fertilizer quality. The game assigns a value of 0 for normal soil, 1 for basic fertilizer, and 2 for quality fertilizer. You can rewrite it to isolate either '''lvl''' or '''q''' as the 'independent' variable:
  −
 
  −
<code>
  −
P(gold) = (1+2*lvl)/100 + q * (lvl+2)/60
  −
</code><br/><code>
  −
P(gold) = (3+10*q)/300 + lvl * (6+5*q)/300
  −
</code>
  −
 
  −
The probability that a crop is silver quality (given that it isn't gold) is actually twice the probability that it was gold quality, but capped at 75%. That is:
  −
 
  −
<code>
  −
P(silver | not gold) = MIN(2*P(gold), 0.75)
  −
</code>
  −
 
  −
But because sometimes the crop ''is'' gold quality, the true probability that the crop is silver quality is a little bit less:
  −
 
  −
<code>
  −
P(silver) = MIN(2*P(gold),0.75) * (1-P(gold))
  −
</code>
  −
 
  −
You can actually see the 75% cap at work in the table above, if indirectly: notice that the probability of a silver crop actually goes down once the probability of a gold crop crosses the 37.5% threshold.
  −
 
  −
Finally, the probability that a crop is normal quality is the same as the probability that the crop is neither silver nor gold quality. Since it can't be both silver or gold, the formula simplifies to:
  −
 
  −
<code>
  −
P(normal) = 1 - P(silver) - P(gold)
  −
</code>
  −
 
  −
The average price of the crop is the sum of the probabilities, weighted by the relative price of each type of crop:
     −
<code>
+
It checks them in the order iridium, gold, and silver. If the fertilizer is deluxe or better, then silver is the guaranteed minimum quality.
1*P(normal) + 1.25*P(silver) + 1.5*P(gold)
  −
</code>
  −
|}
      
==Experience Points==
 
==Experience Points==
translators
8,403

edits

Navigation menu