Template:Stat/unit/doc
Appearance
< Template:Stat | unit
This is the documentation subpage for Template:Stat/unit. It holds usage notes, parameters and examples, and is transcluded onto the template page itself. Edit the documentation here; edit the template's code on the template page.
The unit for a game stat key: % for a percentage stat, nothing for a flat one. Companion to {{Stat}}
.
{{Stat|attack_speed}} +{{Range|2|5}}{{Stat/unit|attack_speed}}
An unknown key returns an empty string, so an undocumented stat renders without a unit rather than breaking the line.
Most of the time you do not need this template: {{Range}}
takes aunitparameter, and{{RollStat}}looks the unit up from the stat key on its own. Reach for it only when you are assembling a value by hand.
This template is a one-line wrapper around {{#invoke:Stat|unit}}. Units live in Module:Gear/data — add or fix a unit there, not here.
Unit (% or nothing) for a game stat key.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Stat key | 1 | snake_case key from the game data, e.g. attack_speed | String | required |