Difference between revisions of "Template:StatsHex"
From Cassette Beasts
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...") |
Mezzodrinker (talk | contribs) m (Re-size demonstration table to 100% width, as the hex would otherwise have a size of 0×0) |
||
Line 7: | Line 7: | ||
'''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. | '''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. | ||
− | <table class="wikitable mw-collapsible mw-collapsed"> | + | <table class="wikitable mw-collapsible mw-collapsed" style="width: 100%"> |
<tr> | <tr> | ||
<th colspan="2">Automatic scaling demonstration</th> | <th colspan="2">Automatic scaling demonstration</th> |
Latest revision as of 15:30, 30 November 2024
50M. Atk
50M. Def
50Speed
50R. Def
50R. 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 |
50M. Atk 50M. Def 50Speed 50R. Def 50R. Atk 50 |
50M. Atk 50M. Def 50Speed 50R. Def 50R. 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
144M. Atk
100M. Def
100Speed
100R. Def
100R. Atk
100 -
<div style="width: 300px;">{{StatsHex|maxhp=80|matk=150|mdef=80|ratk=80|rdef=80|speed=190}}</div>
→Max HP
80M. Atk
150M. Def
80Speed
190R. Def
80R. Atk
80