Template:Armor/doc: Difference between revisions

From Archaelund Wiki
(Created page with "== Description == This is the main template for all armor pages. It determines the layout of the individual page and provides functionality for extracting specific armor infor...")
 
No edit summary
Line 6: Line 6:
{{Armor
{{Armor
|Mode = {{{1|Page}}}
|Mode = {{{1|Page}}}
|Select = {{{2|}}}
|Param1 = {{{2|}}}
|Param2 = {{{3|}}}


<!-- Quick Facts -->
<!-- Quick Facts -->
Line 54: Line 55:
<tr><th>Name</th><th>Required</th><th>Description</th><th>Values</th></tr>
<tr><th>Name</th><th>Required</th><th>Description</th><th>Values</th></tr>
<tr><td>Mode</td><td>Yes</td><td>Determines the mode of execution of the template ([[#Extracting specific armor information for use in other pages|see below]]). Changing the predefined value may lead to unexpected behavior.</td><td><nowiki>{{{1|Page}}}</nowiki> (should not be changed)</td></tr>
<tr><td>Mode</td><td>Yes</td><td>Determines the mode of execution of the template ([[#Extracting specific armor information for use in other pages|see below]]). Changing the predefined value may lead to unexpected behavior.</td><td><nowiki>{{{1|Page}}}</nowiki> (should not be changed)</td></tr>
<tr><td>Select</td><td>Yes</td><td>Used for routing a selection parameter to the template in certain modes ([[#Extracting specific armor information for use in other pages|see below]]). Changing the predefined value may lead to unexpected behavior.</td><td><nowiki>{{{2|}}}</nowiki> (should not be changed)</td></tr>
<tr><td>Param1</td><td>Yes</td><td>Used for routing a selection parameter to the template in certain modes ([[#Extracting specific armor information for use in other pages|see below]]). Changing the predefined value may lead to unexpected behavior.</td><td><nowiki>{{{2|}}}</nowiki> (should not be changed)</td></tr>
<tr><td>Param2</td><td>Yes</td><td>Used for routing a selection parameter to the template in certain modes ([[#Extracting specific armor information for use in other pages|see below]]). Changing the predefined value may lead to unexpected behavior.</td><td><nowiki>{{{3|}}}</nowiki> (should not be changed)</td></tr>


<tr><th colspan="4" style="text-align:left">''Quick Facts''</th></tr>
<tr><th colspan="4" style="text-align:left">''Quick Facts''</th></tr>
Line 101: Line 103:
You can transclude information from an armor page in any other page by using the following syntax:
You can transclude information from an armor page in any other page by using the following syntax:
<pre>
<pre>
{{:<pagename>|<mode>|<select>}}
{{:<pagename>|<mode>|<param1>|<param2>}}
</pre>
</pre>
Here, <pagename> is the armor's full page name (in main namespace), <mode> determines the type of information to be transcluded, and <select> represents a selector required by certain modes.
Here, <pagename> is the armor'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 selectors ===
=== Modes and parameters ===
<table class="wikitable>
<table class="wikitable>
<tr><th>Mode</th><th>Description</th><th>Selector</th></tr>
<tr><th>Mode</th><th>Description</th><th>Parameter 1</th><th>Parameter 2</th></tr>
<tr><td>Page</td><td>Outputs the full armor page. This is the default mode.</td><td>none</td></tr>
<tr><td>Page</td><td>Outputs the full armor page. This is the default mode.</td><td>none</td><td>none</td></tr>
<tr><td>TableHead</td><td>Outputs the header of an armor table (intended for constructing overview tables).</td><td>none</td></tr>
<tr><td>TableHead</td><td>Outputs the header of an armor table (intended for constructing overview tables).</td><td>none</td><td>none</td></tr>
<tr><td>TableEntryType</td><td>Outputs a table row containing specific armor information (intended for constructing overview tables). If an armor type is specified in the selector, output is only generated if the armor matches this type. If no selector is specified, output is always generated.</td><td><select> = one of the following armor types: {{ListFormat|{{ArmorType|TagList}}|Bullets}}</td></tr>
<tr><td>TableEntry</td><td>Outputs a table row containing specific armor information (intended for constructing overview tables). If a selector is specified in <param1>, output is only generated if the selector of a specific armor matches the value of <param2>. If no selector is specified, output is always generated.</td><td>one of the following selectors: {{ListFormat|Type; Attribute|Bullets}}</td><td>one of the possible values of the specified selector</td></tr>
<tr><td>TableEntryAttr</td><td>Outputs a table row containing specific armor information (intended for constructing overview tables). If an armor attribute is specified in the selector, output is only generated if the armor carries this attribute. If no selector is specified, no output is generated.</td><td><select> = one of the following armor attributes: {{ListFormat|{{ArmorAttributes|Tag}}|Bullets}}</td></tr>
</table>
</table>

Revision as of 19:42, 22 October 2022

Description

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

Usage

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

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

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

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

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

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

<!-- 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 armor. Usually identical to the page title. Will be displayed in the infobox of the page.arbitrary text
PagenameYesThe title of the armor 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 armor. Will be displayed in the infobox of the page. A list of predefined types can be found in Template:ArmorType (if new types are introduced, they should also be added there).one of the values defined in Template:ArmorType (other values are ignored): Garment • Jewelry • Shield
VersionYesThe game version in which the armor 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 armor was last updated. Will be displayed in the infobox of the page.version number in the form X.Y.Z
RarityYesThe incidence of the armor. 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
SetNoIf the armor belongs to a certain set of equipment, this can be stated here. Will be displayed in the infobox of the page.one of the equipment [[Set]]s
AttributesNoOne or more attributes which describe certain aspects of the armor. Will be displayed in the infobox of the page. A list of predefined attributes can be found in Template:ArmorAttributes (if new attributes are introduced, they should also be added there).a semicolon-separated list of the values defined in Template:ArmorAttributes (other values are ignored): Quest • Craftable • Crafting • Summon
QuestsNoIf the armor 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 wear the armor, 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 armor 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 armor 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 armor when bought from a merchant (without modifiers). Set to 0 when not buyable.non-negative number
SellYesThe basic price of the armor when sold to a merchant (without modifiers). Set to 0 when unsellable.non-negative number
Stats
TraitsYesThe trait bonus/malus provided by the armor. 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 the armor. See Template:Stats for further information.a vector of 6 comma-separated numbers, representing stat values (e.g. "52,11,10,18,3,0")
OffenseYesThe offensive properties bonus/malus provided by the armor. See Template:Offense for further information.a vector of 7 comma-separated numbers, representing offense values (e.g. "3,8,0,2,1,50,10")
DefenseYesThe defensive properties bonus/malus provided by the armor. See Template:Defense for further information.a vector of 2 comma-separated numbers, representing defense values (e.g. "2,15")
ResistYesThe resistance bonus/malus provided by the armor. See Template:Elements for further information.a vector of 6 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0")
EffectsNoIf special proc effects are provided by the armor, they can be listed here. See Template:Effect for further information.a semicolon-separated list of {{Effect|...}}s (using Template:Effect)
SpecialsNoIf the armor provides special combat properties, they can be listed here.a semicolon-separated list of [[Special]]s
Location
FoundInNoIf the armor is found in certain areas, they can be listed here.a semicolon-separated list of [[Area]]s
DroppedByNoIf the armor is dropped by certain characters/creatures, they can be listed here.a semicolon-separated list of [[Character]]s and/or [[Creature]]s
SoldByNoIf the armor can by bought from certain merchants, they can be listed here.a semicolon-separated list of [[Character]]s
RewardedByNoIf the armor is rewarded by certain quests, they can be listed here.a semicolon-separated list of [[Quest]]s

Extracting specific armor information for use in other pages

Syntax

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

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

Here, <pagename> is the armor'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 armor page. This is the default mode.nonenone
TableHeadOutputs the header of an armor table (intended for constructing overview tables).nonenone
TableEntryOutputs a table row containing specific armor information (intended for constructing overview tables). If a selector is specified in <param1>, output is only generated if the selector of a specific armor 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