Template:WeaponsTable: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
m (Ranged weapons now sorted by ammo, then by name.)
No edit summary
Line 1: Line 1:
<noinclude>{{doc}}[[Category:Templates]][[Category:Cargo Querying Templates]]</noinclude>
<noinclude>{{doc}}[[Category:Templates]][[Category:Cargo Querying Templates]]</noinclude>
<includeonly>{| class="responsive-table" style="width:{{{width|50}}}%"
<includeonly>{| class="responsive-table" style="width:{{{width|50}}}%"
!Weapon Name
!Weapon
{{#ifeq:{{{Tabletype|}}}|Ranged|
{{#ifeq:{{{tabletype|}}}|ranged|
!<abbr title="Talent required to craft the item; Level Difficulty required to buy the item; Stores that sell the item;>Sources</abbr>
!Firerate
!<abbr title="Shots per Second">Firerate</abbr>
!Supply
!<abbr title="Modifier of all damage dealt by the Weapon">Damage<br>Modifier</abbr>
!<abbr title="Max number of ammunition stackable in the weapon">Ammo<br>Capacity</abbr>
!<abbr title="Max number of ammunition stackable in the weapon">Ammo<br>Capacity</abbr>
!<abbr title="Max number of shots in a Magazine or the Max duration of a Fuel Tank">Magazine<br>size/Fuel<br>duration</abbr>
!Ammunition
!Ammunition}}<!--
!<abbr title="Max number of shots in a magazine">Magazine<br>size</abbr>
-->{{#ifeq:{{{Tabletype|}}}|Melee|
!Afflictions
!Penetration}}<!--
-->{{#ifeq:{{{tabletype|}}}|melee|
!<abbr title="Talent required to craft the item; Level Difficulty required to buy the item; Stores that sell the item;>Sources</abbr>
!<abbr title="Talent required to craft the item; Level Difficulty required to buy the item; Stores that sell the item;>Sources</abbr>
!<abbr title="Modifier of all damage dealt by the Weapon">Damage<br>Modifier</abbr>
!<abbr title="Modifier of all damage dealt by the Weapon">Damage<br>Modifier</abbr>
!<abbr title="Attacks per Second">Attack Speed</abbr>
!<abbr title="Attacks per Second">Attack Speed</abbr>
!Afflictions}}<!--
!Afflictions}}<!--
-->{{#ifeq:{{{Tabletype|}}}|Throwable|
-->{{#ifeq:{{{tabletype|}}}|throwable|
!<abbr title="Talent required to craft the item; Level Difficulty required to buy the item; Stores that sell the item;>Sources</abbr>
!<abbr title="Talent required to craft the item; Level Difficulty required to buy the item; Stores that sell the item;>Sources</abbr>
!Afflictions
!Afflictions
!Explosion
!Explosion
!Explosion<br>Range}}<!--
!Explosion<br>Range}}<!--
-->{{#ifeq:{{{Tabletype|}}}|Explosive|
-->{{#ifeq:{{{tabletype|}}}|explosive|
!<abbr title="Talent required to craft the weapon">Required Talent</abbr>
!<abbr title="Talent required to craft the weapon">Required Talent</abbr>
!<abbr title="Where is the Weapon sold and minimum Level Difficulty required>Store Availability</abbr>
!<abbr title="Where is the Weapon sold and minimum Level Difficulty required>Store Availability</abbr>
Line 25: Line 26:
!Explosion
!Explosion
!Explosion<br>Range}}<!--
!Explosion<br>Range}}<!--
-->{{#cargo_query:
-->
{{#cargo_query:
tables = Items
tables = Items
| fields = Items.name, Items.type, Items.icon, Items.weapontype, Items.minleveldifficulty, Items.unbuyable, Items.outpostsold, Items.citysold, Items.researchsold, Items.militarysold, Items.minesold, Items.medicalsold, Items.engineeringsold, Items.armorysold, Items.ammomaxstack, Items.talent, Items.afflictions, Items.weapondamagemodifier, 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.projectiles, Items.ammocount, Items.magazine, Items.magazine2, Items.fuelduration, Items.fuelduration2, Items.ammo, Items.explosionrange, Items.explosionradiationsickness, Items.explosiondeeptissueinjury, Items.explosionburn, Items.explosionlacerations, Items.explosionbleeding, Items.explosionstun, Items.explosionstructuredamage, Items.structuredamage, Items.outpostmultiplier, Items.citymultiplier, Items.researchmultiplier, Items.militarymultiplier, Items.minemultiplier, Items.medicalmultiplier, Items.engineeringmultiplier, Items.armorymultiplier,
| fields = Items.name, Items.type, Items.icon, Items.ammotype, Items.weapontype, Items.ammomaxstack, Items.weapondamagemodifier, Items.attackspeed, Items.penetration, Items.projectiles, Items.ammocount, Items.magazine, Items.magazine2, Items.fuelduration, Items.fuelduration2, Items.ammo, Items.supplyname, Items.supplyitems,
| where = Items.weapontype="{{#switch: {{{Tabletype}}}|Ranged=ranged|Melee=melee|Throwable=throwable|Explosive=explosive}}"
<!-- Afflictions -->
| order by = Items.ammo, Items.name
Items.afflictions, Items.bluntforcetrauma, Items.lacerations, Items.gunshotwound, Items.deeptissueinjury, Items.organdamage, Items.burn, Items.bleeding, Items.progressivestun, Items.stun, Items.structuredamage,
Items.explosionrange, Items.explosionradiationsickness, Items.explosiondeeptissueinjury, Items.explosionburn, Items.explosionlacerations, Items.explosionbleeding, Items.explosionstun, Items.explosionstructuredamage,
| where = Items.weapontype="{{#switch: {{{tabletype}}}|ranged=ranged|melee=melee|throwable=throwable|explosive=explosive}}"
| order by = Items.ammo DESC, Items.weapondamagemodifier, Items.name
| format = template
| format = template
| template = {{#switch: {{{Tabletype}}}|Ranged=WeaponsTable/Ranged|Melee=WeaponsTable/Melee|Throwable=WeaponsTable/Throwable|Explosive=WeaponsTable/Explosive}}
| template = {{#switch: {{{tabletype}}}|ranged=WeaponsTable/ranged|melee=WeaponsTable/melee|throwable=WeaponsTable/throwable|explosive=WeaponsTable/explosive}}
| named args = yes
| named args = yes
}}
}}
|}</includeonly>
|}</includeonly>

Revision as of 16:29, 17 March 2023

Documentation

Table displaying Weapons for the Handheld Weapons page.

Sub Templates

See also

Template in use

Ranged

To show up here items must have:

  • weapontype defined as ranged.
{{WeaponsTable|tabletype=ranged}}
Weapon Firerate Supply Ammo
Capacity
Ammunition Magazine
size
Afflictions Penetration
Error: No field named "type" found for the database table "Items".

Melee

  • weapontype defined as melee.
{{WeaponsTable|tabletype=melee}}
Weapon Sources Damage
Modifier
Attack Speed Afflictions
Error: No field named "type" found for the database table "Items".

Throwable

  • weapontype defined as throwable.
{{WeaponsTable|tabletype=throwable}}
Weapon Sources Afflictions Explosion Explosion
Range
Error: No field named "type" found for the database table "Items".