Difference between revisions of "Template:Animals/Row"

From RimWorld Wiki
Jump to navigation Jump to search
m
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>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.
+
<includeonly>
 
+
<!-- Offspring per year calculation -->
Usage:  <code><nowiki>{{Animals/Row|*name*}}</nowiki></code>
 
 
 
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 "Horse" if not given - used for testing/preview.
 
 
 
Example:
 
{| {{STDT| sortable c_08 text-center}}
 
! Animal !! Min. Handling Skill  !! Guard !! Attack !! Rescue !! Haul !! Diet !! Blocked by Fences !! Hunger Rate<ref>Nutrition lost per day.</ref>!! data-sort-type=number|Offspring Per Year !! data-sort-type=number|Meat Yield !! data-sort-type=number|Leather Yield !! Average DPS !! Move Speed !! Health Scale !! <abbr title="Chance of revenge when harmed">Manhunter<br>(Hunt)</abbr> !! <abbr title="Chance of revenge on a failed tame attempt">Manhunter<br>(Tame)</abbr> !! <abbr title="Nutrition of meat and milk out for each nutrition in, when babies are slaughtered, for a ratio of 4:1 females:males, and assuming constant pregnancy and immediate milking>Nutrition Efficiency (Baby Slaughter)</abbr> !! <abbr title="Nutrition of meat and milk out for each nutrition in, when adults are slaughtered, for a ratio of 4:1 females:males, and assuming constant pregnancy and immediate milking>Nutrition Efficiency (Adult Slaughter)</abbr>
 
|-
 
{{Animals/Row|Warg}}
 
|}
 
</noinclude><includeonly>
 
<!--Offspring per year calculation-->
 
 
{{#if:{{#vardefineecho:gestation|{{#show:{{{?Name|{{{1}}}}}}|?Egg Laying Interval }}}}
 
{{#if:{{#vardefineecho:gestation|{{#show:{{{?Name|{{{1}}}}}}|?Egg Laying Interval }}}}
 
   |  
 
   |  
Line 25: Line 13:
 
   }}
 
   }}
 
}}
 
}}
<!--Nutrition efficiency calculation-->
+
<!-- Nutrition efficiency calculation -->
 
