Difference between revisions of "Template:Weapon Stats Table"

From RimWorld Wiki
Jump to navigation Jump to search
(Creating page - not currently valid for ranged but will be.)
 
Line 1: Line 1:
 
<includeonly>==Quality Table==
 
<includeonly>==Quality Table==
{{#vardefine:name | {{{ 1 | {{PAGENAME}} }}} }}
+
{{#vardefine:name| {{{ 1 | {{PAGENAME}} }}} }}
  
  
  
 
{{#ifeq: {{{ 2|}}} | Melee |  
 
{{#ifeq: {{{ 2|}}} | 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}}}}
 
|
 
|
{{#vardefine:avgDPS |  {{formatnum:{{Q|{{#var:name }}|Maximum DPS}}|R}}}}
+
{{#vardefine:avgDPS |  {{formatnum:{{Q|{{#var:name}}|Maximum DPS}}|R}}}}
{{#vardefine:avgAP|    {{formatnum:{{Q|{{#var:name }}|Damage Base}}|R}}}}
+
{{#vardefine:avgAP|    {{formatnum:{{Q|{{#var:name}}|Damage Base}}|R}}}}
 
}}
 
}}
{{#vardefine:value|    {{formatnum:{{Q|{{#var:name }}|Market Value Base}}|R}}}}
+
{{#vardefine:value|    {{formatnum:{{Q|{{#var:name}}|Market Value Base}}|R}}}}
 
{| {{STDT|sortable c_03 text-center}}
 
{| {{STDT|sortable c_03 text-center}}
 
|-
 
|-
Line 22: Line 22:
  
 
! '''Awful'''
 
! '''Awful'''
| {{ #expr: 0.8*{{#var:avgDPS|}}}}%
+
| {{ #expr: 0.8*{{#var:avgDPS|}}}}
 
| {{ #expr: 0.8*{{#var:avgAP|}}}}%
 
| {{ #expr: 0.8*{{#var:avgAP|}}}}%
 
| {{icon|silver|{{Market Value | {{ #expr: 0.5*{{#var:value|}}}}}}}}
 
| {{icon|silver|{{Market Value | {{ #expr: 0.5*{{#var:value|}}}}}}}}
Line 29: Line 29:
  
 
! '''Poor'''
 
! '''Poor'''
| {{ #expr: 0.9*{{#var:avgDPS|}}}}%
+
| {{ #expr: 0.9*{{#var:avgDPS|}}}}
 
| {{ #expr: 0.9*{{#var:avgAP|}}}}%
 
| {{ #expr: 0.9*{{#var:avgAP|}}}}%
 
| {{icon|silver|{{Market Value | {{ #expr: 0.75*{{#var:value|}}}}}}}}
 
| {{icon|silver|{{Market Value | {{ #expr: 0.75*{{#var:value|}}}}}}}}
Line 35: Line 35:
  
 
! '''Normal'''
 
! '''Normal'''
| {{ #expr: 1.0*{{#var:avgDPS|}}}}%
+
| {{ #expr: 1.0*{{#var:avgDPS|}}}}
 
| {{ #expr: 1.0*{{#var:avgAP|}}}}%
 
| {{ #expr: 1.0*{{#var:avgAP|}}}}%
 
| {{icon|silver|{{Market Value | {{ #expr: 1.0*{{#var:value|}}}}}}}}
 
| {{icon|silver|{{Market Value | {{ #expr: 1.0*{{#var:value|}}}}}}}}
Line 41: Line 41:
  
 
! '''Good'''
 
! '''Good'''
| {{ #expr: 1.1*{{#var:avgDPS|}}}}%
+
| {{ #expr: 1.1*{{#var:avgDPS|}}}}
 
| {{ #expr: 1.1*{{#var:avgAP|}}}}%
 
| {{ #expr: 1.1*{{#var:avgAP|}}}}%
 
| {{icon|silver| {{Market Value | {{#ifexpr: {{ #expr: 1.25*{{#var:value|}}}} < {{ #expr: 500+{{#var:value|}}}} | {{ #expr: 1.25*{{#var:value|}}}} | {{ #expr: 500+{{#var:value|}}}}}}  }}}}
 
| {{icon|silver| {{Market Value | {{#ifexpr: {{ #expr: 1.25*{{#var:value|}}}} < {{ #expr: 500+{{#var:value|}}}} | {{ #expr: 1.25*{{#var:value|}}}} | {{ #expr: 500+{{#var:value|}}}}}}  }}}}
Line 47: Line 47:
  
 
! '''Excellent'''
 
! '''Excellent'''
| {{ #expr: 1.2*{{#var:avgDPS|}}}}%
+
| {{ #expr: 1.2*{{#var:avgDPS|}}}}
 
| {{ #expr: 1.2*{{#var:avgAP|}}}}%
 
| {{ #expr: 1.2*{{#var:avgAP|}}}}%
 
| {{icon|silver| {{Market Value | {{#ifexpr: {{ #expr: 1.5*{{#var:value|}}}} < {{ #expr: 1000+{{#var:value|}}}} | {{ #expr: 1.5*{{#var:value|}}}} | {{ #expr: 1000+{{#var:value|}}}}}}  }}}}
 
| {{icon|silver| {{Market Value | {{#ifexpr: {{ #expr: 1.5*{{#var:value|}}}} < {{ #expr: 1000+{{#var:value|}}}} | {{ #expr: 1.5*{{#var:value|}}}} | {{ #expr: 1000+{{#var:value|}}}}}}  }}}}
Line 53: Line 53:
  
 
! '''Masterwork'''
 
! '''Masterwork'''
| {{ #expr: 1.45*{{#var:avgDPS|}}}}%
+
| {{ #expr: 1.45*{{#var:avgDPS|}}}}
 
| {{ #expr: 1.45*{{#var:avgAP|}}}}%
 
| {{ #expr: 1.45*{{#var:avgAP|}}}}%
 
| {{icon|silver| {{Market Value | {{#ifexpr: {{ #expr: 2.5*{{#var:value|}}}} < {{ #expr: 2000+{{#var:value|}}}} | {{ #expr: 2.5*{{#var:value|}}}} | {{ #expr: 2000+{{#var:value|}}}}}}  }}}}
 
| {{icon|silver| {{Market Value | {{#ifexpr: {{ #expr: 2.5*{{#var:value|}}}} < {{ #expr: 2000+{{#var:value|}}}} | {{ #expr: 2.5*{{#var:value|}}}} | {{ #expr: 2000+{{#var:value|}}}}}}  }}}}
Line 59: Line 59:
  
 
! '''Legendary'''
 
! '''Legendary'''
| {{ #expr: 1.65*{{#var:avgDPS|}}}}%
+
| {{ #expr: 1.65*{{#var:avgDPS|}}}}
 
| {{ #expr: 1.65*{{#var:avgAP|}}}}%
 
| {{ #expr: 1.65*{{#var:avgAP|}}}}%
 
| {{icon|silver| {{Market Value | {{#ifexpr: {{ #expr: 5*{{#var:value|}}}} < {{ #expr: 3000+{{#var:value|}}}} | {{ #expr: 5*{{#var:value|}}}} | {{ #expr: 3000+{{#var:value|}}}}}}  }}}}
 
| {{icon|silver| {{Market Value | {{#ifexpr: {{ #expr: 5*{{#var:value|}}}} < {{ #expr: 3000+{{#var:value|}}}} | {{ #expr: 5*{{#var:value|}}}} | {{ #expr: 3000+{{#var:value|}}}}}}  }}}}

Revision as of 13:53, 28 August 2020


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 Average DPS Average AP Market Value
Awful Expression error: Missing operand for *. Expression error: Missing operand for *.% Silver 1500
Poor Expression error: Missing operand for *. Expression error: Missing operand for *.% Silver 1125
Normal Expression error: Missing operand for *. Expression error: Missing operand for *.% Silver 1125
Good Expression error: Missing operand for *. Expression error: Missing operand for *.% Silver 1405
Excellent Expression error: Missing operand for *. Expression error: Missing operand for *.% Silver 2110
Masterwork Expression error: Missing operand for *. Expression error: Missing operand for *.% Silver 4110
Legendary Expression error: Missing operand for *. Expression error: Missing operand for *.% Silver 7110
{{Weapon Stats Table | Assault rifle|}}

Produces:

Quality Table

Quality Average DPS Average AP Market Value
Awful 8.704 8.8% Silver 240
Poor 9.792 9.9% Silver 180
Normal 10.88 11% Silver 180
Good 11.968 12.1% Silver 225
Excellent 13.056 13.2% Silver 335
Masterwork 15.776 15.95% Silver 845
Legendary 17.952 18.15% Silver 3845
{{Weapon Stats Table | Incendiary launcher|}}

Produces:

Quality Table

Quality Average DPS Average AP Market Value
Awful 1.144 8% Silver 170
Poor 1.287 9% Silver 128
Normal 1.43 10% Silver 128
Good 1.573 11% Silver 159
Excellent 1.716 12% Silver 240
Masterwork 2.0735 14.5% Silver 600
Legendary 2.3595 16.5% Silver 2990