Template:Infobox hero/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
LVL (talk | contribs)
m Reverted edit by 162.210.194.1 (talk) to last revision by LVL
Tag: Rollback
corrected wording. minimap icons are different files, they have extremely low resolution and sometimes decreased detail so using chat icons imo is preferable to correcting them to be the actual map icons
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Infobox hero
{{TS}}{{TS|Infobox hero/themes.css}}{{Infobox hero
|key=hero_atlas
|key=hero_atlas
|card=Abrams card.png
|voice_actor=Samoa Joe
|voice_actor=Samoa Joe
|release_date=April 16, 2024
|release_date=April 16, 2024
|codenames=Atlas; Bull
|codenames=Atlas; Bull
}}
}}
Template fills in most parameters in infobox automatically with data from [[Data:HeroData.json]], including base stats and scaling from Levels (Boons) or Spirit Power.
== Summary ==
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]].


You need to put hero's code name or their capitalized name in English in the "key" parameter first. Code name is preferable because it loads faster.
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 infobox with data for {{HeroIcon|Ivy}}
For example, this "key" fills the Infobox with data for {{HeroIcon|Ivy}}:
<pre>|key = hero_tengu</pre>
<pre>|key = hero_tengu</pre>
or
or
<pre>|key = Ivy</pre>
<pre>|key = Ivy</pre>


