Module:HeroList/doc

From Heroes of Might and Magic: Olden Era Official Wiki

This is the documentation page for Module:HeroList

Description

This module generates an automated table of heroes belonging to a specific faction. It dynamically retrieves localization for hero names, classes, and specializations, and formats the starting skills and spells into a clean, sortable layout.

Usage

The module is invoked via the display function:

{{#invoke:HeroList|display|faction=...|language=...}}

Parameters

Parameter Description Example
faction The name of the faction (as stored in the Translation table). faction=Necropolis
language Forces the Wiki language (if omitted, it detects the page suffix). language=fr

Key Features

  • Dynamic Localization: Translates headers (Name, Class, etc.) and hero-specific data (Names, Skills, Spells) based on the provided language.
  • Automatic Formatting:
    • Displays hero portraits and icons.
    • Formats specializations with tooltips showing descriptions.
    • Lists starting skills and spells as link-lists with icons.
  • Sorting Support: The table uses the sortable class, allowing users to reorder heroes based on columns.
  • Data Cleanup: Automatically filters out campaign, tutorial, and internal testing heroes (e.g., cm_fun).

Implementation Example

To display all heroes of the "Necropolis" faction:

== Necropolis Heroes ==
{{#invoke:HeroList|display|faction=Necropolis}}

Technical Notes

  • The module queries the Hero table and joins data with the Translation table.
  • It uses sortable tables; ensure the MediaWiki "Sortable" extension is active for full functionality.
  • Specialization icons are automatically inferred from the HeroSpecialization table and formatted to match faction naming conventions.

Examples

{{#invoke:HeroList|display|faction=Necropolis}}
Name Hero Class Specialization Starting Skills Starting Spells
Death Knight
Built Different
-(+++++)-
Necromancy
Defense
Death Knight
Charismatic
-(+++++)-
Necromancy
Diplomacy
Death Knight
Perfect Puppets
-(+++++)-
Necromancy
Offense
Death Knight
Dreadful War
-(+++++)-
Necromancy
Tactics
Death Knight
Part of a Pack
-(+++++)-
Necromancy
Scouting
Death Knight
Drive 'em Crazy
-(+++++)-
Necromancy
Resistance
Masterful Berserk
Death Knight
Languid Soil
-(+++++)-
Necromancy
Logistics
Masterful Web
Death Knight
Undead Legion
-(+++++)-
Necromancy
Zam
Death Knight
Alchemist
-(+++++)-
Necromancy
Recruitment
Primordial Chaos
Mag
Necromancer
Arcane Dominion
-(+++++)-
Necromancy
Arcane Magic
Impending Fate
Necromancer
Amnesiac
-(+++++)-
Necromancy
Battlecraft
Shade Cloak
Necromancer
Tomb-bound Will
-(+++++)-
Necromancy
Wisdom
Song of Power
Necromancer
Bones Guild
-(+++++)-
Necromancy
Luck
Naira's Veil
Necromancer
Shadowmastery
-(+++++)-
Necromancy
Nightshade Magic
Umbral Grip
Necromancer
Moldering
-(+++++)-
Necromancy
Sorcery
Masterful Despair
Necromancer
Wistful Nostalgia
-(+++++)-
Necromancy
Thaumaturgy
Masterful Rewind Life
Necromancer
Undead Legion
-(+++++)-
Necromancy
Summon Avatar
Basic Summon Avatar
Read Minds
Necromancer
Wealthy
-(+++++)-
Necromancy
Battle Magic
Fatal Decay


{{#invoke:HeroList|display|faction=Grove|language=ja}}
Name💬 Hero Class💬 Specialization💬 開始スキル 開始呪文
ウォーデン
パスファインダー
-(+++++)-
ざわめき
偵察
ウォーデン
射手
-(+++++)-
ざわめき
攻勢
ウォーデン
フォーンソング
-(+++++)-
ざわめき
統率
ウォーデン
自然の選択
-(+++++)-
ざわめき
戦闘魔法
マスター:ギロチン
ウォーデン
四葉の馬蹄
-(+++++)-
ざわめき
武運
ウォーデン
魅惑の輝き
-(+++++)-
ざわめき
戦技
バーサーク
ウォーデン
フクスミラの歩み
-(+++++)-
ざわめき マスター:火球
ウォーデン
カリスマ
-(+++++)-
ざわめき
外交
ウォーデン
学びの願い
-(+++++)-
ざわめき
洞察
ドルイド
魂の活力
-(+++++)-
ざわめき
叡智
原初の混沌
ドルイド
最古の樹
-(+++++)-
ざわめき
奇術
活力付与
ドルイド
穏やかな燃えさし
-(+++++)-
ざわめき
原初魔法
マスター:紅蓮の壁
ドルイド
氷撃
-(+++++)-
ざわめき
原初魔法
マスター:氷撃
ドルイド
ぶちかませ!
-(+++++)-
ざわめき
原初魔法
マスター:降石
ドルイド
轟雷
-(+++++)-
ざわめき
原初魔法
マスター:連鎖雷撃
ドルイド
ざわめきの模倣
-(+++++)-
ざわめき
秘術魔法
マスター:ミラーコピー
ドルイド
ざわめきの森の原住民
-(+++++)-
ざわめき
化身召喚
化身召喚(初級)
弱化光線
ドルイド
放浪の音楽家
-(+++++)-
ざわめき
魔術知識
エネルギー爆裂