Template:Cost/doc
- Description
- This template is designed to represent the most common forms of currency: the set of gold, silver, and copper.
- All other items that are used as currency, tokens, and quest objectives should use {{{{#if:|{{{prefix}}}:}}costitem{{#if:cost||<cost>}}{{#if:actual item||<actual item>}}{{#if:display name/desired link||<display name/desired link>}}{{#if:||<{{{5}}}>}}{{#if:||<{{{6}}}>}}{{#if:||<{{{7}}}>}}{{#if:||<{{{8}}}>}}{{#if:||<{{{9}}}>}}{{#if:||<{{{10}}}>}}{{#if:||<{{{11}}}>}}{{#if:||<{{{12}}}>}}{{#if:||<{{{13}}}>}}{{#if:||<{{{14}}}>}}{{#if:||<{{{15}}}>}}{{#if:||<{{{16}}}>}}{{#if:||<{{{17}}}>}}{{#if:||<{{{18}}}>}}{{#if:||<{{{19}}}>}}{{#if:||<{{{20}}}>}}{{#if:||<{{{21}}}>}}}} instead of this template.
- Syntax
- {{{{#if:|{{{prefix}}}:}}Cost{{#if:gold||<gold>}}{{#if:silver||<silver>}}{{#if:copper||<copper>}}{{#if:g=||<g=>}}{{#if:s=||<s=>}}{{#if:c=||<c=>}}{{#if:ach=||<ach=>}}{{#if:cs=||<cs=>}}{{#if:ca=||<ca=>}}{{#if:dca=||<dca=>}}{{#if:djt=||<djt=>}}{{#if:dpt=||<dpt=>}}{{#if:ijt=||<ijt=>}}{{#if:it=||<it=>}}{{#if:mwt=||<mwt=>}}{{#if:tbc=||<tbc=>}}{{#if:||<{{{18}}}>}}{{#if:||<{{{19}}}>}}{{#if:||<{{{20}}}>}}{{#if:||<{{{21}}}>}}}}
- Example
- {{cost|1||30}}
- {{cost|2|3}}
- {{cost||4|5}}
- {{cost|||6}}
- {{cost|eob=2}}
- {{cost|it=5}}
- Result
- {{#sub:{{#if:1| {{#replace:1|x| }}
}}{{#if:| {{#replace:|x| }}
}}{{#if:30| {{#replace:30|x| }}
}}{{#if:| {{{cost}}} [[File:{{{icon}}}|16px|{{{name}}}|link={{{name}}}]]}}|5}}
- {{#sub:{{#if:2| {{#replace:2|x| }}
}}{{#if:3| {{#replace:3|x| }}
}}{{#if:| {{#replace:{{{3}}}|x| }}
}}{{#if:| {{{cost}}} [[File:{{{icon}}}|16px|{{{name}}}|link={{{name}}}]]}}|5}}
- {{#sub:{{#if:| {{#replace:|x| }}
}}{{#if:4| {{#replace:4|x| }}
}}{{#if:5| {{#replace:5|x| }}
}}{{#if:| {{{cost}}} [[File:{{{icon}}}|16px|{{{name}}}|link={{{name}}}]]}}|5}}
- {{#sub:{{#if:| {{#replace:|x| }}
}}{{#if:| {{#replace:|x| }}
}}{{#if:6| {{#replace:6|x| }}
}}{{#if:| {{{cost}}} [[File:{{{icon}}}|16px|{{{name}}}|link={{{name}}}]]}}|5}}
- {{#sub:{{#if:| {{#replace:{{{1}}}|x| }}
}}{{#if:| {{#replace:{{{2}}}|x| }}
}}{{#if:| {{#replace:{{{3}}}|x| }}
}}{{#if:| {{{cost}}} [[File:{{{icon}}}|16px|{{{name}}}|link={{{name}}}]]}}|5}}
- {{#sub:{{#if:| {{#replace:{{{1}}}|x| }}
}}{{#if:| {{#replace:{{{2}}}|x| }}
}}{{#if:| {{#replace:{{{3}}}|x| }}
}}{{#if:| {{{cost}}} [[File:{{{icon}}}|16px|{{{name}}}|link={{{name}}}]]}}|5}}
Table usage
For tables that have a column filled with money, the gold, silver, and copper can be manually aligned by using the letter "x". Each "x" is replaced with a space that has the same width as a single digit, acting as a mini indent.
If a coin type is filled entirely with x's, that type's icon will additionally be made invisible.
- Example
{| class="darktable zebra" ! Cost |- | {{cost|123|45|67}} |- | {{cost|xx1|x2|x3}} |- | {{cost|xxx|12}} |- | {{cost|xxx|xx|12}} |}
See also
- {{{{#if:|{{{prefix}}}:}}coppercost{{#if:amount||<amount>}}{{#if:||<{{{3}}}>}}{{#if:||<{{{4}}}>}}{{#if:||<{{{5}}}>}}{{#if:||<{{{6}}}>}}{{#if:||<{{{7}}}>}}{{#if:||<{{{8}}}>}}{{#if:||<{{{9}}}>}}{{#if:||<{{{10}}}>}}{{#if:||<{{{11}}}>}}{{#if:||<{{{12}}}>}}{{#if:||<{{{13}}}>}}{{#if:||<{{{14}}}>}}{{#if:||<{{{15}}}>}}{{#if:||<{{{16}}}>}}{{#if:||<{{{17}}}>}}{{#if:||<{{{18}}}>}}{{#if:||<{{{19}}}>}}{{#if:||<{{{20}}}>}}{{#if:||<{{{21}}}>}}}} — show an amount of money given as a number copper coins.
- {{{{#if:|{{{prefix}}}:}}costcopper{{#if:g||<g>}}{{#if:s||<s>}}{{#if:c||<c>}}{{#if:||<{{{5}}}>}}{{#if:||<{{{6}}}>}}{{#if:||<{{{7}}}>}}{{#if:||<{{{8}}}>}}{{#if:||<{{{9}}}>}}{{#if:||<{{{10}}}>}}{{#if:||<{{{11}}}>}}{{#if:||<{{{12}}}>}}{{#if:||<{{{13}}}>}}{{#if:||<{{{14}}}>}}{{#if:||<{{{15}}}>}}{{#if:||<{{{16}}}>}}{{#if:||<{{{17}}}>}}{{#if:||<{{{18}}}>}}{{#if:||<{{{19}}}>}}{{#if:||<{{{20}}}>}}{{#if:||<{{{21}}}>}}}} — {{{{#if:|{{{prefix}}}:}}cost{{#if:||<{{{2}}}>}}{{#if:||<{{{3}}}>}}{{#if:||<{{{4}}}>}}{{#if:||<{{{5}}}>}}{{#if:||<{{{6}}}>}}{{#if:||<{{{7}}}>}}{{#if:||<{{{8}}}>}}{{#if:||<{{{9}}}>}}{{#if:||<{{{10}}}>}}{{#if:||<{{{11}}}>}}{{#if:||<{{{12}}}>}}{{#if:||<{{{13}}}>}}{{#if:||<{{{14}}}>}}{{#if:||<{{{15}}}>}}{{#if:||<{{{16}}}>}}{{#if:||<{{{17}}}>}}{{#if:||<{{{18}}}>}}{{#if:||<{{{19}}}>}}{{#if:||<{{{20}}}>}}{{#if:||<{{{21}}}>}}}}-like syntax to display the copper value of the currency