Template:Stat Table

Revision as of 11:50, 28 October 2024 by imported>Koanyan5028 (This uses Documentation template now)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Documentation Edit this documentation at Template:Stat_Table/doc.
(edithistorypurge)

Template:Stat Table renders a complete "Maximum Potion Stats" wikitable with one coloured Template:Stat Bar per stat.

Overview

This template builds a fixed seven-row wikitable titled "Maximum Potion Stats", listing Health, Attack, Defense, Speed, Evasion, Vitality and Critical Chance. Each row shows a Template:Stat Bar coloured for that stat, filled to the value you pass in. You supply one numeric value per stat; each value is forwarded to a Stat Bar, so the same rules apply (allowed values 0, 5, 10, 15, 20, 25, 30). It is the convenient all-in-one wrapper for showing a full stat spread on a page.

Parameters

Parameter Required? What it does Example
health Required Fill value for the Health bar (0/5/10/15/20/25/30). health=15
attack Required Fill value for the Attack bar. attack=20
defense Required Fill value for the Defense bar. Alias: defence (used if defense is absent). defense=15
defence Optional (alias) Alias for defense; only read when defense isn't given. defence=15
speed Required Fill value for the Speed bar. speed=30
evasion Required Fill value for the Evasion bar. evasion=20
vitality Required Fill value for the Vitality bar. vitality=15
crit Required Fill value for the Critical Chance bar. Aliases (in fallback order): crit chance, critical, critical chance. crit=25
crit chance Optional (alias) Alias for crit. crit chance=25
critical Optional (alias) Alias for crit. critical=25
critical chance Optional (alias) Alias for crit. critical chance=25

How to use

1. Type {{Stat Table on its own line. 2. On separate lines add each stat as |stat=value. Give all seven stats so no bar comes out blank. 3. Use one of the allowed values (0, 5, 10, 15, 20, 25, 30) for each — anything else makes that row's bar show a red error (the values are passed straight to Template:Stat Bar). 4. Close with }} on its own line.

Special-syntax notes: Defense and Critical Chance accept alternate spellings. For Defense you may write defence instead of defense. For Critical Chance you may write crit chance, critical or critical chance instead of crit. Each bar's colour is set automatically from its stat name — you don't choose colours here.

Copy this

{{Stat Table
| health=
| attack=
| defense=
| speed=
| evasion=
| vitality=
| crit=
}}

Example

Live result:

Maximum Potion Stats
Health 15/30 ■■■■■□□□□□
Attack 20/30 ■■■■■■□□□□
Defense 15/30 ■■■■■□□□□□
Speed 30/30 ■■■■■■■■■■
Evasion 20/30 ■■■■■■□□□□
Vitality 15/30 ■■■■■□□□□□
Critical Chance 25/30 ■■■■■■■■□□

Wikitext that produced it:

{{Stat Table
| health=15
| attack=20
| defense=15
| speed=30
| evasion=20
| vitality=15
| crit=25
}}

Tips & notes

  • Every value is forwarded to Template:Stat Bar, so only 0, 5, 10, 15, 20, 25, 30 are valid; other numbers produce a red "Error: Invalid Argument" in that row.
  • Provide all seven stats; a missing value leaves that row's bar empty/erroring.
  • You cannot reorder or relabel rows — the table layout, title ("Maximum Potion Stats") and stat list are fixed in the template.
  • Related: Template:Stat Bar (each row), Template:Stat Color (the per-stat colours), and the Stats page.