Template:Currency/doc

From Brighter Shores Wiki
Revision as of 23:01, 19 November 2024 by Artoire (talk | contribs) (Add some documentation for new args)
Jump to navigation Jump to search
This is a documentation subpage for Template:Currency.
It contains usage information, categories, and other content that is not part of the original template page.
Template:Currency invokes function main in Module:Currency using Lua.

The currency template formats currency using the in-game icons.

Usage

Code Visible result
{{Currency|0}} Copper
{{Currency|100}} 100 Copper
{{Currency|200100}} 200 Silver 100 Copper
{{Currency|300200100}} 300 Gold 200 Silver 100 Copper
{{Currency|400300200100}} 400 Platinum 300 Gold 200 Silver 100 Copper
{{Currency|400000000000}} 400 Platinum
{{Currency|300000100}} 300 Gold 0 Silver 100 Copper
{{Currency|400000200000}} 400 Platinum 300 Gold 200 Silver 100 Copper
{{Currency|-1}} -1 Copper
{{Currency|-400000200000}} -400 Platinum 300 Gold 200 Silver 100 Copper
{{Currency|2*(8/4)}} Copper

force_sign

Force a sign in front of the currency.

{{Currency|200100|force_sign=yes}}: +200 Silver 100 Copper

{{Currency|-200100|force_sign=yes}}: -200 Silver 100 Copper (no effect)

{{Currency|0|force_sign=yes}}: ±0 Copper

all_signs

Show the sign on all denominations

{{Currency|-200100|all_signs=yes}}: -200 Silver -100 Copper

{{Currency|200100|force_sign=yes|all_signs=yes}}: +200 Silver +100 Copper

show_zeroes

After the first denomination is shown, show all smaller denominations even if there are zero of them

{{Currency|400000000000|show_zeroes=yes}}: 400 Platinum

{{Currency|300000100|show_zeroes=yes}}: 300 Gold 0 Silver 100 Copper