{{#vardefine:females|4}}{{#vardefine:males|1}}
 
{{#vardefine:females|4}}{{#vardefine:males|1}}
 
{{#vardefine:milk_nutrition_production
 
{{#vardefine:milk_nutrition_production
Line 44: Line 32:
 
  | {{Nutrition Consumption| {{{?Name|{{{1|Horse}}} }}} | Adult | {{#var:females}} | {{#var:males}}}}
 
  | {{Nutrition Consumption| {{{?Name|{{{1|Horse}}} }}} | Adult | {{#var:females}} | {{#var:males}}}}
 
}}
 
}}
<!--Actual row-->
+
<!-- Actual row -->
![[{{{?Name|{{{1|Horse}}} }}}]]
+
![[{{{?Name|{{{1|Horse}}} }}}]]<br>[[{{#show:{{{?Name|{{{1|Horse}}} }}}|?Image#}}|32px]]
 
| {{#show: {{{?Name|{{{1|Horse}}} }}}|?Minimum Handling Skill#}}
 
| {{#show: {{{?Name|{{{1|Horse}}} }}}|?Minimum Handling Skill#}}
| {{#switch: {{#show: {{{?Name|{{{1|Horse}}} }}}|?Can Train Guard#}} | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
+
| {{#switch: {{#show: {{{?Name|{{{1|Horse}}} }}}|?Can Train Guard#}} | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
| {{#switch: {{#show: {{{?Name|{{{1|Horse}}} }}}|?Can Train Attack#}}   | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
+
| {{#switch: {{#show: {{{?Name|{{{1|Horse}}} }}}|?Can Train Attack#}} | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
| {{#switch: {{#show: {{{?Name|{{{1|Horse}}} }}}|?Can Train Rescue#}}   | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
+
| {{#switch: {{#show: {{{?Name|{{{1|Horse}}} }}}|?Can Train Rescue#}} | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
| {{#switch: {{#show: {{{?Name|{{{1|Horse}}} }}}|?Can Train Haul#}}     | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
+
| {{#switch: {{#show: {{{?Name|{{{1|Horse}}} }}}|?Can Train Haul#}}   | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
 
| {{#switch: {{#show: {{{?Name|{{{1|Horse}}} }}}|?Diet#}}
 
| {{#switch: {{#show: {{{?Name|{{{1|Horse}}} }}}|?Diet#}}
   | herbivorous = [[File:Potato plant.png|22px|Plants|link=]]
+
   | herbivorous =                   [[File:Potatoes.png|24px|Vegetables|link=Category:Vegetarian]]&nbsp;[[File:Potato plant.png|24px|Plants|link=]]
   | dendrovorous = [[File:Wood.png|24px|Wood|link=]]
+
   | dendrovorous =                   [[File:Woodlog b.png|24px|Trees|link=Trees]]
   | raw meat and corpses = [[File:MeatBig cropped.png|Meat|link=]][[File:DownedRefugee.png|32px|Corpses|link=]]
+
   | raw meat and corpses =           [[File:Meat big a.png|30px|Meat|link=Meat (disambiguation)]]&nbsp;[[File:DownedRefugee.png|24px|Corpses|link=Corpse]]
   | carnivorous = [[File:MeatBig cropped.png|Meat|link=]]
+
   | carnivorous =                   [[File:Meat big a.png|30px|Meat|link=Meat (disambiguation)]]
   | omnivorous = {{nowrap|[[File:MeatBig cropped.png|Meat|link=]]&nbsp;[[File:Potato plant.png|22px|Plants|link=]]}}
+
   | omnivorous =                     [[File:Meat big a.png|30px|Meat|link=Meat (disambiguation)]]&nbsp;[[File:Potatoes.png|24px|Vegetables|link=Category:Vegetarian]]
   | herbivorous and dendrovorous = {{nowrap|[[File:Potato plant.png|22px|Plants|link=]]&nbsp;[[File:Wood.png|24px|Wood|link=]]}}
+
  | omnivorous grazer =              [[File:Meat big a.png|30px|Meat|link=Meat (disambiguation)]]&nbsp;[[File:Potato plant.png|24px|Plants|link=]]&nbsp;[[File:Potatoes.png|24px|Vegetables|link=Category:Vegetarian]]
   | carnivorous and ovivorous = {{nowrap|[[File:MeatBig cropped.png|Meat|link=]]&nbsp;[[File:Eggs fertilized cropped.png|Eggs|link=]]}}
+
   | herbivorous and dendrovorous =   [[File:Potato plant.png|22px|Plants|link=]]&nbsp;[[File:Potatoes.png|24px|Vegetables|link=Category:Vegetarian]]&nbsp;[[File:Wood.png|24px|Trees|link=Trees]]
   | omnivorous and animal products
+
   | carnivorous and ovivorous =     [[File:Meat big a.png|30px|Meat|link=Meat (disambiguation)]]&nbsp;[[File:Egg fertilized.png|28px|Eggs|link=Eggs]]
   | omnivorous and ovivorous = {{nowrap|[[File:MeatBig cropped.png|Meat|link=]]&nbsp;[[File:Eggs fertilized cropped.png|Eggs|link=]]&nbsp;[[File:Potato plant.png|22px|Plants|link=]]}}
+
   | omnivorous and animal products = [[File:Meat big a.png|30px|Meat|link=Meat (disambiguation)]]&nbsp;[[File:Milk.png|Animal products|24px|link=Category:Animal Products]]&nbsp;[[File:Potatoes.png|24px|Vegetables|link=Category:Vegetarian]]
 +
   | omnivorous and ovivorous =       [[File:Meat big a.png|30px|Meat|link=Meat (disambiguation)]]&nbsp;[[File:Egg fertilized.png|28px|Eggs|link=Eggs]]&nbsp;[[File:Potatoes.png|24px|Vegetables|link=Category:Vegetarian]]
 
   | none = -
 
   | none = -
 
}}
 
}}
Line 76: Line 65:
 
| {{#iferror: {{#expr:{{#var:adult_slaughter_production}}/{{#var:adult_slaughter_consumption}} round 2}} | -}}
 
| {{#iferror: {{#expr:{{#var:adult_slaughter_production}}/{{#var:adult_slaughter_consumption}} round 2}} | -}}
 
|-
 
|-
</includeonly>
+
</includeonly><noinclude>{{Documentation}}</noinclude>
<noinclude>[[Category:Customized table templates]]</noinclude>
 

Revision as of 00:35, 1 December 2022

Documentation icon Template documentation[view] [edit] [history] [purge]

Summary

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.

Example

{| {{STDT| sortable c_08 text-center}}
! colspan="2" | Animal
! Min. Handling Skill
! Guard
! Attack
! Rescue
! Haul
! Diet
! [[Pen animal|Pens]]
! data-sort-type=number | Hunger Rate<ref>Nutrition lost per day.</ref>
! data-sort-type=number | Offspring Per Year
! data-sort-type=number | Meat Yield
! data-sort-type=number | Leather Yield
! data-sort-type=number | Average DPS
! Move Speed
! data-sort-type=number | Health Scale
! <abbr title="Chance of revenge when harmed">[[Mental break#Manhunter|Manhunter]]<br/>(Hunt)</abbr>
! <abbr title="Chance of revenge on a failed tame attempt">Manhunter<br/>(Tame)</abbr>
! data-sort-type=number | <abbr title="Nutrition of meat and milk out for each nutrition in, when babies are slaughtered, for a ratio of 4:1 females:males, and assuming constant pregnancy and immediate milking>Nutrition Efficiency (Baby Slaughter)</abbr>
! data-sort-type=number | <abbr title="Nutrition of meat and milk out for each nutrition in, when adults are slaughtered, for a ratio of 4:1 females:males, and assuming constant pregnancy and immediate milking>Nutrition Efficiency (Adult Slaughter)</abbr>
|-
{{Animals/Row|?Name=Horse}}
|-
{{Animals/Row|?Name=Yorkshire terrier}}
|}
<references/>
Animal Min. Handling Skill Guard Attack Rescue Haul Diet Pens Hunger Rate[1] Offspring Per Year Meat Yield Leather Yield Average DPS Move Speed Health Scale Manhunter
(Hunt)
Manhunter
(Tame)
Nutrition Efficiency (Baby Slaughter) Nutrition Efficiency (Adult Slaughter)
Horse
Horse east.png
1 Ex.png Ex.png Ex.png Ex.png Vegetables Plants Check.png 0.68 9 336 96 2.06 5.8 1.75 0% 0% 0.59 1.37
Yorkshire terrier
Yorkshireterrier east.png
0 Check.png Check.png Ex.png Ex.png Ex.png 0.24 11.6 45 20 1.09 3.1 0.4 0% 0% 0.55 0.53
  1. Nutrition lost per day.