Skip to content

Help me create a hero based on this unit.

User Avatar
#4
Auto-translated
OK, here we go, how to make a creature a hero?

Stage 1
Make it so that the creature stops being a creature...

So I downloaded a mod for a creature from H7, opened it, inside the folder are

bin
Cameras
GameMechanics
MapObjects
new_creatures
Sounds

The red folders affect creatures

1) In the Cameras folder is a file that changes the camera in the hiring window. Ideally, you should keep this file and rename it to use the camera for the hero.

Go to \Cameras\Interface\HireCreatures - inside is the file Vampire.xdb - rename it to VampireHero.xdb

2) The GameMechanics folder can be deleted. It contains the file that connects the creature and the model; you could say it's the root.

3) MapObjects can be deleted immediately because it contains the file for the map editor (it's highly likely broken).

Stage 2
You need to connect the model to the hero.

Most likely, you need to replace some Necromancer.
You need to take him from data.pak.

In the \MapObjects\Necropolis folder are all Necromancers, Necropolis creatures, and buildings. Necromancers have the marker .(AdvMapHeroShared).

The names mostly don't match the titles. Aberrar.(AdvMapHeroShared) is Zoltan, Berein.(AdvMapHeroShared) is Markel, Effig.(AdvMapHeroShared) is Raven...

File structure using Zoltan as an example. I'll write about everything, but I'll highlight what we need in red.
Aberrar

    - this is not used
    - this line is usually not used
   
   
   
       
            0
            0
       
   
   
   
        0
        0
   
   
   
   
    false
    true
   
   
   
    false
    true
   
   
   
    Aberrar - do not change the name in this line under any circumstances, otherwise scripts in Campaigns might break
    HERO_CLASS_NECROMANCER - this is the hero's class
    HERO_SPEC_MIND_CLEANER - this is the specialization (affects ONLY the effect, does not affect the specialization icon or description)
   
        MASTERY_BASIC - skill level
        HERO_SKILL_NECROMANCY - racial ability
   
    - specialization name
    - specialization description
    - specialization icon //generally, this is fine; you can give the same specialization to different factions with different names and icons. For example, I made a Dwarf with the Suzerain spec, but due to the lack of "retraining," he just brought in money; I called him a Treasurer. Such heroes existed in H3.
    - this is the icon
    this is the small icon; in the last addon they were abandoned, you can just write in this line
   
   
   
   
   
    TOWN_NECROMANCY - this is the hero's faction
   
        - hero name
        - hero biography
        0 - attack
        1 - defense
        3 - spell power
        1 - knowledge
        - skills
           
                MASTERY_BASIC - mastery (basic)
                HERO_SKILL_LEARNING - skill Learning
           
       
        - secondary skills
            HERO_SKILL_EAGLE_EYE - Eagle Eye
       
        - spells
            SPELL_ANIMATE_DEAD - Animate Dead
       
        false - ballista
        false - first aid tent
        false - ammo cart
        - sworn enemy
   
    0 - idk
    - idk
    - circle under the hero
    - large army trail
    - idk
    - idk
    false - this blocks the hero for Multiplayer maps; here he is unlocked
    - the hero's music theme, present for almost all Campaign heroes
    false - idk, better not touch



Lines important to us
- this is the combat model; for example, for the Knight it's a rider with a standard bearer
    - this is the melee attack model; not all have it, not present here... we won't need it either, since there's no animation
    - this is the model for the adventure map

First for these three lines, you need to write the path to the character file from the mod's creature. It will look like this

    <herocharacterarena href="/new_creatures/Necro/Vamplord/creature.(Character).xdb#xpointer(/Character)"/>
   
    <herocharacteradventure href="/new_creatures/Necro/Vamplord/creature.(Character).xdb#xpointer(/Character)"/>

All creatures from H7 have a single template, so the path will only differ in the unit and faction names.

Now about the remaining lines
    - this is a unique camera, such as Agrael, Biara, the Overlord have... we have one too, need to write it
    <> href="/Cameras/Interface/HireCreatures/VampireHero.xdb#xpointer(/Camera)"/>

The next line is responsible for the projectile; we won't touch it because the vampire has no projectile
   

HALF THE JOB IS DONE
The hero is displayed, BUT IN T-POSE

Stage 3
Fixing the hero
The structure of creature files differs slightly from the structure of hero files; this needs to be corrected.
Start with the file we specified for the appearance - /new_creatures/Necro/Vamplord/creature.(Character).xdb
Open it, and you'll see
creature.(Character)

   
   
   
   


- animations for the map, nothing is written here!
Fortunately, a bit above there is a line with animations for combat; copy the piece href="animset/creature.(AnimSet).xdb#xpointer(/AnimSet)"/> and paste it into the map line like this
href="animset/creature.(AnimSet).xdb#xpointer(/AnimSet)"/>

THE HERO IS NO LONGER IN T-POSE

But he can't shoot...
Go into the animations file - the one at animset/creature.(AnimSet).xdb

[spoiler=creature.(AnimSet)]


   
        - these are animations, e.g., this one is death
            death
           
       
       
            hit
           
       
       
            idle00
           
       
       
            move
           
       
       
            attack00
           
       
       
            specability
           
       
       
            happy
           
       
       
            stir00
           
       
   
   
   
    Global
[/spoiler]
As you can see, this is a list of animations. Copy some of them and change the "kind" value. For example, replace attack with ranged attack, and the ability with spellcasting.

       
            rangeattack
           
       
       
            cast
           
       

This way the hero will learn to shoot and cast spells

That's it) I'm going to sleep
Мои мини-моды

Мод RTF

Мои NCF существа