Template:AbilityTable: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
Vergir (talk | contribs)
Add templatestyles for AbilityTable CSS (with help from vergir-bot LLM)
LVL (talk | contribs)
Add support for collapsed tables
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><templatestyles src="AbilityTable/styles.css" />{{#invoke:AbilityTables|abilityPropTable|{{{1|}}}}}</includeonly><noinclude>
<includeonly><templatestyles src="AbilityTable/styles.css" />{{#invoke:AbilityTable|render|{{{1|}}}|hide={{{hide|}}}|compact={{{compact|}}}|collapsed={{{collapsed|}}}}}</includeonly><noinclude>{{Documentation}}</noinclude>
Renders a sortable table of all abilities that have the named stat.
 
== Usage ==
 
<pre>{{AbilityTable|charges}}</pre>
 
== Parameters ==
 
; 1 : The stat name. Must match a key in [[Module:AbilityTables|the stat_to_props table]].
 
== See also ==
 
* [[Template:ItemPropTable]] — equivalent template for items
* [[Module:AbilityTables]] — backing module
* [[Module:GameData]] — shared data-loading framework
[[Category:Ability templates]]
</noinclude>

Latest revision as of 14:46, 11 July 2026

Template documentation [view] [edit] [history] [purge]

Renders a sortable table of all abilities matching a named list, or a compact inline list. The table can optionally be made collapsible.

{{AbilityTable|charges}}

Compact mode (renders as an inline list instead of a table):

{{AbilityTable|charges|compact=1}}

With a hidden column:

{{AbilityTable|charges|hide=Time Between Charges}}

Multiple columns can be hidden using a comma-separated list:

{{AbilityTable|charges|hide=Time Between Charges, Notes}}

Collapsible table, initially hidden:

{{AbilityTable|charges|collapsed=yes}}

Collapsible table, initially shown (toggleable via header):

{{AbilityTable|charges|collapsed=no}}

Parameters

[edit source]
1
The list name. Must match a key in Module:AbilityTable/Lists.
compact
Optional. When set to any non‑empty value (e.g. compact=1), renders a compact inline list instead of a full table. Abilities are grouped by hero with notes shown in parentheses. Collapsing does not apply in this mode.
hide
Optional. A comma‑separated list of column names to exclude from the table. Hero and Ability columns cannot be hidden. Has no effect in compact mode.
collapsed
Optional. Enables collapsible behaviour for the table.
  • collapsed=yes (or true, 1) – table starts hidden; click the header to expand.
  • collapsed=no (or any other non‑empty value) – table shows a collapse toggle but starts fully expanded.
Omit the parameter entirely to render a static, non‑collapsible table (default behaviour).
Has no effect when compact is used.

Examples

[edit source]

The following renders a table of all abilities in the melee list:

{{AbilityTable|melee}}
This is a dynamic list "melee". Edit contents · Edit notes.
Hero Ability Base Damage Light Melee Scaling Notes
Bebop Exploding Uppercut 0.01 ×1
Grapple Arm 0 ×0.7
Billy Bashdown 0 ×0.9 on T3 becomes ×0.5 Heavy Melee scaling.
Calico Leaping Slash 10 ×0.8 on T3 gets +60 base damage (total 70).
Drifter Rend 0 ×1.2 on T3 becomes ×0.55 Heavy Melee scaling.
Silver Boot Kick 0 ×0.9
Silver (Transformed) Go For The Throat 0 ×1.5 on T1 gets +30 base damage (total 30).
Mauling Leap 0 ×1.5
Viscous Puddle Punch 20 ×0.6 on T1 gets +20 base damage (total 40). on T3 becomes 40 base damage with ×0.6 Heavy Melee scaling. Can be parried.
Yamato Flying Slash 0 ×1

The same list in compact mode:

{{AbilityTable|melee|compact=1}}
This is a dynamic list "melee". Edit contents · Edit notes.

A collapsible table that starts hidden (click the header to reveal):

{{AbilityTable|melee|collapsed=yes}}
This is a dynamic list "melee". Edit contents · Edit notes.
Hero Ability Base Damage Light Melee Scaling Notes
Bebop Exploding Uppercut 0.01 ×1
Grapple Arm 0 ×0.7
Billy Bashdown 0 ×0.9 on T3 becomes ×0.5 Heavy Melee scaling.
Calico Leaping Slash 10 ×0.8 on T3 gets +60 base damage (total 70).
Drifter Rend 0 ×1.2 on T3 becomes ×0.55 Heavy Melee scaling.
Silver Boot Kick 0 ×0.9
Silver (Transformed) Go For The Throat 0 ×1.5 on T1 gets +30 base damage (total 30).
Mauling Leap 0 ×1.5
Viscous Puddle Punch 20 ×0.6 on T1 gets +20 base damage (total 40). on T3 becomes 40 base damage with ×0.6 Heavy Melee scaling. Can be parried.
Yamato Flying Slash 0 ×1

A collapsible table that starts open with a visible collapse button:

{{AbilityTable|melee|collapsed=no}}
This is a dynamic list "melee". Edit contents · Edit notes.
Hero Ability Base Damage Light Melee Scaling Notes
Bebop Exploding Uppercut 0.01 ×1
Grapple Arm 0 ×0.7
Billy Bashdown 0 ×0.9 on T3 becomes ×0.5 Heavy Melee scaling.
Calico Leaping Slash 10 ×0.8 on T3 gets +60 base damage (total 70).
Drifter Rend 0 ×1.2 on T3 becomes ×0.55 Heavy Melee scaling.
Silver Boot Kick 0 ×0.9
Silver (Transformed) Go For The Throat 0 ×1.5 on T1 gets +30 base damage (total 30).
Mauling Leap 0 ×1.5
Viscous Puddle Punch 20 ×0.6 on T1 gets +20 base damage (total 40). on T3 becomes 40 base damage with ×0.6 Heavy Melee scaling. Can be parried.
Yamato Flying Slash 0 ×1

See also

[edit source]

Renders a sortable table of abilities matching a named list, or a compact inline list. Optionally collapsible.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
List name1

Name of the ability list to display (must match a key in Module:AbilityTable/Lists).

Example
charges
Stringrequired
Compact modecompact

If set to any non‑empty value (e.g. 1), render a compact inline list instead of a table.

Example
1
Stringoptional
Hide columnshide

Comma‑separated column names to exclude from the table (e.g. "Time Between Charges, Notes"). Hero and Ability cannot be hidden. Ignored in compact mode.

Stringoptional
Collapse tablecollapsed

Makes the table collapsible. Use 'yes' to start hidden, 'no' to start expanded with a toggle. Omit for a static table.

Suggested values
yes no
Stringoptional