Template:Rarity: Difference between revisions
Jump to navigation
Jump to search
(add drop shadow) |
(Support for honour specific rarity values) |
||
Line 1: | Line 1: | ||
<includeonly>{{SmallIcon|Rarity Icon.png|class=bg3wiki-lightmode-drop-shadow}} Rarity: {{#switch:{{ | <includeonly>{{SmallIcon|Rarity Icon.png|class=bg3wiki-lightmode-drop-shadow}}<!-- | ||
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 7: | Line 13: | ||
| legendary = {{Legendary}} | | legendary = {{Legendary}} | ||
| story = {{Story}} | | story = {{Story}} | ||
}}</includeonly><noinclude> | }} {{#if: {{{2|{{#lvar: honour}}}}} | ||
| / {{#switch: {{{2|{{#lvar: honour}}}}} | |||
| common = Common | |||
| uncommon = {{Uncommon}} | |||
| rare = {{Rare}} | |||
| very rare = {{very rare}} | |||
| legendary = {{Legendary}} | |||
| story = {{Story}} | |||
}}{{Honour}}}}</includeonly><noinclude> | |||
Usage: {{code|<nowiki>{{rarity|}}</nowiki>}} | Usage: {{code|<nowiki>{{rarity|}}</nowiki>}} | ||
Line 35: | Line 49: | ||
Result: {{rarity|story}} | Result: {{rarity|story}} | ||
Usage: {{code|<nowiki>{{rarity|uncommon|rare}}</nowiki>}} | |||
Result: {{rarity|uncommon|rare}} | |||
Usage: {{code|<nowiki>{{rarity|uncommon:very rare}}</nowiki>}} | |||
Result: {{rarity|uncommon:very rare}} | |||
[[Category:Weapon Property Templates]] | [[Category:Weapon Property Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 17:14, 3 December 2023
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
Usage: {{rarity|uncommon:very rare}}
Result: Rarity: Uncommon / Very RareHHonour