Module:HeroData/nav/doc

From Deadlock Wiki
Revision as of 20:35, 28 October 2024 by Sur (talk | contribs) (typo)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is the documentation page for Module:HeroData/nav

Overview[edit source]

Generates hero navigation cards

Functions[edit source]

get_hero_nav_cards[edit source]

For Template:Hero Navbox on Heroes, individual hero pages like Abrams, and the home page.

Examples[edit source]

First with debug_mode on, to help visualize what the output's source looks like.

{{#invoke:HeroData/nav|get_hero_nav_cards
|in_herolabs=true
|text_size=11
|card_size=card_size|88
|sticker_size=sticker_size|30
|herolabs_text_size=herolabs_text_size|6
|debug_mode=true
}}

{{Hero card2|name=Calico|link=Calico|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}} {{Hero card2|name=Fathom|link=Fathom|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}} {{Hero card2|name=Holliday|link=Holliday|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}} {{Hero card2|name=Magician|link=Magician|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}} {{Hero card2|name=Trapper|link=Trapper|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}} {{Hero card2|name=Viper|link=Viper|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}} {{Hero card2|name=Wrecker|link=Wrecker|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}}


Now with debug_mode defaulted to false (off) to see actual visual output.

{{#invoke:HeroData/nav|get_hero_nav_cards
|in_herolabs=true
|text_size=11
|card_size=88
|sticker_size=30
|herolabs_text_size=6
}}

Hero Labs

Calico

Hero Labs

Fathom

Hero Labs

Holliday

Hero Labs

Magician

Hero Labs

Trapper

Hero Labs

Viper

Hero Labs

Wrecker

Parameters[edit source]

  • text_size - Font size of the hero name
  • card_size - Size of the hero card
  • sticker_size - Size of the Recommended or Hero lab stickers that appear in the top right corner
  • herolabs_text_size - Font size of the 'Hero Labs' text that appears for heroes in Hero Labs
  • debug_mode - (OPTIONAL) Defaults to false. With true, the output is raw wikitext source that isn't processed, allowing to see more clearly what is ran.

debug_mode is the only optional parameter. All other parameters are required. Template:Hero card2 utilizes this with some default values, see there for suggested values.