Template:Icon

Revision as of 22:51, 13 November 2021 by Auron956 (talk | contribs) (Use Module:Icons, ensuring consistent logic for icons in both Lua generated & user-written content)

A generic version of the template used in things like Template:ItemIcon or Template:UpgradeIcon.

You probably want to use one of the following instead for most things:

For example: {{ItemIcon|Raw Trout}} becomes Raw Trout.

Some icon categories/types do not have these shorthand templates, so instead the type parameter should be used: {{Icon|<IconName>|type=<IconType>}}. The types this applies to are as follows:

  • mark for Summoning marks
  • spell for standard and ancient magick spells
  • curse for curse spells
  • aurora for aurora spells
  • thieving for Thieving NPCs
  • constellation for Astrology constellations

Format is like so: {{Icon|Castle of Kings|Knight Time|type=combatArea}} becomes

Error creating thumbnail: File missing
Knight Time

. You can also just do {{Icon|Combat}}

Error creating thumbnail: File missing
Combat

if you need an icon for an image that doesn't belong to a given category.

Some special overrides exist:

Input Output
{{Icon|Melee}}
Error creating thumbnail: File missing
Melee
{{Icon|Item Alchemy}}
Error creating thumbnail: File missing
Item Alchemy
{{Icon|Superheat}}
Error creating thumbnail: File missing
Superheat
{{Icon|Basic Resupply}} Basic Resupply
{{Icon|Standard Resupply}} Standard Resupply
{{Icon|Generous Resupply}} Generous Resupply
{{Icon|Golbin|type=monster}} Golbin
{{Icon|Spider (lv. 51)|type=monster}} Spider (lv. 51)
{{Icon|Spider2|type=monster}} File:Spider2 (monster).png Brown Spider
{{Icon|Alt. Magic|type=skill}}
Error creating thumbnail: File missing
Alt. Magic

Other options:

The 'notext' option sends only the image (with link), so {{Icon|Mastery|notext=true}} becomes

Error creating thumbnail: File missing

The 'menu' option formats the icon in a handy table (useful for menuboxes) so {{Icon|Combat|menu=true}} becomes

Error creating thumbnail: File missing
Combat

The 'qty' option allows you to specify a number of items to go between the icon and the text, so {{Icon|Elder Dragonhide|qty=5000|type=item}} becomes 5,000 Elder Dragonhide

The 'size' option allows you to specify larger icons, so {{Icon|Combat|notext=true|size=50}} becomes

Error creating thumbnail: File missing