Difference between revisions of "Template:Apparel Protection Chart/Quality Generator"

From RimWorld Wiki
Jump to navigation Jump to search
Line 1: Line 1:
<includeonly>{{Apparel Protection Chart
+
<includeonly>{{#vardefine:armorName|{{{1|{{PAGENAME}}}}}}}{{Apparel Protection Chart
|set1name = Awful {{{1|}}} ({{{2|}}})      | set1armor1 = {{#expr:0.60 * {{#vardefineecho: baseArmor|{{Q|{{{1|}}}|Armor - {{ucfirst:{{{2|Sharp}}}}}}}}}}}
+
|set1name = Awful {{#var:armorName}} ({{{2|}}})      | set1armor1 = {{#expr:0.60 * {{#vardefineecho: baseArmor|{{Q|{{#var:armorName}}|Armor - {{ucfirst:{{{2|Sharp}}}}}}}}}}}
| set2name = Poor {{{1|}}} ({{{2|}}})      | set2armor1 = {{#expr:0.80 * {{#var: baseArmor}} }}
+
| set2name = Poor {{#var:armorName}} ({{{2|}}})      | set2armor1 = {{#expr:0.80 * {{#var: baseArmor}} }}
| set3name = Normal {{{1|}}} ({{{2|}}})    | set3armor1 = {{#var: baseArmor}}
+
| set3name = Normal {{#var:armorName}} ({{{2|}}})    | set3armor1 = {{#var: baseArmor}}
| set4name = Good {{{1|}}} ({{{2|}}})      | set4armor1 = {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.15 * {{#var: baseArmor}} }}}} > 200|200|{{#var:tempArmor}}}}
+
| set4name = Good {{#var:armorName}} ({{{2|}}})      | set4armor1 = {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.15 * {{#var: baseArmor}} }}}} > 200|200|{{#var:tempArmor}}}}
| set5name = Excellent {{{1|}}} ({{{2|}}})  | set5armor1 = {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.30 * {{#var: baseArmor}} }}}} > 200|200|{{#var:tempArmor}}}}
+
| set5name = Excellent {{#var:armorName}} ({{{2|}}})  | set5armor1 = {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.30 * {{#var: baseArmor}} }}}} > 200|200|{{#var:tempArmor}}}}
| set6name = Masterwork {{{1|}}} ({{{2|}}}) | set6armor1 = {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.45 * {{#var: baseArmor}} }}}} > 200|200|{{#var:tempArmor}}}}
+
| set6name = Masterwork {{#var:armorName}} ({{{2|}}}) | set6armor1 = {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.45 * {{#var: baseArmor}} }}}} > 200|200|{{#var:tempArmor}}}}
| set7name = Legendary {{{1|}}} ({{{2|}}})  | set7armor1 = {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.80 * {{#var: baseArmor}} }}}} > 200|200|{{#var:tempArmor}}}}
+
| set7name = Legendary {{#var:armorName}} ({{{2|}}})  | set7armor1 = {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.80 * {{#var: baseArmor}} }}}} > 200|200|{{#var:tempArmor}}}}
 
}}</includeonly><noinclude>{{Documentation}}</noinclude>
 
}}</includeonly><noinclude>{{Documentation}}</noinclude>

Revision as of 05:56, 5 April 2023

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

Used to instead to automatically display each quality of the armor for a given damage class using the Template:Apparel Protection Chart as the base.

Parameters

The first parameter is used to define the item to create the chart for. If no name is selected, it will default to PAGENAME.

The first parameter is used to define the armor type to create the chart for. If no name is selected, it will default to Sharp.

Examples

{{Apparel Protection Chart/Quality Generator|Flak vest|Blunt}}
{{Apparel Protection Chart/Quality Generator|Recon helmet}}