Difference between revisions of "Template:Plant/Needed Per Colonist"

From RimWorld Wiki
Jump to navigation Jump to search
(Uses {Plant/Max Yield Per Day} like the old code and no longer calculate it self)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
+
  {{#vardefine: yield    | {{Plant/Max Yield Per Day| {{{1|Rice Plant}}} | {{{2|1}}} }}
T1
+
}}{{#vardefine: harvest  | {{Q| {{{1|Rice Plant}}} | Harvested Product }}
{{#vardefine: yield    | {{Plant/Max Yield Per Day| {{{?Name|Rice Plant}}} | 2.0 }}
 
}}{{#vardefine: harvest  | {{Q| {{{?Name|Rice Plant}}} | Harvested Product}}
 
}}{{#vardefine: nutrition | {{Q| {{#var: harvest}} | nutrition }}
 
}}{{#vardefine: hunger    | 0.8
 
}}{{#expr: {{#var:hunger}} / ({{#var: yield}} * {{#var: nutrition}}) round 0 }}
 
</noinclude>
 
 
 
<noinclude>
 
T2  {{#vardefine: yield   | {{Q| {{{?Name|Rice Plant}}} | Maximum Yield }}
 
}}{{#vardefine: days    | {{Q| {{{?Name|Rice Plant}}} | Growth Time }}
 
}}{{#vardefine: fmin    | {{Q| {{{?Name|Rice Plant}}} | Fertility Min }}
 
}}{{#vardefine: ffactor | {{Q| {{{?Name|Rice Plant}}} | Fertility Factor }}
 
}}{{#vardefine: resting | 0.45}}
 
{{#ifeq: {{#show: {{{?Name|Rice Plant}}}| ?In Hydroponic | link = none }}|False | - | {{#expr: ceil( 0.8 /( {{#var: yield}} * (1 - {{#var:resting}}) * ((2.0 * {{#var: ffactor}}) + 1 - {{#var: ffactor}}) / {{#var: days}}  * 0.05 )) }}
 
 
 
if eq gaat na ofdat de plant 'In Hydroponic' kan groeien, false wordt als gebruikt om te vergelijken, als het false is wordt  '-' terug gegeven ander wordt de formule uitkomst terug gegeven </noinclude>
 
</noinclude>}}
 
 
 
 
 
  {{#vardefine: yield  | {{Q| {{{1}}} | Harvest Yield Max }}
 
}}{{#vardefine: days    | {{Q| {{{1}}} | Grow Days }}
 
}}{{#vardefine: fmin    | {{Q| {{{1}}} | Fertility Min }}
 
}}{{#vardefine: ffactor | {{Q| {{{1}}} | Fertility Factor Growth Rate }}
 
}}{{#vardefine: resting | 0.45
 
{{#ifeq: {{#show: {{{?Name|Rice Plant}}}| ?In Hydroponic | link = none }}|False | - | {{#expr: ceil( 0.8 /( {{#var: yield}} * (1 - {{#var:resting}}) * (({{{2|1}}} * {{#var: ffactor}}) + 1 - {{#var: ffactor}}) / {{#var: days}}  * 0.05 )) }}
 
 
 
<noinclude>ifeq gaat na ofdat de plant 'In Hydroponic' kan groeien, false wordt als gebruikt om te vergelijken, als het false is wordt  '-' terug gegeven ander wordt de formule uitkomst terug gegeven </noinclude>
 
 
 
 
 
<noinclude>
 
other forumlas canditases
 
 
 
}}{{#expr: ceil( 0.8 /( {{#var: yield}} * (1 - {{#var:resting}}) * ((2.0 * {{#var: ffactor}}) + 1 - {{#var: ffactor}}) / {{#var: days}}  * 0.05 )) }}
 
}}{{#expr: ceil( 0.8 /( {{#var: yield}} * (1 - {{#var:resting}}) * ((1.0 * {{#var: ffactor}}) + 1 - {{#var: ffactor}}) / {{#var: days}}  * 0.05 )) }}
 
 
 
from Plant/Max Yield Per Day
 
}}{{#expr: {{#var: yield}} * (1 - {{#var:resting}}) * (({{{2|1}}} * {{#var: ffactor}}) + 1 - {{#var: ffactor}}) / {{#var: days}} round 2}}
 
</noinclude>
 
 
 
 
 
 
 
<noinclude>
 
''original''
 
 
 
  {{#vardefine: yield    | {{Plant/Max Yield Per Day| {{{1}}} | {{{2}}} }}
 
}}{{#vardefine: harvest  | {{Q| {{{1}}} | Harvested Thing }}
 
 
}}{{#vardefine: nutrition | {{Q| {{#var: harvest}} | Nutrition }}
 
}}{{#vardefine: nutrition | {{Q| {{#var: harvest}} | Nutrition }}
 
}}{{#vardefine: hunger    | 0.8
 
}}{{#vardefine: hunger    | 0.8
 
}}{{#expr: {{#var:hunger}} / ({{#var: yield}} * {{#var: nutrition}}) round 0 }}
 
}}{{#expr: {{#var:hunger}} / ({{#var: yield}} * {{#var: nutrition}}) round 0 }}
 
</noinclude>
 

Latest revision as of 19:43, 27 September 2016

 Expression error: Unexpected < operator.