Difference between revisions of "Template:Melee Weapons Table Row"

From RimWorld Wiki
Jump to navigation Jump to search
(AP varies with quality. And this was set to use legendary's avgAP.)
(sort non-quality items in all columns with their default DPS or AP)
Line 1: Line 1:
<includeonly>{{#vardefine: no_quality | }}
+
<includeonly><!--
 +
 
 +
VARIABLES
 +
-->{{#vardefine:no_quality |}}<!-- Is set to "1" below, if weapon has no quality
 +
-->{{#vardefine:normalDPS  | {{True Melee DPS Calculator|{{{?Name}}}||Normal}} }}<!-- used as default sort value
 +
-->{{#vardefine:normalAP  | {{#var:trueAP}} }}<!-- used as default sort value
 +
 
 +
TABLE ROW-->
 
! {{Icon Small|{{{?Name}}}}}
 
! {{Icon Small|{{{?Name}}}}}
! style="text-align: left" | [[{{{?Name}}}]]{{#switch: {{Q|{{{?Name}}}|From DLC}} | Royalty (DLC) = &nbsp;{{RoyaltyIcon}} | Ideology (DLC) = &nbsp;{{IdeologyIcon}} }}{{#ifeq: {{Q|{{{?Name}}}|Type}} | Medical Items | &nbsp;{{ref label|Body|B|B}}{{#vardefine: no_quality | 1}} }}{{#ifeq: {{Q|{{{?Name}}}|Class}} | Ultra Weapons | &nbsp;{{ref label|Ultra|E|E}} }}{{#switch: {{{?Name}}}
+
! style="text-align: left" | {{DLC Icons|{{{?Name}}} }}{{#ifeq: {{Q|{{{?Name}}}|Type}} | Medical Items | &nbsp;{{Ref label|Body|B|B}}{{#vardefine:no_quality|1}} }}{{#ifeq: {{Q|{{{?Name}}}|Class}} | Ultra Weapons | &nbsp;{{Ref label|Ultra|E|E}} }}{{#switch: {{{?Name}}}
   | Beer | Thrumbo horn | Elephant tusk | Wood =&nbsp;{{ref label|Body|B|B}}{{#vardefine: no_quality | 1}}
+
   | Beer | Thrumbo horn | Elephant tusk | Wood = &nbsp;{{Ref label|Body|B|B}}{{#vardefine:no_quality|1}}
   | Club =&nbsp;{{ref label|Quality|C|C}}{{#vardefine: no_quality | 1}}
+
   | Club = &nbsp;{{Ref label|Quality|C|C}}{{#vardefine:no_quality|1}}
   | Jade knife =&nbsp;{{ref label|Jade|D|D}}
+
   | Jade knife = &nbsp;{{Ref label|Jade|D|D}}
   | Plasmasword | Persona Plasmasword =&nbsp;{{ref label|Plasma|F|F}}
+
   | Plasmasword | Persona Plasmasword = &nbsp;{{Ref label|Plasma|F|F}}
 
}}
 
}}
| {{#if: {{#var: no_quality}} | - | {{True Melee DPS Calculator|{{{?Name}}}||Awful}}}}
+
| {{#if: {{#var:no_quality}} | data-sort-value="{{#var:normalDPS}}" {{!}} – | {{True Melee DPS Calculator|{{{?Name}}}||Awful}} }}
| {{#if: {{#var: no_quality}} | - | {{#var:trueAP}}%}}
+
| {{#if: {{#var:no_quality}} | data-sort-value="{{#var:normalAP }}" {{!}} – | {{#var:trueAP}}%}}
| {{#if: {{#var: no_quality}} | - | {{True Melee DPS Calculator|{{{?Name}}}||Poor}}}}
+
| {{#if: {{#var:no_quality}} | data-sort-value="{{#var:normalDPS}}" {{!}} – | {{True Melee DPS Calculator|{{{?Name}}}||Poor}} }}
| {{#if: {{#var: no_quality}} | - | {{#var:trueAP}}%}}
+
| {{#if: {{#var:no_quality}} | data-sort-value="{{#var:normalAP }}" {{!}} – | {{#var:trueAP}}%}}
| {{True Melee DPS Calculator|{{{?Name}}}||Normal}}
+
| {{#var:normalDPS}}
| {{#var:trueAP}}%
+
| {{#var:normalAP}}%
| {{#if: {{#var: no_quality}} | - | {{True Melee DPS Calculator|{{{?Name}}}||Good}}}}
+
| {{#if: {{#var:no_quality}} | data-sort-value="{{#var:normalDPS}}" {{!}} – | {{True Melee DPS Calculator|{{{?Name}}}||Good}} }}
| {{#if: {{#var: no_quality}} | - | {{#var:trueAP}}%}}
+
| {{#if: {{#var:no_quality}} | data-sort-value="{{#var:normalAP }}" {{!}} – | {{#var:trueAP}}%}}
| {{#if: {{#var: no_quality}} | - | {{True Melee DPS Calculator|{{{?Name}}}||Excellent}}}}
+
| {{#if: {{#var:no_quality}} | data-sort-value="{{#var:normalDPS}}" {{!}} – | {{True Melee DPS Calculator|{{{?Name}}}||Excellent}} }}
| {{#if: {{#var: no_quality}} | - | {{#var:trueAP}}%}}
+
| {{#if: {{#var:no_quality}} | data-sort-value="{{#var:normalAP }}" {{!}} – | {{#var:trueAP}}%}}
| {{#if: {{#var: no_quality}} | - | {{True Melee DPS Calculator|{{{?Name}}}||Masterwork}}}}
+
| {{#if: {{#var:no_quality}} | data-sort-value="{{#var:normalDPS}}" {{!}} – | {{True Melee DPS Calculator|{{{?Name}}}||Masterwork}} }}
| {{#if: {{#var: no_quality}} | - | {{#var:trueAP}}%}}
+
| {{#if: {{#var:no_quality}} | data-sort-value="{{#var:normalAP }}" {{!}} – | {{#var:trueAP}}%}}
| {{#if: {{#var: no_quality}} | - | {{True Melee DPS Calculator|{{{?Name}}}||Legendary}}}}
+
| {{#if: {{#var:no_quality}} | data-sort-value="{{#var:normalDPS}}" {{!}} – | {{True Melee DPS Calculator|{{{?Name}}}||Legendary}} }}
| {{#if: {{#var: no_quality}} | - | {{#var:trueAP}}%}}
+
| {{#if: {{#var:no_quality}} | data-sort-value="{{#var:normalAP }}" {{!}} – | {{#var:trueAP}}%}}
| {{#expr: ({{Q|{{{?Name}}}|Attack 1 Cooldown}}*{{#var: attack1InitialSelectionWeight}} + {{#if: {{Q|{{{?Name}}}|Attack 2 Cooldown}} | {{Q|{{{?Name}}}|Attack 2 Cooldown}}*{{#var: attack2InitialSelectionWeight}} | 0 }} + {{#if: {{Q|{{{?Name}}}|Attack 3 Cooldown}} | {{Q|{{{?Name}}}|Attack 3 Cooldown}}*{{#var: attack3InitialSelectionWeight}} | 0 }} + {{#if: {{Q|{{{?Name}}}|Attack 4 Cooldown}} | {{Q|{{{?Name}}}|Attack 4 Cooldown}}*{{#var: attack4InitialSelectionWeight}} | 0 }}) / ({{#var: attack1InitialSelectionWeight}} + {{#if: {{#var: attack2InitialSelectionWeight}} | {{#var: attack2InitialSelectionWeight}} | 0 }} + {{#if: {{#var: attack3InitialSelectionWeight}} | {{#var: attack3InitialSelectionWeight}} | 0 }} + {{#if: {{#var: attack4InitialSelectionWeight}} | {{#var: attack4InitialSelectionWeight}} | 0 }})round2}} s
+
| {{#expr: ({{Q|{{{?Name}}}|Attack 1 Cooldown}}*{{#var:attack1InitialSelectionWeight}} + {{#if: {{Q|{{{?Name}}}|Attack 2 Cooldown}} | {{Q|{{{?Name}}}|Attack 2 Cooldown}}*{{#var:attack2InitialSelectionWeight}} | 0 }} + {{#if: {{Q|{{{?Name}}}|Attack 3 Cooldown}} | {{Q|{{{?Name}}}|Attack 3 Cooldown}}*{{#var:attack3InitialSelectionWeight}} | 0 }} + {{#if: {{Q|{{{?Name}}}|Attack 4 Cooldown}} | {{Q|{{{?Name}}}|Attack 4 Cooldown}}*{{#var:attack4InitialSelectionWeight}} | 0 }}) / ({{#var:attack1InitialSelectionWeight}} + {{#if: {{#var:attack2InitialSelectionWeight}} | {{#var:attack2InitialSelectionWeight}} | 0 }} + {{#if: {{#var:attack3InitialSelectionWeight}} | {{#var:attack3InitialSelectionWeight}} | 0 }} + {{#if: {{#var:attack4InitialSelectionWeight}} | {{#var:attack4InitialSelectionWeight}} | 0 }})round2}} s
 
| {{#if: {{#switch: Cut | {{Q|{{{?Name}}}|Attack 1 Type}} | {{Q|{{{?Name}}}|Attack 2 Type}} | {{Q|{{{?Name}}}|Attack 3 Type}} | {{Q|{{{?Name}}}|Attack 4 Type}} = Sharp}} | Sharp | {{#if: {{#switch: Stab | {{Q|{{{?Name}}}|Attack 1 Type}} | {{Q|{{{?Name}}}|Attack 2 Type}} | {{Q|{{{?Name}}}|Attack 3 Type}} | {{Q|{{{?Name}}}|Attack 4 Type}} = Sharp}} | Sharp | {{#if: {{#switch: Scratch | {{Q|Club|Attack 1 Type}} | {{Q|{{{?Name}}}|Attack 2 Type}} | {{Q|{{{?Name}}}|Attack 3 Type}} | {{Q|{{{?Name}}}|Attack 4 Type}} = Sharp}} | Sharp | Blunt}} }}
 
| {{#if: {{#switch: Cut | {{Q|{{{?Name}}}|Attack 1 Type}} | {{Q|{{{?Name}}}|Attack 2 Type}} | {{Q|{{{?Name}}}|Attack 3 Type}} | {{Q|{{{?Name}}}|Attack 4 Type}} = Sharp}} | Sharp | {{#if: {{#switch: Stab | {{Q|{{{?Name}}}|Attack 1 Type}} | {{Q|{{{?Name}}}|Attack 2 Type}} | {{Q|{{{?Name}}}|Attack 3 Type}} | {{Q|{{{?Name}}}|Attack 4 Type}} = Sharp}} | Sharp | {{#if: {{#switch: Scratch | {{Q|Club|Attack 1 Type}} | {{Q|{{{?Name}}}|Attack 2 Type}} | {{Q|{{{?Name}}}|Attack 3 Type}} | {{Q|{{{?Name}}}|Attack 4 Type}} = Sharp}} | Sharp | Blunt}} }}
 
}}{{#switch: {{{?Name}}}
 
}}{{#switch: {{{?Name}}}

Revision as of 16:18, 12 November 2023

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

Overview

This template is used by Template:Melee Weapons Table to generate rows for an automated comparison table of all melee weapons. It was made for the weapons page.

Example

{{Melee Weapons Table}}

Preview

  • Name Material Awful Poor Normal Good Excellent Masterwork Legendary Average
    cooldown
    Damage
    type [A]
    Value
    in Silver
    DPS AP DPS AP DPS AP DPS AP DPS AP DPS AP DPS AP
    Human Unarmed human 4.1 12% 2 s Blunt
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    [[{{{?Name}}}]] (Error: Page does not exist) [[{{{?Name}}}|{{{?Name}}}]] Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Division by zero. 0% Expression error: Unexpected * operator. s Blunt Expression error: Unexpected < operator.
    A All sharp melee weapons come also with (weak) blunt attacks.
    B A jade knife can only be obtained via the Lost tribe scenario; they cannot be crafted nor purchased.
    C These weapons cannot be created by the player, they are able to be obtained through quests and purchasing them from Merchants. All but the eltex staff come in "persona" variants that cannot be wielded by anyone other than the bonded pawn unless it has the "freewielder" trait, so make sure you choose a good pawn to use them.
    D These weapons also have a 75% chance to set a pawn on fire. This damage is included in the DPS.