Template:AbilityInteraction/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
Vergir (talk | contribs)
Create documentation for AbilityInteraction template (with help from vergir-bot LLM)
 
Vergir (talk | contribs)
m clarify docs
Line 1: Line 1:
== Usage ==
== Usage ==
{{tl|AbilityInteraction}} displays a boxed note describing how a specific ability interacts with an item or mechanic. It is intended for hero and ability pages, where several boxes are usually stacked together. Each call renders one box: a coloured header and a body.


The header colour is set by the {{code|1=type}} parameter ({{code|positive}}, {{code|negative}}, or {{code|info}}). Setting {{code|1=state=disabled}} desaturates the icon to mark an interaction that does not apply. The {{code|1=link}} parameter accepts either a bare page name or a full URL.
{{tl|AbilityInteraction}} displays a boxed note describing how a specific ability interacts with an item or mechanic.
 
The header colour is set by the {{code|1=type}} parameter ({{code|positive}}, {{code|negative}}, or {{code|info}}). Setting {{code|1=state=disabled}} desaturates the icon to mark an interaction that does not apply.
 
== Parameters ==
 
<templatedata>
{
"description": "",
"params": {
"title": {
"description": "Text shown in the box header.",
"type": "string",
"required": true
},
"type": {
"description": "Header colour: positive (green), negative (red), or info (blue).",
"type": "string",
"required": true,
"suggestedvalues": [ "positive", "negative", "info" ]
},
"file": {
"description": "File name of the icon image, without the File: prefix.",
"type": "string",
"example": "Healing Booster.png",
"required": true
},
"link": {
"description": "Where the header and icon link. A bare page name (e.g. Healing Booster) or a full URL.",
"type": "string",
"example": "Healing Booster",
"required": true
},
"text": {
"description": "Wikitext shown in the box body. May contain wikilinks, templates such as AbilityIcon, and <br> for multiple lines.",
"type": "content"
},
"state": {
"description": "Set to disabled to desaturate the icon.",
"type": "string",
"suggestedvalues": [ "disabled" ]
}
},
"paramOrder": [ "title", "text", "type", "file", "link", "state" ],
"format": "block"
}
</templatedata>


== Examples ==
== Examples ==
=== Positive Interaction ===
<pre>
<pre>
{{AbilityInteraction
{{AbilityInteraction
| type  = positive
| type  = positive
| file  = Healing Booster.png
| file  = Melee Charge.png
| link  = Healing Booster
| link  = Melee Charge
| title = Healing Booster
| title = Melee
| text  = The [[Healing]] from this ability is amplified.
| text  = This ability benefits from Melee damage bonuses and triggers relevant item effects.
}}
}}
</pre>
</pre>
{{AbilityInteraction
{{AbilityInteraction
| type  = positive
| type  = positive
| file  = Healing Booster.png
| file  = Melee Charge.png
| link  = Healing Booster
| link  = Melee Charge
| title = Healing Booster
| title = Melee
| text  = The [[Healing]] from this ability is amplified.
| text  = This ability benefits from Melee damage bonuses and triggers relevant item effects.
}}
}}
=== Negative Interaction ===
<pre>
{{AbilityInteraction
| type  = negative
| file  = Debuff Reducer.png
| link  = Debuff Reducer
| title = Debuff Resist
| text  = The duration of movement slow and accuracy debuff can be shortened with [[Debuff Resist]].
}}
</pre>
{{AbilityInteraction
| type  = negative
| file  = Debuff Reducer.png
| link  = Debuff Reducer
| title = Debuff Resist
| text  = The duration of movement slow and accuracy debuff can be shortened with [[Debuff Resist]].
}}
=== Neutral interaction with disabled state ===


<pre>
<pre>
Line 41: Line 109:
}}
}}


<templatedata>
<noinclude>[[Category:Template documentation]]</noinclude>
{
"description": "Displays a boxed note describing how an ability interacts with an item or mechanic. One call renders one box.",
"params": {
"title": {
"label": "Header title",
"description": "Text shown in the box header.",
"type": "string",
"required": true
},
"text": {
"label": "Body text",
"description": "Wikitext shown in the box body. May contain wikilinks, templates such as AbilityIcon, and <br> for multiple lines.",
"type": "content",
"required": true
},
"type": {
"label": "Colour preset",
"description": "Header colour: positive (green), negative (red), or info (blue).",
"type": "line",
"suggestedvalues": [ "positive", "negative", "info" ]
},
"file": {
"label": "Icon file",
"description": "File name of the icon image, without the File: prefix.",
"type": "wiki-file-name",
"example": "Healing Booster.png"
},
"link": {
"label": "Link target",
"description": "Where the header and icon link. A bare page name (e.g. Healing Booster) or a full URL.",
"type": "string",
"example": "Healing Booster"
},
"state": {
"label": "State",
"description": "Set to disabled to desaturate the icon.",
"type": "line",
"suggestedvalues": [ "disabled" ]
}
},
"paramOrder": [ "title", "text", "type", "file", "link", "state" ],
"format": "block"
}
</templatedata><noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 14:35, 14 July 2026

Usage

{{AbilityInteraction}} displays a boxed note describing how a specific ability interacts with an item or mechanic.

The header colour is set by the type parameter (positive, negative, or info). Setting state=disabled desaturates the icon to mark an interaction that does not apply.

Parameters

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
titletitle

Text shown in the box header.

Stringrequired
texttext

Wikitext shown in the box body. May contain wikilinks, templates such as AbilityIcon, and <br> for multiple lines.

Contentoptional
typetype

Header colour: positive (green), negative (red), or info (blue).

Suggested values
positive negative info
Stringrequired
filefile

File name of the icon image, without the File: prefix.

Example
Healing Booster.png
Stringrequired
linklink

Where the header and icon link. A bare page name (e.g. Healing Booster) or a full URL.

Example
Healing Booster
Stringrequired
statestate

Set to disabled to desaturate the icon.

Suggested values
disabled
Stringoptional

Examples

Positive Interaction

{{AbilityInteraction
| type  = positive
| file  = Melee Charge.png
| link  = Melee Charge
| title = Melee
| text  = This ability benefits from Melee damage bonuses and triggers relevant item effects.
}}

AbilityInteraction: no interaction specified

Negative Interaction

{{AbilityInteraction
| type  = negative
| file  = Debuff Reducer.png
| link  = Debuff Reducer
| title = Debuff Resist
| text  = The duration of movement slow and accuracy debuff can be shortened with [[Debuff Resist]].
}}

AbilityInteraction: no interaction specified

Neutral interaction with disabled state

{{AbilityInteraction
| type  = info
| file  = Slowing Hex.png
| link  = Slowing Hex
| title = Slowing Hex
| text  = This ability is '''not''' interrupted by [[Slowing Hex]].
| state = disabled
}}

AbilityInteraction: no interaction specified