Auto-translated
Guide to using the new file structure,
which significantly simplifies the modding process.
How can the new structure be used to quickly replace any creature in the game?
This text is intended for relative beginners in modding, but I hope it will also be useful for experienced modders
to understand how to save time and effort by using the new file structure.
Download the Z_TestCreature.pak template file.
Move the downloaded "Z_TestCreature.pak" file to the "data" folder inside the Heroes of Might and Magic V game folder.
The path will be approximately "C:\Program Files\Nival Interactive\Heroes of Might and Magic V - Tribes of the East\data".
Remember that a ".pak" format file is just a regular archive. It can be opened and edited using WinRAR or WinZip.
Example 1: Replacing any creature in the game with a test visual from "Z_TestCreature.pak,"
Find the "data.pak" archive inside the "data" folder within the Heroes of Might and Magic V game directory.
For starters, let's assume you want to replace the footmen from Haven with the test visual.
Inside the "data.pak" archive, find the file "Footman.xdb" at the path "GameMechanics\Creature\Creatures\Haven\Footman.xdb ".
Extract it from the archive while preserving the folder structure. Then uncheck "Read-only" in the file properties.
Next, inside the "data.pak" archive, find the file "Footman.xdb", but this time at the path "MapObjects\_(AdvMapObjectLink)\Monsters\Haven\Foot man.xdb".
Extract this file from the archive as well, again preserving the folder structure. Then uncheck "Read-only" in its properties.
Drop these two files (preserving the folder structure) into the "Z_TestCreature.pak" archive in the "data" folder.
The entire process is done in four simple steps.
Step 1.
Open the file "GameMechanics\Creature\Creatures\Haven\Footman.xdb " inside the "Z_TestCreature.pak" archive.
Find the lines "MonsterShared" and "Visual"

replace the original paths in them with the paths to the test creature's files.
i.e.
replace the path to "MonsterShared"
/MapObjects/Haven/Footman.(AdvMapMonsterShared).xdb
with
/new_creatures/test_fraction/test_creature/creature.(AdvMapMonsterShared).xdb
and the path to "Visual" from
/GameMechanics/CreatureVisual/Creatures/Haven/Footman.xdb
to
/new_creatures/test_fraction/test_creature/creature.(CreatureVisual).xdb

(these lines can be copied from the peasant file, modified for the needs of the test template,
i.e., the file "GameMechanics\Creature\Creatures\Haven\Peasant.xdb " inside the "Z_TestCreature.pak" archive)
Step 2.
Next, open the file "MapObjects\_(AdvMapObjectLink)\Monsters\Haven\Foot man.xdb" inside the "Z_TestCreature.pak" archive.
In the third line, replace the path to "AdvMapMonsterShared"
i.e.
replace
/MapObjects/Haven/Footman.(AdvMapMonsterShared).xdb
with
/new_creatures/test_fraction/test_creature/creature.(AdvMapMonsterShared).xdb

Step 3.
Delete from the "Z_TestCreature.pak" archive
the file "GameMechanics\Creature\Creatures\Haven\Peasant.xdb "
and the file "MapObjects\_(AdvMapObjectLink)\Monsters\Haven\Peas ant.xdb"
so that this same test visual doesn't replace the peasant along with the footman.
Step 4.
Next, inside the "Z_TestCreature.pak" archive, find the file
"/new_creatures/test_fraction/test_creature/creature.(AdvMapMonsterShared).xdb"
in it, replace the creature's ID line with the footman's ID.
i.e.
replace CREATURE_PEASANT
with CREATURE_FOOTMAN

Now the test visual (peasant in a yellow shirt) will replace the footman in the game.
By analogy with what was described in the main text of Example 1.
You simply need to copy from the "data.pak" archive,
from the folders "GameMechanics\Creature\Creatures" and "MapObjects\_(AdvMapObjectLink)\Monsters",
the files corresponding to the creature you want to replace instead of the footman's files.
The ID of your creature, which needs to be entered instead of "CREATURE_PEASANT" in the "creature.(AdvMapMonsterShared).xdb" file,
can be found by searching through the files in the "GameMechanics\Creature\Creatures" folder.
Or Google it; this ID is used in script commands, so there is information about this online.
How to understand which files correspond to which creature? Use your head.
If you struggle with English, you can use a translator.
By analogy with what was described in the main text of Example 1.
Only replace the paths in the files corresponding to the NCF creature.
And of course, you must have the NCF core installed.
Replace the text in the files.
for the name
"/new_creatures/test_fraction/test_creature/icon_text/name.txt"
for the description
"/new_creatures/test_fraction/test_creature/icon_text/description.txt"
Edit or replace the file
"/new_creatures/test_fraction/test_creature/icon_text/icon.(Texture).dds"
.dds files can be edited via Adobe Photoshop with an installed dds plugin.
Here are the more or less optimal settings for saving dds for HoMMV.

