User:GS4-XERAPHINA/Town shops template testing: Difference between revisions

The official GemStone IV encyclopedia.
Jump to navigation Jump to search
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TOCright}}
{{Town shops
'''[[:Category:Town shops|Town shops]]''', formally known as NPC shops, are permanent shops that are located within towns, and offer a variety of goods for sale to players for silvers. These shops will typically utilize the {{boldmono|[[ORDER]]}} [[verb]] in order to access the inventory, and may also utilize {{boldmono|[[CUSTOMIZE]]}} for certain items, though some exceptions may occur. There may be some variation to how {{boldmono|ORDER}} will work in these establishments.
|type =
|realm = Wehnimer's Landing
|specialty =
|wares = armor
|addinfo = It can be found in the [[Ravelin]].
}}


==Form==
Current setup requires a lot of extra side add-ons to make it work based on how the wares would look in line. New set up tweaks the way the sentence is broken down, and also allows for a secondary type (like the shop in Solhaven that sells coffee and tobacco. It also allows for a specialty entry for apparel and food shops that have a narrower focus on what is offered like shoes or beverages.
A semantic form has been created to make it easier for contributors to create and edit town shops as they are opened or updated and can be found here: [[Form:Town shop|Town Shop Form]]. The form uses the [[Template:Town shops|town shops template]] and is limited to a single room only, either as the single room in the shop or the first room. Additional formatting may be required beyond the parameters of the form and can be handled in the '''free text''' area of the form.

==Page Name==
The title of the article should reflect the full name of the shop, including the articles "a," "an," and "the," as that is the proper name of the shop. Utilizing <code><nowiki>{{DEFAULTSORT:(Shop name without article)}}</nowiki></code> at the end of the article will allow the shop to be properly sorted alphabetically. Ex. [[The Cultured Corsair]] would use <code><nowiki>{{DEFAULTSORT:Cultured Corsair, the}}</nowiki></code> to ensure correct alphabetization.

The name of the shop may not always match up with the name of the room. In instances such as this, the article name should reflect the name of the shop that appears when using {{Boldmono|ORDER}}, ex. [[Saphrie's Herbs and Tinctures]] is located in the Triage Station of Ta'Vaalor.

==[[Template:Town shops|Town Shops Template]]==
The town shops template is a required template for all town shops, and should be entered prior to the body of the article. Using this template will automatically assign the shop to the appropriate category and updates lists generated utilizing assigned properties on the applicable article pages. Additionally, it utilizes the [[Template:RoomDescription|room description]] template. As noted in the section regarding the [[#Form|town shop form]], the template will only work for the main room in the shop. Additional formatting will be needed to include additional rooms or backroom merchandise, if offered.

===Template Parameters===

*'''Types''' - Required. There are three main categories of town shops: inns, eateries, and shops.
**An [[inn]] is a shop that typically sells food and/or beverages, but has the additional function of allowing characters to [[Verb:CHECK#CHECK_IN|CHECK IN]] to the [[Character Manager]]. They may have [[latchable room]]s or private [[table]]s, as well.
**An [[:Category:Eateries|eatery]] is a shop that sells food and/or beverages and offers a seating area, including private tables. For the sake of categorization, this does not include inns.
**A [[:Category:Town shops|shop]] is the general term used for a shop that sell goods but does not fall under the above two categories.

*'''[[Realm]]''' - Required. This is based on the realm in which a shop is located, and is a separate parameter from [[location]], which is used in conjunction with the realm if the shop is located in a settlement or hamlet outside of the main town.
*'''Article'''- Optional. This to be used with '''location''' and any entry simply adds the article "the" in front of a location that typically uses it in its name, ex. the [[Ravelin]].
*'''Location''' - Optional. This can be used with '''[[realm]]''' and is meant to note shops that are located in a specific realm but outside of the main town.
*'''Specialtyshop''' - Optional. This is used to denote shops that sell items that do not fall under one of the '''wares''' categories. Any entry will change the wording in the introductory sentence to "specializes in," as opposed to "sells" and will categorize the shop under [[:Category:Specialty shops|specialty shops]].
*'''Wares''' - This is a required parameter in all but specialty shops. The following list details how a shop is categorized based on the wares it sells. Some shops may sell two types of wares, however those that sell more than two types of wares or a variety of goods would be considered a general store. The below list encompasses those categories that have a total number of five or more shops of the same type. Categories with four or fewer shops would fall under [[:Category:Specialty shops|specialty shops]]. Additional categories may be added as new shops open, and can be updated through the [[Property:Shop wares|shop wares]] property page. Doing so will automatically update the options in the [[User:GS4-XERAPHINA/Town shops template testing#Form|town shop form]].
**[[:Category:Apparel shops|'''Apparel''']] - shops that sell clothing of any type. Some apparel shops may have a specialty or a narrow focus, such as a shop that sells shoes only.
**[[:Category:Armor shops|'''Armor''']] - shops that sell armor and armor accessories.
**[[:Category:Beverage shops|'''Beverages''']] - beverage shops sell drinks only.
**[[:Category:Brewing shops|'''Brewing supplies''']] - brewing shops sell supplies to brew coffee or tea.
**'''[[:Category:Cleric shops|Clerical supplies]] -''' shops that sell v<nowiki/>ar<nowiki/>ious [[holy symbol|holy symbols]] and [[Holy armament|armaments]].
**[[:Category:Cobbling shops|'''Cobbling materials''']] - shops that sell <nowiki/>ma<nowiki/>terials to cobble shoes.
**[[:Category:Dye shops|'''Dyes''']] - shops that sell standard varie<nowiki/>ti<nowiki/>es of dyes.
**[[:Category:Fishing shops|'''Fishing supplies''']] - shops that sell [[fishing]] gear.
**'''[[:Category:Fletcher shops|Fletching materials]]''' - shops that sell [[fletching]] and archery necessities.
**[[:Category:Food shops|'''Food''']] - shops that sell '''prepared''' [[Food and drink|food and beverages]]. For the sake of categorization, it excludes shops that exclusively sell beverages as well as groceries used for cooking.
**[[:Category:General stores|'''General goods''']] - stores that sell a variety of goods.
**[[:Category:Grocers|'''Groceries''']] - stores that sell groceries and/or cooking supplies.
**[[:Category:Herb shops|'''Herbs''']] - shops that sell healing herbs.
**[[:Category:Instrument shops|'''Instruments''']] - shops that sell musical [[instrument|in]]<nowiki/>[[instrument|struments]].
**[[:Category:Jewelry shops|'''Jewelry''']] - shops sell jewelry and may or may not be located inside or adjacent to the local [[gemshop]].
**[[:Category:Locksmith shops|'''Locksmith supplies''']] - shops that sell tools needs for [[Disarming Traps|disarming traps]] and [[Picking Locks|picking locks]].
**[[:Category:Magic shops|'''Magic supplies''']] - shops that sell a wide variety of items useful to all users of [[magic]], including [[enchanting potions]], [[Mortar and pestle|mortars and pestles]], and [[Imbed|imbeddable]] items.
**'''[[:Category:Post offices|Mailing supplies]]''' - shops that sell supplies for the [[mail system]] and allow characters to send mail from them.
**[[:Category:Ship shops|'''Ship upgrades''']] - shops that are used to upgrade ships used in [[Open Sea Adventures]].
**[[:Category:Tobacco shops|'''Tobacco''']] - shops that sell tobacco and smoking implements.
**[[:Category:Weapon shops|'''Weapons''']] - shops that sell [[melee]] weapons. Look in the cleric shops for [[Holy armament|holy armaments]].

*'''Addwares''' - Optional. This is to be used in conjunction with '''wares''' and will populate an additional entry into the introductory sentence, as well as an additional category. This is meant to be for shops that may sell two types of wares. The above list is the same.
*'''Specialty''' - Optional. This denotes specialized inventory, and is required if the shop is a specialty shop. However, it is optional for regular shops that have a more narrow scope of wares, such as a shop that sells shoes only.
*'''Addinfo''' - Optional. This allows for additional information regarding the shop to be entered into the introductory paragraph.
*'''Multiroom''' - Optional. This denotes if a shop has more than one room selling inventory. Any entry will populate a header for the first room only, as well as properly cascade any headers handled by the template. '''[[User:GS4-XERAPHINA/Town shops template testing#Multiple Room Shops|Additional rooms]]''' will need to be manually handled.
*'''Roomname''' - Required. This populates the room name in the room description portion of the template. If '''multiroom''' is used, the room name will automatically populate in the room's header.
*'''Desc''' - Required. This populates the description of the room in the room description portion of the template. When entering the description, please utilize the room's full day description.
*'''Rnum''' & '''Realrnum''' - Optional. These work with [[Lich:Software|Lich]] for directions. Rnum is the lich room id, while realrnum is the real room number.
*'''Exits''' & '''Paths''' - Optional. These are used to indicate available ("obvious") directions. Exits are only used for rooms that are considered inside, and paths are only used for rooms that are considered outside.
*'''[[User:GS4-XERAPHINA/Town shops template testing#Inventory|Inventory]]''' - Required. This displays the shop's inventory or menu when {{boldmono|ORDER}}ing or viewing a menu. This will not populate item information or pricing.
**In rare circumstances, there may be a permanent shop that does not utilize the {{boldmono|ORDER}} system. In these cases, the [[Template:Container2|container2]] template should be used, similar to how [[Gswiki:Style guide/Event shops|event shops]] handle the container.

===Copy/Paste Code===
<pre>{{Town shops
|type =
|realm =
|article =
|location =
|specialtyshop =
|wares =
|addwares =
|specialty =
|addinfo =
|multiroom =
|roomname =
|desc =
|rnum =
|realrnum =
|exits =
|paths =
|inventory =
|backroom
}}</pre>

==Inventory==
The '''inventory''' section of the template will allow for a significant amount of input to record the shop's inventory information, including space to create a table with [[User:GS4-XERAPHINA/Town shops template testing#Town Shop Inventory Tables|inventory table templates]], which allows for more in-depth item information and pricing, and to record inventory in [[User:GS4-XERAPHINA/Town shops template testing#Multiple Room Shops|multiple rooms]] of the shop.

===Template Entry ===
There are two types of inventory to enter into the inventory section, main inventory and backroom inventory. Main inventory is the inventory that is available to all customers, while backroom inventory is inventory that is only made available after a character has developed a sales relationship with the shop, i.e.. purchased enough items to be granted access to special merchandise.

====Main Inventory ====
Most shops utilize an {{Boldmono|ORDER}} and/or {{Boldmono|CUSTOMIZE}} system to view and purchase inventory. When inputting inventory from those shops into this parameter, the output from using these commands should be preceded by <code><nowiki><pre{{log2}}></nowiki></code> and end with <code><nowiki></pre></nowiki></code>. This will maintain the formatting as seen in the game window.

Additionally, this may optionally be followed by a table that details item information, including pricing. In order for the table to work within the template and the form, it must be set up using the table templates. To view information on how to do so, see [[User:GS4-XERAPHINA/Town shops template testing#Town Shop Inventory Tables|Town Shop Inventory Tables]].

====Backroom Inventory====
Backroom inventory should be set up separately on the wiki page from the main inventory as characters do not have immediate access to it.

The title "Backroom Inventory" should be used to label this section, and set up as <code><nowiki>===Subheader 3===</nowiki></code> in single room shops or <code><nowiki>====Subheader 4====</nowiki></code> in multiple room shops. Aside from that, it follows the same steps for entry as main inventory.

==Multiple Room Shops==
Some shops have multiple rooms with additional wares for sale. For ease of set up, the [[Template:Town shops addroom|town shops addroom]] template was created for quick copy and paste set up for each additional room. This template would need to be entered with applicable parameters filled in into the '''free text''' area of the form, or simply following the town shops template if not handling with the form. Parameters and instructions mirror those of the town shops template, with the exception of "'''Direction'''," which is used to indicate what direction the player must go from the indicated room to reach the next one (see [[Fluttering Myriad]] as one example).

=== Copy/Paste Code===
<pre>{{Town shops addroom
|direction =
|roomname =
|desc =
|rnum =
|realrnum =
|exits =
|paths =
|inventory =
|backroom =
}}</pre>

==Additional Guidelines==
The following sections cover additional and/or optional guidelines to consider for shop page creation or updates.

=== Town Shop Inventory Tables ===
As an ''optional'' step, a table can be created to immediately follow the copy and paste output of {{Boldmono|ORDER}}/menu in the '''inventory'''/'''backroom''' portion of the form or the '''town shop''' or '''town shop addroom''' template(s) in order to display the inventory's details and pricing. As regular tables will not work when entered into a template parameter, templates have been created in order to ensure consistent formatting of these tables, if used.

====Templates ====
The below templates can be used to create the inventory tables for shops.

*[[Template:Townshop table start|'''Townshop table start''']] - This template is used to begin and format the table. No additional parameters are required.
*[[Template:Townshop item|'''Townshop item''']] - This template is used to enter information into the table. This can be used multiple times within the table as it is limited to a single line of cells.
**'''Item#''' - Number of the item in the inventory/menu output.
**'''Item''' - This is the [[base description]] and/or [[long description]] of the item for sale.
**'''Type''' - This is the item's base type. Examples would be weapon base, armor, or if it is a magic item.
**'''Info''' - This is the item's [[inventory]] information, including weight, worn locations (if any), and if functional.
**'''Details''' - This is the item's details that do not otherwise fall under the other headers. This includes the item's [[Verb:ANALYZE|analyze]], if scripted, as well as other details such as customizations, if a magic item persists, etc. It is preferred, in lieu of a lengthy analyze, that an [[:Category:Items|item]] page is created and linked in this section, with the item's individual customizations, if any, displayed here.
***'''Taste1/2''' - If an item is a food or beverage item, the taste messaging can be input here.
**'''Price''' - This is the item's price.
*[[Template:Shop table end|'''Shop table end''']] - This template closes the table.

====Copy/Paste Code====
<pre><nowiki>{{Townshop table start}}
{{Townshop item | item# = | item = | type = | info = | details = | taste1 = | taste2 = | price = }}
{{shop table end}}
</nowiki></pre>

===Specialty design NPCs===
Some shops may have [[NPC|NPCs]] present that are able to customize items with a long description based on the item's material. For now, the customization offerings may be housed on these pages either following the inventory of the room the NPC is located in or after the room description if there is no inventory sold in that room (but sold in the shop). This information should begin with <code><nowiki><pre{{log2}}></nowiki></code> and end with <code><nowiki></pre></nowiki></code>. These guidelines are subject to change following review of NPCs overall.

===Previous Inventory===
Sometimes, a shop may be updated with a new room description and/or inventory. When this happens, only the current information should be on the main page for the shop. A subpage for the shop named "Previous inventory" should be created and the former information moved there. To ensure the previous information is accessible, a link can be created under the <code><nowiki>==Subheader 2==</nowiki></code> of "Previous Inventory" using <code><nowiki>{{Special:PrefixIndex/{{FULLPAGENAME}}/|stripprefix=yes|hideredirects=yes}}</nowiki></code>.

== Form & Templates ==
Form for town shop page creation or editing:

* [[Form:Town shop]]

Primary templates used with town shops are:

* [[Template:Town shops]]
* [[Template:Town shops addroom]]
* [[Template:Townshop table start]]
* [[Template:Townshop item]]
* [[Template:Shop table end]]

Latest revision as of 14:53, 25 April 2024

Town shops, formally known as NPC shops, are permanent shops that are located within towns, and offer a variety of goods for sale to players for silvers. These shops will typically utilize the ORDER verb in order to access the inventory, and may also utilize CUSTOMIZE for certain items, though some exceptions may occur. There may be some variation to how ORDER will work in these establishments.

Form

A semantic form has been created to make it easier for contributors to create and edit town shops as they are opened or updated and can be found here: Town Shop Form. The form uses the town shops template and is limited to a single room only, either as the single room in the shop or the first room. Additional formatting may be required beyond the parameters of the form and can be handled in the free text area of the form.

Page Name

The title of the article should reflect the full name of the shop, including the articles "a," "an," and "the," as that is the proper name of the shop. Utilizing {{DEFAULTSORT:(Shop name without article)}} at the end of the article will allow the shop to be properly sorted alphabetically. Ex. The Cultured Corsair would use {{DEFAULTSORT:Cultured Corsair, the}} to ensure correct alphabetization.

The name of the shop may not always match up with the name of the room. In instances such as this, the article name should reflect the name of the shop that appears when using ORDER, ex. Saphrie's Herbs and Tinctures is located in the Triage Station of Ta'Vaalor.

Town Shops Template

The town shops template is a required template for all town shops, and should be entered prior to the body of the article. Using this template will automatically assign the shop to the appropriate category and updates lists generated utilizing assigned properties on the applicable article pages. Additionally, it utilizes the room description template. As noted in the section regarding the town shop form, the template will only work for the main room in the shop. Additional formatting will be needed to include additional rooms or backroom merchandise, if offered.

Template Parameters

  • Types - Required. There are three main categories of town shops: inns, eateries, and shops.
    • An inn is a shop that typically sells food and/or beverages, but has the additional function of allowing characters to CHECK IN to the Character Manager. They may have latchable rooms or private tables, as well.
    • An eatery is a shop that sells food and/or beverages and offers a seating area, including private tables. For the sake of categorization, this does not include inns.
    • A shop is the general term used for a shop that sell goods but does not fall under the above two categories.
  • Realm - Required. This is based on the realm in which a shop is located, and is a separate parameter from location, which is used in conjunction with the realm if the shop is located in a settlement or hamlet outside of the main town.
  • Article- Optional. This to be used with location and any entry simply adds the article "the" in front of a location that typically uses it in its name, ex. the Ravelin.
  • Location - Optional. This can be used with realm and is meant to note shops that are located in a specific realm but outside of the main town.
  • Specialtyshop - Optional. This is used to denote shops that sell items that do not fall under one of the wares categories. Any entry will change the wording in the introductory sentence to "specializes in," as opposed to "sells" and will categorize the shop under specialty shops.
  • Wares - This is a required parameter in all but specialty shops. The following list details how a shop is categorized based on the wares it sells. Some shops may sell two types of wares, however those that sell more than two types of wares or a variety of goods would be considered a general store. The below list encompasses those categories that have a total number of five or more shops of the same type. Categories with four or fewer shops would fall under specialty shops. Additional categories may be added as new shops open, and can be updated through the shop wares property page. Doing so will automatically update the options in the town shop form.
  • Addwares - Optional. This is to be used in conjunction with wares and will populate an additional entry into the introductory sentence, as well as an additional category. This is meant to be for shops that may sell two types of wares. The above list is the same.
  • Specialty - Optional. This denotes specialized inventory, and is required if the shop is a specialty shop. However, it is optional for regular shops that have a more narrow scope of wares, such as a shop that sells shoes only.
  • Addinfo - Optional. This allows for additional information regarding the shop to be entered into the introductory paragraph.
  • Multiroom - Optional. This denotes if a shop has more than one room selling inventory. Any entry will populate a header for the first room only, as well as properly cascade any headers handled by the template. Additional rooms will need to be manually handled.
  • Roomname - Required. This populates the room name in the room description portion of the template. If multiroom is used, the room name will automatically populate in the room's header.
  • Desc - Required. This populates the description of the room in the room description portion of the template. When entering the description, please utilize the room's full day description.
  • Rnum & Realrnum - Optional. These work with Lich for directions. Rnum is the lich room id, while realrnum is the real room number.
  • Exits & Paths - Optional. These are used to indicate available ("obvious") directions. Exits are only used for rooms that are considered inside, and paths are only used for rooms that are considered outside.
  • Inventory - Required. This displays the shop's inventory or menu when ORDERing or viewing a menu. This will not populate item information or pricing.
    • In rare circumstances, there may be a permanent shop that does not utilize the ORDER system. In these cases, the container2 template should be used, similar to how event shops handle the container.

Copy/Paste Code

{{Town shops
|type =
|realm = 
|article =
|location =
|specialtyshop =
|wares = 
|addwares =
|specialty =
|addinfo =
|multiroom =
|roomname =
|desc =
|rnum =
|realrnum =
|exits = 
|paths =
|inventory =
|backroom
}}

Inventory

The inventory section of the template will allow for a significant amount of input to record the shop's inventory information, including space to create a table with inventory table templates, which allows for more in-depth item information and pricing, and to record inventory in multiple rooms of the shop.

Template Entry

There are two types of inventory to enter into the inventory section, main inventory and backroom inventory. Main inventory is the inventory that is available to all customers, while backroom inventory is inventory that is only made available after a character has developed a sales relationship with the shop, i.e.. purchased enough items to be granted access to special merchandise.

Main Inventory

Most shops utilize an ORDER and/or CUSTOMIZE system to view and purchase inventory. When inputting inventory from those shops into this parameter, the output from using these commands should be preceded by <pre{{log2}}> and end with </pre>. This will maintain the formatting as seen in the game window.

Additionally, this may optionally be followed by a table that details item information, including pricing. In order for the table to work within the template and the form, it must be set up using the table templates. To view information on how to do so, see Town Shop Inventory Tables.

Backroom Inventory

Backroom inventory should be set up separately on the wiki page from the main inventory as characters do not have immediate access to it.

The title "Backroom Inventory" should be used to label this section, and set up as ===Subheader 3=== in single room shops or ====Subheader 4==== in multiple room shops. Aside from that, it follows the same steps for entry as main inventory.

Multiple Room Shops

Some shops have multiple rooms with additional wares for sale. For ease of set up, the town shops addroom template was created for quick copy and paste set up for each additional room. This template would need to be entered with applicable parameters filled in into the free text area of the form, or simply following the town shops template if not handling with the form. Parameters and instructions mirror those of the town shops template, with the exception of "Direction," which is used to indicate what direction the player must go from the indicated room to reach the next one (see Fluttering Myriad as one example).

Copy/Paste Code

{{Town shops addroom
|direction = 
|roomname =
|desc =
|rnum =
|realrnum =
|exits = 
|paths =
|inventory =
|backroom = 
}}

Additional Guidelines

The following sections cover additional and/or optional guidelines to consider for shop page creation or updates.

Town Shop Inventory Tables

As an optional step, a table can be created to immediately follow the copy and paste output of ORDER/menu in the inventory/backroom portion of the form or the town shop or town shop addroom template(s) in order to display the inventory's details and pricing. As regular tables will not work when entered into a template parameter, templates have been created in order to ensure consistent formatting of these tables, if used.

Templates

The below templates can be used to create the inventory tables for shops.

  • Townshop table start - This template is used to begin and format the table. No additional parameters are required.
  • Townshop item - This template is used to enter information into the table. This can be used multiple times within the table as it is limited to a single line of cells.
    • Item# - Number of the item in the inventory/menu output.
    • Item - This is the base description and/or long description of the item for sale.
    • Type - This is the item's base type. Examples would be weapon base, armor, or if it is a magic item.
    • Info - This is the item's inventory information, including weight, worn locations (if any), and if functional.
    • Details - This is the item's details that do not otherwise fall under the other headers. This includes the item's analyze, if scripted, as well as other details such as customizations, if a magic item persists, etc. It is preferred, in lieu of a lengthy analyze, that an item page is created and linked in this section, with the item's individual customizations, if any, displayed here.
      • Taste1/2 - If an item is a food or beverage item, the taste messaging can be input here.
    • Price - This is the item's price.
  • Shop table end - This template closes the table.

Copy/Paste Code

{{Townshop table start}}
{{Townshop item | item# =  | item =  | type =  | info = | details =  | taste1 =  | taste2 =  | price = }}
{{shop table end}}

Specialty design NPCs

Some shops may have NPCs present that are able to customize items with a long description based on the item's material. For now, the customization offerings may be housed on these pages either following the inventory of the room the NPC is located in or after the room description if there is no inventory sold in that room (but sold in the shop). This information should begin with <pre{{log2}}> and end with </pre>. These guidelines are subject to change following review of NPCs overall.

Previous Inventory

Sometimes, a shop may be updated with a new room description and/or inventory. When this happens, only the current information should be on the main page for the shop. A subpage for the shop named "Previous inventory" should be created and the former information moved there. To ensure the previous information is accessible, a link can be created under the ==Subheader 2== of "Previous Inventory" using {{Special:PrefixIndex/{{FULLPAGENAME}}/|stripprefix=yes|hideredirects=yes}}.

Form & Templates

Form for town shop page creation or editing:

Primary templates used with town shops are: