Modding animations by ZombieLord

Well, I’ve finally decided to share my experience about creature animation modding. And hopefully someone will be able to convert the animations from H5 format to something that can work with a 3D Modeler program like 3DS Max.

The creature visuals are located in Characters/Creatures/faction_name/creature_name.(Character).xdb (the heroes’ visuals are located in Characters/Heroes/hero_name.(Character).xdb

Here’s how such a file looks:

  • The <Model> section refers to the model of the creature (its appearance and materials and textures)
  • The <ArenaAnimSet> section refers to a file that contains the animation set of this creature on the battlefield. <AdvMapAnimSet> is the same, only that it is used for the adventure animations.
  • The <ColourModels> section is used only for heroes. They are different models for each flag color. The order of the colors is the one used in the game (with an additional white color first). Here’s how this section looks full:
  • <Item href=“Hero-White.(Model).xdb#xpointer(/Model)"/>
  • <Item href=“Hero-Red.(Model).xdb#xpointer(/Model)"/>
  • <Item href=“Hero-Blue.(Model).xdb#xpointer(/Model)"/>
  • <Item href=“Hero-Green.(Model).xdb#xpointer(/Model)"/>
  • <Item href=“Hero-Yellow.(Model).xdb#xpointer(/Model)"/>
  • <Item href=“Hero-Orange.(Model).xdb#xpointer(/Model)"/>
  • <Item href=“Hero-Teal.(Model).xdb#xpointer(/Model)"/>
  • <Item href=“Hero-Purple.(Model).xdb#xpointer(/Model)"/>
  • <Item href=“Hero-Tan.(Model).xdb#xpointer(/Model)"/>

Now let’s look at the model .xdb file. The <Materials> section contains the materials of the creature. The materials hold information about Specular, Lighting and Texture to use. The order of the materials is important and should not be changed. If you want to change a texture, just copy the old material .xdb file (renaming it), modify some parameters there (including the texture .xdb name) and then change the model file to point to the newly renamed material, but where it was the old one! Also, it’s important to note that the material points to the .xdb of the texture which has some parameters for it. This texture .xdb points to the actual .dds file!

The <Skeleton> and <Geometry> are too hard-coded to change them, and I don’t know what the <Animations> and the <WindPower> sections do.

Now that we’re done with the model, let’s take a look at the animation set file (be it arena or adventure, doesn’t matter) The <animations> section is the most important (the others should not be changed anyway). Here you can see all the kind of animations this creature uses and their respective .xdb file. The <Kind> sub-section is a name of the animation type: for example, if you want to give the Titan a casting animation, add another <Item> with the cast kind (to find out how a certain animation is named, find a creature that has it and see there…). Also, the <Anim> sub-section should point to a .xdb file describing the animation. i.e., if you want to give the Titan the call lightning animation to the newly created casting animation, just copy the specability <Anim> section in the casting one (specability means special ability).

Now let’s take a closer look at the BasicSkelAnim type of files (the ones pointed out by the <Anim> section explained above)

  • The <SrcName> points to the model of the creature.
  • The <uid> is a tricky one. I’ll explain it a little later.
  • The <ExpSrcClip>, <ExpRootTransform>, <ExpFrameFirst>, <ExpFrameLast>, <ExpSettingsFile> are unknown to me. Just leave them for now.
  • The <MovementSpeed> is the speed with which the creature moves on the battlefield or on the adventure map if it’s a hero. Set this to 0 when it’s a non-moving animation.
  • The <SpeedFactor> represents how fast this animation is being shown. If it has the value of 2, for example, the animation will be performed twice as fast as with a value of 1.
  • The <Sound> section points to a sound .xdb file that will play when this animation occurs.
  • The <Effect> is a special effect shown when this animation is playing. Check the .xdb file it points out if you’re curious how this effect is done (I haven’t checked yet)
  • The <SpeedLineFallTime> and <SpeedLineMaterial> are unknown to me.

Now let’s get back to the <uid> section. This refers to a file (yes, a file) in the bin/animations folder. Find there the file the animation you want to modify points out with the <uid> section and copy it somewhere. Then, you need a special converter from HoMM V animation data to something that can be modified.

One more thing with Hero modding:

The Characters/Heroes/hero_name.(Character).xdb file is read from the MapObjects/faction_name/hero_name.(AdvMapHeroShared).xdb file. Notice that the heroname from the mapobjects folder is the internal hero name and may differ from the original name of the hero in-game. For example, Irina is named Ving. This file has many properties about the hero, including <HeroCharacterArena> and <HeroCharacterAdventure> which point out to those files in the Characters folder I explained above. The <HeroCharacterArenaMelee> file is used for heroes that attack the enemy by melee, like the Knight, the Demon Lord and the Rune Mage.

modding_tutorials/modding_animations.txt · Last modified: 2008/01/03 16:13 by vokialbg
Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0