This is the documentation page for Module:Datatable/Icons
Example of adding a new Icon:
p.icons = {
...
["Mint Rag"] = {iconFile = "FulliconAddon mintRag.png"},
...
}
Attention! Do not move the first item in list!
Attention 2! Use the Spacebar for padding a new line!
Retrieving Icon Filename[]
{{#Invoke:Utils|getIcon|Mint Rag}}
Will simply provide the iconFile value of Mint Rag. The first parameter is the name of icon you're looking for. After calling the function you get this:
IconAddon mintRag.png
- After entering it instead of filename like that
[[File:{{#Invoke:Utils|getIcon|Mint Rag}}|128px|thumb|center]]
Will result into this:
- Since the new Assembly system to get the background along with addon icon we call assembleImage function like this:
{{#Invoke:Utils|assembleImage|addon|Mint Rag|rarity=5}}
Parameters[]
iconFile
- [Mandatory] property keeping the name of file and used to this purpose, right now.category
- [Optional] is a categorisation of game element, that can be used for various purposes. Currently there are these categories:- Addon
- Item
- Offering
- PEBuff - Player Effect Buff
- PEDebuff - Player Effect Debuff
- Perk
- SEBuff - Status Effect Buff
- SEDebuff - Status Effect Debuff
padding[Top/Right/Bottom/Left]
- [Optional] allows to adjust the padding around the image to avoid being too close or too far from the link.- Example:
paddingLeft = "5px"
- Example:
ilRes
- [Optional] allows to adjust the resolution of the image (default resolution is 32px).- Example:
ilRes = "24px"
- Example:
assemble
- [Optional] Indicates that the icon is part of icon with background.
This documentation explains how the IconLink Template works and is to be used:
Formatting[]
{{#Invoke:Utils|IconLink|Parameter 1}}
or
{{#Invoke:Utils|IconLink|Parameter 1|Parameter 2}}
or
{{#Invoke:Utils|IconLink|Parameter 1|Parameter 2|Parameter 3}}
Parameters[]
Parameter 1
- [Mandatory] - Name of the Icon- e.g. Amanita Toxin / Iridescent King / New Moon Bouquet / Chainsaw
Parameter 2
- [Optional] - Name of Page link- e.g. IconPerks / IconFavors / FulliconAddon / FulliconItems / IconHelp / IconHelpLoading / IconItems
- Value:
img
- [Optional] - shows only image - Value:
linkless
- [Optional] - gives the link away and leave the icon after simple text (used for expressions that have the icon but not the dedicated page that can be redirected to)
Parameter 3
- [Optional] - Displayed text- e.g. amanitaToxin / iridescentKing / newMoonBouquet / chainsaw
Parameter 4
orbg
- [Optional] If the icon has background option it can be set whether it should be retrieved or not- default value is set to
true
so if the icon hasassembly = true
set the background will be also retrieved
- default value is set to
I.E.
- 1-parameter version uses the variable for all three parts
- 2-parameter version uses the second parameter is used to Page link and will display the same
- If the second parameter is
img
the template shows only the image itself
- If the second parameter is
Example[]
Formatting the Template like this
{{#Invoke:Utils|IconLink|Killer|Killers|Killer's}}
will return Killer's.
{{#Invoke:Utils|IconLink|Entity}}
will return Entity.
{{#Invoke:Utils|IconLink|Survivor|img}}
{{#Invoke:Utils|IconLink|Survivors|Dwight Fairfield}}
will return Survivors. IconLink will use Survivors as a reference to lookup the image. The link will display redirect to Dwight Fairfield page.
{{#Invoke:Utils|IconLink|Nemesis T-Type|The Nemesis|Nemesis}}
will return Nemesis. The link will redirect to the second parameter, but display the third parameter.
{{#Invoke:Utils|IconLink|Movement Speed|linkless=1}}
{{#Invoke:Utils|IconLink|Iridescent Amulet}}
will return Iridescent Amulet
{{#Invoke:Utils|IconLink|Iridescent Amulet|bg=false}}
will return Iridescent Amulet
This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.
This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.