imported>Koanyan5028 Created page with "{{Stat Table | health=15 | attack=20 | defense=15 | speed=30 | evasion=20 | vitality=15 | crit=25 }} This template can be used to create a stat table that indicates maximum amount of potions that can be consumed for each stats. The <code>defense</code> argment has an alias named <code>defence</code>, and the <code>crit</code> argment has aliases named <code>crit chance</code>, <code>critical</code> and <code>critical chance</code>. ==Examples== Code: <nowiki> {{Stat..." |
the mass documenting |
||
| Line 1: | Line 1: | ||
'''<code>Template:Stat Table</code> renders a complete "Maximum Potion Stats" wikitable with one coloured [[Template:Stat Bar]] per stat.''' | |||
__TOC__ | |||
== 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 == | |||
{| class="wikitable" | |||
! Parameter !! Required? !! What it does !! Example | |||
|- | |||
| <code>health</code> || Required || Fill value for the Health bar (0/5/10/15/20/25/30). || <code>health=15</code> | |||
|- | |||
| <code>attack</code> || Required || Fill value for the Attack bar. || <code>attack=20</code> | |||
|- | |||
| <code>defense</code> || Required || Fill value for the Defense bar. Alias: <code>defence</code> (used if <code>defense</code> is absent). || <code>defense=15</code> | |||
|- | |||
| <code>defence</code> || Optional (alias) || Alias for <code>defense</code>; only read when <code>defense</code> isn't given. || <code>defence=15</code> | |||
|- | |||
| <code>speed</code> || Required || Fill value for the Speed bar. || <code>speed=30</code> | |||
|- | |||
| <code>evasion</code> || Required || Fill value for the Evasion bar. || <code>evasion=20</code> | |||
|- | |||
| <code>vitality</code> || Required || Fill value for the Vitality bar. || <code>vitality=15</code> | |||
|- | |||
| <code>crit</code> || Required || Fill value for the Critical Chance bar. Aliases (in fallback order): <code>crit chance</code>, <code>critical</code>, <code>critical chance</code>. || <code>crit=25</code> | |||
|- | |||
| <code>crit chance</code> || Optional (alias) || Alias for <code>crit</code>. || <code>crit chance=25</code> | |||
|- | |||
| <code>critical</code> || Optional (alias) || Alias for <code>crit</code>. || <code>critical=25</code> | |||
|- | |||
| <code>critical chance</code> || Optional (alias) || Alias for <code>crit</code>. || <code>critical chance=25</code> | |||
|} | |||
== How to use == | |||
1. Type <code><nowiki>{{Stat Table</nowiki></code> on its own line. | |||
2. On separate lines add each stat as <code>|stat=value</code>. 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 <code><nowiki>}}</nowiki></code> on its own line. | |||
Special-syntax notes: Defense and Critical Chance accept alternate spellings. For Defense you may write <code>defence</code> instead of <code>defense</code>. For Critical Chance you may write <code>crit chance</code>, <code>critical</code> or <code>critical chance</code> instead of <code>crit</code>. Each bar's colour is set automatically from its stat name — you don't choose colours here. | |||
== Copy this == | |||
<syntaxhighlight lang="wikitext" style="overflow:auto;"> | |||
{{Stat Table | {{Stat Table | ||
| health= | | health= | ||
| attack= | | attack= | ||
| defense= | | defense= | ||
| speed= | | speed= | ||
| evasion= | | evasion= | ||
| vitality= | | vitality= | ||
| crit= | | crit= | ||
}} | }} | ||
</syntaxhighlight> | |||
== Example == | |||
Live result: | |||
{{Stat Table | {{Stat Table | ||
| health=15 | | health=15 | ||
| Line 25: | Line 64: | ||
| vitality=15 | | vitality=15 | ||
| crit=25 | | crit=25 | ||
}}< | }} | ||
Wikitext that produced it: | |||
<syntaxhighlight lang="wikitext" style="overflow:auto;"> | |||
{{Stat Table | {{Stat Table | ||
| health=15 | | health=15 | ||
| Line 36: | Line 78: | ||
| crit=25 | | crit=25 | ||
}} | }} | ||
</syntaxhighlight> | |||
== 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. | |||
Latest revision as of 11:55, 20 June 2026
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:
| 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.