Jump to content

Template:Qualityprice/doc: Difference between revisions

From Stardew Valley Wiki
imported>Margotbean
Template:Quality can't handle 64px
imported>Margotbean
Undo revision 46590 by Margotbean (talk) Turns out it can handle 64px even though it says it can't....
Line 18: Line 18:
; iridium quality: (optional) If this unnamed parameter exist, iridium quality will be added.
; iridium quality: (optional) If this unnamed parameter exist, iridium quality will be added.
; hide: (optional) Any quality listed here will hide that quality. Specifying iridium here and in the third parameter will result in an error.
; hide: (optional) Any quality listed here will hide that quality. Specifying iridium here and in the third parameter will result in an error.
; size: (optional) Size of item image in pixels (16, 32, 48).  Default is 24.
; size: (optional) Size of item image in pixels (16, 32, 48, 64).  Default is 24.


===Example===
===Example===

Revision as of 09:55, 3 March 2017

Description

This template is used to provide a template that takes the base cost of each item, calculates the silver and gold quality costs, and displays it in a table. The cost calculation is silver=(basecost)*1.25 and gold=(basecost)*1.50. It always truncates the fraction (rounds down for positive numbers and up for negative numbers).

Note that this intentionally doesn't show the money icon as to not clutter the page with multiple icons.

Additionally, a sortkey is provided allowing correct sorting in tables where a column contains multiple instances of this template.

Usage

This template can be used by entering the following onto a relevant page.

{{Qualityprice|item name|item base cost}}
{{Qualityprice|item name|item base cost|iridium quality|hide|size}}

parameters

item name
This unnamed parameter accepts an item name.
item base cost
This unnamed parameter accepts the item's base cost.
iridium quality
(optional) If this unnamed parameter exist, iridium quality will be added.
hide
(optional) Any quality listed here will hide that quality. Specifying iridium here and in the third parameter will result in an error.
size
(optional) Size of item image in pixels (16, 32, 48, 64). Default is 24.

Example

{{Qualityprice|Pumpkin|100}}

data-sort-value="100"

100g
125g
150g
200g
{{Qualityprice|Leek|60|iridium}}

data-sort-value="60"

60g
75g
90g
120g
{{Qualityprice|Apple|42|iridium|hide=gold,silver|size=48}}

data-sort-value="42"

42g
84g
{{Qualityprice|Apple|42|iridium|hide=silver,iridium}}

data-sort-value="42"

42g
63g