Difference between revisions of "Template:Meat Production"

From RimWorld Wiki
Jump to navigation Jump to search
m
(switched to using Template:Meat Leather Curve - also adds intermediate rounding to baby meat amount)
 
(One intermediate revision by one other user not shown)
Line 11: Line 11:
 
}}<!--
 
}}<!--
  
-->{{#vardefine:pre_curve_baby_meat
+
-->{{#vardefine:baby_meat
  | {{#expr:140*{{#show: {{#var:animal}}|?Body Size#}}*{{#var:baby_scale}}}}
+
  | {{Meat Leather Curve|{{#expr:140*{{#show: {{#var:animal}}|?Body Size#}}*{{#var:baby_scale}}}}}}
}}
 
<!--
 
Applies the Property:Meat_Yield post-processing curve
 
-->
 
{{#vardefine:baby_meat
 
| {{#ifexpr: {{#var:pre_curve_baby_meat}} > 40
 
  | {{#var:pre_curve_baby_meat}}
 
  | {{#ifexpr: {{#var:pre_curve_baby_meat}} > 5
 
    | {{#expr: (40-14)/(40-5)*{{#var:pre_curve_baby_meat}} + (40 - (40-14)/(40-5)*40)}}
 
    | {{#expr: 14/5*{{#var:pre_curve_baby_meat}}}}
 
    }}
 
  }}
 
 
}}<!--
 
}}<!--
 
Calculates the rate of new offspring for the system
 
Calculates the rate of new offspring for the system
Line 43: Line 31:
 
}}<!--
 
}}<!--
  
-->{{#ifeq: {{#var:slaughter_age}} | Baby | {{#var:baby_slaughter_meat_production}} | {{#var:adult_slaughter_meat_production}}}}  
+
-->{{#ifeq: {{lc:{{#var:slaughter_age}}}} | baby | {{#var:baby_slaughter_meat_production}} | {{#var:adult_slaughter_meat_production}}}}  
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 16:23, 26 September 2021

Documentation icon Template documentation[view] [edit] [history] [purge]

Returns the nutrition per day produced from the slaughtering of offspring. This calculation assumes that there is no time between pregnancies.

Usage[edit]

  • The first parameter, if present, will specify which animal to generate the template for. If absent, {{PAGENAME}} will be used.
  • The second parameter determines whether the offspring are slaughtered upon birth or upon reaching adulthood. Baby for baby slaughter, Adult for adult slaughter. Defaults to Baby.
  • The third parameter is the number of females in the system. Defaults to 1.
  • The fourth parameter is the number of males in the system. Defaults to 0. This doesn't actually do anything, but is there to be consistent with Template: Nutrition Consumption

Examples[edit]

Single inexplicably pregnant mare[edit]

{{Meat Production| Horse | Adult}}

result: 2.5225225225225

5 mares, 5 stallions[edit]

{{Meat Production| Horse | Adult | 5 | 5 }}

result: 12.612612612613

Chick slaughter[edit]

{{Meat Production| Chicken | Baby}}

result: 0.6

Chicken slaughter[edit]

{{Meat Production| Chicken | Adult}}

result: 2.1


See also: Template:Nutrition Consumption, Template:Leather Production