Template:StoreLine/doc

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to navigation Jump to search
This is a documentation subpage for Template:StoreLine.
It contains usage information, categories, and other content that is not part of the original template page.
Template:StoreLine invokes function main in Module:StoreLine using Lua.

The StoreLine template is used to fill out tables commonly used in Shops to provide a listing of items that are found in that shop. It also helps to provide a uniform look of how the shop information is presented for all articles about shop on the wiki.

Note: Currency can be set in the {{StoreTableHead}} for the whole table. For stores in the Arc (buying/selling items for Chimes with upgrade-able buy prices) set Arc=true in the {{StoreTableHead}}

Blank template

{{StoreLine|name=|stock=|sell=|buy=}}
{{StoreLine|name=|stock=|sell=|buy=|gemw=no|image=}}
{{StoreLine|name=|stock=|sell=|buy=|pack=|packnum=|gemw=no|image=}}
{{StoreLine|name=|stock=|sell=|buy=|gemw=no|alch=no|image=}}

Usage

The StoreLine templates are used to list a store's stock. Three templates are used to form the stock table:

  • {{StoreTableHead}} - Contains table headers for the top of the store stock table
  • {{StoreLine}} - Template for each line item in the store
  • {{StoreTableBottom}} - Contains bottom of the table and the reference list for the store stock table

For example:

{{StoreTableHead}}
{{StoreLine|Name=Empty pot|Stock=30|Sell=1|Buy=0}}
{{StoreLine|Name=Empty pot|DisplayName=Another empty pot|Stock=30|Sell=1|Buy=0}}
{{StoreLine|Name=Jug|Stock=10|Sell=1|Buy=0}}
{{StoreLine|Name=Shears|Stock=10|Sell=1|Buy=0}}
{{StoreLine|Name=Tinderbox|Stock=10|Sell=1|Buy=0}}
{{StoreLine|Name=Firemaking cape|Stock=1|Sell=99000|Buy=|gemw=no|Image=Firemaking cape.png}}
{{StoreLine|Name=Summoning cape|Stock=1|Sell=99000|Buy=|gemw=no}}
{{StoreLine|Name=Fruit Blast|Stock=0|Sell=30|Buy=10|Currency=trading sticks}}
{{StoreTableBottom}}

gives

Parameters

For simplicity, the following sections describe only the most common scenarios of a single type of item being sold (or brought) in each row of a store page. For certain special cases, please refer to subsequent sections.

Unless otherwise stated, all parameters are optional.

