Template:Weapon type page: Difference between revisions

Jump to navigation Jump to search
Minor wording adjustment
No edit summary
(Minor wording adjustment)
 
(76 intermediate revisions by 10 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 type of this weapon, see [[{{{example}}}]]. Further down below, you can find a list of all {{lc:{{{type}}} }} in the game.


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


{{{main hand only}}}
|}}
=== Actions ===
=== Actions ===


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


{{{actions|* {{Flourish}}}}}
<h2> List of {{lc:{{{type}}} }}</h2>


== List of {{{type}}} ==
{{#switch: {{{this is an example|}}}
| yes = ''Omitted because this is an example''
| #default =
{{WeaponsTableHeader}}
{{#cargo_query: tables = weapons
| 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
| where = type="{{{type}}}" AND legacy IS NULL
| default = {{WeaponsTableEmpty}}
| format = template
| template = WeaponsTableRow
| named args = yes
}}
{{WeaponsTableFooter}}
}}


''TODO: List of {{{type}}} upcoming, stay tight!''
<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 110:
This template generates entire weapon type pages such as [[Daggers]] or [[Longswords]].
This template generates entire weapon type pages such as [[Daggers]] or [[Longswords]].


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


<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
| 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
}}
</pre>
 
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]]
 
Examples follow. __NOTOC__
 
= Daggers =
 
{{WeaponTypePage
| type = Daggers
| type = Daggers
| example = Dagger
| example = Dagger
Line 85: Line 144:
| handedness = one-handed
| handedness = one-handed
| melee or ranged = melee
| melee or ranged = melee
| damage count = 1
| damage = 1d4
| damage die = 4
| damage modifier = finesse
| damage type = Piercing
| damage type = Piercing
| finesse = yes
| finesse = yes
| light = yes
| light = yes
| dippable = yes
| dippable = yes
| actions =
| weapon actions = Piercing Strike
* {{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
}}
}}
</pre>


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]]
{{#cargo_declare: _table = weapon_types
</noinclude>
| name = String (unique, mandatory)
| category = String (allowed values = simple, martial)
| handedness = String (allowed values = one-handed, two-handed, versatile)
| melee_or_ranged = String (allowed values = melee, ranged)
| damage = String
| damage_type = String (allowed values = Piercing, Slashing, Bludgeoning)
| versatile_damage = String
| finesse = Boolean
| light = Boolean
| dippable = Boolean
| weapon_actions = List (,) of String
}}
</noinclude><includeonly>{{#switch: {{{this is an example|}}}
| yes =
| #default = {{#cargo_store: _table = weapon_types
| name = {{#titleparts: {{PAGENAME}} }}
| finesse = {{IfEmpty | {{{finesse|}}} | no}}
| light = {{IfEmpty | {{{light|}}} | no}}
| dippable = {{IfEmpty | {{{dippable|}}} | no}}
}}
}}</includeonly>

Navigation menu