Difference between revisions of "Template:Weapon Stats Table"

From RimWorld Wiki
Jump to navigation Jump to search
(missed one)
(Replaced content with "<includeonly>==Quality table== {{#ifeq: {{Q|{{#vardefineecho:name| {{{ 1 | {{PAGENAME}} }}} }}|Mode}} | Melee | {{Weapon Quality Table/Melee|{{#var:name}}}}|{{Weapon Quali...")
Tag: Replaced
Line 1: Line 1:
 
<includeonly>==Quality table==
 
<includeonly>==Quality table==
{{#vardefine:name| {{{ 1 | {{PAGENAME}} }}} }}
+
{{#ifeq: {{Q|{{#vardefineecho:name| {{{ 1 | {{PAGENAME}} }}} }}|Mode}} | Melee | {{Weapon Quality Table/Melee|{{#var:name}}}}|{{Weapon Quality Table/Ranged|{{#var:name}}}}}}</includeonly> <noinclude>
{{#vardefine:mode| {{Q|{{#var:name}}|Mode}} }}
 
 
 
{{#ifeq: {{#var:mode}} | Melee |
 
{{#vardefine:avgDPS |  {{formatnum:{{Q|{{#var:name}}|MeleeDPS}}|R}}}}
 
{{#vardefine:avgAP|    {{formatnum:{{Q|{{#var:name}}|MeleeAP}}|R}}}}
 
{{#vardefine:highestDam|{{formatnum:{{Q|{{#var:name}}|Attack 1 Damage}}|R}}}}
 
{{#if: {{Q|{{#var:name}}|Attack 2 Damage}} | {{#ifexpr: {{Q|{{#var:name}}|Attack 2 Damage}} > {{#var: highestDam}} | {{#vardefine: highestDam | {{formatnum:{{Q|{{#var:name}}|Attack 2 Damage}}|R}}}} }} }}
 
{{#if: {{Q|{{#var:name}}|Attack 3 Damage}} | {{#ifexpr: {{Q|{{#var:name}}|Attack 3 Damage}} > {{#var: highestDam}} | {{#vardefine: highestDam | {{formatnum:{{Q|{{#var:name}}|Attack 2 Damage}}|R}}}} }} }}
 
{{#if: {{Q|{{#var:name}}|Attack 4 Damage}} | {{#ifexpr: {{Q|{{#var:name}}|Attack 4 Damage}} > {{#var: highestDam}} | {{#vardefine: highestDam | {{formatnum:{{Q|{{#var:name}}|Attack 4 Damage}}|R}}}} }} }}
 
|
 
{{#vardefine:damage|    {{formatnum:{{Q|{{#var:name}}|Damage Base}}|R}}}}
 
{{#vardefine:avgDPS |  {{formatnum:{{Q|{{#var:name}}|Maximum DPS}}|R}}}}
 
{{#vardefine:avgAP|    {{formatnum:{{Q|{{#var:name}}|Armor Penetration}}|R}}}}
 
{{#vardefine:accTouch|  {{formatnum:{{Q|{{#var:name}}|Accuracy (Touch) Base}}|R}}}}
 
{{#vardefine:accShort|  {{formatnum:{{Q|{{#var:name}}|Accuracy (Short) Base}}|R}}}}
 
{{#vardefine:accMedium| {{formatnum:{{Q|{{#var:name}}|Accuracy (Medium) Base}}|R}}}}
 
{{#vardefine:accLong|  {{formatnum:{{Q|{{#var:name}}|Accuracy (Long) Base}}|R}}}}
 
}}
 
{{#vardefine:value|    {{formatnum:{{Q|{{#var:name}}|Market Value Base}}|R}}}}
 
<div><li style="display: inline-table;">
 
{| {{STDT|sortable c_03 text-center}}
 
|-
 
! Quality
 
{{#ifeq: {{#var:mode}} | Melee |<th>{{H:title|link=no| Damage of the most powerful attack type available to the weapon |Damage}} <th>Avg DPS <th>Avg {{AP}}|
 
<th>Damage
 
<th>{{AP}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
<th>{{H:title|link=no|Base weapon accuracy at Touch Range (3 tiles) | Accuracy<br/>(Touch)}}
 
<th>{{H:title|link=no|Base weapon accuracy at Short Range (12 tiles) | Accuracy<br/>(Short)}}
 
<th>{{H:title|link=no|Base weapon accuracy at Medium Range (25 tiles) | Accuracy<br/>(Medium)}}
 
<th>{{H:title|link=no|Base weapon accuracy at Long Range (40 tiles) | Accuracy<br/>(Long)}}
 
}}
 
<th>{{H:title|link=no|Damage Per Second assuming all shots hit|DPS<br/>(Optimal)}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
<th>{{H:title|link=no|DPS x Accuracy at Touch Range (3 tiles) assuming perfect shooter accuracy|DPS<br/>(Touch)}}
 
<th>{{H:title|link=no|DPS x Accuracy at Short Range (12 tiles) assuming perfect shooter accuracy|DPS<br/>(Short)}}
 
<th>{{H:title|link=no|DPS x Accuracy at Medium Range (25 tiles) assuming perfect shooter accuracy|DPS<br/>(Medium)}}
 
<th>{{H:title|link=no|DPS x Accuracy at Long Range (40 tiles) assuming perfect shooter accuracy|DPS<br/>(Long)}}
 
}}
 
|}}
 
! Market Value
 
|-
 
!style="text-align:right;" |'''Awful {{#var:name}}'''
 
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 0.8*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 0.8*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 0.8*{{#var:avgAP|}} round 2}}%
 
|
 
<td> {{ #expr: 0.9*{{#var:damage|}} round 2}}
 
<td> {{#if: {{Q|{{#var:name}}|Armor Penetration}} | {{ #expr: 0.9*{{#var:avgAP|}} round 2}}%|-}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Touch) Base}} | {{#ifexpr: {{ #expr: 0.8*{{#var:accTouch|}}  round 2}} > 100 | 100 | {{ #expr: 0.8*{{#var:accTouch|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Short) Base}} | {{#ifexpr: {{ #expr: 0.8*{{#var:accShort|}}  round 2}} > 100 | 100 | {{ #expr: 0.8*{{#var:accShort|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Medium) Base}} | {{#ifexpr: {{ #expr: 0.8*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 0.8*{{#var:accMedium|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Long) Base}} | {{#ifexpr: {{ #expr: 0.8*{{#var:accLong|}}  round 2}} > 100 | 100 | {{ #expr: 0.8*{{#var:accLong|}} round 0}}}}%|-}}
 
}}
 
<td> {{ #expr: 0.9*{{#var:avgDPS|}} round 2}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
{{#if:{{Q| {{#var:name}} | Accuracy (Touch) Base}}|
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 0.8*{{#var:accTouch|}} round 2}} > 100 | 100 | {{ #expr: 0.8*{{#var:accTouch|}}  round 0}}}}/100*0.9*{{#var:avgDPS }} round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 0.8*{{#var:accShort|}} round 2}} > 100 | 100 | {{ #expr: 0.8*{{#var:accShort|}}  round 0}}}}/100*0.9*{{#var:avgDPS }} round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 0.8*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 0.8*{{#var:accMedium|}} round 0}}}}/100*0.9*{{#var:avgDPS }} round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 0.8*{{#var:accLong|}} round 2}} > 100 | 100 | {{ #expr: 0.8*{{#var:accLong|}} round 0}}}}/100*0.9*{{#var:avgDPS }} round 2}} |
 
{{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} -
 
}}
 
}}
 
|}}
 
| {{Market Value | {{ #expr: 0.5*{{#var:value|}}}}}} {{icon small|silver|}}
 
|-
 
 
 
 
 
!style="text-align:right;"|'''Poor {{#var:name}}'''
 
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 0.9*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 0.9*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 0.9*{{#var:avgAP|}} round 2}}%
 
|
 
<td> {{ #expr: 1.0*{{#var:damage|}} round 2}}
 
<td> {{#if: {{Q|{{#var:name}}|Armor Penetration}} | {{ #expr: 1.0*{{#var:avgAP|}} round 2}}%|-}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Touch) Base}} | {{#ifexpr: {{ #expr: 0.9*{{#var:accTouch|}}  round 2}} > 100 | 100 | {{ #expr: 0.9*{{#var:accTouch|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Short) Base}} | {{#ifexpr: {{ #expr: 0.9*{{#var:accShort|}}  round 2}} > 100 | 100 | {{ #expr: 0.9*{{#var:accShort|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Medium) Base}} | {{#ifexpr: {{ #expr: 0.9*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 0.9*{{#var:accMedium|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Long) Base}} | {{#ifexpr: {{ #expr: 0.9*{{#var:accLong|}}  round 2}} > 100 | 100 | {{ #expr: 0.9*{{#var:accLong|}} round 0}}}}%|-}}
 
}}
 
<td> {{ #expr: {{#var:avgDPS|}} round 2}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
{{#if:{{Q| {{#var:name}} | Accuracy (Touch) Base}}|
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 0.9*{{#var:accTouch|}}  round 2}} > 100 | 100 | {{ #expr: 0.9*{{#var:accTouch|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 0.9*{{#var:accShort|}}  round 2}} > 100 | 100 | {{ #expr: 0.9*{{#var:accShort|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 0.9*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 0.9*{{#var:accMedium|}} round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 0.9*{{#var:accLong|}}  round 2}} > 100 | 100 | {{ #expr: 0.9*{{#var:accLong|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}} |
 
{{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} -
 
}}
 
}}
 
|}}
 
| {{Market Value | {{ #expr: 0.75*{{#var:value|}}}}}} {{icon small|silver|}}
 
|-
 
 
 
! style="text-align:right;" |'''Normal {{#var:name}}'''
 
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 1.0*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.0*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 1.0*{{#var:avgAP|}} round 2}}%
 
|
 
<td> {{ #expr: 1.0*{{#var:damage|}} round 2}}
 
<td> {{#if: {{Q|{{#var:name}}|Armor Penetration}} | {{ #expr: 1.0*{{#var:avgAP|}} round 2}}%|-}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Touch) Base}} | {{#ifexpr: {{ #expr: 1.0*{{#var:accTouch|}}  round 2}} > 100 | 100 | {{ #expr: 1.0*{{#var:accTouch|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Short) Base}} | {{#ifexpr: {{ #expr: 1.0*{{#var:accShort|}}  round 2}} > 100 | 100 | {{ #expr: 1.0*{{#var:accShort|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Medium) Base}} | {{#ifexpr: {{ #expr: 1.0*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 1.0*{{#var:accMedium|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Long) Base}} | {{#ifexpr: {{ #expr: 1.0*{{#var:accLong|}}  round 2}} > 100 | 100 | {{ #expr: 1.0*{{#var:accLong|}} round 0}}}}%|-}}
 
}}
 
<td> {{ #expr: {{#var:avgDPS|}} round 2}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
{{#if:{{Q| {{#var:name}} | Accuracy (Touch) Base}}|
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 1.0*{{#var:accTouch|}}  round 2}} > 100 | 100 | {{ #expr: 1.0*{{#var:accTouch|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 1.0*{{#var:accShort|}}  round 2}} > 100 | 100 | {{ #expr: 1.0*{{#var:accShort|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 1.0*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 1.0*{{#var:accMedium|}} round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 1.0*{{#var:accLong|}}  round 2}} > 100 | 100 | {{ #expr: 1.0*{{#var:accLong|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}} |
 
{{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} -
 
}}
 
}}
 
|}}
 
| {{Market Value | {{ #expr: 1.0*{{#var:value|}}}}}} {{icon small|silver|}}
 
|-
 
 
 
!  style="text-align:right;" |'''Good {{#var:name}}'''
 
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 1.1*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.1*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 1.1*{{#var:avgAP|}} round 2}}%
 
|
 
<td> {{ #expr: 1.0*{{#var:damage|}} round 2}}
 
<td> {{#if: {{Q|{{#var:name}}|Armor Penetration}} | {{ #expr: 1.0*{{#var:avgAP|}} round 2}}%|-}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Touch) Base}} | {{#ifexpr: {{ #expr: 1.1*{{#var:accTouch|}}  round 2}} > 100 | 100 | {{ #expr: 1.1*{{#var:accTouch|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Short) Base}} | {{#ifexpr: {{ #expr: 1.1*{{#var:accShort|}}  round 2}} > 100 | 100 | {{ #expr: 1.1*{{#var:accShort|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Medium) Base}} | {{#ifexpr: {{ #expr: 1.1*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 1.1*{{#var:accMedium|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Long) Base}} | {{#ifexpr: {{ #expr: 1.1*{{#var:accLong|}}  round 2}} > 100 | 100 | {{ #expr: 1.1*{{#var:accLong|}} round 0}}}}%|-}}
 
}}
 
<td> {{ #expr: {{#var:avgDPS|}} round 2}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
{{#if:{{Q| {{#var:name}} | Accuracy (Touch) Base}}|
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 1.1*{{#var:accTouch|}}  round 2}} > 100 | 100 | {{ #expr: 1.1*{{#var:accTouch|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 1.1*{{#var:accShort|}}  round 2}} > 100 | 100 | {{ #expr: 1.1*{{#var:accShort|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 1.1*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 1.1*{{#var:accMedium|}} round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 1.1*{{#var:accLong|}}  round 2}} > 100 | 100 | {{ #expr: 1.1*{{#var:accLong|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}} |
 
{{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} -
 
}}
 
}}
 
|}}
 
| {{Market Value | {{#ifexpr: {{ #expr: 1.25*{{#var:value|}}}} < {{ #expr: 500+{{#var:value|}}}} | {{ #expr: 1.25*{{#var:value|}}}} | {{ #expr: 500+{{#var:value|}}}}}}  }} {{icon small|silver|}}
 
|-
 
 
 
! style="text-align:right;" |'''Excellent {{#var:name}}'''
 
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 1.2*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.2*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 1.2*{{#var:avgAP|}} round 2}}%
 
|
 
<td> {{ #expr: 1.0*{{#var:damage|}} round 2}}
 
<td> {{#if: {{Q|{{#var:name}}|Armor Penetration}} | {{ #expr: 1.0*{{#var:avgAP|}} round 2}}%|-}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Touch) Base}} | {{#ifexpr: {{ #expr: 1.2*{{#var:accTouch|}}  round 2}} > 100 | 100 | {{ #expr: 1.2*{{#var:accTouch|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Short) Base}} | {{#ifexpr: {{ #expr: 1.2*{{#var:accShort|}}  round 2}} > 100 | 100 | {{ #expr: 1.2*{{#var:accShort|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Medium) Base}} | {{#ifexpr: {{ #expr: 1.2*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 1.2*{{#var:accMedium|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Long) Base}} | {{#ifexpr: {{ #expr: 1.2*{{#var:accLong|}}  round 2}} > 100 | 100 | {{ #expr: 1.2*{{#var:accLong|}} round 0}}}}%|-}}
 
}}
 
<td> {{ #expr: {{#var:avgDPS|}} round 2}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
{{#if:{{Q| {{#var:name}} | Accuracy (Touch) Base}}|
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 1.2*{{#var:accTouch|}}  round 2}} > 100 | 100 | {{ #expr: 1.2*{{#var:accTouch|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 1.2*{{#var:accShort|}}  round 2}} > 100 | 100 | {{ #expr: 1.2*{{#var:accShort|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 1.2*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 1.2*{{#var:accMedium|}} round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: {{#ifexpr: {{ #expr: 1.2*{{#var:accLong|}}  round 2}} > 100 | 100 | {{ #expr: 1.2*{{#var:accLong|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}} |
 
{{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} -
 
}}
 
}}
 
|}}
 
| {{Market Value | {{#ifexpr: {{ #expr: 1.5*{{#var:value|}}}} < {{ #expr: 1000+{{#var:value|}}}} | {{ #expr: 1.5*{{#var:value|}}}} | {{ #expr: 1000+{{#var:value|}}}}}}  }} {{icon small|silver|}}
 
|-
 
 
 
! style="text-align:right;" |'''Masterwork {{#var:name}}'''
 
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 1.45*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.45*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 1.45*{{#var:avgAP|}} round 2}}%
 
|
 
<td> {{ #expr: 1.25*{{#var:damage|}} round 2}}
 
<td> {{#if: {{Q|{{#var:name}}|Armor Penetration}} | {{ #expr: 1.25*{{#var:avgAP|}} round 2}}%|-}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Touch) Base}} | {{#ifexpr: {{ #expr: 1.35*{{#var:accTouch|}} round 2}} > 100 | 100 | {{ #expr: 1.35*{{#var:accTouch|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Short) Base}} | {{#ifexpr: {{ #expr: 1.35*{{#var:accShort|}} round 2}} > 100 | 100 | {{ #expr: 1.35*{{#var:accShort|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Medium) Base}} | {{#ifexpr: {{ #expr: 1.35*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 1.35*{{#var:accMedium|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Long) Base}} | {{#ifexpr: {{ #expr: 1.35*{{#var:accLong|}} round 2}} > 100 | 100 | {{ #expr: 1.35*{{#var:accLong|}} round 0}}}}%|-}}
 
}}
 
<td> {{ #expr: 1.25*{{#var:avgDPS|}} round 2}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
{{#if:{{Q| {{#var:name}} | Accuracy (Touch) Base}}|
 
{{!}} {{#expr: 1.25*{{#ifexpr: {{ #expr: 1.35*{{#var:accTouch|}}  round 2}} > 100 | 100 | {{ #expr: 1.35*{{#var:accTouch|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: 1.25*{{#ifexpr: {{ #expr: 1.35*{{#var:accShort|}}  round 2}} > 100 | 100 | {{ #expr: 1.35*{{#var:accShort|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: 1.25*{{#ifexpr: {{ #expr: 1.35*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 1.35*{{#var:accMedium|}} round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: 1.25*{{#ifexpr: {{ #expr: 1.35*{{#var:accLong|}}  round 2}} > 100 | 100 | {{ #expr: 1.35*{{#var:accLong|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}} |
 
{{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} -
 
}}
 
}}
 
|}}
 
| {{Market Value | {{#ifexpr: {{ #expr: 2.5*{{#var:value|}}}} < {{ #expr: 2000+{{#var:value|}}}} | {{ #expr: 2.5*{{#var:value|}}}} | {{ #expr: 2000+{{#var:value|}}}}}}  }} {{icon small|silver|}}
 
|-
 
 
 
! style="text-align:right;" |'''Legendary {{#var:name}}'''
 
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 1.65*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.65*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 1.65*{{#var:avgAP|}} round 2}}%
 
|
 
<td> {{ #expr: 1.5*{{#var:damage|}} round 2}}
 
<td> {{#if: {{Q|{{#var:name}}|Armor Penetration}} | {{ #expr: 1.5*{{#var:avgAP|}} round 2}}%|-}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Touch) Base}} | {{#ifexpr: {{ #expr: 1.5*{{#var:accTouch|}}  round 2}} > 100 | 100 | {{ #expr: 1.5*{{#var:accTouch|}}  round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Short) Base}} | {{#ifexpr: {{ #expr: 1.5*{{#var:accShort|}}  round 2}} > 100 | 100 | {{ #expr: 1.5*{{#var:accShort|}}  round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Medium) Base}} | {{#ifexpr: {{ #expr: 1.5*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 1.5*{{#var:accMedium|}} round 0}}}}%|-}}
 
<td> {{#if: {{Q|{{#var:name}}|Accuracy (Long) Base}} | {{#ifexpr: {{ #expr: 1.5*{{#var:accLong|}}  round 2}} > 100 | 100 | {{ #expr: 1.5*{{#var:accLong|}}  round 0}}}}%|-}}
 
}}
 
<td> {{ #expr: 1.5*{{#var:avgDPS|}} round 2}}
 
{{#if: {{Q|{{#var:name}}|Miss Radius}}||
 
{{#if:{{Q| {{#var:name}} | Accuracy (Touch) Base}}|
 
{{!}} {{#expr: 1.5*{{#ifexpr: {{ #expr: 1.5*{{#var:accTouch|}}  round 2}} > 100 | 100 | {{ #expr: 1.5*{{#var:accTouch|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: 1.5*{{#ifexpr: {{ #expr: 1.5*{{#var:accShort|}}  round 2}} > 100 | 100 | {{ #expr: 1.5*{{#var:accShort|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: 1.5*{{#ifexpr: {{ #expr: 1.5*{{#var:accMedium|}} round 2}} > 100 | 100 | {{ #expr: 1.5*{{#var:accMedium|}} round 0}}}}/100*{{#var:avgDPS }}  round 2}}
 
{{!}} {{#expr: 1.5*{{#ifexpr: {{ #expr: 1.5*{{#var:accLong|}}  round 2}} > 100 | 100 | {{ #expr: 1.5*{{#var:accLong|}}  round 0}}}}/100*{{#var:avgDPS }}  round 2}} |
 
{{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} - {{!}}{{!}} -
 
}}
 
}}
 
|}}
 
| {{Market Value | {{#ifexpr: {{ #expr: 5*{{#var:value|}}}} < {{ #expr: 3000+{{#var:value|}}}} | {{ #expr: 5*{{#var:value|}}}} | {{ #expr: 3000+{{#var:value|}}}}}}  }} {{icon small|silver|}}
 
|-
 
|}
 
<sup>For the full effects of qualities, see [[Quality]].</sup> </li></div></includeonly> <noinclude>
 
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 13:56, 30 June 2022

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

Description

This template generates a table summarizing stats for an given weapon, including average damage per second, armor piercing and Market Value, for each quality tier (if applicable) and every stuff option (if applicable).

Note that at the time of writing, weapons with no quality are hardcoded into the template, rather than pulled from the page properties. New no-quality weapons must be manually excepted from the template.

Property:Mode must be set to properly display melee weapons, otherwise it will default to the ranged format.

This template is part of the following system generating tables for all weapons:

Parameters

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

The no header parameter will disable the top heading, but not the subheadings for ranged and melee attacks, when set to true.

The header level parameter takes numbers and sets the size of the headings - note that top heading is sized by the number directly, with subheading one size smaller. Default value is 2. It can be used with or without no header.

Example usage

{{Weapon Stats Table | Persona monosword}}

Produces:

Quality table

Template:Weapon Quality Table/Melee

{{Weapon Stats Table | Assault rifle|}}

Produces:

Quality table

Template:Weapon Quality Table/Ranged

{{Weapon Stats Table | Incendiary launcher|}}

Produces:

Quality table

Template:Weapon Quality Table/Ranged