Item name

  • name: (required, alternatively text) the item name (should be its exact pagename)
  • text: (required, alternatively name) the text of the item, when there is no article linking to the item
  • displayname: a display name that overrides the original item name (i.e. [[name|displayname]]), it should be used when the storefront shows different name to the article
  • gemwname: the exchange name for this item (or the RS Wiki page name with #variant if the item is not traded on the GE) if not that same as name
  • bucketname: the name used in Bucket

Item image

  • image: default to File:[text or name].png if the parameter is not specified; it will use File:[image] to display the item image if the parameter is specified; the parameter must include extension (e.g. .png)
    • The image size should be provided in this format: [image path]{{!}}[image size] (i.e. to resize the image to 25 pixels by 25 pixels, add this at the end: {{!}}25x25px)

Stock

  • stock: (required) number/string of items that are typically found in the shop before a player buys or sells those items.
    • Limited stock, may be replenished: 0 or positive number
    • Infinite stock: inf (recommended), infinite,
    • No stock available: n/a (recommended), N/A
    • Available if not owned: unique
    • Limited stock available if not owned: [number] (unique) (e.g. 9 (unique))

Item pack

Item pack, not item set.

  • pack: if this item is a pack of items, the name of the items contained in the pack (should be the exchange name)
  • packnum: the number of items in the pack (defaults to 50)

Multiple items or noted items per purchase

  • quantity: quantity of items purchased each time, default to 1
    • Append  (noted) if they are noted

Price

  • sell: price from which a shop will sell this item to a player for the first item.
  • buy: price at which a shop will buy the first item from a player, if the shop is at the default or typical stock quantity.
  • currency: the currency of the buy and sell price of the item from the store. It overrides a currency set in the {{StoreTableHead}}. The buying and selling prices are always denominated in the same currency. Default value is coins.

Price format

All price are preset to none (i.e. they are neither sold nor brought from players)

  • Preset price: positive number, without considering discounts
  • Free: free, some stores will display "free" even if there are other additional conditions
  • 0 as display value: 0. This is a special case due to the user interface display. In most cases, it is not recommended to use.
  • Not available to buy or sell in all situations: n/a (recommended), none, not sold, not bought. Do not set this value if it is unavailable due to additional requirements.
    • For stores that don't stock inventory (e.g. Marketplace), buy=n/a is a common practice.

GE price and resale value

The exchange name for this item is mentioned earlier.

The "GE price" column displays the "alternative value" (if set), then displays the item's GE guide price (if any), then displays the item's High Level Alchemy value (if any). The GE guide price and alchemy value must be expressed in coins.

The "Resale value" column displays the total price of the items when the entire batch of inventory is sold to GE or alchemised, or, if an "alternative value" is set, the unit price of the "alternative value".

  • altvalue: an alternate value for the item, overriding GE guide price and High Level Alchemy value. Since this is a simple value, please do not enter any value calculated through complex formulas. You also cannot add annotations next to this value.
  • altcurrency: the currency for the altvalue
  • gemw=no: for items not tradeable in the Grand Exchange
  • alch=no: for items that cannot be alchemised

Description

For simplicity, the description on the store page is exactly the same as the in-game description. Other "remarks" or "notes" should be placed in a separate "custom" column (e.g. column1=This is an item remarks.).

Set descriptions=yes in {{StoreTableHead}} to display this description.

  • description: The description to show in the description column.
  • unlock-hint: This description may be displayed when you do not meet the requirements. It may appear as a hover tooltip or as red text below the description.

Requirements

Use ; (default value of separator) to separate the requirements if needed. It only accepts the complete name and cannot include other descriptions.

  • members: yes or no (defaults to no), defines if item in store is p2p or members, only works with hidemembers=no set on {{StoreTableHead}}
  • ironmen: yes, no, or only (defaults to no), defines if item in store is available to ironmen, only works with hideironmen=no set on {{StoreTableHead}}
  • skill[number]: The format is skill[number]=[skill name],[skill level]. Set only when the skill requirement is a direct requirement on the store page; indirect skill requirements of the required quests or achievements are not accepted (e.g. skill1=Dungeoneering,30, skill2=Summoning,50).
  • Based on quest condition
    • quest: Set whether a quest needs to be completed.
    • quest-partial: Set whether a quest needs to be partially completed (aka "started").
    • quest-during: Set whether the stock is only available during a quest.
    • quest-before: Set whether the stock is only available before a quest is partially completed (aka "started").
  • Based on achievement condition, including area tasks
    • achievement: Set whether an achievement needs to be completed.
    • achievement-before: Set whether the stock is only available before an achievement is completed. This is most likely for handling discount matters.
  • Based on some items (The broader concept of "items", including overrides, interface pets, titles, etc. In this context, you can understand it as "property".)
    • purchased: Based on the purchased item, purchasable unlocks, upgrades, and rewards
    • obtained: Based on the obtained item, e.g. mask of gu, dungeoneering outfit piece
    • carrying: Based on the item you are carrying in the backpack, e.g. logs for campfire. This is likely intended for handling matters related to "item recipe". It is not recommended to consider using it from the outset.
    • equipped: Based on the equipped item, e.g. ring of charos
  • Miscellaneous requirements for certain special cases. It is not recommended to consider using it from the outset.
    • misc: The format is misc=[text]. It will be overridden by the next parameter.
    • misc[number]: The format is misc[number]=[text]. This parameter can be used when there are multiple miscellaneous requirements.

Multiple items per line

When each store row has multiple items, use ; (the default value for separator) to separate the specific set of parameters. It projects other common attribute onto each item.

The supported parameters are as follows:

  • name: The format is name=[item1];[item2].
  • gemwname: The format is gemwname=[item1];[item2].
  • bucketname: The format is bucketname=[item1];[item2].
  • quantity: The format is quantity=[item1];[item2].

Multiple currency per line

When each store row has multiple currency, use ; (the default value for separator) to separate the specific set of parameters. It projects other common attribute onto each item.

The supported parameters are as follows:

  • sell: The format is sell=[currency1];[currency2].
  • buy: The format is buy=[currency1];[currency2].
  • currency: The format is currency=[currency1];[currency2].

Item recipe

Due to legacy reasons, if an item can be converted into an "item recipe", the item's data will not be output to the Bucket.

  • recipe: If specified, a short text will be added below the item name containing the set recipe value, (e.g. (Converting something)). Also, it will suppress the output of data to the Bucket.

Random item

Due to historical reasons, if an item has a certain chance of being "dropped" or "rewarded", the item will be displayed under the drop source by using {{DropsLine}}. It should not be used to handle the case of "drawing without replacement" (the number of items in the pool is limited).

  • random: If specified, the value will be used as a "variant" of the drop source; the sell and currency will constitute the "level" of the drop source. It must be used with {{DropsLineStore}}.

Since this value will be used as a "variant", the drop source will be linked to the article via an anchor. It is recommended to add a new section with the same title as this value within the same article to document the drops or rewards.

Upgrade without consuming currency

In certain special circumstances, the store will not consume currency when you unlock or purchase items, for example Rewards (Livid Farm).

  • threshold: yes or no (defaults to no), used for situations where line-by-line overwrite settings are required. For the entire table, set threshold=yes on {{StoreTableHead}}.

Instructions on how to start purchasing

Normally, the way to buy items or open a shop is to select the "Trade" option on the NPC. In some cases, you need to purchase items through dialogue or different "right-click" options. Do not put common options in these parameters. These parameters are mostly likely used on NPC pages.

  • chat: Used in conjunction with {{chat options}}, it indicates the chat options in the dialogue box.
  • option: Used to indicate the "right-click" option.

Notes displayed below the item name only on the store page

The following data will not be output to the Bucket.

  • feature: yes or no (defaults to no). This indicates that it is just a feature unlock and you will not gain or lose any items (except currency).
  • piece: Used to display a random item from a set/series of collections, usually guaranteed not to be purchased again after ownership. If specified, a short text will be added below the item name containing the set piece value, (e.g. (Head)).
  • actual: yes or no (defaults to no), available on {{StoreTableHead}} only. Used to display actual items in the rows. If specified, a short text will be added below the item name containing the set piece value, (e.g. (Actual: Fishing rod)). It is not recommended to consider using it from the outset.
  • column[number]: Used in conjunction with the parameters column[number] in {{StoreTableHead}} to display extra columns. Setting it to N/A or not setting any value will display "N/A".

Wiki Bucket output

Each line of data will be output to Bucket:Storeline.

  • bucket: If this value exists (the specific value is not important), the bucket output of this item will be suppressed, but auxiliary data will still be output. This will prevent the item from being added to store lists generated by {{Store locations list}}.
  • historical: yes or no (defaults to no). This indicates that it was available before.
  • variant: Used to specify variants (aka "page_name_sub") of an item
  • version: Used to specify variants (aka "page_name_sub") of the store, used in conjunction with other templates like {{Store locations list}} to specify the shop location or shop variant. The data is in unnormalized form. Split by ,.
  • dropversion: Used to specify variations (aka "page_name_sub") of the drop source, used in conjunction with other templates like {{DropsLineStore}} to specify the drop source on the same article. The sell and currency will constitute the "level" of the drop source.

Lighttable feature

  • highlight: yes or no (defaults to yes). If the Lighttable feature should not be used in this line, set it to no
  • id: Used for Lighttable feature to indicate a unique ID

Separator

  • separator: defaults to ;. The parameters covered by the separator are mentioned above.

Deprecated

The following parameters will not work.

  • namenotes
  • buynotes
  • sellnotes

See also

Template data

Show/hide template's data

The following information is used by extensions and applications, such as VisualEditor, to help users implement this template onto pages. Please ensure that it is up-to-date.

Template for generating tables of items sold by shops.

Template parameters

This template has custom formatting.

ParameterDescriptionTypeStatus
Namename

Name of item as it appears on page.

Example
Empty pot
Page namerequired
Display Namedisplayname

The name of the item to display

Example
Another Empty pot
Stringoptional
Name Notesnamenotes

Notes added to the item name without disrupting GE price; refs should be in the <code>s</code> group.

Contentoptional
Base Stockstock

The number of items typically found in the shop before any are bought/sold. Use inf for infinity.

Example
10 or 'inf'
Numberrequired
Sell Pricesell

The price the store buys the item for.

Example
10 or "not sold"
Stringrequired
Buy Pricebuy

The price the store buys the item for.

Example
10 or "not bought"
Stringsuggested
Store Currencycurrency

The currency the store buys/sells the item in. This is the currency of the price.

Default
Coins
Example
Trading sticks
Stringoptional
Packpack

If the item is a pack, the name of the items contained in the pack.

Example
Basket
Stringoptional
Pack Sizepacknum

The number of items in a pack.

Default
50
Example
5000
Numberoptional
GE Namegemwname

The general exchange name of the item if different from Name.

Example
Empty pot
Stringoptional
Traded on GEgemw

Whether or not the item is traded on the general exchange

Default
true
Example
false
Booleanoptional
Alchemisablealch

Whether or not the item can be alchemised

Default
true
Example
false
Booleanoptional
Alternate Valuealtvalue

An alternate value if the item is not traded on the GE and cannot be alched

Example
50
Numberoptional
Alternate Value Currencyaltcurrency

The currency that the Alternate Value is in if provided

Default
Coins
Example
Trading sticks
Stringoptional
Imageimage

An image for the item if one cannot be found or to override the default image.

Example
Empty pot.png
Stringoptional
Bucketbucket

Set to 'No' to surpress the Bucket output. This will prevent the item from being added to store lists generated by [[Template:Store locations list]].

Default
nil
Example
no
Stringoptional
Descriptiondescription

The description to show in the description column. Requires the descriptions to be set to be shown in [[Template:StoreTableHead]].

Default
nil
Example
yes
Stringoptional