Difference between revisions of "Template:Leather Production"
Jump to navigation
Jump to search
(created doc page) |
Tag: Undo |
||
Line 1: | Line 1: | ||
− | + | <includeonly>{{#vardefine:animal|{{{1 | {{PAGENAME}}}}}}}<!-- | |
+ | -->{{#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 | |
− | * | + | | {{Meat Leather Curve|{{#expr:40*{{#show: {{#var:animal}}|?Body Size#}}*{{#var:baby_scale}}}}}} |
− | + | }}<!-- | |
− | * | + | Calculates the rate of new offspring for the system |
− | + | -->{{#vardefine:offspring_rate | |
+ | | {{#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 | |
− | + | | {{#expr:{{#var:offspring_rate}}*{{#var:baby_leather}}}} | |
− | + | }}<!-- | |
− | {{ | ||
− | |||
− | |||
− | |||
− | |||
− | {{ | ||
− | |||
− | |||
− | |||
− | |||
− | {{ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | < | ||
− | |||
− | + | -->{{#vardefine:adult_slaughter_leather_production | |
+ | | {{#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> |
Latest revision as of 23:31, 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[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 it's there to be consistent with Template:Nutrition Consumption.
Examples[edit]
Single inexplicably pregnant chinchilla[edit]
{{Leather Production| Chinchilla | Adult}}
result: 6.4917859035506
5 male chinchillas, 5 female chinchillas[edit]
{{Leather Production| chinchilla | Adult | 5 | 5 }}
result: 32.458929517753
Baby thrumbo slaughter[edit]
{{Leather Production| Thrumbo | Baby}}
result: 1.7
Adult thrumbo slaughter[edit]
{{Leather Production| Thrumbo | Adult}}
result: 8
See also: Template:Nutrition Consumption Template:Meat Production
The above documentation is transcluded from Template:Leather Production/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |