Template:SkillDisplay: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "<noinclude> {{SkillDisplay|id=skill_faction_demons}} </noinclude><includeonly>{{#cargo_query:tables=Skill=S,SkillLevel=SL |join on=S.id=SL.skill_id |fields= SL.name, CONCAT('Skill ', S.name)=filename, S.name=pagelink |where=S.id='{{{id}}}' AND SL.level = {{{level|1}}} |format=template |template=MediumIconDisplay |named args= yes |delimiter=\n }}</includeonly>"
 
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
This template looks up a skill via its internal ID and produces an icon + link to the associated skill page.  This will automatically look up the level of the skill, displaying Basic, Advanced, or Expert as appropriate (defaulting to Basic). 
This is used in Hero infoboxes.
<pre><nowiki>{{SkillDisplay|id=skill_faction_demons}}</nowiki></pre>


{{SkillDisplay|id=skill_faction_demons}}
{{SkillDisplay|id=skill_faction_demons}}


</noinclude><includeonly>{{#cargo_query:tables=Skill=S,SkillLevel=SL
 
|join on=S.id=SL.skill_id  
<pre><nowiki>{{SkillDisplay|id=skill_enlightenment|level=2|lang=pl}}</nowiki></pre>
|fields= SL.name, CONCAT('Skill ', S.name)=filename, S.name=pagelink
 
|where=S.id='{{{id}}}' AND SL.level = {{{level|1}}}
{{SkillDisplay|id=skill_enlightenment|level=2|lang=pl}}
|format=template
 
|template=MediumIconDisplay
</noinclude><includeonly>{{#cargo_query:
|named args= yes
tables = Skill=S, SkillLevel=SL,
|delimiter=\n
          Translation=skill_t, Translation=skill_en, Translation=level_t
|join on = S.id         = SL.skill_id,
          S.id        = skill_t.target_id,
          S.id        = skill_en.target_id,
          SL.skill_id  = level_t.target_id
|where   = S.id = '{{{id|}}}'
          AND SL.level       = {{{level|1}}}
          AND level_t.variant = '{{{level|1}}}'
          AND skill_t.type    = 'skill'      AND skill_t.language    = '{{{lang|en}}}'
          AND skill_en.type  = 'skill'      AND skill_en.language  = 'en'
          AND level_t.type    = 'skill_level' AND level_t.language    = '{{{lang|en}}}'
|fields  = level_t.name                    = name,
          skill_en.name                    = pagelink,
          CONCAT('Skill ', skill_en.name)  = filename
|format = template
|template= MediumIconDisplay
|named args = yes
}}</includeonly>
}}</includeonly>

Revision as of 06:48, 16 May 2026


This template looks up a skill via its internal ID and produces an icon + link to the associated skill page. This will automatically look up the level of the skill, displaying Basic, Advanced, or Expert as appropriate (defaulting to Basic).

This is used in Hero infoboxes.

{{SkillDisplay|id=skill_faction_demons}}

Basic Summon Swarm Basic Summon Swarm


{{SkillDisplay|id=skill_enlightenment|level=2|lang=pl}}

Zaawansowana Przenikliwość Zaawansowana Przenikliwość