Difference between revisions of "Template:Apparel Protection Compare Chart"

From RimWorld Wiki
Jump to navigation Jump to search
Line 1: Line 1:
{{#vardefine: set1armor1awful | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:0.6 * {{#var: set1armor1}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
+
 
{{#vardefine: set1armor2awful | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:0.6 * {{#var: set1armor2}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
+
<includeonly>
{{#vardefine: set1armor3awful | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:0.6 * {{#var: set1armor3}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
+
{{#vardefine: set1armor1awful | {{#expr:0.6 * {{#var: set1armor1}} }} }}
{{#vardefine: set1armor4awful | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:0.6 * {{#var: set1armor4}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
+
{{#vardefine: set1armor2awful | {{#expr:0.6 * {{#var: set1armor2}} }} }}
{{#vardefine: set2armor1awful | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:0.6 * {{#var: set2armor1}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
+
{{#vardefine: set1armor3awful | {{#expr:0.6 * {{#var: set1armor3}} }} }}
{{#vardefine: set2armor2awful | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:0.6 * {{#var: set2armor2}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
+
{{#vardefine: set1armor4awful | {{#expr:0.6 * {{#var: set1armor4}} }} }}
{{#vardefine: set2armor3awful | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:0.6 * {{#var: set2armor3}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
+
{{#vardefine: set2armor1awful | {{#expr:0.6 * {{#var: set2armor1}} }} }}
{{#vardefine: set2armor4awful | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:0.6 * {{#var: set2armor4}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
+
{{#vardefine: set2armor2awful | {{#expr:0.6 * {{#var: set2armor2}} }} }}
 +
{{#vardefine: set2armor3awful | {{#expr:0.6 * {{#var: set2armor3}} }} }}
 +
{{#vardefine: set2armor4awful | {{#expr:0.6 * {{#var: set2armor4}} }} }}
  
 
{{#vardefine: set1armor1poor | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:0.8 * {{#var: set1armor1}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
 
{{#vardefine: set1armor1poor | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:0.8 * {{#var: set1armor1}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
Line 52: Line 54:
 
{{#vardefine: set2armor3legendary | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.8 * {{#var: set2armor3}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
 
{{#vardefine: set2armor3legendary | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.8 * {{#var: set2armor3}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
 
{{#vardefine: set2armor4legendary | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.8 * {{#var: set2armor4}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
 
{{#vardefine: set2armor4legendary | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.8 * {{#var: set2armor4}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}
<includeonly>
 
 
{{Graph:Chart|width=400
 
{{Graph:Chart|width=400
 
|height=150
 
|height=150
 
|type=line
 
|type=line
|colors = {{{color|brown, pink, red, orange, yellow, green, cyan, blue, black}}}
+
|colors = {{{color|red, blue, orange, brown, lime, green, turquoise, purple, magenta, black}}}
 
|xAxisTitle={{{damageType|Weapon}}} AP
 
|xAxisTitle={{{damageType|Weapon}}} AP
 
|xAxisMin = 0
 
|xAxisMin = 0

Revision as of 15:15, 6 December 2024


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

Parameters

It takes 2 sets of 4 parameters:

  • set1name: the title for the 1st armor set to put in the legend
  • set1armor1: the armor rating at normal quality for the 1st (outermost) layer of the 1st set
  • set1armor2: the armor rating at normal quality for the 2nd layer of the 1st set
  • set1armor3: the armor rating at normal quality for the 3rd layer of the 1st set
  • set1armor4: the armor rating at normal quality for the 4th layer of the 1st set

Replace set1 with set2 to assign the parameters for the 2nd set.

This template is dependant on Template:Apparel AP Calculation

Example

{{Apparel Protection Compare Chart|set1name=Flak Vest and Devilstrand Duster | set1armor1=42| set1armor2=100| set2name=Marine Armor | set2armor1= 106 | damageType=Sharp }}