For creature icons and other interface elements, it is better to disable MIP maps.
For textures that will be used on a model, MIP maps must be enabled.
psatkha wrote a good guide on editing icons.
Game stats are written in the file (using the footman as an example) "GameMechanics\Creature\Creatures\Haven\Footman.xdb ".
By analogy, copy and edit the stats file of the creature you are modifying/adding.
For example, to make a creature a ranged attacker, you need to enter the number of shots in the "Shots" column

And this is how a spell assigned to a creature looks, using dwarf mages as an example.

I won't have the strength to explain what every digit and parameter means in the creature files.
Therefore, explore this yourself by examining the original creature stat files
located in the "GameMechanics\Creature\Creatures" folder.
Or Google additional information online (it exists, and there is a lot of it).
There is only one small nuance: teleportation.
If you want your creature to use teleport when moving (this does not automatically give it the "flying creature" ability),
then you need to edit the file "/new_creatures/test_fraction/test_creature/creature.(CreatureVisual).xdb"
Specifically, the "TeleportingMove" section. In "Use", replace "False" with "True".

And in the lines below, you can optionally choose a teleport effect.
Once you have made the creature teleporting, it will use "moveStart" and "moveEnd" animations instead of "move".
To do this, you need to copy from the "data.pak" archive into your own archive the file responsible for the selected creature's camera.
For example, for the peasant, it is "Cameras/Interface/HireCreatures/Peasant.xdb", already edited in the "Z_TestCreature.pak" archive.
Editing the camera is very tedious because you have to edit numeric values, and the result can only be viewed in-game.
Therefore, it is often faster to copy the contents of a more suitable camera file from another creature into your creature's camera file.
For example, the peasant in the "Z_TestCreature.pak" template actually uses the footmen's camera.
The "Z_TestCreature.pak" archive already contains a test effect in the folder "/new_creatures/test_fraction/test_creature/animset/effects/".
(These are glowing purple eyes, from the skeleton alt-grade)
If you want to test this effect, simply enter the path to the effect into your animation file, for example, in the file
"/new_creatures/test_fraction/test_creature/animset/idle00.(BasicSkelAnim).xdb"
in the "Effect" line: href="effects/idle00.(Effect).xdb#xpointer(/Effect)"

Now, in-game, the peasant in the yellow shirt will have glowing purple eyes.
Note that the "GlueToNamedBon" line
in the file "/new_creatures/test_fraction/test_creature/animset/effects/head_bone.(ParticleInstance).xdb"
determines which bone of the model's skeleton the effect will be "glued" to.
In the past, modders often used effects to "hang" model elements (helmets, swords, etc.) on a creature.
This method can still be useful for solving various specific tasks.
(for example, when you need a model element to appear or disappear only in one animation).
You will have to figure out how to create your own effect independently;
this can be done by studying the example from "Z_TestCreature.pak", examples from the game, and examples from various mods.
Example 2: The same thing, but using a new imported model.
Complete the full process of adding a model as described in the guide for importing models, skeletons, and animations.
Follow the process described above in Example 1.
All set.
What is described in Example 3 only makes sense if you want to replace peasants with recolored knights, for example,
or create an NCF creature from recolored knights.
If you just want to recolor the knights and leave them in their place,
the most optimal way is simply to find and recolor their texture.
Follow the process described above in Example 1: replace the desired creature with a test visual (peasant in a yellow shirt),
or create an NCF creature with this visual.
Next, you'll need to figure out a bit about what is located where in the in-game archives.
But I will try to explain how to do this more or less easily.
To create a recolored version of a creature from the original game,
you need to find three groups of files in the original game's "data.pak" archive.
1 model and skeleton xdb files.
2 texture dds files.
3 animset xdb file and animation xdb files.
You can find where these files are located using the map editor.
Open a map, place a creature on the map, and select it.
In the side menu, click on the "Shared" tab, then click the button with three dots.

A new window will open.
In the left half of the window, you can see how the
"AdvMapMonsterShared" file (global map shader) for the selected creature is located in the folder structure.
In the right half of the window, you see the contents of the "AdvMapMonsterShared" file.
Through the contents of this file, you can find paths to the model and textures, animset, and animations.
The "AnimSet" line refers to an animset xdb file, which in turn contains links to animation files.
The "Model" line refers to a model xdb file containing links to skeleton geometry and material files.
Material files, in turn, refer to texture files.
Files specified in these lines can be viewed by selecting the line and clicking the button with three dots.

