Template:AbilityTable/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
Vergir (talk | contribs)
Remove missing Documentation subpage template, trim See also to AbilityTable module and styles only (with help from vergir-bot LLM)
Vergir (talk | contribs)
update doc: use list instead of stat, add compact parameter, update links (with help from vergir-bot LLM)
Line 1: Line 1:
Renders a sortable table of all abilities that have the named stat.
Renders a sortable table of all abilities matching a named list, or a compact inline list.


== Usage ==
== Usage ==


<pre>{{AbilityTable|charges}}</pre>
<pre>{{AbilityTable|charges}}</pre>
Compact mode (renders as an inline list instead of a table):
<pre>{{AbilityTable|charges|compact=1}}</pre>


With a hidden column:
With a hidden column:
Line 13: Line 16:
== Parameters ==
== Parameters ==


; 1 : The stat name. Must match a key in [[Module:AbilityTable|the stat_to_props table]].
; 1 : The list name. Must match a key in [[Module:AbilityTable/Lists]].
; hide : Optional. A comma-separated list of column names to exclude. Hero and Ability columns cannot be hidden.
; compact : Optional. When set to any non-empty value (e.g. <code>compact=1</code>), renders a compact inline list instead of a full table. Abilities are grouped by hero with notes shown in parentheses.
; 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.


== Example ==
== Example ==


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


<pre>{{AbilityTable|melee}}</pre>
<pre>{{AbilityTable|melee}}</pre>
Line 27: Line 31:


* [[Module:AbilityTable]] — backing Lua module
* [[Module:AbilityTable]] — backing Lua module
* [[Module:AbilityTable/Lists]] — defines which properties each list matches on
* [[Module:AbilityTable/Notes]] — editor-authored notes for abilities
* [[Template:AbilityTable/styles.css]] — stylesheet for this template
* [[Template:AbilityTable/styles.css]] — stylesheet for this template


<includeonly>[[Category:Ability templates]]</includeonly>
<includeonly>[[Category:Ability templates]]</includeonly>

Revision as of 07:51, 31 May 2026

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

Usage

{{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}}

Parameters

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.
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.

Example

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

See also