Editing
Template
:
HeroData/doc
Give feedback
Jump to navigation
Jump to search
Warning:
You are not logged in. Once you make an edit, a temporary account will be created for you.
Learn more
.
Log in
or
create an account
to continue receiving notifications after this account expires, and to access other features.
Anti-spam check. Do
not
fill this in!
This template allows you to display hero stats automatically using the game files. It pulls data directly from [[Data:HeroData.json]]. == ⚡ Quick Start == # 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:''' <code><nowiki>{{HeroData|Abrams|MaxHealth}}</nowiki></code> → {{HeroData|Abrams|MaxHealth}} ''or'' <code><nowiki>{{HeroData|hero_atlas|MaxHealth}}</nowiki></code> → {{HeroData|hero_atlas|MaxHealth}} == 📖 Template Functions == The template has different modes depending on what information you need. === Getting Stats (Default) === 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:''' <code><nowiki>{{HeroData|HERO_NAME|STAT_NAME|sig_figs_or_localize}}</nowiki></code> '''Parameters:''' * '''HERO_NAME''' - The hero's name (e.g., <code>Abrams</code>, <code>Bebop</code>) or internal key (e.g., <code>hero_atlas</code>) * '''STAT_NAME''' - The stat to retrieve (e.g., <code>MaxHealth</code>, <code>BulletResist</code>) * '''sig_figs_or_localize''' (optional) - Either a number for rounding (significant figures) or <code>true</code> to localize the value '''Examples:''' * <code><nowiki>{{HeroData|Abrams|MaxHealth}}</nowiki></code> → {{HeroData|Abrams|MaxHealth}} * <code><nowiki>{{HeroData|Bebop|BulletResist}}</nowiki></code> → {{HeroData|Bebop|BulletResist}} * <code><nowiki>{{HeroData|Abrams|MaxHealth|2}}</nowiki></code> → {{HeroData|Abrams|MaxHealth|2}} ''(rounded to 2 sig figs)'' * <code><nowiki>{{HeroData|Bebop|DPS|3}}</nowiki></code> → {{HeroData|Bebop|DPS|3}} === Getting Alt Fire Stats === Retrieves stats specifically from a hero's alternate fire mode. '''Syntax:''' <code><nowiki>{{HeroData|altfire|HERO_NAME|STAT_NAME|sig_figs_or_localize}}</nowiki></code> '''Example:''' * <code><nowiki>{{HeroData|altfire|Shiv|BulletDamage}}</nowiki></code> → {{HeroData|altfire|Shiv|BulletDamage}} === Getting List Elements === Retrieves a specific element from a list/array property. Primarily used for weapon types. '''Syntax:''' <code><nowiki>{{HeroData|list|HERO_NAME|LIST_NAME|INDEX|localize}}</nowiki></code> '''Parameters:''' * '''LIST_NAME''' - The name of the list property (usually <code>WeaponTypes</code>) * '''INDEX''' - Which element to get (1 for first, 2 for second, etc.) * '''localize''' (optional) - Defaults to <code>true</code> for readable names. Set to <code>false</code> for raw internal keys. '''Examples:''' * <code><nowiki>{{HeroData|list|Abrams|WeaponTypes|1}}</nowiki></code> → {{HeroData|list|Abrams|WeaponTypes|1}} ''(returns "Spreadshot")'' * <code><nowiki>{{HeroData|list|Abrams|WeaponTypes|2}}</nowiki></code> → {{HeroData|list|Abrams|WeaponTypes|2}} ''(returns "Close Range")'' * <code><nowiki>{{HeroData|list|Abrams|WeaponTypes|1|false}}</nowiki></code> → {{HeroData|list|Abrams|WeaponTypes|1|false}} ''(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 === Retrieves the scaling value for a stat and returns it formatted with the appropriate scaling template ({{tl|Ss}} for Spirit or {{tl|PI}} for Power Increases). '''Syntax:''' <code><nowiki>{{HeroData|scalar|HERO_NAME|SCALING_TYPE|STAT_NAME|sig_figs_or_localize}}</nowiki></code> '''Parameters:''' * '''SCALING_TYPE''' - Either <code>Spirit</code> or <code>Level</code> (for Power Increases) * '''STAT_NAME''' - The stat to check scaling for * '''sig_figs_or_localize''' (optional) - Rounding or localization '''Examples:''' * <code><nowiki>{{HeroData|scalar|Sinclair|Spirit|MaxMoveSpeed}}</nowiki></code> → {{HeroData|scalar|Sinclair|Spirit|MaxMoveSpeed}} * <code><nowiki>{{HeroData|scalar|Bebop|Level|BulletResist}}</nowiki></code> → {{HeroData|scalar|Bebop|Level|BulletResist}} '''Note:''' Returns an empty string if the hero doesn't have scaling for that stat. === Getting Hero Tags === Retrieves one of a hero's three descriptive tags. '''Syntax:''' <code><nowiki>{{HeroData|tag|HERO_NAME|TAG_NUMBER}}</nowiki></code> '''Parameters:''' * '''HERO_NAME''' - The hero's display name (e.g., <code>Abrams</code>, <code>Lady Geist</code>) * '''TAG_NUMBER''' - 1, 2, or 3 (for the first, second, or third tag) '''Examples:''' * <code><nowiki>{{HeroData|tag|Abrams|1}}</nowiki></code> → {{HeroData|tag|Abrams|1}} * <code><nowiki>{{HeroData|tag|Lady Geist|2}}</nowiki></code> → {{HeroData|tag|Lady Geist|2}} == 📋 Common Stats == Here are some frequently used stats you can retrieve: === Vitality === * <code>MaxHealth</code> - Maximum health * <code>BaseHealthRegen</code> - Health regeneration per second * <code>BulletResist</code> - Bullet resistance percentage * <code>TechResist</code> - Spirit resistance percentage * <code>MeleeResist</code> - Melee resistance percentage * <code>MaxMoveSpeed</code> - Movement speed * <code>SprintSpeed</code> - Sprint speed * <code>StaminaCooldown</code> - Stamina cooldown * <code>Stamina</code> - Stamina amount === Weapon === * <code>DPS</code> - Damage per second * <code>BulletDamage</code> - Damage per bullet * <code>RoundsPerSecond</code> - Fire rate * <code>ClipSize</code> - Magazine/clip size * <code>ReloadTime</code> - Reload duration * <code>LightMeleeDamage</code> - Light melee damage * <code>HeavyMeleeDamage</code> - Heavy melee damage * <code>BulletSpeed</code> - Projectile speed * <code>FalloffStartRange</code> - Damage falloff start distance * <code>FalloffEndRange</code> - Damage falloff end distance * <code>WeaponTypes</code> - List of weapon attributes (use with <code>list</code> function) === Spirit === * <code>TechPower</code> - Spirit power ''For a complete list of stats, check [[Data:HeroData.json]].'' == ❌ Common Errors == * <span style="color:red;">Hero Not Found</span> *: The hero name/key is incorrect. Make sure to use either the display name (e.g., <code>Abrams</code>) or internal key (e.g., <code>hero_atlas</code>). * Returns <code>0</code> *: The stat doesn't exist for that hero, or the stat name is spelled incorrectly. * <span style="color:red;">No Alt Fire</span> *: This hero doesn't have an alternate fire mode. == 💡 Tips == * '''Hero Names:''' Most functions accept EITHER the internal hero key (e.g., <code>hero_atlas</code>) OR the display name (e.g., <code>Abrams</code>). The <code>tag</code> function ONLY accepts display names (e.g., <code>Abrams</code>, <code>Lady Geist</code>). * '''Significant Figures:''' The optional rounding parameter uses significant figures, not decimal places. <code>2</code> turns <code>1250</code> into <code>1300</code> and <code>0.125</code> into <code>0.13</code>. * '''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 <code>list</code> function returns localized, human-readable names. This is almost always what you want! <templatedata> { "description": "Displays hero stats and information from game files. Use Data:HeroData.json to find available stats.", "params": { "1": { "label": "Function or Hero Name", "description": "Either a function name (altfire, list, scalar, tag) OR the hero's name/key when getting stats (e.g., Abrams or hero_atlas).", "type": "string", "required": true, "example": "Abrams", "suggestedvalues": ["altfire", "list", "scalar", "tag"] }, "2": { "label": "Hero Name or Stat Name", "description": "The hero's name/key (if param 1 is a function) OR the stat name to retrieve (if param 1 is a hero name).", "type": "string", "required": false, "example": "MaxHealth" }, "3": { "label": "Stat Name, Index, or Options", "description": "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.", "type": "string", "required": false }, "4": { "label": "Additional Parameter", "description": "Additional parameter for specific functions (e.g., list index, sig_figs for altfire/scalar).", "type": "string", "required": false }, "5": { "label": "Localization", "description": "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.", "type": "string", "required": false, "default": "true" } }, "format": "inline" } </templatedata> <includeonly> [[Category:Templates]] </includeonly><noinclude> [[Category:Template documentation]] </noinclude>
Summary:
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Deadlock:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Preview page with this template
Pages included on this page:
Template:HeroData
(
edit
)
Template:PI
(
edit
)
Template:PI/styles.css
(
edit
)
Template:Ss
(
edit
)
Template:Ss/styles.css
(
edit
)
Template:Tl
(
edit
)
Module:Dictionary
(
edit
)
Module:HeroData
(
edit
)
Module:Lang
(
edit
)
Module:Utilities
(
edit
)
Data:Dictionary
(
edit
)
Data:HeroData.json
(
view source
) (⧼restriction-level-bot+⧽)
Data:LangCodes.json
(
view source
) (⧼restriction-level-bot+⧽)
Data:Lang en.json
(
view source
) (⧼restriction-level-bot+⧽)
Navigation menu
Personal tools
Create account
Log in
associated-pages
Template
Discussion
English
Views
Read
Edit source
History
Tools
Search
Discord
Discord
Navigation
Main page
About us
Random page
Special pages
Recent changes
Neutral
8h ago
·
~2026-LaneFireUrn1085
Souls
8h ago
·
Gammaton32
Neutral
9h ago
·
~2026-LaneFireUrn1085
Victor/Lore
11h ago
·
Roseabrams96
Show more...
Interface Admin
Common CSS
Vector CSS
Minerva CSS
Citizen CSS
Brown theme CSS
Gadgets
Gadgets definition
Editing
How to edit
Style guide
All guides
New files
Unresolved feedback
Tools
What links here
Related changes
Page information