Difference between revisions of "Template:Nutrition Consumption"
Jump to navigation
Jump to search
m |
(switched to using Base Hunger Rate*1.6 rather than Real Hunger Rate - this increases accuracy slightly, as Real Hunger Rate is rounded) |
||
(One intermediate revision by one other user not shown) | |||
Line 13: | Line 13: | ||
-->{{#vardefine:parent_consumption | -->{{#vardefine:parent_consumption | ||
− | | {{#expr:(({{#var:females}} + {{#var:males}})*{{#show: {{#var:animal}}|? | + | | {{#expr:(({{#var:females}} + {{#var:males}})*{{#show: {{#var:animal}}|?Base Hunger Rate#}}*1.6)}} |
}}<!-- | }}<!-- | ||
Babies consume 0.4 times the amount of adults | Babies consume 0.4 times the amount of adults | ||
-->{{#vardefine:baby_consumption | -->{{#vardefine:baby_consumption | ||
− | | {{#expr:60*{{#show: {{#var:animal}}|?Juvenile Age#}}*{{#var:offspring_rate}}*{{#show: {{#var:animal}}|? | + | | {{#expr:60*{{#show: {{#var:animal}}|?Juvenile Age#}}*{{#var:offspring_rate}}*{{#show: {{#var:animal}}|?Base Hunger Rate#}}*1.6*0.4}} |
}}<!-- | }}<!-- | ||
Juveniles consume 0.75 times the amount of adults | Juveniles consume 0.75 times the amount of adults | ||
-->{{#vardefine:juvenile_consumption | -->{{#vardefine:juvenile_consumption | ||
− | | {{#expr:(60*({{#show: {{#var:animal}}|?Maturity Age#}} - {{#show: {{#var:animal}}|?Juvenile Age#}})*{{#var:offspring_rate}})*{{#show: {{#var:animal}}|? | + | | {{#expr:(60*({{#show: {{#var:animal}}|?Maturity Age#}} - {{#show: {{#var:animal}}|?Juvenile Age#}})*{{#var:offspring_rate}})*{{#show: {{#var:animal}}|?Base Hunger Rate#}}*1.6*0.75}} |
}}<!-- | }}<!-- | ||
If the babies are slaughtered, only the parent's consumption is counted, but if the offspring live to adulthood, their consumption as babies and juveniles is also counted. | If the babies are slaughtered, only the parent's consumption is counted, but if the offspring live to adulthood, their consumption as babies and juveniles is also counted. | ||
--> | --> | ||
− | {{#ifeq: {{#var:slaughter_age}} | | + | {{#ifeq: {{lc:{{#var:slaughter_age}}}} | baby | {{#var:parent_consumption}} | {{#expr:{{#var:parent_consumption}} + {{#var:baby_consumption}} + {{#var:juvenile_consumption}}}}}} |
</includeonly><noinclude> | </includeonly><noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 10:05, 27 September 2021
Returns the nutrition consumed per day for a set number of breeding adults. 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 continue to consume up until adulthood, or whether they are slaughtered immediately upon birth. 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[edit]
Single inexplicably pregnant mare[edit]
{{Nutrition Consumption| Horse | Adult}}
result: 1.6753423423423
5 mares, 5 stallions[edit]
{{Nutrition Consumption| Horse | Adult | 5 | 5 }}
result: 11.776711711712
Chick slaughter[edit]
{{Nutrition Consumption| Chicken | Baby}}
result: 0.224
Chicken slaughter[edit]
{{Nutrition Consumption| Chicken | Adult}}
result: 1.67552
See also: Template:Meat Production
The above documentation is transcluded from Template:Nutrition Consumption/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. |