Template:Weapon page: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
{{#if:{{{description|}}}
{{#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. -->
|{{{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. -->
|The {{#if:{{{enchantment|}}}{{{rarity|}}}{{{special|}}}||common}} {{RarityColoredText|{{{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. ''(Note: This limitation is not yet implemented as of Early Access Patch 9.)''}} {{#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, which makes it difficult for small creatures to use effectively.}} {{#if:{{{light|}}}|It's a [[light]] weapon that anyone can dual-wield without special training.}} {{#if:{{{loading|}}}|It needs to be [[Loading|loaded]] before firing, which makes it unable to fire multiple times in a single turn of combat. ''(Note: This limitation is not yet implemented as of Early Access Patch 9.)''}} {{#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.}}
|The {{#if:{{{enchantment|}}}{{{rarity|}}}{{{special|}}}||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. ''(Note: This limitation is not yet implemented as of Early Access Patch 9.)''}} {{#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, which makes it difficult for small creatures to use effectively.}} {{#if:{{{light|}}}|It's a [[light]] weapon that anyone can dual-wield without special training.}} {{#if:{{{loading|}}}|It needs to be [[Loading|loaded]] before firing, which makes it unable to fire multiple times in a single turn of combat. ''(Note: This limitation is not yet implemented as of Early Access Patch 9.)''}} {{#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.}}
}}
}}



Revision as of 08:26, 4 February 2023

This template generates entire pages for individual weapons in the game, such as Longsword (not to be confused with Longswords) or Worgfang.

Here's an example of usage (note this has intentionally wrong information because it tries to showcase as many different parameters as possible):

{{WeaponPage
| <!-- See here for tips on how to use this template: https://bg3.wiki/wiki/Template:WeaponPage -->
| image = Longsword Icon.png
| description = Optional description for special items.  (Nonmagical and simple +1/+2/etc. will be auto-generated, so no need for those.)
| quote = A common sword, passed between hands both fresh and battle-scarred.
| category = martial
| melee or ranged = melee
| handedness = versatile
| type = Longswords
| damage = 1d8 + 1 Slashing
| versatile damage = 1d10 + 2
| finesse = yes
| light = yes
| dippable = yes
| weight kg = 1.35
| weight lb = 2.7
| price = 75
| main hand only =
* {{Tenacity}}
| actions =
* {{Pommel Strike}}
* {{Lacerate}}
* {{Rush Attack}}
}}

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.