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

From RimWorld Wiki
Jump to navigation Jump to search
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{Graph:Chart|width=400
+
<includeonly><!--
 +
-->{{#vardefine: set1armor1good | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.15 * {{{set1armor1|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set1armor2good | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.15 * {{{set1armor2|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set1armor3good | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.15 * {{{set1armor3|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set1armor4good | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.15 * {{{set1armor4|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor1good | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.15 * {{{set2armor1|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor2good | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.15 * {{{set2armor2|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor3good | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.15 * {{{set2armor3|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor4good | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.15 * {{{set2armor4|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
--><!--
 +
-->{{#vardefine: set1armor1excellent | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.3 * {{{set1armor1|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set1armor2excellent | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.3 * {{{set1armor2|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set1armor3excellent | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.3 * {{{set1armor3|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set1armor4excellent | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.3 * {{{set1armor4|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor1excellent | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.3 * {{{set2armor1|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor2excellent | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.3 * {{{set2armor2|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor3excellent | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.3 * {{{set2armor3|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor4excellent | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.3 * {{{set2armor4|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
--><!--
 +
-->{{#vardefine: set1armor1masterwork | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.45 * {{{set1armor1|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set1armor2masterwork | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.45 * {{{set1armor2|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set1armor3masterwork | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.45 * {{{set1armor3|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set1armor4masterwork | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.45 * {{{set1armor4|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor1masterwork | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.45 * {{{set2armor1|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor2masterwork | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.45 * {{{set2armor2|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor3masterwork | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.45 * {{{set2armor3|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor4masterwork | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.45 * {{{set2armor4|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
--><!--
 +
-->{{#vardefine: set1armor1legendary | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.8 * {{{set1armor1|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set1armor2legendary | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.8 * {{{set1armor2|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set1armor3legendary | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.8 * {{{set1armor3|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set1armor4legendary | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.8 * {{{set1armor4|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor1legendary | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.8 * {{{set2armor1|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor2legendary | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.8 * {{{set2armor2|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor3legendary | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.8 * {{{set2armor3|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{#vardefine: set2armor4legendary | {{#ifexpr: {{#vardefineecho: tempArmor|{{#expr:1.8 * {{{set2armor4|0}}} }}}} > 199.9|199.9|{{#var:tempArmor}}}}}}<!--
 +
-->{{Graph:Chart|width=400
 
|height=150
 
|height=150
 +
|title=Protection comparison between {{{set1name|}}} and {{{set2name|}}}
 
|type=line
 
|type=line
|colors = {{{color|blue, red, green, black}}}
+
|colors = {{{color|red, blue, #b9cc76, #92bf5e, #5dad5a, #1a9850, #006837, black}}}
 
|xAxisTitle={{{damageType|Weapon}}} AP
 
|xAxisTitle={{{damageType|Weapon}}} AP
|xAxisMin = 0
+
|xAxisMin = 5
 
|xAxisMax = {{{xAxisMax|70}}}
 
|xAxisMax = {{{xAxisMax|70}}}
 
|yAxisTitle= Which offers more protection
 
|yAxisTitle= Which offers more protection
Line 12: Line 49:
 
|yGrid=
 
|yGrid=
 
|legend=
 
|legend=
|x= 0, 1, 2,
+
|x= 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 02:56, 7 December 2024

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

Parameters[edit]

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[edit]

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