Template:Infobox hero/doc: Difference between revisions

Jump to navigation Jump to search
Joe Rippa (talk | contribs)
adding bullets per shot
Samlovesmath (talk | contribs)
summary/documentation rewrite for major 2026 infobox update
Line 1: Line 1:
{{Infobox hero
{{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
|show_hero_tags=false
}}
}}
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, scaling from Levels (Boons) or Spirit Power, associated images/themes, and weapon names. It also uses [[Template:Infobox_hero_tags]] for creating roster tags.


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, and Lifesteal, will automatically hide themselves if the hero has 0 base value (and no scaling) for that row's statistic.


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": {
"label": "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",
"suggestedvalues": [
"hero_airheart",
"hero_astro",
"hero_atlas",
"hero_bebop",
"hero_boho",
"hero_bomber",
"hero_bookworm",
"hero_cadence",
"hero_chrono",
"hero_doorman",
"hero_drifter",
"hero_druid",
"hero_dynamo",
"hero_familiar",
"hero_fencer",
"hero_forge",
"hero_fortuna",
"hero_frank",
"hero_genericperson",
"hero_ghost",
"hero_gigawatt",
"hero_graf",
"hero_gunslinger",
"hero_haze",
"hero_hornet",
"hero_inferno",
"hero_kali",
"hero_kelvin",
"hero_krill",
"hero_lash",
"hero_magician",
"hero_mirage",
"hero_nano",
"hero_necro",
"hero_opera",
"hero_operative",
"hero_orion",
"hero_priest",
"hero_punkgoat",
"hero_rutger",
"hero_shieldguy",
"hero_shiv",
"hero_skyrunner",
"hero_slork",
"hero_swan",
"hero_synth",
"hero_targetdummy",
"hero_tengu",
"hero_testhero",
"hero_thumper",
"hero_tokamak",
"hero_trapper",
"hero_unicorn",
"hero_vampirebat",
"hero_vandal",
"hero_viper",
"hero_viscous",
"hero_warden",
"hero_werewolf",
"hero_werewolf_transformed",
"hero_wraith",
"hero_wrecker",
"hero_yakuza",
"hero_yamato"
],
"required": true,
"default": "hero_targetdummy"
},
"card": {
"card": {
"description": "Adds hero's portrait",
"description": "A file name that will be linked as the hero's portrait. NOTE: Only use for overriding automatic data.",
"example": "Abrams card.png"
"example": "Abrams card.png",
"type": "string",
"aliases": [
"portrait"
],
"default": "Abrams card.png"
},
"weapon_name": {
"description": "Name of hero's weapon. NOTE: Only use for overriding automatic data.",
"type": "string",
"example": "Case Closed"
},
"icon": {
"description": "A file name that will be linked as the hero's map mini-icon. NOTE: Only use for overriding automatic data.",
"example": "Abrams.png",
"type": "string"
},
"name": {
"aliases": [
"logo"
],
"description": "A file name that will be linked as the hero's name logo. NOTE: Only use for overriding automatic data.",
"example": "Abrams_name.png",
"type": "string"
},
},
"weapon_name": {},
"dps": {},
"dps": {},
"bullet_damage": {},
"bullet_damage": {},
Line 36: Line 138:
"range": {},
"range": {},
"max_range": {
"max_range": {
"description": "For Bebop"
"description": "Maximum distance the bullet can reach. (Bebop)",
"example": "32{{PI|2}}"
},
},
"crit_scale": {
"crit_scale": {
"description": "If the hero has crit scale (Kelvin and Vyper)"
"description": "Percentage (+ or -) that is multiplied to the critical damage (ex. headshots), increasing/reducing the critical damage inflicted to other heroes. (Mo & Krill, Rem, Seven)",
"example": "-25%"
},
},
"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"
},
"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 163:
"stamina": {},
"stamina": {},
"stamina_cooldown": {},
"stamina_cooldown": {},
"voice_actor": {},
"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": {
"release_date": {
"suggestedvalues": [
"description": "Date of the official release of the hero.",
"Unreleased"
"example": "April 24, 2024",
]
"suggested": true
},
},
"codenames": {
"codenames": {
"description": "Alternative names used for this hero in the files"
"aliases": [
},
"codename"
"no_icon": {
"suggestedvalues": [
"true"
],
],
"description": "Disables the small hero icon in the header",
"description": "Alternative names used for this hero, found inside of game files.",
"type": "boolean",
"example": "Atlas; Bull",
"default": "true"
"suggested": true
},
},
"no_spirit_resist": {
"pronouns": {
"suggestedvalues": [
"description": "Character pronouns assumed from in-game text/voice-lines or other official information.",
"true"
"example": "He/Him, She/Her, They/Them, He/Them, She/Them"
],
"description": "Manual toggle to hide spirit resist. Now handled automatically by the module.",
"type": "boolean"
},
},
"no_bullet_resist": {
"spirit_power": {
"suggestedvalues": [
"description": "Base spirit power and scaling."
"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": {
"no_summary": {
"description": "Deprecated version of \"show_hero_tags\".",
"deprecated": "Use \"show_hero_tags\" instead.",
"type": "boolean",
"type": "boolean",
"autovalue": "true",
"default": "false"
"description": "Disables the Role/Playstyle summary tags at the bottom"
},
},
"pronouns": {
"show_hero_tags": {
"description": "Character pronouns (e.g. He/Him, They/Them)"
"description": "Shows (true) or hides (false) the three-word hero tags shown in the roster screen. (ex. \"Tank, Brawler, Bull-Headed\" for Abrams)",
"type": "boolean",
"default": "true"
},
},
"no_name": {
"show_logo": {
"description": "Uses standard text name instead of the hero logo image",
"aliases": [
"type": "string",
"show_name"
"suggestedvalues": [
],
"true"
"description": "Shows (true) or hides (false) the name logo displayed above the hero's portrait, if any. Hiding the logo replaces it with a normal text version.",
]
"type": "boolean",
"default": "true"
},
},
"font-size": {
"show_icon": {
"description": "Override for hero name font size if wrapping occurs (default 25px)"
"description": "Shows (true) or hides (false) the icon used by the hero in the in-game map.",
"type": "boolean",
"default": "true"
},
},
"weapon-font-size": {
"no_spirit_resist": {
"description": "Override for weapon name font size if wrapping occurs (default 19px)"
"type": "boolean",
"deprecated": "Now handled automatically by the module.",
"description": "Deprecated toggle to hide spirit resist. Is now handled automatically by the module.",
"default": "false"
},
},
"no_falloff": {
"no_falloff": {
"description": "If the weapon has no falloff (Celeste)",
"description": "If set to true, disables the \"Falloff Range\" statistic. (Celeste)",
"type": "boolean",
"type": "boolean",
"default": "true"
"default": "false"
},
"no_ammo": {
"description": "If set to true, disables the \"Ammo\" and \"Reload time\" statistics. (Silver)",
"type": "boolean",
"default": "false"
},
},
"spirit_power": {
"no_name": {
"description": "Base spirit power and scaling"
"description": "Deprecated version of \"show_logo\".",
"deprecated": "Use \"show_logo\" instead.",
"type": "boolean",
"default": "false"
},
},
"no_ammo": {
"no_icon": {
"description": "if the gun has no ammo count and no reload (Silver)",
"description": "Deprecated version of \"show_icon\".",
"deprecated": "Use \"show_icon\" instead.",
"type": "boolean",
"type": "boolean",
"default": "true"
"default": "false"
},
},
"bullets_per_burst": {
"bullets_per_burst": {
"description": "For heroes with weapons that fire in bursts (Seven, Paradox, Sinclair, Lash)."
"description": "For heroes with weapons that fire multiple bullets in longer bursts, instead of all at once. (Seven, Paradox, Sinclair, Lash)",
"type": "unknown"
},
},
"bullets_per_shot": {
"bullets_per_shot": {
"description": "For Heroes with shotgun-type weapons (Silver, Abrams, Shiv, etc). "
"description": "For heroes with shotgun-type weapons that fire multiple bullets all at once, at the same time. (Silver, Abrams, Shiv, etc.)"
},
"no_bullet_resist": {
"description": "Deprecated toggle to hide bullet resist. Is now handled automatically by the module.",
"type": "boolean",
"deprecated": true,
"default": "false"
},
"name_font_size": {
"aliases": [
"font-size",
"font_size"
],
"description": "Sets the size of the font for hero names that do not have a logo image.",
"example": "25px"
}
}
},
},
"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",
"show_logo",
"no_falloff",
"no_ammo",
"name_font_size",
"card",
"card",
"weapon_name",
"icon",
"icon",
"name",
"name",
"weapon_name",
"dps",
"dps",
"bullet_damage",
"bullet_damage",
Line 190: Line 293:
"health_regen",
"health_regen",
"crit_reduction",
"crit_reduction",
"bullets_per_burst",
"bullets_per_shot",
"bullet_resist",
"bullet_resist",
"spirit_resist",
"spirit_resist",
Line 199: Line 304:
"stamina",
"stamina",
"stamina_cooldown",
"stamina_cooldown",
"voice_actor",
"release_date",
"codenames",
"pronouns",
"font-size",
"weapon-font-size",
"spirit_power",
"spirit_power",
"no_summary",
"no_summary",
"no_name",
"no_name",
"no_icon",
"no_icon",
"no_spirit_resist",
"no_bullet_resist",
"no_bullet_resist",
"no_falloff",
"no_spirit_resist"
"no_ammo",
],
"bullets_per_burst",
"description": "Automated infobox for Deadlock heroes."
"bullets_per_shot"
]
}
}
</templatedata>
</templatedata>


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