Difference between revisions of "Template:Weapon Stats Table"

From RimWorld Wiki
Jump to navigation Jump to search
(Adding clarifying mouseovers to some range info, adding largest attack damage (useful for OHK and limb removal) to melee table.)
Line 1: Line 1:
 
<includeonly>==Quality Table==
 
<includeonly>==Quality Table==
 
{{#vardefine:name| {{{ 1 | {{PAGENAME}} }}} }}
 
{{#vardefine:name| {{{ 1 | {{PAGENAME}} }}} }}
 +
{{#vardefine:mode| {{Q|{{#var:name}}|Mode}} }}
  
{{#ifeq: {{{ 2|}}} | Melee |  
+
{{#ifeq: {{#var:mode}} | Melee |  
 
{{#vardefine:avgDPS |  {{formatnum:{{Q|{{#var:name}}|MeleeDPS}}|R}}}}
 
{{#vardefine:avgDPS |  {{formatnum:{{Q|{{#var:name}}|MeleeDPS}}|R}}}}
 
{{#vardefine:avgAP|    {{formatnum:{{Q|{{#var:name}}|MeleeAP}}|R}}}}
 
{{#vardefine:avgAP|    {{formatnum:{{Q|{{#var:name}}|MeleeAP}}|R}}}}
Line 23: Line 24:
 
|-
 
|-
 
! Quality
 
! Quality
{{#ifeq: {{{ 2|}}} | Melee |<th>{{H:title|link=no| Damage of the most powerful attack type available to the weapon |Damage}} <th>Avg DPS <th>Avg AP|  
+
{{#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>Damage
 
<th>AP
 
<th>AP
Line 39: Line 40:
 
|-
 
|-
 
!style="text-align:right;" |'''Awful {{#var:name}}'''
 
!style="text-align:right;" |'''Awful {{#var:name}}'''
{{#ifeq: {{{ 2|}}} | Melee |
+
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 0.8*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 0.8*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 0.8*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 0.8*{{#var:avgDPS|}} round 2}}
Line 64: Line 65:
  
 
!style="text-align:right;"|'''Poor {{#var:name}}'''
 
!style="text-align:right;"|'''Poor {{#var:name}}'''
{{#ifeq: {{{ 2|}}} | Melee |
+
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 0.9*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 0.9*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 0.9*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 0.9*{{#var:avgDPS|}} round 2}}
Line 88: Line 89:
  
 
! style="text-align:right;" |'''Normal {{#var:name}}'''
 
! style="text-align:right;" |'''Normal {{#var:name}}'''
{{#ifeq: {{{ 2|}}} | Melee |
+
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 1.0*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.0*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.0*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 1.0*{{#var:avgDPS|}} round 2}}
Line 112: Line 113:
  
 
!  style="text-align:right;" |'''Good {{#var:name}}'''
 
!  style="text-align:right;" |'''Good {{#var:name}}'''
{{#ifeq: {{{ 2|}}} | Melee |
+
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 1.1*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.1*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.1*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 1.1*{{#var:avgDPS|}} round 2}}
Line 136: Line 137:
  
 
! style="text-align:right;" |'''Excellent {{#var:name}}'''
 
! style="text-align:right;" |'''Excellent {{#var:name}}'''
{{#ifeq: {{{ 2|}}} | Melee |
+
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 1.2*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.2*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.2*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 1.2*{{#var:avgDPS|}} round 2}}
Line 160: Line 161:
  
 
! style="text-align:right;" |'''Masterwork {{#var:name}}'''
 
! style="text-align:right;" |'''Masterwork {{#var:name}}'''
{{#ifeq: {{{ 2|}}} | Melee |
+
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 1.45*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.45*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.45*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 1.45*{{#var:avgDPS|}} round 2}}
Line 184: Line 185:
  
 
! style="text-align:right;" |'''Legendary {{#var:name}}'''
 
! style="text-align:right;" |'''Legendary {{#var:name}}'''
{{#ifeq: {{{ 2|}}} | Melee |
+
{{#ifeq: {{#var:mode}} | Melee |
 
<td> {{ #expr: 1.65*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.65*{{#var:highestDam|}} round 2}}
 
<td> {{ #expr: 1.65*{{#var:avgDPS|}} round 2}}
 
<td> {{ #expr: 1.65*{{#var:avgDPS|}} round 2}}

Revision as of 10:54, 2 February 2021


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

  • Quality Damage Avg DPS Avg AP Market Value
    Awful Persona monosword 21.6 Expression error: Unexpected round operator. Expression error: Unexpected round operator.% 1500 Silver
    Poor Persona monosword 24.3 Expression error: Unexpected round operator. Expression error: Unexpected round operator.% 1125 Silver
    Normal Persona monosword 27 Expression error: Unexpected round operator. Expression error: Unexpected round operator.% 1125 Silver
    Good Persona monosword 29.7 Expression error: Unexpected round operator. Expression error: Unexpected round operator.% 1405 Silver
    Excellent Persona monosword 32.4 Expression error: Unexpected round operator. Expression error: Unexpected round operator.% 2110 Silver
    Masterwork Persona monosword 39.15 Expression error: Unexpected round operator. Expression error: Unexpected round operator.% 4110 Silver
    Legendary Persona monosword 44.55 Expression error: Unexpected round operator. Expression error: Unexpected round operator.% 7110 Silver
    For the full effects of qualities, see Quality.
  • {{Weapon Stats Table | Assault rifle|}}
    

    Produces:

    Quality Table

  • Quality Damage AP Accuracy
    (Touch)
    Accuracy
    (Short)
    Accuracy
    (Medium)
    Accuracy
    (Long)
    DPS
    (Optimal)
    DPS
    (Touch)
    DPS
    (Short)
    DPS
    (Medium)
    DPS
    (Long)
    Market Value
    Awful Assault rifle 11 16% 48% 56% 52% 44% 10.88 5.22 6.09 5.66 4.79 240 Silver
    Poor Assault rifle 11 16% 54% 63% 59% 50% 10.88 5.88 6.85 6.42 5.44 180 Silver
    Normal Assault rifle 11 16% 60% 70% 65% 55% 10.88 6.53 7.62 7.07 5.98 180 Silver
    Good Assault rifle 11 16% 66% 77% 72% 61% 10.88 7.18 8.38 7.83 6.64 225 Silver
    Excellent Assault rifle 11 16% 72% 84% 78% 66% 10.88 7.83 9.14 8.49 7.18 335 Silver
    Masterwork Assault rifle 13.75 20% 81% 95% 88% 74% 13.6 11.02 12.92 11.97 10.06 845 Silver
    Legendary Assault rifle 16.5 24% 90% 100% 98% 83% 16.32 14.69 16.32 15.99 13.55 3845 Silver
    For the full effects of qualities, see Quality.
  • {{Weapon Stats Table | Incendiary launcher|}}
    

    Produces:

    Quality Table

  • Quality Damage AP Accuracy
    (Touch)
    Accuracy
    (Short)
    Accuracy
    (Medium)
    Accuracy
    (Long)
    DPS
    (Optimal)
    DPS
    (Touch)
    DPS
    (Short)
    DPS
    (Medium)
    DPS
    (Long)
    Market Value
    Awful Incendiary launcher 10 0% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% 1.43 - - - - 170 Silver
    Poor Incendiary launcher 10 0% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% 1.43 - - - - 128 Silver
    Normal Incendiary launcher 10 0% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% 1.43 - - - - 128 Silver
    Good Incendiary launcher 10 0% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% 1.43 - - - - 159 Silver
    Excellent Incendiary launcher 10 0% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% 1.43 - - - - 240 Silver
    Masterwork Incendiary launcher 12.5 0% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% 1.79 - - - - 600 Silver
    Legendary Incendiary launcher 15 0% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% Expression error: Unexpected < operator.% 2.15 - - - - 2990 Silver
    For the full effects of qualities, see Quality.