Heroes 5 Wiki

What was created so far in terms of Geometry, Skeleton and Animation files will be tested in game by building a creature that will overlap the peasant. This is convenient for the test, because the peasant is an early game creature, you just have to start any map as Haven.

Prerequisites[]

  • Download the blank-mod file called Z_TestCreature.pak for testing the model in the game.
  • Geometry, Skeleton and Animation files made in previous
  • Get creature Texture DDS[1] file
    • Open the asset folder[2] and find file called "<asset folder>\CH_BlackGuard\Texture2D\T_BlackGuard_D.dds"
    • Copy the file and rename it to "texture1.(Texture).dds"

Build the preset[]

The preset file is set up so the model/animations can quickly be tested in game.

Create a working directory[]

  • Make a folder called "Test_creature"
  • Unzip the contents of the pak[3] file "Z_TestCreature.pak" with WinRAR or WinZip in the "Test_creature" folder.

Note: It is strongly advisable to put a text file in the "Test_creature/bin" folder that notes each Geometry/Skeleton/Animation file name what function it serves or what type of animation it provides. The template .pak archive has two such files that can be used for that purpose - "animations_codenames.txt" and "models_codenames.txt".

Add creature Geometry file[]

  • Note down the Geometry file name
  • place the Geometry file in "Test_creature\bin\Geometries" folder
  • Open file "Test_creature\ew_creatures\test_fraction\test_creature\creature-Geom.xdb" and change the "uid" line value to the Geometry file name

Add creature Skeleton file[]

  • Note down the Skeleton file name
  • place the Skeleton file in "Test_creature\bin\Skeletons" folder
  • Open file "Test_creature\ew_creatures\test_fraction\test_creature\creature-Skel.xdb" and change the "uid" line value to the Skeleton file name

Add creature Animation file[]

  • Note down the Animation file name
  • place the Animation file in "Test_creature\bin\animations" folder
  • Open file "Test_creature\ew_creatures\test_fraction\test_creature\animset\idle00.(BasicSkelAnim).xdb" and change the UID line value to the Animation file name
  • Repeat these steps for all animations that will be imported and their respective creature xdb files

Add creature Texture file[]

  • Copy Texture file "texture1.(Texture).dds" to "Test_creature\new_creatures\test_fraction\test_creature\material" folder
  • Agree to overwrite the existing file.

Creature is now ready to be packaged.

Create creature PAK[3] file[]

  • Inside the Test_creature folder select all files (shortcut "CTRL + A")
  • Right click -> 7-Zip (or other archiver of choice) -> Add to Archive
  • Fill in new archive name, for this particular example use test_creature.pak, make sure the name ends in .pak otherwise different extension will be added
  • Set Archive format to ZIP
  • Select OK


Creature game file is now ready!

Time to test in game[]

  • Put the test_creature.pak file in <game folder>/data
  • Run the Map editor and place a peasant creature on any map.

You should see the new creature model and animation!

Further clarifications[]

What the other animation files do?[]

A list of all animation files in "Z_TestCreature.pak => new_creatures\test_fraction\test_creature\animset" folder and their purpose:

  1. idle00.(BasicSkelAnim).xdb - "rest" animation
  2. attack00.(BasicSkelAnim).xdb - creature attack
  3. attack01.(BasicSkelAnim).xdb is the same as attack00, these animations alternate with each other in a random order.
  4. rangeattack.(BasicSkelAnim).xdb - ranged attack, needed if you make a shooter
  5. hit.(BasicSkelAnim).xdb - damage received by a creature
  6. death.(BasicSkelAnim).xdb - death of the creature
  7. happy.(BasicSkelAnim).xdb - the "joy" of the creature is played when the battle is won, sometimes when an enemy creature dies.
  8. specability.(BasicSkelAnim).xdb - use of a special ability.
  9. cast.(BasicSkelAnim).xdb - casting a spell by a creature.
  10. stir00.(BasicSkelAnim).xdb - intermediate animation of "rest", it is periodically played by a creature on the battlefield, and is also played when the player selects a creature.
  11. stir01.(BasicSkelAnim).xdb - same as stir00,
  12. these animations alternate with each other in a random order.
  13. move.(BasicSkelAnim).xdb - animation of movement of the creature.
  14. Assuming the creature teleports, when moving, it will use these two animations instead of move
    • moveStart.(BasicSkelAnim).xdb - start of teleport
    • moveEnd.(BasicSkelAnim).xdb - teleport end


What is .(AnimSet).xdb?[]

The creature.(AnimSet).xdb file provides a list of links to all creature animations and associates them with specific actions the creature acts in game.

For example, if you want to remove "stir01" so that the creature has only one intermediate "rest" animation, remove the lines responsible for the animation unit "stir01" in "creature.(AnimSet).xdb". The whole code block should be removed from "Item" to "Item", inclusively, delete the fragment where "stir01" is written in the "Kind" column.

Even if you don't export idle animation, but something else,

For the first test it is advisable, to write this value into the idle animation anyway. idle's "idle animation" is easiest to view in the game or editor.

How to change animation speed?[]

In animation .xdb files there is a "SpeedFactor" line, which is responsible for the speed of the animation being played. By default, there is a value of "1" (ie one to one). But in my subjective opinion, animations from heroes7 look in heroes5, slightly better, slightly slowed down. So, you might want to replace the "SpeedFactor" value with "0.9" or even "0.8" you need to look for a specific animation. This can be edit straight for the Map Editor where change in speed will be observed instantly.

Only then do not forget to upload the edited file from the folder with your test card to the archive with your mod, located in the "H5MMods" folder, and delete the files of the test card itself so as not to generate garbage.

Editing the animation speed in heroes5 works very well, the game itself draws intermediate frames, no jumps in the animation appear.