Template:Rarity: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Support for honour specific rarity values)
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{SmallIcon|Rarity Icon.png|class=bg3wiki-lightmode-drop-shadow}}<!--
<includeonly>{{SmallIcon|Rarity Icon.png|class=bg3wiki-lightmode-drop-shadow}} Rarity: {{#switch: {{{1|}}}
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 rarity and honour rarity on the :
-->{{#lvardef:honour|{{ #explode: {{{1}}}|:|1}}}}<!--
-->Rarity: {{#switch: {{#lvar: base|common}}
| <!-- accept empty value for "common", for ease of use from other templates -->
| <!-- accept empty value for "common", for ease of use from other templates -->
| common = Common
| common = Common
Line 13: Line 7:
| legendary = {{Legendary}}
| legendary = {{Legendary}}
| story = {{Story}}
| story = {{Story}}
}} {{#if: {{{2|{{#lvar: honour}}}}}
}} {{#if: {{{2|}}}
| / {{#switch: {{{2|{{#lvar: honour}}}}}
| / {{#switch: {{{2}}}
| common = Common
| common = Common
| uncommon = {{Uncommon}}
| uncommon = {{Uncommon}}
Line 54: Line 48:
Result: {{rarity|uncommon|rare}}
Result: {{rarity|uncommon|rare}}


Usage: {{code|<nowiki>{{rarity|uncommon:very rare}}</nowiki>}}
[[Category:Weapon Property templates]]
 
Result: {{rarity|uncommon:very rare}}
 
[[Category:Weapon Property Templates]]
</noinclude>
</noinclude>

Latest revision as of 15:22, 23 June 2024

Usage: {{rarity|}}

Result: Rarity: Common

Usage: {{rarity|common}}

Result: Rarity: Common

Usage: {{rarity|uncommon}}

Result: Rarity: Uncommon

Usage: {{rarity|rare}}

Result: Rarity: Rare

Usage: {{rarity|very rare}}

Result: Rarity: Very Rare

Usage: {{rarity|legendary}}

Result: Rarity: Legendary

Usage: {{rarity|story}}

Result: Rarity: Story Item

Usage: {{rarity|uncommon|rare}}

Result: Rarity: Uncommon / RareHHonour