Template:Coin total/doc

From Thorium Mod Wiki
Jump to navigation Jump to search

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