Vorlage:Coin

Aus Terraria Wiki
(Weitergeleitet von Vorlage:Münzen)
Wechseln zu: Navigation, Suche
Template-info.svg Dokumentation Die folgende Dokumentation stammt von der Seite Vorlage:Coin/Dokumentation. (bearbeiten | Versionsgeschichte)
Important.svg Diese Seite ist nicht oder unvollständig übersetzt.
Hilf mit, indem du den Text übersetzt und anschließend diesen Hinweis entfernst. Dies entfernt diese Seite auch aus der Liste von Seiten mit unzureichender Übersetzung.

This template is used as a standardized way to display formatted coin values.

Usage[Quelltext bearbeiten]

There are 2 API styles:

Style A[Quelltext bearbeiten]

{{ coin | <Platinum Coins> (optional) | <Gold Coins> (optional) | <Silver Coins> (optional) | <Copper Coins> }}

Example: {{ coin | 1 | 0 | 30 }} means 1 Gold 30 Copper Coins.

Style B[Quelltext bearbeiten]

{{ coin | <Platinum Coins>pc (optional) <Gold Coins>gc (optional) <Silver Coins>sc (optional) <Copper Coins>cc (optional) }}

Examples: {{ coin | 1gc30cc }} means 1 Gold 30 Silver Coins; {{ coin | 1.25gc }} means 1 Gold 25 Silver Coins.

Spacing and capitalization is ignored.

Other parameters[Quelltext bearbeiten]

round

Digit to round the combined value to; default is 2. Can also be negative, and can be used with all API styles.

Examples[Quelltext bearbeiten]

Code Result
{{coin|30}} 30*30 Copper Coin.png
{{coin|1|30}} 130*1 Silver Coin.png 30 Copper Coin.png
{{coin|1|1}} 101*1 Silver Coin.png 1 Copper Coin.png
{{coin|1sc}} 100*1 Silver Coin.png
{{coin|10gc}} 100000*10 Gold Coin.png
{{coin|10000cc}} 10000*1 Gold Coin.png
{{coin|1000000}} 1000000*1 Platinum Coin.png
{{coin|0}} 0*0 Copper Coin.png
{{coin|3|1|30}} 30130*3 Gold Coin.png 1 Silver Coin.png 30 Copper Coin.png
{{coin|3|0|1|30}} 3000130*3 Platinum Coin.png 1 Silver Coin.png 30 Copper Coin.png
{{coin|0|1|0|30}} 10030*1 Gold Coin.png 30 Copper Coin.png
{{coin|1.30gc}} 13000*1 Gold Coin.png 30 Silver Coin.png
{{coin|12 gc 80cc}} 120080*12 Gold Coin.png 80 Copper Coin.png
{{coin|12cc 80gc}} 800012*80 Gold Coin.png 12 Copper Coin.png
{{coin|130 SC}} 13000*1 Gold Coin.png 30 Silver Coin.png
{{coin|1.5gc130sc}} 28000*2 Gold Coin.png 80 Silver Coin.png
{{coin|1.0130gC}} 10130*1 Gold Coin.png 1 Silver Coin.png 30 Copper Coin.png
{{coin|32sc 57.8741cc}} 3257.87*32 Silver Coin.png 57,87 Copper Coin.png
{{coin|32sc 57.8741cc|round=3}} 3257.874*32 Silver Coin.png 57,874 Copper Coin.png
{{coin|32sc 57.8741cc|round=1}} 3257.9*32 Silver Coin.png 57,9 Copper Coin.png
{{coin|32sc 57.8741cc|round=0}} 3258*32 Silver Coin.png 58 Copper Coin.png
{{coin|32sc 57.8741cc|round=-1}} 3260*32 Silver Coin.png 60 Copper Coin.png
{{coin|32sc 54.9781cc|round=-1}} 3250*32 Silver Coin.png 50 Copper Coin.png
{{coin|32sc 57.8741cc|round=-2}} 3300*33 Silver Coin.png
{{coin|14pc 56gc 32sc 57.8741cc|round=-6}} 15000000*15 Platinum Coin.png
{{coin|14pc 56gc 32sc 57.8741cc|round=-7}} 10000000*10 Platinum Coin.png
{{coin|14pc 56gc 32sc 57.8741cc|round=-8}} 0*0 Copper Coin.png
{{coin|54pc 56gc 32sc 57.8741cc|round=-8}} 100000000*100 Platinum Coin.png

Note[Quelltext bearbeiten]

  • This template is table-sorting-friendly (needs data-sort-type="number" in header). See the example table above or here.
  • It is only designed for positive numbers – negative values as input may lead to unexpected results.