Difference between revisions of "Template:Weapon Stats Table/Ranged"

From RimWorld Wiki
Jump to navigation Jump to search
(show note only when necessary)
Line 1: Line 1:
 
<includeonly><div><li style="display: inline-table;"><!--
 
<includeonly><div><li style="display: inline-table;"><!--
-->{{#vardefine:name     | {{{ 1 | {{PAGENAME}} }}} }}<!--
+
-->{{#vardefine:name     | {{{ 1 | {{PAGENAME}} }}} }}<!--
-->{{#vardefine:range   | {{Q|{{#var:name}}|Range}} }}<!--
+
-->{{#vardefine:range     | {{Q|{{#var:name}}|Range}} }}<!--
-->{{#vardefine:damage   | {{formatnum:{{Q|{{#var:name}}|Damage Base}}|R}} }}<!--
+
-->{{#vardefine:damage   | {{formatnum:{{Q|{{#var:name}}|Damage Base}}|R}} }}<!--
-->{{#vardefine:avgAP   | {{formatnum:{{Q|{{#var:name}}|Armor Penetration}}|R}}/100 }}<!--
+
-->{{#vardefine:avgAP     | {{formatnum:{{Q|{{#var:name}}|Armor Penetration}}|R}}/100 }}<!--
-->{{#vardefine:accTouch | {{formatnum:{{Q|{{#var:name}}|Accuracy (Touch) Base}}|R}}/100 }}<!--
+
-->{{#vardefine:accTouch | {{formatnum:{{Q|{{#var:name}}|Accuracy (Touch) Base}}|R}}/100 }}<!--
-->{{#vardefine:accShort | {{formatnum:{{Q|{{#var:name}}|Accuracy (Short) Base}}|R}}/100 }}<!--
+
-->{{#vardefine:accShort | {{formatnum:{{Q|{{#var:name}}|Accuracy (Short) Base}}|R}}/100 }}<!--
-->{{#vardefine:accMedium| {{formatnum:{{Q|{{#var:name}}|Accuracy (Medium) Base}}|R}}/100 }}<!--
+
-->{{#vardefine:accMedium | {{formatnum:{{Q|{{#var:name}}|Accuracy (Medium) Base}}|R}}/100 }}<!--
-->{{#vardefine:accLong | {{formatnum:{{Q|{{#var:name}}|Accuracy (Long) Base}}|R}}/100 }}<!--
+
-->{{#vardefine:accLong   | {{formatnum:{{Q|{{#var:name}}|Accuracy (Long) Base}}|R}}/100 }}<!--
-->{{#vardefine:avgDPS   | {{formatnum:{{Q|{{#var:name}}|Maximum DPS}}|R}} }}<!--
+
-->{{#vardefine:avgDPS   | {{formatnum:{{Q|{{#var:name}}|Maximum DPS}}|R}} }}<!--
-->
+
-->{{#vardefine:hasQuality| {{#switch: {{#var:name}}
 +
| Charge blaster turret | EMP grenades | Frag grenades | Molotov cocktails =
 +
| #default = true
 +
}} }}
 
{| {{STDT|sortable c_03 text-center}}
 
{| {{STDT|sortable c_03 text-center}}
 
! Quality
 
! Quality
Line 28: Line 31:
 
}}
 
}}
 
! Market<br/>value
 
! Market<br/>value
{{#switch: {{#var:name}}
+
{{#if: {{#var:hasQuality}}
| Charge blaster turret
+
| {{Weapon Quality Table/Ranged/Row|Awful}}
| EMP grenades
+
  {{Weapon Quality Table/Ranged/Row|Poor}}
| Frag grenades
+
  {{Weapon Quality Table/Ranged/Row|Normal}}
| Molotov cocktails = {{Weapon Quality Table/Ranged/Row}}
+
  {{Weapon Quality Table/Ranged/Row|Good}}
| #default =
+
  {{Weapon Quality Table/Ranged/Row|Excellent}}
{{Weapon Quality Table/Ranged/Row|Awful}}
+
  {{Weapon Quality Table/Ranged/Row|Masterwork}}
{{Weapon Quality Table/Ranged/Row|Poor}}
+
  {{Weapon Quality Table/Ranged/Row|Legendary}}
{{Weapon Quality Table/Ranged/Row|Normal}}
+
| {{Weapon Quality Table/Ranged/Row}}
{{Weapon Quality Table/Ranged/Row|Good}}
 
{{Weapon Quality Table/Ranged/Row|Excellent}}
 
{{Weapon Quality Table/Ranged/Row|Masterwork}}
 
{{Weapon Quality Table/Ranged/Row|Legendary}}
 
 
}}
 
}}
 
|}
 
|}
<sup>For the full effects of qualities, see [[Quality]]. Values shown in <span style="color:firebrick; font-weight:bold>Red</span> indicate the weapon is out of range at the reference point for this range band. The value is provided due to the [[Weapons#Range|interpolated nature]] of accuracy between range points.</sup>
+
<sup>{{#if: {{#var:hasQuality}} | For the full effects of qualities, see [[Quality]].}} {{#if: {{#var:missRadius}} || Values shown in <span style="color:firebrick; font-weight:bold>Red</span> indicate the weapon is out of range at the reference point for this range band. The value is provided due to the [[Weapons#Range|interpolated nature]] of accuracy between range points.}}</sup>
 
</li></div></includeonly><noinclude>
 
</li></div></includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 04:42, 18 April 2023

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

Summary

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

Parameters

If you want to use this template specifically you can specify the weapon as the first parameter:

{{Weapon Stats Table/Ranged|Sniper rifle}}

Otherwise it will use the name of the page it's placed on:

{{Weapon Stats Table/Ranged}}

Examples

Sniper rifle


A weapon with quality, no AOE, and range greater than long

{{Weapon Stats Table/Ranged|Sniper rifle}}
  • Quality Dam. AP Accuracy
    (Touch)
    Accuracy
    (Short)
    Accuracy
    (Medium)
    Accuracy
    (Long)
    DPS
    (Optimal)
    DPS
    (Touch)
    DPS
    (Short)
    DPS
    (Medium)
    DPS
    (Long)
    Market
    value

    Template:Weapon Quality Table/Ranged/Row

      Template:Weapon Quality Table/Ranged/Row
      Template:Weapon Quality Table/Ranged/Row
      Template:Weapon Quality Table/Ranged/Row
      Template:Weapon Quality Table/Ranged/Row
      Template:Weapon Quality Table/Ranged/Row
      Template:Weapon Quality Table/Ranged/Row
    

    For the full effects of qualities, see Quality. Values shown in Red indicate the weapon is out of range at the reference point for this range band. The value is provided due to the interpolated nature of accuracy between range points.

  • Chain shotgun


    A weapon with quality, no AOE, and range below long

    {{Weapon Stats Table/Ranged|Chain shotgun}}
  • Quality Dam. AP Accuracy
    (Touch)
    Accuracy
    (Short)
    Accuracy
    (Medium)
    Accuracy
    (Long)
    DPS
    (Optimal)
    DPS
    (Touch)
    DPS
    (Short)
    DPS
    (Medium)
    DPS
    (Long)
    Market
    value

    Template:Weapon Quality Table/Ranged/Row

      Template:Weapon Quality Table/Ranged/Row
      Template:Weapon Quality Table/Ranged/Row
      Template:Weapon Quality Table/Ranged/Row
      Template:Weapon Quality Table/Ranged/Row
      Template:Weapon Quality Table/Ranged/Row
      Template:Weapon Quality Table/Ranged/Row
    

    For the full effects of qualities, see Quality. Values shown in Red indicate the weapon is out of range at the reference point for this range band. The value is provided due to the interpolated nature of accuracy between range points.

  • Incendiary launcher


    A weapon with quality and AOE

    {{Weapon Stats Table/Ranged|Incendiary launcher}}

    Frag grenades


    A weapon with no quality and AOE

    {{Weapon Stats Table/Ranged|Frag grenades}}
  • Quality Dam. AP DPS
    (Optimal)
    Market
    value

    Template:Weapon Quality Table/Ranged/Row

  • Charge blaster turret


    A weapon with no quality and no AOE

    {{Weapon Stats Table/Ranged|Charge blaster turret}}
  • Quality Dam. AP Accuracy
    (Touch)
    Accuracy
    (Short)
    Accuracy
    (Medium)
    Accuracy
    (Long)
    DPS
    (Optimal)
    DPS
    (Touch)
    DPS
    (Short)
    DPS
    (Medium)
    DPS
    (Long)
    Market
    value

    Template:Weapon Quality Table/Ranged/Row

    Values shown in Red indicate the weapon is out of range at the reference point for this range band. The value is provided due to the interpolated nature of accuracy between range points.