Template:Weapon type page: Difference between revisions

From Baldur's Gate 3 Wiki
Jump to navigation Jump to search
No edit summary
(Simplify by using MediaWiki's builtin dd/dt/dl syntax.)
(43 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<includeonly>{{WeaponType|{{{type}}}}} are a type of {{{category}}}, {{{handedness}}}, {{{melee or ranged}}} [[Weapons|Weapon]]Following are some base attributes common to most {{{type}}}, although special or magical variants may be significantly different.  For the most common, nonmagical kind of this weapon, see [[{{{example}}}]].  Further down below, you can find a list of all {{{type}}} in the game.
<includeonly>{{#switch: {{{this is an example|}}}
| yes =
| #default =
  {{PageSeo
  | title = {{{type}}}
  | description = {{{type}}} are a type of {{{handedness}}} {{{category}}} {{{melee or ranged}}} weapon in Baldur's Gate 3Learn more about their properties and see the list of all {{{type}}} in the game.
  }}
}}


== Properties ==
{{WeaponType|{{{type}}}}} are a type of {{{handedness}}} {{{category}}} {{{melee or ranged}}} [[Weapons|weapon]]. Following are some base attributes common to most {{lc:{{{type}}} }}, although special or magical variants may be significantly different.  For the most common, nonmagical kind of this weapon, see [[{{{example}}}]].  Further down below, you can find a list of all {{lc:{{{type}}} }} in the game.


{{#if: {{{versatile damage|}}} |
<h2> Properties </h2>
One-handed damage:
 
}}{{DamageInfo
<div class="bg3wiki-property-list">
| {{{damage}}}
; {{#if: {{{versatile damage|}}} | One-handed damage | Damage }}
| {{{damage type}}}
: {{DamageInfo
| modifier = {{#if: {{{finesse|}}} | finesse | {{{melee or ranged}}} }}
    | {{{damage}}}
}}{{#if: {{{versatile damage|}}} |
    | {{{damage type}}}
Two-handed damage:
    | modifier = {{#if: {{{finesse|}}} | finesse | {{{melee or ranged}}} }}
{{DamageInfo | {{{versatile damage}}} | {{{damage type}}} | modifier = {{#if: {{{finesse|}}} | finesse | {{{melee or ranged}}} }} }}
    }}<!-- (prevent <dd> from being broken up)
-->{{#if: {{{versatile damage|}}} |
; Two-handed damage
: {{DamageInfo
    | {{{versatile damage}}}
    | {{{damage type}}}
    | modifier = {{#if: {{{finesse|}}} | finesse | {{{melee or ranged}}} }}
    }}
}}
}}
 
; Details
{{#if:{{{range m|}}}{{{range ft|}}}|
: {{#switch:{{{handedness|}}}
* {{Range|m={{{range m}}}|ft={{{range ft}}}}}
    | one-handed = {{One-Handed}}
|{{#if:{{{reach|}}}
    | two-handed = {{Two-Handed}}
|* {{Range|reach}}
    | versatile = {{Versatile}}
|* {{Range|melee}}
    }}
}}}}
{{#if: {{{range m|}}} {{{range ft|}}}
* {{#switch:{{{handedness|}}}
| : {{Range|m={{{range m}}}|ft={{{range ft}}}}}
| one-handed = {{One-Handed}}
| : {{#if:{{{range|}}}
| two-handed = {{Two-Handed}}
      | {{Range|{{{range}}}}}
| versatile = {{Versatile}}
      | {{#ifeq: {{{melee or ranged|}}} | ranged
|}}{{#if:{{{ammunition|}}}|
        | {{Range|ranged}}
* {{Ammunition}}
        | {{#if:{{{reach|}}}
}}{{#if:{{{finesse|}}}|
          | {{Range|reach}}
* {{Finesse}}
          | {{Range|melee}}
}}{{#if:{{{heavy|}}}|
          }}
* {{Heavy}}
        }}
}}{{#if:{{{light|}}}|
      }}
* {{Light}}
}} {{#if: {{{finesse|}}} | : {{Finesse}}
}}{{#if:{{{loading|}}}|
}} {{#if: {{{light|}}} | : {{Light}}
* {{Loading}}
}} {{#if: {{{reach|}}} | : {{Reach}}
}}{{#if:{{{reach|}}}|
}} {{#if: {{{thrown|}}} | : {{Thrown}}
* {{Reach}}
}} {{#if: {{{can't dual wield|}}} | : {{Can't Dual Wield}}
}}{{#if:{{{thrown|}}}|
}} {{#if: {{{dippable|}}} | : {{Dippable}}
* {{Thrown}}
}}{{#if:{{{can't dual wield|}}}|
* {{Can't Dual Wield}}
}}{{#if:{{{dippable|}}}|
* {{Dippable}}
}}
}}
</div>


=== Actions ===
=== Actions ===
Line 48: Line 58:
{{WeaponProficiencyUnlocks}}
{{WeaponProficiencyUnlocks}}


{{{actions}}}
{{#if: {{{weapon actions|}}}
| {{#invoke: ParseList | main | {{{weapon actions}}} | useTemplate = WeaponAction | type = htmlList }}
| {{{actions}}}
}}


== List of {{{type}}} ==
<h2> List of {{lc:{{{type}}} }}</h2>


{{#switch: {{{this is an example|}}}
| yes = ''Omitted because this is an example''
| #default =
{{WeaponsTableHeader}}
{{WeaponsTableHeader}}
{{#cargo_query: tables = weapons
{{#cargo_query: tables = weapons
| fields = name, image, rarity, enchantment, damage, weight_kg, weight_lb, price, special
| fields = _pageName=page, name, uid, icon, rarity, enchantment, damage, damage_type, extra_damage, extra_damage_type, extra_damage_2, extra_damage_2_type, weight_kg, weight_lb, price, passives, passives_main_hand, passives_off_hand, special, special_weapon_actions
| order by = rarity_order, name
| order by = rarity_order, name
| where = type = "{{{type}}}"
| where = type="{{{type}}}" AND legacy IS NULL
| default = {{WeaponsTableEmpty}}
| default = {{WeaponsTableEmpty}}
| format = template
| format = template
| template = WeaponTableRow
| template = WeaponsTableRow
| named args = yes
| named args = yes
}}
}}
{{WeaponsTableFooter}}
{{WeaponsTableFooter}}
}}
<h2>Legacy content</h2>
{{#switch: {{{this is an example|}}}
| yes = ''Omitted because this is an example''
| #default =
<ul>
{{#cargo_query: tables = weapons
| fields = _pageName=page, name, uid, legacy
| order by = rarity_order, name
| where = type="{{{type}}}" AND (legacy="unobtainable" OR legacy="inaccessible")
| default = ''(None)''
| format = template
| template = Legacy item entry
| order by = legacy
| named args = yes
| more results text =
}}
</ul>
}}


[[Category:Weapon Types]] [[Category:{{{category|simple}}} Weapon Types]]</includeonly><noinclude><!--
{{#switch: {{{this is an example|}}}
| yes =
| #default = [[Category:Equipment]] [[Category:Weapon Types]] [[Category:{{{category|simple}}} Weapon Types]]
}}</includeonly><noinclude><!--


     ==== Documentation follows ====
     ==== Documentation follows ====
Line 75: Line 114:
<pre>
<pre>
{{WeaponTypePage
{{WeaponTypePage
| <!-- See here for tips on how to use this template: https://bg3.wiki/wiki/Template:WeaponTypePage -->
<!-- See here for tips on how to use this template: https://bg3.wiki/wiki/Template:WeaponTypePage -->
| type = Longswords
| type = Longswords
| example = Longsword
| example = Longsword
Line 87: Line 126:
| light = yes
| light = yes
| dippable = yes
| dippable = yes
| actions =
| weapon actions = Pommel Strike, Lacerate
* {{Pommel Strike}}
* {{Lacerate}}
}}
}}
</pre>
</pre>
Line 95: Line 132:
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.
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.


[[Category:Page Generating Templates]]
[[Category:Page generating templates]]
 
Examples follow. __NOTOC__
 
= Daggers =
 
{{WeaponTypePage
| type = Daggers
| example = Dagger
| category = simple
| handedness = one-handed
| melee or ranged = melee
| damage = 1d4
| damage type = Piercing
| finesse = yes
| light = yes
| dippable = yes
| weapon actions = Piercing Strike
| this is an example = yes
}}
 
= Longbows =
 
{{WeaponTypePage
| type = Longbows
| example = Longbow
| category = martial
| handedness = two-handed
| melee or ranged = ranged
| damage = 1d8
| damage type = Piercing
| dippable = yes
| weapon actions = Hamstring Shot, Brace (Ranged)
| this is an example = yes
}}
 
= Longswords =
 
{{WeaponTypePage
| type = Longswords
| example = Longsword
| category = martial
| handedness = versatile
| melee or ranged = melee
| damage = 1d8
| damage type = Slashing
| versatile damage = 1d10
| dippable = yes
| weapon actions = Pommel Strike, Lacerate
| this is an example = yes
}}
 
----


{{#cargo_declare: _table = weapon_types
{{#cargo_declare: _table = weapon_types
Line 108: Line 197:
| light = Boolean
| light = Boolean
| dippable = Boolean
| dippable = Boolean
| actions = Wikitext
| weapon_actions = List (,) of String
}}
}}
</noinclude><includeonly>{{#cargo_store: _table = weapon_types
</noinclude><includeonly>{{#switch: {{{this is an example|}}}
| name = {{titleparts: {{PAGENAME}} }}
| yes =
| #default = {{#cargo_store: _table = weapon_types
| name = {{#titleparts: {{PAGENAME}} }}
| finesse = {{IfEmpty | {{{finesse|}}} | no}}
| finesse = {{IfEmpty | {{{finesse|}}} | no}}
| light = {{IfEmpty | {{{light|}}} | no}}
| light = {{IfEmpty | {{{light|}}} | no}}
| dippable = {{IfEmpty | {{{dippable|}}} | no}}
| dippable = {{IfEmpty | {{{dippable|}}} | no}}
}}
}}</includeonly>
}}</includeonly>

Revision as of 14:14, 24 April 2024

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
| weapon 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.

Examples follow.

Daggers

Daggers Daggers are a type of one-handed simple melee weapon. Following are some base attributes common to most daggers, although special or magical variants may be significantly different. For the most common, nonmagical kind of this weapon, see Dagger. Further down below, you can find a list of all daggers in the game.

Properties

Damage
Details
 One-Handed
 Melee: 1.5 m / 5  ft
Finesse Finesse
Light (weapon property) Light
Dippable Dippable

Actions

Proficiency Icon.png If you have proficiency, equip in main hand to gain:

List of daggers

Omitted because this is an example

Legacy content

Omitted because this is an example


Longbows

Longbows Longbows are a type of two-handed martial ranged weapon. Following are some base attributes common to most longbows, although special or magical variants may be significantly different. For the most common, nonmagical kind of this weapon, see Longbow. Further down below, you can find a list of all longbows in the game.

Properties

Damage
D8 Piercing.png 1d8 (1~8) + Dexterity modifier Damage TypesPiercing damage
Details
 Two-Handed
 Range: 18 m / 60 ft
Dippable Dippable

Actions

Proficiency Icon.png If you have proficiency, equip in main hand to gain:

  • Hamstring Shot Hamstring Shot ()
    Shoot an enemy in the thigh and possibly reduce their Movement Speed by 50%.
  • Brace (Ranged) Brace ()
    Spend 6 m / 20 ft of your movement. For the rest of your turn, roll ranged damage twice and use the highest result.

List of longbows

Omitted because this is an example

Legacy content

Omitted because this is an example


Longswords

Longswords Longswords are a type of versatile martial melee weapon. Following are some base attributes common to most longswords, although special or magical variants may be significantly different. For the most common, nonmagical kind of this weapon, see Longsword. Further down below, you can find a list of all longswords in the game.

Properties

One-handed damage
D8 Slashing.png 1d8 (1~8) + Strength modifier Damage TypesSlashing damage
Two-handed damage
D10 Slashing.png 1d10 (1~10) + Strength modifier Damage TypesSlashing damage
Details
 Versatile
 Melee: 1.5 m / 5  ft
Dippable Dippable

Actions

Proficiency Icon.png If you have proficiency, equip in main hand to gain:

  • Pommel Strike Pommel Strike ()
    Make a non-lethal attack against an enemy and possibly Dazed Daze them.
  • Lacerate Lacerate ()
    Slash at your target's vital points to make it Bleeding Bleed.

List of longswords

Omitted because this is an example

Legacy content

Omitted because this is an example



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