Template:Weapon page: Difference between revisions

Jump to navigation Jump to search
m
Move doc out for readability
(category casing)
m (Move doc out for readability)
Line 186: Line 186:
|image={{{image|}}}
|image={{{image|}}}
|rarity={{{rarity|common}}}
|rarity={{{rarity|common}}}
}}</includeonly><noinclude><!--
}}{{#switch: {{{this is an example|}}}
 
    ==== Documentation follows ====
 
-->
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 a blank starting point for using this template that you can copy-paste.  You can also view the source of this page and copy-paste one of the actual examples further below.
 
<pre>
{{WeaponPage
<!-- See here for tips on how to use this template: https://bg3.wiki/wiki/Template:WeaponPage -->
| image =
| icon =
| description =
| quote =
| category =
| melee or ranged =
| handedness =
| type =
| rarity =
| enchantment =
| damage =
| damage type =
| versatile damage =
| extra damage =
| extra damage 2 =
| range =
| range m =
| range ft =
| finesse =
| heavy =
| light =
| reach =
| thrown =
| can't dual wield =
| dippable =
| weight kg =
| weight lb =
| price =
| uid =
| uuid =
| special =
| weapon actions =
| special weapon actions =
| condition =
| condition duration =
| condition save =
| condition dc
| condition2 =
| condition2 duration =
| condition2 save =
| condition2 dc =
| where to find =
}}
</pre>
 
Following is an example of usage with all possible template parameters shown and explained with HTML comments.  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.
 
Please don't copy-paste this example code into any actual page you create. Prefer copy-pasting the completely blank template above.
 
<pre>
{{WeaponPage
 
<!-- A high-res image of the item. -->
| image = Longsword Icon.png
 
<!-- A smaller image of the item, to be used as an icon. Falls back to the value of "image" if not provided -->
| icon =
 
<!-- 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. -->
| description =
 
<!-- In-game tooltip quote. -->
| quote = The in-game flavor text in the item's tooltip.
 
<!-- "martial" or "simple" -->
| category = martial
 
<!-- "melee" or "ranged" -->
| melee or ranged = melee
 
<!-- "one-handed", "versatile", or "two-handed" -->
| handedness = versatile
 
<!-- One of [[Category:Weapon Types]]. Always plural! -->
| type = Longswords
 
<!-- Leave EMPTY for common, otherwise: uncommon, rare, very rare, legendary, story -->
| rarity =
 
<!-- Leave EMPTY for none, otherwise: +1, +2, +3, +4, +5 -->
| enchantment =
 
<!-- Must follow the strict format "XdY + Z", with the "+ Z" only needed if the weapon has an enchantment. -->
| damage = 1d8 + 1
 
<!-- Accepts any of [[Damage Types]], but usually: Slashing, Piercing, or Bludgeoning -->
| damage type = Slashing
 
<!-- Same format as regular damage, or leave EMPTY if this isn't a Versatile weapon. -->
| versatile damage = 1d10 + 2
 
<!-- Same format as regular damage, but with damage type directly on the same line. -->
| extra damage = 1d4 Fire
 
<!-- Same format as regular damage, but with damage type directly on the same line. -->
| extra damage 2 = 1d6 Acid
 
<!-- Leave EMPTY if melee, otherwise this can be "normal", "short" (e.g. Hand Crossbow), or "special" -->
| range =
 
<!-- Leave EMPTY if "range" is NOT "special", otherwise provide the range in meters and in feet. -->
| range m =
| range ft =
 
<!-- Following are yes/no properties, which MUST BE EMPTY if you mean "no"!  Never actually type "no"! -->
| finesse =
| heavy =
| light =
| reach =
| thrown =
| can't dual wield =
| dippable = yes
 
<!-- The weight in kg and in lb. -->
| weight kg = 1.35
| weight lb = 2.7
 
<!-- The price in gp as shown in the normal tooltip (NOT while buying or selling). -->
| price = 75
 
<!-- The uid for the item, usually in format "MAG_SomeDescription_Something".  -->
| uid = OBJ_Longsword
<!-- The uid or Root Template for the item. -->
| uuid =  3d99b0ae-4e96-438a-8029-cce11109f415
 
<!-- Actions you get when you have proficiency and wield the weapon in your main-hand. -->
| weapon actions = Pommel Strike, Lacerate, Rush Attack
 
<!-- Special actions that are found on specific weapons. -->
| special weapon actions =
 
<!-- Conditions that this weapon may or may not inflict on every hit. -->
| condition = Dazed
| condition duration = 10
| condition save = WIS
| condition dc = 13
| condition2 = Prone
| condition2 duration = 1
| condition2 save =
| condition2 dc =
 
<!-- List of special features or abilities granted by the weapon. -->
| special =
* '''Super Cool Ability:''' Once per [[Long Rest]] you can use this awesome ability of this weapon.
 
<!-- Describe where and how to obtain the weapon, if it's a special one. -->
| where to find =
This is a made-up weapon.  You cannot obtain it anywhere in the game.
 
}}
</pre>
 
Live examples of this template's usage follow.  Feel free to view this page's source and copy-paste one of them as a starting point. __NOTOC__
 
<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 =
| quote = The in-game flavor text in the item's tooltip.
| category = martial
| melee or ranged = melee
| handedness = versatile
| type = Longswords
| rarity =
| enchantment =
| damage = 1d8 + 1
| damage type = Slashing
| versatile damage = 1d10 + 2
| extra damage = 1d4 Fire
| extra damage 2 = 1d6 Acid
| range =
| range m =
| range ft =
| finesse =
| heavy =
| light =
| reach =
| thrown =
| can't dual wield =
| dippable = yes
| weight kg = 1.35
| weight lb = 2.7
| price = 75
| uid = OBJ_Longsword
| uuid =  3d99b0ae-4e96-438a-8029-cce11109f415
| weapon actions = Pommel Strike, Lacerate, Rush Attack
| special weapon actions = Grand Slam, Mellow Harmony
| condition = Bless
| condition duration = 1
| condition save =
| condition dc =
| condition2 = Burning
| condition2 duration = 3
| condition2 save =
| condition2 dc =
| special =
* '''Super Cool Ability:''' Once per [[Long Rest]] you can use this awesome ability of this weapon.
| where to find =
This is a made-up weapon.  You cannot obtain it anywhere in the game.
| this is an example = yes
}}
 
