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

From RimWorld Wiki
Jump to navigation Jump to search
(individual toggles)
(up to 6 attacks. Working towards compatibility with pawns)
Line 4: Line 4:
 
-->{{#vardefine:stufftags  | {{lc: {{Q|{{#var:name}}|Stuff Tags}} }} }}<!-- The weapons stuff tags. Empty if weapon isn't stuffable
 
-->{{#vardefine:stufftags  | {{lc: {{Q|{{#var:name}}|Stuff Tags}} }} }}<!-- The weapons stuff tags. Empty if weapon isn't stuffable
 
-->{{#vardefine:HP        | {{formatnum: {{Q|{{#var:name}}|Max Hit Points Base|100}} | R}} }}<!-- The weapons hit points. Default = 100
 
-->{{#vardefine:HP        | {{formatnum: {{Q|{{#var:name}}|Max Hit Points Base|100}} | R}} }}<!-- The weapons hit points. Default = 100
-->{{#vardefine:hasQuality | {{#switch: {{#var:name}} | Beer | Charge blaster turret | Club | Elephant tusk | Thrumbo horn | Wood = | #default = true}} }}<!-- True if the weapon has quality
+
-->{{#vardefine:hasQuality | {{#switch: {{Q|{{#var:name}}|Type}} | Animal = | #default = {{#switch: {{#var:name}} | Beer | Charge blaster turret | Club | Elephant tusk | Thrumbo horn | Wood = | #default = true}} }} }}<!-- True if the weapon has quality
 
-->
 
-->
 
<!-- CONTROL PANEL -->
 
<!-- CONTROL PANEL -->
Line 29: Line 29:
 
{| {{STDT|sortable c_03 text-center}}
 
{| {{STDT|sortable c_03 text-center}}
 
! colspan="{{#expr: 2 {{#if:{{#var:stufftags}}|+1}} {{#if:{{#var:hasQuality}}|+1}} }}" style="vertical-align: middle; text-align: left;" | {{Icon Small|{{#var:name}}|32}} {{#var:name}}
 
! colspan="{{#expr: 2 {{#if:{{#var:stufftags}}|+1}} {{#if:{{#var:hasQuality}}|+1}} }}" style="vertical-align: middle; text-align: left;" | {{Icon Small|{{#var:name}}|32}} {{#var:name}}
<th {{#vardefineecho:collapseA|class="mw-collapsible mw-collapsed" id="mw-customcollapsible-collapseAttacks{{#replace:{{#var:name}}|<nowiki> </nowiki>}}"}} style="border-style: none;" colspan="5">{{ucfirst:{{Q|{{#var:name}}|Attack 1 Part}}}} ([[Damage types#{{Q|{{#var:name}}|Attack 1 Type}}|{{Q|{{#var:name}}|Attack 1 Type}}]])</th><!--
+
<th {{#vardefineecho:collapseA|class="mw-collapsible mw-collapsed" id="mw-customcollapsible-collapseAttacks{{#replace:{{#var:name}}|<nowiki> </nowiki>}}"}} style="border-style: none;" colspan="5">{{ucfirst:{{Q|{{#var:name}}|Attack 1 Part}} }} ([[Damage types#{{Q|{{#var:name}}|Attack 1 Type}}|{{Q|{{#var:name}}|Attack 1 Type}}]])</th><!--
 
-->{{#if: {{Q|{{#var:name}}|Attack 2 Damage}} |
 
-->{{#if: {{Q|{{#var:name}}|Attack 2 Damage}} |
<th {{#var:collapseA}} style="border-style: none;" colspan="5">{{ucfirst:{{Q|{{#var:name}}|Attack 2 Part}}}} ([[Damage types#{{Q|{{#var:name}}|Attack 2 Type}}|{{Q|{{#var:name}}|Attack 2 Type}}]])</th>
+
<th {{#var:collapseA}} style="border-style: none;" colspan="5"> {{ucfirst:{{Q|{{#var:name}}|Attack 2 Part}} }} ([[Damage types#{{Q|{{#var:name}}|Attack 2 Type}}|{{Q|{{#var:name}}|Attack 2 Type}}]]) </th>
 
}}{{#if: {{Q|{{#var:name}}|Attack 3 Damage}} |
 
}}{{#if: {{Q|{{#var:name}}|Attack 3 Damage}} |
<th {{#var:collapseA}} style="border-style: none;" colspan="5">{{ucfirst:{{Q|{{#var:name}}|Attack 3 Part}}}} ([[Damage types#{{Q|{{#var:name}}|Attack 3 Type}}|{{Q|{{#var:name}}|Attack 3 Type}}]])</th>
+
<th {{#var:collapseA}} style="border-style: none;" colspan="5"> {{ucfirst:{{Q|{{#var:name}}|Attack 3 Part}} }} ([[Damage types#{{Q|{{#var:name}}|Attack 3 Type}}|{{Q|{{#var:name}}|Attack 3 Type}}]]) </th>
 
}}{{#if: {{Q|{{#var:name}}|Attack 4 Damage}} |
 
}}{{#if: {{Q|{{#var:name}}|Attack 4 Damage}} |
<th {{#var:collapseA}} style="border-style: none;" colspan="5"> {{ucfirst:{{Q|{{#var:name}}|Attack 4 Part}}}} ([[Damage types#{{Q|{{#var:name}}|Attack 4 Type}}|{{Q|{{#var:name}}|Attack 4 Type}}]])</th>
+
<th {{#var:collapseA}} style="border-style: none;" colspan="5"> {{ucfirst:{{Q|{{#var:name}}|Attack 4 Part}} }} ([[Damage types#{{Q|{{#var:name}}|Attack 4 Type}}|{{Q|{{#var:name}}|Attack 4 Type}}]]) </th>
 +
}}{{#if: {{Q|{{#var:name}}|Attack 5 Damage}} |
 +
<th {{#var:collapseA}} style="border-style: none;" colspan="5"> {{ucfirst:{{Q|{{#var:name}}|Attack 5 Part}} }} ([[Damage types#{{Q|{{#var:name}}|Attack 5 Type}}|{{Q|{{#var:name}}|Attack 4 Type}}]]) </th>
 +
}}{{#if: {{Q|{{#var:name}}|Attack 6 Damage}} |
 +
<th {{#var:collapseA}} style="border-style: none;" colspan="5"> {{ucfirst:{{Q|{{#var:name}}|Attack 6 Part}} }} ([[Damage types#{{Q|{{#var:name}}|Attack 6 Type}}|{{Q|{{#var:name}}|Attack 4 Type}}]]) </th>
 
}}
 
}}
 
! rowspan="2" style="vertical-align: middle;" data-sort-type="number" style="border:#a67d47 1px; border-style: none none solid none;" | {{HP}}
 
! rowspan="2" style="vertical-align: middle;" data-sort-type="number" style="border:#a67d47 1px; border-style: none none solid none;" | {{HP}}
Line 45: Line 49:
 
<th data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid {{#if:{{#var:stufftags}}{{#var:hasQuality}}|none|solid}};"> DPS<ref name="Actual">Note: This is the actual base average derived from the [[Weapons#Listed DPS on pawns|melee verb system]] updated in [[Version/1.1.2610|1.1.2610]], it may sometimes disagree with the listed value in the in-game infobox.<br/>It may also change depending on the stats and the melee verbs available to the wielder</ref> </th>
 
<th data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid {{#if:{{#var:stufftags}}{{#var:hasQuality}}|none|solid}};"> DPS<ref name="Actual">Note: This is the actual base average derived from the [[Weapons#Listed DPS on pawns|melee verb system]] updated in [[Version/1.1.2610|1.1.2610]], it may sometimes disagree with the listed value in the in-game infobox.<br/>It may also change depending on the stats and the melee verbs available to the wielder</ref> </th>
 
<th data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> AP<ref name="Actual"/> </th>
 
<th data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> AP<ref name="Actual"/> </th>
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Dam. </th>
+
{{#vardefineecho:attackHeaders|<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Dam. </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Cool. </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Cool. </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> AP </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> AP </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> DPS </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> DPS </th>
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Chance<ref name="Chance">Chance for attack to be selected, assuming only the weapon's attack verbs are considered. It may change depending on the melee verbs available to the wielder</ref> </th><!--
+
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Chance<ref name="Chance">Chance for attack to be selected, assuming only the weapon's attack verbs are considered. It may change depending on the melee verbs available to the wielder</ref> </th>}}<!--
-->{{#if: {{Q|{{#var:name}}|Attack 2 Damage}} |
+
-->{{#if: {{Q|{{#var:name}}|Attack 2 Damage}} | {{#var:attackHeaders}} }}<!--
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Dam. </th>
+
-->{{#if: {{Q|{{#var:name}}|Attack 3 Damage}} | {{#var:attackHeaders}} }}<!--
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Cool. </th>
+
-->{{#if: {{Q|{{#var:name}}|Attack 4 Damage}} | {{#var:attackHeaders}} }}<!--
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> AP </th>
+
-->{{#if: {{Q|{{#var:name}}|Attack 5 Damage}} | {{#var:attackHeaders}} }}<!--
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> DPS </th>
+
-->{{#if: {{Q|{{#var:name}}|Attack 6 Damage}} | {{#var:attackHeaders}} }}<!--
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Chance<ref name="Chance"/> </th>
 
}}{{#if: {{Q|{{#var:name}}|Attack 3 Damage}} |
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Dam. </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Cool. </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> AP </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> DPS </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Chance<ref name="Chance"/> </th>
 
}}{{#if: {{Q|{{#var:name}}|Attack 4 Damage}} |
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Dam. </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Cool. </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> AP </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> DPS </th>
 
<th {{#var:collapseA}} data-sort-type="number" style="background-color:#d09c59; border:#a67d47 1px; border-style: none none solid none;"> Chance<ref name="Chance"/> </th>
 
}}<!--
 
 
-->{{#if:{{#var:hasQuality}} |
 
-->{{#if:{{#var:hasQuality}} |
 
   {{#vardefine:qualitySort|0}}{{#vardefine:quality|Awful}}
 
   {{#vardefine:qualitySort|0}}{{#vardefine:quality|Awful}}

Revision as of 16:13, 19 April 2023

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

Summary

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

Usage

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

{{Weapon Stats Table/Melee|Longsword}}

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

{{Weapon Stats Table/Melee}}

Examples

Longsword


A weapon with quality and with materials:

{{Weapon Stats Table/Melee|Longsword}}

Deactivated since the page would be to big.

Persona monosword


A weapon with quality but without materials:

{{Weapon Stats Table/Melee|Persona monosword}}
  • Feature Toggle
    AttacksRitual Quality Check Off.pngRitual Quality Check On.png
    Template:Weapon Quality Table/Melee/Row
     Template:Weapon Quality Table/Melee/Row
    

    Template:Weapon Quality Table/Melee/RowTemplate:Weapon Quality Table/Melee/Row

     Template:Weapon Quality Table/Melee/Row
     
     Template:Weapon Quality Table/Melee/Row
     
     Template:Weapon Quality Table/Melee/Row
    
    Persona monosword Persona monosword Handle (Blunt) Point (Stab) Edge (Cut) HP Value
    Quality
    DPS[1] AP[1] Dam. Cool. AP DPS Chance[2] Dam. Cool. AP DPS Chance[2] Dam. Cool. AP DPS Chance[2]

    For the full effects of qualities, see Quality.

    1. 1.0 1.1 Note: This is the actual base average derived from the melee verb system updated in 1.1.2610, it may sometimes disagree with the listed value in the in-game infobox.
      It may also change depending on the stats and the melee verbs available to the wielder
    2. Chance for attack to be selected, assuming only the weapon's attack verbs are considered. It may change depending on the melee verbs available to the wielder

    Club


    A weapon without quality but with materials:

    {{Weapon Stats Table/Melee|Club}}
    1. 1.0 1.1 Note: This is the actual base average derived from the melee verb system updated in 1.1.2610, it may sometimes disagree with the listed value in the in-game infobox.
      It may also change depending on the stats and the melee verbs available to the wielder
    2. Chance for attack to be selected, assuming only the weapon's attack verbs are considered. It may change depending on the melee verbs available to the wielder

    Thrumbo horn


    A weapon without quality and without materials:

    {{Weapon Stats Table/Melee|Thrumbo horn}}
  • Feature Toggle
    AttacksRitual Quality Check Off.pngRitual Quality Check On.png

    Template:Weapon Quality Table/Melee/Row

    Thrumbo horn Thrumbo horn Point (Stab) Point (Scratch) Base (Blunt) HP Value
    DPS[1] AP[1] Dam. Cool. AP DPS Chance[2] Dam. Cool. AP DPS Chance[2] Dam. Cool. AP DPS Chance[2]
    1. 1.0 1.1 Note: This is the actual base average derived from the melee verb system updated in 1.1.2610, it may sometimes disagree with the listed value in the in-game infobox.
      It may also change depending on the stats and the melee verbs available to the wielder
    2. Chance for attack to be selected, assuming only the weapon's attack verbs are considered. It may change depending on the melee verbs available to the wielder