Template:AbilityTable/doc: Difference between revisions

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>