Editing Module:AbilityHints/docGive feedback
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: | ||
== Overview == | == Overview == | ||
Renders a small strip of item icons showing how an ability interacts with items | Renders the interaction-hint rail on ability cards (via [[Module:AbilitySection]]): a small strip of item icons showing how an ability interacts with items — dispellable, duration-reduced, blocked, etc. Each icon links to its item and has a hover tooltip. | ||
Each icon | |||
Membership is decided by <code>is_member</code> in [[Module:AbilityTable]]. To change ability-icon matching, edit [[Module:AbilityTable/Lists]] (this will also update relevant ability tables). | |||
== Entry point == | == Entry point == | ||
=== <code>p.get_icons(ability_key, ability_num)</code> === | === <code>p.get_icons(ability_key, ability_num)</code> === | ||
Returns the rail HTML for one ability, or an empty string when the ability matches no lists. | Returns the rail HTML for one ability, or an empty string when the ability matches no lists. <code>ability_key</code> is the ability's <code>Key</code> (from [[Data:AbilityCards.json]]); <code>ability_num</code> is its slot (1–4). | ||
== Configuration == | == Configuration == | ||
=== <code>CONFIG</code> === | === <code>CONFIG</code> === | ||
Ordered list of the icons the rail can show; order here is the display order. Each entry: | |||
{| class="wikitable" | {| class="wikitable" | ||
| Line 23: | Line 20: | ||
| <code>list</code> || List name in [[Module:AbilityTable/Lists]] whose membership triggers the icon. | | <code>list</code> || List name in [[Module:AbilityTable/Lists]] whose membership triggers the icon. | ||
|- | |- | ||
| <code> | | <code>item</code> || Item whose icon represents the interaction (rendered via [[Module:Icon]]). | ||
|- | |- | ||
| <code>tip</code> || Hover tooltip text. May contain | | <code>tip</code> || Hover tooltip text. May contain simple HTML (<code><nowiki><br></nowiki></code>, <code><nowiki><b></nowiki></code>). | ||
|} | |} | ||
To add an icon, add a <code>CONFIG</code> row | To add an icon, add a <code>CONFIG</code> row referencing an existing list. To re-scope which abilities it covers, edit the list in [[Module:AbilityTable/Lists]]. | ||
== See also == | |||
* [[Module:AbilitySection]] — renders the rail into the ability section | |||
* [[Module:AbilityTable]] — provides <code>is_member</code> and the lists | |||
* [[Template:AbilitySection/styles.css]] — rail and tooltip styling | |||