Heroes 5 Wiki

This article aim is to provide a step-by-step guide on how to create a new hero for Heroes of Might and Magic 5. Game engine loads heroes from AdvMapHeroShared files. Only the necessary steps to create functional hero and add it in the game as a mod are provided.

Credit: }{0TT@6bI4[1]

For the purpose of this guide a new Inferno faction hero will be created with the following settings:

  • Name: Mefisofel
  • Character: He will look like Inferno Tier 7 Devil creature
  • Class: Demon Lord
  • Specialization: Gate Keeper
  • Main secondary skill: Advanced Gating
  • Hero default attack: Melee

Hero files will be created via the Map Editor and exported in "<Game folder>/Maps/New_Hero_Mefisofel.h5m".

Create mod space[]

  • Download this 128x128 Devil.tga[2] icon and put it in <Game folder>/Complete/icon/Inferno/Devil.tga. Create the folder if necessary, this is where Map editor looks for icons of various objects.
  • Launch Map Editor and configure it in game editor mode[3]
  • Select "Resource" -> "New MOD" to create mod environment[4].
  • Use "New_Hero_Mefisofel" for name. You can also add description.
  • In the game database window select AdvMapHeroShared.
  • Select + to browse the MapObjects folder. A list of folders will appear, one for each faction.
  • Right click on the Inferno folder -> "New Object"
  • In the new window fill "Mefisofel" and select "Add Type" so the final name will be "Mefisofel.(AdvMapHeroShared)"
  • Select "OK".

New hero will appear in the folder within the other hero files.

Define AdvMapHeroShared object parameters[]

Explanation of parameters can be found on AdvMapHeroShared[5] object page. For the purpose of this guide, parameters existing within the game will be chosen but the modder is free to create and add new such elements (Models, Animations, Texts, etc..).

  • Select the hero file entry at "MapObjects" -> "Inferno" -> "Mefisofel.(AdvMapHeroShared)"

All hero variables will be presented in the Property Control window.

In the A functional hero model requires a model and animations to be functional on adventure and combat maps. For the purpose of this example we will use existing game models. Creating/importing custom models will not be a part of this article.

  • Model - Select the browse button "..." and choose "Model:Characters\Creatures\Inferno\AlternativeUpgrade\T7_Arch_Demon" and choose "OK".

  • AnimSet - Select the browse button "..." and choose "AnimSet:Characters\Creatures\Inferno\AlternativeUpgrade\T7_Arch_Demon-arena" and choose "OK".
  • Blocked tiles, Hole tiles, Passable Tiles - should be left empty.
  • Active tiles - Right cick -> "Add" to add 1 new entry with X,Y coordinates of 0,0.

  • PossessionMarker tiles - One entry with X, Y coordinates of 0,0 is required. It should be created by default so no need to add new.
  • WaterBased - set to "False"
  • ObjectTypeFileRef - set to "/Text/Visibility_Types/Units.txt"
  • TerrainAligned - set to "False"
  • FlyPassable - set to "True"
  • Icon128 - a 128x128 icon for the hero portrait. Create a new one.
    • Select "New" -> "Mefistoel_128x128" -> "Add Type" -> "OK"
    • Select browse button "...", a window will open of the new entry. Set the following parameters
      • SrcName browse to file <Game Folder>/Complete/Inferno/Devil.tga
      • Type set to "TEXTURE_2D"
      • Conversion Type set to "CONVERT_TRANSPARENT"
      • Format set to "TF_8888"
      • NMips set to "1"
      • Instant Load set to "true"
    • Hover over the Mefistoel_128x128.(Texture) -> Right Click -> "Export".

  • InternalName - Enter "Mefisofel"
  • Class - From the drop down menu choose "HERO_CLASS_DEMON_LORD"
  • Specialization - From the drop down menu choose "HERO_SPEC_GATE_KEEPER"

Note: If hero specialization function will be defined by script, it is recommended to select "HERO_SPEC_NONE".

  • PrimarySkill
    • Mastery - From the drop down menu choose "MASTERY_ADVANCED"
    • SkillID - From the drop down menu choose "HERO_SKILL_GATING"
  • SpecializationNameFileRef
    • Select "New" -> MefisofelSpecName -> "OK"
    • Type the game visible name of the hero specialization -> "Gate Keeper"
    • Select "OK" and agree to save changes.
  • SpecializationDescFileRef
    • Select "New" -> "MefisofelSpecDesc" -> "OK"
    • Type the game visible name of the hero specialization -> "Hero specialization improves Gating ability"
    • Select "OK" and agree to save changes.
  • SpecializationIcon - Browse "Textures" -> "HeroScreen" -> "Specializations" -> "Inferno" -> "Gate_Keeper" to add 128x128 icon.
  • FaceTexture - Use Icon128 parameter value - "Texture:MapObjects\Inferno\MEFISOFEL_128x128.(Texture)". Copy/Paste the value and select Enter to apply. If nothing happens press CTRL+S to save the current state and try again.

Note: Editor only allows values to point to existing files. As Icon128 was created this session state needs to be saved in order the file to be created.

  • FaceTextureSmall - (Optional) Same as FaceTexture but uses images of size 64x64 icon.

Note: Icon128, SpecializationIcon, FaceTexture, FaceTextureSmall can use either in-game icons or externally imported icons. If imported the values for the texture configuration file are the same as shown in Icon128 example above.

  • HeroCharacterArena - Select the browse button "..." and choose "Character:Characters\Creatures\Inferno\AlternativeUpgrade\T7_Arch_Demon.(Character)".
  • Mark HeroCharacterArena value and select browse button "...". This will open the value properties window on the right.
  • Find ArenaAnimSet property, it will have a value of "AnimSet:Characters\Creatures\Inferno\AlternativeUpgrade\T7_Arch_Demon-arena"

HeroCharacterArena file defines hero actions animations. Important for gameplay are:

  • Move - already exists for Devil.
  • Cast - already exists for Devil
  • Happy - already exists for Devil
  • Defeat - We will create it. Devil death animation will be used
    • Select it and choose browse button "...".
      • Right click on "animations" -> "Add". Set the new entry properties as follow:
        • Kind set to "defeat"
        • Anim browse Devil death animation "BasicSkelAnim:Characters\Creatures\Inferno\AlternativeUpgrade\T7_Arch_Demon-arena-death"
  • Attack animation - Hero can attack either with range attack or with melee attack. Chose ONE of the variants below
  1. Ranged attack is created by adding animation entry with Kind parameter of type "rangeattack". It is easy to configure as it looks more neutral and existing range attacks of other heroes or units can be used (Sylvan shooters, Academy and Dungeon mages).

    • Right click on "animations" -> "Add". Set the new entry properties as follow:
      • Kind set to "rangeattack"
      • Anim browse Dungeon hero range attack animation "BasicSkelAnim:Characters\Heroes\Shadya-arena-rangeattack"
  2. Melee attack is created by adding animation entry with Kind parameter of type "strike". it requires animation for the character attacking and his mount running. We can use existing Devil attack animation. Note: melee animation may require changing of the Melee Camera position. Currently it is unknown how this can be done so hero model may not fit properly in the frame.

    • Right click on "animations" -> "Add". Set the new entry properties as follow:
      • Kind set to "strike"
      • Anim browse Devil Attack animation "BasicSkelAnim:Characters\Creatures\Inferno\AlternativeUpgrade\T7_Arch_Demon-arena-attack00"

Note: Melee animation may require changing of the Melee Camera position. Currently it is unknown how this can be done so hero model may not fit properly in the frame during attack.

  • Select "OK" to close AnimSet window.
  • Select "OK" to close Character window.

  • HeroCharacterArenaMelee - Leave this empty if hero will use range attack. if hero will use melee attack use the same value as HeroCharacterArena entry.
  • HeroCharacterAdventure - use the same value as HeroCharacterArena entry.
  • CombatVisual - Select the browse button "..." and choose "GameMechanics" -> "CreatureVisual" -> "Creatures" -> "Inferno" -> "3rd" -> "ArchDemon.(CreatureVisual)"
  • TownType - From the drop down menu select "TOWN_INFERNO"
  • Editable
    • NameFileRef
      • Select "New" -> "MefisofelName" -> "OK"
      • Type the game visible name of the hero specialization -> "Mefisofel"
      • Select "OK" and agree to save changes.
    • BiographyFileRef
      • Select "New" -> "MefisofelDesc" -> "OK"
      • Type the game visible name of the hero specialization -> "Demon Lord and Prince of Darkness"
      • Select "OK" and agree to save changes.
    • Offence, Defence, Spellpower, Knowledge - set all values to 6.
  • Selection - browse Inferno selection circle at "/_(Model)/Heroes/DemonLord_Path/Symbol.(Model)"
  • ScenarioHero - set to "False" if hero will be used for any game mode and not just campaign.
  • HideInEditor - set to "False" so hero is available in Map Editor.

Save your work.

  • From Map Editor menu select "Resource" -> "Pack MOD".
  • Find the mod file in <game folder>/Map/New_Hero_Mefisofel.h5m

Example Template[]

To gain a practical idea of the files that are modified an example template is provided.

  • Download the template file New_Hero_Mefisofel.h5m[6]
  • Extract its contents and put them in any map.h5m archive root folder.
  • Launch Map Editor and put any hero on the map.
  • Select it and find "Shared" parameter in the properties window.
  • Set the value to "AdvMapHeroShared:MapObjects\Inferno\Mefisofel.(AdvMapHeroShared)"

The hero model on adventure map should change to Devil. Save the map launch it and test.

Reference List[]