[HoMM5] Modding for Dummies

Mods and development for mods. Including WoG & Equilibris (RU) subforums.
User avatar
EliteKill
Peasant
Peasant
Posts: 66
Joined: 25 Dec 2006
Location: Somewhere in.... erm, somewhere...

[HoMM5] Modding for Dummies

Unread postby EliteKill » 01 Jan 2007, 17:54

Table of Contents

1 Introduction
1.1 What is a mod?
1.2 How do I install/uninstall a mod?
1.3 What programs do I need and where do I get them?

2 Data Modding
2.1 Where is my Heroes5/data folder?
2.2 What files should I change?
2.3 I changed the file, but when I play nothing is different!

3 Modifying Creatures
3.1 Where are the creature stats stored?
3.2 How do I change the creature's stats?
3.3 How do I change the creature's cost?
3.4 Other stuff you can change.

4 Modifying Texts
4.1 How do I change the creature name?
4.2 How do I change the hero name?
4.3 How do I change the creature description?
4.4 How do I change the hero biography?

5 Adding Abilities/Spells to Creatures
5.1 How do I add abilities to creatures?
-5.1.1 How do I add an ability to a creature that doesn't have any?
5.2 How do I add mana to creatures?
5.3 How do I add the "Caster" ability in the Abilities Description?

6 Animations
6.1 When I give a creature a spell and try it in the game the animation is broken. What to do?
6.2 How do I make my own animation?

7 .pak Files
7.1 What should I put in the .pak files?
7.2 What should I post on the forums?

8 Texture Modding*
8.1 Where are the Texture files?
8.2 Why is the image all messed up?

9 FAQ*
9.1 General Questions
9.2 Data Modding Questions
9.3 Texture Modding Questions

*In Progress

NOTE: BEFORE STARTING, MAKE A BACKUP OF EVERYTHING!!!

1 Introduction

1.1 What is a Mod?

A mod is a file that changes the game. People make mods because they want to improve the game, ad stuff to the game, or balance the game.

1.2 How do I Install/Uninstall a Mod?

To install a mod, just take the .pak file and insert it in your Heroes5/data folder. To uninstall a mod, just delete the .pak file from the folder.

1.3 What programs do I need and where do I get them?

You need the following programs (those are the ones I use):

Notepad: You get it with windows XP

Audacity: Audacity (This is only for changing auduio files)

WinRAR: WinRAR
Last edited by EliteKill on 20 Jan 2007, 14:55, edited 2 times in total.

User avatar
EliteKill
Peasant
Peasant
Posts: 66
Joined: 25 Dec 2006
Location: Somewhere in.... erm, somewhere...

Unread postby EliteKill » 01 Jan 2007, 17:55

2 Data Modding

2.1 Where is my Heroes5/data folder?

Your Heroes5/data folder is in your game directory.

2.2 What files should I change?

You should extract your data.pak folder and text.pak folders. The changes are made in these files.

2.3 I changed the file, but when I play nothing is different!

If the folders are not in a .pak file, than put the folders you changed in your Heroes5/data folder.

3 Modifying Creatures

3.1 Where are the creature stats stored?

The creature stats are stored in GameMechanics\Creature\Creatures\*Town*\*Creature*.xdb. XDB files can be opened using Notepad.
NOTE: TO CHANGE SOMETHING, FIRST SELECT ALL FOLDERS, RIGHT CLICK AND SELECT PROPERTIES, AND UNCHECK THE "READ ONLY" OPTION.

3.2How do I change the creature's stats?

Go to its .xbd file (see 3.1) and change it.
EXAMPLE: We want to change the Titan's stats. We go to GameMechanics\Creature\Creatures\Academy\Titan.xdb and look for the part with the stats. It should look like this:

Code: Select all

	<AttackSkill>30</AttackSkill>
	<DefenceSkill>30</DefenceSkill>
	<Shots>10</Shots>
	<MinDamage>40</MinDamage>
	<MaxDamage>80</MaxDamage>
	<Speed>6</Speed>
	<Initiative>10</Initiative>
	<Flying>false</Flying>
	<Health>190</Health>
We can change the Attack of Titans by changing the 30 in <AttackSkill>30</AttackSkill> to any other number. Same goes with every other part except the <Flying>false</Flying> one. In this one, we can change the "false" to "true" and then the titan will fly (just like dragons).

