User:Llamageddon/RrtyIcon: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{trim|
<includeonly>{{trim|
{{#vardefine: exlk | {{{1 |}}} }}
{{#lvardef: exlk | {{{1 |}}} }}
{{#vardefine: text | {{{2 | {{{1}}} }}} }}
{{#lvardef: rrty | {{{2 |}}} }}
{{#vardefine: rrty | {{{3 |}}} }}
{{#lvardef: bord | <span style="background: #1B1A19; padding: 4px 0px 6px 0px; max-height: 25px; border: 2px solid {{#switch: {{#lvar:rrty}} | common = #1B1A1999 | uncommon = #00491599 | rare = #00374999 | veryrare = #54003299 | legendary = #563E0D99 | story = #561D0099 | #1B1A1999 }};"> }}
{{#vardefine: void | {{#if: {{#switch: {{{3}}} | common = common | uncommon = uncommon | rare = rare | very rare = very rare | legendary = legendary | story = story }} | {{{3 |}}} | common |}} }}
}}{{#lvar:bord}}{{ItemIcon|name={{#lvar:exlk}}|size=25}}</span>&nbsp;</includeonly><noinclude>__NOTOC__
{{#vardefine: spna | <span style="display: inline-block; vertical-align: middle; width: 25px; height: 25px; overflow: hidden;">}}
This template uses the [[Template:ItemIcon|<nowiki>{{ItemIcon}}</nowiki>]] template to give the icon for the item defined in the first parameter a coloured border, based on rarity. The icon size is set to the standard {{C|25px}} maximum height for inline use.
}}<span class="bg3wiki-div-border bg3wiki-icon-colour-{{#var:void}}">&nbsp;{{#var:spna}}[[File:{{#var:exlk}} Icon.png|25px]]</span></span>&nbsp;[[{{#var:text}}]]</includeonly><noinclude>
== Header ==
<nowiki>{{Icon|{{#var:exlk}} Icon.png}}</nowiki>


{{Icon|{{#var:exlk}} Icon.png}}
The rarity is defined by the second paramater: {{User:Llamageddon/Highlight|{{Color|#1B1A1999|common}}}}, {{User:Llamageddon/Highlight|{{Color|#00491599|uncommon}}}}, {{User:Llamageddon/Highlight|{{Color|#00374999|rare}}}}, {{User:Llamageddon/Highlight|{{Color|#54003299|veryrare}}}}, {{User:Llamageddon/Highlight|{{Color|#563E0D99|legendary}}}},  or {{User:Llamageddon/Highlight|{{Color|#561D0099|story}}}}. If left blank, it will default to dark grey (common) for the border.


== Examples ==
<nowiki>{{User:Llamageddon/RrtyIcon|Potion of Healing|rare}}</nowiki>


<nowiki>{{User:Llamageddon/RrtyIcon|Club|Mace|uncommon}}</nowiki>
{{User:Llamageddon/RrtyIcon|Potion of Healing|rare}}


{{User:Llamageddon/RrtyIcon|Club|Mace|uncommon|}}
<nowiki>{{User:Llamageddon/RrtyIcon|Mace|common}}</nowiki>


{{User:Llamageddon/RrtyIcon|Mace|common}}


<nowiki>{{User:Llamageddon/RrtyIcon|Club|{{blank}}|rare}}</nowiki>
<nowiki>{{User:Llamageddon/RrtyIcon|Longsword|uncommon}}</nowiki>
 
{{User:Llamageddon/RrtyIcon|Club|{{blank}}|rare}}
 
 
<nowiki>{{User:Llamageddon/RrtyIcon|Club|Mace|very rare}} {{Rarity|{{#var:void}}}}</nowiki> (Having trouble converting 'very rare' to 'veryrare')
 
{{User:Llamageddon/RrtyIcon|Club|Mace|very rare}} {{Rarity|{{#var:void}}}}


{{User:Llamageddon/RrtyIcon|Longsword|uncommon}}


<nowiki>{{User:Llamageddon/RrtyIcon|Club|rare}}</nowiki>
<nowiki>{{User:Llamageddon/RrtyIcon|Club|rare}}</nowiki>
Line 31: Line 25:
{{User:Llamageddon/RrtyIcon|Club|rare}}
{{User:Llamageddon/RrtyIcon|Club|rare}}


<nowiki>{{User:Llamageddon/RrtyIcon|Longbow|veryrare}}</nowiki>


<nowiki>{{User:Llamageddon/RrtyIcon|Wrong|Mace|legendary}}</nowiki>
{{User:Llamageddon/RrtyIcon|Longbow|veryrare}}
 
{{User:Llamageddon/RrtyIcon|Wrong|Mace|legendary}}


<nowiki>{{User:Llamageddon/RrtyIcon|Warhammer|legendary}}</nowiki>


<nowiki>{{User:Llamageddon/RrtyIcon|Club|Mace|wrong}}</nowiki>
{{User:Llamageddon/RrtyIcon|Warhammer|legendary}}


{{User:Llamageddon/RrtyIcon|Club|Mace|wrong}}
<nowiki>{{User:Llamageddon/RrtyIcon|Stuffed Bear A|story}}</nowiki>


{{User:Llamageddon/RrtyIcon|Stuffed Bear A|story}}


<nowiki>{{User:Llamageddon/RrtyIcon|||}}</nowiki>
<nowiki>{{User:Llamageddon/RrtyIcon|Ball}}</nowiki>


{{User:Llamageddon/RrtyIcon|||}}
{{User:Llamageddon/RrtyIcon|Ball}}


=== List Layout ===
{{User:Llamageddon/RrtyIcon|Stuffed Bear A|story}}


<nowiki>{{User:Llamageddon/RrtyIcon|{{blank}}|{{blank}}|{{blank}}}}</nowiki>
{{User:Llamageddon/RrtyIcon|Warhammer|legendary}}


{{User:Llamageddon/RrtyIcon|{{blank}}|{{blank}}|{{blank}}}}
{{User:Llamageddon/RrtyIcon|Club|veryrare}}


{{User:Llamageddon/RrtyIcon|Mace|rare}}
</noinclude>
</noinclude>

Latest revision as of 14:43, 20 September 2023

This template uses the {{ItemIcon}} template to give the icon for the item defined in the first parameter a coloured border, based on rarity. The icon size is set to the standard 25px maximum height for inline use.

The rarity is defined by the second paramater: common, uncommon, rare, veryrare, legendary, or story. If left blank, it will default to dark grey (common) for the border.

Examples[edit | edit source]

{{User:Llamageddon/RrtyIcon|Potion of Healing|rare}}

 

{{User:Llamageddon/RrtyIcon|Mace|common}}

 

{{User:Llamageddon/RrtyIcon|Longsword|uncommon}}

 

{{User:Llamageddon/RrtyIcon|Club|rare}}

 

{{User:Llamageddon/RrtyIcon|Longbow|veryrare}}

 

{{User:Llamageddon/RrtyIcon|Warhammer|legendary}}

 

{{User:Llamageddon/RrtyIcon|Stuffed Bear A|story}}

 

{{User:Llamageddon/RrtyIcon|Ball}}

 

List Layout[edit | edit source]