Template:Cost: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
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|..."
 
No edit summary
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
-->{{#if:{{{gold|}}}| {{{gold}}}{{{Gold}}}|}}<!--
-->{{#if:{{{gold|}}}| {{{gold}}}{{Gold}}|}}<!--
-->{{#if:{{{wood|}}}| {{{wood}}}{{{Wood}}}|}}<!--
-->{{#if:{{{wood|}}}| {{{wood}}}{{Wood}}|}}<!--
-->{{#if:{{{ore|}}}| {{{ore}}}{{{Ore}}}|}}<!--
-->{{#if:{{{ore|}}}| {{{ore}}}{{Ore}}|}}<!--
-->{{#if:{{{gems|}}}| {{{gems}}}{{{Gems}}}|}}<!--
-->{{#if:{{{gems|}}}| {{{gems}}}{{Gems}}|}}<!--
-->{{#if:{{{crystals|}}}| {{{crystals}}}{{{Crystals}}}|}}<!--
-->{{#if:{{{crystals|}}}| {{{crystals}}}{{Crystals}}|}}<!--
-->{{#if:{{{mercury|}}}| {{{mercury}}}{{{Mercury}}}|}}<!--
-->{{#if:{{{mercury|}}}| {{{mercury}}}{{Mercury}}|}}<!--
-->{{#if:{{{dust|}}}| {{{dust}}}{{{Dust}}}|}}<!--
-->{{#if:{{{dust|}}}| {{{dust}}}{{Dust}}|}}<!--
-->{{#if:{{{gold|}}}{{{wood|}}}{{{ore|}}}{{{gems|}}}{{{crystals|}}}{{{mercury|}}}{{{dust|}}}||—}}<!--
-->{{#if:{{{gold|}}}{{{wood|}}}{{{ore|}}}{{{gems|}}}{{{crystals|}}}{{{mercury|}}}{{{dust|}}}||—}}<!--
################################################################################
################################################################################

Revision as of 16:30, 14 July 2026


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

Usage

1. Gold:

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

Output: 100Gold


2. Gold and Wood:

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

Output: 100Gold10Wood


3. Ore:

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

Output: 10Ore


4. Gems:

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

Output: 10Gems


5. Crystals:

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

Output: 10Crystals


6. Mercury:

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

Output: 10Mercury


7. Dust:

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

Output: 10Alchemical Dust


8. No cost

Input: {{Cost}}

Output: —