In (AdvMapMonsterShared), a low-polygon (blocky) version of the model for the global map is often specified, i.e., lod.
For your mod template, you need a higher-polygon model;
most often, you can simply open the link to the model and select the high-polygon model from the left menu,
which is in the same folder, but if you are unlucky, the high-polygon model may be anywhere and will have to be searched for.

Navigating through your creature's file structure in the editor, find and remember the path to:
1 geometry and skeleton xdb files.
Sometimes developers embed geometry and skeleton files inside the model xdb file.
In that case, you need to remember the path to the model xdb file.
2 texture dds files.
3 animset xdb and animation xdb files.
Now find these files in the "data.pak" archive and copy them.
Now we finally form the template for your recolor mod.
1 Rename the model and skeleton xdb files to "creature-Geom.xdb" and "creature-Skel.xdb" respectively.
Drop them into the mod template archive in the folder with your creature.
You need to copy the model xdb file entirely.
Rename it to "creature.(Model).xdb" and drop it into the mod template archive in the folder with your creature.
An important nuance: in this case, you must change the old material paths in this file to new ones:
href="material/material1.(Material).xdb#xpointer(/Material)".
2 Rename dds files to "texture1.(Texture).dds", "texture2.(Texture).dds", etc.
Drop them into the mod template archive in the folder with your creature, in the "material" subfolder.
It's simple. Open the creature.(Model).xdb file located in your creature's folder.
Edit the material links so that the correct materials are displayed in the correct order.
This is easy because all materials in this structure have the same names except for the number.
Just replace the number in the material name.
If the model has more than two materials, you need to add one line for each new material
with a correct link to its location.
3 In the mod template archive, in your creature's folder, delete everything from the "animset" subfolder to avoid confusion and conflicts.
Rename your animset file to "creature.(AnimSet).xdb", and edit this file so that animation paths refer to the local folder.
i.e.
for example, instead of
href="/_(BasicSkelAnim)/Creatures/Haven/Angel/idle00.(BasicSkelAnim).xdb#xpointer(/BasicSkelAnim)"
it should be
href="idle00.(BasicSkelAnim).xdb#xpointer(/BasicSkelAnim)"
Collect the animation files; they do not need to be renamed.
Drop the renamed animset and animation files into the mod template archive, in your creature's folder, in the "animset" subfolder.
In general terms, that's it. Now you have a ready-made creature template separated from the original.
Now you just need to take and recolor it.
To do this, edit the files "texture1.(Texture).dds", "texture2.(Texture).dds", etc.
which you placed in the "material" subfolder of your creature's folder in the mod template archive.
.dds files can be edited via Adobe Photoshop with an installed dds plugin.
Here are the more or less optimal settings for saving dds for HoMMV.

