Template:Weapon/doc
From Archaelund Wiki
Description
This is the main template for all weapon pages. It determines the layout of the individual page and provides functionality for extracting specific weapon information for use in other pages.
Usage
{{Weapon
|Mode = {{{1|Page}}}
|Param1 = {{{2|}}}
|Param2 = {{{3|}}}
<!-- Quick Facts -->
|Name =
|Pagename =
|Status =
|Type =
|Version =
|VersionUpdate =
|Slot =
|Category =
|Stack =
|Rarity =
|Attributes =
|Prerequisites =
|Quests =
<!-- Media -->
|Image =
|Icon =
<!-- Info -->
|Description =
|Notes =
<!-- Value -->
|Buy =
|Sell =
<!-- Stats -->
|Weight =
|APcost =
|Range =
|DamageType =
|Traits =
|Stats =
|Offense =
|Defense =
|Resist =
|Effects =
|Skills =
|Specials =
<!-- Location -->
|FoundIn =
|DroppedBy =
|SoldBy =
|RewardedBy =
}}
Parameters
| Name | Required | Description | Values |
|---|---|---|---|
| Mode | Yes | Determines the mode of execution of the template (see below). Changing the predefined value may lead to unexpected behavior. | {{{1|Page}}} (should not be changed) |
| Param1 | Yes | Used for routing a selection parameter to the template in certain modes (see below). Changing the predefined value may lead to unexpected behavior. | {{{2|}}} (should not be changed) |
| Param2 | Yes | Used for routing a selection parameter to the template in certain modes (see below). Changing the predefined value may lead to unexpected behavior. | {{{3|}}} (should not be changed) |
| Quick Facts | |||
| Name | Yes | The name of the weapon. Usually identical to the page title. Will be displayed in the infobox of the page. | arbitrary text |
| Pagename | Yes | The title of the weapon page, needed for linking purposes. Note: Do not use magic words such as {{PAGENAME}} here, as this prevents proper linking when transcluding information from this page on other pages. | arbitrary text |
| Status | No | If the page has a special status, it can be set here. A corresponding box will be displayed at the top of the page. | one of the values defined in Template:PageStatus |
| Type | Yes | The specific type of the weapon. Will be displayed in the infobox of the page. A list of predefined types can be found in Template:WeaponType (if new types are introduced, they should also be added there). | one of the values defined in Template:WeaponType (other values are ignored): Light • Hand • 2-Handed • Ranged • Unarmed • Projectile |
| Version | Yes | The game version in which the weapon was first introduced. Will be displayed in the infobox of the page. | version number in the form X.Y.Z |
| VersionUpdate | No | The game version in which the weapon was last updated. Will be displayed in the infobox of the page. | version number in the form X.Y.Z |
| Slot | Yes | The type of equipment slot this item can be placed in. Will be displayed in the infobox of the page. | one of the values defined in Template:Slot (other values are ignored): Chest • Finger • Feet • Hands • Head • Mainhand • Neck • Offhand • Projectile • Shoulders • Waist |
| Category | Yes | The category to which this weapon belongs. Will be displayed in the infobox of the page. | one of the values defined in Template:WeaponCategory (other values are ignored): Arrow • Axe • Bolt • Bow • Dagger • Greataxe • Greatsword • Hammer • Longbow • Longsword • Mace • Maul • Shortsword • Spear • Staff |
| Stack | Yes | The number of items which can be stacked on top of each other (defaults to 1). Will be displayed in the infobox of the page. | positive number |
| Rarity | Yes | The incidence of the weapon. Will be displayed in the infobox of the page. | one of the values defined in Template:Rarity (other values are ignored): Unique • Limited • Rare • Common • Unknown |
| Attributes | No | One or more attributes which describe certain aspects of the weapon. Will be displayed in the infobox of the page. A list of predefined attributes can be found in Template:WeaponAttributes (if new attributes are introduced, they should also be added there). | a semicolon-separated list of the values defined in Template:WeaponAttributes (other values are ignored): Quest • Craftable • Crafting • Summon • Brittle |
| Prerequisites | No | If specific prerequisites have to be fulfilled to wield the weapon, they can be listed here. Will be displayed in the infobox of the page. | a semicolon-separated list of prerequisites |
| Quests | No | If the weapon is of importance for certain quests, they can be listed here. | a semicolon-separated list of [[Quests]]s |
| Media | |||
| Image | Yes | The image (PNG or JPG) to be displayed in the infobox of the page. | image name (including file extension) |
| Icon | No | The image (PNG or JPG) to be displayed as an icon in weapon tables, lists, etc. If nothing is specified, a small version of Image is used instead. | image name (including file extension) |
| Info | |||
| Description | Yes | A concise description of the weapon itself. Is used as an introductory paragraph and should not be too excessive (2−3 sentences are usually enough). | arbitrary text |
| Notes | No | Any kind of ancillary information (which does not seem appropriate anywhere else) can be provided here. | arbitrary text, ideally formatted as a bullet list (using *) |
| Value | |||
| Buy | Yes | The basic price of the weapon when bought from a merchant (without modifiers). Set to -1 when not buyable. | non-negative number or -1 |
| Sell | Yes | The basic price of the weapon when sold to a merchant (without modifiers). Set to -1 when unsellable. | non-negative number or -1 |
| Stats | |||
| Weight | Yes | The weight of the weapon. Will be displayed in the infobox of the page. | non-negative number |
| APcost | Yes | The amount of Action Points (AP) needed for using this weapon. | non-negative number |
| Range | Yes | The attack range of the weapon, given in grid tiles. Defaults to 0 (= melee). | non-negative number |
| DamageType | Yes | The specific damage type of the weapon. | one of the values defined in Template:DamageType (other values are ignored): Blunt • Piercing • Slashing |
| Traits | Yes | The trait bonus/malus provided by the weapon. See Template:Traits for further information. | a vector of 7 comma-separated numbers, representing trait values (e.g. "4,8,8,5,6,3,6") |
| Stats | Yes | The base stats bonus/malus provided by the weapon. See Template:Stats for further information. | a vector of 8 comma-separated numbers, representing stat values (e.g. "30,20,8,2,-1,3,0,5") |
| Offense | Yes | The offensive properties bonus/malus provided by the weapon. See Template:Offense for further information. | a vector of 9 comma-separated numbers, representing offense values (e.g. "3,8,0,1,4,1,50,10,1") |
| Defense | Yes | The defensive properties bonus/malus provided by the weapon. See Template:Defense for further information. | a vector of 4 comma-separated numbers, representing defense values (e.g. "2,15,5,2") |
| Resist | Yes | The resistance bonus/malus provided by the weapon. See Template:Resistances for further information. | a vector of 6 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0") |
| Effects | No | If special proc effects are provided by the weapon, they can be listed here. See Template:Effect for further information. | a semicolon-separated list of {{Effect|...}}s (using Template:Effect) |
| Skills | No | If the weapon provides skill bonuses, they can be listed here. | a semicolon-separated list of [[Skill]]s |
| Specials | No | If the weapon provides special combat properties, they can be listed here. | a semicolon-separated list of [[Special]]s |
| Location | |||
| FoundIn | No | If the weapon is found in certain areas, they can be listed here. | a semicolon-separated list of [[Area]]s |
| DroppedBy | No | If the weapon is dropped by certain characters/creatures, they can be listed here. | a semicolon-separated list of [[Character]]s and/or [[Creature]]s |
| SoldBy | No | If the weapon can by bought from certain merchants, they can be listed here. | a semicolon-separated list of [[Character]]s |
| RewardedBy | No | If the weapon is rewarded by certain quests, they can be listed here. | a semicolon-separated list of [[Quest]]s |
Extracting specific weapon information for use in other pages
Syntax
You can transclude information from an weapon page in any other page by using the following syntax:
{{:<pagename>|<mode>|<param1>|<param2>}}
Here, <pagename> is the weapon's full page name (in main namespace), <mode> determines the type of information to be transcluded, and <param1> & <param2> represent selection parameters required by certain modes.
Modes and parameters
| Mode | Description | Parameter 1 | Parameter 2 |
|---|---|---|---|
| Page | Outputs the full weapon page. This is the default mode. | none | none |
| TableHead | Outputs the header of an weapon table (intended for constructing overview tables). | none | none |
| TableEntry | Outputs a table row containing specific weapon information (intended for constructing overview tables). If a selector is specified in <param1>, output is only generated if the selector of a specific weapon matches the value of <param2>. If no selector is specified, output is always generated. | one of the following selectors: Type • Attribute | one of the possible values of the specified selector |