Template:Image rarity item: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Created page with "<includeonly>{{#cargo_query: tables = item_icon | fields = TRIM(icon) = icon, CONCAT('', '{{{w|50}}}') = size, LOWER(rarity) = rarity, CONCAT('', "{{{1}}}") = page, CONCAT('', "{{{2|{{{1}}}}}}") = alias | where = {{#if: {{{uid|}}} | item_icon.uid = "{{{uid}}}" | item_icon._pageName="{{{1}}}" }} | limit = 1 | order by = item_icon._pageName | default = {{Image rarity item/Format|icon={{{1}}} Unfaded Icon.png|size={{{w|50}}}|rarity=common|pa...")
(No difference)

Revision as of 07:26, 15 October 2024

This template is similar to RarityItem except it places the icon above the link to the item.

The default size is 50px (width and height).

Examples

Markup Renders as
{{Image rarity item|Moondrop Pendant}}

Moondrop Pendant
{{Image rarity item|Moondrop Pendant|Moon Pendant}}

Moon Pendant
{{Image rarity item|Moondrop Pendant|w=80}}

Moondrop Pendant

Template Data Section

Inserts an item's icon automatically. Can also display a link to the item.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
namename

The name of the icon. Identical to the item's page name.

Example
Potion of Healing
Page namerequired
uiduid

If specified, will instead search by UID.

Stringoptional
sizesize

The height of the item icon.

Suggested values
40 25 20
Default
40
Numberoptional
show_nameshow_name

If non-empty, will link the icon as well.

Booleanoptional
no_paddingno_padding

Whether to remove exterior padding. Advanced use.

Unknownoptional
show_rarityshow_rarity

If non-empty, will display an icon border corresponding to the rarity.

Booleanoptional
override_iconoverride_icon

If provided, will override the icon with the provided one.

Stringoptional
override_rarityoverride_rarity

If provided, will replace the fetched rarity.

Stringoptional
aliasalias

An alias for the item.

Stringoptional
wrapwrap

If non-empty, will allow the item icon to wrap.

Booleanoptional