Difference between revisions of "Template:Price"

From Stardew Valley Wiki
Jump to navigation Jump to search
(Added support for changing the gold icon. Useful for representing other currencies such as the Journey of the Prairie King coins and possibly Qi coins.)
(Changed linking to a custom icon to specifying a coin type, i.e. JOPK, Qi, to simplify template use. I hope someone who's better at wiki than me can come up with a better solution than nested if statements...)
Line 1: Line 1:
<includeonly><span class="sortkey" style="display:none;">{{#len:{{{1|}}}}}{{{1|}}}</span>{{{icon|[[File:Gold.png|24px|link=]]}}}{{{1|}}}g</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
+
<includeonly><span class="sortkey" style="display:none;">{{#len:{{{1|}}}}}{{{1|}}}</span>
 +
{{#ifeq: {{{2}}} | Qi | [[File:QiCoin.png|link=]] | {{#ifeq: {{{2}}} | JOPK | [[File:JOPKCoin1.png|link=]] | [[File:Gold.png|24px|link=]]}}}}{{{1|}}}g</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>

Revision as of 03:41, 20 March 2016

Description

This template is used to insert the game's currency symbols in-line with text and the language-appropriate symbol after the amount.

To display the price for items with different quality stars, use Template:Qualityprice instead.

Parameters

Parameter Notes
First (unnamed) parameter The price to display, in raw numbers (e.g., 1 million should be entered as 1000000)
Second (unnamed) parameter The type of currency to use.
Valid values: nothing (default), JOPK, Qi, Token, Walnut, Gem, Calico

Examples

Template Call Result
{{Price|1000}}

Gold.png1000g

{{Price|1000|JOPK}}

JOPKCoin1.png1000g

{{Price|1000|Qi}}

QiCoin.png1000g

{{Price|1000|Token}}

Gold.png1000g

{{Price|1000|Walnut}}

Gold.png1000g

{{Price|1000|Gem}}

Gold.png1000g

{{Price|1000|Calico}}

Gold.png1000g