User:Llamageddon/RrtyItem: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
mNo edit summary
Line 32: Line 32:
| inline = 25px  
| 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}};">}}
{{#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}}]] | [[File:{{#lvar:item}}&nbsp;{{#lvar:sufx}}|{{#lvar:pixl}}|{{#Ifeq: {{#lvar:link}} | item | link={{#lvar:item}} | link={{#lvar:link}}}}]]</span>&nbsp;{{#Ifeq: {{#lvar:link}} | item | [[{{#lvar:item}}]] | {{#Ifeq: {{#lvar:text}} | notext | | [[{{#lvar:link}}|{{#lvar:text}}]]}}}};}}&nbsp;</includeonly><noinclude>__NOTOC__
}}{{#lvar:spna}}{{#Ifeq: {{#lvar:link}} | | [[File:{{#lvar:item}}&nbsp;{{#lvar:sufx}}|{{#lvar:pixl}}]] | [[File:{{#lvar:item}}&nbsp;{{#lvar:sufx}}|{{#lvar:pixl}}|{{#Ifeq: {{#lvar:link}} | item | link={{#lvar:item}} | link={{#lvar:link}}}}]]</span>&nbsp;{{#Ifeq: {{#lvar:link}} | item | [[{{#lvar:item}}]] | {{#Ifeq: {{#lvar:text}} | notext | | [[{{#lvar:link}}|{{#lvar:text}}]]}}}}&nbsp;}}</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, and {{C|common}} is the default rarity setting.
Line 128: Line 127:
Sometimes spacing can change depending on bullet list types, whitespace and transitions. Rarely noticeable, but the following is included for reference.
Sometimes spacing can change depending on bullet list types, whitespace and transitions. Rarely noticeable, but the following is included for reference.


{{User:Llamageddon/RrtyItem|Stuffed Bear B|c|tooltip}}
{{User:Llamageddon/RrtyItem|Stuffed Bear B|c|tooltip}} a


{{User:Llamageddon/RrtyItem|Warhammer|legendary}}
{{User:Llamageddon/RrtyItem|Warhammer|legendary}} b


{{User:Llamageddon/RrtyItem|Club|veryrare}}
{{User:Llamageddon/RrtyItem|Club|veryrare}} c
*{{User:Llamageddon/RrtyItem|Mace|rare}}
*{{User:Llamageddon/RrtyItem|Mace|rare}} d


*{{User:Llamageddon/RrtyItem|Stuffed Bear B|c|tooltip}}
*{{User:Llamageddon/RrtyItem|Stuffed Bear B|c|tooltip}} a
*{{User:Llamageddon/RrtyItem|Warhammer|legendary}}
*{{User:Llamageddon/RrtyItem|Warhammer|legendary}} b
:{{User:Llamageddon/RrtyItem|Club|veryrare}}
:{{User:Llamageddon/RrtyItem|Club|veryrare}} c


:{{User:Llamageddon/RrtyItem|Mace|rare}}
:{{User:Llamageddon/RrtyItem|Mace|rare}} d
:{{User:Llamageddon/RrtyItem|Stuffed Bear B|c|tooltip}}
:{{User:Llamageddon/RrtyItem|Stuffed Bear B|c|tooltip}} a
#{{User:Llamageddon/RrtyItem|Warhammer|legendary}}
#{{User:Llamageddon/RrtyItem|Warhammer|legendary}} b


#{{User:Llamageddon/RrtyItem|Club|veryrare}}
#{{User:Llamageddon/RrtyItem|Club|veryrare}} c
#{{User:Llamageddon/RrtyItem|Mace|rare}}
#{{User:Llamageddon/RrtyItem|Mace|rare}} d
</noinclude>
</noinclude>

Revision as of 11:02, 7 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, and common is the default rarity setting.

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.

Shortcuts and Keywords

Rarity and Colour

2nd parameter

Default/null value: (c) common - #1B1A1999

  • (u) uncommon = #00491599
  • (r) rare = #00374999
  • (v) veryrare = #54003299
  • (l) legendary = #563E0D99
  • (s) story = #561D0099

Image Type

3rd parameter

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

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

Link and Text Keywords

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

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)

Examples

{{User:Llamageddon/RrtyItem|Mace}}

Only first parameter defined.

Mace Item Icon.png 


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

Using shortcuts for rarity and image type, and item keyword in 4th to copy item name as text link.

Armour of Uninhibited Kushigo Icon.png Armour of Uninhibited Kushigo


{{User:Llamageddon/RrtyItem|Mace|v|x|List_of_Weapons#Very_Rare|A very rare mace.}}

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

Mace Item Icon.png A very rare mace.


{{User:Llamageddon/RrtyItem|Longsword|u|tt|List_of_Weapons#Uncommon|notext|small}}

Using a tooltip (large "faded") image. Shortcuts in 2nd and 3rd, custom link in 4th, keyword notext in 5th, and small in 6th.

Longsword Icon.png ; 


{{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}}

Blank image type.

Longbow Item Icon.png Longbows


{{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}}

Larger than native icon resolution defined.

Warhammer Item Icon.png 


{{User:Llamageddon/RrtyItem|Missing Link|Missing Link|Missing Link|Missing Link|Missing Link|Missing Link}}

Missing page/icon links and unrecognised or invalid values.

File:Missing Link Item Icon.png Missing Link


List Layout

Sometimes spacing can change depending on bullet list types, whitespace and transitions. Rarely noticeable, but the following is included for reference.

Stuffed Bear B Icon.png  a

Warhammer Item Icon.png  b

Club Item Icon.png  c

  • Mace Item Icon.png  d
  • Stuffed Bear B Icon.png  a
  • Warhammer Item Icon.png  b
Club Item Icon.png  c
Mace Item Icon.png  d
Stuffed Bear B Icon.png  a
  1. Warhammer Item Icon.png  b
  1. Club Item Icon.png  c
  2. Mace Item Icon.png  d