Template:Coin

From Guild Wars 2 Wiki
Jump to navigationJump to search

Copper coin

Usage[edit]

Mimics the display of coin in the game. An optional formatting parameter spaces the values equally to keep columns organized. Uses {{gold}}, {{silver}}, and {{copper}} when output is not formatted. {{Coin|<value>}}
{{Coin|<value>|<format>}}

Examples[edit]

Code Result
{{Coin|0}} Copper coin
{{Coin|1}} Copper coin
{{Coin|12}} 12 Copper coin
{{Coin|100}} Silver coin
{{Coin|1234}} 12 Silver coin 34 Copper coin
{{Coin|10000}} Gold coin
{{Coin|10001}} Gold coin 1 Copper coin
{{Coin|120034}} 12 Gold coin 34 Copper coin
{{Coin|12345600}} 1234 Gold coin 56 Silver coin
{{Coin|12345678}} 1234 Gold coin 56 Silver coin 78 Copper coin
{{Coin|0|yes}} 0 Copper coin
{{Coin|1|yes}} 1 Copper coin
{{Coin|1200|yes}} 12 Silver coin 0 Copper coin
{{Coin|12345|yes}} 1 Gold coin 23 Silver coin 45 Copper coin
{{Coin|12340000|yes}} 1234 Gold coin 0 Silver coin 0 Copper coin
{{Coin|12345600|yes}} 1234 Gold coin 56 Silver coin 0 Copper coin
{{Coin|12340001|yes}} 1234 Gold coin 0 Silver coin 1 Copper coin
{{Coin|12340601|yes}} 1234 Gold coin 6 Silver coin 1 Copper coin
{{Coin}} Copper coin

Parameters[edit]

1 (unnamed parameter)
Required. Number of copper.
  • A quick rule of thumb is to think of it as a format of gsscc as applicable, where 'g' is any greater number of gold, 'ss' is up to 99 silver, and 'cc' is up to 99 copper. (1 Silver coin is equal to 100 Copper coin and 1 Gold coin is 100 Silver coin, thus the number of gold pieces is per 10,000 copper: 100 × 100.)
  • Negative values will return 0
  • Invalid input will bring up Copper coin
2 (unnamed parameter)
Optional. Any value.
  • Include coins even if their value is 0
  • For use in tables such as merchants to keep organized and easily readable
  • Parameter is ignored if input is invalid

Notes[edit]

  • In order to support localised numerical inputs from languages which use different separators, this template ignores commas, fullstops and spaces.

See also[edit]