User:Llamageddon/RrtyItem: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(24 intermediate revisions by the same user not shown)
Line 7: Line 7:
{{#lvardef: size | {{{6 |}}} }}
{{#lvardef: size | {{{6 |}}} }}
{{#lvardef: cols | {{#switch: {{#lvar:rrty}}
{{#lvardef: cols | {{#switch: {{#lvar:rrty}}
| common = #1B1A1999
| c | common = #48484899
| uncommon = #00491599
| uncommon | u = #01BD3999
| u = #00491599
| rare | r = #01BFFF99
| rare = #00374999
| veryrare | v = #D1017B99
| r = #00374999
| legendary | l = #B7861D99
| veryrare = #54003299
| story | s = #FF590199
| v = #54003299
| #48484899 }} }}
| legendary = #563E0D99
{{#lvardef: scol | {{#switch: {{#lvar:rrty}}
| l = #563E0D99
| common | c = common
| story = #561D0099
| uncommon | u = uncommon
| s = #561D0099
| rare | r = rare
| #1B1A1999 }} }}
| veryrare | very rare | v = veryrare
| legendary | l = legendary
| story | s = story
| common }} }}
{{#lvardef: sufx | {{#switch: {{#lvar:file}}
{{#lvardef: sufx | {{#switch: {{#lvar:file}}
| ii = Item Icon.png
| ii = Item Icon.png
Line 27: Line 30:
| Item Icon.png }} }}
| Item Icon.png }} }}
{{#lvardef: pixl | {{#switch: {{#lvar:size}}
{{#lvardef: pixl | {{#switch: {{#lvar:size}}
| large = 380px
| large = 380px | medium = 144px | small = 40px | inline = 25px  
| medium = 144px
| small = 40px
| inline = 25px  
| 25px }} }}
| 25px }} }}
{{#lvardef: spna | <span style="display: inline-block; box-shadow: rgba(0, 0, 0, 0.14) 3px 3px 6px 0px inset, rgba(0, 0, 0, 0.14) -3px -3px 6px 1px inset; background: #1B1A19; vertical-align: middle; height: {{#lvar:pixl}}; width: {{#lvar:pixl}}; overflow: hidden; border-radius: 5px; border: 2px solid {{#lvar:cols}};">}}}}{{#lvar:spna}} {{#Ifeq: {{#lvar:link}} | | [[File:{{#lvar:item}}&nbsp;{{#lvar:sufx}}|{{#lvar:pixl}}]]</span> | [[File:{{#lvar:item}}&nbsp;{{#lvar:sufx}}|{{#lvar:pixl}}|{{#Ifeq: {{#lvar:link}} | item | link={{#lvar:item}} | link={{#lvar:link}}}}]]</span>&nbsp;<span>{{#Ifeq: {{#lvar:link}} | item | [[{{#lvar:item}}]] | {{#Ifeq: {{#lvar:text}} | notext | | [[{{#lvar:link}}|{{#lvar:text}}]]}}}}</span>}}</includeonly><noinclude>__NOTOC__
{{#lvardef: spna | <span  
style="display: inline-block;
vertical-align: middle;
height: {{#lvar:pixl}};  
width: {{#lvar:pixl}};
overflow: hidden;
border: 1px solid {{#lvar:cols}}"
class="bg3wiki-rarity-gradient-{{#lvar:scol}}
">
}}{{#lvar:spna}}{{#Ifeq: {{#lvar:link}} | | [[File:{{#lvar:item}}&nbsp; {{#lvar:sufx}} | {{#lvar:pixl}}]]</span>| [[File:{{#lvar:item}}&nbsp; {{#lvar:sufx}} | {{#lvar:pixl}} |{{#Ifeq: {{#lvar:link}} | item | link={{#lvar:item}} | link={{#lvar:link}}}}]]</span>&nbsp;<span>{{#Ifeq: {{#lvar:link}} | item | [[{{#lvar:item}}]] |{{#Ifeq: {{#lvar:text}} | notext | | [[{{#lvar:link}} | {{#lvar:text}}]]}}}}</span>}}}}</includeonly><noinclude>__NOTOC__


This is a template for colouring icon borders depending on the value of a 'rarity' variable. The icon size is set to the standard {{C|25px}} maximum height for inline use by default. {{C|_Item_Icon.png}} is set as the default image type, and {{C|common}} is the default rarity setting.
This is a template for colouring icon borders depending on the value of a 'rarity' variable. The icon size is set to the standard {{C|25px}} maximum height for inline use by default. {{C|_Item_Icon.png}} is set as the default image type.


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.
The rarity is defined by the second paramater: {{InfoBlob|{{Color|#48484899|common}}}}, {{InfoBlob|{{Color|#01BD3999|uncommon}}}}, {{InfoBlob|{{Color|#01BFFF99|rare}}}}, {{InfoBlob|{{Color|#D1017B99|veryrare}}}}, {{InfoBlob|{{Color|#B7861D99|legendary}}}},  or {{InfoBlob|{{Color|#FF590199|story}}}}. If left blank, it will default to dark grey (common) for the border.


== Shortcuts and Keywords ==
== Examples ==
*Only first parameter defined.


=== Rarity and Colour ===
:{{C|<nowiki>{{User:Llamageddon/RrtyItem|Mace}}</nowiki>}}
'''2nd parameter'''


''Default/null value'': ({{C|c}}) common - #1B1A1999
Test{{User:Llamageddon/RrtyItem|Mace}}
* ({{C|u}}) {{C|uncommon}} = #00491599
* ({{C|r}}) {{C|rare}} = #00374999
* ({{C|v}}) {{C|veryrare}} = #54003299
* ({{C|l}}) {{C|legendary}} = #563E0D99
* ({{C|s}}) {{C|story}} = #561D0099


=== Image Type ===
'''3rd parameter'''


''Default/null value'': ({{C|ii}}) - Item Icon.png
*Using shortcuts for rarity and image type, and {{InfoBlob|item}} keyword in 4th to copy item name as text link.
* ({{C|tt}}) {{C|tooltip}} = Icon.png
* ({{C|im}}) {{C|unfaded}} = Item Image.png


=== Link and Text Keywords ===
:{{C|<nowiki>{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}</nowiki>}}


''4th parameter''
Test2 {{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}
* {{C|item}} = Copy in the item name (1st parameter) as the link text.
''5th parameter''
* {{C|notext}} = Don't use any custom link (4th parameter) as a text link.


=== Image Size ===
'''6th parameter'''


''Default/null value'': {{C|inline}} = 25px
*Unrecognised value in 3rd. Link and link text in 4th and 5th.
* {{C|large}} = 380px (''Native "faded" tooltip resolution'')
* {{C|medium}} = 144px (''Most common native "unfaded" tooltip resolution'')
* {{C|small}} = 40px (''Native item icon resolution'')
* {{C|inline}} = 25px (''Typical size for inline image use'')


== Examples ==
:{{C|<nowiki>{{User:Llamageddon/RrtyItem|Mace|v|x|List of Weapons#Very Rare|A very rare mace.}}</nowiki>}}


{{C|<nowiki>{{User:Llamageddon/RrtyItem|Mace}}</nowiki>}}  
{{User:Llamageddon/RrtyItem|Mace|v|x|List of Weapons#Very Rare|A very rare mace.}}


Only first parameter defined.


{{User:Llamageddon/RrtyItem|Mace}}
*Using a tooltip (large "faded") image. Shortcuts in 2nd and 3rd, custom link in 4th, keyword {{InfoBlob|notext}} in 5th, and {{InfoBlob|small}} in 6th.


:{{C|<nowiki>{{User:Llamageddon/RrtyItem|Longsword|u|tt|List of Weapons#Uncommon|notext|small}}</nowiki>}}


{{C|<nowiki>{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}</nowiki>}}
{{User:Llamageddon/RrtyItem|Longsword|u|tt|List of Weapons#Uncommon|notext|small}}


Using shortcuts for rarity and image type, and {{User:Llamageddon/Highlight|item}} keyword in 4th to copy item name as text link.


{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}
*Blank image type.


:{{C|<nowiki>{{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}}</nowiki>}}


{{C|<nowiki>{{User:Llamageddon/RrtyItem|Mace|v|x|List_of_Weapons#Very_Rare|A very rare mace.}}</nowiki>}}  
{{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}}


Unrecognised value in 3rd. Link and link text in 4th and 5th.


{{User:Llamageddon/RrtyItem|Mace|v|x|List_of_Weapons#Very_Rare|A very rare mace.}}
*Larger than native icon resolution defined.


:{{C|<nowiki>{{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}}</nowiki>}}


{{C|<nowiki>{{User:Llamageddon/RrtyItem|Longsword|u|tt|List_of_Weapons#Uncommon|notext|small}}</nowiki>}}  
{{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}}


Using a tooltip (large "faded") image. Shortcuts in 2nd and 3rd, custom link in 4th, keyword {{User:Llamageddon/Highlight|notext}} in 5th, and {{User:Llamageddon/Highlight|small}} in 6th.


{{User:Llamageddon/RrtyItem|Longsword|u|tt|List_of_Weapons#Uncommon|notext|small}}
*Missing page/icon links and unrecognised or invalid values.


:{{C|<nowiki>{{User:Llamageddon/RrtyItem|Missing Link|Link Missing|Missing Link|Link Missing|Missing Link|Link Missing}}</nowiki>}}


{{C|<nowiki>{{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}}</nowiki>}}
{{User:Llamageddon/RrtyItem|Missing Link|Link Missing|Missing Link|Link Missing|Missing Link|Link Missing}}


Blank image type.
== Shortcuts and Keywords ==


{{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}}
=== Rarity and Colour ===
'''2nd parameter'''


''Default/null value'': common = #{{InfoBlob|{{Color|#48484899|48484899}}}}
:({{C|u}}) {{C|uncommon}}  = #{{InfoBlob|{{Color|#01BD3999|01BD3999}}}}
:({{C|r}}) {{C|rare}}      = #{{InfoBlob|{{Color|#01BFFF99|01BFFF99}}}}
:({{C|v}}) {{C|veryrare}}  = #{{InfoBlob|{{Color|#D1017B99|D1017B99}}}}
:({{C|l}}) {{C|legendary}} = #{{InfoBlob|{{Color|#B7861D99|B7861D99}}}}
:({{C|s}}) {{C|story}}    = #{{InfoBlob|{{Color|#FF590199|FF590199}}}}


{{C|<nowiki>{{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}}</nowiki>}}
=== Image Type ===
'''3rd parameter'''


Larger than native icon resolution defined.
''Default/null value'': ({{C|ii}}) = Item Icon.png
:({{C|tt}}) {{C|tooltip}} = Icon.png
:({{C|im}}) {{C|unfaded}} = Item Image.png


{{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}}
=== Link and Text Keywords ===


'''4th parameter'''
:{{C|item}} = Copy in the item name (1st parameter) as the link text.
'''5th parameter'''
:{{C|notext}} = Don't use any custom link (4th parameter) as a text link.


{{C|<nowiki>{{User:Llamageddon/RrtyItem|Missing Link|Missing Link|Missing Link|Missing Link|Missing Link|Missing Link}}</nowiki>}}
=== Image Size ===
'''6th parameter'''


Missing page/icon links and unrecognised or invalid values.
''Default/null value'': {{C|inline}} = 25px
:{{C|large}}  = 380px (''Native "faded" tooltip resolution'')
:{{C|medium}} = 144px (''Most common native "unfaded" tooltip resolution'')
:{{C|small}}  = 40px (''Native item icon resolution'')
:{{C|inline}} = 25px (''Typical size for inline image use'')


{{User:Llamageddon/RrtyItem|Missing Link|Missing Link|Missing Link|Missing Link|Missing Link|Missing Link}}
=== Testing ===
{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} Test
{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}Testytest


{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}


=== List Layout ===
*{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}
Sometimes spacing can change depending on bullet list types, whitespace and transitions. Rarely noticeable or significant, but the following is included for reference.
** {{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}
 
** {{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}
{{User:Llamageddon/RrtyItem|Stuffed Bear B|c|tooltip}}a
{{User:Llamageddon/RrtyItem|Warhammer|legendary}}b
{{User:Llamageddon/RrtyItem|Club|veryrare}}c
 
{{User:Llamageddon/RrtyItem|Mace|rare}}d
 
{{User:Llamageddon/RrtyItem|Stuffed Bear B|c|tooltip}}a
 
{{User:Llamageddon/RrtyItem|Warhammer|legendary}}b
 
*{{User:Llamageddon/RrtyItem|Club|veryrare}}c
*{{User:Llamageddon/RrtyItem|Mace|rare}}d
*{{User:Llamageddon/RrtyItem|Stuffed Bear B|c|tooltip}}a
:{{User:Llamageddon/RrtyItem|Warhammer|legendary}}b
:{{User:Llamageddon/RrtyItem|Club|veryrare}}c
:{{User:Llamageddon/RrtyItem|Mace|rare}}d
#{{User:Llamageddon/RrtyItem|Stuffed Bear B|c|tooltip}}a
#{{User:Llamageddon/RrtyItem|Warhammer|legendary}}b
#{{User:Llamageddon/RrtyItem|Club|veryrare}}c
 
#{{User:Llamageddon/RrtyItem|Mace|rare}}d
</noinclude>
</noinclude>

Latest revision as of 04:20, 17 September 2023


This is a template for colouring icon borders depending on the value of a 'rarity' variable. The icon size is set to the standard 25px maximum height for inline use by default. _Item_Icon.png is set as the default image type.

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]

  • Only first parameter defined.
{{User:Llamageddon/RrtyItem|Mace}}

TestMace Item Icon.png


  • Using shortcuts for rarity and image type, and item keyword in 4th to copy item name as text link.
{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}

Test2 Armour of Uninhibited Kushigo Icon.png Armour of Uninhibited Kushigo


  • Unrecognised value in 3rd. Link and link text in 4th and 5th.
{{User:Llamageddon/RrtyItem|Mace|v|x|List of Weapons#Very Rare|A very rare mace.}}

Mace Item Icon.png  A very rare mace.


  • Using a tooltip (large "faded") image. Shortcuts in 2nd and 3rd, custom link in 4th, keyword notext in 5th, and small in 6th.
{{User:Llamageddon/RrtyItem|Longsword|u|tt|List of Weapons#Uncommon|notext|small}}

Longsword Icon.png 


  • Blank image type.
{{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}}

Longbow Item Icon.png  Longbows


  • Larger than native icon resolution defined.
{{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}}

Warhammer Item Icon.png


  • Missing page/icon links and unrecognised or invalid values.
{{User:Llamageddon/RrtyItem|Missing Link|Link Missing|Missing Link|Link Missing|Missing Link|Link Missing}}

File:Missing Link Item Icon.png  Missing Link

Shortcuts and Keywords[edit | edit source]

Rarity and Colour[edit | edit source]

2nd parameter

Default/null value: common = #48484899

(u) uncommon = #01BD3999
(r) rare = #01BFFF99
(v) veryrare = #D1017B99
(l) legendary = #B7861D99
(s) story = #FF590199

Image Type[edit | edit source]

3rd parameter

Default/null value: (ii) = Item Icon.png

(tt) tooltip = Icon.png
(im) unfaded = Item Image.png

Link and Text Keywords[edit | edit source]

4th parameter

item = Copy in the item name (1st parameter) as the link text.

5th parameter

notext = Don't use any custom link (4th parameter) as a text link.

Image Size[edit | edit source]

6th parameter

Default/null value: inline = 25px

large = 380px (Native "faded" tooltip resolution)
medium = 144px (Most common native "unfaded" tooltip resolution)
small = 40px (Native item icon resolution)
inline = 25px (Typical size for inline image use)

Testing[edit | edit source]

Armour of Uninhibited Kushigo Icon.png Armour of Uninhibited Kushigo Test Armour of Uninhibited Kushigo Icon.png Armour of Uninhibited KushigoTestytest

Armour of Uninhibited Kushigo Icon.png Armour of Uninhibited Kushigo