3.3 How do I change the creature's cost?

In the same file we used in 3.2, press Ctrl+F to open the "Find" window. Type <Cost> and it will go down to a part where you change the cost of a creature. EXAMPLE: We are going to use the titan for every example from now on. The Titan's cost part looks like this:

Code: Select all

	<Cost>
		<Wood>0</Wood>
		<Ore>0</Ore>
		<Mercury>0</Mercury>
		<Crystal>0</Crystal>
		<Sulfur>0</Sulfur>
		<Gem>2</Gem>
		<Gold>4700</Gold>
	</Cost>
Let's say we want to make the Titan cost 1000 Gold and 5 Wood instead of 4700 Gold and 2 Gems. We need to change the 4700 in the <Gold>4700</Gold> part to 1000, the 2 in the <Gem>2</Gem> to 0, and the 0 in the <Wood>0</Wood> to 5. Now the Titan will cost 1000 Gold and 5 Wood.

3.4 Other stuff you can change.

You can change other stuff than just the stats and cost. EXAMPLE: We want to make the Titan's Weekly Growth 4 instead of 1 and its Elements Fire andd Earth instead of Air and Water. To change the Weekly Growth, we search for a part that looks like this

Code: Select all

<WeeklyGrowth>1</WeeklyGrowth>
and change the 1 to 4. To change the Elements, we look for this part :

Code: Select all

	<MagicElement>
		<First>ELEMENT_AIR</First>
		<Second>ELEMENT_WATER</Second>
	</MagicElement>
and change the AIR to Fire and the WATER to EARTH. You can also add abilities and spells, but that will be explained in the next section.
Last edited by EliteKill on 01 Jan 2007, 17:58, edited 1 time in total.

User avatar
EliteKill
Peasant
Peasant
Posts: 66
Joined: 25 Dec 2006
Location: Somewhere in.... erm, somewhere...

Unread postby EliteKill » 01 Jan 2007, 17:56

4 Modifying Texts

4.1 How do I change the creature name?

The text file for creature names is found in Text\Game\Creatures\*Town*\*Creature*.txt so just change it with notepad, save, and play.

4.2 How do I change the hero name?

Same as 4.1, but the files are found here: Text\Game\Heroes\Persons\*Town*\*Hero*\Name.txt

4.3 How do I change the creature description?

