Template:Value total

From Calamity Mod Wiki
Jump to navigation Jump to search

0

Template-info.svg Documentation The documentation below is transcluded from Template:Value total/doc. (edit | history)

Description

This template is used to produce a total coin value number from values entered using the value template: {{value}}. 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 Melee weapons/dpl for an example of the code, and Swords for an example of the accurate sorting it can produce.

This template takes a single parameter: a value template call. The complete contents of most "sell" or "buy" fields in {{item infobox}} can be used as this parameter.