Template:Weapon type page: Difference between revisions

From Baldur's Gate 3 Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 52: Line 52:
== List of {{{type}}} ==
== List of {{{type}}} ==


{| class="wikitable sortable"
{{WeaponsTableHeader}}
! Weapon !! Enchantment !! Damage !! Weight !! Price !! Special
{{#cargo_query: tables = weapons
{{#cargo_query: tables = weapons
| fields = name, image, rarity, enchantment, damage, weight_kg, weight_lb, price, special
| fields = name, image, rarity, enchantment, damage, weight_kg, weight_lb, price, special
| order by = rarity_order, name
| order by = rarity_order, name
| where = type = "{{{type}}}"
| where = type = "{{{type}}}"
| default = {{WeaponsTableEmpty}}
| format = template
| format = template
| template = WeaponTableRow
| template = WeaponTableRow
| named args = yes
| named args = yes
}}
}}
|}
{{WeaponsTableFooter}}


[[Category:Weapon Types]] [[Category:{{{category|simple}}} Weapon Types]]</includeonly><noinclude><!--
[[Category:Weapon Types]] [[Category:{{{category|simple}}} Weapon Types]]</includeonly><noinclude><!--

Revision as of 23:34, 15 July 2023

This template generates entire weapon type pages such as Daggers or Longswords.

Here's some example usage (note that this is intentionally wrong, to showcase as many parameters as possible):

{{WeaponTypePage
| <!-- See here for tips on how to use this template: https://bg3.wiki/wiki/Template:WeaponTypePage -->
| type = Longswords
| example = Longsword
| category = martial
| handedness = versatile
| melee or ranged = melee
| damage = 1d8 + 1
| damage type = Slashing
| versatile damage = 1d10 + 2
| finesse = yes
| light = yes
| dippable = yes
| actions =
* {{Pommel Strike}}
* {{Lacerate}}
}}

Note that the template even adds the page to the correct categories. And for the same reason, it shouldn't be invoked here for the purpose of showing how the results look; that would result in this template page being added to the categories to which the weapon type pages are added.

This template defines the table "weapon_types". View table.