Editing Module:HeroData/docGive feedback
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 109: | Line 109: | ||
* '''hero_var''' - Key of the hero's variable that is inside either "Spirit Scaling" or "Level Scaling", see [[Data:HeroData.json]] | * '''hero_var''' - Key of the hero's variable that is inside either "Spirit Scaling" or "Level Scaling", see [[Data:HeroData.json]] | ||
* '''sig_figs_or_localize''' - OPTIONAL, # of sig figs to round to. | * '''sig_figs_or_localize''' - OPTIONAL, # of sig figs to round to. | ||
====Examples==== | ====Examples==== | ||
| Line 118: | Line 117: | ||
<pre>{{#invoke:HeroData|get_hero_scalar|hero_atlas|Level|BulletDamage|2}}</pre> | <pre>{{#invoke:HeroData|get_hero_scalar|hero_atlas|Level|BulletDamage|2}}</pre> | ||
{{#invoke:HeroData|get_hero_scalar|hero_atlas|Level|BulletDamage|2}} | {{#invoke:HeroData|get_hero_scalar|hero_atlas|Level|BulletDamage|2}} | ||
====Notes==== | ====Notes==== | ||
| Line 128: | Line 123: | ||
=== hero_has_stat === | === hero_has_stat === | ||
Checks if a hero possesses a specific stat in their Base data, Level Scaling (Boons), or Spirit Scaling. Used primarily for conditionally hiding rows in infoboxes. | Checks if a hero possesses a specific stat in their Base data, Level Scaling (Boons), or Spirit Scaling. Used primarily for conditionally hiding rows in infoboxes. | ||
====Parameters==== | ====Parameters==== | ||
| Line 140: | Line 133: | ||
=== get_hero_key === | === get_hero_key === | ||
Returns the key of the specified hero's english name | Returns the key of the specified hero's english name | ||
====Parameters==== | ====Parameters==== | ||
* '''hero_name''' - Name of the hero in english | * '''hero_name''' - Name of the hero in english | ||
====Example==== | ====Example==== | ||
<pre>{{#invoke:HeroData|get_hero_key|Abrams}}</pre> | <pre>{{#invoke:HeroData|get_hero_key|Abrams}}</pre> | ||
=== get_ability_key === | === get_ability_key === | ||
| Line 178: | Line 161: | ||
<pre>{{#invoke:HeroData|get_hero_tag|Abrams|1}}</pre> | <pre>{{#invoke:HeroData|get_hero_tag|Abrams|1}}</pre> | ||
=== | === write_hero_comparison_table === | ||
Writes the [[Hero Comparison]] table for a specific Level and Spirit Power | |||
====Parameters==== | ====Parameters==== | ||
* ''' | * '''level''' - Number of [[Level]]s / Power Increases | ||
* '''spirit_power''' - Amount of Spirit power | |||
Both parameters are optional, as if both are 0 or not provided, the outputted table will be at base and will also include the level/SS scaling in each cell along with the base value, rather than the scaled value. | |||
====Example==== | ====Example==== | ||
<pre>{{#invoke:HeroData| | From wikitext:<br> | ||
{{#invoke:HeroData| | <pre>{{#invoke:HeroData|write_hero_comparison_table|LEVEL|SPIRITPOWER}}</pre> | ||
Which outputs | |||
{{#invoke:HeroData|write_hero_comparison_table|11|200}} | |||
=== write_role_playstyle_quote === | === write_role_playstyle_quote === | ||
| Line 230: | Line 219: | ||
== Internal Utility Functions == | == Internal Utility Functions == | ||
The following functions are | The following functions are primarily for internal use but may be useful for advanced users: | ||
=== get_json_item === | === get_json_item === | ||
| Line 238: | Line 227: | ||
* '''name''' - Name of the hero in english | * '''name''' - Name of the hero in english | ||
=== | === get_similar_items === | ||
Returns | Returns an array of hero tables that have a specified property | ||
====Parameters==== | ====Parameters==== | ||
* ''' | * '''property''' - Property key to search for | ||
== Scaling System == | == Scaling System == | ||