Template:HeroData/docGive feedback
This template allows you to display hero stats automatically using the game files. It pulls data directly from Data:HeroData.json.
β‘ Quick Start
[edit source]- Go to Data:HeroData.json and find the hero you want.
- Look for the stat you need.
- Use the template with the hero's name (or internal key) and the stat name.
Basic Example:
{{HeroData|Abrams|MaxHealth}} β 800
or
{{HeroData|hero_atlas|MaxHealth}} β 800
π Template Functions
[edit source]The template has different modes depending on what information you need.
Getting Stats (Default)
[edit source]This is the most common use case. Retrieves a hero's base stat value. The module automatically checks the hero's top-level stats, then Weapon stats, then AltFire stats.
Syntax:
{{HeroData|HERO_NAME|STAT_NAME|sig_figs_or_localize}}
Parameters:
- HERO_NAME - The hero's name (e.g.,
Abrams,Bebop) or internal key (e.g.,hero_atlas) - STAT_NAME - The stat to retrieve (e.g.,
MaxHealth,BulletResist) - sig_figs_or_localize (optional) - Either a number for rounding (significant figures) or
trueto localize the value
Examples:
{{HeroData|Abrams|MaxHealth}}β 800{{HeroData|Bebop|BulletResist}}β 0{{HeroData|Abrams|MaxHealth|2}}β 800 (rounded to 2 sig figs){{HeroData|Bebop|DPS|3}}β 59.3
Getting Alt Fire Stats
[edit source]Retrieves stats specifically from a hero's alternate fire mode.
Syntax:
{{HeroData|altfire|HERO_NAME|STAT_NAME|sig_figs_or_localize}}
Example:
{{HeroData|altfire|Shiv|BulletDamage}}β 4.36
Getting List Elements
[edit source]Retrieves a specific element from a list/array property. Primarily used for weapon types.
Syntax:
{{HeroData|list|HERO_NAME|LIST_NAME|INDEX|localize}}
Parameters:
- LIST_NAME - The name of the list property (usually
WeaponTypes) - INDEX - Which element to get (1 for first, 2 for second, etc.)
- localize (optional) - Defaults to
truefor readable names. Set tofalsefor raw internal keys.
Examples:
{{HeroData|list|Abrams|WeaponTypes|1}}β Spreadshot (returns "Spreadshot"){{HeroData|list|Abrams|WeaponTypes|2}}β Close Range (returns "Close Range"){{HeroData|list|Abrams|WeaponTypes|1|false}}β Attribute_EWeaponAttribute_Spreadshot (returns raw "Attribute_EWeaponAttribute_Spreadshot")
Note: By default, list elements are localized to give readable names like "Spreadshot" instead of "Attribute_EWeaponAttribute_Spreadshot".
Getting Scaling Values
[edit source]Retrieves the scaling value for a stat and returns it formatted with the appropriate scaling template ({{Ss}} for Spirit or {{PI}} for Power Increases).
Syntax:
{{HeroData|scalar|HERO_NAME|SCALING_TYPE|STAT_NAME|sig_figs_or_localize}}
Parameters:
- SCALING_TYPE - Either
SpiritorLevel(for Power Increases) - STAT_NAME - The stat to check scaling for
- sig_figs_or_localize (optional) - Rounding or localization
Examples:
{{HeroData|scalar|Sinclair|Spirit|MaxMoveSpeed}}β x0.0138{{HeroData|scalar|Bebop|Level|BulletResist}}β +0.3
Note: Returns an empty string if the hero doesn't have scaling for that stat.
Getting Hero Tags
[edit source]Retrieves one of a hero's three descriptive tags.
Syntax:
{{HeroData|tag|HERO_NAME|TAG_NUMBER}}
Parameters:
- HERO_NAME - The hero's display name (e.g.,
Abrams,Lady Geist) - TAG_NUMBER - 1, 2, or 3 (for the first, second, or third tag)
Examples:
{{HeroData|tag|Abrams|1}}β Tank{{HeroData|tag|Lady Geist|2}}β Self Damage
π Common Stats
[edit source]Here are some frequently used stats you can retrieve:
Vitality
[edit source]MaxHealth- Maximum healthBaseHealthRegen- Health regeneration per secondBulletResist- Bullet resistance percentageTechResist- Spirit resistance percentageMeleeResist- Melee resistance percentageMaxMoveSpeed- Movement speedSprintSpeed- Sprint speedStaminaCooldown- Stamina cooldownStamina- Stamina amount
Weapon
[edit source]DPS- Damage per secondBulletDamage- Damage per bulletRoundsPerSecond- Fire rateClipSize- Magazine/clip sizeReloadTime- Reload durationLightMeleeDamage- Light melee damageHeavyMeleeDamage- Heavy melee damageBulletSpeed- Projectile speedFalloffStartRange- Damage falloff start distanceFalloffEndRange- Damage falloff end distanceWeaponTypes- List of weapon attributes (use withlistfunction)
Spirit
[edit source]TechPower- Spirit power
For a complete list of stats, check Data:HeroData.json.
β Common Errors
[edit source]- Hero Not Found
- The hero name/key is incorrect. Make sure to use either the display name (e.g.,
Abrams) or internal key (e.g.,hero_atlas).
- The hero name/key is incorrect. Make sure to use either the display name (e.g.,
- Returns
0- The stat doesn't exist for that hero, or the stat name is spelled incorrectly.
- No Alt Fire
- This hero doesn't have an alternate fire mode.
π‘ Tips
[edit source]- Hero Names: Most functions accept EITHER the internal hero key (e.g.,
hero_atlas) OR the display name (e.g.,Abrams). Thetagfunction ONLY accepts display names (e.g.,Abrams,Lady Geist). - Significant Figures: The optional rounding parameter uses significant figures, not decimal places.
2turns1250into1300and0.125into0.13. - Nested Stats: The module automatically checks multiple locations for stats (top-level β Weapon β AltFire), so you don't need to specify where the stat is located.
- Weapon Types: By default, the
listfunction returns localized, human-readable names. This is almost always what you want!
Displays hero stats and information from game files. Use Data:HeroData.json to find available stats.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Function or Hero Name | 1 | Either a function name (altfire, list, scalar, tag) OR the hero's name/key when getting stats (e.g., Abrams or hero_atlas).
| String | required |
| Hero Name or Stat Name | 2 | The hero's name/key (if param 1 is a function) OR the stat name to retrieve (if param 1 is a hero name).
| String | optional |
| Stat Name, Index, or Options | 3 | Depends on function: stat name for altfire/scalar, list name for list function, tag number for tag function, or sig_figs/localize for default function. | String | optional |
| Additional Parameter | 4 | Additional parameter for specific functions (e.g., list index, sig_figs for altfire/scalar). | String | optional |
| Localization | 5 | For list function: set to 'false' to get raw internal keys instead of localized names (defaults to 'true'). For scalar function: sig_figs or localize option.
| String | optional |