Template:Infobox hero: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
FengMing (talk | contribs)
m Add "Pronouns" translation
Vergir (talk | contribs)
replace template with a module rendering
Tag: Replaced
 
Line 1: Line 1:
<templatestyles src="Infobox hero/styles.css" />
<templatestyles src="Infobox hero/styles.css" /><templatestyles src="Infobox hero/themes.css" /><includeonly>{{#invoke:InfoboxHero|render}}</includeonly><noinclude>{{Documentation}}</noinclude>
<templatestyles src="Infobox hero/themes.css" />
<includeonly><!--
-->{{#vardefine:provided_key|{{{key|}}}}}<!--
  If key provided is an accepted hero_[name] key, use it;
-->{{#ifeq: {{#invoke:Infobox_hero|is_hero_key|{{#var:provided_key}}}}|true|{{#vardefine:hero_key|{{#var:provided_key}}}}|<!--
  Else, if key provided is actually the string *English* name, get the key from it to use it;
-->{{#ifeq:{{#invoke:Infobox_hero|en_is_hero_key|{{#var:provided_key}}}}|true| {{#vardefine:hero_key|{{#invoke:HeroData|get_hero_key|{{#var:provided_key}}}}}}|<!--
  Else, fall back on "hero_targetdummy"
-->{{#vardefine:hero_key|hero_targetdummy}}<!--
-->
}}}}
<!--
 
  Get English string name from current key
-->{{#vardefine:hero_en|{{#invoke:Lang|get_string|{{#var:hero_key}}|lang_code_override=en}} }}<!--
-->{{#vardefine:hero_en_herodata|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|Name}} }}<!--
-->{{#vardefine:hero_lang|{{#invoke:Lang|get_string|{{#var:hero_key}}}} }}<!--
 
  THEME VARIABLES:
-->{{#vardefine:theme-logo-height| {{#invoke:Infobox_hero|get_theme_var|{{#var:hero_key}}|logo-height}} }}<!--
-->{{#vardefine:theme-bg-image| {{#invoke:Infobox_hero|get_theme_var|{{#var:hero_key}}|bg-image}} }}<!--<!--
-->{{#vardefine:theme-bg-height| {{#invoke:Infobox_hero|get_theme_var|{{#var:hero_key}}|bg-height}} }}<!--
 
  DEPRECATED PARAM VARIABLES:  (at least until its all moved over)
-->{{#ifeq:{{{no_name|}}}|true|{{#vardefine:show_logo|false}}|{{#vardefine:show_logo|{{{show_logo|true}}}}}}}<!--
-->{{#ifeq:{{{no_summary|}}}|true|{{#vardefine:show_hero_tags|false}}|{{#vardefine:show_hero_tags|{{{show_hero_tags|true}}}}}}}<!--
-->{{#ifeq:{{{no_icon|}}}|true|{{#vardefine:show_icon|false}}|{{#vardefine:show_icon|{{{show_icon|true}}}}}}}<!--
 
-->{{#vardefine:quotemark|"}}<!-- for inserting into html
 
 
  --- Overridden Variable Styles ---
--><div class={{#var:quotemark}}infobox-h {{#var:hero_key}}{{#var:quotemark}}><!--
 
  --- Box Background ---
--><div class="infobox-h-background">[[File:{{#var:theme-bg-image}}|{{#var:theme-bg-height}}|right|link=|class=notpageimage]]</div><!--
-->
{| class="infobox-h-content"
! colspan="2" class="infobox-h-title" {{#if:{{{name_font_size|}}}|style{{=}}"font-size: {{{name_font_size|25px}}};"}} |<!--
 
---- Title + Name Image + Hero Thumbnail ---->
<div class="infobox-h-title-hero">
<div class="infobox-h-title-hero-left"></div>
<div class="infobox-h-title-hero-middle">{{If lang
|{{#ifexist:File:{{{name|{{#var:hero_en}}}}}_name.svg|{{Template:Icon/White|[[File:{{{name|{{#var:hero_en}}}}}_name.svg|{{#var:theme-logo-height}}|class=notpageimage]]}}|{{{name|{{#var:hero_lang}}}}}}}
|{{#ifexist:File:{{{name|{{#var:hero_en}}}}}_name_{{#invoke:Lang|get_lang_code}}.svg|{{Template:Icon/White|[[File:{{{name|{{#var:hero_en}}}}}_name_{{#invoke:Lang|get_lang_code}}.svg|{{#var:theme-logo-height}}|class=notpageimage]]}}|{{{name|{{#var:hero_lang}}}}}}}
|{{{name|{{#var:hero_lang}}}}}}}</div>
<div class="infobox-h-title-hero-right"><div>
{{#ifeq:{{#var:show_icon}}|true|{{#ifexist:File:{{{icon|{{#var:hero_en}}}}}.png|<div class="infobox-h-title-hero-tornbox"></div>
<div class="infobox-h-title-hero-icon">[[File:{{{icon|{{#var:hero_en}}}}}.png|center|35px|class=notpageimage]]</div></div>
</div>|}}}}<!--
 
---- Hero Image Card ---->
|-
! colspan="2" class="infobox-h-image" |<div>{{#ifexist: File:{{{card|{{#var:hero_en_herodata}} card.png}}}|[[File:{{{card|{{#var:hero_en_herodata}} card.png}}}|150px|alt={{{BASEPAGENAME}}}]]|[[File:Dummy card.png|150px|alt={{{BASEPAGENAME}}}]]}}</div><!--
 
---- Hero Tags ---->
{{#ifeq:{{#var:show_hero_tags}}|true|{{#ifeq:{{#invoke:Infobox_hero|hero_has_tags|{{#var:hero_en}}}}|true|
{{!}}-
{{!}} colspan="2" class="infobox-h-herotags-row" {{!}}
<div class="infobox-h-herotags-inner {{#var:hero_key}}">
<div class="infobox-h-herotag-pill">{{#invoke:HeroData|get_hero_tag|{{#var:hero_en}}|1}}</div>
<div class="infobox-h-herotag-pill">{{#invoke:HeroData|get_hero_tag|{{#var:hero_en}}|2}}</div>
<div class="infobox-h-herotag-pill">{{#invoke:HeroData|get_hero_tag|{{#var:hero_en}}|3}}</div>
</div>
|}}|}}<!--
 
---- Weapon Dropdown ---->
|-
! colspan="2" class="infobox-h-subsection infobox-h-dropdown infobox-h-dropdown-weapon" |
{| class="mw-collapsible infobox-h-subsection-child"
|+ class="infobox-h-dropdown-header {{#ifeq:{{If_lang}}|/ru|infobox-h-dropdown-header-overflow}}" | [[Stats{{If_lang}}#Weapon|<span class="infotext-h-bold infobox-h-dropdown-title">{{#invoke:Lang|get_string|CitadelHeroStats_Weapon}}</span>]]
|-<!--
---- Damage per second ---->
| [[Damage per second{{If_lang}}|<span>{{#invoke:Lang|get_string|DPS_label}}</span>]]:
| {{Icon/Brown|[[File:Damage.png|20px|link=Damage per second{{If_lang}}]]|{{{dps|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|DPS|3}}}}}}}
|-<!--
---- Bullet Damage ---->
| [[Bullet Damage{{If_lang}}|<span>{{#invoke:Lang|get_string|StatDesc_BulletDamage}}</span>]]:
| style="padding-right: 5px;" | {{Icon/Brown|[[File:Bullet damage.png|20px|link=Bullet Damage{{If_lang}}]]|{{{bullet_damage|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BulletDamage|3}}}}}<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|BulletDamage}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|BulletDamage}}</span>}}
|-
<!---- Pellets per shot ---->
{{#ifexpr: {{{pellets_per_shot|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BulletsPerShot|3}}}}} > 1 |
{{!}} [[Damage per second{{If_lang}}|<span>{{#invoke:Lang|get_string|BonusPelletsPerShot_label}}</span>]]:
{{!}} {{Icon/Brown|[[File:Bullets per sec icon.png|20px|link=Fire Rate{{If_lang}}]]|{{{pellets_per_shot|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BulletsPerShot|3}}}}}<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|BulletsPerShot}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|BulletsPerShot}}</span>}}}}
|-
<!---- Bullets per burst ---->
{{#ifexpr: {{{bullets_per_burst|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BulletsPerBurst|3}}}}} > 1 |
{{!}} [[Damage per second{{If_lang}}|<span>{{#invoke:Dictionary|translate|BulletsPerBurst}}</span>]]:
{{!}} {{Icon/Brown|[[File:Bullets per sec icon.png|20px|link=Fire Rate{{If_lang}}]]|{{{bullets_per_burst|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BulletsPerBurst|3}}}}}<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|BulletsPerBurst}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|BulletsPerBurst}}</span>}}}}
|-
<!---- Ammo ---->
| [[Ammo{{If_lang}}|<span>{{#invoke:Lang|get_string|StatDesc_ClipSizeBonus}}</span>]]:
| {{Icon/Brown|[[File:Clip size icon.png|20px|link=Ammo{{If_lang}}]]|{{{ammo|{{#ifeq: {{{no_ammo|}}}|true|N/A|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|ClipSize|3}}<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|ClipSize}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|ClipSize}}</span>}}}}}}}
|-
<!---- Bullets per sec ---->
| [[Fire_Rate{{If_lang}}|<span>{{#invoke:Lang|get_string|StatDesc_RoundsPerSecond}}</span>]]:
| {{Icon/Brown|[[File:Bullets per sec icon.png|20px|link=Fire Rate{{If_lang}}]]|{{{bullets_per_sec|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|RoundsPerSecond|3}}}}}<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|RoundsPerSecond}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|RoundsPerSecond}}</span>}}
|-
<!---- Reload Time ---->
| [[Reload Time{{If_lang}}|<span>{{#invoke:Lang|get_string|StatDesc_ReloadTime}}</span>]]:
| {{Icon/Brown|[[File:AttributeIconReloadTime.png|20px|link=Reload Time{{If_lang}}]]|{{{reload_time|{{#ifeq: {{{no_ammo|}}}|true|N/A|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|ReloadTime|3}}s}}}}}}}
|-
<!---- Bullet Velocity ---->
| [[Bullet Velocity{{If_lang}}|<span>{{#invoke:Lang|get_string|StatDesc_BulletSpeed}}</span>]]:
| {{Icon/Brown|[[File:AttributeIconBulletSpeed.png|20px|link=Bullet Velocity{{If_lang}}]]|{{{bullet_velocity|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BulletSpeed|3}}}}}m/s}}
|-
<!---- Light Melee ---->
| [[Melee Damage{{If_lang}}|<span>{{#invoke:Lang|get_string|StatDesc_LightMeleeDamage}}</span>]]:
| style="padding-right: 5px;"| {{Icon/Brown|[[File:Melee damage.png|20px|link=Melee Damage{{If_lang}}]]|{{{light_melee|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|LightMeleeDamage|3}}}}}<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|LightMeleeDamage}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|LightMeleeDamage}}</span>}}
|-
<!---- Heavy Melee ---->
| [[Melee Damage{{If_lang}}|<span>{{#invoke:Lang|get_string|StatDesc_HeavyMeleeDamage}}</span>]]:
| style="padding-right: 5px;"| {{Icon/Brown|[[File:Melee damage.png|20px|link=Melee Damage{{If_lang}}]]|{{{heavy_melee|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|HeavyMeleeDamage|3}}}}}<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|HeavyMeleeDamage}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|HeavyMeleeDamage}}</span>}}
|-
|-
<!---- Maximum Range (Manual Input) ---->
{{#if: {{{max_range|}}} |
{{!}} [[Falloff_Range{{If_lang}}|<span>Max Range</span>]]:
{{!}} {{Icon/Brown||{{{max_range|}}}}}}}
|-
<!---- Crit Bonus Scale ---->
{{#ifexpr: {{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|CritDamageBonusPercent|3}} != 0 |
{{!}} [[Weapon Damage{{If_lang}}#Crit_Multiplier|<span>{{#invoke:Lang|get_string|StatDesc_CritDamageBonusScale}}</span>]]:
{{!}} {{Icon/Brown|[[File:Crit reduction.png|20px|link=Weapon Damage#Crit_Multiplier]]|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|CritDamageBonusPercent|3}}%}}}}
|}
 
<!---- Vitality Dropdown ---->
|-
! colspan="2" class="infobox-h-subsection infobox-h-dropdown infobox-h-dropdown-vitality" |
{| class="mw-collapsible infobox-h-subsection-child"
|+ class="infobox-h-dropdown-header {{#ifeq:{{If_lang}}|/ru|infobox-h-dropdown-header-overflow}}" | [[Stats#Vitality|<span class="infotext-h-bold infobox-h-dropdown-title">{{#invoke:Lang|get_string|CitadelHeroStats_Vitality}}</span>]]
|-
<!---- Health ---->
| {{#ifeq:{{#invoke:Infobox_hero|hero_has_scalars|{{#var:hero_key}}|MaxHealth}}|true|style{{=}}"padding-top:8px;"{{!}}}}[[Health{{If_lang}}|<span>{{#invoke:Lang|get_string|StatDesc_HealthAttribute}}</span>]]:
| {{Icon/Green|[[File:Health.png|20px|link=Health{{If_lang}}]]|{{{max_health|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|MaxHealth|3}}}}}<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|MaxHealth}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|MaxHealth}}</span>}}
|-
<!---- Health Regen ---->
| [[Health Regen{{If_lang}}|<span>{{#invoke:Lang|get_string|StatDesc_HealthRegen}}</span>]]:
| {{Icon/Green|[[File:Health regen.png|20px|link=Health Regen{{If_lang}}]]|{{{health_regen|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BaseHealthRegen|2}}}}}<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|BaseHealthRegen}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|BaseHealthRegen}}</span>}}
|-
<!---- Crit Resistance ---->
{{#if: {{{crit_reduction|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|CritDamageReceivedPercent}} |
{{!}}[[Damage Resistance{{If_lang}}#Crit_Reduction|<span>{{#invoke:Lang|get_string|StatDesc_CritDamageReceivedScale}}</span>]]:
{{!}}{{Icon/Green|[[File:Crit reduction.png|20px|link=Damage Resistance{{If_lang}}#Crit_Reduction]]|{{{crit_reduction|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|CritDamageReceivedPercent|3}}}}}%<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|CritDamageReceivedPercent}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|CritDamageReceivedPercent}}</span>}}}}
|-
<!---- Bullet Resistance ---->
{{#if: {{{bullet_resist|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|BulletResist}} |
{{!}}[[Damage Resistance{{If_lang}}|<span>{{#invoke:Lang|get_string|StatDesc_BulletArmorDamageReduction}}</span>]]:
{{!}}{{Icon/Green|[[File:Bullet Armor.png|20px|link=Bullet Resist{{If_lang}}]]|{{{bullet_resist|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BulletResist|3}}}}}%<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|BulletResist}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|BulletResist}}</span>}}}}
|-
<!---- Spirit Resistance ---->
{{#if: {{{spirit_resist|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|TechResist}} |
{{!}}[[Damage Resistance{{If_lang}}#Spirit_Resist|<span>{{#invoke:Lang|get_string|StatDesc_TechArmorDamageReduction}}</span>]]:
{{!}}{{Icon/Green|[[File:Spirit Armor.png|20px|link=Damage Resistance{{If_lang}}#Spirit_Resist]]|{{{spirit_resist|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|TechResist|3}}}}}%<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|TechResist}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|TechResist}}</span>}}}}
|-
<!---- Melee Resistance ---->
{{#if: {{{melee_resist|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|MeleeResist}} |
{{!}}[[Damage Resistance{{If_lang}}#Melee Resist|<span>{{#invoke:Lang|get_string|StatDesc_MeleeResist}}</span>]]:
{{!}}{{Icon/Green|[[File:Melee damage.png|20px|link=Damage Resistance{{If_lang}}#Melee Resist]]|{{{melee_resist|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|MeleeResist|3}}}}}%<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|MeleeResist}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|MeleeResist}}</span>}}}}
|-
<!---- Debuff Resistance ---->
{{#if: {{{debuff_resist|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|DebuffResist}} |
{{!}}[[Debuff Resist|<span>{{#invoke:Lang|get_string|StatDesc_DebuffResist}}</span>]]:
{{!}}{{Icon/Green|[[File:Spirit Armor.png|20px|link=Damage Resistance{{If_lang}}#Spirit_Resist]]|{{{spirit_resist|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|DebuffResist|3}}}}}%<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|DebuffResist}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|DebuffResist}}</span>}}}}
|-
<!---- Bullet Lifesteal ---->
{{#if: {{{bullet_lifesteal|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|BulletLifesteal}} |
{{!}}[[Lifesteal{{If_lang}}#Bullet Lifesteal|<span>{{#invoke:Lang|get_string|StatDesc_BulletLifesteal}}</span>]]:
{{!}}{{Icon/Green|[[File:AttributeIconBulletLifesteal.png|20px|link=Lifesteal{{If_lang}}#Bullet Lifesteal]]|{{{bullet_lifesteal|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BulletLifesteal|3}}}}}%<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|BulletLifesteal}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|BulletLifesteal}}</span>}}}}
|-
<!---- Spirit Lifesteal ---->
{{#if: {{{spirit_lifesteal|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|SpiritLifesteal}} |
{{!}}[[Lifesteal{{If_lang}}#Spirit Lifesteal|<span>{{#invoke:Lang|get_string|StatDesc_SpiritLifesteal}}</span>]]:
{{!}}{{Icon/Green|[[File:AttributeIconBulletLifesteal.png|20px|link=Lifesteal{{If_lang}}#Spirit Lifesteal]]|{{{spirit_lifesteal|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|SpiritLifesteal|3}}}}}%<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|SpiritLifesteal}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|SpiritLifesteal}}</span>}}}}
|-
<!---- Move Speed ---->
| [[Move Speed{{If_lang}}|<span>{{#invoke:Lang|get_string|StatDesc_RunSpeed}}</span>]]:
| {{Icon/Green|[[File:Move speed.png|20px|link=Move Speed]]|{{{move_speed|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|MaxMoveSpeed|2}}}}}m/s<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|MaxMoveSpeed}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|MaxMoveSpeed}}</span>}}
|-
<!---- Sprint Speed ---->
| [[Move Speed{{If_lang}}#Sprint|<span>{{#invoke:Lang|get_string|StatDesc_SprintSpeed}}</span>]]:
| {{Icon/Green|[[File:Move speed sprint.png|20px|link=Move Speed#Sprint]]|{{{sprint_speed|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|SprintSpeed|2}}}}}m/s<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|SprintSpeed}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|SprintSpeed}}</span>}}
|-
<!---- Dash Speed ---->
| [[Stamina{{If_lang}}#Dash_Speed|<span>{{#invoke:Lang|get_string|DashSpeed_label}}</span>]]:
| {{Icon/Green|[[File:Springy_boots_icon.png|20px|link=Stamina#Dash_Speed]]|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|GroundDashSpeed|3}}m/s<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|GroundDashSpeed}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|GroundDashSpeed}}</span>}}
|-
<!---- Stamina ---->
| [[Stamina{{If_lang}}|<span>{{#invoke:Lang|get_string|StatDesc_Stamina}}</span>]]:
| {{Icon/Green|[[File:Springy_boots_icon.png|20px|link=Stamina]]|{{{stamina|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|Stamina|2}}}}}<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|Stamina}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|Stamina}}</span>}}
|-
<!---- Stamina Cooldown ---->
| [[Stamina{{If_lang}}#Cooldown|<span>{{#invoke:Lang|get_string|StatDesc_StaminaCooldown}}</span>]]:
| {{Icon/Green|[[File:AttributeIconTechDuration.png|20px|link=Stamina#Cooldown]]|{{{stamina_cooldown|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|StaminaCooldown|2}}}}}s<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|StaminaCooldown}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|StaminaCooldown}}</span>}}
|}
 
<!---- Spirit Dropdown ---->
|-
! colspan="2" class="infobox-h-subsection infobox-h-dropdown infobox-h-dropdown-spirit" |
{| class="mw-collapsible infobox-h-subsection-child"
|+ class="infobox-h-dropdown-header {{#ifeq:{{If_lang}}|/ru|infobox-h-dropdown-header-overflow}}" | [[Stats#Vitality|<span class="infotext-h-bold infobox-h-dropdown-title">{{#invoke:Lang|get_string|CitadelHeroStats_Spirit}}</span>]]
|-
| {{#ifeq:{{#invoke:Infobox_hero|hero_has_scalars|{{#var:hero_key}}|TechPower}}|true|style{{=}}"padding-top:8px;"{{!}}}}[[Spirit Power{{If_lang}}|<span>{{#invoke:Lang|get_string|SpiritPower_label}}</span>]]:
| {{Icon/Purple|[[File:Spirit_icon_noborder.png|20px|link=Spirit Power{{If_lang}}]]|{{{spirit_power|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|TechPower|2}}}}}<span class{{=}}"infobox-h-spiritboon">{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Level|TechPower}}{{#invoke:HeroData|get_hero_scalar|{{#var:hero_key}}|Spirit|TechPower}}</span>}}
|}<!--
 
---- "Information" ---->
|-
! colspan="2" class="infobox-h-text-stat-subtitle" {{#if:{{{release_date|}}}{{{voice_actor|}}}{{{pronouns|}}}{{{codenames|}}}||style{{=}}"display:none;"}}|
<span class="infotext-h-bold infotext-h-title infotext-h-big">{{#invoke:Dictionary|translate|Information}}</span>
|-
! colspan="2" class="infobox-h-subsection" {{#if:{{{release_date|}}}{{{voice_actor|}}}{{{pronouns|}}}{{{codenames|}}}||style{{=}}"display:none;"}} |
{| class="infobox-h-subsection-child"
|-<!--
-- Release Date (Manual Input) ---->
{{#if:{{{release_date|}}}|
{{!}}[[Heroes by release{{If_lang}}|<span>{{#invoke:Dictionary|translate|ReleaseDate}}</span>]]:
{{!}}{{{release_date|}}}
}}
|-
<!---- Pronouns (Manual Input) ---->
{{#if:{{{pronouns|}}}|
{{!}}{{#invoke:Dictionary|translate|Pronouns}}:
{{!}}{{{pronouns|}}}
}}
|-
<!---- Voice Actor (Manual Input) ---->
{{#if:{{{voice_actor|}}}|
{{!}}{{#invoke:Dictionary|translate|VoiceActor}}:
{{!}}{{{voice_actor|}}}
}}
|-
<!---- Codenames (Manual Input) ---->
{{#if:{{{codenames|}}}|
{{!}}{{#invoke:Dictionary|translate|Codenames}}:
{{!}}{{{codenames|}}}
}}
|}
|}</div><!--
-->{{#ifeq:{{NAMESPACE}}|Template||{{DISPLAYTITLE:{{{name|{{#var:hero_lang}}}}}}}}}
{{#ifeq:{{#invoke:HeroData|get_hero_var|{{#var:hero_lang}}|IsDisabled}}|false|
{{#ifeq:{{lc:{{{nocat|false}}}}}|false|
{{lang cat|Heroes}}
{{#ifeq:{{#var:hero_en}}|Silver (Transformed)||{{lang cat|{{#var:hero_en}}}}}}
{{#ifexpr:{{{pellets_per_shot|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BulletsPerShot|3}}}}} > 1|{{lang cat|Heroes with spreadshot weapons}}
{{#ifeq:{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|HitOnceAcrossAllBullets}}|true|{{lang cat|Heroes with single damage spreadshot weapons}}}}}}
{{#ifexpr:{{{bullets_per_burst|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BulletsPerBurst|3}}}}} > 1|{{lang cat|Heroes with burst weapons}}}}
{{#ifexpr:({{{pellets_per_shot|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BulletsPerShot|3}}}}} <= 1 and {{{bullets_per_burst|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|BulletsPerBurst|3}}}}} <= 1)|{{lang cat|Heroes with automatic weapons}}}}
{{#ifeq:{{#invoke:HeroData|get_alt_fire_var|{{#var:hero_key}}|BulletDamage}}|No Alt Fire||{{lang cat|Heroes with alternate fire weapons}}}}
{{#if:{{{crit_reduction|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|CritDamageReceivedPercent}}|{{lang cat|Heroes with modified crit resistance}}}}
{{#ifeq:{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|ReloadSingle}}|true|{{lang cat|Heroes with single reload weapons}}}}
{{#ifeq:{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|CanCrit}}|false|{{lang cat|Heroes that don't deal critical damage}}}}
{{#ifexpr:{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|CritDamageBonusPercent|3}} != 0|{{lang cat|Heroes with modified crit scale}}}}
{{#if:{{{bullet_resist|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|BulletResist}}|{{lang cat|Heroes with modified bullet resist}}}}
{{#if:{{{spirit_resist|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|TechResist}}|{{lang cat|Heroes with modified spirit resist}}}}
{{#if:{{{melee_resist|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|MeleeResist}}|{{lang cat|Heroes with modified melee resist}}}}
{{#if:{{{debuff_resist|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|DebuffResist}}|{{lang cat|Heroes with modified debuff resist}}}}
{{#if:{{{bullet_lifesteal|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|BulletLifesteal}}|{{lang cat|Heroes with modified bullet lifesteal}}}}
{{#if:{{{spirit_lifesteal|}}}{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|SpiritLifesteal}}|{{lang cat|Heroes with modified spirit lifesteal}}}}
{{#if:{{{stamina|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|Stamina|2}}}}}|{{lang cat|Heroes with {{{stamina|{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|Stamina|2}}}}} stamina}}}}
{{#ifeq:{{#invoke:HeroData|get_hero_var|{{#var:hero_lang}}|FalloffStartRange}}|{{#invoke:HeroData|get_hero_var|{{#var:hero_lang}}|FalloffEndRange}}|{{lang cat|Heroes with no weapon damage falloff}}}}
{{#if:{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|SpinAcceleration}}|{{lang cat|Heroes with spin up weapons}}}}
{{#if:{{#invoke:HeroData|hero_has_stat|{{#var:hero_key}}|GravityChange}}|{{lang cat|Heroes with modified gravity scale}}}}
{{#ifexpr:{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|GroundDashSpeed|3}} < 14.7|{{lang cat|Heroes with slow dash speed}}}}
{{#ifexpr:{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|GroundDashSpeed|3}} = 14.7|{{lang cat|Heroes with medium dash speed}}}}
{{#ifexpr:{{#invoke:HeroData|get_hero_var|{{#var:hero_key}}|GroundDashSpeed|3}} > 14.7|{{lang cat|Heroes with fast dash speed}}}}
}}}}<!--
--></includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 16:13, 16 July 2026

Template documentation [view] [edit] [history] [purge]
CSS3 logo.svg
This template uses CSS found at Infobox hero/styles.css.
CSS3 logo.svg
This template uses CSS found at Infobox hero/themes.css.
Infobox hero
Tank
Brawler
Bull-Headed
Weapon Stats
Damage Per Second: 51.4
Bullet Damage: 3.6+0.1
Pellets per shot: 9
Ammo: 9
Bullets per sec: 1.59
Reload Time: 0.353s
Bullet Velocity: 610m/s
Light Melee: 50+1.74
Heavy Melee: 116+4.03
Vitality Stats
Health: 800+49
Health Regen: 1.5
Move Speed: 6.4m/s
Sprint Speed: 1.6m/s
Dash Speed: 13.9m/s
Stamina: 3
Stamina Cooldown: 4.5s
Spirit Stats
Spirit Power: 0+1.1
Information
Voice Actor:Samoa Joe
Release Date:April 16, 2024
Internal names:Atlas; Bull

Summary

[edit source]

This template fills in most parameters for an Infobox automatically with data from Data:HeroData.json, including base stats and scaling from Levels (Boons) or Spirit Power. Rendering is handled by Module:InfoboxHero, where the row layout is defined as a configuration table at the top of the module. Per-hero colors, backgrounds and logo sizes come from Data:Infobox hero.json.

The hero's code name or their capitalized English name must be entered in the "key" parameter first. Code name is preferable because it loads faster.

For example, this "key" fills the Infobox with data for Ivy:

|key = hero_tengu

or

|key = Ivy

Certain rows, such as Bullet Resist, Spirit Resist, Melee Resist, Debuff Resist, and Lifesteal, will automatically hide themselves if the hero has 0 base value (and no scaling) for that row's statistic. The "Information" section hides itself entirely unless at least one of its parameters is provided.

All base values can be overwritten for rare situations that cannot be immediately automated, but should otherwise be left alone.

If no valid hero is provided, the template will default on TargetDummy (the default character used in Sandbox modes).

Documentation

[edit source]

Description:

Automated infobox for Deadlock heroes.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
keykey

The hero's key word, used to auto-fill table contents from "Data:HeroData.json". Can be the hero's capitalized name in English or the hero's in-game code name.

Default
hero_targetdummy
Example
hero_atlas
Stringrequired
voice_actorvoice_actor

Voice actor(s) for the hero. Footnotes providing sources can (and should) be added when possible.

Example
Samoa Joe <ref>[https://www.imdb.com/title/tt33268153/fullcredits/Deadlock] on [https://www.imdb.com/IMDb]</ref>
Unknownsuggested
release_daterelease_date

Date of the official release of the hero.

Example
April 24, 2024
Unknownsuggested
codenamescodenames

Alternative names used for this hero, found inside of game files.

Example
Atlas; Bull
Unknownsuggested
pronounspronouns

Character pronouns assumed from in-game text/voice-lines or other official information.

Example
He/Him, She/Her, They/Them, He/Them, She/Them
Unknownoptional
show_hero_tagsshow_hero_tags

Shows (true) or hides (false) the three-word hero tags shown in the roster screen. (ex. "Tank, Brawler, Bull-Headed" for Abrams). Heroes without tags omit the row automatically.

Default
true
Booleanoptional
show_iconshow_icon

Shows (true) or hides (false) the icon used by the hero in the in-game chat.

Default
true
Booleanoptional
no_ammono_ammo

If set to true, disables the "Ammo" and "Reload Time" statistics.

Default
false
Booleanoptional
nocatnocat

If set to true, suppresses all automatic categories. Categories are only ever added in the main namespace, and never for disabled heroes.

Default
false
Booleanoptional
name_font_sizename_font_size

Sets the size of the font for hero names that do not have a logo image. Only has an effect when "<Name>_name.svg" is missing, which includes every hero on languages that have no localized logos.

Default
25px
Example
25px
Unknownoptional
cardcard

A file name, including the extension, used as the hero's portrait. Falls back to "Dummy card.png" if the file does not exist. NOTE: Only use for overriding automatic data.

Default
<Hero name> card.png
Example
Abrams card.png
Stringoptional
iconicon

The hero's chat icon, given WITHOUT the ".png" extension. NOTE: Only use for overriding automatic data.

Default
<Hero name>
Example
Abrams
Stringoptional
namename

Overrides the hero's name. Used both for the displayed title and to locate the name logo at "<name>_name.svg", so give a hero name, NOT a file name. (Silver (Transformed) uses "Silver" to reuse Silver's logo.)

Example
Silver
Stringoptional
dpsdps

no description

Unknownoptional
bullet_damagebullet_damage

no description

Unknownoptional
pellets_per_shotpellets_per_shot

For heroes with shotgun-type weapons that fire multiple bullets all at once, at the same time. (Silver, Abrams, Shiv, etc.) The row is hidden when the value is 1 or less.

Unknownoptional
bullets_per_burstbullets_per_burst

For heroes with weapons that fire multiple bullets in longer bursts, instead of all at once. (Seven, Paradox, Sinclair, Lash) The row is hidden when the value is 1 or less.

Unknownoptional
ammoammo

no description

Unknownoptional
bullets_per_secbullets_per_sec

no description

Unknownoptional
reload_timereload_time

no description

Unknownoptional
bullet_velocitybullet_velocity

no description

Unknownoptional
light_meleelight_melee

no description

Unknownoptional
heavy_meleeheavy_melee

no description

Unknownoptional
max_rangemax_range

Maximum distance the bullet can reach. The row only appears when this is provided. (Bebop)

Example
32{{PI|2}}
Unknownoptional
max_healthmax_health

no description

Unknownoptional
health_regenhealth_regen

no description

Unknownoptional
crit_reductioncrit_reduction

Percentage (+ or -) that is multiplied to the critical damage (ex. headshots) received from other heroes, increasing/reducing critical damage intake. (Mo & Krill, Rem, Seven)

Unknownoptional
bullet_resistbullet_resist

no description

Unknownoptional
spirit_resistspirit_resist

no description

Unknownoptional
melee_resistmelee_resist

no description

Unknownoptional
debuff_resistdebuff_resist

Base debuff resistance, as a percentage. (Mina)

Unknownoptional
bullet_lifestealbullet_lifesteal

Healing gained from bullet damage inflicted to other heroes.

Unknownoptional
spirit_lifestealspirit_lifesteal

Healing gained from spirit damage inflicted to other heroes.

Unknownoptional
move_speedmove_speed

no description

Unknownoptional
sprint_speedsprint_speed

no description

Unknownoptional
staminastamina

no description

Unknownoptional
stamina_cooldownstamina_cooldown

no description

Unknownoptional
spirit_powerspirit_power

Base spirit power and scaling.

Unknownoptional