Template:Quest/doc: Difference between revisions

From Archaelund Wiki
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
{{Quest
{{Quest
|Mode = {{{1|Page}}}
|Mode = {{{1|Page}}}
|Select = {{{2|}}}
|Param1 = {{{2|}}}
|Param2 = {{{3|}}}


<!-- Quick Facts -->
<!-- Quick Facts -->
|Name =  
|Name =  
|Pagename =  
|Pagename =  
|Translation =
|Status =  
|Status =  
|Type =  
|Type =  
Line 49: Line 51:
<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 quest 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 quest 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 quest 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 quest 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 quest 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>
<tr><td>Name</td><td>Yes</td><td>The name of the quest as used in the game. Will be displayed in the infobox of the page.</td><td>arbitrary text</td></tr>
<tr><td>Name</td><td>Yes</td><td>The name of the quest as used in the game. Will be displayed in the infobox of the page.</td><td>arbitrary text</td></tr>
<tr><td>Pagename</td><td>Yes</td><td>The title of the quest page, needed for linking purposes. Note: Do not use magic words such as <nowiki>{{PAGENAME}}</nowiki> here, as this prevents proper linking when transcluding information from this page on other pages.</td><td>arbitrary text</td></tr>
<tr><td>Pagename</td><td>Yes</td><td>The title of the quest page, needed for linking purposes. Note: Do not use magic words such as <nowiki>{{PAGENAME}}</nowiki> here, as this prevents proper linking when transcluding information from this page on other pages.</td><td>arbitrary text</td></tr>
<tr><td>Translation</td><td>No</td><td>If the quest is named differently in other languages, those names can be listed here.</td><td>internationalization string according to the format described in [[Template:Translation]]</td></tr>
<tr><td>Status</td><td>No</td><td>If the page has a special status, it can be set here. A corresponding box will be displayed at the top of the page.</td><td>one of the values defined in [[Template:PageStatus]]</td></tr>
<tr><td>Status</td><td>No</td><td>If the page has a special status, it can be set here. A corresponding box will be displayed at the top of the page.</td><td>one of the values defined in [[Template:PageStatus]]</td></tr>
<tr><td>Type</td><td>Yes</td><td>The specific type of the quest. Will be displayed in the infobox of the page.</td><td>one of the values defined in [[Template:QuestType]] (other values are ignored): {{ListFormat|{{QuestType|TagList}}|Bullets}}</td></tr>
<tr><td>Type</td><td>Yes</td><td>The specific type of the quest. Will be displayed in the infobox of the page.</td><td>one of the values defined in [[Template:QuestType]] (other values are ignored): {{ListFormat|{{QuestType|TagList}}|Bullets}}</td></tr>
Line 88: Line 92:
You can transclude information from a quest page in any other page by using the following syntax:
You can transclude information from a quest 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 quest'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 quest'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 quest page. This is the default mode.</td><td>none</td></tr>
<tr><td>Page</td><td>Outputs the full quest page. This is the default mode.</td><td>none</td><td>none</td></tr>
<tr><td>TableHead</td><td>Outputs the header of a quest table (intended for constructing overview tables).</td><td>none</td></tr>
<tr><td>TableHead</td><td>Outputs the header of a quest 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 quest information (intended for constructing overview tables). If a quest type is specified in the selector, output is only generated if the quest matches this type. If no selector is specified, output is always generated.</td><td><select> = one of the following quest types: {{ListFormat|{{QuestType|TagList}}|Bullets}}</td></tr>
<tr><td>TableEntry</td><td>Outputs a table row containing specific quest information (intended for constructing overview tables). If a selector is specified in <param1>, output is only generated if the selector of a specific quest 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 quest information (intended for constructing overview tables). If a quest attribute is specified in the selector, output is only generated if the quest carries this attribute. If no selector is specified, no output is generated.</td><td><select> = one of the following quest attributes: {{ListFormat|{{QuestAttributes|Tag}}|Bullets}}</td></tr>
</table>
</table>

Latest revision as of 12:13, 27 January 2024

Description

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

Usage

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

<!-- Quick Facts -->
|Name = 
|Pagename = 
|Translation = 
|Status = 
|Type = 
|Version = 
|VersionUpdate = 
|Attributes = 
|Locations = 
|Giver = 
|Involved = 
|Related = 
|Prerequisites = 
|Level = 

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

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

<!-- Outcomes and Rewards -->
|Outcome1 = 
|Reward1 = 
<!-- ...up to 9... -->
|Outcome9 = 
|Reward9 = 

<!-- Walkthrough -->
|Steps = 
|Walkthrough = 
}}

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 quest as used in the game. Will be displayed in the infobox of the page.arbitrary text
PagenameYesThe title of the quest 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
TranslationNoIf the quest is named differently in other languages, those names can be listed here.internationalization string according to the format described in Template:Translation
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 quest. Will be displayed in the infobox of the page.one of the values defined in Template:QuestType (other values are ignored): Main • Companion • Faction • Side • Unmarked
VersionYesThe game version in which the quest 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 quest was last updated. Will be displayed in the infobox of the page.version number in the form X.Y.Z
AttributesNoOne or more attributes which describe certain aspects of the quest. Will be displayed in the infobox of the page.a semicolon-separated list of the values defined in Template:QuestAttributes (other values are ignored): Incomplete • Missable • Adverse
GiverYesThe character or event which initiates the quest. Will be displayed in the infobox of the page.[[Character]] or arbitrary text
LocationsYesThe sequence of locations (in chronological order) which have to be visitied during the quest. The first entry is assumed to be the starting location and will be displayed in the infobox of the page.a semicolon-separated list of [[Location]]s
InvolvedNoIf certain characters play an important role in this quest, they can be listed here.a semicolon-separated list of [[Character]]s
RelatedNoIf other quests are in some way related to this one, they can be listed here. Will be displayed in the infobox of the page.a semicolon-separated list of [[Quest]]s
PrerequisitesNoIf specific prerequisites have to be fulfilled to start the quest, they can be listed here. Will be displayed in the infobox of the page.a semicolon-separated list of prerequisites
LevelYesThe character level recommended for attempting this quest. Will be displayed in the infobox of the page.positive number
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 quest tables, lists, etc. If nothing is specified, a small version of Image is used instead.image name (including file extension)
VideoNoLinks to external quest-related videos may be provided here.[full URL of external video] or a semicolon-separated list thereof
Info
DescriptionYesA concise description of the quest itself. Is used as an introductory paragraph and should not be too excessive (2−3 sentences are usually enough). More detailed information can be provided under Walkthrough.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 *)
Outcome and Rewards
Outcome1...Outcome9YesA short description of the possible outcomes (up to 9) of the quest. Only the first entry is mandatory, all others are optional.arbitrary text
Reward1...Reward9YesThe quest rewards (money, equipment, reputation) associated with Outcome1...Outcome9, respectively. Will only display if the corresponding outcome is not empty.a semicolon-separated list of rewards
Walkthrough
StepsYesA concise list of the relevant steps necessary to complete the quest. May be subdivided if there are different quest paths and/or outcomes.arbitrary text, ideally formatted as a numbered list (using #)
WalkthroughNoA detailed walkthrough of the quest. Here you can put as much information as you like, including images if they help to illustrate certain aspects (secret locations, riddles, etc.).arbitrary text

Extracting specific quest information for use in other pages

Syntax

You can transclude information from a quest page in any other page by using the following syntax:

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

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