Template:Price: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Template support for honour specific values)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly><span>{{SmallIcon|Gold Icon.png}} Price: {{{1|}}} gp {{#if:{{{2|}}}|/ {{{2}}} gp{{honour}}}}</span></includeonly><noinclude>
To maintain compatibility with existing templates, the honour mode specific value can be
either specified as the second argument or in the first argument separated by :
-->{{#lvardef:base|{{ #explode: {{{1}}}|:|0}}}}<!--
Split parameter into base price and honour price on the :
-->{{#lvardef:honour|{{ #explode: {{{1}}}|:|1}}}}<!--
-->{{#if: {{{2|{{#lvar: honour}}}}}
  | {{SmallIcon|Gold Icon.png}} Price: {{trim | {{#lvar: base}} }}{{nbts}}gp / {{trim | {{{2|{{#lvar: honour}}}}} }}{{nbts}}gp{{honour}}
  | {{SmallIcon|Gold Icon.png}} Price: {{trim | {{#lvar: base}} }}{{nbts}}gp
}}</includeonly><noinclude> <!-- #8239 is non-breaking thin space -->
Usage: {{code|<nowiki>{{Price|20}}</nowiki>}}
Usage: {{code|<nowiki>{{Price|20}}</nowiki>}}


Result: {{Price|20}}
Result: {{Price|20}}
Usage: {{code|<nowiki>{{Price|20:40}}</nowiki>}}
Result: {{Price|20:40}}


Usage: {{code|<nowiki>{{Price|20|40}}</nowiki>}}
Usage: {{code|<nowiki>{{Price|20|40}}</nowiki>}}
Line 21: Line 8:
Result: {{Price|20|40}}
Result: {{Price|20|40}}


[[Category:Weapon Property Templates]]
[[Category:Weapon Property templates]]
</noinclude>
</noinclude>

Latest revision as of 15:22, 23 June 2024

Usage: {{Price|20}}

Result: Price: 20 gp

Usage: {{Price|20|40}}

Result: Price: 20 gp / 40 gpHHonour