Module:AbilityHints/doc: Difference between revisionsGive feedback
Docs: update CONFIG contract — item replaced by file + link; note the absolute-URL requirement for suppressing Page Previews (with help from vergir-bot LLM) |
Document unlinked automatic icons and linkable tooltips (with help from vergir-bot LLM) |
||
| Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
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 displays a configured image | 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 displays a configured image and has a hover tooltip. Automatic icons are not clickable; the links live in the tooltip text instead, and the tooltip can be hovered into to reach them. | ||
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). | 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). | ||
| Line 22: | Line 22: | ||
| <code>file</code> || Image file to display, e.g. <code>Reactive Barrier.png</code>. | | <code>file</code> || Image file to display, e.g. <code>Reactive Barrier.png</code>. | ||
|- | |- | ||
| <code>tip</code> || Hover tooltip text. May contain wikilinks and simple HTML (<code><nowiki><br></nowiki></code>, <code><nowiki><b></nowiki></code>). | |||
| <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: pick the triggering <code>list</code>, the display <code>file | To add an icon, add a <code>CONFIG</code> row: pick the triggering <code>list</code>, the display <code>file</code>, and the <code>tip</code>. The <code>file</code> is arbitrary — it need not correspond to a single item. To re-scope which abilities an icon covers, edit the list in [[Module:AbilityTable/Lists]]. | ||
== See also == | == See also == | ||
Revision as of 12:01, 15 July 2026
Overview
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 displays a configured image and has a hover tooltip. Automatic icons are not clickable; the links live in the tooltip text instead, and the tooltip can be hovered into to reach them.
Membership is decided by is_member in Module:AbilityTable. To change ability-icon matching, edit Module:AbilityTable/Lists (this will also update relevant ability tables).
Entry point
p.get_icons(ability_key, ability_num)
Returns the rail HTML for one ability, or an empty string when the ability matches no lists. ability_key is the ability's Key (from Data:AbilityCards.json); ability_num is its slot (1–4).
Configuration
CONFIG
Ordered list of the icons the rail can show; order here is the display order. Each entry:
| Field | Description |
|---|---|
list |
List name in Module:AbilityTable/Lists whose membership triggers the icon. |
file |
Image file to display, e.g. Reactive Barrier.png.
|
tip |
Hover tooltip text. May contain wikilinks and simple HTML (<br>, <b>).
|
To add an icon, add a CONFIG row: pick the triggering list, the display file, and the tip. The file is arbitrary — it need not correspond to a single item. To re-scope which abilities an icon covers, edit the list in Module:AbilityTable/Lists.
See also
- Module:AbilitySection — renders the rail into the ability section
- Module:AbilityTable — provides
is_memberand the lists - Template:AbilitySection/styles.css — rail and tooltip styling