<h1>Dagger</h1>
 
{{WeaponPage
<!-- See here for tips on how to use this template: https://bg3.wiki/wiki/Template:WeaponPage -->
| image = Dagger Icon.png
| description =
| quote = The in-game flavor text in the item's tooltip.
| category = simple
| melee or ranged = melee
| handedness = one-handed
| type = Longswords
| rarity =
| enchantment =
| damage = 1d4 + 1
| damage type = Piercing
| range =
| range m =
| range ft =
| finesse = yes
| heavy =
| light = yes
| reach =
| thrown = yes
| can't dual wield =
| dippable = yes
| weight kg = 1.35
| weight lb = 2.7
| price = 75
| weapon actions = Piercing Strike
| special =
* '''Super Cool Ability:''' Once per [[Long Rest]] you can use this awesome ability of this weapon.
| where to find =
This is a made-up weapon.  You cannot obtain it anywhere in the game.
| this is an example = yes
}}
 
----
 
[[Category:Page generating templates]] [[Category:Weapon Page Templates]]
 
{{#cargo_declare: _table = weapons
| name = String (unique; mandatory)
| legacy = String(allowed values = inaccessible, unobtainable)
| image = 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
| weapon_actions = List (,) of String
| special_weapon_actions = List (,) of String
| special = Wikitext
| where_to_find = Wikitext
}}
</noinclude><includeonly>{{#switch: {{{this is an example|}}}
| yes =  
| yes =  
| #default = {{#cargo_store: _table = weapons
| #default = {{#cargo_store: _table = weapons
Line 531: Line 238:
   }}
   }}
}}
}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>{{documentation}}
(Auto-generated TemplateData follows.)
{{#cargo_declare: _table = weapons
----
| name = String (unique; mandatory)
<templatedata>
| legacy = String(allowed values = inaccessible, unobtainable)
{
| image = File
"params": {
| description = Wikitext
"name": {
| quote = Wikitext
"description": "The name of the item -- can be left out to use the page name automatically.",
| category = String (allowed values = simple, martial)
"example": "Merregon Halberd",
| handedness = String (allowed values = one-handed, two-handed, versatile)
"type": "string",
| melee_or_ranged = String (allowed values = melee, ranged)
"required": false,
| type = Page
"suggested": true
| rarity = String
},
| rarity_order = Integer
"image": {
| enchantment = String
"description": "The filename of the image/icon associated with this item.",
| damage = String
"example": "Merregon Halberd Icon.png",
| damage_type = String (allowed values = Piercing, Slashing, Bludgeoning)
"type": "wiki-file-name",
| versatile_damage = String
"required": true,
| extra_damage = String
"suggested": true
| extra_damage_type = String
},
| extra_damage_2 = String
"category": {
| extra_damage_2_type = String
"description": "The weapon's overall proficiency category (martial or simple)",
| range_m = String
"type": "string",
| range_ft = String
"suggestedvalues": [
| finesse = Boolean
"martial",
| heavy = Boolean
"simple"
| light = Boolean
],
| reach = Boolean
"required": true,
| thrown = Boolean
"suggested": true
| cannot_dual_wield = Boolean
},
| dippable = Boolean
"melee or ranged": {
| weight_kg = String
"example": "melee",
| weight_lb = String
"type": "string",
| price = String
"suggestedvalues": [
| weapon_actions = List (,) of String
"melee",
| special_weapon_actions = List (,) of String
"ranged"
| special = Wikitext
],
| where_to_find = Wikitext
"required": true,
}}</noinclude>
"suggested": true
},
"handedness": {
"example": "one-handed",
"type": "string",
"suggestedvalues": [
"one-handed",
"versatile",
"two-handed"
],
"required": true,
"suggested": true
},
"type": {
"description": "The weapon's specific type. Always plural.",
"example": "Longswords",
"type": "string",
"suggestedvalues": [
"Battleaxes",
"Clubs",
"Daggers",
"Glaives",
"Greataxes",
"Greatclubs",
"Greatswords",
"Halberds",
"Hand Crossbows",
"Handaxes",
"Heavy Crossbows",
"Javelins",
"Light Crossbows",
"Light Hammers",
"Longbows",
"Longswords",
"Maces",
"Mauls",
"Morningstars",
"Pikes",
"Quarterstaves",
"Rapiers",
"Scimitars",
"Shortbows",
"Shortswords",
"Sickles",
"Spears",
"Tridents",
"War Picks",
"Warhammers"
],
"required": true,
"suggested": true
},
"rarity": {
"description": "The rarity level of the weapon (common, uncommon, rare, very rare, legendary, story)",
"example": "uncommon",
"type": "string",
"suggestedvalues": [
"common",
"uncommon",
"rare",
"very rare",
"legendary",
"story"
],
"required": true,
"suggested": true
},
"enchantment": {
"description": "The value of the enchantment on the weapon. Leave blank if no enchantment.",
"example": "+1",
"type": "string",
"suggestedvalues": [
"+1",
"+2",
"+3",
"+4",
"+5"
],
"suggested": true
},
"special": {
"description": "Any special features granted to the wielder of the weapon. Separate multiple special features with bullets.",
"example": "* '''Super Cool Ability:''' Cast [[Awesome Spell]] once per [[Long Rest]].",
"type": "content",
"suggested": true
},
"description": {
"description": "Optional, BRIEF description of what is notable about this weapon. If left empty, a basic description will be auto-generated for you based on the other information you've entered in the template.",
"example": "{{uncommon|Longsword of Slash-Slash}} is an uncommon [[Longsword]] that allows the wielder to slash a lot.",
"type": "content",
"suggested": true
},
"finesse": {
"description": "Does this weapon have the Finesse property? (Leave BLANK if no!)",
"type": "string",
"suggestedvalues": [
"yes"
],
"suggested": true
},
"heavy": {
"description": "Does this weapon have the Heavy property? (Leave BLANK if no!)",
"example": "yes",
"type": "string",
"suggestedvalues": [
"yes"
],
"suggested": true
},
"light": {
"description": "Does this weapon have the Light property? (Leave BLANK if no!)",
"example": "yes",
"type": "string",
"suggestedvalues": [
"yes"
],
"suggested": true
},
"reach": {
"description": "Does this weapon have the Extra Reach property? (Leave BLANK if no!)",
"example": "yes",
"type": "string",
"suggestedvalues": [
"yes"
],
"suggested": true
},
"thrown": {
"description": "Does this weapon have the Thrown property? (Leave BLANK if no!)",
"example": "yes",
"type": "string",
"suggestedvalues": [
"yes"
],
"suggested": true
},
"can't dual wield": {
"description": "Does this weapon have the Can't Dual Wield property? (Leave BLANK if no!)",
"example": "yes",
"type": "string",
"suggestedvalues": [
"yes"
],
"suggested": true
},
"quote": {
"description": "The in-game flavour text in the weapon's tooltip.",
"type": "string",
"suggested": true
},
"where to find": {
"description": "Describe where and how to obtain the weapon (can leave empty if it's super commonly obtainable).",
"example": "Looted from [[NPC Name]] in [[Location]].",
"type": "content",
"suggested": true
},
"damage": {
"description": "The damage of the weapon (the one-handed damage, in the case of Versatile weapons). Must follow the strict format XdY + Z, with the \"+ Z\" only needed if the weapon has an enchantment.",
"example": "1d8 + 1",
"type": "string",
"required": true,
"suggested": true
},
"damage type": {
"description": "The damage type of the weapon",
"example": "Slashing",
"type": "string",
"suggestedvalues": [
"Slashing",
"Bludgeoning",
"Piercing"
],
"required": true,
"suggested": true
},
"versatile damage": {
"description": "Same format as regular damage. Leave EMPTY if this weapon is not Versatile.",
"example": "1d10 + 1",
"type": "string",
"suggested": true
},
"extra damage": {
"description": "Any extra damage granted by this weapon. Leave EMPTY if this weapon does not receive a damage bonus aside from its enchantment. Otherwise, same format as regular damage, but with damage type directly on the same line. ",
"example": "1d4 Fire",
"type": "string",
"suggested": true
},
"extra damage 2": {
"description": "Additional extra damage, like if the weapon deals and extra 1d4 Fire AND an extra 1d4 Acid or something.",
"example": "1d4 Fire",
"type": "string",
"suggested": true
},
"dippable": {
"description": "Does this weapon have the Dippable property? (Leave BLANK if no!)",
"example": "yes",
"type": "string",
"suggestedvalues": [
"yes"
],
"default": "yes",
"suggested": true
},
"range": {
"description": "This is for ranged weapons only. Leave EMPTY if melee; otherwise choose one of the suggested values. \"short\" in this context refers to the shorter range of Hand Crossbows.",
"type": "string",
"suggestedvalues": [
"normal",
"short",
"special"
],
"suggested": true
},
"range m": {
"label": "special range m",
"description": "Leave EMPTY unless range is \"special.\" Special range of the weapon in meters.",
"example": "18",
"type": "number",
"suggested": true
},
"range ft": {
"label": "special range ft",
"description": "Leave EMPTY unless range is \"special.\" Special range of the weapon in feet.",
"example": "60",
"type": "number",
"suggested": true
},
"weight kg": {
"description": "Weight of the weapon in kilograms",
"example": "1.35",
"type": "number",
"required": true,
"suggested": true
},
"weight lb": {
"description": "Weight of the weapon in pounds",
"example": "2.7",
"type": "number",
"required": true,
"suggested": true
},
"price": {
"description": "Price/value of the item. When two values are listed on the tooltip, use the crossed out \"true\" value, not the adjusted buy/sell price.",
"example": "75",
"type": "number",
"required": true,
"suggested": true
},
"weapon actions": {
"description": "List of Weapon Actions gained by wielding this weapon in the main hand. Be sure to separate multiple actions with a comma.",
"example": "Pommel Strike, Lacerate",
"type": "content",
"suggested": true
},
"special weapon actions": {
"description": "List of Weapon Actions gained by wielding this weapon in the main hand. Be sure to separate multiple actions with a comma.",
"example": "Hellflame Cleave, Moonlight Butterflies",
"type": "content",
"suggested": true
},
"icon": {
"description": "The icon of this item. Defaults to the value of image= if not provided."
},
"uuid": {
"description": "UUID or Root Template for the item. In a uuid format like \" 3d99b0ae-4e96-438a-8029-cce11109f415\""
},
"uid": {
"description": "Unique id for the item. Often in format OBJ_Blabla_Whatever"
}
},
"description": "This template generates entire pages for individual weapons in the game. (For other Equipment, use Template:EquipmentPage. For Consumables and other miscellaneous items, use Template:MiscItemPage.)",
"format": "block",
"paramOrder": [
"name",
"image",
"icon",
"category",
"description",
"quote",
"where to find",
"type",
"rarity",
"melee or ranged",
"handedness",
"damage",
"versatile damage",
"damage type",
"extra damage",
"extra damage 2",
"enchantment",
"range",
"range m",
"range ft",
"finesse",
"heavy",
"light",
"reach",
"thrown",
"can't dual wield",
"dippable",
"weight kg",
"weight lb",
"price",
"uid",
"uuid",
"special",
"weapon actions",
        "special weapon actions"
]
}
</templatedata></noinclude>

Navigation menu