Template:CargoDamage/doc: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
(Created page with "{{doc/start}} 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 in...")
 
mNo edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{doc/start}}
{{doc/start}}
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.
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==
*[[Template:CargoDamage/sub]]
*[[Template:CargoDamage/header]]
*[[Template:CargoDamage/row]]
==Syntax==
==Syntax==
<code><nowiki>{{ CargoDamage | item 1 | item 2 | item 3 | item 4 | item 5 | item 6 | width = <custom width, default 50> }}</nowiki></code>
<code><nowiki>{{CargoDamage|tabletype=<melee> or <sub>|item 1|item 2|item 3|item 4|item 5|item 6|width = <custom width, default 50>}}</nowiki></code>
 
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: <code><nowiki>{{CargoDamage| item 1 | item 2 }}</nowiki></code>
==Example==
==Example==
<code><nowiki>{{CargoDamage|Diving Knife|Hardened Diving Knife|Dementonite Diving Knife|Europan Handshake}}</nowiki></code>
<code><nowiki>{{CargoDamage|tabletype=melee|Diving Knife|Hardened Diving Knife|Dementonite Diving Knife|Europan Handshake}}</nowiki></code>


Gives:
Gives:
{{CargoDamage|Diving Knife|Hardened Diving Knife|Dementonite Diving Knife|Europan Handshake}}  
{{CargoDamage|tabletype=melee|Diving Knife|Hardened Diving Knife|Dementonite Diving Knife|Europan Handshake}}  
 
{{doc/end}}
{{doc/end}}

Latest revision as of 03:03, 10 April 2023

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:

Item Afflictions Attack Speed Armor Penetration

Dementonite Diving Knife
 Lacerations (10)*
 Bleeding (10)*
 Psychosis (5)*
 Stun (0.2)*
1.48 0%

Diving Knife
 Lacerations (10)*
 Bleeding (10)*
 Stun (0.2)*
1.33 0%

Europan Handshake
 Lacerations (10)*
 Bleeding (10)*
 Stun (0.2)*
1.33 0%

Hardened Diving Knife
 Lacerations (15)*
 Bleeding (5)*
 Stun (0.2)*
1.33 25%

This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.