Template:StatsHex

From Cassette Beasts
Revision as of 15:28, 30 November 2024 by Mezzodrinker (talk | contribs) (Created page with "<div style="width: 300px;"><onlyinclude><!-- stats-hex container --><div style="position: relative; box-sizing: border-box; width: 100%; height: 100%; padding: calc(2lh + 0.25...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Max HP
50
M. Atk
50
M. Def
50
Speed
50
R. Def
50
R. Atk
50

IMPORTANT NOTE: The stat hexagon will always scale to the surrounding element's bounds! This means that, unless you put the result of this template into a width- and/or height-constrained element, the hexagon will use the entire width available in its parent element.

Automatic scaling demonstration
constrained to a width of 300px unconstrained
Max HP
50
M. Atk
50
M. Def
50
Speed
50
R. Def
50
R. Atk
50
Max HP
50
M. Atk
50
M. Def
50
Speed
50
R. Def
50
R. Atk
50

In order to achieve the same size as the example at the beginning of the page, use the template as follows:

 <div style="width: 300px;">{{StatsHex}}</div> 

Parameters

maxhp
(optional, defaults to 50)
Value of the "Max HP" stat.
matk
(optional, defaults to 50)
Value of the "M. Atk" stat.
mdef
(optional, defaults to 50)
Value of the "M. Def" stat.
ratk
(optional, defaults to 50)
Value of the "R. Def" stat.
rdef
(optional, defaults to 50)
Value of the "R. Atk" stat.
speed
(optional, defaults to 50)
Value of the "Speed" stat.
max
(optional, defaults to 300)
Maximum value that can be shown in the stats hexagon. The higher the value, the lower the scaling factor for all stats. Should not be lower than any stat's value or things might start to look... odd.

Examples

  • <div style="width: 300px;">{{StatsHex|maxhp=144|matk=100|mdef=100|ratk=100|rdef=100|speed=100|max=150}}</div>
    
    Max HP
    144
    M. Atk
    100
    M. Def
    100
    Speed
    100
    R. Def
    100
    R. Atk
    100
  • <div style="width: 300px;">{{StatsHex|maxhp=80|matk=150|mdef=80|ratk=80|rdef=80|speed=190}}</div>
    
    Max HP
    80
    M. Atk
    150
    M. Def
    80
    Speed
    190
    R. Def
    80
    R. Atk
    80