Template:Rarity item: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(add icon override)
No edit summary
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly><onlyinclude>{{ItemIcon
<includeonly><onlyinclude>{{ItemIcon
|name={{{1}}}
|name={{{1}}}
|uid={{{uid|}}}
|size={{{2|25}}}
|size={{{2|25}}}
|alias={{{alias|}}}
|alias={{{alias|}}}
|nowrap={{{nowrap|}}}
|no_padding=true
|no_padding=true
|show_name=true
|show_name=true
|show_rarity=true
|show_rarity=true
|override_icon={{{override_icon|}}}  
|override_icon={{{override_icon|}}}
|override_rarity={{{override_rarity|}}}
|override_rarity={{{override_rarity|}}}
}}</onlyinclude></includeonly><noinclude>
}}</onlyinclude></includeonly><noinclude>
See [[Template:ItemIcon/Family]] for more variations of ItemIcon.
Other options
* [[Template:LgRarityItem]]- sets the default size to 40 instead of 25
* [[Template:MdRarityItem]] - sets the default size to 30 instead of 25
* [[Template:SmRarityItem]] - sets the default size to 20 instead of 25


{| class="wikitable"
{| class="wikitable"
|+Icon Sizes
!Name
!Example
!Size
|-
|-
|<code><nowiki>{{RarityItem|Potion of Supreme Healing}}</nowiki></code> || {{RarityItem|Potion of Supreme Healing}}
|SmRarityItem:
|{{SmRarityItem|Potion of Supreme Healing}}
|20
|-
|-
|<code><nowiki>{{RarityItem|Potion of Supreme Healing|40}}</nowiki></code> || {{RarityItem|Potion of Supreme Healing|40}}
|RarityItem:
|{{RarityItem|Potion of Supreme Healing}}
|25
|-
|-
|<code><nowiki>{{RarityItem|Potion of Supreme Healing|alias=Supremey Boi}}</nowiki></code> || {{RarityItem|Potion of Supreme Healing|alias=Supremey Boi}}
|MdRarityItem:
|{{MdRarityItem|Potion of Supreme Healing}}
|30
|-
|LgRarityItem:
|{{LgRarityItem|Potion of Supreme Healing}}
|40
|}
|}
 
== Examples ==
See [[Template:ItemIcon/Family]] for more variations of ItemIcon.
{{Template demo
 
| style = table
{{RarityItem|Shovel (item)}} {{RarityItem|Shovel (item)|override_icon=Ring G Faded.png|override_rarity=uncommon}}
| <nowiki>{{RarityItem|Potion of Supreme Healing}}</nowiki>
| <nowiki>{{RarityItem|Potion of Supreme Healing|40}}</nowiki>
| <nowiki>{{RarityItem|Potion of Supreme Healing|alias=Supremey Boi}}</nowiki>
| <nowiki>{{RarityItem|Leather Armour|uid=UNI_Leather_Minsc}}</nowiki>
| <nowiki>{{RarityItem|Handmaiden's Mace|override_icon=Ring G Faded.png|override_rarity=uncommon}}</nowiki>
}}


<templatedata>
<templatedata>
Line 29: Line 57:
"description": "The name of the item ",
"description": "The name of the item ",
"type": "wiki-page-name",
"type": "wiki-page-name",
"required": true
"required": true,
"label": "name"
},
},
"2": {
"2": {
"description": "(optional) Size of the item's icon. Default 25",
"description": "(optional) Size of the item's icon. Default 25",
"type": "number"
"type": "number",
"label": "size",
"suggestedvalues": [
"25",
"30",
"40"
]
},
},
"alias": {
"alias": {
Line 43: Line 78:
"override_rarity": {
"override_rarity": {
"description": "If specified along with override_icon, sets the rarity."
"description": "If specified along with override_icon, sets the rarity."
},
"uid": {
"description": "The uid of the item. If specified, will search by UID *instead of* item name. Must be specified with the name parameter as well."
}
}
},
},
"description": "Inserts an item's icon, rarity colours, and name into a page. Specialization of Template:ItemIcon."
"description": "Inserts an item's icon, rarity colours, and name into a page. Specialization of Template:ItemIcon.",
"paramOrder": [
"1",
"2",
"uid",
"alias",
"override_icon",
"override_rarity"
]
}
}
</templatedata></noinclude>
</templatedata>
 
[[Category:Icon templates]]
[[Category:Templates]]
</noinclude>

Latest revision as of 22:24, 23 October 2024


See Template:ItemIcon/Family for more variations of ItemIcon.

Other options

Icon Sizes
Name Example Size
SmRarityItem: Potion of Supreme Healing 20
RarityItem: Potion of Supreme Healing 25
MdRarityItem: Potion of Supreme Healing 30
LgRarityItem: Potion of Supreme Healing 40

Examples

Markup Renders as
{{RarityItem|Potion of Supreme Healing}}
Potion of Supreme Healing
{{RarityItem|Potion of Supreme Healing|40}}
Potion of Supreme Healing
{{RarityItem|Potion of Supreme Healing|alias=Supremey Boi}}
Supremey Boi
{{RarityItem|Leather Armour|uid=UNI_Leather_Minsc}}
Leather Armour
{{RarityItem|Handmaiden's Mace|override_icon=Ring G Faded.png|override_rarity=uncommon}}
Handmaiden's Mace

Inserts an item's icon, rarity colours, and name into a page. Specialization of Template:ItemIcon.

Template parameters

ParameterDescriptionTypeStatus
name1

The name of the item

Page namerequired
size2

(optional) Size of the item's icon. Default 25

Suggested values
25 30 40
Numberoptional
uiduid

The uid of the item. If specified, will search by UID *instead of* item name. Must be specified with the name parameter as well.

Unknownoptional
aliasalias

(optional) If specified, renames link text to this.

Unknownoptional
override_iconoverride_icon

If specified, overrides the icon.

Unknownoptional
override_rarityoverride_rarity

If specified along with override_icon, sets the rarity.

Unknownoptional