The files are in Text\Game\Creatures\*Town*\*Creature*Description.txt so change, save, and play. To change the Ability Description (not the ability, but what's written when you right click a monster) the files are in Text\Game\Creatures\*Town*\*Creature*Abilities.txt so again, change, save, and play.

4.4 How do I change the hero biography?

You probably got the idea. Files in Text\Game\Heroes\Persons\*Town*\*Hero*\Bio.txt

5 Adding Abilities/Spells to Creatures

5.1 How do I add abilities to creatures?

Go to the creature's xdb file. For the example we are going to give the Titan the Chain Lightning spell. So open the xdb file and search for this part:

Code: Select all

<KnownSpells>
and under it there is something that looks like this:

Code: Select all

		<Item>
			<Spell>SPELL_ABILITY_CALL_LIGHTNING</Spell>
			<Mastery>MASTERY_ADVANCED</Mastery>
		</Item>
This is the code that gives Titans the Call Lightning ability. Notice that it's called SPELL_ABILITY_CALL_LIGHTNING and that is because it is considered as a spell and needs to be acticated in combat, unlike Life Drain of Rebirth. The abilities that are considered spells are called Spell Abilities, and these are the ones you're going to learn to add/change/remove in this guide.
So now we'll go to the spell directory to look at Chain Lightning, which is found here: C:\Documents and Settings\Yonathan\Desktop\GameMechanics\Spell\Combat_Spells\DestructiveMagic\Chain_Lightning_Hit.xdb. For any other spell, use this: C:\Documents and Settings\Yonathan\Desktop\GameMechanics\Spell\Combat_Spells\*School*\*Spell*.xdb.
Now open the Chain Lightning xdb file and at the top you should see this:

Code: Select all

<TableID>SPELL_CHAIN_LIGHTNING</TableID>
This is the ID for the spell. Now back in the Titan file, paste this:

Code: Select all

		<Item>
			<Spell>SPELL_CHAIN_LIGHTNING</Spell>
			<Mastery>MASTERY_EXPERT</Mastery>
		</Item>
This gives Titans the ability to cast Chain Lightning. To put other spells use this:

Code: Select all

		<Item>
			<Spell>SPELL_*Spell ID*</Spell>
			<Mastery>MASTERY_*Mastery*</Mastery>
		</Item>
Change the *Spell ID* to the ID that's in the spell xdb file and the *Mastery* to the wanted mastery ( None, Basic, Advanced, Expert), than save and play.
Adding abilities is the same as spells, but IDs are in GameMechanics\Spell\Creature_Abilities\*Town*\*Ability* and the part to put in the creature xdb is:

Code: Select all

		<Item>
			<Spell>SPELL_ABILITY_*Ability ID*</Spell>
			<Mastery>MASTERY_*Mastery*</Mastery>
		</Item>
In *Ability ID* put the ID from the xdb file and in *Mastery* put the mastery. Usually the mastery for abilities is Advanced.

-5.1.1 How do I add an ability to a creature that doesn't have any?
If a creature doesn't have any abilities, than instead of this:

Code: Select all

	<KnownSpells>
		<Item>
			<Spell>SPELL_*Ability/Spell*</Spell>
			<Mastery>MASTERY_*Mastery*</Mastery>
							   </Item>
	</KnownSpells>
You'll have this:

Code: Select all

<KnownSpells/>
So all you have to do is change this what you have to this:

Code: Select all

	<KnownSpells>
		<Item>
			<Spell>SPELL_*Ability/Spell*</Spell>
			<Mastery>MASTERY_*Mastery*</Mastery>
							   </Item>
	</KnownSpells>
Remember that you can add more spells/abilities.

NOTE: WHEN ADDING ABILITIES AND/OR SPELLS, REMEMBER THE <Item> IN THE BEGINNING AND </Item> IN THE END OR ELSE THE GAME WON'T WORK!!!

5.2 How do I add mana to creatures?

If you add spells, you also need to add mana so the spells can be cast. For the example, we'll ad 15 mana to our Titans. Open the xdb file and look for this:

Code: Select all

	<SpellPoints>0</SpellPoints>
	<SpellPoints1>0</SpellPoints1>
	<SpellPoints2>0</SpellPoints2>
Change the 0 in <SpellPoints>0</SpellPoints> to 15. I have no idea what the other teo are for.

5.3 How do I add the "Caster" ability in the Abilities Description?

This is very simple. Go to Text\Game\Creatures\*Town*\*Creature*Abilities.txt and add the word Caster with a space behind it and a period after. Save and play.
Last edited by EliteKill on 01 Jan 2007, 17:59, edited 1 time in total.

User avatar
EliteKill
Peasant
Peasant
Posts: 66
Joined: 25 Dec 2006
Location: Somewhere in.... erm, somewhere...

Unread postby EliteKill » 01 Jan 2007, 17:56

6 Animations

6.1 When I give a creature a spell and try it in the game the animation is broken. What to do?

This is a common problem. The problem is that when you give a non-caster creature the ability to cast, there is no animation for the casting ability. But there is a way to fix this. In the example we are going to fix it with the Titan, which currently looks like he's a cross. Go to _(AnimSet)\Creatures\Academy\Titan-areana.(AnimSet)xdb which is the Titan's animation xdb file. Between <animations> and </animations> you need to add the animation. Now here we are going to have two options. If you want the Titan to start a ranged attack and then cast the spell, add this:

Code: Select all

		<Item>
			<Kind>cast</Kind>
			<Anim href="/Titan-arena-rangeattack.xdb#xpointer(/BasicSkelAnim)"/>
		</Item>
If you want him to do the Call Lightning animation, add this:

Code: Select all

		<Item>
			<Kind>cast</Kind>
			<Anim href="/Titan-arena-specability.xdb#xpointer(/BasicSkelAnim)"/>
		</Item>
What we just did is tell the game to do the Call Lightning/range attack animation (the <Anim href="/*"/> part) when casting spells (<Kind>cast</Kind>). You can do this to every creature, but use the animations in its own *Creatur*-arena.(AnimSet)xdb file and copy paste the <Anim href="/*"/> under the <Kind>cast</Kind>. Remember the <Item> and </Item>.

6.2 How do I make my own animation?

Unfortunatly, I don't know how so sorry.

7 .pak Files

7.1 What should I put in the .pak files?

You put everything that you modifyed or used in the modifyed files. Examples: If you just changed the speed of Titans, you will only put the GameMechanics folder, in it only the Creature folder, in it only the Creatures, folder, in it only the Academy folder, and in it only the Titan.xdb file. If you also gave the Titan Chain Lightning and changed the animation, you will do the same things with the Chain_Lightning_Hit.sdb file and the Titan-arena.(AnimSet).xdb file.

7.2 What should I post on the forums?

You should put the .pak file in a .zip folder with a readme file stating that you made it and what it does along with installing instructions.

The End

Well I hope this helped. I'm no that good with modding so if there is something unanswered, confusing, or that I don't know, please tell me.

EliteKill

User avatar
EliteKill
Peasant
Peasant
Posts: 66
Joined: 25 Dec 2006
Location: Somewhere in.... erm, somewhere...

Unread postby EliteKill » 20 Jan 2007, 14:55

*This post is for sections 8 and 9*

User avatar
Wulfstan8182
Conscript
Conscript
Posts: 220
Joined: 27 Oct 2007
Location: The Heroes Round Table

Unread postby Wulfstan8182 » 08 Nov 2007, 03:36

Wow dude you should make a "for Dummies" book on that add pictures and stuff and publish it to make money LOL :lol:
:hanged: <--- You're the guy hanged if you ever dare to touch my blacksmith!

User avatar
aning99
Leprechaun
Leprechaun
Posts: 1
Joined: 11 May 2009

How to Mod HOMM 4?

Unread postby aning99 » 12 May 2009, 05:20

How do I mod HOMM4 how?

User avatar
vladimir-maestro
Genie
Genie
Posts: 1034
Joined: 19 Jun 2008

Unread postby vladimir-maestro » 06 Oct 2009, 17:55

Hello to the authors!
Want to ask - may I use the information from this article for the mm-games site?
You can contact me here:
maestro_mod@yahoo.com
vladud @ yandex.ru - preferred one
---
Site about MODs: http://www.mmgames.ru
---
if you wish to upload some materials for this site - let me know.

User avatar
dark raider
Pixie
Pixie
Posts: 140
Joined: 03 Jan 2006

problem!!!

Unread postby dark raider » 25 Nov 2009, 22:59

hey a question... I did all the things you have written...i unzipped the two pak files into the heroes folder.... however..when I after I had changed the stats and given creatures new abilities and spells...the game would not run...I game with and error..something about...creature 152 did not have...something....and it just would not run..it shuts the game down right away...am I doing something wrong???? ;|

User avatar
parcaleste
Pit Lord
Pit Lord
Posts: 1207
Joined: 06 Nov 2007
Location: Sofia - Vulgaria

Unread postby parcaleste » 10 Nov 2013, 12:04

(kinda Indian in this) Can I modify artifacts and where to find the text file to do this?

User avatar
Kalah
Retired Admin
Retired Admin
Posts: 20078
Joined: 24 Nov 2005

Unread postby Kalah » 25 Nov 2013, 14:57

parcaleste wrote:(kinda Indian in this) Can I modify artifacts and where to find the text file to do this?
Any answer on this?
In War: Resolution, In Defeat: Defiance, In Victory: Magnanimity, In Peace: Goodwill.

User avatar
parcaleste
Pit Lord
Pit Lord
Posts: 1207
Joined: 06 Nov 2007
Location: Sofia - Vulgaria

Re: [HoMM5] Modding for Dummies

Unread postby parcaleste » 29 Sep 2018, 13:55

Hello, guys.

Haven't done this in a WHILE. Reinstalled my Windows some time ago. Now when I try to open a file to edit I see monkeys and sh#t. I kinda remember that there was something with Windows opening the files, something with the (en)coding or whatever, but can't remember how to adjust it.

Can someone help, please?


Return to “Modcrafting Guild”

Who is online

Users browsing this forum: No registered users and 1 guest