Template:Weapon type page: Difference between revisions

Jump to navigation Jump to search
Minor wording adjustment
No edit summary
(Minor wording adjustment)
 
(35 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<includeonly>{{#seo:
<includeonly>{{#switch: {{{this is an example|}}}
| type = website
| yes =  
| title = {{{type}}} - Baldur's Gate 3 Wiki
| #default =
| description = {{{type}}} are a type of {{{category}}}, {{{handedness}}}, {{{melee or ranged}}} weapon in BG3.  Learn more about their properties and see the list of all {{{type}}} in the game.
  {{PageSeo
}}{{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.
  | title = {{{type}}}
  | description = {{{type}}} are a type of {{{handedness}}} {{{category}}} {{{melee or ranged}}} weapon in Baldur's Gate 3.  Learn more about their properties and see the list of all {{{type}}} in the game.
  }}
}}
 
{{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.


<h2> Properties </h2>
<h2> Properties </h2>


{{#if: {{{versatile damage|}}} |
<div class="bg3wiki-property-list">
One-handed damage:
; {{#if: {{{versatile damage|}}} | One-handed damage | Damage }}
}}{{DamageInfo
: {{DamageInfo
| {{{damage}}}
    | {{{damage}}}
| {{{damage type}}}
    | {{{damage type}}}
| modifier = {{#if: {{{finesse|}}} | finesse | {{{melee or ranged}}} }}
    | modifier = {{#if: {{{finesse|}}} | finesse | {{{melee or ranged}}} }}
}}{{#if: {{{versatile damage|}}} |
    }}<!-- (prevent <dd> from being broken up)
Two-handed damage:
-->{{#if: {{{versatile damage|}}} |
{{DamageInfo | {{{versatile damage}}} | {{{damage type}}} | modifier = {{#if: {{{finesse|}}} | finesse | {{{melee or ranged}}} }} }}
; 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>


<h3> Actions </h3>
=== Actions ===


{{WeaponProficiencyUnlocks}}
{{WeaponProficiencyUnlocks}}


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


<h2> List of {{{type}}} </h2>
<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
Line 67: Line 79:
}}
}}
{{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:Equipment]] [[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 79: 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 91: Line 126:
| light = yes
| light = yes
| dippable = yes
| dippable = yes
| actions =
| weapon actions = Pommel Strike, Lacerate
* {{Pommel Strike}}
* {{Lacerate}}
}}
}}
</pre>
</pre>
Line 99: 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 112: 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>

Navigation menu