Difference between revisions of "Template:Apparel Material Table"

From RimWorld Wiki
Jump to navigation Jump to search
m (note always below the table)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>==Material Table==
+
<includeonly>== Material table ==
 
{{#vardefine:name | {{{ 1 | {{PAGENAME}}}}} }}
 
{{#vardefine:name | {{{ 1 | {{PAGENAME}}}}} }}
{{#vardefine:armorsharp|{{formatnum:{{Q|{{#var:name}}|Armor Factor - Sharp}}|R}}}}{{#vardefine:armorblunt|{{formatnum:{{Q|{{#var:name}}|Armor Factor - Blunt}}|R}}}}{{#vardefine:armorheat|{{formatnum:{{Q|{{#var:name}}|Armor Factor - Sharp}}|R}}}}{{#vardefine:HP|{{formatnum:{{Q|{{#var:name}}|Max Hit Points Base}}|R}}}}{{#vardefine:insulationheat|{{formatnum:{{Q|{{#var:name}}|Insulation Factor - Heat}}|R}}}}{{#vardefine:insulationcold|{{formatnum:{{Q|{{#var:name}}|Insulation Factor - Cold}}|R}}}}{{#vardefine:value|{{formatnum:{{Q|{{#var:name}}|Market Value Base}}|R}}}}{{#vardefine:stufftags|{{Q|{{#var:name}}|Stuff Tags}}}}
+
{{#vardefine:armorsharp|{{formatnum:{{Q|{{#var:name}}|Armor Factor - Sharp}}|R}}}}{{#vardefine:armorblunt|{{formatnum:{{Q|{{#var:name}}|Armor Factor - Blunt}}|R}}}}{{#vardefine:armorheat|{{formatnum:{{Q|{{#var:name}}|Armor Factor - Sharp}}|R}}}}{{#vardefine:HP|{{formatnum:{{Q|{{#var:name}}|Max Hit Points Base}}|R}}}}{{#vardefine:insulationheat|{{formatnum:{{Q|{{#var:name}}|Insulation Factor - Heat}}|R}}}}{{#vardefine:insulationcold|{{formatnum:{{Q|{{#var:name}}|Insulation Factor - Cold}}|R}}}}{{#vardefine:stufftags|{{lc:{{Q|{{#var:name}}|Stuff Tags}}}}}}
 
<div><li style="display: inline-table;">
 
<div><li style="display: inline-table;">
 
{| {{STDT|sortable c_03 text-center}}
 
{| {{STDT|sortable c_03 text-center}}
|-
 
 
! Material
 
! Material
 
! data-sort-type="number" | Sharp
 
! data-sort-type="number" | Sharp
Line 13: Line 12:
 
! data-sort-type="number" | Insulation - Heat
 
! data-sort-type="number" | Insulation - Heat
 
! data-sort-type="number" | Market Value
 
! data-sort-type="number" | Market Value
|-
+
<!-- #pos returns 0 if its at the first place in the string, thus an {{#if:{{#pos:{{#var:stufftags}}|Leathery|}} fails to detect leathery if its the first vs a null response. This just tests that it doesn't return nothing essentially. -->
<!---#pos returns 0 if its at the first place in the string, thus an {{#if:{{#pos:{{#var:stufftags}}|Leathery|}} fails to detect leathery if its the first vs a null response. This just tests that it doesn't return nothing essentially. --->  
+
{{#ifeq: | {{#pos:{{#var:stufftags}}|leathery|}} ||
{{#ifeq: | {{#pos:{{#var:stufftags}}|Leathery|}}||  
+
  {{#ask: [[Stuff Category::Leathery]]
{{Apparel Material Table Row |Bearskin}}
+
    | format = template
{{Apparel Material Table Row |Birdskin}}
+
    | template = Apparel Material Table Row
{{Apparel Material Table Row |Bluefur}}
+
    | link = none
{{Apparel Material Table Row |Camelhide}}
+
}} }}<!--
{{Apparel Material Table Row |Chinchilla fur}}
+
-->{{#ifeq: | {{#pos:{{#var:stufftags}}|fabric|}} ||
{{Apparel Material Table Row |Dog leather}}
+
  {{#ask: [[Stuff Category::Fabric]]
{{Apparel Material Table Row |Elephant leather}}
+
    | format = template
{{Apparel Material Table Row |Foxfur}}
+
    | template = Apparel Material Table Row
{{Apparel Material Table Row |Guinea pig fur}}
+
    | link = none
{{Apparel Material Table Row |Heavy fur}}
+
}} }}<!--
{{Apparel Material Table Row |Human leather}}
+
-->{{#ifeq: | {{#pos:{{#var:stufftags}}|woody|}} ||
{{Apparel Material Table Row |Lightleather}}
+
  {{#ask: [[Stuff Category::Woody]]
{{Apparel Material Table Row |Lizardskin}}
+
    | format = template
{{Apparel Material Table Row |Panthera fur}}
+
    | template = Apparel Material Table Row
{{Apparel Material Table Row |Patchleather}}
+
    | link = none
{{Apparel Material Table Row |Pigskin}}
+
}} }}<!--
{{Apparel Material Table Row |Plainleather}}
+
-->{{#ifeq: | {{#pos:{{#var:stufftags}}|stony|}} ||
{{Apparel Material Table Row |Rhinoceros leather}}
+
  {{#ask: [[Stuff Category::Stony]]
{{Apparel Material Table Row |Thrumbofur}}
+
    | format = template
{{Apparel Material Table Row |Wolfskin}}
+
    | template = Apparel Material Table Row
}}
+
    | link = none
|-
+
}} }}<!--
{{#ifeq: | {{#pos:{{#var:stufftags}}|Fabric|}}||  
+
-->{{#ifeq: | {{#pos:{{#var:stufftags}}|metallic|}} ||
{{Apparel Material Table Row |Alpaca wool}}
+
  {{#ask: [[Stuff Category::Metallic]]
{{Apparel Material Table Row |Bison wool}}
+
    | format = template
{{Apparel Material Table Row |Cloth}}
+
    | template = Apparel Material Table Row
{{Apparel Material Table Row |Devilstrand}}
+
    | link = none
{{Apparel Material Table Row |Hyperweave}}
+
}} }}
{{Apparel Material Table Row |Megasloth wool}}
 
{{Apparel Material Table Row |Muffalo wool}}
 
{{Apparel Material Table Row |Sheep wool}}
 
{{Apparel Material Table Row |Synthread}}
 
}}
 
|-
 
{{#ifeq: | {{#pos:{{#var:stufftags}}|Woody|}}||  
 
{{Apparel Material Table Row |Wood}}
 
}}
 
|-
 
{{#ifeq: | {{#pos:{{#var:stufftags}}|Stony|}}||
 
{{Apparel Material Table Row |Granite blocks}}
 
{{Apparel Material Table Row |Limestone blocks}}
 
{{Apparel Material Table Row |Marble blocks}}
 
{{Apparel Material Table Row |Sandstone blocks}}
 
{{Apparel Material Table Row |Slate blocks}}
 
{{Apparel Material Table Row |Jade}}
 
}}
 
|-
 
{{#ifeq: | {{#pos:{{#var:stufftags}}|Metallic|}}||  
 
{{Apparel Material Table Row |Gold}}
 
{{Apparel Material Table Row |Plasteel}}
 
{{Apparel Material Table Row |Silver}}
 
{{Apparel Material Table Row |Steel}}
 
{{Apparel Material Table Row |Uranium}}
 
}}
 
|-
 
 
|}
 
|}
<sup>Assuming Normal quality, for the effect of other qualities, see [[Quality]].</sup> </li></div></includeonly><noinclude>
+
<br/><sup>Assuming Normal quality, for the effect of other qualities, see [[Quality]].</sup></li></div></includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 00:29, 14 December 2022

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

Description[edit]

This template generates a table summarizing stats for a piece of apparel, including Sharp, Blunt and Heat armor, heat and cold insulation, HP, and Market Value, for the variety of different materials available for it.

The template will automatically detect the material types applicable to the item using the Stuff Tags variable in the infobox and display them. The item must be stuffable and must have the correct Resource X/Resource X Amount parameters in addition to the Stuff Tags, and Resource 1 must be set to "Stuff".

Note that it will automatically add the appropriate heading.

This template is dependent on Template:Apparel Material Table Row.

This template supersedes and merges Template:Clothing material table and Template:Armor material table, but they will be maintained at least until replacement is complete. Lifespan may be extended to ensure Page History integrity.

Parameters[edit]

The first parameter (if present) will specify which piece of apparel to generate the template for. If absent, {{PAGENAME}} will be used.

Example usage[edit]

{{Apparel Material Table}}

on the Plate armor page would produce:

Material table

  • Material Sharp Blunt Heat Item HP Insulation - Cold Insulation - Heat Market Value
    Wooden Plate armor 39.42% 39.42% 29.2% 188.5 -8 °C (-14.4 °F) +0 °C (0 °F) 300 Silver
    Bioferrite Plate armor 80.3% 36.5% 36.5% 580 -2.5 °C (-4.5 °F) +0 °C (0 °F) 470 Silver
    Golden Plate armor 52.56% 26.28% 26.28% 174 -3 °C (-5.4 °F) +0 °C (0 °F) 17125 Silver
    Plasteel Plate armor 83.22% 40.15% 47.45% 812 -3 °C (-5.4 °F) +0 °C (0 °F) 1830 Silver
    Silver Plate armor 52.56% 26.28% 26.28% 203 -3 °C (-5.4 °F) +0 °C (0 °F) 1835 Silver
    Steel Plate armor 65.7% 32.85% 43.8% 290 -3 °C (-5.4 °F) +0 °C (0 °F) 460 Silver
    Uranium Plate armor 78.84% 39.42% 47.45% 725 -3 °C (-5.4 °F) +0 °C (0 °F) 1280 Silver

    Assuming Normal quality, for the effect of other qualities, see Quality.
  • {{Apparel Material Table | Duster}}
    

    on any page would produce:

    Material table

  • Material Sharp Blunt Heat Item HP Insulation - Cold Insulation - Heat Market Value
    Bearskin Duster 33.6% 7.2% 45% 260 -12 °C (-21.6 °F) +17 °C (30.6 °F) 310 Silver
    Birdskin Duster 20.1% 4.2% 45% 200 -6 °C (-10.8 °F) +8.5 °C (15.3 °F) 180 Silver
    Bluefur Duster 24.3% 7.2% 45% 260 -12 °C (-21.6 °F) +13.6 °C (24.5 °F) 220 Silver
    Camelhide Duster 24.3% 7.2% 45% 260 -9.6 °C (-17.3 °F) +20.4 °C (36.7 °F) 220 Silver
    Chinchilla fur Duster 20.1% 4.2% 45% 200 -18 °C (-32.4 °F) +13.6 °C (24.5 °F) 555 Silver
    Dog leather Duster 24.3% 7.2% 45% 260 -8.4 °C (-15.1 °F) +13.6 °C (24.5 °F) 196 Silver
    Dread leather Duster 38.1% 7.2% 45% 270 -12 °C (-21.6 °F) +10.2 °C (18.4 °F) 315 Silver
    Elephant leather Duster 33.6% 7.2% 45% 300 -8.4 °C (-15.1 °F) +10.2 °C (18.4 °F) 230 Silver
    Foxfur Duster 24.3% 6.3% 45% 200 -12 °C (-21.6 °F) +13.6 °C (24.5 °F) 315 Silver
    Guinea pig fur Duster 20.1% 4.2% 45% 120 -22.8 °C (-41 °F) +15.3 °C (27.5 °F) 435 Silver
    Heavy fur Duster 37.2% 7.2% 45% 300 -18 °C (-32.4 °F) +11.9 °C (21.4 °F) 300 Silver
    Human leather Duster 19.2% 7.2% 45% 260 -7.2 °C (-13 °F) +10.2 °C (18.4 °F) 370 Silver
    Lightleather Duster 16.2% 4.2% 45% 200 -7.2 °C (-13 °F) +10.2 °C (18.4 °F) 188 Silver
    Lizardskin Duster 24.3% 8.1% 45% 200 -7.2 °C (-13 °F) +10.2 °C (18.4 °F) 205 Silver
    Panthera fur Duster 27.9% 7.2% 45% 260 -9.6 °C (-17.3 °F) +20.4 °C (36.7 °F) 275 Silver
    Patchleather Duster 13.5% 5.7% 27% 200 -5.4 °C (-9.7 °F) +7.65 °C (13.8 °F) 156 Silver
    Pigskin Duster 19.2% 7.2% 45% 260 -7.2 °C (-13 °F) +10.2 °C (18.4 °F) 188 Silver
    Plainleather Duster 24.3% 7.2% 45% 260 -9.6 °C (-17.3 °F) +13.6 °C (24.5 °F) 205 Silver
    Rhinoceros leather Duster 38.7% 7.2% 45% 300 -8.4 °C (-15.1 °F) +11.9 °C (21.4 °F) 370 Silver
    Thrumbofur Duster 62.4% 10.8% 45% 400 -20.4 °C (-36.7 °F) +18.7 °C (33.7 °F) 1155 Silver
    Wolfskin Duster 30.6% 7.2% 45% 260 -14.4 °C (-25.9 °F) +13.6 °C (24.5 °F) 275 Silver
    Alpaca wool Duster 10.8% 0% 33% 200 -18 °C (-32.4 °F) +13.6 °C (24.5 °F) 340 Silver
    Bison wool Duster 10.8% 0% 33% 200 -15.6 °C (-28.1 °F) +10.2 °C (18.4 °F) 250 Silver
    Cloth Duster 10.8% 0% 5.4% 200 -10.8 °C (-19.4 °F) +15.3 °C (27.5 °F) 156 Silver
    Devilstrand Duster 42% 10.8% 90% 260 -12 °C (-21.6 °F) +20.4 °C (36.7 °F) 475 Silver
    Hyperweave Duster 60% 16.2% 86.4% 480 -15.6 °C (-28.1 °F) +22.1 °C (39.8 °F) 755 Silver
    Megasloth wool Duster 24% 0% 33% 200 -20.4 °C (-36.7 °F) +10.2 °C (18.4 °F) 250 Silver
    Muffalo wool Duster 10.8% 0% 33% 200 -16.8 °C (-30.2 °F) +10.2 °C (18.4 °F) 250 Silver
    Sheep wool Duster 10.8% 0% 33% 200 -15.6 °C (-28.1 °F) +8.5 °C (15.3 °F) 250 Silver
    Synthread Duster 28.2% 7.8% 27% 260 -13.2 °C (-23.8 °F) +18.7 °C (33.7 °F) 355 Silver

    Assuming Normal quality, for the effect of other qualities, see Quality.