Template:AbilityInteraction/doc: Difference between revisionsGive feedback
Rewrite for the interaction registry: three parameters, self-generating registry table, and a pointer to IconBox for custom boxes (with help from vergir-bot LLM) |
m update doc |
||
| Line 1: | Line 1: | ||
== Usage == | == Usage == | ||
{{tl|AbilityInteraction}} displays a boxed note describing how an ability interacts with an item or mechanic. | {{tl|AbilityInteraction}} displays a boxed note describing how an ability interacts with an item or mechanic. Under the hood it is a fancy wrapper around {{tl|IconBox}}. | ||
To use this template, look at the list of possible Interactions and examples of usage below. | |||
== Parameters == | == Parameters == | ||
| Line 13: | Line 9: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": " | "description": "", | ||
"params": { | "params": { | ||
"interaction": { | "interaction": { | ||
| Line 20: | Line 16: | ||
"required": true, | "required": true, | ||
"example": "debuff resist", | "example": "debuff resist", | ||
"suggestedvalues": [ " | "suggestedvalues": [ "(see full list below)" ] | ||
}, | }, | ||
"text": { | "text": { | ||
| Line 37: | Line 33: | ||
} | } | ||
</templatedata> | </templatedata> | ||
== Examples == | == Examples == | ||
| Line 102: | Line 84: | ||
| text = This ability is '''not''' interrupted by [[Slowing Hex]]. | | text = This ability is '''not''' interrupted by [[Slowing Hex]]. | ||
}} | }} | ||
== Interactions == | |||
This table is generated from the registry, so it always matches what the template accepts. | |||
{{#invoke:AbilityInteraction|list}} | |||
=== Adding an interaction === | |||
Add an entry to the {{code|REGISTRY}} table at the top of [[Module:AbilityInteraction]]. An entry should contain {{code|title}}, {{code|type}}, {{code|iconfile}}, and {{code|link}}, which pass down to the underlying {{tl|IconBox}}. The {{code|aliases}} just specifies different ways to write an interaction. | |||
<noinclude>[[Category:Template documentation]]</noinclude> | <noinclude>[[Category:Template documentation]]</noinclude> | ||
Revision as of 15:52, 15 July 2026
Usage
{{AbilityInteraction}} displays a boxed note describing how an ability interacts with an item or mechanic. Under the hood it is a fancy wrapper around {{IconBox}}.
To use this template, look at the list of possible Interactions and examples of usage below.
Parameters
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| interaction | interaction | Name of the interaction in the registry. Case-insensitive, and aliases are accepted. The Interactions section of this page lists every available name.
| String | required |
| text | text | Wikitext shown in the box body. May contain wikilinks, templates such as AbilityIcon, and lists. | Content | required |
| state | state | Omit when the interaction applies normally. Use partial when it applies only in part, or disabled when it does not apply at all.
| String | optional |
Examples
Standard interaction
{{AbilityInteraction
| interaction = dispel
| text =
* Any dispel immediately "drops" the target off the cart.
}}
- Any dispel immediately "drops" the target off the cart.
Partial interaction
{{AbilityInteraction
| interaction = unstoppable
| state = partial
| text =
* Dispels and protects against [[Move Slow]].
* Does not dispel or protect against the accuracy debuff.
}}
- Dispels and protects against Move Slow.
- Does not dispel or protect against the accuracy debuff.
Interaction that does not apply
{{AbilityInteraction
| interaction = slowing hex
| state = disabled
| text = This ability is '''not''' interrupted by [[Slowing Hex]].
}}
This ability is not interrupted by Slowing Hex.
Interactions
This table is generated from the registry, so it always matches what the template accepts.
| Interaction | Example |
|---|---|
ability duration / duration / duration extender
|
Example text. |
ability range / range / greater expansion
|
Example text. |
cooldown / ability cooldown / superior cooldown
|
Example text. |
debuff resist / debuff reducer
|
Example text. |
dispel / dispel magic / purge / cleanse
|
Example text. |
echo shard
|
Example text. |
heal / healing / healing booster
|
Example text. |
heroic aura
|
Example text. |
indomitable
|
Example text. |
interrupt / knockdown / stun
|
Example text. |
monster rounds
|
Example text. |
plated armor
|
Example text. |
reactive barrier
|
Example text. |
slowing hex
|
Example text. |
stealth / Veil Walker
|
Example text. |
unstoppable
|
Example text. |
Adding an interaction
Add an entry to the REGISTRY table at the top of Module:AbilityInteraction. An entry should contain title, type, iconfile, and link, which pass down to the underlying {{IconBox}}. The aliases just specifies different ways to write an interaction.