Ad placeholder

Template:Weapon page: Difference between revisions

Jump to navigation Jump to search
m
Added table list
No edit summary
m (Added table list)
(168 intermediate revisions by 15 users not shown)
Line 1: Line 1:
<includeonly>[[File:{{{image}}}|frameless|right]]
<includeonly>{{#switch: {{{this is an example|}}}
| yes =
| #default = {{PageSeo
  | image = {{#if:{{{controller icon|}}}|{{{controller icon}}}|{{#if:{{{image|}}}|{{{image}}}|{{{icon|}}}}}}}
  | description = {{{description|{{WeaponPage/SeoDescription
    | category = {{{category}}}
    | melee or ranged = {{{melee or ranged}}}
    | handedness = {{{handedness}}}
    | type = {{{type}}}
    | rarity = {{{rarity|}}}
    | enchantment = {{{enchantment|}}}
    | special = {{{special|}}}
    }}}}}
  }}
}} __NOTOC__
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-{{#if: {{{rarity|}}}
| {{#replace: {{{rarity}}} | <nowiki> </nowiki> | }}
| common
}}"> {{#if: {{{image|}}} | [[File:{{{image}}}|frameless|right|alt={{PAGENAME}} image]] | {{#if:{{{controller icon|}}} | [[File:{{{controller icon}}}|frameless|right|alt={{PAGENAME}} controller icon]] | {{#if:{{{icon|}}} | [[File:{{{icon}}}|frameless|right|alt={{PAGENAME}} icon]] | }} }} }}{{#if: {{{image|}}} || {{Main only|[[Category:Misc pages without images]]}} }}{{#if: {{{controller icon|}}} || {{Main only|[[Category:Item pages without controller icons]]}} }}{{#if: {{{icon|}}} || {{Main only|[[Category:Item pages without icons]]}} }}
 
{{#if: {{{description|}}}
| {{{description}}}
|
 
<!-- HERE BE DRAGONS!  The following monstrosity will auto-generate a nice, sensible introduction paragraph for ''any'' combination of parameters.  So, technically, you never have to provide descriptions for weapons, but for those with unique special properties you might want to do so anyway. -->
 
<strong>{{RarityColor | {{{rarity|}}} | {{{name | {{PAGENAME}} }}} }}</strong> is {{#if: {{{enchantment|}}} {{{rarity|}}} {{{special|}}}
|
  {{#if: {{{rarity|}}}
    | {{RarityWithArticle | {{{rarity}}} }}{{#if: {{{enchantment|}}} |,}}
    | a
  }}{{#switch: {{{enchantment|}}}
    | +1 = {{blank}} lightly enchanted (+1)
    | +2 = {{blank}} moderately enchanted (+2)
    | +3 = {{blank}} highly enchanted (+3)
    | +4 = {{blank}} very strongly enchanted (+4)
    | +5 = {{blank}} supremely enchanted (+5)
  }}{{#if: {{{special|}}}
    | {{blank}} special
  }}
|
  a mundane, nonmagical
}} variant of the [[{{{type}}}]] family of weapons. It is a [[Weapons|{{{category}}} {{{melee or ranged}}} weapon]] {{#switch: {{{handedness}}}
| one-handed = wielded in one hand
| versatile = that can be wielded in one hand, or with both hands for extra damage
| two-handed = that's wielded with both hands
}}. {{#if: {{{finesse|}}}
| As a [[finesse]] weapon, it can benefit from the wielder's Dexterity and not just their Strength.
}} {{#if: {{{light|}}}
| It's a [[light (weapon property)|light]] weapon that anyone can dual-wield without special training.
}} {{#if: {{{reach|}}}
| It gives the user [[extra reach]] in melee combat.
}} {{#if: {{{thrown|}}}
| Its design lends itself well to be [[thrown]] at enemies as a projectile.
}} {{#if: {{{can't dual wield|}}}
| Its design doesn't lend itself to be dual-wielded, even by those with special training in dual-wielding.
}}


{{#if:{{{description|}}}
|{{{description}}} <!-- HERE BE DRAGONS!  The following monstrosity will auto-generate a nice, sensible introduction paragraph for ''any'' combination of parameters.  So, technically, you never have to provide descriptions for weapons, but for those with unique specialties you might want to do so anyway. -->
|{{#if:{{{enchantment|}}}{{{rarity|}}}{{{special|}}}||The common}} {{RarityColor|{{{rarity|}}}|'''{{PAGENAME}}'''}} is {{#if:{{{enchantment|}}}{{{rarity|}}}{{{special|}}}||the mundane, nonmagical}} {{#if:{{{rarity|}}}|{{RarityWithArticle|{{{rarity}}}}}{{#if:{{{enchantment|}}}|,}}|{{#if:{{{enchantment|}}}{{{special|}}}|a}}}} {{#switch:{{{enchantment|}}}|+1 = lightly enchanted|+2 = moderately enchanted|+3 = highly enchanted|+4 = very strongly enchanted|+5 = supremely enchanted}} {{#if:{{{special|}}}|special}} variant of the [[{{{type}}}]] family of weapons.  It is a [[Weapons|{{{category}}} {{{melee or ranged}}} weapon]] {{#switch:{{{handedness}}}|one-handed = wielded in one hand|versatile = that can be wielded in one hand, or with both hands for extra damage|two-handed = that's wielded with both hands}}.  {{#if:{{{ammunition|}}}|It needs [[Ammunition (weapon property)|ammunition]] to shoot at enemies.}} {{#if:{{{finesse|}}}|As a [[finesse]] weapon, it can benefit from the wielder's Dexterity and not just their Strength.}} {{#if:{{{heavy|}}}|It's a [[heavy (weapon property)|heavy]] weapon, which makes it difficult for small creatures to use effectively.}} {{#if:{{{light|}}}|It's a [[light (weapon property)|light]] weapon that anyone can dual-wield without special training.}} {{#if:{{{loading|}}}|It needs to be [[Loading|loaded]] before firing, which means it cannot be used for multiple attacks with a single action.}} {{#if:{{{reach|}}}|It gives the user [[extra reach]] in melee combat.}} {{#if:{{{thrown|}}}|Its design lends itself well to be [[thrown]] at enemies as a projectile.}} {{#if:{{{can't dual wield|}}}|Its design doesn't lend itself to be dual-wielded, even by those with special training in dual-wielding.}}
}}
}}


{{quote|{{{quote|Missing quote ... imagine some nice flavor text here.}}}}}
{{#if: {{{quote|}}} | {{Description|{{{quote}}}}}}}
{{#if:{{{where to find|}}}|
== Where to Find ==


{{{where to find}}}
<h2> Properties </h2>
|}}
== Properties ==


{{#ifeq: {{{handedness}}} | versatile |
<div class="bg3wiki-property-list">
One-handed damage:
; {{#ifeq: {{{handedness}}} | versatile | One-handed damage | Damage }}
}}{{DamageInfo
: {{DamageInfo
| {{{damage}}}
| {{{damage}}}
| {{{damage type}}}
| {{{damage type}}}
| modifier = {{#if: {{{finesse|}}} | finesse | {{{melee or ranged}}} }}
| modifier = {{#if: {{{modifier|}}} | {{#ifeq: {{{modifier}}} |none||{{{modifier}}}}} | {{#if: {{{finesse|}}} | finesse | {{{melee or ranged}}} }} }}
}}{{#ifeq: {{{handedness}}} | versatile |
}} {{#ifeq: {{{handedness}}} | versatile |
Two-handed damage:
; Two-handed damage
{{DamageInfo
: {{DamageInfo
| {{{versatile damage}}}
    | {{{versatile damage}}}
| {{{damage type}}}
    | {{{damage type}}}
| modifier = {{#if: {{{finesse|}}} | finesse | {{{melee or ranged}}} }}
    | modifier = {{#if: {{{modifier|}}} | {{#ifeq: {{{modifier}}} |none||{{{modifier}}}}}| {{#if: {{{finesse|}}} | finesse | {{{melee or ranged}}} }} }}
    }}
}} {{#if: {{{extra damage|}}} |
; Extra damage
: {{DamageInfo
    | {{#sub: {{{extra damage}}} | 0 | {{#rpos: {{{extra damage}}} | }} }}
    | {{#sub: {{{extra damage}}} | {{#expr: 1 + {{#rpos: {{{extra damage}}} | }} }} }}
    }}
}} {{#if: {{{extra damage 2|}}} |
: {{DamageInfo
    | {{#sub: {{{extra damage 2}}} | 0 | {{#rpos: {{{extra damage 2}}} | }} }}
    | {{#sub: {{{extra damage 2}}} | {{#expr: 1 + {{#rpos: {{{extra damage 2}}} | }} }} }}
    }}
}}
}}
}}{{#if: {{{extra damage|}}} |
; Details {{#if: {{{type|}}}
Extra damage:
| : {{WeaponType | {{{type}}} }}
{{DamageInfo <!-- The following isn't used for regular damage because we want to be able to query weapons by damage type. -->
| [[Category:Weapon pages without a type]] [[Category:Articles with errors]]
| {{#sub: {{{extra damage}}} | 0 | {{#rpos: {{{extra damage}}} | }} }}
| {{#sub: {{{extra damage}}} | {{#expr: 1 + {{#rpos: {{{extra damage}}} | }} }} }}
}}
}}
: {{Rarity | {{{rarity|common}}} | {{{rarity honour|}}} }}
: {{Enchantment | {{{enchantment|}}} }}
: {{#switch: {{{handedness}}}
| one-handed = {{One-Handed}}
| two-handed = {{Two-Handed}}
| versatile = {{Versatile}}
}} {{#if: {{{finesse|}}} | : {{Finesse}}
}} {{#if: {{{light|}}} | : {{Light}}
}} {{#if: {{{reach|}}} | : {{Reach}}
}} {{#if: {{{thrown|}}} | : {{Thrown}}
}} {{#if: {{{can't dual wield|}}} | : {{Can't Dual Wield}}
}} {{#if: {{{dippable|}}} | : {{Dippable}}
}}
}}
 
: {{#switch: {{{melee or ranged}}}
* {{#switch: {{{melee or ranged}}}
| melee = {{Range| {{#if: {{{reach|}}} | reach | melee}} }}
| melee = {{Range| {{#if: {{{reach|}}} | reach | melee}} }}
| ranged = {{Range| m = {{{range m}}} | ft = {{{range ft}}} }}
| ranged =
  {{#switch: {{{range}}}
  | normal = {{Range|ranged}}
  | short = {{Range|short ranged}}
  | special
  | #default = {{Range| m = {{{range m}}} | ft = {{{range ft}}} }}
  }}
}}
}}
* {{WeaponType|{{{type}}}}}
: {{Weight | kg = {{{weight kg}}} | lb = {{{weight lb}}} }}
* {{#switch:{{{handedness}}}
: {{Price | {{{price}}} | {{{price honour|}}} }}
| one-handed = {{One-Handed}}
{{#if: {{{uid|}}} {{{uuid|}}} |
| two-handed = {{Two-Handed}}
: {{SmallIcon|Ico stats.png}} {{#if: {{{uid|}}} | {{Uid|{{{uid}}}}} }} {{#if:{{{uuid|}}}|{{Uuid|{{{uuid}}}}} }}
| versatile = {{Versatile}}
}}
|}}{{#if:{{{ammunition|}}}|
</div> {{#if: {{{passives|}}} {{{passives main hand|}}} {{{passives off hand|}}} {{{special|}}} | {{blank}}
* {{Ammunition}}
 
}}{{#if:{{{finesse|}}}|
<h3> Special </h3>
* {{Finesse}}
 
}}{{#if:{{{heavy|}}}|
'''The holder of this item gains:'''
* {{Heavy}}
 
}}{{#if:{{{light|}}}|
{{#if: {{{passives|}}} | {{blank}}
* {{Light}}
 
}}{{#if:{{{loading|}}}|
{{Table list|{{#invoke: ParseList | main | {{{passives}}} | useTemplate = Passive | type = htmlList }}}}
* {{Loading}}
 
}}{{#if:{{{reach|}}}|
}}{{#if: {{{special|}}} | {{blank}}
* {{Reach}}
 
}}{{#if:{{{thrown|}}}|
{{{special|}}}
* {{Thrown}}
 
}}{{#if:{{{can't dual wield|}}}|
}}{{#if: {{{passives main hand|}}} | {{blank}}
* {{Can't Dual Wield}}
 
}}{{#if:{{{dippable|}}}|
'''Main Hand Only:'''
* {{Dippable}}
 
{{Table list|{{#invoke: ParseList | main | {{{passives main hand}}} | useTemplate = Passive | type = htmlList }}}}
 
}}{{#if: {{{passives off hand|}}} | {{blank}}
 
'''Off Hand Only:'''
 
{{Table list|{{#invoke: ParseList | main | {{{passives off hand}}} | useTemplate = Passive | type = htmlList }}}}
 
}}
}}
* {{Weight|kg={{{weight kg}}}|lb={{{weight lb}}}}}
* {{Price|{{{price}}}}}
* {{Rarity|{{{rarity|common}}}}}
{{#if:{{{special|}}}|
=== Special ===


The holder of this item gains:
}}{{#if: {{{weapon actions|}}} | {{blank}}
{{{special}}}
 
|}}
<h3> Weapon actions </h3>
=== Weapon Actions ===


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


{{{actions}}}
<h3> Special weapon actions </h3>


{{#switch: {{{nocategories|}}} <!-- Just for examples of use. -->
This weapon also grants the following:
| yes =
{{#invoke: ParseList | main | {{{special weapon actions}}} | useTemplate = WeaponAction | type = htmlList}}
| #default = [[Category:Weapons]] [[Category:{{{category}}} Weapons]] [[Category:{{{type}}}]] [[Category:{{{rarity|common}}} Items]]
}}</includeonly><noinclude><!--


    ==== Documentation follows ====
}}</div> {{#if: {{{condition|}}} | {{blank}}


-->
<h3> Condition: {{{condition}}} </h3>
This template generates entire pages for individual weapons in the game, such as [[Longsword]] (not to be confused with [[Longswords]]) or [[Worgfang]].


Following is an example of usage with all possible template parameters shown.  This describes a made up Longsword which for some reason deals an extra 1d4 Fire damage, is heavy (longswords normally aren't), and has the Tenacity attribute which normally Morningstars and Greatclubs have.
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
{{Condition | {{{condition}}}
| save = {{{condition save|}}}
| duration = {{{condition duration|}}}
| dc = {{{condition dc|}}}
}}
{{main namespace only|{{Inflicts|{{{condition}}}|item}}}}
</div>{{#if: {{{condition2|}}} | {{blank}}


<pre>
<h3> Condition: {{{condition2}}} </h3>
{{WeaponPage
 
| <!-- See here for tips on how to use this template: https://bg3.wiki/wiki/Template:WeaponPage -->
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
| image = Longsword Icon.png
{{Condition | {{{condition2}}}
| description = Optional description.  Nonmagical and simple +1/+2/etc. will be auto-generated, so leave empty for those.  Others will also have a sensible default description generated, so strictly speaking you can always leave this empty, but you might still want to provide a short description of what makes the weapon noteworthy.
| save = {{{condition2 save|}}}
| quote = The in-game flavor text in the item's tooltip.
| duration = {{{condition2 duration|}}}
| category = martial <!-- martial or simple -->
| dc = {{{condition2 dc|}}}
| melee or ranged = melee <!-- melee or ranged, duh -->
| handedness = versatile <!-- one-handed, versatile, two-handed -->
| type = Longswords <!-- One of [[Category:Weapon Types]]. -->
| rarity = <!-- EMPTY for common, otherwise: uncommon, rare, veryrare, legendary -->
| enchantment = <!-- EMPTY for none, otherwise: +1, +2, +3, +4, +5 -->
| damage = 1d8 + 1 <!-- Must follow this exact strict format, with the "+ X" being optional. -->
| damage type = Slashing <!-- Accepts any of [[Damage Types]], but usually: Slashing, Piercing, or Bludgeoning -->
| versatile damage = 1d10 + 2 <!-- Same format as regular damage, or EMPTY if this isn't a Versatile weapon. -->
| extra damage = 1d4 Fire <!-- Same format as regular damage but with type directly on the same line. -->
| range m = <!-- EMPTY if melee, otherwise range in metric. -->
| range ft = <!-- EMPTY if melee, otherwise range in feet. -->
| <!-- Following are yes/no properties, which MUST BE EMPTY if you mean "no"!  Never actually type "no"! -->
| ammunition =
| finesse =
| heavy =
| light =
| loading =
| reach =
| thrown =
| can't dual wield =
| dippable = yes
| weight kg = 1.35
| weight lb = 2.7
| price = 75
| actions = <!-- Common actions you get when you have proficiency and wield the weapon in your main-hand. -->
* {{Pommel Strike}}
* {{Lacerate}}
* {{Rush Attack}}
| special = <!-- List of special features or abilities granted by the weapon. -->
* '''Super Cool Ability:''' Once per [[Long Rest]] you can use this awesome ability of this weapon.
| where to find = <!-- Describe where and how to obtain the weapon, if it's a special one. -->
This is a made-up weapon.  You cannot obtain it anywhere in the game.
}}
}}
</pre>
{{main namespace only|{{Inflicts|{{{condition2}}}|item}}}}
</div>
 
  }}
}} {{#if: {{{where to find|}}} | {{blank}}
 
<h2> Where to find </h2>
 
<div class="bg3wiki-tooltip-box">
{{{where to find}}}
</div>
}} {{#if: {{{notes|}}} | {{blank}}


See here for the result of the above: [[Template:WeaponPage/Example]]
<h2> Notes </h2>


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 weapon pages are added.
<div class="bg3wiki-tooltip-box">
{{{notes}}}
</div>
}} {{#if: {{{bugs|}}} | {{blank}}


[[Category:Weapon Page Templates]]
<h2> Bugs </h2>
</noinclude>
 
<div class="bg3wiki-tooltip-box">
{{{bugs}}}
{{Main namespace only|[[Category:Bugs]]}}
</div>
}}
{{Main namespace only|[[Category:Equipment]] [[Category:Weapons]] [[Category:{{{melee or ranged}}} weapons]] [[Category:{{{category}}} weapons]] {{#if: {{{type|}}} | [[Category:{{{type}}}]]}}  {{#ifeq: {{{rarity|}}} | very rare | [[Category:Very rare items]] | [[Category:{{{rarity|common}}} items]]}}
{{ItemIcon Insert
|icon={{{icon|}}}
|image={{{controller icon|}}}
|uid={{{uid|}}}
|rarity={{{rarity|common}}}
}}{{#cargo_store: _table = weapons
| name = {{{name | {{#titleparts: {{PAGENAME}} }} }}}
| uid = {{{uid|}}}
| legacy = {{#var:legacy|}}
| rarity = {{IfEmpty | {{{rarity|}}} | common}}
| rarity_order = {{#switch: {{{rarity|}}}
  | = 0
  | uncommon = 1
  | rare = 2
  | very rare = 3
  | legendary = 4
  | story = 5
  }}
| finesse = {{IfEmpty | {{{finesse|}}} | no}}
| heavy = {{IfEmpty | {{{heavy|}}} | no}}
| light = {{IfEmpty | {{{light|}}} | no}}
| reach = {{IfEmpty | {{{reach|}}} | no}}
| thrown = {{IfEmpty | {{{thrown|}}} | no}}
| cannot_dual_wield = {{IfEmpty | {{{can't dual wield|}}} | no}}
| dippable = {{IfEmpty | {{{dippable |}}} | no}}
| range_m = {{#switch: {{{melee or ranged}}}
  | melee = {{#if: {{{reach|}}} | 1.5 | 2.5 }}
  | ranged = {{#switch: {{{range}}}
    | normal = 18
    | short = 15
    | special
    | #default = {{{range m}}}
    }}
  }}
| range_ft = {{#switch: {{{melee or ranged}}}
  | melee = {{#if: {{{reach|}}} | 5 | 8 }}
  | ranged = {{#switch: {{{range}}}
    | normal = 60
    | short = 50
    | special
    | #default = {{{range ft}}}
    }}
  }}
| extra_damage = {{#if: {{{extra damage|}}}
  | {{#sub: {{{extra damage}}} | 0 | {{#rpos: {{{extra damage}}} | }} }}
  }}
| extra_damage_type = {{#if: {{{extra damage|}}}
  | {{#sub: {{{extra damage}}} | {{#expr: 1 + {{#rpos: {{{extra damage}}} | }} }} }}
  }}
| extra_damage_2 = {{#if: {{{extra damage 2|}}}
  | {{#sub: {{{extra damage 2}}} | 0 | {{#rpos: {{{extra damage 2}}} | }} }}
  }}
| extra_damage_2_type = {{#if: {{{extra damage 2|}}}
  | {{#sub: {{{extra damage 2}}} | {{#expr: 1 + {{#rpos: {{{extra damage 2}}} | }} }} }}
  }}
}}
}}</includeonly><noinclude>{{documentation}}
{{#cargo_declare: _table = weapons
| name = String (mandatory)
| uid = String
| legacy = String(allowed values = inaccessible, unobtainable)
| image = File
| controller_icon = File
| icon = File
| description = Wikitext
| quote = Wikitext
| category = String (allowed values = simple, martial)
| handedness = String (allowed values = one-handed, two-handed, versatile)
| melee_or_ranged = String (allowed values = melee, ranged)
| type = Page
| rarity = String
| rarity_order = Integer
| enchantment = String
| damage = String
| damage_type = String (allowed values = Piercing, Slashing, Bludgeoning)
| versatile_damage = String
| extra_damage = String
| extra_damage_type = String
| extra_damage_2 = String
| extra_damage_2_type = String
| range_m = String
| range_ft = String
| finesse = Boolean
| heavy = Boolean
| light = Boolean
| reach = Boolean
| thrown = Boolean
| cannot_dual_wield = Boolean
| dippable = Boolean
| weight_kg = String
| weight_lb = String
| price = String
| passives = List (,) of String
| passives_main_hand = List (,) of String
| passives_off_hand = List (,) of String
| weapon_actions = List (,) of String
| special_weapon_actions = List (,) of String
| special = Wikitext
| where_to_find = Wikitext
}}</noinclude>

Navigation menu