IC2 Crops: Difference between revisions

m
Add fancy formulas
m (Add fancy formulas)
Line 58:
First, the "base growth rate" is calculated based on the crop's growth stat, Gr and a random number between 0 and 6, inclusive, denoted X below.
 
<math>base = 3 + X + Gr</math>
 
Next, the crop's "environment value" and "needed environment value" are calculated:
 
<math>value = 5\times(w_h\times h + w_n\times n + w_a\times a)</math>, where h, n and a are the crop's humidity, nutrients and air quality stats.
value = (Humidity + Nutrients + Air Quality) * 5
 
<math>needed = 4 \times ((Tier T - 1) * 4) + Gr + Ga + Re</math>, where TierT is the crop's tier and Gr, Ga, and Re are the crop's growth, gain, and resistance stats.
 
 
Line 70:
{| class="wikitable mw-collapsible mw-collapsed"
!Crop
!Humidity Weighting (w<sub>h</sub>)
!Nutrients Weighting (w<sub>n</sub>)
!Air Quality Weighting (w<sub>a</sub>)
|-
|Default
Line 113:
Then, if the environment value is greater than or equal to what is needed, the final growth rate (in growth points) gets a bonus of (value - needed)%:
 
<math>rate = \left \lfloor base *\times (\frac{100 + (value - needed))}{100} /\right 100\rfloor</math>
 
If the environment value is less than what is needed, the growth rate is steeply penalized, being reduced by 4 * (needed - value)%:
 
<math>rate = \left \lfloor base *\times (\frac{100 - (4 *\times (needed - value)))}{100} \right \rfloor</ 100math>
 
If applicable, the growth rate is always rounded down.
 
If this process attempts to reduce the crop's growth rate by more than 100%, the growth rate will instead be only reduced to zero, and the crop will attempt to die due to lack of environmental stats. Crops with higher resistance stats are more likely to resist this death, and crops with the maximum 31 resistance are completely immune to death by bad environment. However, a high resistance stat is undesirable because it increases the needed environment value, reducing the growth rate as described above.