Template:CargoDamage: Difference between revisions
mNo edit summary |
(using a query for headers, added severlimbsprobability) |
||
Line 1: | Line 1: | ||
<noinclude>{{doc}}[[Category:Templates]]</noinclude><includeonly> | <noinclude>{{doc}}[[Category:Templates]]</noinclude><includeonly> | ||
{| class="responsive-table" style="width:{{#if: {{{width|}}}|{{{width}}}|50}}%;" | {| class="responsive-table" style="width:{{#if: {{{width|}}}|{{{width}}}|50}}%;" | ||
{{#cargo_query: | |||
tables = Items,Ammunition | tables = Items,Ammunition | ||
| join on = Items.name = Ammunition.name | | join on = Items.name = Ammunition.name | ||
| fields = Items.name, Items.icon, Items.afflictions, Items.attackspeed, Items.penetration, Items.bluntforcetrauma, Items.lacerations, Items.gunshotwound, Items.deeptissueinjury, Items.organdamage, Items.burn, Items.bleeding, Items.oxygenlow, Items.huskinfection, Items.psychosis, Items.morbusinepoisoning, Items.sufforinpoisoning, Items.deliriuminepoisoning, Items.cyanidepoisoning, Items.radiationsickness, Items.paralysis, Items.progressivestun, Items.stun, Items.pellets | | fields = Items.name, Items.afflictions, Items.attackspeed, Items.penetration, Ammunition.magazine, Ammunition.penetration, Ammunition.structuredamage, Items.explosionstructuredamage, Items.severlimbsprobability, Items.explosionseverlimbsprobability, Ammunition.explosionrange, Ammunition.usedby, Ammunition.usedby2, Ammunition.usedby3 | ||
| where = {{#if: {{{1|}}}|Items.name = "{{{1}}}" OR Items.name = "{{{2}}}" OR Items.name = "{{{3}}}" OR Items.name = "{{{4}}}" OR Items.name = "{{{5}}}" OR Items.name = "{{{6}}}"|{{#ifeq: {{{tabletype|}}}|sub|Ammunition.usedby LIKE "%{{PAGENAME}}%" OR Ammunition.usedby2 LIKE "%{{PAGENAME}}%" OR Ammunition.usedby3 LIKE "%{{PAGENAME}}%"}}}} | |||
| format = template | |||
| template = CargoDamage/header | |||
| named args = yes | |||
}}{{#cargo_query: | |||
tables = Items,Ammunition | |||
| join on = Items.name = Ammunition.name | |||
| fields = Items.name, Items.icon, Items.afflictions, Items.attackspeed, Items.penetration, Items.bluntforcetrauma, Items.lacerations, Items.gunshotwound, Items.deeptissueinjury, Items.organdamage, Items.burn, Items.bleeding, Items.oxygenlow, Items.huskinfection, Items.psychosis, Items.morbusinepoisoning, Items.sufforinpoisoning, Items.deliriuminepoisoning, Items.cyanidepoisoning, Items.radiationsickness, Items.paralysis, Items.progressivestun, Items.stun, Items.pellets, Ammunition.magazine, Ammunition.penetration, Ammunition.structuredamage, Items.explosionstructuredamage, Ammunition.explosionrange, Items.explosionradiationsickness, Items.explosiondeeptissueinjury, Items.explosionburn, Items.explosionlacerations, Items.explosionbleeding, Items.explosionstun, Ammunition.usedby, Ammunition.usedby2, Ammunition.usedby3, Items.severlimbsprobability, Items.explosionseverlimbsprobability | |||
| where = {{#if: {{{1|}}}|Items.name = "{{{1}}}" OR Items.name = "{{{2}}}" OR Items.name = "{{{3}}}" OR Items.name = "{{{4}}}" OR Items.name = "{{{5}}}" OR Items.name = "{{{6}}}"|{{#ifeq: {{{tabletype|}}}|sub|Ammunition.usedby LIKE "%{{PAGENAME}}%" OR Ammunition.usedby2 LIKE "%{{PAGENAME}}%" OR Ammunition.usedby3 LIKE "%{{PAGENAME}}%"}}}} | | where = {{#if: {{{1|}}}|Items.name = "{{{1}}}" OR Items.name = "{{{2}}}" OR Items.name = "{{{3}}}" OR Items.name = "{{{4}}}" OR Items.name = "{{{5}}}" OR Items.name = "{{{6}}}"|{{#ifeq: {{{tabletype|}}}|sub|Ammunition.usedby LIKE "%{{PAGENAME}}%" OR Ammunition.usedby2 LIKE "%{{PAGENAME}}%" OR Ammunition.usedby3 LIKE "%{{PAGENAME}}%"}}}} | ||
| format = template | | format = template |
Revision as of 15:06, 17 June 2022
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 | Severance Chance | Item | Afflictions | Attack Speed | Armor Penetration | Severance Chance | Item | Afflictions | Attack Speed | Armor Penetration | Severance Chance | Item | Afflictions | Attack Speed | Armor Penetration | Severance Chance
Error: No field named "bluntforcetrauma" found for the database table "Items".
|
---|
The above documentation is transcluded from Template:CargoDamage/doc. (edit | history)