Template:HeroInfoBox: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Revamped scalar cargo query call |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 4: | Line 4: | ||
This template is the intended means of summoning an infobox for Heroes on their individual pages. Provide the internal ID of the hero associated with that page, provide the language, and the result will be filled in using data from [[Help:Cargo|Cargo]]. | This template is the intended means of summoning an infobox for Heroes on their individual pages. Provide the internal ID of the hero associated with that page, provide the language, and the result will be filled in using data from [[Help:Cargo|Cargo]]. | ||
The language will | The language will be passed to all subsequent templates. The main display code for this infobox is in [[Template:HeroInfoBox/base]], which itself calls multiple sub-templates for looking up terms and displaying dynamic data. | ||
{{HeroInfoBox|id=human_hero_13|lang=en}} | |||
{{HeroInfoBox|id=human_hero_13|lang=pl}} | |||
{{HeroInfoBox|id=human_hero_13|lang=fr}} | |||
<code><nowiki>{{HeroInfoBox|id=human_hero_13|lang=fr}}</nowiki></code> | |||
<code><nowiki>{{HeroInfoBox|id=human_hero_13|lang=pl}}</nowiki></code> | |||
<code><nowiki>{{HeroInfoBox|id=human_hero_13|lang=en}}</nowiki></code> | |||
{{clear}} | {{clear}} | ||
</noinclude><includeonly>{{#cargo_query: | </noinclude><includeonly>{{#cargo_query: | ||
tables = Hero=H, HeroClass=HC, Faction=F, | tables = Hero=H, HeroClass=HC, Faction=F, | ||
Translation=hero_t, Translation= | Translation=hero_t, Translation=hero_en, Translation=motto_t | ||
|join on = H.class_id = HC.id, | |join on = H.class_id = HC.id, | ||
H.faction = F.id, | H.faction = F.id, | ||
H.id = hero_t.target_id, | H.id = hero_t.target_id, | ||
H.id = | H.id = hero_en.target_id, | ||
H.id = motto_t.target_id | |||
|where = H.id = '{{{id|}}}' | |where = H.id = '{{{id|}}}' | ||
AND hero_t.type = 'hero' AND hero_t.language = '{{{lang|en}}}' | AND hero_t.type = 'hero' AND hero_t.language = '{{{lang|en}}}' | ||
AND hero_en.type = 'hero' AND hero_en.language = 'en' | |||
AND motto_t.type = 'hero_motto' AND motto_t.language = '{{{lang|en}}}' | AND motto_t.type = 'hero_motto' AND motto_t.language = '{{{lang|en}}}' | ||
|fields = H.id = id, | |fields = H.id = id, | ||
hero_t.language = lang, | |||
hero_t.name = name, | hero_t.name = name, | ||
CONCAT(hero_en.name,'.png') = portrait, | |||
motto_t.description = motto, | motto_t.description = motto, | ||
hero_t.description = biography, | hero_t.description = biography, | ||
H.class_id = class, | |||
H.faction = faction, | |||
COALESCE(H.offence, HC.offence) = startattack, | COALESCE(H.offence, HC.offence) = startattack, | ||
COALESCE(H.defence, HC.defence) = startdefense, | COALESCE(H.defence, HC.defence) = startdefense, | ||
Latest revision as of 23:50, 16 May 2026
This template is the intended means of summoning an infobox for Heroes on their individual pages. Provide the internal ID of the hero associated with that page, provide the language, and the result will be filled in using data from Cargo.
The language will be passed to all subsequent templates. The main display code for this infobox is in Template:HeroInfoBox/base, which itself calls multiple sub-templates for looking up terms and displaying dynamic data.
Lia the Untethered One
A human soul is vast — rise in the Church, and shed the body’s chains.
Faction
Hero Class
Starting Attributes
Starting Skills
Starting Spells
Starting Army
Internal ID
human_hero_13
Lia Nieokiełznana
Ludzka dusza nie ma granic — odnajdź drogę w Kościele i zrzuć cielesne okowy.
Frakcja
Klasa
Starting Attributes💬
Umiejętności początkowe
Zaklęcia początkowe
Armia początkowa
Wewnętrzne ID
human_hero_13
Lia l’affranchie
L’âme humaine est infinie : élevez-vous dans l’Église et débarrassez-vous des chaînes du charnel.
Faction
Classe
Statistiques de Départ
Compétences de départ
Sorts de départ
Armée de départ
ID interne
human_hero_13
{{HeroInfoBox|id=human_hero_13|lang=fr}}
{{HeroInfoBox|id=human_hero_13|lang=pl}}
{{HeroInfoBox|id=human_hero_13|lang=en}}


