Template:Item/doc: Difference between revisions

From Archaelund Wiki
(Created page with "== Description == This is the main template for all item pages. It determines the layout of the individual page and provides functionality for extracting specific item information for use in other pages. == Usage == <pre> {{Item |Mode = {{{1|Page}}} |Param1 = {{{2|}}} |Param2 = {{{3|}}} <!-- Quick Facts --> |Name = |Pagename = |Status = |Type = |Version = |VersionUpdate = |Rarity = |Attributes = |Quests = |Prerequisites = <!-- Media --> |Image = |Icon = <...")
 
No edit summary
Line 34: Line 34:


<!-- Stats -->
<!-- Stats -->
|Weight =
|Traits =  
|Traits =  
|Stats =  
|Stats =  
Line 81: Line 82:


<tr><th colspan="4" style="text-align:left">''Stats''</th></tr>
<tr><th colspan="4" style="text-align:left">''Stats''</th></tr>
<tr><td>Weight</td><td>Yes</td><td>The weight of the armor. Will be displayed in the infobox of the page.</td><td>non-negative number</td></tr>
<tr><td>Traits</td><td>Yes</td><td>The trait bonus/malus provided by consuming the item. See [[Template:Traits]] for further information.</td><td>a vector of 7 comma-separated numbers, representing trait values (e.g. "4,8,8,5,6,3,6")</td></tr>
<tr><td>Traits</td><td>Yes</td><td>The trait bonus/malus provided by consuming the item. See [[Template:Traits]] for further information.</td><td>a vector of 7 comma-separated numbers, representing trait values (e.g. "4,8,8,5,6,3,6")</td></tr>
<tr><td>Stats</td><td>Yes</td><td>The base stats bonus/malus provided by consuming the item. See [[Template:Stats]] for further information.</td><td>a vector of 6 comma-separated numbers, representing stat values (e.g. "52,11,10,18,3,0")</td></tr>
<tr><td>Stats</td><td>Yes</td><td>The base stats bonus/malus provided by consuming the item. See [[Template:Stats]] for further information.</td><td>a vector of 8 comma-separated numbers, representing stat values (e.g. "30,20,8,2,-1,3,0,5")</td></tr>
<tr><td>Offense</td><td>Yes</td><td>The offensive properties bonus/malus provided by consuming the item. See [[Template:Offense]] for further information.</td><td>a vector of 7 comma-separated numbers, representing offense values (e.g. "3,8,0,2,1,50,10")</td></tr>
<tr><td>Offense</td><td>Yes</td><td>The offensive properties bonus/malus provided by consuming the item. See [[Template:Offense]] for further information.</td><td>a vector of 9 comma-separated numbers, representing offense values (e.g. "3,8,0,1,4,1,50,10,1")</td></tr>
<tr><td>Defense</td><td>Yes</td><td>The defensive properties bonus/malus provided by consuming the item. See [[Template:Defense]] for further information.</td><td>a vector of 2 comma-separated numbers, representing defense values (e.g. "2,15")</td></tr>
<tr><td>Defense</td><td>Yes</td><td>The defensive properties bonus/malus provided by consuming the item. See [[Template:Defense]] for further information.</td><td>a vector of 4 comma-separated numbers, representing defense values (e.g. "2,15,5,2")</td></tr>
<tr><td>Resist</td><td>Yes</td><td>The resistance bonus/malus provided by consuming the item. See [[Template:Elements]] for further information.</td><td>a vector of 6 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0")</td></tr>
<tr><td>Resist</td><td>Yes</td><td>The resistance bonus/malus provided by consuming the item. See [[Template:Elements]] for further information.</td><td>a vector of 6 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0")</td></tr>
<tr><td>Effects</td><td>Yes</td><td>A short description of the effects provided by consuming the item.</td><td>a semicolon-separated list of effects</td></tr>
<tr><td>Effects</td><td>Yes</td><td>A short description of the effects provided by consuming the item.</td><td>a semicolon-separated list of effects</td></tr>

Revision as of 19:41, 7 January 2025

Description

This is the main template for all item pages. It determines the layout of the individual page and provides functionality for extracting specific item information for use in other pages.

Usage

{{Item
|Mode = {{{1|Page}}}
|Param1 = {{{2|}}}
|Param2 = {{{3|}}}

<!-- Quick Facts -->
|Name = 
|Pagename = 
|Status = 
|Type = 
|Version = 
|VersionUpdate = 
|Rarity = 
|Attributes = 
|Quests = 
|Prerequisites = 

<!-- Media -->
|Image = 
|Icon = 

<!-- Info -->
|Description = 
|Notes = 

<!-- Value -->
|Buy = 
|Sell = 

<!-- Stats -->
|Weight = 
|Traits = 
|Stats = 
|Offense = 
|Defense = 
|Resist = 
|Effects = 
|Duration = 

<!-- Location -->
|FoundIn = 
|DroppedBy = 
|SoldBy = 
|RewardedBy = 
}}

