Template:Gold icon: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><onlyinclude>{{#ifexpr:{{{1}}} = 1|{{Icon|Gold Pile Single Item Icon.png|{{{2|40}}} }}}}{{
<includeonly>{{#ifexpr:{{{1}}} = 1|{{Icon|Gold Pile Single Item Image.png|{{{2|25}}} }}}}{{
#ifexpr:{{{1}}} > 1 and {{{1}}} < 100|{{Icon|Gold Pile Small Item Icon.png|{{{2|40}}} }}}}{{
#ifexpr:{{{1}}} > 1 and {{{1}}} < 100|{{Icon|Gold Pile Small Item Image.png|{{{2|25}}} }}}}{{
#ifexpr:100 <= {{{1}}} and {{{1}}} < 500|{{Icon|Gold Pile Medium Item Icon.png|{{{2|40}}} }}}}{{
#ifexpr:100 <= {{{1}}} and {{{1}}} < 500|{{Icon|Gold Pile Medium Item Image.png|{{{2|25}}} }}}}{{
#ifexpr:{{{1}}} >= 500|{{Icon|Gold Pile Large Item Icon.png|{{{2|40}}} }}}}</onlyinclude></includeonly><noinclude>
#ifexpr:{{{1}}} >= 500|{{Icon|Gold Pile Large Item Image.png|{{{2|25}}} }}}}</includeonly><noinclude>{{Documentation|content=
This template takes a single parameter, the amount of gold, and produces the right gold icon for that quantity.  
This template takes a single parameter, the amount of gold, and produces the right gold icon for that quantity.  


TODO: Use an actual icon rather than the faded tooltip version.
== Usage ==
<code><nowiki>{{Gold icon|quantity_of_gold|optional_icon_height}}</nowiki></code>


Usage: <code><nowiki>{{GoldIcon|quantity_of_gold|optional_icon_height}}</nowiki></code>
== Examples ==
 
{{Template demo
Examples: <pre>
| style = table
{{GoldIcon|1}}
| caption 1 = 1 piece
{{GoldIcon|2}}
| <nowiki>{{GoldIcon|1}}</nowiki>
{{GoldIcon|100|14}}
| caption 2 = 2 - 99 pieces
{{GoldIcon|500|80}}
| <nowiki>{{GoldIcon|2}}</nowiki>
</pre>
| caption 3 = 100 - 499 pieces
 
| <nowiki>{{GoldIcon|100}}</nowiki>
One gold: {{GoldIcon|1}}
| caption 4 = 500+ pieces
 
| <nowiki>{{GoldIcon|500}}</nowiki>
2 gold: {{GoldIcon|2}}
| caption 5 = 100 gold with 40px height
 
| <nowiki>{{GoldIcon|100|40}}</nowiki>
100 gold with icon height of 14: {{GoldIcon|100|14}}
| caption 6 = 500 gold with 64px height
 
| <nowiki>{{GoldIcon|500|64}}</nowiki>
500 gold with icon height of 80: {{GoldIcon|500|80}}
}}


}}
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 11:52, 19 January 2025

Template documentation

This template takes a single parameter, the amount of gold, and produces the right gold icon for that quantity.

Usage

{{Gold icon|quantity_of_gold|optional_icon_height}}

Examples

Example Markup Renders as
1 piece
{{GoldIcon|1}}
Gold Pile Single Item Image.png
2 - 99 pieces
{{GoldIcon|2}}
Gold Pile Small Item Image.png
100 - 499 pieces
{{GoldIcon|100}}
Gold Pile Medium Item Image.png
500+ pieces
{{GoldIcon|500}}
Gold Pile Large Item Image.png
100 gold with 40px height
{{GoldIcon|100|40}}
Gold Pile Medium Item Image.png
500 gold with 64px height
{{GoldIcon|500|64}}
Gold Pile Large Item Image.png