Template:ShopItem: Difference between revisions

From Zelda Wiki, the Zelda encyclopedia
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 5: Line 5:
<includeonly><onlyinclude>|-
<includeonly><onlyinclude>|-
| data-sort-value="{{{2|}}} ×{{{quantity|1}}}" | {{#ifeq: {{lc:{{{img|}}}}} | none || [[File:{{{img|{{{1|}}} {{{2|}}} {{{typeimg|Sprite}}}.png}}}|x32px]]<br>}}'''[[{{{2|}}}|{{{dispname|{{{2|}}}}}}]] {{#ifexpr: {{{quantity|1}}} > 1 | ({{{quantity|0}}}) }}''' {{#if: {{{note|}}} | {{Exp|{{{note|}}} }} }} {{#if: {{{stock|}}} | {{Exp|Only {{{stock|}}} in stock}} }}
| data-sort-value="{{{2|}}} ×{{{quantity|1}}}" | {{#ifeq: {{lc:{{{img|}}}}} | none || [[File:{{{img|{{{1|}}} {{{2|}}} {{{typeimg|Sprite}}}.png}}}|x32px]]<br>}}'''[[{{{2|}}}|{{{dispname|{{{2|}}}}}}]] {{#ifexpr: {{{quantity|1}}} > 1 | ({{{quantity|0}}}) }}''' {{#if: {{{note|}}} | {{Exp|{{{note|}}} }} }} {{#if: {{{stock|}}} | {{Exp|Only {{{stock|}}} in stock}} }}
{{#if: {{{desc|}}} | {{!}} style="text-align:left" {{!}} "''{{{desc|{{{6|}}}}}}''"}}
{{#if: {{{desc|}}} | {{!}} style="text-align:left" {{!}} ''{{{desc|{{{6|}}}}}}''}}
| data-sort-value={{{3|N/A}}} | {{#iferror: {{#expr: 1 + {{{3|N/A}}} }} | '''{{{3|N/A}}}''' | {{Rupee|{{{1|}}}|{{{3|0}}}}} }}
| data-sort-value={{{3|N/A}}} | {{#iferror: {{#expr: 1 + {{{3|N/A}}} }} | '''{{{3|N/A}}}''' | {{Rupee|{{{1|}}}|{{{3|0}}}}} }}
{{#if: {{{4|}}} |{{!}} data-sort-value{{=}}{{{4}}} {{!}} {{#iferror: {{#expr: 1 + {{{4|N/A}}} }} | '''{{{4|N/A}}}''' | {{Rupee|{{{1|}}}|{{{4|0}}}}} }}
{{#if: {{{4|}}} |{{!}} data-sort-value{{=}}{{{4}}} {{!}} {{#iferror: {{#expr: 1 + {{{4|N/A}}} }} | '''{{{4|N/A}}}''' | {{Rupee|{{{1|}}}|{{{4|0}}}}} }}

Revision as of 09:45, 2 May 2017

Item Price

Bomb


Purpose

A template for creating tables for items sold in shops.

Usage

    {{ShopItem|game |item |price |price2 |price3 |price4 |quantity |stock |typeimg |desc |dispname |note |img }}

  • game — The game's abbreviation
  • item — The item sold
  • price — The item's price
  • price2 — The item's price for the second column (requires a table with multiple columns)
  • price3 — The item's price for the third column (requires a table with multiple columns)
  • price4 — The item's price for the fourth column (requires a table with multiple columns)
  • quantity — Quantity of item sold.
  • stock — The maximum amount of the item available in the shop.
  • typeimg — The type of image for the item (e.g. Sprite, Icon, Model), defaults to Sprite
  • desc — The item's description from the in-game shop (requires "desc" parameter to be enabled in "ShopItem/h")
  • dispname — Display name of the item (item is still used to determine link and image)
  • note — For adding a note next to the item's name
  • img — Overrides image with image at specified filename. Setting this value to "None" (case insensitive) causes no image to be displayed.

Note: This template must be enclosed between a Template:Tl and a Template:Tl template (see example code below).

Examples

Basic

How to use a Sprite, an Icon, a Model or an Artwork.

{{ShopItem/h}}
{{ShopItem|TLoZ|Bomb|100}}
{{ShopItem|MM3D|Bomb|100|typeimg=Icon}}
{{ShopItem|TP|Bomb|100|typeimg=Model}}
{{ShopItem|ALttP|Bomb|100|typeimg=Artwork}}
|}
Item Price

Bomb
100 Rupees

Bomb
100 Rupees

Bomb
100 Rupees

Bomb
100 Rupees

Alternative Display Name, Stock and Note

For when the shop sells an item with a different shop name to the item's article title. This is useful when the item name should be in plural.

{{ShopItem/h}}
{{ShopItem|TLoZ|Bomb|100|stock=3}}
{{ShopItem|TLoZ|Bomb|100|note=This is a note}}
{{ShopItem|TLoZ|Bomb|100|quantity=10|dispname=Bombs}}
{{ShopItem|TLoZ|Bomb|100|dispname=Cool Bomb}}
|}
Item Price

Bomb
100 Rupees

Bomb
100 Rupees

Bombs (10)
100 Rupees

Cool Bomb
100 Rupees

Alternative Image

For when the item's image does not match the systematic filename yielded by the template. Although this is possible, it should only be done if the item is already uses the recommended filename structure and that name is incompatible with this template. It is also possible to use no image at all by assigning the "img" parameter the value of "NONE" (case insensitive).

{{ShopItem/h}}
{{ShopItem|ALttP|Bomb|100|img=Bombs ALttP.png}}
{{ShopItem|ALttP|Bomb|100|img=none}}
{{ShopItem|OoT3D|Bomb|100|typeimg=Icon|img=MM3D Bomb Icon.png}}
{{ShopItem|MM3D|Bomb|100|typeimg=Icon}}
|}
Item Price
File:Bombs ALttP.png
Bomb
100 Rupees
Bomb
100 Rupees

Bomb
100 Rupees

Bomb
100 Rupees

Multiple Columns & N/A Price

For creating tables with multiple types of prices and including items that can't be sold for some or prices that varies.

{{ShopItem/h|3|Regular|Discount #1|Discount #2}}
{{ShopItem|TLoZ|Bomb|N/A|105|35}}
{{ShopItem|TLoZ|Bomb|50|80|65}}
{{ShopItem|TLoZ|Bomb|40|N/A|N/A}}
{{ShopItem|TLoZ|Bomb|N/A|10|35}}
|}
Item Prices
Regular Discount #1 Discount #2

Bomb
N/A
105 Rupees

Bomb

Bomb
N/A N/A

Bomb
N/A

Descriptions

For adding descriptions to an item.

{{ShopItem/h|3|Regular|Discount #1|Discount #2|desc=yes}}
{{ShopItem|TLoZ|Bomb|desc=This is a Bomb.|N/A|105|N/A}}
|}
Item Description Prices
Regular Discount #1 Discount #2

Bomb
This is a Bomb. N/A
105 Rupees
N/A