Template:CargoDamage: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
m (Added weapondamagemodifier and displayed it next to "Afflictions")
mNo edit summary
Line 4: Line 4:
<th>Shots</th>}}
<th>Shots</th>}}
<th>Afflictions
<th>Afflictions
{{#ifeq:{{{Ammunition.usedby}}}|{{PAGENAME}}| ({{{Ammunition.usedbyweapondamagemodifier}}}x)}}<!--
{{#ifeq:{{{usedby}}}|{{PAGENAME}}| ({{{usedbyweapondamagemodifier}}}x)}}<!--
-->{{#ifeq:{{{Ammunition.usedby2}}}|{{PAGENAME}}| ({{{Ammunition.usedby2weapondamagemodifier}}}x)}}<!--
-->{{#ifeq:{{{usedby2}}}|{{PAGENAME}}| ({{{usedby2weapondamagemodifier}}}x)}}<!--
-->{{#ifeq:{{{Ammunition.usedby3}}}|{{PAGENAME}}| ({{{Ammunition.usedby3weapondamagemodifier}}}x)}}
-->{{#ifeq:{{{usedby3}}}|{{PAGENAME}}| ({{{usedby3weapondamagemodifier}}}x)}}
</th>{{#ifeq:{{{tabletype|}}}|melee|
</th>{{#ifeq:{{{tabletype|}}}|melee|
<th><abbr title="hits per second">Attack Speed</abbr></th>}}
<th><abbr title="hits per second">Attack Speed</abbr></th>}}

Revision as of 05:20, 29 December 2022

Documentation

This template is used to display a damage table that reads data from the Items cargo table. Items called this way must have their data set in their respective infoboxes, on their respective pages, for the data to be stored in the cargo table.

Sub Templates

Syntax

{{CargoDamage|tabletype=<melee> or <sub>|item 1|item 2|item 3|item 4|item 5|item 6|width = <custom width, default 50>}}

Important note: unlike most templates, parameters cannot have spaces and/or newlines between them and the separator pipes. So the following won't work, for example: {{CargoDamage| item 1 | item 2 }}

Example

{{CargoDamage|tabletype=melee|Diving Knife|Hardened Diving Knife|Dementonite Diving Knife|Europan Handshake}}

Gives:

Error: No field named "bluntforcetrauma" found for the database table "Items".
Item Afflictions Attack Speed Armor Penetration