Template:AbilitySection/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
Vergir (talk | contribs)
Improve doc: add templatedata, type column, inline examples, live render (with help from vergir-bot LLM)
Vergir (talk | contribs)
m update doc once more
 
(10 intermediate revisions by 2 users not shown)
Line 5: Line 5:
On narrow viewports the two columns stack vertically via CSS flex-wrap. Styles are loaded from [[Template:AbilitySection/styles.css]] via TemplateStyles.
On narrow viewports the two columns stack vertically via CSS flex-wrap. Styles are loaded from [[Template:AbilitySection/styles.css]] via TemplateStyles.


Intended to replace [[Template:Ability tabs]] on hero pages. Editors place four of these blocks in sequence, one per ability, each under its own <code>=== Ability Name ===</code> heading directly on the hero page.
An interaction-hint rail is generated automatically between the card and the details panel: small item icons showing how the ability interacts with items, driven by [[Module:AbilityHints]].


Tab visibility rules:
Tab visibility rules:
* Only tabs with content are shown.
* Only tabs with content are shown.
* A <code>Show All</code> tab is appended automatically if two or more tabs have content.
* A <code>Show All</code> tab is appended automatically if two or more tabs have content.
* If no content parameters are provided, no details panel is rendered at all — only the ability card.
* If no content parameters are provided, no details panel is rendered at all — only the ability card (and its hint rail, if any).


