Template:Icon/doc: Difference between revisions
(Document Earth Golem override) |
m (Add example for class param) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 9: | Line 9: | ||
* [[Template:SpellbookIcon]] for spellbooks themselves | * [[Template:SpellbookIcon]] for spellbooks themselves | ||
* [[Template:UpgradeIcon]] for upgrades (like the {{UpgradeIcon|Dragon Pickaxe}}) | * [[Template:UpgradeIcon]] for upgrades (like the {{UpgradeIcon|Dragon Pickaxe}}) | ||
* [[Template:Synergy]] for showing synergies between two familiars | |||
* [[Template:PetIcon]] for pets | * [[Template:PetIcon]] for pets | ||
* [[Template:PrayerIcon]] for prayers | * [[Template:PrayerIcon]] for prayers | ||
* [[Template:ZoneIcon]] for combat zones | * [[Template:ZoneIcon]] for combat zones | ||
* [[Template:ZoneTypeIcon]] for combat zone types (e.g. {{ZoneTypeIcon|Dungeons}}) | |||
* [[Template:ConstellationIcon]] for Astrology constellations | * [[Template:ConstellationIcon]] for Astrology constellations | ||
* [[Template:TownshipIcon]] for all types of Township icons | * [[Template:TownshipIcon]] for all types of Township icons | ||
* [[Template:AgilityIcon]] for Agility obstacles and pillars | * [[Template:AgilityIcon]] for Agility obstacles and pillars | ||
* [[Template:POIIcon]] for Cartography Points of Interest ('POIs') | |||
* [[Template:GP]], [[Template:SC]], or [[Template:RC]] for formatting of currencies (gold pieces, slayer coins, and raid coins respectively) | * [[Template:GP]], [[Template:SC]], or [[Template:RC]] for formatting of currencies (gold pieces, slayer coins, and raid coins respectively) | ||
* [[Template:PP]] for formatting of prayer points | |||
* [[Template:SlotIcon]] to display an equipment slot | |||
For example: {{T|ItemIcon|Raw Trout}} becomes {{ItemIcon|Raw Trout}}. | For example: {{T|ItemIcon|Raw Trout}} becomes {{ItemIcon|Raw Trout}}. | ||
Line 79: | Line 84: | ||
|- | |- | ||
| <code>section</code> || If specified, attempts to link to a particular section of the page being linked to || {{T|Icon|Bird Nest|type=item|section=Loot Table}} || {{Icon|Bird Nest|type=item|section=Loot Table}} | | <code>section</code> || If specified, attempts to link to a particular section of the page being linked to || {{T|Icon|Bird Nest|type=item|section=Loot Table}} || {{Icon|Bird Nest|type=item|section=Loot Table}} | ||
|- | |||
| <code>class</code> || If specified, add a css class to the icon || {{T|Icon|Township|type=skill|class=abyss-icon}} || {{Icon|Township|type=skill|class=abyss-icon}} | |||
|} | |} |
Latest revision as of 07:05, 8 October 2024
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:
- Template:ItemIcon for items
- Template:MonsterIcon for monsters
- Template:Skill for skill
- Template:SpellIcon for spells from any spellbook
- Template:SpellbookIcon for spellbooks themselves
- Template:UpgradeIcon for upgrades (like the Error creating thumbnail: File missingDragon Pickaxe)
- Template:Synergy for showing synergies between two familiars
- Template:PetIcon for pets
- Template:PrayerIcon for prayers
- Template:ZoneIcon for combat zones
- Template:ZoneTypeIcon for combat zone types (e.g. Error creating thumbnail: File missingDungeons)
- Template:ConstellationIcon for Astrology constellations
- Template:TownshipIcon for all types of Township icons
- Template:AgilityIcon for Agility obstacles and pillars
- Template:POIIcon for Cartography Points of Interest ('POIs')
- Template:GP, Template:SC, or Template:RC for formatting of currencies (gold pieces, slayer coins, and raid coins respectively)
- Template:PP for formatting of prayer points
- Template:SlotIcon to display an equipment slot
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 marksthieving
for Thieving NPCs
Format is like so: {{Icon|Castle of Kings|Knight Time|type=combatArea}}
becomes
.
You can also just do {{Icon|Combat}}
if you need an icon for an image that doesn't belong to a given category.
For Herblore potions, the generic potion page can be linked to by specifying the potion name without a tier, for example: {{Icon|Diamond Luck Potion}}
becomes Diamond Luck Potion.
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|Alt. Magic|type=skill}} |
Error creating thumbnail: File missing Alt. Magic
|
{{Icon|Earth Golem (AoD)|type=monster}} |
Error creating thumbnail: File missing Earth Golem
|
Other options:
Option | Description | Example | ||
---|---|---|---|---|
Input | Output | |||
type |
Specifies the icon type | {{Icon|Normal Log|type=item}} |
Normal Logs | |
ext |
Specifies the image's extension. This should almost always be automatically determined, therefore if this option is required for the correct image to display then there is likely an issue with extension overrides within Module:Icons | {{Icon|Golbin|ext=svg|type=monster}} |
Golbin | |
size |
Determines the height (in pixels) of the image. If not specified the default is 25px (or 23px if the menu option is used) |
{{Icon|Combat|size=50}} |
Error creating thumbnail: File missing Combat
| |
qty |
Specifies the number of item to go alongside the icon and text | {{Icon|Elder Dragonhide|qty=5000|type=item}} |
5,000 Elder Dragonhide | |
img |
If specified, this determines which image is used, in which case the first parameter only determines the link rather than the link and image | {{Icon|Mining|type=pet|img=Cool Rock}} |
Error creating thumbnail: File missing Mining
| |
notext |
If specified, only the image (with link) is generated | {{Icon|Mastery|notext=true}} |
Error creating thumbnail: File missing
| |
nolink |
If specified, the text is generated without a link | {{Icon|Mastery|nolink=true}} |
Error creating thumbnail: File missing Mastery
| |
noicon |
If specified, only the text (with link) is generated. This has limited use here, and was originally intended for use in Lua modules to allow for ease of disambiguating links | {{Icon|Cyclops|noicon=true|type=thieving}} |
Cyclops | |
menu |
Formats the icon in a handy table (useful for menuboxes) | {{Icon|Combat|menu=true}} |
| |
section |
If specified, attempts to link to a particular section of the page being linked to | {{Icon|Bird Nest|section=Loot Table|type=item}} |
Bird Nest | |
class |
If specified, add a css class to the icon | {{Icon|Township|class=abyss-icon|type=skill}} |
Township |