Template:Cnu: Difference between revisions

From Heroes 3 wiki
Jump to navigation Jump to search
No edit summary
m Reverted edits by Imahero (talk) to last revision by Turnam
Tag: Rollback
 
Line 1: Line 1:
<includeonly>{{#if:{{{image|}}}|{{Cn|{{{1}}}|image={{{image}}}|noname=|{{{3|{{{1}}} and {{{2}}}}}}}}|{{Cn|{{{1}}}|noname=|{{{3|{{{1}}} and {{{2}}}}}}}}}}{{#if:{{{image2|}}}|{{Cn|{{{2}}}|image={{{image2}}}|noname=|{{{3|{{{1}}} and {{{2}}}}}}}}|{{Cn|{{{2}}}|noname=|{{{3|{{{1}}} and {{{2}}}}}}}}}}{{#if:{{{third|}}}|{{Cn|{{{third}}}|noname=|{{{3|{{{1}}} and {{{2}}}}}}}}}}{{{noname|{{hoverable|{{{3|{{{1}}} and {{{2}}}}}}|text={{{name|{{{3|{{{1}}} and {{{2}}}}}}}}}|{{#invoke:String|replace|CreaturePopup{{{3|{{{1}}} and {{{2}}}}}}| |_}}}}{{exists|page=Template:Creatures/{{{3|{{{1}}} and {{{2}}}}}}|then={{Creatures/{{{3|{{{1}}} and {{{2}}}}}}|popupid={{#invoke:String|replace|CreaturePopup{{{3|{{{1}}} and {{{2}}}}}}| |_}}}}|else=}}}}}</includeonly><noinclude>
<includeonly>{{#if:{{{image|}}}|{{Cn|{{{1}}}|image={{{image}}}|noname=|{{{3|{{{1}}} and {{{2}}}}}}}}|{{Cn|{{{1}}}|noname=|{{{3|{{{1}}} and {{{2}}}}}}}}}}{{#if:{{{image2|}}}|{{Cn|{{{2}}}|image={{{image2}}}|noname=|{{{3|{{{1}}} and {{{2}}}}}}}}|{{Cn|{{{2}}}|noname=|{{{3|{{{1}}} and {{{2}}}}}}}}}}{{#if:{{{third|}}}|{{Cn|{{{third}}}|noname=|{{{3|{{{1}}} and {{{2}}}}}}}}}}{{{noname|[[{{{3|{{{1}}} and {{{2}}}}}}|{{{name|{{{3|{{{1}}} and {{{2}}}}}}}}}]]}}}</includeonly><noinclude>
<!-- Uses Template:Exists instead of Template:Exist to avoid a template loop. -->
'''Cnu''' is short of creature name and upgrade. This works largely like {{tl|cn}} but works for a creature pair instead of having to use the template twice.
'''Cnu''' is short of creature name and upgrade. This works largely like {{tl|cn}} but works for a creature pair instead of having to use the template twice.


Line 22: Line 21:
! Code !! Result
! Code !! Result
|-
|-
|<pre>{{Cnu|Cavalier|Champion}}</pre>||{{Cnu|Cavalier|Champion}}
|<pre>{{cnu|Cavalier|Champion}}</pre>||{{cnu|Cavalier|Champion}}
|-
|-
|<pre>{{Cnu|Gog|Magog|noname=}}</pre>||{{Cnu|Gog|Magog|noname=}}
|<pre>{{cnu|Gog|Magog|noname=}}</pre>||{{cnu|Gog|Magog|noname=}}
|-
|-
|<pre>{{Cnu|Gold Golem|Diamond Golem|Neutral creature|name=Gold and Diamond Golems}}</pre>||{{Cnu|Gold Golem|Diamond Golem|Neutral creature|name=Gold and Diamond Golems}}
|<pre>{{cnu|Gold Golem|Diamond Golem|Neutral creature|name=Gold and Diamond Golems}}</pre>||{{cnu|Gold Golem|Diamond Golem|Neutral creature|name=Gold and Diamond Golems}}
|-
|-
|<pre>{{Cnu|Halfling|Halfling Grenadier|image=Pikeman|image2=Firebird}}</pre>||{{Cnu|Halfling|Halfling Grenadier|image=Pikeman|image2=Firebird}}
|<pre>{{cnu|Halfling|Halfling Grenadier|image=Pikeman|image2=Firebird}}</pre>||{{cnu|Halfling|Halfling Grenadier|image=Pikeman|image2=Firebird}}
|-
|-
|<pre>{{Cnu|Pirate|Corsair|third=Sea Dog|Pirate, Corsair, and Sea Dog}}</pre>||{{Cnu|Pirate|Corsair|third=Sea Dog|Pirate, Corsair, and Sea Dog}}
|<pre>{{cnu|Pirate|Corsair|third=Sea Dog|Pirate, Corsair, and Sea Dog}}</pre>||{{cnu|Pirate|Corsair|third=Sea Dog|Pirate, Corsair, and Sea Dog}}
|}
|}


[[Category: Table templates|Creature name]]
[[Category: Table templates|Creature name]]
__NOTOC__</noinclude>
__NOTOC__</noinclude>

Latest revision as of 03:26, 26 August 2025

Cnu is short of creature name and upgrade. This works largely like {{cn}} but works for a creature pair instead of having to use the template twice.

Use[edit | hide | hide all]

The template is used to show a creature's image and a name, both leading to the creature article. The variables for the template are:

  1. = Base creature name
  2. = Updated creature name
  3. = Link (if needed, otherwise created from the base and upgraded creature names)
  • noname= for a creature portrait without text
  • name= for a custom naming, otherwise, same as link
  • image= for the base creature image, if non-default
  • image2= for the upgraded creature image, if non-default
  • third= for a third upgraded creature, if needed -- if provided, you likely also need to give an explicit link

Typical use is:

{{Cnu|'base creature name'|'upgraded creature name'}}

Examples:

Code Result
{{cnu|Cavalier|Champion}}
CavalierCavalier ChampionChampion Cavalier and Champion
{{cnu|Gog|Magog|noname=}}
GogGog MagogMagog 
{{cnu|Gold Golem|Diamond Golem|Neutral creature|name=Gold and Diamond Golems}}
Gold GolemGold Golem Diamond GolemDiamond Golem Gold and Diamond Golems
{{cnu|Halfling|Halfling Grenadier|image=Pikeman|image2=Firebird}}
HalflingHalfling Halfling GrenadierHalfling Grenadier Halfling and Halfling Grenadier
{{cnu|Pirate|Corsair|third=Sea Dog|Pirate, Corsair, and Sea Dog}}
PiratePirate CorsairCorsair Sea DogSea Dog Pirate, Corsair, and Sea Dog