Template:WeaponsTable: Difference between revisions
From Official Barotrauma Wiki
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 | !Weapon | ||
{{#ifeq:{{{ | {{#ifeq:{{{tabletype|}}}|ranged| | ||
! | !Firerate | ||
!Supply | |||
! | |||
!<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 | !Ammunition | ||
! | !<abbr title="Max number of shots in a magazine">Magazine<br>size</abbr> | ||
-->{{#ifeq:{{{ | !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:{{{ | -->{{#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:{{{ | -->{{#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. | | 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: {{{ | <!-- 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: {{{ | | 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
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 asranged
.
{{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 asmelee
.
{{WeaponsTable|tabletype=melee}}
Weapon | Sources | Damage Modifier |
Attack Speed | Afflictions
Error: No field named "type" found for the database table "Items".
|
---|
Throwable
weapontype
defined asthrowable
.
{{WeaponsTable|tabletype=throwable}}
Weapon | Sources | Afflictions | Explosion | Explosion Range Error: No field named "type" found for the database table "Items".
|
---|
The above documentation is transcluded from Template:WeaponsTable/doc. (edit | history)