Difference between revisions of "Template:Merchant"

(special event handling / "opens" and "closes" for more consistent formatting / automatic guild hours / formatting changes)
m (12 revisions imported)
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{#switch:{{lc:{{{1|}}}}}| standard = [[Standard Merchant]]{{#if:{{{nation|}}}|{{#switch:{{lc:{{{conquest|}}}}}|1st|2nd = <nowiki/>
+
<includeonly>{{#switch:{{lc:{{{1|}}}}}<!--
:''{{{nation}}} Conquest: {{#switch:{{lc:{{{conquest|}}}}}|1st = 1st - citizens only|2nd = 1st / 2nd}}
+
-->| standard = [[Standard Merchant]]{{#if:{{{nation|}}}|{{#switch:{{lc:{{{conquest|}}}}}|1st|2nd|2nd/3rd = <nowiki/>
}}}}| regional = [[Regional Merchant]]{{#if:{{{2|}}}|<nowiki/>
+
:''[[Conquest|{{{nation}}} Conquest]]: {{#switch:{{lc:{{{conquest|}}}}}|1st = 1st - citizens only|2nd = 1st / 2nd|2nd/3rd = 2nd / 3rd}}
 +
}}}}<!--
 +
-->| regional = [[Regional Merchant]]{{#if:{{{2|}}}|<nowiki/>
 
:''[[{{{2}}}|{{{2}}} region]]''
 
:''[[{{{2}}}|{{{2}}} region]]''
}}| guild = [[{{#switch:{{lc:{{{2|}}}}}|alchemy|alchemist|alchemists' = Alchemists' Guild|bonecraft|boneworker|boneworkers' = Boneworkers' Guild|clothcraft|weaver|weavers' = Weavers' Guild|cooking|culinarian|culinarians' = Culinarians' Guild|fishing|fisherman|fishermen|fishermans' = Fishermans' Guild|goldsmithing|goldsmith|goldsmiths' = Goldsmiths' Guild|leathercraft|tanner|tanners' = Tanner's Guild|smithing|blacksmith|blacksmiths' = Blacksmiths' Guild|woodworking|carpenter|carpenters' = Carpenters' Guild|#default = Guild Merchant}}]]|special event = [[Special Event|Special Event Merchant]]{{#if:{{{2|}}}|<nowiki/>
+
}}<!--
 +
-->|tenshodo = [[Tenshodo Merchant]]<!--
 +
-->|guildworker's union = [[Guildworker's Union|Guildworker's Union Rep.]]<!--
 +
-->|guild|ranked guild = [[{{#switch:{{lc:{{{2|}}}}}|alchemy|alchemist|alchemists' = Alchemists' Guild|bonecraft|boneworker|boneworkers' = Boneworkers' Guild|clothcraft|weaver|weavers' = Weavers' Guild|cooking|culinarian|culinarians' = Culinarians' Guild|fishing|fisherman|fishermen|fishermans' = Fishermans' Guild|goldsmithing|goldsmith|goldsmiths' = Goldsmiths' Guild|leathercraft|tanner|tanners' = Tanners' Guild|smithing|blacksmith|blacksmiths' = Blacksmiths' Guild|woodworking|carpenter|carpenters' = Carpenters' Guild|#default = Guild Merchant}}]]<!--
 +
-->|special event = [[Special Event|Special Event Merchant]]{{#if:{{{2|}}}|<nowiki/>
 
:''Only available during the [[{{{2|}}}]] event.''
 
:''Only available during the [[{{{2|}}}]] event.''
}}| | unknown | ??? = ''Unknown'' <includeonly>{{Information Needed}}</includeonly>| #default = {{{1}}}}}{{#if:{{{opens|}}}{{{closes|}}}|<nowiki/>
+
}}<!--
:''Open {{#if:{{{opens|}}}|{{#iferror:{{#time:G:i|{{{opens}}}}}|{{#time:G:i|{{{opens}}}:00}}|{{#time:G:i|{{{opens}}}}}}}|???<includeonly>{{Information Needed}}</includeonly>}} - {{#if:{{{closes|}}}|{{#iferror:{{#time:G:i|{{{closes}}}}}|{{#time:G:i|{{{closes}}}:00}}|{{#time:G:i|{{{closes}}}}}}}|???<includeonly>{{Information Needed}}</includeonly>}}''
+
-->|green thumb moogle = [[Green Thumb Moogle]]<!--
 +
-->|unknown|???| = ''Unknown'' {{Information Needed|{{#if:{{NAMESPACE}}|nc}}}}<!--
 +
-->|#default = {{{1}}}<!--
 +
-->}}<!--
 +
-->{{#if:{{{opens|}}}{{{closes|}}}|<nowiki/>
 +
:''Open {{#if:{{{opens|}}}|{{#iferror:{{#time:G:i|{{{opens}}}}}|{{#time:G:i|{{{opens}}}:00}}|{{#time:G:i|{{{opens}}}}}}}|???{{Information Needed|{{#if:{{NAMESPACE}}|nc}}}}}} - {{#if:{{{closes|}}}|{{#iferror:{{#time:G:i|{{{closes}}}}}|{{#time:G:i|{{{closes}}}:00}}|{{#time:G:i|{{{closes}}}}}}}|???{{Information Needed|{{#if:{{NAMESPACE}}|nc}}}}}}''
 
|{{#if:{{{hours|}}}{{#if:{{{2|}}}|{{#ifeq:{{lc:{{{1|}}}}}|guild|1}}}}|<nowiki/>
 
|{{#if:{{{hours|}}}{{#if:{{{2|}}}|{{#ifeq:{{lc:{{{1|}}}}}|guild|1}}}}|<nowiki/>
 
:''Open {{#if:{{{hours|}}}|{{{hours}}}|{{#switch:{{lc:{{{2|}}}}}|alchemy|alchemist|alchemists' = 8:00 - 23:00|bonecraft|boneworker|boneworkers' = 8:00 - 23:00|clothcraft|weaver|weavers' = 6:00 - 21:00|cooking|culinarian|culinarians' = 5:00 - 20:00|fishing|fisherman|fishermen|fishermans' = 3:00 - 18:00|goldsmithing|goldsmith|goldsmiths' = 8:00 - 23:00|leathercraft|tanner|tanners' = 3:00 - 18:00|smithing|blacksmith|blacksmiths' = 8:00 - 23:00|woodworking|carpenter|carpenters' = 6:00 - 21:00}}}}''
 
:''Open {{#if:{{{hours|}}}|{{{hours}}}|{{#switch:{{lc:{{{2|}}}}}|alchemy|alchemist|alchemists' = 8:00 - 23:00|bonecraft|boneworker|boneworkers' = 8:00 - 23:00|clothcraft|weaver|weavers' = 6:00 - 21:00|cooking|culinarian|culinarians' = 5:00 - 20:00|fishing|fisherman|fishermen|fishermans' = 3:00 - 18:00|goldsmithing|goldsmith|goldsmiths' = 8:00 - 23:00|leathercraft|tanner|tanners' = 3:00 - 18:00|smithing|blacksmith|blacksmiths' = 8:00 - 23:00|woodworking|carpenter|carpenters' = 6:00 - 21:00}}}}''
}}}}{{#if:{{{holiday|}}}|{{#switch:{{lc:{{{1|}}}}}|guild = <!--Guilds are no longer closed on certain days.-->|#default = <nowiki/>
+
}}}}<!--
:''Closed {{#switch:{{lc:{{{holiday|}}}}}|firesday = {{Colorlink|Fire|Firesday}}|earthsday = {{Colorlink|Earth|Earthsday}}|watersday = {{Colorlink|Water|Watersday}}|windsday = {{Colorlink|Wind|Windsday}}|iceday = {{Colorlink|Ice|Iceday}}|lightningsday = {{Colorlink|Lightning|Lightningsday}}|lightsday = {{Colorlink|Light|Lightsday}}|darksday = {{Colorlink|Dark|Darksday}}|#default = {{{holiday}}}}}.''}}
+
-->{{#if:{{{rank|}}}|<nowiki/>
}}{{#switch:{{lc:{{{restocked|}}}}}|true|yes|false|no = <nowiki/>
+
:''{{{rank}}} rank required.''
:''{{#switch:{{lc:{{{restocked|}}}}}|true|yes = Automatically restocked.|false|yes|no = Not automatically restocked.}}''
+
}}<!--
}}{{#if:{{{note|}}}|<nowiki/>
+
-->{{#if:{{{key item|}}}|<nowiki/>
 +
:''Requires {{KeyItem}}[[{{{key item}}}]]''
 +
}}<!--
 +
-->{{#switch:{{lc:{{{restocked|}}}}}|true|yes = <nowiki/>
 +
:''Automatically restocked.''
 +
|false|no = <nowiki/>
 +
:''Not automatically restocked.''
 +
}}<!--
 +
-->{{#if:{{{note|}}}|<nowiki/>
 
:''{{{note}}}''
 
:''{{{note}}}''
}}<noinclude>[[Category:Templates|{{PAGENAME}}]]
+
}}</includeonly><noinclude>
 +
[[Category:Templates|{{PAGENAME}}]]
 
==Usage==
 
==Usage==
 
<pre>
 
<pre>
 
{{Merchant|<merchant type>|<region/guild/special event>}}
 
{{Merchant|<merchant type>|<region/guild/special event>}}
 
</pre>
 
</pre>
*The first parameter ("merchant type") will be automatically formatted for "standard", "regional", "guild", and "special event".
+
*The first parameter ("merchant type") will be automatically formatted for "standard", "regional", "guild", "ranked guild", "guildworker's union", and "special event".
 
*The second parameter ("region/guild/special event") is only used for regional, guild, and special event merchants (see examples below).
 
*The second parameter ("region/guild/special event") is only used for regional, guild, and special event merchants (see examples below).
 
*The following parameters can also be used, but are optional:
 
*The following parameters can also be used, but are optional:
 
:*'''nation''', '''conquest:''' The nation and conquest standing required for this merchant to sell the item. (standard merchant only)
 
:*'''nation''', '''conquest:''' The nation and conquest standing required for this merchant to sell the item. (standard merchant only)
 
:*'''opens''', '''closes:''' The time this shop opens and closes.
 
:*'''opens''', '''closes:''' The time this shop opens and closes.
:*'''holiday:''' The day or days that this shop is closed.
+
:*'''restocked:''' "true" or "yes" if this item will be automatically restocked every day and "false" or "no" if it is only stocked by players selling items to the merchants. Only use this parameter if the merchant has limited stock, like a guild.
:*'''restocked:''' "true"/"yes" if this item will be automatically restocked every day or "false"/"no" if it is only stocked by players selling items to the merchants. Only use this parameter if the merchant has limited stock, like a guild.
+
:*'''rank:''' The rank required to purchase the item.
 +
:*'''key item:''' The key item required to purchase the item.
 
:*'''note:''' Any additional note for the merchant.
 
:*'''note:''' Any additional note for the merchant.
 
===Examples===
 
===Examples===
Line 33: Line 54:
 
! Code !! Result
 
! Code !! Result
 
|-
 
|-
| <code><nowiki>{{Merchant|Standard}}</nowiki></code>
+
| <pre>{{Merchant|???}}</pre>
 +
| {{Merchant|???}}
 +
|-
 +
| <pre>{{Merchant|Standard}}</pre>
 
| {{Merchant|Standard}}
 
| {{Merchant|Standard}}
 
|-
 
|-
| <code><nowiki>{{Merchant|Standard|nation = San d'Oria|conquest = 1st}}</nowiki></code>
+
| <pre>{{Merchant|Standard|nation = San d'Oria|conquest = 1st}}</pre>
 
| {{Merchant|Standard|nation = San d'Oria|conquest = 1st}}
 
| {{Merchant|Standard|nation = San d'Oria|conquest = 1st}}
 
|-
 
|-
| <code><nowiki>{{Merchant|Standard|nation = Windurst|conquest = 2nd}}</nowiki></code>
+
| <pre>{{Merchant|Standard|nation = Windurst|conquest = 2nd}}</pre>
 
| {{Merchant|Standard|nation = Windurst|conquest = 2nd}}
 
| {{Merchant|Standard|nation = Windurst|conquest = 2nd}}
 
|-
 
|-
| <code><nowiki>{{Merchant|Regional}}</nowiki></code>
+
| <pre>{{Merchant|Regional}}</pre>
 
| {{Merchant|Regional}}
 
| {{Merchant|Regional}}
 
|-
 
|-
| <code><nowiki>{{Merchant|Regional|Zulkheim}}</nowiki></code>
+
| <pre>{{Merchant|Regional|Zulkheim}}</pre>
 
| {{Merchant|Regional|Zulkheim}}
 
| {{Merchant|Regional|Zulkheim}}
 
|-
 
|-
| <code><nowiki>{{Merchant|Guild}}</nowiki></code>
+
| <pre>{{Merchant|Tenshodo}}</pre>
 +
| {{Merchant|Tenshodo}}
 +
|-
 +
| <pre>{{Merchant|Guildworker's Union}}</pre>
 +
| {{Merchant|Guildworker's Union}}
 +
|-
 +
| <pre>{{Merchant|Guild}}</pre>
 
| {{Merchant|Guild}}
 
| {{Merchant|Guild}}
 
|-
 
|-
| <code><nowiki>{{Merchant|Guild|Alchemy}}</nowiki></code>
+
| <pre>{{Merchant|Guild|Alchemy}}</pre>
 
| {{Merchant|Guild|Alchemy}}
 
| {{Merchant|Guild|Alchemy}}
 
|-
 
|-
| <code><nowiki>{{Merchant|Guild|Alchemists'}}</nowiki></code>
+
| <pre>{{Merchant|Guild|Alchemists'}}</pre>
 
| {{Merchant|Guild|Alchemists'}}
 
| {{Merchant|Guild|Alchemists'}}
 
|-
 
|-
| <code><nowiki>{{Merchant|Guild|Fishing|opens = 1:00|closes = 18:00</nowiki><br><nowiki>|holiday = Lightsday|restocked = true}}</nowiki></code>
+
| <pre>{{Merchant|Ranked Guild|Woodworking}}</pre>
| {{Merchant|Guild|Fishing|opens = 1:00|closes = 18:00|holiday = Lightsday|restocked = true}}
+
| {{Merchant|Ranked Guild|Woodworking}}
 +
|-
 +
| <pre>{{Merchant|Ranked Guild|Clothcraft|rank = Novice}}</pre>
 +
| {{Merchant|Ranked Guild|Clothcraft|rank = Novice}}
 +
|-
 +
| <pre>{{Merchant|Guild|Fishing|opens = 1:00|closes = 18:00|restocked = true}}</pre>
 +
| {{Merchant|Guild|Fishing|opens = 1:00|closes = 18:00|restocked = true}}
 +
|-
 +
| <pre>{{Merchant|Guild|Cooking|restocked = false}}</pre>
 +
| {{Merchant|Guild|Cooking|restocked = false}}
 
|-
 
|-
| <code><nowiki>{{Merchant|Special Event}}</nowiki></code>
+
| <pre>{{Merchant|Special Event}}</pre>
 
| {{Merchant|Special Event}}
 
| {{Merchant|Special Event}}
 
|-
 
|-
| <code><nowiki>{{Merchant|Special Event|Starlight Celebration}}</nowiki></code>
+
| <pre>{{Merchant|Special Event|Starlight Celebration}}</pre>
 
| {{Merchant|Special Event|Starlight Celebration}}
 
| {{Merchant|Special Event|Starlight Celebration}}
 
|-
 
|-
| <code><nowiki>{{Merchant|[[Buffalo Ranch Merchant]]}}</nowiki></code>
+
| <pre>{{Merchant|Green Thumb Moogle}}</pre>
 +
| {{Merchant|Green Thumb Moogle}}
 +
|-
 +
| <pre>{{Merchant|Green Thumb Moogle|key item = Sheep Memento}}</pre>
 +
| {{Merchant|Green Thumb Moogle|key item = Sheep Memento}}
 +
|-
 +
| <pre>{{Merchant|[[Buffalo Ranch Merchant]]}}</pre>
 
| {{Merchant|[[Buffalo Ranch Merchant]]}}
 
| {{Merchant|[[Buffalo Ranch Merchant]]}}
 
|-
 
|-
| <code><nowiki>{{Merchant|[[Buffalo Ranch Merchant]]|note = Tier III stock.}}</nowiki></code>
+
| <pre>{{Merchant|[[Buffalo Ranch Merchant]]|note = Tier III stock.}}</pre>
 
| {{Merchant|[[Buffalo Ranch Merchant]]|note = Tier III stock.}}
 
| {{Merchant|[[Buffalo Ranch Merchant]]|note = Tier III stock.}}
 
|}
 
|}
 
</noinclude>
 
</noinclude>

Latest revision as of 04:15, 13 July 2017

Usage[edit]

{{Merchant|<merchant type>|<region/guild/special event>}}
  • The first parameter ("merchant type") will be automatically formatted for "standard", "regional", "guild", "ranked guild", "guildworker's union", and "special event".
  • The second parameter ("region/guild/special event") is only used for regional, guild, and special event merchants (see examples below).
  • The following parameters can also be used, but are optional:
  • nation, conquest: The nation and conquest standing required for this merchant to sell the item. (standard merchant only)
  • opens, closes: The time this shop opens and closes.
  • restocked: "true" or "yes" if this item will be automatically restocked every day and "false" or "no" if it is only stocked by players selling items to the merchants. Only use this parameter if the merchant has limited stock, like a guild.
  • rank: The rank required to purchase the item.
  • key item: The key item required to purchase the item.
  • note: Any additional note for the merchant.

Examples[edit]

Code Result
{{Merchant|???}}
Unknown Information Needed
{{Merchant|Standard}}
Standard Merchant
{{Merchant|Standard|nation = San d'Oria|conquest = 1st}}
Standard Merchant
San d'Oria Conquest: 1st - citizens only
{{Merchant|Standard|nation = Windurst|conquest = 2nd}}
Standard Merchant
Windurst Conquest: 1st / 2nd
{{Merchant|Regional}}
Regional Merchant
{{Merchant|Regional|Zulkheim}}
Regional Merchant
Zulkheim region
{{Merchant|Tenshodo}}
Tenshodo Merchant
{{Merchant|Guildworker's Union}}
Guildworker's Union Rep.
{{Merchant|Guild}}
Guild Merchant
{{Merchant|Guild|Alchemy}}
Alchemists' Guild
Open 8:00 - 23:00
{{Merchant|Guild|Alchemists'}}
Alchemists' Guild
Open 8:00 - 23:00
{{Merchant|Ranked Guild|Woodworking}}
Carpenters' Guild
{{Merchant|Ranked Guild|Clothcraft|rank = Novice}}
Weavers' Guild
Novice rank required.
{{Merchant|Guild|Fishing|opens = 1:00|closes = 18:00|restocked = true}}
Fishermans' Guild
Open 1:00 - 18:00
Automatically restocked.
{{Merchant|Guild|Cooking|restocked = false}}
Culinarians' Guild
Open 5:00 - 20:00
Not automatically restocked.
{{Merchant|Special Event}}
Special Event Merchant
{{Merchant|Special Event|Starlight Celebration}}
Special Event Merchant
Only available during the Starlight Celebration event.
{{Merchant|Green Thumb Moogle}}
Green Thumb Moogle
{{Merchant|Green Thumb Moogle|key item = Sheep Memento}}
Green Thumb Moogle
Requires Key ItemSheep Memento
{{Merchant|[[Buffalo Ranch Merchant]]}}
Buffalo Ranch Merchant
{{Merchant|[[Buffalo Ranch Merchant]]|note = Tier III stock.}}
Buffalo Ranch Merchant
Tier III stock.