Important: How to create a unique file structure instead of the test "/test_fraction/test_creature/"
This is seemingly optional, but a very important stage.
In principle, if you don't do it, your mod will still work, but there will be a conflict between two such mods.
To avoid conflicts and just to keep everything neat and beautiful:
1 Change the name of the "Z_TestCreature.pak" archive to something unique (no Cyrillic),
for example, for black guards I would use the name "H7DarkGuard.pak".
2 Inside your archive, change the names of the folders "/test_fraction/test_creature/" to "/faction name/creature name/"
again, using the black guards as an example: "/neutral/H7DarkGuard/".
3 Update the path to your creature's visual in the files of the replaced creature.
Using the knight as an example, these are the files:
"GameMechanics\Creature\Creatures\Haven\Footman.xdb "
"GameMechanics\Creature\Creatures\Haven\Footman.xdb "
in them "/test_fraction/test_creature/" must be replaced with the new path "/neutral/H7DarkGuard/".
(Obviously, it would have been more convenient to rename the folders first and then specify the path;
this guide did it differently only to introduce beginners to the information step-by-step.)
That's it; your mod now conflicts with nothing and can be safely published.
A few words about cleaning the archive of extra files.
Inside the archive, from your creature's folder (formerly "/test_fraction/test_creature/"), you can:
Delete the file "Cameras/Interface/HireCreatures/Peasant.xdb".
(this is the edited test "view menu camera" for the peasant)
delete the "shot" folder if your creature is not an archer.
(to be sure, you can also delete the path to the shot "href="shot/creature_shot.(Shot).xdb#xpointer(/Shot)"
from the file "creature.(CreatureVisual).xdb")
delete the "effects" folder from the "animset" folder if your creature has no animation effects.
You can clean up other small things, but it's not really worth the time;
I have already pointed out the main potentially redundant files that would be noticeable above.
I strongly recommend reading the point below if you are a "seasoned" modder.
If you are a beginner interested in how everything is structured, this may also interest you.
A simple example.
In the structure I propose, the main creature files are located like this:
Monster shader
"new_creatures\test_fraction\test_creature\creature .(AdvMapMonsterShared).xdb"
Creature visual
"new_creatures\test_fraction\test_creature\creature .(CreatureVisual).xdb"
Model
"new_creatures\test_fraction\test_creature\creature .(Model).xdb"
Material
"new_creatures\test_fraction\test_creature\material \material1.(Material).xdb"
Texture
"new_creatures\test_fraction\test_creature\material \texture1.(Texture).xdb"
Animset
"new_creatures\test_fraction\test_creature\animset\ creature.(AnimSet).xdb"
One of the animations
"new_creatures\test_fraction\test_creature\animset\ idle00.xdb"
As you can see, the path is roughly the same everywhere;
all important files are grouped inside one folder as much as possible.
This structure can be used repeatedly; it is maximally universal.
You only need to copy and rename the "test_creature" folder, and you have a full template for a new creature.
For comparison, this is how the peasant's files are located in the original game:
Monster shader
"/MapObjects/Haven/Peasant.(AdvMapMonsterShared).xdb#xpointer(/AdvMapMonsterShared)"
Creature visual
"/GameMechanics/CreatureVisual/Creatures/Haven/Peasant.xdb#xpointer(/CreatureVisual)"
Model
"_(Model)\Creatures\Haven\Peasant.(Model)"
Material
"_(Material)\auto-imported\Grass\Stuff\Log\auto-imported\Creatures\Haven\Peasant\Peasant_lambert.( Material)"
Texture
"Textures\auto-imported_______320\dev\Test\TMPcharacters\Peasant\ Peasant.tga"
Animset
"_(AnimSet)\Creatures\Haven\Peasant-arena.(AnimSet)"
One of the animations
"_(BasicSkelAnim)\Creatures\Haven\Peasant\idle00.(B asicSkelAnim)"
Such a file arrangement is not universal at all and can vary greatly from creature to creature.
Finding source files without an editor is often fundamentally impossible, as it's not obvious that the creature's texture
should be searched for somewhere along the path "auto-imported_______320\dev\Test\TMPcharacters".
As you can see, the spread is quite large, and to collect all these source files, you have to run around folders a lot.
In this specific case, you'd first have to "copy\paste\rename" files seven times,
plus add another 5-8 for animations (which also need renaming), plus every material and texture;
in short, it's a lot of redundant, tedious, and unnecessary work.
Meanwhile, with the grouped structure I propose, all source files will be ready in one "copy\paste\rename",
or at most two "renames" (if you are creating a faction you didn't have before).
With this new structure, you only need to copy the "test_creature" folder located at "new_creatures\test_fraction\test_creature"
to the path "new_creatures\(faction name in Latin)" and rename the faction and creature as you wish.
An important nuance: many copied files inside the renamed "test_creature" folder won't need to be edited at all
(files refer to each other within the folder, regardless of what that folder is called or where it is located).
In the case of copying original game files, you would have to edit every copied file
and most of the links inside it.
In short, compare these two methods and decide which one is more convenient for you.
But my personal opinion is that repeatedly copying a structure "as in the original game"
(or rather not a structure, but structures, because they are constantly different)
is pure masochism—unnecessary and meaningless work.
It's a terrible mess, don't even argue. The question is: are the developers that bad? Of course not. Not at all.
First, the developers focused on making a working game first, not a beautiful and convenient file structure.
Second, the game was made by far more than two or three people, and the structure clearly formed during development;
there was no time to fit everything into one format later.
Third, the concept of many game elements changed significantly (this can be learned from interviews with developers),
and this left its mark on the file structure.
Fourth, and most importantly, the developers likely used some tooling tailored for working
with such a structure, so the general mess was not critical for them.
(i.e., I mean some script that automatically created all necessary files and wrote current paths).
We don't have these tools; therefore, it seems to me that we should maximize systematization and simplify the process of creating files "by hand".
I see no reason why one should arrange files "as in the original game",
except, of course, for those files like "GameMechanics\Creature\Creatures\Haven\Peasant.xdb " which for some reasons are inconvenient to group into one folder.
which significantly simplifies the modding process.
How can the new structure be used to quickly replace any creature in the game?
Or quickly create a new NCF creature?
This text is intended for relative beginners in modding, but I hope it will also be useful for experienced modders
to understand how to save time and effort by using the new file structure.
Drop the "Z_TestCreature.pak" template into the "data" folder in the game root.
Download the Z_TestCreature.pak template file.
Move the downloaded "Z_TestCreature.pak" file to the "data" folder inside the Heroes of Might and Magic V game folder.
The path will be approximately "C:\Program Files\Nival Interactive\Heroes of Might and Magic V - Tribes of the East\data".
Remember that a ".pak" format file is just a regular archive. It can be opened and edited using WinRAR or WinZip.
Example 1: Replacing any creature in the game with a test visual from "Z_TestCreature.pak,"
or creating a new NCF creature that uses this visual.
(The test visual looks like an ordinary peasant in a yellow shirt.)
Find the "data.pak" archive inside the "data" folder within the Heroes of Might and Magic V game directory.
For starters, let's assume you want to replace the footmen from Haven with the test visual.
Inside the "data.pak" archive, find the file "Footman.xdb" at the path "GameMechanics\Creature\Creatures\Haven\Footman.xdb ".
Extract it from the archive while preserving the folder structure. Then uncheck "Read-only" in the file properties.
Next, inside the "data.pak" archive, find the file "Footman.xdb", but this time at the path "MapObjects\_(AdvMapObjectLink)\Monsters\Haven\Foot man.xdb".
Extract this file from the archive as well, again preserving the folder structure. Then uncheck "Read-only" in its properties.
Drop these two files (preserving the folder structure) into the "Z_TestCreature.pak" archive in the "data" folder.
The entire process is done in four simple steps.
Step 1.
Open the file "GameMechanics\Creature\Creatures\Haven\Footman.xdb " inside the "Z_TestCreature.pak" archive.
Find the lines "MonsterShared" and "Visual"

replace the original paths in them with the paths to the test creature's files.
i.e.
replace the path to "MonsterShared"
/MapObjects/Haven/Footman.(AdvMapMonsterShared).xdb
with
/new_creatures/test_fraction/test_creature/creature.(AdvMapMonsterShared).xdb
and the path to "Visual" from
/GameMechanics/CreatureVisual/Creatures/Haven/Footman.xdb
to
/new_creatures/test_fraction/test_creature/creature.(CreatureVisual).xdb

(these lines can be copied from the peasant file, modified for the needs of the test template,
i.e., the file "GameMechanics\Creature\Creatures\Haven\Peasant.xdb " inside the "Z_TestCreature.pak" archive)
Step 2.
Next, open the file "MapObjects\_(AdvMapObjectLink)\Monsters\Haven\Foot man.xdb" inside the "Z_TestCreature.pak" archive.
In the third line, replace the path to "AdvMapMonsterShared"
i.e.
replace
/MapObjects/Haven/Footman.(AdvMapMonsterShared).xdb
with
/new_creatures/test_fraction/test_creature/creature.(AdvMapMonsterShared).xdb

Step 3.
Delete from the "Z_TestCreature.pak" archive
the file "GameMechanics\Creature\Creatures\Haven\Peasant.xdb "
and the file "MapObjects\_(AdvMapObjectLink)\Monsters\Haven\Peas ant.xdb"
so that this same test visual doesn't replace the peasant along with the footman.
Step 4.
Next, inside the "Z_TestCreature.pak" archive, find the file
"/new_creatures/test_fraction/test_creature/creature.(AdvMapMonsterShared).xdb"
in it, replace the creature's ID line with the footman's ID.
i.e.
replace CREATURE_PEASANT
with CREATURE_FOOTMAN

Now the test visual (peasant in a yellow shirt) will replace the footman in the game.
How to replace a creature other than footmen?
By analogy with what was described in the main text of Example 1.
You simply need to copy from the "data.pak" archive,
from the folders "GameMechanics\Creature\Creatures" and "MapObjects\_(AdvMapObjectLink)\Monsters",
the files corresponding to the creature you want to replace instead of the footman's files.
The ID of your creature, which needs to be entered instead of "CREATURE_PEASANT" in the "creature.(AdvMapMonsterShared).xdb" file,
can be found by searching through the files in the "GameMechanics\Creature\Creatures" folder.
Or Google it; this ID is used in script commands, so there is information about this online.
How to understand which files correspond to which creature? Use your head.
If you struggle with English, you can use a translator.
How to add an NCF creature?
By analogy with what was described in the main text of Example 1.
Only replace the paths in the files corresponding to the NCF creature.
And of course, you must have the NCF core installed.
How to change a creature's description and name?
Replace the text in the files.
for the name
"/new_creatures/test_fraction/test_creature/icon_text/name.txt"
for the description
"/new_creatures/test_fraction/test_creature/icon_text/description.txt"
How to change a creature's icon?
Edit or replace the file
"/new_creatures/test_fraction/test_creature/icon_text/icon.(Texture).dds"
.dds files can be edited via Adobe Photoshop with an installed dds plugin.
Here are the more or less optimal settings for saving dds for HoMMV.

For creature icons and other interface elements, it is better to disable MIP maps.
For textures that will be used on a model, MIP maps must be enabled.
psatkha wrote a good guide on editing icons.
How to change a creature's game stats, add a spell, teleport, etc.?
Game stats are written in the file (using the footman as an example) "GameMechanics\Creature\Creatures\Haven\Footman.xdb ".
By analogy, copy and edit the stats file of the creature you are modifying/adding.
For example, to make a creature a ranged attacker, you need to enter the number of shots in the "Shots" column

And this is how a spell assigned to a creature looks, using dwarf mages as an example.

I won't have the strength to explain what every digit and parameter means in the creature files.
Therefore, explore this yourself by examining the original creature stat files
located in the "GameMechanics\Creature\Creatures" folder.
Or Google additional information online (it exists, and there is a lot of it).
There is only one small nuance: teleportation.
If you want your creature to use teleport when moving (this does not automatically give it the "flying creature" ability),
then you need to edit the file "/new_creatures/test_fraction/test_creature/creature.(CreatureVisual).xdb"
Specifically, the "TeleportingMove" section. In "Use", replace "False" with "True".

And in the lines below, you can optionally choose a teleport effect.
Once you have made the creature teleporting, it will use "moveStart" and "moveEnd" animations instead of "move".
How to change the camera position in the in-game creature view menu?
To do this, you need to copy from the "data.pak" archive into your own archive the file responsible for the selected creature's camera.
For example, for the peasant, it is "Cameras/Interface/HireCreatures/Peasant.xdb", already edited in the "Z_TestCreature.pak" archive.
Editing the camera is very tedious because you have to edit numeric values, and the result can only be viewed in-game.
Therefore, it is often faster to copy the contents of a more suitable camera file from another creature into your creature's camera file.
For example, the peasant in the "Z_TestCreature.pak" template actually uses the footmen's camera.
How to add an effect to a creature's animation?
The "Z_TestCreature.pak" archive already contains a test effect in the folder "/new_creatures/test_fraction/test_creature/animset/effects/".
(These are glowing purple eyes, from the skeleton alt-grade)
If you want to test this effect, simply enter the path to the effect into your animation file, for example, in the file
"/new_creatures/test_fraction/test_creature/animset/idle00.(BasicSkelAnim).xdb"
in the "Effect" line: href="effects/idle00.(Effect).xdb#xpointer(/Effect)"

Now, in-game, the peasant in the yellow shirt will have glowing purple eyes.
Note that the "GlueToNamedBon" line
in the file "/new_creatures/test_fraction/test_creature/animset/effects/head_bone.(ParticleInstance).xdb"
determines which bone of the model's skeleton the effect will be "glued" to.
In the past, modders often used effects to "hang" model elements (helmets, swords, etc.) on a creature.
This method can still be useful for solving various specific tasks.
(for example, when you need a model element to appear or disappear only in one animation).
You will have to figure out how to create your own effect independently;
this can be done by studying the example from "Z_TestCreature.pak", examples from the game, and examples from various mods.
Example 2: The same thing, but using a new imported model.
(for example, a model from Heroes VII)
Complete the full process of adding a model as described in the guide for importing models, skeletons, and animations.
Follow the process described above in Example 1.
All set.
Example 3: The same thing, but using a "recolored" model based on a Heroes V model.
What is described in Example 3 only makes sense if you want to replace peasants with recolored knights, for example,
or create an NCF creature from recolored knights.
If you just want to recolor the knights and leave them in their place,
the most optimal way is simply to find and recolor their texture.
Follow the process described above in Example 1: replace the desired creature with a test visual (peasant in a yellow shirt),
or create an NCF creature with this visual.
Next, you'll need to figure out a bit about what is located where in the in-game archives.
But I will try to explain how to do this more or less easily.
To create a recolored version of a creature from the original game,
you need to find three groups of files in the original game's "data.pak" archive.
1 model and skeleton xdb files.
2 texture dds files.
3 animset xdb file and animation xdb files.
You can find where these files are located using the map editor.
Open a map, place a creature on the map, and select it.
In the side menu, click on the "Shared" tab, then click the button with three dots.

A new window will open.
In the left half of the window, you can see how the
"AdvMapMonsterShared" file (global map shader) for the selected creature is located in the folder structure.
In the right half of the window, you see the contents of the "AdvMapMonsterShared" file.
Through the contents of this file, you can find paths to the model and textures, animset, and animations.
The "AnimSet" line refers to an animset xdb file, which in turn contains links to animation files.
The "Model" line refers to a model xdb file containing links to skeleton geometry and material files.
Material files, in turn, refer to texture files.
Files specified in these lines can be viewed by selecting the line and clicking the button with three dots.

Important: about lod
In (AdvMapMonsterShared), a low-polygon (blocky) version of the model for the global map is often specified, i.e., lod.
For your mod template, you need a higher-polygon model;
most often, you can simply open the link to the model and select the high-polygon model from the left menu,
which is in the same folder, but if you are unlucky, the high-polygon model may be anywhere and will have to be searched for.

Navigating through your creature's file structure in the editor, find and remember the path to:
1 geometry and skeleton xdb files.
Important: If the creature has no geometry or skeleton xdb files.
Sometimes developers embed geometry and skeleton files inside the model xdb file.
In that case, you need to remember the path to the model xdb file.
2 texture dds files.
3 animset xdb and animation xdb files.
Now find these files in the "data.pak" archive and copy them.
Now we finally form the template for your recolor mod.
1 Rename the model and skeleton xdb files to "creature-Geom.xdb" and "creature-Skel.xdb" respectively.
Drop them into the mod template archive in the folder with your creature.
Important: If the creature had no geometry or skeleton xdb files.
You need to copy the model xdb file entirely.
Rename it to "creature.(Model).xdb" and drop it into the mod template archive in the folder with your creature.
An important nuance: in this case, you must change the old material paths in this file to new ones:
href="material/material1.(Material).xdb#xpointer(/Material)".
2 Rename dds files to "texture1.(Texture).dds", "texture2.(Texture).dds", etc.
Drop them into the mod template archive in the folder with your creature, in the "material" subfolder.
Important: If your model has more than one texture.
It's simple. Open the creature.(Model).xdb file located in your creature's folder.
Edit the material links so that the correct materials are displayed in the correct order.
This is easy because all materials in this structure have the same names except for the number.
Just replace the number in the material name.
If the model has more than two materials, you need to add one line for each new material
with a correct link to its location.
3 In the mod template archive, in your creature's folder, delete everything from the "animset" subfolder to avoid confusion and conflicts.
Rename your animset file to "creature.(AnimSet).xdb", and edit this file so that animation paths refer to the local folder.
i.e.
for example, instead of
href="/_(BasicSkelAnim)/Creatures/Haven/Angel/idle00.(BasicSkelAnim).xdb#xpointer(/BasicSkelAnim)"
it should be
href="idle00.(BasicSkelAnim).xdb#xpointer(/BasicSkelAnim)"
Collect the animation files; they do not need to be renamed.
Drop the renamed animset and animation files into the mod template archive, in your creature's folder, in the "animset" subfolder.
In general terms, that's it. Now you have a ready-made creature template separated from the original.
Now you just need to take and recolor it.
To do this, edit the files "texture1.(Texture).dds", "texture2.(Texture).dds", etc.
which you placed in the "material" subfolder of your creature's folder in the mod template archive.
.dds files can be edited via Adobe Photoshop with an installed dds plugin.
Here are the more or less optimal settings for saving dds for HoMMV.

Important: How to create a unique file structure instead of the test "/test_fraction/test_creature/"
and clean your finished mod of unnecessary test debris?
This is seemingly optional, but a very important stage.
In principle, if you don't do it, your mod will still work, but there will be a conflict between two such mods.
To avoid conflicts and just to keep everything neat and beautiful:
1 Change the name of the "Z_TestCreature.pak" archive to something unique (no Cyrillic),
for example, for black guards I would use the name "H7DarkGuard.pak".
2 Inside your archive, change the names of the folders "/test_fraction/test_creature/" to "/faction name/creature name/"
again, using the black guards as an example: "/neutral/H7DarkGuard/".
3 Update the path to your creature's visual in the files of the replaced creature.
Using the knight as an example, these are the files:
"GameMechanics\Creature\Creatures\Haven\Footman.xdb "
"GameMechanics\Creature\Creatures\Haven\Footman.xdb "
in them "/test_fraction/test_creature/" must be replaced with the new path "/neutral/H7DarkGuard/".
(Obviously, it would have been more convenient to rename the folders first and then specify the path;
this guide did it differently only to introduce beginners to the information step-by-step.)
That's it; your mod now conflicts with nothing and can be safely published.
A few words about cleaning the archive of extra files.
Inside the archive, from your creature's folder (formerly "/test_fraction/test_creature/"), you can:
Delete the file "Cameras/Interface/HireCreatures/Peasant.xdb".
(this is the edited test "view menu camera" for the peasant)
delete the "shot" folder if your creature is not an archer.
(to be sure, you can also delete the path to the shot "href="shot/creature_shot.(Shot).xdb#xpointer(/Shot)"
from the file "creature.(CreatureVisual).xdb")
delete the "effects" folder from the "animset" folder if your creature has no animation effects.
You can clean up other small things, but it's not really worth the time;
I have already pointed out the main potentially redundant files that would be noticeable above.
I strongly recommend reading the point below if you are a "seasoned" modder.
If you are a beginner interested in how everything is structured, this may also interest you.
Why should one use the structure I propose rather than the "as in the original game" structure?
A simple example.
In the structure I propose, the main creature files are located like this:
Monster shader
"new_creatures\test_fraction\test_creature\creature .(AdvMapMonsterShared).xdb"
Creature visual
"new_creatures\test_fraction\test_creature\creature .(CreatureVisual).xdb"
Model
"new_creatures\test_fraction\test_creature\creature .(Model).xdb"
Material
"new_creatures\test_fraction\test_creature\material \material1.(Material).xdb"
Texture
"new_creatures\test_fraction\test_creature\material \texture1.(Texture).xdb"
Animset
"new_creatures\test_fraction\test_creature\animset\ creature.(AnimSet).xdb"
One of the animations
"new_creatures\test_fraction\test_creature\animset\ idle00.xdb"
As you can see, the path is roughly the same everywhere;
all important files are grouped inside one folder as much as possible.
This structure can be used repeatedly; it is maximally universal.
You only need to copy and rename the "test_creature" folder, and you have a full template for a new creature.
For comparison, this is how the peasant's files are located in the original game:
Monster shader
"/MapObjects/Haven/Peasant.(AdvMapMonsterShared).xdb#xpointer(/AdvMapMonsterShared)"
Creature visual
"/GameMechanics/CreatureVisual/Creatures/Haven/Peasant.xdb#xpointer(/CreatureVisual)"
Model
"_(Model)\Creatures\Haven\Peasant.(Model)"
Material
"_(Material)\auto-imported\Grass\Stuff\Log\auto-imported\Creatures\Haven\Peasant\Peasant_lambert.( Material)"
Texture
"Textures\auto-imported_______320\dev\Test\TMPcharacters\Peasant\ Peasant.tga"
Animset
"_(AnimSet)\Creatures\Haven\Peasant-arena.(AnimSet)"
One of the animations
"_(BasicSkelAnim)\Creatures\Haven\Peasant\idle00.(B asicSkelAnim)"
Such a file arrangement is not universal at all and can vary greatly from creature to creature.
Finding source files without an editor is often fundamentally impossible, as it's not obvious that the creature's texture
should be searched for somewhere along the path "auto-imported_______320\dev\Test\TMPcharacters".
As you can see, the spread is quite large, and to collect all these source files, you have to run around folders a lot.
In this specific case, you'd first have to "copy\paste\rename" files seven times,
plus add another 5-8 for animations (which also need renaming), plus every material and texture;
in short, it's a lot of redundant, tedious, and unnecessary work.
Meanwhile, with the grouped structure I propose, all source files will be ready in one "copy\paste\rename",
or at most two "renames" (if you are creating a faction you didn't have before).
With this new structure, you only need to copy the "test_creature" folder located at "new_creatures\test_fraction\test_creature"
to the path "new_creatures\(faction name in Latin)" and rename the faction and creature as you wish.
An important nuance: many copied files inside the renamed "test_creature" folder won't need to be edited at all
(files refer to each other within the folder, regardless of what that folder is called or where it is located).
In the case of copying original game files, you would have to edit every copied file
and most of the links inside it.
In short, compare these two methods and decide which one is more convenient for you.
But my personal opinion is that repeatedly copying a structure "as in the original game"
(or rather not a structure, but structures, because they are constantly different)
is pure masochism—unnecessary and meaningless work.
Why is there such a mess in the game files?
It's a terrible mess, don't even argue. The question is: are the developers that bad? Of course not. Not at all.
First, the developers focused on making a working game first, not a beautiful and convenient file structure.
Second, the game was made by far more than two or three people, and the structure clearly formed during development;
there was no time to fit everything into one format later.
Third, the concept of many game elements changed significantly (this can be learned from interviews with developers),
and this left its mark on the file structure.
Fourth, and most importantly, the developers likely used some tooling tailored for working
with such a structure, so the general mess was not critical for them.
(i.e., I mean some script that automatically created all necessary files and wrote current paths).
We don't have these tools; therefore, it seems to me that we should maximize systematization and simplify the process of creating files "by hand".
I see no reason why one should arrange files "as in the original game",
except, of course, for those files like "GameMechanics\Creature\Creatures\Haven\Peasant.xdb " which for some reasons are inconvenient to group into one folder.












