Module:AbilitySection/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
Vergir (talk | contribs)
m remove traces of user-space period
Vergir (talk | contribs)
Docs: document the interaction-hint rail rendered via Module:AbilityHints (with help from vergir-bot LLM)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Overview ==
== Overview ==
Lua backend for [[Template:AbilitySection]]. Renders a two-column layout with the ability card on the left and an optional tabbed details panel on the right.
Lua backend for [[Template:AbilitySection]]. Renders a two-column layout with the ability card on the left and an optional tabbed details panel on the right.
Between the card and the details panel, an interaction-hint rail of small item icons is rendered via [[Module:AbilityHints]] (showing how the ability interacts with items — dispellable, reduced, blocked, etc.). When a rail is present, the card and rail are grouped in a <code>.ability-section-main</code> wrapper so the rail always wraps together with the card rather than onto the details' line; abilities with no interactions keep the flat single-card structure.


Only tabs with non-empty content are shown. If two or more tabs have content, a Show All tab is automatically appended that stacks all content in sequence with section headers between them.
Only tabs with non-empty content are shown. If two or more tabs have content, a Show All tab is automatically appended that stacks all content in sequence with section headers between them.
Line 6: Line 9:
The Notes tab is height-constrained with a scrollbar when content overflows (see [[Template:AbilitySection/styles.css]]). Other tabs are unconstrained.
The Notes tab is height-constrained with a scrollbar when content overflows (see [[Template:AbilitySection/styles.css]]). Other tabs are unconstrained.


If no content params are provided, no details panel is rendered at all — only the ability card.
If no content params are provided, no details panel is rendered at all — only the ability card (and its hint rail, if any).


== Entry point ==
== Entry point ==
Line 21: Line 24:
|-
|-
| <code>notes</code> || No || Wikitext for the Notes tab.
| <code>notes</code> || No || Wikitext for the Notes tab.
|-
| <code>interactions</code> || No || Wikitext for the Interactions tab.
|-
|-
| <code>tips</code> || No || Wikitext for the Tips tab.
| <code>tips</code> || No || Wikitext for the Tips tab.
Line 35: Line 36:
local TABS = {
local TABS = {
     { key = 'notes',        label = 'Notes'        },
     { key = 'notes',        label = 'Notes'        },
    { key = 'interactions', label = 'Interactions' },
     { key = 'tips',        label = 'Tips'        },
     { key = 'tips',        label = 'Tips'        },
}
}
Line 43: Line 43:


<pre>
<pre>
{{User:AbilitySection
{{AbilitySection
| hero_name  = Abrams
| hero_name  = Abrams
| ability_num = 1
| ability_num = 1
| notes             =
| notes =
* This is an example of a note.
* This is an example of a note.
| interactions      =
| tips =
* This is an example of an interaction.
| tips               =
* This is an example of a tip.
* This is an example of a tip.
}}
}}
</pre>
</pre>


{{User:AbilitySection
{{AbilitySection
| hero_name  = Abrams
| hero_name  = Abrams
| ability_num = 1
| ability_num = 1
| notes             =
| notes =
* This is an example of a note.
* This is an example of a note.
| interactions      =
| tips =
* This is an example of an interaction.
| tips               =
* This is an example of a tip.
* This is an example of a tip.
}}
}}
Line 69: Line 65:


* [[Template:AbilitySection]] — template that invokes this module
* [[Template:AbilitySection]] — template that invokes this module
* [[Module:AbilityHints]] — interaction-hint icons rendered beside the card
* [[Template:AbilitySection/styles.css]] — CSS for the layout
* [[Template:AbilitySection/styles.css]] — CSS for the layout

Latest revision as of 19:27, 12 July 2026

Overview

[edit source]

Lua backend for Template:AbilitySection. Renders a two-column layout with the ability card on the left and an optional tabbed details panel on the right.

Between the card and the details panel, an interaction-hint rail of small item icons is rendered via Module:AbilityHints (showing how the ability interacts with items — dispellable, reduced, blocked, etc.). When a rail is present, the card and rail are grouped in a .ability-section-main wrapper so the rail always wraps together with the card rather than onto the details' line; abilities with no interactions keep the flat single-card structure.

Only tabs with non-empty content are shown. If two or more tabs have content, a Show All tab is automatically appended that stacks all content in sequence with section headers between them.

The Notes tab is height-constrained with a scrollbar when content overflows (see Template:AbilitySection/styles.css). Other tabs are unconstrained.

If no content params are provided, no details panel is rendered at all — only the ability card (and its hint rail, if any).

Entry point

[edit source]

p.render(frame)

[edit source]

Called via {{#invoke:AbilitySection|render}}.

Argument Required Description
hero_name Yes Passed through to Template:Ability card v2.
ability_num Yes Passed through to Template:Ability card v2.
notes No Wikitext for the Notes tab.
tips No Wikitext for the Tips tab.

Constants

[edit source]

Defines list of possible tabs. Order here determines display order in the tabber.

local TABS = {
    { key = 'notes',        label = 'Notes'        },
    { key = 'tips',         label = 'Tips'         },
}

Example

[edit source]
{{AbilitySection
| hero_name   = Abrams
| ability_num = 1
| notes =
* This is an example of a note.
| tips =
* This is an example of a tip.
}}

Siphon Life

Siphon Life



Radius 8m




Duration 4s



Number of Charges 0


Cooldown 42s



Drain health from nearby enemies, dealing spirit damage over time and healing for a portion of the damage dealt.

x0.6


22

Damage Per Second



4s

Duration
On Hit:



70%

Lifesteal

35%  Lifesteal vs Non-Heroes 

Ability Point1
-20s Cooldown
Ability Point2
2s Duration
Ability Point5
+2m Radius and +18 DPS with improved Spirit scaling
Healing amplified by Healing Booster and affected by healing reductionHealing triggers Healing Tempo's unique effect
  • This is an example of a note.

  • This is an example of a tip.

Notes
  • This is an example of a note.
Tips
  • This is an example of a tip.
[edit source]