Editing Module:Icon/doc

Jump to navigation Jump to search
Warning: You are not logged in. Once you make an edit, a temporary account will be created for you. Learn more. Log in or create an account to continue receiving notifications after this account expires, and to access other features.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
Main module for rendering game icons.
Main module for rendering game icons (heroes, abilities, and items).


'''Note: This module is not intended for direct use.''' Use the templates below.
'''Note: This module is not intended for direct use.''' Use the templates below.


== Data sources ==
== Data Sources ==
The module reads from [[Data:ResourceLookup.json]], a pre-indexed lookup table generated by [[User:Deadbot|Deadbot]] at deploy time. When the bot uploads new game files, hero, ability, and item icons update automatically.
The module automatically reads from:
* [[Data:HeroData.json]] - Hero information
* [[Data:AbilityData.json]] - Ability information 
* [[Data:ItemData.json]] - Item information


An additional resource for other icons can be found at [[Data:ResourceLookup2.json]], a manually maintained table; some entries may rely on a dictionary key.
When the bot uploads new game files, icons update automatically.


See [[Module:Icon/data]] for manual overrides, legacy items, aliases, and renames used by this module.
== Usage ==
Any of these templates work for any icon type (hero, ability, or item). The module auto-detects the type:
 
* {{tl|HeroIcon}} - Can display heroes, abilities, or items
* {{tl|AbilityIcon}} - Can display heroes, abilities, or items 
* {{tl|ItemIcon}} - Can display heroes, abilities, or items
 
'''Note:''' While all three templates work identically, you can use whichever name makes the wiki source code more readable (e.g., use <nowiki>{{AbilityIcon|Siphon Life}}</nowiki> for clarity even though <nowiki>{{HeroIcon|Siphon Life}}</nowiki> works the same).


== Usage ==
== Error Tracking ==
Any of the following templates can be used. The module automatically detects the icon type:
Icons that fail to render are tracked in: [[:Category:Module:Icon ERROR]]
* {{tl|HeroIcon}}
* {{tl|AbilityIcon}}
* {{tl|ItemIcon}}
* {{tl|EntityIcon}}


'''Note:''' While all four templates work identically, it is recommended to use the appropriate one for clarity (e.g., use <nowiki>{{AbilityIcon|Siphon Life}}</nowiki> even though <nowiki>{{HeroIcon|Siphon Life}}</nowiki> will also work).
== Aliases ==
Some icons have alternate names that redirect to the correct entry:
* "Doorman" → "The Doorman"
* "Mo and Krill" / "Mo" / "Krill" → "Mo & Krill"
* "Curse" → "Cursed Relic"
* "Debuff Remover" → "Dispel Magic"


== Error tracking ==
To add new aliases, edit the aliases table in [[Module:Icon]].
Icons that fail to render are added to [[:Category:Module:Icon ERROR]].
<includeonly>[[Category:Modules]]</includeonly><noinclude>[[Category:Module documentation]]</noinclude>
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Deadlock:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template

Page included on this page: