Template:Price: Difference between revisions

From Dreamlight Valley Wiki
Jump to navigation Jump to search
(Remove cleanup tag (have cleaned up!))
No edit summary
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><span id="nametemplate" style="font-weight: normal;" class="no-wrap" data-sort-value="{{#ifeq:{{{sortkey}}}|||{{#ifeq:{{{sortkey|true}}}|true|{{#iferror:{{#expr:{{{1|0}}}>1}}|0|{{#expr:{{{1|}}}}}}}|{{{sortkey}}}}}}}">{{#iferror:{{#expr:{{{1|0}}}>1}}|{{{1|}}}|{{#switch:{{lc:{{{2|}}}}}
<includeonly><span id="nametemplate" style="font-weight: normal;" class="no-wrap" data-sort-value="{{#ifeq:{{{sortkey}}}|||{{#ifeq:{{{sortkey|true}}}|true|{{#iferror:{{#expr:{{{1|0}}}>1}}|0|{{#expr:{{{1|}}}}}}}|{{{sortkey}}}}}}}">{{#iferror:{{#expr:{{{1|0}}}>1}}|{{{1|}}}|{{#switch:{{lc:{{{2|}}}}}
|pixartoken=[[File:Pixar Token_icon.png|20px|link=Pixar Fest Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Pixar Fest Star Path|Event Tokens]]|}}
|pixartoken=[[File:Pixar Token_icon.png|20px|link=Pixar Fest Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Pixar Fest Star Path|Tokens]]|}}
|villaintoken=[[File:Villains_Token.png|20px|link=Villains' Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Villains' Star Path|Villains' Tokens]]|}}
|villaintoken=[[File:Villains_Token.png|20px|link=Villains' Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Villains' Star Path|Pumpkin Tokens]]|}}
|festivetoken=[[File:Festive_Token.png|20px|link=Festive Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Festive Star Path|Festive Tokens]]|}}
|festivetoken=[[File:Festive_Token.png|20px|link=Festive Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Festive Star Path|Gift Tokens]]|}}
|centennialtoken=[[File:Centennial_Token.png|20px|link=Centennial Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Centennial Star Path|Mickey Tokens]]|}}
|centennialtoken=[[File:Centennial_Token.png|20px|link=Centennial Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Centennial Star Path|Mickey Tokens]]|}}
|parkstoken=[[File:Parks_Token.png|20px|link=Disney Parks Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Disney Parks Star Path|Parks Tokens]]|}}
|parkstoken=[[File:Parks_Token.png|20px|link=Disney Parks Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Disney Parks Star Path|Parks Tokens]]|}}
|wonderpixartoken=[[File:Wonder of Pixar Token.png|20px|link=The Wonder of Pixar Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[The Wonder of Pixar Star Path|Event Tokens]]|}}
|wonderpixartoken=[[File:Wonder of Pixar Token.png|20px|link=The Wonder of Pixar Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[The Wonder of Pixar Star Path|Pixar Tokens]]|}}
|hauntedtoken=[[File:Haunted Token.png|20px|link=Haunted Holiday Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Haunted Holiday Star Path|The Nightmare Before Christmas Lollipop Tokens]]|}}
|royalwintertoken=[[File:Royal Winter Token.png|20px|link=Royal Winter Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Royal Winter Star Path|Royal Winter Tokens]]|}}
|monstertoken=[[File:Lovely Monsters Token.png|20px|link=Lovely Monsters Star Path]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Lovely Monsters Star Path|Scream Canister Tokens]]|}}
|pixeldust=[[File:Pixel_Dust_icon.png|20px|link=]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Pixel Dust]]|}}
|pixeldust=[[File:Pixel_Dust_icon.png|20px|link=]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Pixel Dust]]|}}
|moonstone=[[File:Moonstone_icon.png|20px|link=]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Moonstone]]s|}}
|moonstone=[[File:Moonstone_icon.png|20px|link=]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Moonstones]]|}}
|energy=[[File:Energy.png|20px|link=]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Energy]]|}}
|energy=[[File:Energy.png|20px|link=]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Energy]]|}}
|dreamlight=[[File:Dreamlight.png|20px|link=]] [[Dreamlight|'''{{formatnum:{{{1|}}}}}''']] {{#ifeq:{{{3|}}}|showLabel|[[Dreamlight]]|}}
|dreamlight=[[File:Dreamlight.png|20px|link=]] [[Dreamlight|'''{{formatnum:{{{1|}}}}}''']] {{#ifeq:{{{3|}}}|showLabel|[[Dreamlight]]|}}
|friendship=[[File:Friendship.png|20px|link=]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Friendship]]|}}
|friendship=[[File:Friendship.png|20px|link=]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Friendship]]|}}
|#default=[[File:Star_Coin_icon.png|20px|link=]] {{#if:{{{1|}}}|'''{{formatnum:{{#expr:{{{1|}}}}}}}'''}} {{#ifeq:{{{3|}}}|showLabel|[[Star Coins]]|}}}}}}</span></includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
|mist=[[File:Mist.png|20px|link=]] '''{{formatnum:{{{1|}}}}}''' {{#ifeq:{{{3|}}}|showLabel|[[Mist]]|}}
|#default=[[File:Star_Coin_icon.png|20px|link=]] {{#if:{{{1|}}}|'''{{formatnum:{{#expr:{{{1|}}}}}}}'''}} {{#ifeq:{{{2|}}}|showLabel|[[Star Coins]]|}}}}}}</span></includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>

Revision as of 17:53, 8 March 2024

Description

This template is used to insert a value and an icon corresponding to an item of value, usually currency, inline with text. It can be used both when the value is given to the player ("reward"), as well as when the value is at a cost to the player ("price").

Usage

In its most basic form, this template can be used by entering the following onto a relevant page:

{{price|<<amount>>}}

The amount should be provided as a simple number, with no commas or templates.

There are also optional parameters that can be used:

{{price|<<amount>>|<<currency>>|showLabel}}

If optional parameters are not provided, Star Coins will be used as the currency, and the label will not be displayed.

Examples

{{price|100}}

results in...

Star Coin icon.png 100

''{{price|50|friendship|showLabel}}''

results in...

Friendship.png 50 Friendship

{{price|30|wonderpixartoken}}

results in...

Wonder of Pixar Token.png 30

Amount

This parameter is the amount of currency displayed after the icon

Currency

This parameter accepts different currency types, and will default to Star Coin if there is no value added.

Event currency parameters will automatically link the generated image to the corresponding event article.

Input Output (1000, showLabel)
Star Coin icon.png 1,000 Star Coins
dreamlight Dreamlight.png 1,000 Dreamlight
energy Energy.png 1,000 Energy
friendship Friendship.png 1,000 Friendship
moonstone Moonstone icon.png 1,000 Moonstones
daisycoin Star Coin icon.png 1,000
pixeldust Pixel Dust icon.png 1,000 Pixel Dust
mist Mist.png 1,000 Mist
pixartoken Pixar Token icon.png 1,000 Tokens
villaintoken Villains Token.png 1,000 Pumpkin Tokens
festivetoken Festive Token.png 1,000 Gift Tokens
centennialtoken Centennial Token.png 1,000 Mickey Tokens
parkstoken Parks Token.png 1,000 Parks Tokens
wonderpixartoken Wonder of Pixar Token.png 1,000 Pixar Tokens
hauntedtoken Haunted Token.png 1,000 The Nightmare Before Christmas Lollipop Tokens
royalwintertoken Royal Winter Token.png 1,000 Royal Winter Tokens
monstertoken Lovely Monsters Token.png 1,000 Scream Canister Tokens
dayatdisneytoken Star Coin icon.png 1,000