Difference between revisions of "Template:Animals/Row"

From RimWorld Wiki
Jump to navigation Jump to search
(added nutrition efficiency columns)
Line 7: Line 7:
 
Example:
 
Example:
 
{| {{STDT| sortable c_08 text-center}}
 
{| {{STDT| sortable c_08 text-center}}
! Animal !! Type !! Wildness !! Min. Handling Skill  !! Guard !! Attack !! Rescue !! Haul !! Diet !! Hunger Rate<ref>Nutrition lost per day.</ref>!! Average DPS !! Move Speed !! Manhunter<br>(Hunt) !! Manhunter<br>(Tame) !! Filth Rate<ref>The average amount of filth produced on constructed floors per 1000 cells walked.</ref>!! Meat Yield<ref>Amounts given are at 100% butchery efficiency.</ref>!! Leather Yield<ref>Amounts given are at 100% butchery efficiency.</ref>!! Market Value !! Life Expectancy (Years) !! Maturity Age (Years) !! Gestation Period (Days)<ref>For egglayers, this is both the incubation period and the egg-laying interval.</ref> !! Nuzzle Interval (Hours)<ref>Mean time between nuzzles.</ref>
+
! Animal !! Type !! Wildness !! Min. Handling Skill  !! Guard !! Attack !! Rescue !! Haul !! Diet !! Hunger Rate<ref>Nutrition lost per day.</ref>!! Average DPS !! Move Speed !! Manhunter<br>(Hunt) !! Manhunter<br>(Tame) !! Filth Rate<ref>The average amount of filth produced on constructed floors per 1000 cells walked.</ref>!! Meat Yield<ref>Amounts given are at 100% butchery efficiency.</ref>!! Leather Yield<ref>Amounts given are at 100% butchery efficiency.</ref>!! Market Value !! Life Expectancy (Years) !! Maturity Age (Years) !! Gestation Period (Days)<ref>For egglayers, this is both the incubation period and the egg-laying interval.</ref> !! Nuzzle Interval (Hours)<ref>Mean time between nuzzles.</ref> !! Nutrition Efficiency (adult slaughter)<ref name=nutr_eff>Nutrition out from meat and milk for each nutrition in, calculated for a system of 9 adult females and 1 adult male, with the assumptions of constant pregnancy and immediate milking.</ref> !! Nutrition Efficiency (baby slaughter)<ref name=nutr_eff/>
 
|-{{Animals/Row|Yorkshire terrier}}
 
|-{{Animals/Row|Yorkshire terrier}}
 
|}
 
|}
 
</noinclude><includeonly>
 
</noinclude><includeonly>
 +