=== Parameters ===
=== Parameters ===
Line 16: Line 16:
<templatedata>
<templatedata>
{
{
"description": "Two-column ability layout with card on the left and optional tabbed notes panel on the right.",
"params": {
"params": {
"hero_name": {
"hero_name": {
"description": "Hero name, passed to Template:Ability card v2.",
"description": "Hero name, passed to Template:Ability card v2.",
"example": "Abrams",
"example": "Doorman",
"type": "string",
"type": "string",
"required": true
"required": true
Line 31: Line 30:
},
},
"notes": {
"notes": {
"description": "Wikitext for the Notes tab. Supports bullet points, links, and templates. If taller than the max-height in the stylesheet, the panel will scroll rather than expand.",
"description": "Wikitext for the Notes tab.",
"example": "* Bells can be detonated by [[Melee Attack|melee attacks]].\n* Can be shot to detonate early.",
"example": "* Can be detonated by [[Melee Attack|melee attacks]].",
"type": "string",
"type": "string",
"required": false
"required": false
},
},
"interactions": {
"tips": {
"description": "Wikitext for the Interactions tab. Typically one or more {{AbilityInteraction}} calls.",
"description": "Wikitext for the Tips tab.",
"example": "{{AbilityInteraction|type=counterspell|text=Counterspell blocks the slow debuff but not the damage.}}",
"example": "* T3 talent allows stacking several bells for high damage traps.",
"type": "string",
"type": "string",
"required": false
"required": false
},
},
"tips": {
"interactions": {
"description": "Wikitext for the Tips tab. Supports bullet points, links, and templates.",
"description": "Wikitext for the Interactions tab. Use {{AbilityInteraction}} blocks.",
"example": "* T3 talent allows stacking several bells for high damage traps.",
"example": "{{AbilityInteraction | interaction = stun | text = ... }}",
"type": "string",
"type": "string",
"required": false
"required": false
Line 53: Line 52:
"ability_num",
"ability_num",
"notes",
"notes",
"interactions",
"tips",
"tips"
"interactions"
]
],
"description": "Generates ability cards in hero pages. Uses Ability card v2/Card"
}
}
</templatedata>
</templatedata>
Line 62: Line 62:


<pre>
<pre>
=== Call Bell ===
{{AbilitySection
{{AbilitySection
| hero_name  = The Doorman
| hero_name  = The Doorman
Line 69: Line 67:
| notes      =
| notes      =
* Bells can be detonated by [[Melee Attack|melee attacks]].
* Bells can be detonated by [[Melee Attack|melee attacks]].
* Can be shot to detonate early.
| tips        =
| tips        =
* T3 talent allows stacking several bells for high damage traps.
* T3 talent allows stacking several bells for high damage traps.
| interactions =
{{AbilityInteraction
| interaction = debuff resist
| text      = Debuff Resist shortens duration of [[Movement Slow|move slow]] and accuracy debuff.
}}
}}
}}
</pre>
</pre>
=== Call Bell ===


{{AbilitySection
{{AbilitySection
Line 82: Line 82:
| notes      =
| notes      =
* Bells can be detonated by [[Melee Attack|melee attacks]].
* Bells can be detonated by [[Melee Attack|melee attacks]].
* Can be shot to detonate early.
| tips        =
| tips        =
* T3 talent allows stacking several bells for high damage traps.
* T3 talent allows stacking several bells for high damage traps.
| interactions =
{{AbilityInteraction
| interaction = debuff resist
| text        = Debuff Resist shortens duration of [[Movement Slow|move slow]] and accuracy debuff.
}}
}}
}}


Line 90: Line 94:


* [[Module:AbilitySection]] — Lua backend
* [[Module:AbilitySection]] — Lua backend
* [[Module:AbilityHints]] — interaction-hint icons rendered beside the card
* [[Template:AbilitySection/styles.css]] — CSS
* [[Template:AbilitySection/styles.css]] — CSS
<noinclude>[[Category:Template documentation]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 16:05, 15 July 2026

Overview

[edit source]

Two-column layout wrapping Template:Ability card v2 on the left and an optional tabbed details panel on the right. Backed by Module:AbilitySection.

On narrow viewports the two columns stack vertically via CSS flex-wrap. Styles are loaded from Template:AbilitySection/styles.css via TemplateStyles.

An interaction-hint rail is generated automatically between the card and the details panel: small item icons showing how the ability interacts with items, driven by Module:AbilityHints.

Tab visibility rules:

  • Only tabs with content are shown.
  • A Show All tab is appended automatically if two or more tabs have content.
  • If no content parameters are provided, no details panel is rendered at all — only the ability card (and its hint rail, if any).

Parameters

[edit source]

Generates ability cards in hero pages. Uses Ability card v2/Card

Template parameters

ParameterDescriptionTypeStatus
hero_namehero_name

Hero name, passed to Template:Ability card v2.

Example
Doorman
Stringrequired
ability_numability_num

Ability index (1–4), passed to Template:Ability card v2.

Example
1
Numberrequired
notesnotes

Wikitext for the Notes tab.

Example
* Can be detonated by [[Melee Attack|melee attacks]].
Stringoptional
tipstips

Wikitext for the Tips tab.

Example
* T3 talent allows stacking several bells for high damage traps.
Stringoptional
interactionsinteractions

Wikitext for the Interactions tab. Use {{AbilityInteraction}} blocks.

Example
{{AbilityInteraction | interaction = stun | text = ... }}
Stringoptional

Example

[edit source]
{{AbilitySection
| hero_name   = The Doorman
| ability_num = 1
| notes       =
* Bells can be detonated by [[Melee Attack|melee attacks]].
| tips        =
* T3 talent allows stacking several bells for high damage traps.
| interactions =
{{AbilityInteraction
| interaction = debuff resist
| text      = Debuff Resist shortens duration of [[Movement Slow|move slow]] and accuracy debuff.
}}
}}

Call Bell

Call Bell



Radius 5.5m




Duration 4s



Number of Charges 1
Charge Cooldown 7s



Cooldown 18s



Throw out a call bell that deals spirit damage on impact. After a short delay it explodes, dealing additional spirit damage and causing affected enemies to suffer reduced weapon accuracy and movement slow.

Can be shot to detonate early.
On Impact

x0.7


40

Impact Damage
Explosion

x1.2


55

Explosion Damage
Explosion

-40%

Weapon Accuracy
Explosion

-35%

Move Speed

3s  Bell Lifetime 

4s  Duration 

Ability Point1
+1 Charge
Ability Point2
+30 Impact Damage
+40 Explosion Damage
Ability Point5
+4.5m Radius
+26s Bell Lifetime
Improved Scaling
Interacts with Debuff Resist.
Click to reveal more info.
Effect can be dispelledCC effect suppressed by Unstoppable

  • T3 talent allows stacking several bells for high damage traps.

Debuff Resist

Debuff Resist shortens duration of move slow and accuracy debuff.

Notes
Tips
  • T3 talent allows stacking several bells for high damage traps.
Interactions
Debuff Resist

Debuff Resist shortens duration of move slow and accuracy debuff.

[edit source]