User:FourGreenFields/Row: Difference between revisions
From Official Barotrauma Wiki
(copied from WeaponsTable/Melee for testing) |
mNo edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude> | <noinclude>{{User:FourGreenFields/doc}}</noinclude><includeonly><onlyinclude> | ||
|- | |- {{#vardefine:TotalDamage|{{AmmoBoxDamage|{{{name|}}}}}}} {{#vardefine:DPS|{{#expr:{{#var:TotalDamage}}*{{{attackspeed}}}}}}}<!-- Reusing a template that sums all combat damage of an item (like lacerations, gunshotwound, bleeding etc.) --> | ||
| 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 48: | Line 48: | ||
-->|}} | -->|}} | ||
| {{#if:{{{penetration|}}}|{{{penetration}}}%}} | | {{#if:{{{penetration|}}}|{{{penetration}}}%}} | ||
| {{#if:{{{severlimbsprobability|}}}|{{{severlimbsprobability|}}}%}} | | {{#if:{{{severlimbsprobability|}}}|{{{severlimbsprobability|}}}%}}<!-- | ||
</onlyinclude> | |||
-->{{#vardefine:Red| {{#expr:175-({{#var:DPS}}*4)}} }}<!-- Red = 175 - (DPS * 4) | |||
-->{{#vardefine:Green| {{#expr:{{#var:DPS}}*4}} }}<!-- Green = DPS * 4 | |||
125 green is the highest possible so that it doesn't blind you when it maxes out --> | |||
| style="background-color:rgb({{#var:Red}}, {{#ifexpr:{{#var:Green}}>125|125|{{#var:Green}}}}, 0)" | {{#var:DPS}}</onlyinclude></includeonly> |
Latest revision as of 11:31, 19 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)