Rows for Bullet Resist, Spirit Resist, Melee Resist, and Lifesteal will automatically hide themselves if the hero has 0 base value and no scaling for that stat.
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 ==
'''Description:'''
<templatedata>
<templatedata>
{
{
"params": {
"params": {
"name": {},
"key": {
"description": "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.",
"type": "string",
"example": "hero_atlas",
"required": true,
"default": "hero_targetdummy"
},
"voice_actor": {
"description": "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>",
"suggested": true
},
"release_date": {
"description": "Date of the official release of the hero.",
"example": "April 24, 2024",
"suggested": true
},
"codenames": {
"description": "Alternative names used for this hero, found inside of game files.",
"example": "Atlas; Bull",
"suggested": true
},
"pronouns": {
"description": "Character pronouns assumed from in-game text/voice-lines or other official information.",
"example": "He/Him, She/Her, They/Them, He/Them, She/Them"
},
"show_hero_tags": {
"description": "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.",
"type": "boolean",
"default": "true"
},
"show_icon": {
"description": "Shows (true) or hides (false) the icon used by the hero in the in-game chat.",
"type": "boolean",
"default": "true"
},
"no_ammo": {
"description": "If set to true, disables the \"Ammo\" and \"Reload Time\" statistics.",
"type": "boolean",
"default": "false"
},
"nocat": {
"description": "If set to true, suppresses all automatic categories. Categories are only ever added in the main namespace, and never for disabled heroes.",
"type": "boolean",
"default": "false"
},
"name_font_size": {
"description": "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.",
"example": "25px",
"default": "25px"
},
"card": {
"card": {
"description": "Adds hero's portrait",
"description": "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.",
"example": "Abrams card.png"
"example": "Abrams card.png",
"type": "string",
"default": "<Hero name> card.png"
},
"icon": {
"description": "The hero's chat icon, given WITHOUT the \".png\" extension. NOTE: Only use for overriding automatic data.",
"example": "Abrams",
"type": "string",
"default": "<Hero name>"
},
"name": {
"description": "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",
"type": "string"
},
},
"weapon_name": {},
"dps": {},
"dps": {},
"bullet_damage": {},
"bullet_damage": {},
"pellets_per_shot": {
"description": "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."
},
"bullets_per_burst": {
"description": "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."
},
"ammo": {},
"ammo": {},
"bullets_per_sec": {},
"bullets_per_sec": {},
Line 34: Line 109:
"light_melee": {},
"light_melee": {},
"heavy_melee": {},
"heavy_melee": {},
"range": {},
"max_range": {
"max_range": {
"description": "For Bebop"
"description": "Maximum distance the bullet can reach. The row only appears when this is provided. (Bebop)",
},
"example": "32{{PI|2}}"
"crit_scale": {
"description": "If the hero has crit scale (Kelvin and Vyper)"
},
},
"max_health": {},
"max_health": {},
"health_regen": {},
"health_regen": {},
"crit_reduction": {
"crit_reduction": {
"description": "If the hero has crit reduction (Seven and Mo & Krill)"
"description": "Percentage (+ or -) that is multiplied to the critical damage (ex. headshots) received from other heroes, increasing/reducing critical damage intake. (Mo & Krill, Rem, Seven)"
},
},
"bullet_resist": {},
"bullet_resist": {},
"spirit_resist": {},
"spirit_resist": {},
"melee_resist": {
"melee_resist": {},
"description": "Melee damage resistance percentage"
"debuff_resist": {
"description": "Base debuff resistance, as a percentage. (Mina)"
},
},
"bullet_lifesteal": {
"bullet_lifesteal": {
"description": "Healing gained from bullet damage"
"description": "Healing gained from bullet damage inflicted to other heroes."
},
},
"spirit_lifesteal": {
"spirit_lifesteal": {
"description": "Healing gained from spirit damage"
"description": "Healing gained from spirit damage inflicted to other heroes."
},
},
"move_speed": {},
"move_speed": {},
Line 61: Line 134:
"stamina": {},
"stamina": {},
"stamina_cooldown": {},
"stamina_cooldown": {},
"voice_actor": {},
"spirit_power": {
"release_date": {
"description": "Base spirit power and scaling."
"suggestedvalues": [
"Unreleased"
]
},
"codenames": {
"description": "Alternative names used for this hero in the files"
},
"no_icon": {
"suggestedvalues": [
"true"
],
"description": "Disables the small hero icon in the header",
"type": "boolean",
"default": "true"
},
"no_spirit_resist": {
"suggestedvalues": [
"true"
],
"description": "Manual toggle to hide spirit resist. Now handled automatically by the module.",
"type": "boolean"
},
"no_bullet_resist": {
"suggestedvalues": [
"true"
],
"description": "Manual toggle to hide bullet resist. Now handled automatically by the module.",
"type": "boolean"
},
"key": {
"description": "Autofills table contents from HeroData.json",
"suggestedvalues": [
"hero_atlas",
"hero_bebop",
"hero_dynamo",
"hero_orion",
"hero_haze",
"hero_inferno",
"hero_tengu",
"hero_kelvin",
"hero_ghost",
"hero_lash",
"hero_forge",
"hero_mirage",
"hero_krill",
"hero_chrono",
"hero_synth",
"hero_gigawatt",
"hero_shiv",
"hero_hornet",
"hero_viscous",
"hero_warden",
"hero_wraith",
"hero_yamato",
"hero_astro",
"hero_nano",
"hero_wrecker",
"hero_kali",
"hero_cadence"
],
"required": true,
"type": "string"
},
"icon": {},
"no_summary": {
"type": "boolean",
"autovalue": "true",
"description": "Disables the Role/Playstyle summary tags at the bottom"
},
"pronouns": {
"description": "Character pronouns (e.g. He/Him, They/Them)"
},
"no_name": {
"description": "Uses standard text name instead of the hero logo image",
"type": "string",
"suggestedvalues": [
"true"
]
},
"font-size": {
"description": "Override for hero name font size if wrapping occurs (default 25px)"
},
"weapon-font-size": {
"description": "Override for weapon name font size if wrapping occurs (default 19px)"
}
}
},
},
"description": "Automated infobox for Deadlock heroes.",
"format": "block",
"format": "block",
"paramOrder": [
"paramOrder": [
"key",
"key",
"voice_actor",
"release_date",
"codenames",
"pronouns",
"show_hero_tags",
"show_icon",
"no_ammo",
"nocat",
"name_font_size",
"card",
"card",
"weapon_name",
"icon",
"icon",
"name",
"name",
"dps",
"dps",
"bullet_damage",
"bullet_damage",
"pellets_per_shot",
"bullets_per_burst",
"ammo",
"ammo",
"bullets_per_sec",
"bullets_per_sec",
Line 165: Line 163:
"light_melee",
"light_melee",
"heavy_melee",
"heavy_melee",
"range",
"max_range",
"max_range",
"crit_scale",
"max_health",
"max_health",
"health_regen",
"health_regen",
Line 174: Line 170:
"spirit_resist",
"spirit_resist",
"melee_resist",
"melee_resist",
"debuff_resist",
"bullet_lifesteal",
"bullet_lifesteal",
"spirit_lifesteal",
"spirit_lifesteal",
Line 180: Line 177:
"stamina",
"stamina",
"stamina_cooldown",
"stamina_cooldown",
"voice_actor",
"spirit_power"
"release_date",
],
"codenames",
"description": "Automated infobox for Deadlock heroes."
"pronouns",
"font-size",
"weapon-font-size",
"no_summary",
"no_name",
"no_icon",
"no_spirit_resist",
"no_bullet_resist"
]
}
}
</templatedata>
</templatedata>


<includeonly>[[Category:Infobox templates|Hero]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
<includeonly>[[Category:Infobox templates|Hero]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 19:48, 19 August 2026

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

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