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

From RimWorld Wiki
Jump to navigation Jump to search
m
(fixed that some body part weapons weren't handled correctly)
 
(34 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly><!--
! {{Icon Small|{{{?Name}}}}}
+
 
! style="text-align: left" | [[{{{?Name}}}]] {{#switch: {{Q|{{{?Name}}}|From DLC}} | Royalty (DLC) = {{RoyaltyIcon}} | Ideology (DLC) = {{IdeologyIcon}} }} {{#ifeq: {{Q|{{{?Name}}}|Type}} | Medical Items | &nbsp;{{ref label|Body|B|B}} }}{{#ifeq: {{Q|{{{?Name}}}|Class}} | Ultra Weapons |{{ref label|Ultra|F|F}} }}{{#switch: {{{?Name}}}
+
VARIABLES
  | Beer =&nbsp;{{ref label|Body|B|B}}
+
-->{{#if: {{#var:ignoreMaterial}} | {{#vardefine:weaponMWT|{{{weaponMWT|}}} }} }}<!-- define the name of the weapon if {{Melee Weapons Table/Material}} wasn't used
  | Club =&nbsp;{{ref label|Material|C|C}}
+
-->{{#vardefine:hasQuality | {{Q|{{#var:weaponMWT}}|Has Quality}} }}<!--
   | Jade knife =&nbsp;{{ref label|Jade|E|E}}
+
-->{{#vardefine:material  | {{{material|}}} }}<!--
   | Plasmasword | Persona Plasmasword =&nbsp;{{ref label|Plasma|G|G}}
+
-->{{#vardefine:isImplant | {{#if: {{#pos: {{Q|{{#var:weaponMWT}}|Category}} | Implant }} | true }} }}<!--
 +
-->{{#vardefine:bodyPart  | {{#if: {{#var:isImplant}} || {{Q|{{#var:weaponMWT}}|Body Part}} }} }}<!-- the body part that gets replaced if the weapon is an artificial body part but not an implant
 +
-->{{#vardefine:normalDPS  | {{True Melee DPS Calculator <!-- Decide whether a body part is replaced -->
 +
| {{#if: {{#var:isImplant}}{{#var:bodyPart}} || {{#var:weaponMWT}} }} <!-- Weapon -->
 +
| {{#var:material}} <!-- Material -->
 +
| Normal <!-- Quality -->
 +
| Human <!-- Pawn -->
 +
| {{#switch: {{#var:bodyPart}} | Hand | Arm | Shoulder = {{#var:weaponMWT}} }} <!-- Body parts that replace the left fist attack -->
 +
| <!-- Body parts that replace the right fist attack -->
 +
| <!-- Body parts that replace the teeth attack -->
 +
| <!-- Body parts that replace the head attack -->
 +
| {{#if: {{#var:isImplant}} | {{#var:weaponMWT}} }}<!-- Body parts that add an extra attack -->
 +
}} }}<!--
 +
-->{{#vardefine:normalAP  | {{#var:trueAP}} }}<!-- used as default sort value
 +
 
 +
TABLE ROW-->
 +
<tr {{#if: {{#var:material}} | {{#ifeq: {{lc:{{#var:material}} }} | steel ||class="mw-collapsible mw-collapsed" id="mw-customcollapsible-collapseMeleeWeaponsTable"}} }}>
 +
! {{Icon Small|{{#var:weaponMWT}} }}
 +
! style="text-align: left" | {{DLC Icons|{{#var:weaponMWT}} }}{{#ifeq: {{Q|{{#var:weaponMWT}}|Class}} | Ultra Weapons | &nbsp;{{Ref label|Ultra|C|C}} }}{{#switch: {{#var:weaponMWT}}
 +
   | Jade knife = &nbsp;{{Ref label|Jade|B|B}}
 +
   | Plasmasword | Persona plasmasword = &nbsp;{{Ref label|Plasma|D|D}}
 
}}
 
}}
| {{Q|{{{?Name}}}|MeleeCooldown}} s
+
! {{#if: {{Q|{{#var:weaponMWT}}|Stuff Tags}} | {{Icon Small|{{#var:material|steel}} }} [[{{#var:material|Steel}}]] | }}
| {{Q|{{{?Name}}}|MeleeDPS}}
+
{{#ifeq: {{#var:hasQuality}} | true
| {{#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}} }}
+
| {{!}} {{True Melee DPS Calculator|{{#var:weaponMWT}}|{{#var:material}}|Awful|Human}}
}}{{#switch: {{{?Name}}}
+
  {{!}} {{#var:trueAP}}%
| Plasmasword | Persona Plasmasword = &nbsp;+ Burn
+
  {{!}} {{True Melee DPS Calculator|{{#var:weaponMWT}}|{{#var:material}}|Poor|Human}}
| Zeushammer | Persona Zeushammer = &nbsp;+ EMP
+
  {{!}} {{#var:trueAP}}%
 +
  {{!}} {{#var:normalDPS}}
 +
  {{!}} {{#var:normalAP}}%
 +
  {{!}} {{True Melee DPS Calculator|{{#var:weaponMWT}}|{{#var:material}}|Good|Human}}
 +
  {{!}} {{#var:trueAP}}%
 +
  {{!}} {{True Melee DPS Calculator|{{#var:weaponMWT}}|{{#var:material}}|Excellent|Human}}
 +
  {{!}} {{#var:trueAP}}%
 +
  {{!}} {{True Melee DPS Calculator|{{#var:weaponMWT}}|{{#var:material}}|Masterwork|Human}}
 +
  {{!}} {{#var:trueAP}}%
 +
  {{!}} {{True Melee DPS Calculator|{{#var:weaponMWT}}|{{#var:material}}|Legendary|Human}}
 +
  {{!}} {{#var:trueAP}}%
 +
| {{!}} data-sort-value="{{#var:normalDPS}}" {{!}} –
 +
  {{!}} data-sort-value="{{#var:normalAP }}" {{!}}
 +
  {{!}} data-sort-value="{{#var:normalDPS}}" {{!}} –
 +
  {{!}} data-sort-value="{{#var:normalAP }}" {{!}} –
 +
  {{!}} {{#var:normalDPS}}
 +
  {{!}} {{#var:normalAP}}%
 +
  {{!}} data-sort-value="{{#var:normalDPS}}" {{!}} –
 +
  {{!}} data-sort-value="{{#var:normalAP }}" {{!}} –
 +
  {{!}} data-sort-value="{{#var:normalDPS}}" {{!}} –
 +
  {{!}} data-sort-value="{{#var:normalAP }}" {{!}}
 +
  {{!}} data-sort-value="{{#var:normalDPS}}" {{!}}
 +
  {{!}} data-sort-value="{{#var:normalAP }}" {{!}} –
 +
  {{!}} data-sort-value="{{#var:normalDPS}}" {{!}}
 +
  {{!}} data-sort-value="{{#var:normalAP }}" {{!}} –
 
}}
 
}}
| {{Q|{{{?Name}}}|MeleeAP}}
+
| {{#expr: {{#var:weightedTimeTotal}} round 2}} s
| {{#if: {{Q|{{{?Name}}}|Market Value Base}} | {{Q|{{{?Name}}}|Market Value Base}} | {{Market Value Calculator|{{{?Name}}}|Steel}} }}
+
| {{#if: {{#switch: Cut | {{Q|{{#var:weaponMWT}}|Attack 1 Type}} | {{Q|{{#var:weaponMWT}}|Attack 2 Type}} | {{Q|{{#var:weaponMWT}}|Attack 3 Type}} | {{Q|{{#var:weaponMWT}}|Attack 4 Type}} = Sharp}} | Sharp | {{#if: {{#switch: Stab | {{Q|{{#var:weaponMWT}}|Attack 1 Type}} | {{Q|{{#var:weaponMWT}}|Attack 2 Type}} | {{Q|{{#var:weaponMWT}}|Attack 3 Type}} | {{Q|{{#var:weaponMWT}}|Attack 4 Type}} = Sharp}} | Sharp | {{#if: {{#switch: Scratch | {{Q|Club|Attack 1 Type}} | {{Q|{{#var:weaponMWT}}|Attack 2 Type}} | {{Q|{{#var:weaponMWT}}|Attack 3 Type}} | {{Q|{{#var:weaponMWT}}|Attack 4 Type}} = Sharp}} | Sharp | Blunt}} }}
|-</includeonly><noinclude>{{Documentation}}</noinclude>
+
}}{{#switch: {{#var:weaponMWT}}
 +
| Plasmasword | Persona plasmasword = &nbsp;+ Burn
 +
| Zeushammer | Persona zeushammer = &nbsp;+ EMP
 +
}}
 +
| {{#if: {{Q|{{#var:weaponMWT}}|Market Value Base}} | {{Q|{{#var:weaponMWT}}|Market Value Base}} | {{Market Value Calculator|{{#var:weaponMWT}}| {{#if: {{Q|{{#var:weaponMWT}}|Stuff Tags}} | {{#var:material|steel}} }} }} }}
 +
</tr></includeonly><noinclude>
 +
{{Documentation}}</noinclude>

Latest revision as of 10:35, 5 January 2024

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

Overview[edit]

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[edit]

{{Melee Weapons Table}}

Preview[edit]

  • 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
    Archotech arm Archotech arm 6.28 18.75% 2 s Blunt 2,800
    Axe Axe Content added by the Royalty DLC Steel Steel 5.48 16.07% 6.08 17.83% 6.68 19.58% 7.28 21.34% 7.88 23.1% 9.38 27.5% 10.58 31.01% 2 s Sharp 120
    Beer Beer 4.4 12.75% 2 s Blunt 12
    Bionic arm Bionic arm 5.53 16.5% 2 s Blunt 1,030
    Breach axe Breach axe Steel Steel 5.14 9.4% 5.68 10.39% 6.22 11.38% 6.76 12.36% 7.3 13.35% 8.65 15.82% 9.73 17.79% 1.25 s Blunt 113
    Club Club Steel Steel 6.31 18.83% 2 s Blunt 80
    Drill arm Drill arm Content added by the Royalty DLC 5.9 18% 2 s Sharp 425
    Elbow blade Elbow blade Content added by the Royalty DLC 7.78 23.25% 2 s Sharp 355
    Elephant tusk Elephant tusk 6.44 23.33% 2.45 s Sharp 80
    Eltex staff Eltex staff Content added by the Royalty DLC [C] 3.98 12.6% 4.12 13.4% 4.51 16.5% 4.88 17.85% 5.24 19.2% 6.16 22.58% 6.9 25.28% 2.45 s Blunt 2,000
    Field hand Field hand Content added by the Royalty DLC 4.4 12.75% 2 s Blunt 425
    Flesh whip Flesh whip Content added by the Anomaly DLC 8.71 48% 2 s Sharp 0
    Gladius Gladius Steel Steel 5.78 17.27% 6.42 19.18% 7.06 21.08% 7.7 22.99% 8.33 24.9% 9.93 29.67% 11.2 33.49% 2 s Sharp 138
    Hand talon Hand talon Content added by the Royalty DLC 8.18 14.25% 1.63 s Blunt 355
    Ikwa Ikwa Steel Steel 5.46 16% 6.08 17.81% 6.7 19.63% 7.32 21.44% 7.94 23.25% 9.48 27.78% 10.72 31.41% 2 s Sharp 113
    Jade knife Jade knife [B] 4.69 14.29% 5.21 15.89% 5.73 17.48% 6.26 19.08% 6.78 20.68% 8.09 24.68% 9.13 27.87% 2.04 s Sharp 159
    Knee spike Knee spike Content added by the Royalty DLC 7.57 31.5% 2.45 s Sharp 355
    Knife Knife Steel Steel 5.74 13.95% 6.38 15.51% 7.02 17.06% 7.65 18.62% 8.29 20.18% 9.89 24.07% 11.17 27.18% 1.63 s Sharp 64
    Longsword Longsword Steel Steel 6.44 23.27% 7.17 25.93% 7.9 28.58% 8.64 31.24% 9.37 33.9% 11.54 41.69% 13.13 47.44% 2.45 s Sharp 255
    Mace Mace Steel Steel 5.69 17.27% 6.32 19.18% 6.95 21.08% 7.57 22.99% 8.2 24.9% 9.76 29.67% 11.02 33.49% 2 s Blunt 117
    Monosword Monosword Content added by the Royalty DLC [C] 8.73 57.2% 10.3 64.8% 11.45 72% 12.59 79.2% 13.74 86.4% 16.6 104.4% 18.89 118.8% 1.9 s Sharp 2,000
    Persona monosword Persona monosword Content added by the Royalty DLC [C] 11.63 57.6% 13.08 64.8% 14.53 72% 15.98 79.2% 17.44 86.4% 24.47 130.5% 27.84 148.5% 1.6 s Sharp 3,000
    Persona plasmasword Persona plasmasword Content added by the Royalty DLC [C] [D] 8.12 24.2% 9.05 26.98% 9.97 29.75% 10.9 32.53% 12.79 36.9% 15.45 44.59% 17.59 50.74% 1.9 s Sharp + Burn 3,000
    Persona zeushammer Persona zeushammer Content added by the Royalty DLC [C] 9.91 31.07% 11.06 34.7% 13.17 40% 14.49 44% 15.8 48% 19.1 58% 21.73 66% 2.05 s Blunt + EMP 3,000
    Plasmasword Plasmasword Content added by the Royalty DLC [C] [D] 6.03 22.4% 6.71 24.95% 7.39 27.5% 8.08 30.05% 8.76 32.6% 10.47 38.98% 12.63 47.03% 2.45 s Sharp + Burn 2,000
    Power claw Power claw 9.28 27.75% 2 s Blunt 385
    Prosthetic arm Prosthetic arm 4.1 12% 2 s Blunt 260
    Spear Spear Steel Steel 6.39 33.5% 7.13 37.5% 7.88 41.5% 8.63 45.5% 9.38 49.5% 11.43 61.63% 13.01 70.13% 2.6 s Sharp 186
    Thrumbo horn Thrumbo horn 9.44 34.63% 2.45 s Sharp 800
    Venom fangs Venom fangs Content added by the Royalty DLC 6.65 19.5% 2 s Blunt 355
    Venom talon Venom talon Content added by the Royalty DLC 6.34 14.25% 1.63 s Blunt 355
    Warhammer Warhammer Content added by the Royalty DLC Steel Steel 5.64 21.07% 6.28 23.45% 6.91 25.83% 7.55 28.22% 8.19 30.6% 9.78 36.56% 11.26 43.73% 2.6 s Blunt 350
    Wood Wood 4.78 14.25% 2 s Blunt 1.2
    Zeushammer Zeushammer Content added by the Royalty DLC [C] 7.62 31.07% 8.52 34.7% 9.41 38.33% 10.3 41.97% 11.78 48% 14.24 58% 16.2 66% 2.75 s Blunt + EMP 2,000
    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.