Skip to content

Posts from Modding FAQ

5.0 (1 rating)
User Avatar
12 years ago
Auto-translated
Not mine. Back in the day, I read a modding FAQ on the Nival website by author Ilve. It helped me create simple mods. I hope it helps others too. So, here is what Ilve wrote:

Modding FAQ

An article for beginner modders

Contents

1. General Information

2. Directory Structure
• texts.pak directory
• sound.pak and soundsfx.pak directories
• data.pak directory
3. Examples
• xdb-file structure
• Example of an xdb-file fragment
• A mod that changes sounds
• Forest Rangers turn into...
• Replacing a hero model
• DefaultStats.xdb gameplay file
4. Additional
• Using the Map Editor
• Using the nVidia plugin
• DDS Converter
• Game music
• Startup image
• Ubi and Nival logos

1. General Information

New, fully functional creatures, buildings, etc., cannot be added to the game; only the developers can do that!
Almost everything we need for creating mods is located here:

../"Game Root Directory"/data

There are three files there. All of them are ordinary zip archives. Note that mods must also be saved as zip archives and then given the required extension.

1. data.pak
This archive contains all the most important things. This is what we will work with most often.
2. sound.pak and soundsfx.pak
The sound.pak and soundsfx.pak archives contain audio files. Despite having no extension, these are ordinary wav files. They can be listened to and modified while keeping the original name.
3. texts.pak
This archive contains the game's text data.

Important:

- files with the *.xdb extension are ordinary text files, and their content can easily be changed in any text editor.
- *.dds files are game texture graphics files. For example, they can be edited in programs such as Adobe Photoshop® and Ulead PhotoImpact®, provided that you have the nVidia graphics plugin installed.
Link to the plugin (official site): http://developer.nvidia.com/object/n...ure_tools.html
- *.pak files (extension used in the original game – Heroes V, these mods were placed in the data folder), *.h5m (this extension was used in the addon – Hammers of Fate, these mods were placed in the Maps folder), *.h5u (extension for mods of the last addon – Tribes of the East, placed in the UserMODs folder) – all of these are ordinary zip archives. They can be opened with corresponding programs (e.g., WinRar®).

Types of mods:
• Graphics
• Balance
• Interface
• Text
• Mixed

Below, I will provide examples for creating different types of mods (section 3 - Examples).

To make a mod, you need to "extract" the necessary files from the game while preserving the original structure.

Example:

We want to change the creature name "Goblins" to "Meat". Go to texts.pak/Text/Game/Creatures/Orcs/ and extract the Goblin.txt file.
Create the same folder structure and place the Goblin.txt file there (in WinRar, this is done by selecting the desired file(s) and pressing Alt+W, which extracts it with the ready-made folder structure). Open the file with Notepad, change the text "Goblins" to "Meat", and save (note that many files have a Read-only attribute; this must be removed before editing). After that, we have a Text folder with content; make a zip archive from it with any name. Change the extension to *.h5u and place it in the UserMODs folder. That's it.

---------------------------------------------------------------------------------------

You can also create your own files, but then links to them must be made from modified original files. That is, there is always an "old" file with a pointer to the new one in its structure.

Example:

There is a mod for a hero who has no shooting animation.
Go to data.pak/Characters/Heroes/DS. Look for the Freyda_DS_U-arena.xdb file and extract it. We need a shooting animation - there isn't one, but we can find a workaround. Create a text file and look for the Freyda_DS_U-arena-cast.xdb file in the same place. Open it and copy all its content into your new text file. Then save the changes and give your file the extension and name Freyda_DS_U-arena-rangeattack.xdb. Then, in the Freyda_DS_U-arena.xdb file, add the following by analogy with existing ones:
HTML Code:

rangeattack


That is, here - rangeattack, between the tags we specify the action name, and here - , a link to the file we created. The animation will be taken from it.
Then proceed as in the previous example. Have the folder and file structure, make a zip archive from it with any name. Change the extension to *.h5u and place it in the UserMODs folder.
As a result, when shooting, Freyda will perform the same movements as when casting a spell.

---------------------------------------------------------------------------------------