<!--Nutrition efficiency calculation-->
 +
{{#vardefine:default_animal|Horse}}{{#vardefine:females|9}}{{#vardefine:males|1}}{{#vardefine:baby_scale
 +
| {{#switch: {{{1|{{#show:{{#var:default_animal}}|?Name}}}}}
 +
  | Chicken|Duck|Turkey|Goose|Cassowary|Emu|Ostrich = 0.1
 +
  | #default = 0.2
 +
  }}
 +
}}
 +
{{#vardefine:pre_curve_baby_meat
 +
| {{#expr:140*{{#show: {{{1|{{#var:default_animal}}}}}|?Body Size#}}*{{#var:baby_scale}}}}
 +
}}
 +
{{#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}}}}
 +
    }}
 +
  }}
 +
}}
 +
{{#vardefine:offspring_rate
 +
| {{#switch: true
 +
  | {{#if: {{#show: {{{1|{{#var:default_animal}}}}}|?Eggs Per Clutch Average#}}| true | false}} = {{#expr:{{#var:females}}*{{#show: {{{1|{{#var:default_animal}}}}}|?Eggs Per Clutch Average#}}/{{#show: {{{1|{{#var:default_animal}}}}}|?Egg Laying Interval#}}}}
 +
  | {{#if: {{#show: {{{1|{{#var:default_animal}}}}}|?Average Offspring Per Birth#}}| true | false}} = {{#expr:{{#var:females}}*{{#if: {{#show: {{{1|{{#var:default_animal}}}}}|?Average Offspring Per Birth#}} | {{#show: {{{1|{{#var:default_animal}}}}}|?Average Offspring Per Birth#}} | 1}}/{{#show: {{{1|{{#var:default_animal}}}}}|?Gestation Period Days#}}}}
 +
  | #default = 0
 +
  }}
 +
}}
 +
{{#vardefine:milk_nutrition_production
 +
| {{#if: {{#show: {{{1|{{#var:default_animal}}}}}|?Milk Amount#}}
 +
    | {{#expr:{{#var:females}}*{{#show: {{{1|{{#var:default_animal}}}}}|?Milk Amount#}}/{{#show: {{{1|{{#var:default_animal}}}}}|?Milking Interval Days#}}*0.05}}
 +
    | 0
 +
  }}
 +
}}
 +
{{#vardefine:baby_slaughter_production
 +
| {{#expr:{{#var:offspring_rate}}*0.05*{{#var:baby_meat}} + {{#var:milk_nutrition_production}}}}
 +
}}{{#vardefine:baby_slaughter_consumption
 +
| {{#expr:(({{#var:females}} + {{#var:males}})*{{#show: {{{1|{{#var:default_animal}}}}}|?Base Hunger Rate#}}*1.6)}}
 +
}}
 +
{{#vardefine:adult_slaughter_production
 +
| {{#expr:({{#var:offspring_rate}}*0.05*{{#show: {{{1|{{#var:default_animal}}}}}|?Meat Yield#}} + {{#var:milk_nutrition_production}})}}
 +
}}
 +
{{#vardefine:adult_slaughter_consumption
 +
| {{#expr:({{#var:females}} + {{#var:males}})*{{#show: {{{1|{{#var:default_animal}}}}}|?Base Hunger Rate#}}*1.6 + 60*{{#show: {{{1|{{#var:default_animal}}}}}|?Juvenile Age#}}*{{#var:offspring_rate}}*{{#show: {{{1|{{#var:default_animal}}}}}|?Base Hunger Rate#}}*1.6*0.4 + (60*({{#show: {{{1|{{#var:default_animal}}}}}|?Maturity Age#}} - {{#show: {{{1|{{#var:default_animal}}}}}|?Juvenile Age#}})*{{#var:offspring_rate}})*{{#show: {{{1|{{#var:default_animal}}}}}|?Base Hunger Rate#}}*1.6*0.75}}
 +
}}
 +
<!--Actual row-->
 
![[{{{1|Wild boar}}}]]
 
![[{{{1|Wild boar}}}]]
 
| {{#show: {{{1|Wild boar}}}|?Type#}}
 
| {{#show: {{{1|Wild boar}}}|?Type#}}
Line 41: Line 85:
 
| {{#show: {{{1|Wild boar}}}|?Gestation Period Days#}}
 
| {{#show: {{{1|Wild boar}}}|?Gestation Period Days#}}
 
| {{#if: {{#show: {{{1|Wild boar}}}|?Nuzzle Mtb Hours#}}|{{#show: {{{1|Wild boar}}}|?Nuzzle Mtb Hours#}}|Never}}
 
| {{#if: {{#show: {{{1|Wild boar}}}|?Nuzzle Mtb Hours#}}|{{#show: {{{1|Wild boar}}}|?Nuzzle Mtb Hours#}}|Never}}
 +
| {{#iferror: {{#expr:{{#var:adult_slaughter_production}}/{{#var:adult_slaughter_consumption}} round 2}} | NA}}
 +
| {{#iferror: {{#expr:{{#var:baby_slaughter_production}}/{{#var:baby_slaughter_consumption}} round 2}} | NA}}
 
</includeonly>
 
</includeonly>
 
<noinclude>[[Category:Customized table templates]]</noinclude>
 
<noinclude>[[Category:Customized table templates]]</noinclude>

Revision as of 19:36, 6 September 2021

This template pulls the data from each animal's individual page and formats it into a neat row summary. It is only intended for use on the List of animals page.

Usage: {{Animals/Row|*name*}}

The template takes a single parameter, the name of the animal being referenced, which must be the exact name of the animal's main page. The parameter defaults to "Wild boar" if not given - used for testing/preview.

Example:

Animal Type Wildness Min. Handling Skill Guard Attack Rescue Haul Diet Hunger Rate[1] Average DPS Move Speed Manhunter
(Hunt)
Manhunter
(Tame)
Filth Rate[2] Meat Yield[3] Leather Yield[4] Market Value Life Expectancy (Years) Maturity Age (Years) Gestation Period (Days)[5] Nuzzle Interval (Hours)[6] Nutrition Efficiency (adult slaughter)[7] Nutrition Efficiency (baby slaughter)[7]
Yorkshire terrier Animal 0% 0 Check.png Check.png Ex.png Ex.png 0.24 1.09 3.1 0% 0% 1 45 20 100 15 0.3 10 12 0.55 0.62


  1. Nutrition lost per day.
  2. The average amount of filth produced on constructed floors per 1000 cells walked.
  3. Amounts given are at 100% butchery efficiency.
  4. Amounts given are at 100% butchery efficiency.
  5. For egglayers, this is both the incubation period and the egg-laying interval.
  6. Mean time between nuzzles.
  7. 7.0 7.1 Nutrition out from meat and milk for each nutrition in, calculated for a system of 9 adult females and 1 adult male, with the assumptions of constant pregnancy and immediate milking.