Parameters

NameRequiredDescriptionValues
ModeYesDetermines the mode of execution of the template (see below). Changing the predefined value may lead to unexpected behavior.{{{1|Page}}} (should not be changed)
Param1YesUsed 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)
Param2YesUsed 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
NameYesThe name of the item. Usually identical to the page title. Will be displayed in the infobox of the page.arbitrary text
PagenameYesThe title of the item 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
StatusNoIf 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
TypeYesThe specific type of the item. Will be displayed in the infobox of the page. A list of predefined types can be found in Template:ItemType (if new types are introduced, they should also be added there).one of the values defined in Template:ItemType (other values are ignored): Document • Gem • Ingredient • Key • Material • Other • Potion • Recipe • Scroll • Special • Treasure
VersionYesThe game version in which the item was first introduced. Will be displayed in the infobox of the page.version number in the form X.Y.Z
VersionUpdateNoThe game version in which the item was last updated. Will be displayed in the infobox of the page.version number in the form X.Y.Z
RarityYesThe incidence of the item. 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
AttributesNoOne or more attributes which describe certain aspects of the item. Will be displayed in the infobox of the page. A list of predefined attributes can be found in Template:ItemAttributes (if new attributes are introduced, they should also be added there).a semicolon-separated list of the values defined in Template:ItemAttributes (other values are ignored): Quest • Consume • Crafting • Craftable • Alchemy • Brewable • Summon
QuestsNoIf the item is of importance for certain quests, they can be listed here.a semicolon-separated list of [[Quests]]s
PrerequisitesNoIf specific prerequisites have to be fulfilled to use the item, they can be listed here. Will be displayed in the infobox of the page.a semicolon-separated list of prerequisites
Media
ImageYesThe image (PNG or JPG) to be displayed in the infobox of the page.image name (including file extension)
IconNoThe image (PNG or JPG) to be displayed as an icon in item tables, lists, etc. If nothing is specified, a small version of Image is used instead.image name (including file extension)
Info
DescriptionYesA concise description of the item itself. Is used as an introductory paragraph and should not be too excessive (2−3 sentences are usually enough).arbitrary text
NotesNoAny 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
BuyYesThe basic price of the item when bought from a merchant (without modifiers). Set to 0 when not buyable.non-negative number
SellYesThe basic price of the item when sold to a merchant (without modifiers). Set to 0 when unsellable.non-negative number
Stats
WeightYesThe weight of the armor. Will be displayed in the infobox of the page.non-negative number
TraitsYesThe trait bonus/malus provided by consuming the item. 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")
StatsYesThe base stats bonus/malus provided by consuming the item. 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")
OffenseYesThe offensive properties bonus/malus provided by consuming the item. 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")
DefenseYesThe defensive properties bonus/malus provided by consuming the item. See Template:Defense for further information.a vector of 4 comma-separated numbers, representing defense values (e.g. "2,15,5,2")
ResistYesThe resistance bonus/malus provided by consuming the item. See Template:Elements for further information.a vector of 6 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0")
EffectsYesA short description of the effects provided by consuming the item.a semicolon-separated list of effects
DurationNoThe duration of the effects after consuming the item.arbitrary text
Location
FoundInNoIf the item is found in certain areas, they can be listed here.a semicolon-separated list of [[Area]]s
DroppedByNoIf the item is dropped by certain characters/creatures, they can be listed here.a semicolon-separated list of [[Character]]s and/or [[Creature]]s
SoldByNoIf the item can by bought from certain merchants, they can be listed here.a semicolon-separated list of [[Character]]s
RewardedByNoIf the item is rewarded by certain quests, they can be listed here.a semicolon-separated list of [[Quest]]s

Extracting specific item information for use in other pages

Syntax

You can transclude information from an item page in any other page by using the following syntax:

{{:<pagename>|<mode>|<param1>|<param2>}}

Here, <pagename> is the item'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

ModeDescriptionParameter 1Parameter 2
PageOutputs the full item page. This is the default mode.nonenone
TableHeadOutputs the header of an item table (intended for constructing overview tables).nonenone
TableEntryOutputs a table row containing specific item information (intended for constructing overview tables). If a selector is specified in <param1>, output is only generated if the selector of a specific item matches the value of <param2>. If no selector is specified, output is always generated.one of the following selectors: Type • Attributeone of the possible values of the specified selector