Template:Coin total

From Thorium Mod Wiki
Jump to navigation Jump to search

0

Lua.svg
This template uses Module:String, a script written in the Lua programming language. Please see wikipedia:Lua and mw:Extension:Scribunto to learn more about Lua.
Template-info.svg Documentation The documentation below is transcluded from Template:Coin total/doc. (edit | history)

This template is used to produce a total coin value number from values entered using the coin templates: {{cc}} {{sc}} {{gc}} {{pc}}. It essentially converts coins to their Copper Coin values and adds them together, displaying the total Copper Coin value for all coins entered.

This is primarily for use in {{dpl}} listings, to produce values for data-sort-value in a sortable table's "sell value" column, which can enable accurate sorting where coin values are displayed by coin templates. See Swords/dpl for an example of the code, and Swords for an example of the accurate sorting it can produce.

Usage

This template takes a single parameter: a string of one to four coin template calls. The complete contents of most "sell" fields in {{item infobox}} can be used as this parameter.

Example:

Produces:

  • 122050