User:FourGreenFields/Row: Difference between revisions
From Official Barotrauma Wiki
(copied from WeaponsTable/Melee for testing) |
(added doc + examples of how to color table cells based on the values & how we can calculate dps.) |
||
Line 1: | Line 1: | ||
<onlyinclude> | <noinclude>{{User:FourGreenFields/doc}}</noinclude><includeonly><onlyinclude> | ||
|- | |- | ||
| style="text-align:center;" | [[File:{{#replace:{{{name}}}|&#39;|'}}.png|x50px]] <br> [[{{#replace:{{{name}}}|&#39;|'}}]] | | style="text-align:center;" | [[File:{{#replace:{{{name}}}|&#39;|'}}.png|x50px]] <br> [[{{#replace:{{{name}}}|&#39;|'}}]] | ||
| {{{attackspeed}}} | | style="background-color:{{#ifexpr:{{{attackspeed|}}}>=1|{{#ifexpr:{{{attackspeed|}}}=1|blue|green}}|red}}" | {{{attackspeed}}} | ||
|{{#if:{{{weapondamagemodifier|}}}|{{#vardefine:weapondamagemodifier|{{{weapondamagemodifier}}}}}|{{#vardefine:weapondamagemodifier|1}}}}<!-- | |{{#if:{{{weapondamagemodifier|}}}|{{#vardefine:weapondamagemodifier|{{{weapondamagemodifier}}}}}|{{#vardefine:weapondamagemodifier|1}}}}<!-- | ||
Line 49: | Line 49: | ||
| {{#if:{{{penetration|}}}|{{{penetration}}}%}} | | {{#if:{{{penetration|}}}|{{{penetration}}}%}} | ||
| {{#if:{{{severlimbsprobability|}}}|{{{severlimbsprobability|}}}%}} | | {{#if:{{{severlimbsprobability|}}}|{{{severlimbsprobability|}}}%}} | ||
</onlyinclude> | | {{#vardefine:TotalDamage|{{AmmoBoxDamage|{{{name|}}}}}}}<!-- Reusing a template that sums all combat damage of an item (like lacerations, gunshotwound, bleeding etc.) | ||
-->{{#expr:{{#var:TotalDamage}}*{{{attackspeed}}}}}</onlyinclude></includeonly> |
Revision as of 22:35, 18 April 2023
Trying to figure out how to do conditional formatting with this
Sub Templates
Template in use
Melee
weapontype
defined asmelee
.
{{User:FourGreenFields|tabletype=melee}}
Weapon | Attack Speed | Afflictions | Penetration | Severance Chance |
DPS
Error: No field named "bluntforcetrauma" found for the database table "Items".
|
---|
The above documentation is transcluded from User:FourGreenFields/Row/doc. (edit | history)