Template:Sandbox/Aurelain/HeroInfobox/base: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary
No edit summary
 
(65 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
--><templatestyles src="Template:Sandbox/Aurelain/HeroInfobox/styles.css" /><!--
--><templatestyles src="Template:Sandbox/Aurelain/HeroInfobox/styles.css" /><!--
--><div class='hero-box'><!--
--><div class='hero-box faction-{{{faction}}}'>
The code below is pretty old, feel free to update it:
    <!--==== TITLE ==========================================================-->
-->{|class=infobox style='text-align: center;vertical-align: center;'
    <div class='band title'>{{{name}}}</div>
|-style='border-bottom: 1px solid #BCB096; background-color:#1E3758'
|colspan=2|
{|style='width:100%;text-align: center;vertical-align: center; border-collapse: collapse;"
|<span style="font-size: 150%;">{{{name}}}</span>
|}
|-style='border-bottom: 1px solid #BCB096'
|colspan=2|[[File:{{{portrait}}}|300px]]


|-
    <!--==== PORTRAIT =======================================================-->
|colspan=2 style="color: white; padding:4px;"|''{{{motto}}}''
    <div class='image'>[[File:{{{portrait}}}|300px]]</div>


|-style='border-bottom: 1px solid #BCB096; background-color:#1E3758'
    <!--==== MOTTO ==========================================================-->
|style='border: 1px solid #BCB096;width:50%;'|{{Link|type=ui|id=faction|lang={{{lang}}}}}
    <div style='font-style: italic; color:#fff;'>{{{motto}}}</div>
|style='border: 1px solid #BCB096;width:50%;'|{{Label|hero_class|{{{lang}}}}}
 
|-
    <!--==== FACTION ========================================================-->
|style='border: 1px solid #BCB096;padding:4px;width:50%;'|{{LinkIcon|type=faction|id={{{faction}}}|suffix=_icon.png|lang={{{lang}}}|wrap=1}}
    <div class='field'>
|style='border: 1px solid #BCB096;padding:4px;width:50%;'|{{LinkIcon|type=hero_class|id={{{class}}}|suffix=_icon.png|lang={{{lang}}}|wrap=1}}
        <div>{{Translation|faction|{{{lang}}}}}</div>
|-style='border-bottom: 1px solid #BCB096; background-color:#1E3758'
        <div>{{F|{{{faction}}}|{{{lang}}}}}</div>
|colspan=2|{{Link|type=ui|id=stats|lang={{{lang}}}}}
    </div>
|-style='border-bottom: 1px solid #BCB096'
 
|colspan=2|
    <!--==== HERO CLASS =====================================================-->
{|style="gap:8px; justify-content:space-between; align-items:center; width:100%;"
    <div class='field'>
|style="color:white;text-align:center; width:25%;"|{{StatDisplay|id=offence|stat={{{startattack}}}|lang={{{lang}}}}}
        <div>{{Translation|wiki_hero_class|{{{lang}}}}}</div>
|style="color:white;text-align:center; width:25%;"|{{StatDisplay|id=defence|stat={{{startdefense}}}|lang={{{lang}}}}}
        <div>{{Class|{{{class}}}|{{{lang}}}}}</div>
|style="color:white;text-align:center; width:25%;"|{{StatDisplay|id=spellPower|stat={{{startspellpower}}}|lang={{{lang}}}}}
    </div>
|style="color:white;text-align:center; width:25%;"|{{StatDisplay|id=intelligence|stat={{{startknowledge}}}|lang={{{lang}}}}}
 
|}
    <!--==== ATTRIBUTES =====================================================-->
|-style='border-bottom: 1px solid #BCB096; background-color:#1E3758'
    <div class='band'>{{Translation|wiki_start_attributes|{{{lang}}}}}</div>
|colspan=2, style="border: 1px solid #BCB096;"|{{Link|type=ui|id=starting_skills|link=Skills|lang={{{lang}}}}}
    <div style='display:flex;color:#fff'>
|-colspan=2, style='text-align: center;vertical-align: center;'
        {{StatDisplay|id=offence|stat={{{startattack}}}|lang={{{lang}}}}}
|colspan=2|
        {{StatDisplay|id=defence|stat={{{startdefense}}}|lang={{{lang}}}}}
{{#cargo_query:tables=Hero=H, Hero__start_skills=S, Hero__start_skill_levels=L
        {{StatDisplay|id=spellPower|stat={{{startspellpower}}}|lang={{{lang}}}}}
| join on=H._rowID=S._rowID, S._rowID=L._rowID, S._position=L._position
        {{StatDisplay|id=intelligence|stat={{{startknowledge}}}|lang={{{lang}}}}}
| fields= S._value=id, L._value=level, CONCAT('{{{lang|en}}}') = lang
    </div>
| where=H.id='{{{id|}}}'
| order by=S._position
| format=template
| template=SkillDisplay
| named args= yes
| delimiter=\n\n
}}


|-style="border-bottom: 1px solid #BCB096;border-top: 1px solid #BCB096; background-color:#1E3758"
    <!--==== STARTING SKILLS ================================================-->
|colspan=2|{{Link|type=ui|id=starting_spells|link=Spells|lang={{{lang}}}}}
    <div class='band'>{{Translation|starting_skills|{{{lang}}}}}</div>
|-style='border-bottom: 1px solid #BCB096'
    <div class='columnar'>{{#cargo_query:
|colspan=2, style='color: white;border: 1px solid #BCB096; padding:4px;'|
        tables =
{{#cargo_query:tables=Hero=H, Hero__start_magics=S
            Hero = H,
| join on=H._rowID=S._rowID
            Hero__start_skills = S,
| fields= S._value=id, CONCAT('{{{lang|en}}}') = lang
            Hero__start_skill_levels = L
| where=H.id='{{{id|}}}'
        | join on =
| format=template
            H._rowID = S._rowID,
| template=SpellDisplay
            S._rowID = L._rowID,
| named args= yes
            S._position = L._position
| delimiter=\n\n
        | fields =
}}
            S._value = id,
            L._value = level,
            CONCAT('{{{lang}}}') = lang
        | where =
            H.id = '{{{id|}}}'
            AND S._value IS NOT NULL
        | order by = S._position
        | format = template
        | template = Skill
        | named args = yes
        | default = {{Translation|wiki_none|{{{lang}}}}}
        }}
    </div>


|-style='border-bottom: 1px solid #BCB096; background-color:#1E3758'
    <!--==== STARTING SPELLS ================================================-->
|colspan=2|{{Link|type=ui|id=starting_army|lang={{{lang}}}|link=0}}
    <div class='band'>{{Translation|starting_spells|{{{lang}}}}}</div>
|-style='border-bottom: 1px solid #BCB096'
    <div class='columnar'>{{#cargo_query:
|colspan=2|
        tables =
{|<div style="text-align:center;">
            Hero = H,
|style="width:25%;"|
            Hero__start_magics = S
{{#cargo_query:
        | join on =
tables = Hero=H, HeroStartSquad=HSS, Unit=U,
            H._rowID = S._rowID
          Translation=unit_t, Translation=unit_en
        | fields =
|join on = H.id        = HSS.hero_id,
            S._value = id,
          HSS.unit_id  = U.id,
            CONCAT('{{{lang}}}') = lang
          U.id         = unit_t.target_id,
        | where =
          U.id        = unit_en.target_id
            H.id = '{{{id|}}}'
|where  = H.id = '{{{id|}}}'
            AND S._value IS NOT NULL
          AND HSS.variant    = 'primary'
        | format = template
          AND unit_t.type    = 'unit'      AND unit_t.language    = '{{{lang|en}}}'
        | template = Spell
          AND unit_en.type    = 'unit'      AND unit_en.language  = 'en'
        | named args = yes
|fields  = unit_t.name                          = name,
        | default = {{Translation|wiki_none|{{{lang}}}}}
          unit_en.name                        = pagelink,
        }}
          CONCAT(unit_en.name, '_icon')        = filename,
    </div>
          IF(HSS.min = HSS.max, HSS.min,
              CONCAT(HSS.min, " - ", HSS.max)) = text
|order by= HSS.slot
|format = template
|template= MediumIconThumbDisplay
|named args = yes
}}
</div>
|}


|-style='border-bottom: 1px solid #BCB096; background-color:#1E3758'
    <!--==== STARTING ARMY ==================================================-->
|colspan=2|{{Label|internal_id|{{{lang}}}|nolink}}
    <div class='band'>{{Translation|starting_army|{{{lang}}}}}</div>
|-
    <div class='army'>{{#cargo_query:
|colspan=2, style="color:white; opacity:50%;" |{{{id}}}
        tables =
            Hero = H,
            HeroStartSquad = HSS,
            Unit = U,
            Translation = unit_t,
            Translation = unit_en
        |join on =
            H.id = HSS.hero_id,
            HSS.unit_id = U.id,
            U.id = unit_t.target_id,
            U.id = unit_en.target_id
        |where =
            H.id = '{{{id|}}}'
            AND HSS.variant = 'primary'
            AND unit_t.type = 'unit'
            AND unit_t.language = '{{{lang|en}}}'
            AND unit_en.type = 'unit'
            AND unit_en.language = 'en'
        |fields =
            U.id = id,
            CONCAT('{{{lang}}}') = lang,
            CONCAT('1') = stack,
            IF(HSS.min = HSS.max, HSS.min, CONCAT(HSS.min, "-", HSS.max)) = text
        |order by = HSS.slot
        |format = template
        |template = Unit
        |named args = yes
        }}
    </div>


|}<!--
    <!--==== INTERNAL ID ====================================================-->
--></div><!-- end hero-box
    <div class='band'>{{Translation|wiki_internal_id|{{{lang}}}}}</div>
    <div style='color:rgba(255,255,255,0.5)'>{{{id}}}</div>
</div><!--
--></includeonly><!--
--></includeonly><!--
################################################################################
################################################################################
Line 102: Line 121:
<!--=========================================================================-->
<!--=========================================================================-->
==1. English:==
==1. English:==
{{Template:Sandbox/Aurelain/HeroInfobox/base
{{Sandbox/Aurelain/HeroInfobox/base
     | lang = en
     | lang = en
     | id = necro_hero_10
     | id = necro_hero_10
Line 109: Line 128:
     | faction = undead
     | faction = undead
     | class = magic_undead
     | class = magic_undead
     | startattack = 4
     | startattack = 1
     | startdefense = 0
     | startdefense = 0
     | startspellpower = 2
     | startspellpower = 2
     | startknowledge = 1
     | startknowledge = 4
     | motto = To a true scholar of magic, the body is nothing but dead weight.
     | motto = To a true scholar of magic, the body is nothing but dead weight.
}}
}}
<pre><nowiki>
<pre><nowiki>
{{Template:Sandbox/Aurelain/HeroInfobox/base
{{Sandbox/Aurelain/HeroInfobox/base
     | lang = en
     | lang = en
     | id = necro_hero_10
     | id = necro_hero_10
Line 123: Line 142:
     | faction = undead
     | faction = undead
     | class = magic_undead
     | class = magic_undead
     | startattack = 4
     | startattack = 1
     | startdefense = 0
     | startdefense = 0
     | startspellpower = 2
     | startspellpower = 2
     | startknowledge = 1
     | startknowledge = 4
     | motto = To a true scholar of magic, the body is nothing but dead weight.
     | motto = To a true scholar of magic, the body is nothing but dead weight.
}}
}}
Line 134: Line 153:
<!--=========================================================================-->
<!--=========================================================================-->
==2. Japanese:==
==2. Japanese:==
{{Template:Sandbox/Aurelain/HeroInfobox/base
{{Sandbox/Aurelain/HeroInfobox/base
     | lang = ja
     | lang = ja
     | id = necro_hero_10
     | id = necro_hero_10
Line 141: Line 160:
     | faction = undead
     | faction = undead
     | class = magic_undead
     | class = magic_undead
     | startattack = 4
     | startattack = 1
     | startdefense = 0
     | startdefense = 0
     | startspellpower = 2
     | startspellpower = 2
     | startknowledge = 1
     | startknowledge = 4
     | motto = 真の魔法学者にとって、肉体は重荷でしかない。
     | motto = 真の魔法学者にとって、肉体は重荷でしかない。
}}
}}
<pre><nowiki>
<pre><nowiki>
{{Template:Sandbox/Aurelain/HeroInfobox/base
{{Sandbox/Aurelain/HeroInfobox/base
     | lang = ja
     | lang = ja
     | id = necro_hero_10
     | id = necro_hero_10
Line 155: Line 174:
     | faction = undead
     | faction = undead
     | class = magic_undead
     | class = magic_undead
     | startattack = 4
     | startattack = 1
     | startdefense = 0
     | startdefense = 0
     | startspellpower = 2
     | startspellpower = 2
     | startknowledge = 1
     | startknowledge = 4
     | motto = 真の魔法学者にとって、肉体は重荷でしかない。
     | motto = 真の魔法学者にとって、肉体は重荷でしかない。
}}
}}

Latest revision as of 19:30, 25 August 2026

1. English:

Mag
To a true scholar of magic, the body is nothing but dead weight.
Faction
Hero Class
Starting Attributes
Attack 1
Starting Skills
Starting Spells
Starting Army
Internal ID
necro_hero_10
{{Sandbox/Aurelain/HeroInfobox/base
    | lang = en
    | id = necro_hero_10
    | name = Mag
    | portrait = Mag.png
    | faction = undead
    | class = magic_undead
    | startattack = 1
    | startdefense = 0
    | startspellpower = 2
    | startknowledge = 4
    | motto = To a true scholar of magic, the body is nothing but dead weight.
}}

2. Japanese:

マグ
真の魔法学者にとって、肉体は重荷でしかない。
Hero Class💬
Starting Attributes💬
開始スキル
開始呪文
開始軍勢
Internal ID💬
necro_hero_10
{{Sandbox/Aurelain/HeroInfobox/base
    | lang = ja
    | id = necro_hero_10
    | name = マグ
    | portrait = Mag.png
    | faction = undead
    | class = magic_undead
    | startattack = 1
    | startdefense = 0
    | startspellpower = 2
    | startknowledge = 4
    | motto = 真の魔法学者にとって、肉体は重荷でしかない。
}}