Template:Hng: Difference between revisions

From Heroes 3 wiki
Jump to navigation Jump to search
No edit summary
Turnam (talk | contribs)
kind of ugly and messy, but it works
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#switch: {{{1}}} | Random = [[File:Hero_Random_small.png|link=]] Random Hero | {{swh|noicon=|{{exist|File:Hero_{{{image|{{{1|}}}}}} (HotA)_small.png|[[File:Hero_{{{image|{{{1|}}}}}} (HotA)_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]|[[File:Hero_{{{image|{{{1|}}}}}}_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]}}|[[File:Hero_{{{image|{{{1|}}}}}}_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]}} {{{noname|{{gl|{{{hero_link|{{{1}}}}}}|{{{1}}}}}{{{source|}}}{{{0| the {{gl|{{{2|}}}}}}}}}}}}}</includeonly><noinclude>
<includeonly>{{#switch: {{{1}}} | Random = [[File:Hero_Random_small.png|link=]] Random Hero | {{swh|noicon=|{{exist|File:Hero_{{{image|{{{1|}}}}}} (HotA)_small.png|[[File:Hero_{{{image|{{{1|}}}}}} (HotA)_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]|{{swd|noicon=|{{exist|File:Hero_{{{image|{{{1|}}}}}} (DoR)_small.png|[[File:Hero_{{{image|{{{1|}}}}}} (DoR)_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]|[[File:Hero_{{{image|{{{1|}}}}}}_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]}}|[[File:Hero_{{{image|{{{1|}}}}}}_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]}}}}|{{swd|noicon=|{{exist|File:Hero_{{{image|{{{1|}}}}}} (DoR)_small.png|[[File:Hero_{{{image|{{{1|}}}}}} (DoR)_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]|[[File:Hero_{{{image|{{{1|}}}}}}_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]}}|[[File:Hero_{{{image|{{{1|}}}}}}_small.png|{{{1}}}|link={{{hero_link|{{{1}}}}}}{{{img-style|}}}]]}}}} {{{noname|{{gl|{{{hero_link|{{{1}}}}}}|{{{1}}}}}{{{source|}}}{{{0| the {{gl|{{{2|}}}}}}}}}}}}}</includeonly><noinclude>
 
'''H''' is short of '''H'''ero name. The template is used in lists to [[:Category:Hero_portraits|hero image]] and name with a link to it.
'''H''' is short of '''H'''ero name. The template is used in lists to [[:Category:Hero_portraits|hero image]] and name with a link to it.


Line 10: Line 9:
* noname= (only show the picture)
* noname= (only show the picture)
* image= (show a picture that does not match the hero's name)
* image= (show a picture that does not match the hero's name)
* himage= (set to (HotA) if there is a hota version of the image)


==Examples==
==Examples==
Line 16: Line 14:
! Result
! Result
! Code
! Code
|-
| {{hng|Alamar|Warlock}}
| <nowiki>{{hng|Alamar|Warlock}}</nowiki>
|-
| {{hng|Catherine|Knight}}
| <nowiki>{{hng|Catherine|Knight}}</nowiki>


|-
|-
Line 26: Line 32:


|-
|-
| {{hng|Vey|0=|himage=(HotA)}}
| {{hng|Vey|0=}}
| <nowiki>{{hng|Vey|0=|himage=(HotA)}}</nowiki>
| <nowiki>{{hng|Vey|0=}}</nowiki>


|-
|-

Latest revision as of 23:00, 25 October 2025

H is short of Hero name. The template is used in lists to hero image and name with a link to it.

Variables:

  1. Hero name (can use "Random")
  2. Hero class
  • 0= (don't show the class)
  • hero_link= (link to a hero page that doesn't match the hero's name)
  • noname= (only show the picture)
  • image= (show a picture that does not match the hero's name)

Examples[edit | hide | hide all]

Result Code
AlamarAlamarAlamar Alamar the Warlock {{hng|Alamar|Warlock}}
CatherineCatherineCatherineCatherine Catherine the Knight {{hng|Catherine|Knight}}
MephalaMephalaMephalaMephala Mephala the Ranger {{hng|Mephala|Ranger}}
MephalaMephalaMephalaMephala Mephala {{hng|Mephala|0=}}
VeyVeyVey Vey {{hng|Vey|0=}}
YogYogYogYog Yog the Wizard {{hng|Yog|image=Yog (Wizard)|hero_link=Yog (Wizard)|Wizard}}
ClancyClancyClancyClancy {{hng|Clancy|noname=}}
HenriettaHenriettaHenriettaHenrietta: Lorem ipsum {{hng|Henrietta|noname=}}
HenriettaHenriettaHenriettaHenrietta Henrietta: Lorem ipsum {{hng|Henrietta|0=}}
HenriettaHenriettaHenriettaHenrietta Henrietta the Mercenary: Lorem ipsum {{hng|Henrietta|Mercenary}}
Random Hero {{hng|Random}}