User:Llamageddon/RrtyItem: Difference between revisions
Jump to navigation
Jump to search
Llamageddon (talk | contribs) mNo edit summary |
Llamageddon (talk | contribs) mNo edit summary |
||
Line 7: | Line 7: | ||
{{#lvardef: size | {{{6 |}}} }} | {{#lvardef: size | {{{6 |}}} }} | ||
{{#lvardef: cols | {{#switch: {{#lvar:rrty}} | {{#lvardef: cols | {{#switch: {{#lvar:rrty}} | ||
| c | |||
| common = #48484899 | | common = #48484899 | ||
| uncommon | | uncommon | ||
| u = #01BD3999 | | u = #01BD3999 | ||
| rare | | rare | ||
| r = #01BFFF99 | | r = #01BFFF99 | ||
| veryrare | | veryrare | ||
| v = #D1017B99 | | v = #D1017B99 | ||
| legendary | | legendary | ||
| l = #B7861D99 | | l = #B7861D99 | ||
| story | | story | ||
| s = #FF590199 | | s = #FF590199 | ||
| #48484899 }} }} | | #48484899 }} }} | ||
{{#lvardef: scol | {{#switch: {{#lvar:rrty}} | {{#lvardef: scol | {{#switch: {{#lvar:rrty}} | ||
| common | |||
| c = common | |||
| uncommon | |||
| u = uncommon | | u = uncommon | ||
| rare | |||
| r = rare | | r = rare | ||
| veryrare | |||
| very rare | |||
| v = veryrare | | v = veryrare | ||
| legendary | |||
| l = legendary | | l = legendary | ||
| story | |||
| s = story | | s = story | ||
| common }} }} | | common }} }} | ||
{{#lvardef: sufx | {{#switch: {{#lvar:file}} | {{#lvardef: sufx | {{#switch: {{#lvar:file}} | ||
Line 61: | Line 64: | ||
== Examples == | == Examples == | ||
*Only first parameter defined. | |||
{{C|<nowiki>{{User:Llamageddon/RrtyItem|Mace}}</nowiki>}} | :{{C|<nowiki>{{User:Llamageddon/RrtyItem|Mace}}</nowiki>}} | ||
{{User:Llamageddon/RrtyItem|Mace}} | {{User:Llamageddon/RrtyItem|Mace}} | ||
{{ | *Using shortcuts for rarity and image type, and {{InfoBlob|item}} keyword in 4th to copy item name as text link. | ||
: | :{{C|<nowiki>{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}</nowiki>}} | ||
{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | {{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | ||
*Unrecognised value in 3rd. Link and link text in 4th and 5th. | |||
: | :{{C|<nowiki>{{User:Llamageddon/RrtyItem|Mace|v|x|List of Weapons#Very Rare|A very rare mace.}}</nowiki>}} | ||
{{User:Llamageddon/RrtyItem|Mace|v|x|List of Weapons#Very Rare|A very rare mace.}} | {{User:Llamageddon/RrtyItem|Mace|v|x|List of Weapons#Very Rare|A very rare 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>}} | ||
{{User:Llamageddon/RrtyItem|Longsword|u|tt|List of Weapons#Uncommon|notext|small}} | {{User:Llamageddon/RrtyItem|Longsword|u|tt|List of Weapons#Uncommon|notext|small}} | ||
*Blank image type. | |||
: | :{{C|<nowiki>{{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}}</nowiki>}} | ||
{{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}} | {{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}} | ||
*Larger than native icon resolution defined. | |||
: | :{{C|<nowiki>{{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}}</nowiki>}} | ||
{{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}} | {{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}} | ||
*Missing page/icon links and unrecognised or invalid values. | |||
:Missing | :{{C|<nowiki>{{User:Llamageddon/RrtyItem|Missing Link|Link Missing|Missing Link|Link Missing|Missing Link|Link Missing}}</nowiki>}} | ||
{{User:Llamageddon/RrtyItem|Missing Link|Link Missing|Missing Link|Link Missing|Missing Link|Link Missing}} | {{User:Llamageddon/RrtyItem|Missing Link|Link Missing|Missing Link|Link Missing|Missing Link|Link Missing}} |
Revision as of 01:03, 9 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
- Only first parameter defined.
{{User:Llamageddon/RrtyItem|Mace}}
- 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}}
- 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.}}
- 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}}
- Blank image type.
{{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}}
- Larger than native icon resolution defined.
{{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}}
- Missing page/icon links and unrecognised or invalid values.
{{User:Llamageddon/RrtyItem|Missing Link|Link Missing|Missing Link|Link Missing|Missing Link|Link Missing}}
Shortcuts and Keywords
Rarity and Colour
2nd parameter
Default/null value: common = #48484899
- (
u
)uncommon
= #01BD3999 - (
r
)rare
= #01BFFF99 - (
v
)veryrare
= #D1017B99 - (
l
)legendary
= #B7861D99 - (
s
)story
= #FF590199
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)