Difference between revisions of "Template:Meat Production"
Jump to navigation
Jump to search
m |
Arcangelus (talk | contribs) (Removed 2 variables for a modest performance boost.) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 11: | Line 11: | ||
}}<!-- | }}<!-- | ||
− | -->{{#vardefine: | + | -->{{#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}}}}}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}}<!-- | }}<!-- | ||
Calculates the rate of new offspring for the system | Calculates the rate of new offspring for the system | ||
Line 30: | Line 18: | ||
| {{#switch: TRUE | | {{#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}}|?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}}|?Offspring Per Birth#}}| TRUE | FALSE}} = {{#expr:{{#var:females}}*{{#show: {{#var:animal}}|?Average Offspring Per Birth#}}/{{#show: {{#var:animal}}|?Gestation Period Days#}}}} |
| #default = 0 | | #default = 0 | ||
}} | }} | ||
}}<!-- | }}<!-- | ||
− | + | I will note this, but not use as variables due to the overhead... And because it is not truly needed. | |
− | + | {{#expr:{{#var:offspring_rate}}*0.05*{{#var:baby_meat}}}} = Meat Produced when slaughtering babies | |
− | + | {{#expr:{{#var:offspring_rate}}*0.05*{{#show: {{#var:animal}}|?Meat Yield#}}}} = Meat Produced when slaughtering adults (as soon as adulthood is reached) | |
− | |||
− | |||
− | |||
− | |||
− | -->{{#ifeq: {{#var:slaughter_age}} | | + | -->{{#ifeq: {{lc:{{#var:slaughter_age}}}} | baby | {{#expr:{{#var:offspring_rate}}*0.05*{{#var:baby_meat}}}} | {{#expr:{{#var:offspring_rate}}*0.05*{{#show: {{#var:animal}}|?Meat Yield#}}}} }} |
</includeonly><noinclude> | </includeonly><noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 19:59, 5 March 2025
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
The above documentation is transcluded from Template:Meat 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. |