Difference between revisions of "Template:Leather Production"

From RimWorld Wiki
Jump to navigation Jump to search
(created template - mostly copied from Template:Meat Production)
 
(created doc page)
Line 1: Line 1:
<includeonly>{{#vardefine:animal|{{{1 | {{PAGENAME}}}}}}}<!--
+
Returns the items of leather per day produced from the slaughtering of offspring. This calculation assumes that there is no time between pregnancies.
-->{{#vardefine:slaughter_age|{{{2 | Baby}}}}}<!--
 
-->{{#vardefine:females|{{{3 | 1}}}}}<!--
 
-->{{#vardefine:males|{{{4 | 0}}}}}<!--
 
Baby birds have a slightly smaller body size
 
-->{{#vardefine:baby_scale
 
| {{#switch: {{#var:animal}}
 
  | Chicken|Duck|Turkey|Goose|Cassowary|Emu|Ostrich = 0.1
 
  | #default = 0.2
 
  }}
 
}}<!--
 
  
-->{{#vardefine:baby_leather
+
==Usage==
| {{Meat Leather Curve|{{#expr:40*{{#show: {{#var:animal}}|?Body Size#}}*{{#var:baby_scale}}}}}}
+
*The first parameter, if present, will specify which animal to generate the template for. If absent, <code><nowiki>{{PAGENAME}}</nowiki></code> 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.
Calculates the rate of new offspring for the system
+
*The third parameter is the number of females in the system. Defaults to 1.
-->{{#vardefine:offspring_rate
+
*The fourth parameter is the number of males in the system. Defaults to 0.
| {{#switch: TRUE
 
  | {{#if: {{#show: {{#var:animal}}|?Eggs Per Clutch Average#}}| TRUE | FALSE}} = {{#expr:{{#var:females}}*{{#show: {{#var:animal}}|?Eggs Per Clutch Average#}}/{{#show: {{#var:animal}}|?Egg Laying Interval#}}}}
 
  | {{#if: {{#show: {{#var:animal}}|?Offspring Per Birth#}}| TRUE | FALSE}} = {{#expr:{{#var:females}}*{{#if: {{#show: {{#var:animal}}|?Average Offspring Per Birth#}} | {{#show: {{#var:animal}}|?Average Offspring Per Birth#}} | 1}}/{{#show: {{#var:animal}}|?Gestation Period Days#}}}}
 
  | #default = 0
 
  }}
 
}}<!--
 
  
-->{{#vardefine:baby_slaughter_leather_production
+
==Examples==
| {{#expr:{{#var:offspring_rate}}*{{#var:baby_leather}}}}
+
===Single inexplicably pregnant chinchilla===
}}<!--
+
<pre>
 +
{{Leather Production| Chinchilla | Adult}}
 +
</pre>
 +
result: {{Leather Production| Chinchilla | Adult}}
 +
===5 male chinchillas, 5 female chinchillas===
 +
<pre>
 +
{{Leather Production| Horse | Adult | 5 | 5 }}
 +
</pre>
 +
result: {{Leather Production| Horse | Adult | 5 | 5}}
 +
===Baby thrumbo slaughter===
 +
<pre>
 +
{{Leather Production| Thrumbo | Baby}}
 +
</pre>
 +
result: {{Leather Production| Chicken | Baby}}
 +
===Adult thrumbo slaughter===
 +
<pre>
 +
{{Leather Production| Thrumbo | Adult}}
 +
</pre>
 +
result: {{Leather Production| Thrumbo | Adult}}
  
-->{{#vardefine:adult_slaughter_leather_production
+
See also: [[Template:Nutrition Consumption]] [[Template:Meat Consumption]]
| {{#expr:{{#var:offspring_rate}}*{{#show: {{#var:animal}}|?Leather Yield#}}}}
 
}}<!--
 
 
 
-->{{#ifeq: {{lc:{{#var:slaughter_age}}}} | baby | {{#var:baby_slaughter_leather_production}} | {{#var:adult_slaughter_leather_production}}}}
 
</includeonly><noinclude>
 
{{documentation}}
 
</noinclude>
 

Revision as of 23:30, 26 September 2021

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

Usage

  • 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.

Examples

Single inexplicably pregnant chinchilla

{{Leather Production| Chinchilla | Adult}}

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

Usage

  • 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.

Examples

Single inexplicably pregnant chinchilla

{{Leather Production| Chinchilla | Adult}}

result: Template loop detected: Template:Leather Production

5 male chinchillas, 5 female chinchillas

{{Leather Production| Horse | Adult | 5 | 5 }}

result: Template loop detected: Template:Leather Production

Baby thrumbo slaughter

{{Leather Production| Thrumbo | Baby}}

result: Template loop detected: Template:Leather Production

Adult thrumbo slaughter

{{Leather Production| Thrumbo | Adult}}

result: Template loop detected: Template:Leather Production

See also: Template:Nutrition Consumption Template:Meat Consumption

5 male chinchillas, 5 female chinchillas

{{Leather Production| Horse | Adult | 5 | 5 }}

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

Usage

  • 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.

Examples

Single inexplicably pregnant chinchilla

{{Leather Production| Chinchilla | Adult}}

result: Template loop detected: Template:Leather Production

5 male chinchillas, 5 female chinchillas

{{Leather Production| Horse | Adult | 5 | 5 }}

result: Template loop detected: Template:Leather Production

Baby thrumbo slaughter

{{Leather Production| Thrumbo | Baby}}

result: Template loop detected: Template:Leather Production

Adult thrumbo slaughter

{{Leather Production| Thrumbo | Adult}}

result: Template loop detected: Template:Leather Production

See also: Template:Nutrition Consumption Template:Meat Consumption

Baby thrumbo slaughter

{{Leather Production| Thrumbo | Baby}}

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

Usage

  • 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.

Examples

Single inexplicably pregnant chinchilla

{{Leather Production| Chinchilla | Adult}}

result: Template loop detected: Template:Leather Production

5 male chinchillas, 5 female chinchillas

{{Leather Production| Horse | Adult | 5 | 5 }}

result: Template loop detected: Template:Leather Production

Baby thrumbo slaughter

{{Leather Production| Thrumbo | Baby}}

result: Template loop detected: Template:Leather Production

Adult thrumbo slaughter

{{Leather Production| Thrumbo | Adult}}

result: Template loop detected: Template:Leather Production

See also: Template:Nutrition Consumption Template:Meat Consumption

Adult thrumbo slaughter

{{Leather Production| Thrumbo | Adult}}

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

Usage

  • 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.

Examples

Single inexplicably pregnant chinchilla

{{Leather Production| Chinchilla | Adult}}

result: Template loop detected: Template:Leather Production

5 male chinchillas, 5 female chinchillas

{{Leather Production| Horse | Adult | 5 | 5 }}

result: Template loop detected: Template:Leather Production

Baby thrumbo slaughter

{{Leather Production| Thrumbo | Baby}}

result: Template loop detected: Template:Leather Production

Adult thrumbo slaughter

{{Leather Production| Thrumbo | Adult}}

result: Template loop detected: Template:Leather Production

See also: Template:Nutrition Consumption Template:Meat Consumption

See also: Template:Nutrition Consumption Template:Meat Consumption