Template:Shop/doc: Difference between revisions

From Dragon Quest Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(14 intermediate revisions by one other user not shown)
Line 1: Line 1:
The Shop template is used to display shop information for various locations in Dragon Quest games.  This template covers all types of shops (items, tools, weapons, armor).   
The Shop template is used to display shop information for various locations in ''[[Dragon Quest (series)|Dragon Quest]]'' games.  This template covers all types of shops (items, tools, weapons, armor).   


==Usage==
==Usage==
In almost all cases, using this template should be preceded by a heading describing the shop type on the article it is being transcluded onto (i.e.<nowiki>==Item Shop==</nowiki>).  This is because there is no label marking the table as a specific type of shop within this template.  This is consistent with other location templates.
In almost all cases, using this template should be preceded by a heading describing the shop type on the article it is being transcluded onto (i.e.<nowiki>==Item Shops==</nowiki>).  This is because there is no label marking the table as a specific type of shop within this template.  This is consistent with other location templates.
===Header===
===Header===
A header call to this template should be the first usage of this template on any page.
A header call to this template should be the first usage of this template on any page.
<pre>{{Shop|header}}</pre>
<pre>{{Shop|header|includeClasses|collapsed|title={{DQ2}}|subtitle=NES}}</pre>
*header: A required parameter which marks this as the start of a shop table.
*header: A required parameter which marks this as the start of a shop table.
===Subtable===
*includeClasses: An optional parameter marking whether this shop table should include a column for character classesThis applies when the shop has equipment which can be equipped by 1 or more characters.  It should be used in association with entries that include the 'classes' parameter (see below). This parameter '''must''' be the 2nd passed parameter if it is included.
A subtable call is made to designate shop data for a specific game and consoleNote that for shops which sell the same items across different versions of a game should be merged into one subtable (i.e. console=NES,GBC).
*collapsed: An optional parameter marking whether this table should be collapsed by default.  Omitting it leaves the table uncollapsed.
<pre>{{Shop|subtable|game=[[Dragon Quest II]]|console=NES}}</pre>
*title: The title to be used for this subtable.  Most often this is the game this shop represents.  Should be an interwiki link when applicable.
*subtable: A required parameter marking the start of a subtable.
*subtitle: An optional parameter.  The subtitle to be used for this subtable.  Often the console version of the game.  
*game: The game this shop represents.  Should be an interwiki link.
*console: The console version of the game. '''Note:''' This parameter should contain multiple console values separated by commas if the game and price parameters are the same!
===Entries===
===Entries===
Each entry in the shop table is represented by a single template call.
Each entry in the shop table is represented by a single template call. Note that the list of entries for a shop should follow the ordering of the list in-game.  Also, the names of items should also be the ones used in-game, meaning they will often be redirect links.
<pre>{{Shop|entry|item=[[Broad Sword]]|price=4g per person}}</pre>
<pre>{{Shop|entry|item=[[Steel broadsword]]|price=4g per person}}</pre>
*entry: A required parameter which marks this as a single shop table entry.
*entry: A required parameter which marks this as a single shop table entry.
*item: The name of the item.  Should be an interwiki link.
*item: The name of the item.  Should be an interwiki link.
*price: The price of the item.  Should include units of currency.
*price: The price of the item.  Should include units of currency.
===Subtable Footer===
*attributes: Attributes describing the item.
This call is mainly for formatting purposes separates sets of shop data.
*classes: Inter-wiki links to classes/characters that can equip this item. This field should only be used in shop tables  whose header uses 'includeClasses'.
<pre>{{Shop|subtablefooter}}</pre>
===Notes===
*subtablefooter: A required parameter marking the end of a subtable.
Notes may be added to the end of the shop table when applicable.
<pre>{{Shop|note|includeClasses|note=This shop is accessible only with the [[Magic Key]]}}</pre>
*note: A required parameter marking this as a note in the shop table.
*includeClasses: An optional parameter.  Should be included if the 'header' has the 'includeClasses' parameter.  Otherwise, it should be omitted.  Used to ensure table colspans are set correctly.
*text: A required parameter.  The actual text to display.  Can include interwiki links.
===Footer===
===Footer===
The footer call marks the end of the shop table.
The footer call marks the end of the shop table.
Line 29: Line 31:
==Example==
==Example==
===Sample===
===Sample===
{{Shop|header}}
{{Shop|header|includeClasses|title={{DQ4}}|subtitle=DS}}
{{Shop|subtable|game=[[Dragon Quest IV]]|console=DS}}
{{Shop|entry|item=[[Steel broadsword]]|price=1500|attributes=Attack +15|classes=[[Warrior]]}}
{{Shop|entry|item=[[Broad Sword]]|price=1500g}}
{{Shop|entry|item=[[Cloak of evasion]]|price=2800|attributes=Defense +10|classes=[[Warrior]]<br/>[[Priest]]}}
{{Shop|entry|item=[[Cloak of Evasion]]|price=2800g}}
{{Shop|entry|item=[[Iron helmet]]|price=2200|attributes=Defense +12|classes=[[Sage]]}}
{{Shop|entry|item=[[Iron Helmet]]|price=2200g}}
{{Shop|entry|item=[[Staff of sentencing]]|price=1300|attributes=Attack +7||classes=[[Mage]]}}
{{Shop|entry|item=[[Judgement Staff]]|price=1300g}}
{{Shop|note|includeClasses|text=This shop is only open at night.}}
{{Shop|subtablefooter}}
{{Shop|subtable|game=[[Dragon Quest V]]|console=DS}}
{{Shop|entry|item=[[Cautery Sword]]|price=?}}
{{Shop|entry|item=[[Flame Sword]]|price=8600g}}
{{Shop|subtablefooter}}
{{Shop|footer}}
{{Shop|footer}}
{{Shop|header|title={{DQ5}}|subtitle=DS}}
{{Shop|entry|item=[[Cautery sword]]|price=?|attributes=Attack +20}}
{{Shop|entry|item=[[Fire blade]]|price=8600|attributes=Attack +1}}
{{Shop|note|text=This shop's prices change throughout the game.}}
{{Shop|footer}}
===Code===
===Code===
<pre>
<pre>
{{Shop|header}}
{{Shop|header|includeClasses|title={{DQ4}}|subtitle=DS}}
{{Shop|subtable|game=[[Dragon Quest IV]]|console=DS}}
{{Shop|entry|item=[[Steel broadsword]]|price=1500|attributes=Attack +15|classes=[[Warrior]]}}
{{Shop|entry|item=[[Broad Sword]]|price=1500g}}
{{Shop|entry|item=[[Cloak of evasion]]|price=2800|attributes=Defense +10|classes=[[Warrior]]<br/>[[Priest]]}}
{{Shop|entry|item=[[Cloak of Evasion]]|price=2800g}}
{{Shop|entry|item=[[Iron helmet]]|price=2200|attributes=Defense +12|classes=[[Sage]]}}
{{Shop|entry|item=[[Iron Helmet]]|price=2200g}}
{{Shop|entry|item=[[Staff of sentencing]]|price=1300|attributes=Attack +7||classes=[[Mage]]}}
{{Shop|entry|item=[[Judgement Staff]]|price=1300g}}
{{Shop|note|includeClasses|text=This shop is only open at night.}}
{{Shop|subtablefooter}}
{{Shop|footer}}
{{Shop|subtable|game=[[Dragon Quest V]]|console=DS}}
 
{{Shop|entry|item=[[Cautery Sword]]|price=?}}
{{Shop|header|title={{DQ5}}|subtitle=DS}}
{{Shop|entry|item=[[Flame Sword]]|price=8600g}}
{{Shop|entry|item=[[Cautery sword]]|price=?|attributes=Attack +20}}
{{Shop|subtablefooter}}
{{Shop|entry|item=[[Fire blade]]|price=8600|attributes=Attack +1}}
{{Shop|note|text=This shop's prices change throughout the game.}}
{{Shop|footer}}
{{Shop|footer}}
</pre>
</pre>

Latest revision as of 04:31, 22 February 2020

The Shop template is used to display shop information for various locations in Dragon Quest games. This template covers all types of shops (items, tools, weapons, armor).

Usage[edit source]

In almost all cases, using this template should be preceded by a heading describing the shop type on the article it is being transcluded onto (i.e.==Item Shops==). This is because there is no label marking the table as a specific type of shop within this template. This is consistent with other location templates.

Header[edit source]

A header call to this template should be the first usage of this template on any page.

{{Shop|header|includeClasses|collapsed|title={{DQ2}}|subtitle=NES}}
  • header: A required parameter which marks this as the start of a shop table.
  • includeClasses: An optional parameter marking whether this shop table should include a column for character classes. This applies when the shop has equipment which can be equipped by 1 or more characters. It should be used in association with entries that include the 'classes' parameter (see below). This parameter must be the 2nd passed parameter if it is included.
  • collapsed: An optional parameter marking whether this table should be collapsed by default. Omitting it leaves the table uncollapsed.
  • title: The title to be used for this subtable. Most often this is the game this shop represents. Should be an interwiki link when applicable.
  • subtitle: An optional parameter. The subtitle to be used for this subtable. Often the console version of the game.

Entries[edit source]

Each entry in the shop table is represented by a single template call. Note that the list of entries for a shop should follow the ordering of the list in-game. Also, the names of items should also be the ones used in-game, meaning they will often be redirect links.

{{Shop|entry|item=[[Steel broadsword]]|price=4g per person}}
  • entry: A required parameter which marks this as a single shop table entry.
  • item: The name of the item. Should be an interwiki link.
  • price: The price of the item. Should include units of currency.
  • attributes: Attributes describing the item.
  • classes: Inter-wiki links to classes/characters that can equip this item. This field should only be used in shop tables whose header uses 'includeClasses'.

Notes[edit source]

Notes may be added to the end of the shop table when applicable.

{{Shop|note|includeClasses|note=This shop is accessible only with the [[Magic Key]]}}
  • note: A required parameter marking this as a note in the shop table.
  • includeClasses: An optional parameter. Should be included if the 'header' has the 'includeClasses' parameter. Otherwise, it should be omitted. Used to ensure table colspans are set correctly.
  • text: A required parameter. The actual text to display. Can include interwiki links.

Footer[edit source]

The footer call marks the end of the shop table.

{{Shop|footer}}
  • footer: A required parameter marking the template as the footer.

Example[edit source]

Sample[edit source]

Dragon Quest IV: Chapters of the Chosen (DS)
Item Price Attributes Vocations
Steel broadsword 1500 Attack +15 Warrior
Cloak of evasion 2800 Defense +10 Warrior
Priest
Iron helmet 2200 Defense +12 Sage
Staff of sentencing 1300 Attack +7 Mage
Note: This shop is only open at night.


Dragon Quest V: Hand of the Heavenly Bride (DS)
Item Price Attributes
Cautery sword ? Attack +20
Fire blade 8600 Attack +1
Note: This shop's prices change throughout the game.


Code[edit source]

{{Shop|header|includeClasses|title={{DQ4}}|subtitle=DS}}
{{Shop|entry|item=[[Steel broadsword]]|price=1500|attributes=Attack +15|classes=[[Warrior]]}}
{{Shop|entry|item=[[Cloak of evasion]]|price=2800|attributes=Defense +10|classes=[[Warrior]]<br/>[[Priest]]}}
{{Shop|entry|item=[[Iron helmet]]|price=2200|attributes=Defense +12|classes=[[Sage]]}}
{{Shop|entry|item=[[Staff of sentencing]]|price=1300|attributes=Attack +7||classes=[[Mage]]}}
{{Shop|note|includeClasses|text=This shop is only open at night.}}
{{Shop|footer}}

{{Shop|header|title={{DQ5}}|subtitle=DS}}
{{Shop|entry|item=[[Cautery sword]]|price=?|attributes=Attack +20}}
{{Shop|entry|item=[[Fire blade]]|price=8600|attributes=Attack +1}}
{{Shop|note|text=This shop's prices change throughout the game.}}
{{Shop|footer}}