Template:Cost

From Heroes of Might and Magic: Olden Era Official Wiki
Revision as of 16:29, 14 July 2026 by Aurelain (talk | contribs) (Created page with "<includeonly><!-- -->{{#if:{{{gold|}}}| {{{gold}}}{{{Gold}}}|}}<!-- -->{{#if:{{{wood|}}}| {{{wood}}}{{{Wood}}}|}}<!-- -->{{#if:{{{ore|}}}| {{{ore}}}{{{Ore}}}|}}<!-- -->{{#if:{{{gems|}}}| {{{gems}}}{{{Gems}}}|}}<!-- -->{{#if:{{{crystals|}}}| {{{crystals}}}{{{Crystals}}}|}}<!-- -->{{#if:{{{mercury|}}}| {{{mercury}}}{{{Mercury}}}|}}<!-- -->{{#if:{{{dust|}}}| {{{dust}}}{{{Dust}}}|}}<!-- -->{{#if:{{{gold|}}}{{{wood|}}}{{{ore|}}}{{{gems|}}}{{{crystals|}}}{{{mercury|}}}{{{dust|...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Renders the value and currency icon of a cost in resources, supporting various combinations.

Usage

1. Gold:

Input: {{Cost|gold=100|lang=en}}

Output: 100{{{Gold}}}


2. Gold and Wood:

Input: {{Cost|gold=100|wood=10|lang=en}}

Output: 100{{{Gold}}}10{{{Wood}}}


3. Ore:

Input: {{Cost|ore=10|lang=en}}

Output: 10{{{Ore}}}


4. Gems:

Input: {{Cost|gems=10|lang=en}}

Output: 10{{{Gems}}}


5. Crystals:

Input: {{Cost|crystals=10|lang=en}}

Output: 10{{{Crystals}}}


6. Mercury:

Input: {{Cost|mercury=10|lang=en}}

Output: 10{{{Mercury}}}


7. Dust:

Input: {{Cost|dust=10|lang=en}}

Output: 10{{{Dust}}}


8. No cost

Input: {{Cost}}

Output: —