Difference between revisions of "Template:Tprice"

From Stardew Valley Wiki
Jump to navigation Jump to search
(update template to use module)
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|{{price|{{#ifeq:{{{1|}}}|furniture|
+
<includeonly>{{#if:{{{1|}}}
250-2500
+
|<span style="display: none;">data-sort-value="{{{1|}}}"</span><!--
|
+
-->{{#invoke:Tcartprice|tprice
{{#ifeq:{{{math|}}}|false|{{{1|}}}|{{#expr:
+
|price = {{{1|}}}
    {{#ifexpr:100>{{{1|}}}*3|
+
|separator = –
        100
+
|gold = g
        |
+
|spacearoundseparator = false
        {{{1|}}}*3
+
}}
    }}
+
|}}</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
    }}-{{#expr:
 
    {{#ifexpr:1000>{{{1|}}}*5|
 
        1000
 
        |
 
        {{{1|}}}*5
 
    }} }} }} }} }} }}
 
</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
 

Latest revision as of 17:55, 18 June 2023

Tprice is used to calculate the traveling cart price from the base price of an item. This template also adds a gold coin icon and a language-appropriate symbol for gold.

Examples

{{Tprice|2}}

data-sort-value="2"Gold.png100–1,000g

{{Tprice|225}}

data-sort-value="225"Gold.png675–1,125g

{{Tprice|1000000}}

data-sort-value="1000000"Gold.png3,000,000–5,000,000g

{{Tprice|furniture}}

data-sort-value="furniture"Gold.png250–2,500g