Difference between revisions of "Quest info"

m (better description)
m
 
(17 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
if a name parameter is given, it is assumed that the template isn't on the item's main article, therefore it isn't categorized
 
if a name parameter is given, it is assumed that the template isn't on the item's main article, therefore it isn't categorized
 
-->{{#vardefine:typeText|{{#switch:{{lc:{{{category|}}}}}
 
-->{{#vardefine:typeText|{{#switch:{{lc:{{{category|}}}}}
 +
|guild quests=[[Quest#Guild Quests|Guild Quest]]
 +
|main quests=[[Quest#Main Quests|Main Quest]]
 
|side quests=[[Quest#Side Quests|Side Quest]]
 
|side quests=[[Quest#Side Quests|Side Quest]]
|main quests=[[Quest#Main Quests|Main Quest]]
 
 
}}}}<!--
 
}}}}<!--
 
-->{{#if:{{{name|}}}<!-- if a name parameter is not given
 
-->{{#if:{{{name|}}}<!-- if a name parameter is not given
-->||{{#if:{{#var:typeText}}<!-- if the type is correct (i.e. typeText exists)
+
-->||[[Category:{{#if:{{#var:typeText}}<!-- if specified category is correct
-->|[[Category:{{sc|{{{category|Quests}}}}}]]}}}}<!-- add to category
+
-->|{{sc|{{{category}}}}}<!-- use specified category
 +
-->|Quests}}]]}}<!-- else use Category:Quests
 +
 
 +
succeeded quests
 +
-->{{#arraydefine:succeeded by|{{#ask:[[Has previous::{{{name|{{PAGENAME}}}}}]]|format=plainlist|propsep=;}}|;}}<!--
  
 
reward items are comma-separated and in the format:
 
reward items are comma-separated and in the format:
Line 31: Line 36:
 
! colspan="2" class="quest" | <center>{{{name|{{PAGENAME}}}}}</center><!-- name -->
 
! colspan="2" class="quest" | <center>{{{name|{{PAGENAME}}}}}</center><!-- name -->
 
|-
 
|-
{{#if:{{#var:typeText}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Type'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{#var:typeText}}}}
+
{{#if:{{#var:typeText}}|{{InfoboxRow|'''Type'''|{{#var:typeText}}}}}}
 +
|-
 +
{{#if:{{{quest giver|}}}|{{InfoboxRow|'''Quest Giver'''|[[{{{quest giver}}}]]}}}}
 +
|-
 +
{{#if:{{{location|}}}|{{InfoboxRow|'''Location'''|[[{{{location}}}]]}}}}
 +
|-
 +
{{#if:{{{previous|}}}|{{InfoboxRow|'''Preceded by'''|[[{{{previous}}}]]}}}}
 
|-
 
|-
{{#if:{{{rewards|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Rewards'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}<!-- rewards row
+
{{#if:{{#arrayprint:succeeded by}}|{{InfoboxRow|'''Succeeded by'''|{{#arrayprint:succeeded by|<br>}}}}}}
 +
|-
 +
{{#if:{{{rewards|}}}|{{InfoboxRow|'''Rewards'''|<!-- rewards row
 
-->{{#arrayprint:rewards|<br><!-- print rewards array, separated by line breaks
 
-->{{#arrayprint:rewards|<br><!-- print rewards array, separated by line breaks
 
-->|@|{{#vardefine:name|{{#explode:{{#sub:@|{{#pos:@| }}}}|#|0}}}}<!-- get name
 
-->|@|{{#vardefine:name|{{#explode:{{#sub:@|{{#pos:@| }}}}|#|0}}}}<!-- get name
-->{{#ifeq:{{lc:{{#var:name}}}}|experience|{{stat|Experience|{{#explode:@| |0}}|nolabel=yes}}<!-- if experience
+
-->{{#ifeq:{{lc:{{#var:name}}}}|experience|{{#explode:@| |0}} {{icon|Experience Icon.png|Experience}}<!-- if experience
-->|{{#ifeq:{{lc:{{#var:name}}}}|experience|{{stat|Gold|{{#explode:@| |0}}|nolabel=yes}}<!-- if gold
+
-->|{{#ifeq:{{lc:{{#var:name}}}}|gold|{{#explode:@| |0}} {{icon|Gold Icon.png|Gold}}<!-- if gold
-->|{{item<!-- create an item  
+
-->|{{#explode:@| |0}} <!-- item quantity
 +
-->{{item<!-- create an item  
 
-->|{{#var:name}}<!-- item name
 
-->|{{#var:name}}<!-- item name
-->|{{#if:{{#explode:@|#|1}}<!-- if quality is specified
+
-->|quality={{#if:{{#explode:@|#|1}}<!-- if quality is specified
-->|{{#explode:@|#|1}}<!-- use specified quality
+
-->|{{#explode:@|#|1}}}}}}<!-- use specified quality
-->|{{#show:{{#var:name}}|?Has quality}}}}}}<!-- else get item quality property
+
-->}}}}}}}}}}
--> x{{#explode:@| |0}}}}}}}}}}<!-- item quantity -->
 
 
|}</div><!--
 
|}</div><!--
 
DESCRIPTION
 
DESCRIPTION
-->{{#if:{{{description|}}}|{{quotation|{{{description}}}|game}}}}</includeonly><noinclude>{{{{PAGENAME}}/Documentation}}</noinclude>
+
-->{{#if:{{{description|}}}|{{quotation|{{{description}}}|game}}}}<!--
 +
SET PROPERTIES
 +
-->{{#if:{{{name|}}}{{NAMESPACE}}|<!-- if there is a name parameter or namespace don't set any properties
 +
-->|{{#if:{{{quest giver|}}}|{{#set:Has quest giver={{{quest giver}}}}}}}<!-- set 'Has quest giver' property
 +
 
 +
rewards
 +
-->{{#arrayprint:rewards||@|<!-- for all rewards
 +
-->{{#set:Has reward=<!-- set 'Has reward' property
 +
-->{{#vardefineecho:index|{{#expr:{{#var:index|0}}+1}}}}<!-- recursively define reward index
 +
-->;{{#explode:@| |0}}<!-- set reward quantity
 +
-->;{{#explode:{{#sub:@|{{#pos:@| }}}}|#|0}}<!-- set reward name
 +
-->;{{#explode:@|#|1}}}}}}<!-- set reward quality
 +
 
 +
-->{{#if:{{{previous|}}}|{{#set:Has previous={{{previous}}}}}}}<!-- set 'Has previous' property
 +
 
 +
-->}}</includeonly><noinclude>{{{{PAGENAME}}/Documentation}}</noinclude>

Latest revision as of 21:35, 16 February 2024

Description[edit]

Displays an information page about a Quest.

Usage[edit]

{{Quest info|<image=image>|<name=name>|<description=description>|<category=category>|<quest giver=quest giver>|<previous=previous>|<rewards=rewards>}}

Parameters[edit]

Arrow.pngimage: A map or image of the quest location.
Optional. Defaults to '{{PAGENAME}}.jpg'.
Notes: Only use if the image name differs from the name of the page.
Arrow.pngname: The name of the quest.
Optional. Defaults to '{{PAGENAME}}'.
Notes: Only use if the template is on a different page to the quest's main article.
Arrow.pngdescription: The in-game description of the quest found on the quest menu.
Optional.
Arrow.pngcategory: The quest's category.
Optional.

Possible categories:

guild quests
main quests
side quests
Arrow.pngquest giver: The name of the NPC that gives the quest.
Optional.
Arrow.pnglocation: The location of the NPC that gives the quest.
Optional.
Arrow.pngprevious: The name of the quest sequentially preceding the current quest.
Optional.
Arrow.pngrewards: A comma-separated list experience, gold, or items recieved upon quest completion.
Optional.
Notes: Only specify item quality if it differs from its default quality. e.g. '[quantity1] [reward1]#[quality1], [quantity2] [reward2]#[quality2], etc'.

Errors[edit]

No description was provided. Add a description parameter.