Template:Weapon page: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 16: Line 16:
| {{{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. -->
| <!-- 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. -->
{{RarityColor | {{{rarity|}}} | '''{{PAGENAME}}''' }}
{{RarityColor | {{{rarity|}}} | '''{{{name | {{PAGENAME}} }}}''' }}
is
is
{{#if: {{{enchantment|}}} {{{rarity|}}} {{{special|}}}
{{#if: {{{enchantment|}}} {{{rarity|}}} {{{special|}}}
Line 152: Line 152:


-->
-->
This template generates entire pages for individual weapons in the game, such as [[Longsword]] (not to be confused with [[Longswords]]) or [[Worgfang]].
This template generates entire pages for individual weapons in the game, such as [[Longsword]] (not to be confused with [[Longswords]]) or [[Worgfang]].  Note that the template adds the page to the correct categories automatically.


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 and is Heavy (longswords normally aren't).  If you're ever unsure what to type, simply leave the parameter empty.
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 and is Heavy (longswords normally aren't).  If you're ever unsure what to type, simply leave the parameter empty.
Line 197: Line 197:
</pre>
</pre>


See here for the result of the above: [[Template:WeaponPage/Example]]
An example follows. __NOTOC__


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.
<h1>Longsword</h1>
 
{{WeaponPage
<!-- See here for tips on how to use this template: https://bg3.wiki/wiki/Template:WeaponPage -->
| image = Longsword Icon.png
| description = <!-- Optional description.  Nonmagical and +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 for weapons with special properties, you might want to instead provide a short description of what makes the weapon noteworthy. -->
| quote = The in-game flavor text in the item's tooltip.
| category = martial <!-- martial or simple -->
| melee or ranged = melee <!-- melee or ranged, duh -->
| handedness = versatile <!-- one-handed, versatile, two-handed -->
| type = Longswords <!-- One of [[Category:Weapon Types]]. Always plural. -->
| rarity = <!-- Leave EMPTY for common, otherwise: uncommon, rare, very rare, legendary, story -->
| enchantment = <!-- Leave EMPTY for none, otherwise: +1, +2, +3, +4, +5 -->
| damage = 1d8 + 1 <!-- Must follow the strict format XdY + Z, with the "+ Z" only needed if the weapon has an enchantment. -->
| damage type = Slashing <!-- Accepts any of [[Damage Types]], but usually: Slashing, Piercing, or Bludgeoning -->
| versatile damage = 1d10 + 2 <!-- Same format as regular damage, or leave EMPTY if this isn't a Versatile weapon. -->
| extra damage = 1d4 Fire <!-- Same format as regular damage, but with damage type directly on the same line. -->
| range = <!-- Leave EMPTY if melee, otherwise this can be "normal", "short" (e.g. Hand Crossbow), or "special" -->
| range m = <!-- Leave EMPTY if "range" is NOT "special", otherwise this is the range in meters. -->
| range ft = <!-- Leave EMPTY if "range" is NOT "special", otherwise this is the 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
<!-- Common actions you get when you have proficiency and wield the weapon in your main-hand. -->
| weapon actions = 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.
| this is an example = yes <!-- Important to specify this when the template is only used for example purposes. -->
}}
 
----


[[Category:Page Generating Templates]] [[Category:Weapon Page Templates]]
[[Category:Page Generating Templates]] [[Category:Weapon Page Templates]]
Line 240: Line 282:
| yes =  
| yes =  
| #default = {{#cargo_store: _table = weapons
| #default = {{#cargo_store: _table = weapons
| name = {{#titleparts: {{PAGENAME}} }}
| name = {{{name | {{#titleparts: {{PAGENAME}} }} }}}
| rarity = {{IfEmpty | {{{rarity|}}} | common}}
| rarity = {{IfEmpty | {{{rarity|}}} | common}}
| rarity_order = {{#switch: {{{rarity|}}}
| rarity_order = {{#switch: {{{rarity|}}}
Line 284: Line 326:
{
{
"params": {
"params": {
"name": {
"description": "The name of the item -- can be left out to use the page name automatically.",
"example": "Merregon Halberd",
"type": "string",
"required": false,
"suggested": true
},
"image": {
"image": {
"description": "The filename of the image/icon associated with this item.",
"description": "The filename of the image/icon associated with this item.",
Line 579: Line 628:
"format": "block",
"format": "block",
"paramOrder": [
"paramOrder": [
"name",
"image",
"image",
"category",
"category",

Navigation menu