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
sortableclass, 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
Herotable and joins data with theTranslationtable. - It uses
sortabletables; ensure the MediaWiki "Sortable" extension is active for full functionality. - Specialization icons are automatically inferred from the
HeroSpecializationtable and formatted to match faction naming conventions.
Examples
{{#invoke:HeroList|display|faction=Necropolis}}
{{#invoke:HeroList|display|faction=Grove|language=ja}}
| Name💬 | Hero Class💬 | Specialization💬 | 開始スキル | 開始呪文 | ||
|---|---|---|---|---|---|---|
| ウォーデン | パスファインダー -(+++++)- |
|||||
| ウォーデン | 射手 -(+++++)- |
|||||
| ウォーデン | フォーンソング -(+++++)- |
|||||
| ウォーデン | 自然の選択 -(+++++)- |
|||||
| ウォーデン | 四葉の馬蹄 -(+++++)- |
|||||
| ウォーデン | 魅惑の輝き -(+++++)- |
|||||
| ウォーデン | フクスミラの歩み -(+++++)- |
|||||
| ウォーデン | カリスマ -(+++++)- |
|||||
| ウォーデン | 学びの願い -(+++++)- |
|||||
| ドルイド | 魂の活力 -(+++++)- |
|||||
| ドルイド | 最古の樹 -(+++++)- |
|||||
| ドルイド | 穏やかな燃えさし -(+++++)- |
|||||
| ドルイド | 氷撃 -(+++++)- |
|||||
| ドルイド | ぶちかませ! -(+++++)- |
|||||
| ドルイド | 轟雷 -(+++++)- |
|||||
| ドルイド | ざわめきの模倣 -(+++++)- |
|||||
| ドルイド | ざわめきの森の原住民 -(+++++)- |
|||||
| ドルイド | 放浪の音楽家 -(+++++)- |
|||||


