Module:HeroData/doc: Difference between revisions

Jump to navigation Jump to search
Sur (talk | contribs)
m reference to StatBox moved to Infobox_stat
Sur (talk | contribs)
m write_hero_comparison_table and reordered functions
Line 10: Line 10:


== Functions ==
== Functions ==
=== write_infobox ===
Writes a [[Template:Infobox_hero]] template call for a given hero
====Parameters====
* '''hero_name''' – Name of the hero, in english
====Example====
From wikitext:<br>
<pre>{{#invoke:HeroData|write_infobox|HERO_NAME}}</pre>
Which outputs
{{#invoke:HeroData|write_infobox|Abrams}}
=== write_stat_infoboxes ===
Writes all 3 [[Template:Infobox_stat]] template calls (Weapon, Vitality, Spirit) for a given hero
====Parameters====
* '''hero_name''' – Name of the hero, in english
====Example====
From wikitext:<br>
<pre>{{#invoke:HeroData|write_stat_infoboxes|HERO_NAME}}</pre>
Which outputs
{{#invoke:HeroData|write_stat_infoboxes|Abrams}}


=== get_hero_var ===
=== get_hero_var ===
Line 90: Line 64:
<pre>{{#invoke:HeroData|get_list_elem|Abrams|WeaponTypes|2|true}}</pre>
<pre>{{#invoke:HeroData|get_list_elem|Abrams|WeaponTypes|2|true}}</pre>
{{#invoke:HeroData|get_list_elem|Abrams|WeaponTypes|2|true}}
{{#invoke:HeroData|get_list_elem|Abrams|WeaponTypes|2|true}}
=== write_infobox ===
Writes a [[Template:Infobox_hero]] template call for a given hero
====Parameters====
* '''hero_name''' – Name of the hero, in english
====Example====
From wikitext:<br>
<pre>{{#invoke:HeroData|write_infobox|HERO_NAME}}</pre>
Which outputs
{{#invoke:HeroData|write_infobox|Abrams}}
=== write_stat_infoboxes ===
Writes all 3 [[Template:Infobox_stat]] template calls (Weapon, Vitality, Spirit) for a given hero
====Parameters====
* '''hero_name''' – Name of the hero, in english
====Example====
From wikitext:<br>
<pre>{{#invoke:HeroData|write_stat_infoboxes|HERO_NAME}}</pre>
Which outputs
{{#invoke:HeroData|write_stat_infoboxes|Abrams}}
=== write_hero_comparison_table ===
Writes the [[Hero Comparison]] table for a specific Level and Spirit Power
====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====
From wikitext:<br>
<pre>{{#invoke:HeroData|write_hero_comparison_table|LEVEL|SPIRITPOWER}}</pre>
Which outputs
{{#invoke:HeroData|write_hero_comparison_table|11|200}}


== Localizable values ==
== Localizable values ==