Often, old version mods "don't work," meaning they function incorrectly or not at all, because they have an earlier creation date than the game. This problem is easily solved. We only need to update the mod archive date using some program (e.g., Total Commander® or Mod Manager - http://cjdsoft.h15.ru/download/h5_ssmm.rar)).
Finally, I recommend reading the entire Mods forum thread and having at least a basic knowledge of English.


2. Directory Structure

In this section, I will examine the three main game directories that we will use when creating mods. I'll start in order with the simplest. I should note right away that I will talk about the contents of each archive, but not everything—only the most necessary parts. It is practically impossible to cover everything.

texts.pak directory

It contains game text information, which can be changed if desired. Folder structure:

bin – unlikely we'll need it
Campaigns – campaign texts
DialogScenes – dialogue scene texts (in campaigns and single-player maps)
GameMechanics – gameplay mechanics texts
Lights – not used, in principle
MapObjects – map object texts
Maps – descriptions of various maps
RMG – Random Map Generator (henceforth RMG) texts
scripts – probably won't be needed
Text – main directory with most of the game's texts
UI – interface texts

Note that GameMechanics, Text, and UI are used most often.
The Text directory contains many nested folders and files; in my opinion, this will be the most interesting for us. Try looking for yourself.

sound.pak and soundsfx.pak directories

These directories contain game sounds. Files in these directories are linked from files in the data.pak directory. As I said, these are ordinary files that can be opened by an audio player or a media editing program, such as Sound Forge®. To save a file on your computer, you only need to give it the *.wav extension.

Example:

Swapping the shouts of joy in battle between Druids and High Druids.
Go to data.pak\Sounds\_(Sound)\Creatures\Sylvan\DruidElder and data.pak\Sounds\_(Sound)\Creatures\Sylvan\Druid. Extract the happy.xdb files from there. Open one of them with Notepad (the example from DruidElder), look at the line:

2A847EF6-49B8-402E-9728-1C97645F5C3B

Then open the other file and find a similar line:

9AF3EADF-26ED-4C7D-9047-6557A8ECA81D

Swap these lines between our two files and save the changes.
Preserving the folder structure, create a mod (this process was already described in previous examples).

data.pak directory

Now it's time for the most interesting and useful game directory. In this article, I will only cover those that are most important, in my opinion. I won't claim to know exactly where everything is; I'll write based on my own understanding.

_(AnimSet) - various movement and action animations
_(BasiSkelAnim) – various movement and action animations
_(Model) – textures and creature model files are located here
Arenas – castle screens, menus, battle arenas
bin – very important files necessary for the functioning of the game and some mods
Characters – contains animations, textures, (models), and much more interesting stuff
Effects – various graphical effects of the game
GameMechanics – everything related to gameplay mechanics is here (e.g., parameters of creatures, spells, some buildings)
Sounds – files with links to sound directories
Textures – many game textures are located here
UI – mainly contains game interface files and textures, but other things can be found too (specifically - folders H5A1 and H5A2)

You can only fully figure out what is where and for what purpose through practice, so I didn't go into the details of each directory, especially since they, in turn, contain a huge number of others. The main thing is to understand the idea and principle of this entire structure. I think the examples will help you.
Be prepared - the developers were clever, and what you need isn't always where it logically should be; in such cases, you need to use intuition and logic. For example, it's not a fact that you'll find Emerald Dragon textures in the Textures folder... they are located in the _(Model) directory structure.


3. Examples

xdb-file structure

They consist of blocks formatted as follows:
HTML Code:

...

The structure closely resembles HTML, where tags are opened and then often require closing. The top line defines the start of a section, the bottom – the end, X – the name. In place of the ellipsis are game parameters, less frequently – subsections, which in turn include a set of various attributes grouped by some common characteristic. Nested blocks and parameters are formatted the same way as main ones. Instead of the second ellipsis, an attribute value is placed. For example, in … - Shots here is the name of the characteristic, and "..." – its value.

Example of a fragment of the Grand Elf xdb-file:

data.pak/GameMechanics/Creature/Creatures/Preserve/Grand_Elf.xdb
HTML Code:


5 - attack, changes when the numeric parameter is modified
4 - defense
16 - shots
5 - minimum damage
8 - maximum damage
5 - speed
10 - initiative
false - ability to fly, true/false values
14 - health units
- known spells
0 - mana
............
7 - growth
- creature cost
............
190

............

A mod that changes sounds

Example:

1. Go to data.pak/Sounds/_(Sound)/Creatures/Sylvan/Druid/happy.xdb

2. There, find out that the required file is named "2A847EF6-49B8-402E-9728-1C97645F5C3B"

3. Go to soundsfx.pak/bin /Sounds/, find the required file, and extract it.

4. Take your own wav file, for example, "I’ll be back" performed by Arnie, name it "2A847EF6-49B8-402E-9728-1C97645F5C3B", and pack it while preserving the folder structure.

In this case, when cheering in battle, druids will speak with the voice of the Terminator: "I’ll be back"!!!

Forest Rangers turn into ImbaRangers!!!
Let's change their characteristics, name, and face.

Example of a mixed mod.

Extract the following files from the game while preserving the folder structure:

1. data.pak/Characters/Creatures/Rampart/AlternativeUpgrades/T3_Elf_Sniper-highelf.(Texture).dds

2. data.pak/GameMechanics/Creature/Creatures/Preserve/3rd/ SharpShooter.xdb

3. texts.pak/Text/Game/Creatures/Preserve/3rd/ SharpShooter_Name.txt



1. Recolor anything in this file and save. To get a result, it will be useful to read here http://forums.nival.com/rus/showthre...=31375&page=59

2. Change the following lines in the file:
HTML Code:
1000
1000
1000
99
100
7
15
1000
20

0

3. In the file, change the text to "ImbaRangers".
Pack and test.

Replacing a hero model

We want to give Iris from the Haven faction the model of Freyda from the campaign.

Example:
Go to data.pak/MapObjects/Haven, and find the files: Ving.(AdvMapHeroShared).xdb and Freyda.(AdvMapHeroShared).xdb.
Open them.
We only need to replace similar lines in Iris's file with these:
HTML Code:
...


...






...

...
Pack Iris's file and create a mod.

DefaultStats.xdb gameplay file

Example:

An excerpt from one of the important gameplay mechanics files (data.pak/GameMechanics/RPGStats/DefaultStats.xdb). The example shows part of the undead raising table.
HTML Code:
...
10


CREATURE_PEASANT
CREATURE_SKELETON


CREATURE_MILITIAMAN
CREATURE_SKELETON


CREATURE_ARCHER
CREATURE_SKELETON_ARCHER


CREATURE_MARKSMAN
CREATURE_SKELETON_ARCHER

...

4. Additional

Using the Map Editor

Part of the mod creation process can be handled in the Map Editor. Personally, I use it rarely. I won't analyze it in this article. But look at a useful screenshot. It shows a button that, when pressed, tells you a lot about an object, no worse than an xdb-file.

Using the nVidia plugin using Photoshop as an example

After downloading, a new option will be available – save as... *.dds. A window will appear. See in the screenshot how it should look. There are also Alpha channels... but check that on the forum http://forums.nival.com/rus/showthre...=31375&page=59

DDS Converter

A good helper when working with dds files. Significantly compresses their size. I recommend it. See screenshot (the necessary options are marked there).

Game music

For those who want to hear their favorite music in Heroes instead of the standard ones.

All music is located:

../"Game Root Directory"/music

and it's recorded in *.ogg format. To hear Limp Bizkit – Nookie in Tribes of the East, for example, you need to find the original sound file (../music/a2/Main_Menu.ogg) and replace it with a converted Nookie song in *.ogg format (e.g., using Sound Forge®), while changing its name to Main_Menu.ogg. Similarly, you can change all the music in the game.

Startup image

When launching Tribes of the East, an image with orcs appears... It can be replaced with any other, but of the same format and name (do not use very large files).

Ubi and Nival logos

Do they annoy you every time you launch? Go from the root directory to the video folder and delete the logo-ubi6.ogg and logo-nival.ogg files.

I wrote this article based on my knowledge and skills; I cannot describe or explain everything. I might have made a mistake, please forgive me - I am not a robot. Some people do it differently, some use other programs... You can't please everyone. I hope I was able to help beginners. Thank you
User Avatar
11 years ago
Auto-translated
Where is the code? :smile29: At least rewrite it.
"Поехали" :smile13::smile14:
User Avatar
9 years ago
Auto-translated
Hey guys, I'm a newbie, but I want to learn how to create mods.
I have experience working with Pascal (PascalABC and Delphi 7).
Can anyone help me?
I've read about it, and I understand the principle, but I still have some questions.
User Avatar
9 years ago
Auto-translated
I read about the music, and the word "convert" made me a little uneasy. I was just removing "mp4" from the file names and replacing it with "ogg," and it was working fine and playing correctly.
In reply to Уриэль Септим Х
User Avatar
9 years ago
Auto-translated
Uriel Septim X
I read about the music, and the word "convert" made me a little uneasy. I just removed the .mp4 from the filename and wrote .ogg, and it worked and played normally.

What the heck is .mp4? All sound effects are pure .wav (sound playback depends on the codec used), and music is .ogg :smile38:

In principle, the game engine can read other containers, but if these mods are to be used by other users on their computers, it is better to stick to common standards! :smile29:

Added 7 minutes later
CheroFeniks
I couldn't find any Nvidia plugin at that link; everything is in English:(

Here you go: this :smile13:
С уважением, Psatkha (Псатха)

---------------------------------------------

Неудачное планирование ведёт к неудаче ...

NCF - мод, добавляющий дополнительных существ в HeroesV 3.1
In reply to psatkha
9 years ago
Auto-translated
Thank you for the plugin! :) :D I don't quite understand how to change the animation:confused: :smile05:. For example, how do I change the animation of elder demons so that they always jump instead of walking, and not just when they use the jump ability? Thanks in advance:smile50:.
In reply to psatkha
User Avatar
9 years ago
Auto-translated
psatkha
What .mp4 are you talking about? All sound effects are pure .wav (sound playback depends on the codec used), and the music is .ogg :smile38:

