imported>Koanyan5028
No edit summary
imported>Koanyan5028
This uses Documentation template now
 
Line 22: Line 22:
! [[Critical Chance]]
! [[Critical Chance]]
! style="text-align:right" | {{Stat Bar|stat=crit|amount={{{crit|{{{crit chance|{{{critical|{{{critical chance}}}}}}}}}}}}}}
! style="text-align:right" | {{Stat Bar|stat=crit|amount={{{crit|{{{crit chance|{{{critical|{{{critical chance}}}}}}}}}}}}}}
|}</includeonly>
|}</includeonly><noinclude>{{Documentation}}</noinclude>
<noinclude>
{{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 Table
| health=15
| attack=20
| defense=15
| speed=30
| evasion=20
| vitality=15
| crit=25
}}</nowiki>
Result:
{{Stat Table
| health=15
| attack=20
| defense=15
| speed=30
| evasion=20
| vitality=15
| crit=25
}}
</noinclude>

Latest revision as of 11:50, 28 October 2024

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.