In principle, the game engine can read other containers, but if these mods are intended for use by other users on their computers, it's best to stick to common standards! :smile29:

Added 7 minutes later


Here, take this :smile13:

I don't understand how you can recolor a model and insert it into the game in such a way that the original model is also preserved.
In reply to Aslan_Red
User Avatar
9 years ago
Auto-translated
Aslan_Red
I don't understand one thing: how can you recolor a model and insert it into the game in such a way that the original model remains?

In other words, the desired result is to get something NEW and keep the OLD at the same time?!
С уважением, Psatkha (Псатха)

---------------------------------------------

Неудачное планирование ведёт к неудаче ...

NCF - мод, добавляющий дополнительных существ в HeroesV 3.1
User Avatar
9 years ago
Auto-translated
The player wants to recolor the texture, but leave the geometry unchanged.
 

К А
Стикеры GBF в Telegram
User Avatar
9 years ago
Auto-translated
I know it's a silly question, but could you tell me how to create a folder (or what is the correct term for it?) with the h5u format?
У меча предназначения два острия, одно из них ты.

Заинтересованный занимается написанием прохождений
Прохождения]
НЕКРОМАНТ

2,3,4,5
Заинтересованный планирует создать серию мультиплеерных карт "Фантазия безумного картострителей".
Миссия 1 - Фктиф-Зобар готова на 11,5%
In reply to Заинтересованный
User Avatar
9 years ago
Auto-translated
Interested
I know it's a silly question, but could you tell me how to create a folder (or what is the correct term for it?) with the .h5u format?

.h5u is actually a standard .zip file.
С уважением, Psatkha (Псатха)

---------------------------------------------

Неудачное планирование ведёт к неудаче ...

NCF - мод, добавляющий дополнительных существ в HeroesV 3.1
User Avatar
9 years ago
Auto-translated
Hello. I have a question: Recently, I created a mod that changes the levels of succubi and demons. I modified the parameters in the GameMechanics folder, specifically the `4` line. I also changed the levels in the building settings, but when I launch the game, I get an error: "Creature#134 has no visual or it's missed." Can you tell me what I did wrong?
I'm attaching the GameMechanics folder to this message.
Attachments 1
1 file attached • Total size: 39.0 KB

Statistics

Welcome our newest member: recijeb