Modding manual for HoMM IV

For english-speaking users. Welcome!
Post Reply
User avatar
Mosqua
Level 1 Hero
Level 1 Hero
Posts: 6
Joined: Sun Aug 01, 2010 17:35

Modding manual for HoMM IV

Post by Mosqua »

Hi.

I know that you are modding-master. I succeeded only modify creature statistics, spellcost and descriptions. I (and many, many HoMM4 fans) please your - write easy manual modding.

I care about most:
- add and delete creature ability (e.g. add charge for nomads or delete regeneration for Dark Champions)
- create spellbook for creature (add new and modify old)
- change class skill for advanced class (e.g. Lifeward for Looter (Death+Tactics))
- change affiliation creature-building (e.g. recruitment Troglodite in Bandit_Lair)

PS.
Why do I write in english? My english is better than the russian. If not be answer i can write in russian.
User avatar
Dalai
Equilibris Core Team
Equilibris Core Team
Posts: 2797
Joined: Sat Apr 02, 2005 17:38
Contact:

Post by Dalai »

All of the above requires changing exe file. Do you have required skills?
Web-designer wanted. "Once a knight, always a knight, but once a King is once too often!" (c) Sir Bella of Eastmarch
User avatar
Mosqua
Level 1 Hero
Level 1 Hero
Posts: 6
Joined: Sun Aug 01, 2010 17:35

Post by Mosqua »

I have program to modification exe file (from University) and have skillcodes for creature, but i dont know how add and delete. How I insert 2 bytes to code, i hace message "Invalid data" - file exe is error.

I please your (as this is not problem) written manual modding or anything alike.
User avatar
Accolon
Level 24 Hero
Level 24 Hero
Posts: 2564
Joined: Mon Jul 04, 2005 03:07

Post by Accolon »

Mosqua
How I insert 2 bytes to code
Insert? You must overwrite bytes, not insert.
User avatar
Mosqua
Level 1 Hero
Level 1 Hero
Posts: 6
Joined: Sun Aug 01, 2010 17:35

Post by Mosqua »

@Accolon: if I overwrite bytes this I replace skill. Every skill have 2-bytes-code (6A xx). So I have to insert bytes, if i wanna add skill for creature (e.g. add charge for nomad).
User avatar
Accolon
Level 24 Hero
Level 24 Hero
Posts: 2564
Joined: Mon Jul 04, 2005 03:07

Post by Accolon »

Mosqua
You can't simply insert bytes to exe-file. All skill-records are fixed lenght and must contain no more than 4 fields. So if you wish add skill, you must replace/ overwrite "zero space". Otherwise you exe-file will be destroed (as a programm).

Example.

Code: Select all

N1_01 N1_02 ***** ***** N2_01 ***** ***** *****
N1_01 - first skill creature N1;
N1_02 - second skill creature N1;
***** - zero space;
N2_01 - first skill creature N2
***** - zero space.
In that case, you can add creature N1 no more, than 2 skills. And creature N2 - 3 skill.

Code: Select all

N1_01 N1_02 N1_03 ***** N2_01 ***** ***** *****
So, we add creature N1 skill N1_03 correctly, overwriting "zero space".

Code: Select all

N1_01 N1_02 N1_03 ***** ***** N2_01 ***** ***** *****
We insert N1_03 to exe-file and now exe-file is broken.
User avatar
Mosqua
Level 1 Hero
Level 1 Hero
Posts: 6
Joined: Sun Aug 01, 2010 17:35

Post by Mosqua »

Is problem...

E.g. Imp - E8 7C 07 00 00 6A 29 6A 19 6A 21 B9 F4 1B AB 00.

Bold type is skill creature. Red is close code. If I change to previous or next symbol or red code - I destroy exe file. I don't see another zero space.
User avatar
Accolon
Level 24 Hero
Level 24 Hero
Posts: 2564
Joined: Mon Jul 04, 2005 03:07

Post by Accolon »

Mosqua

Ok, I'm wrong. Sorry.
See manual. In russian, but program-code and other useful info in english.
Bold type (6A 29 6A 19) is skill creature
Sadly, this is not skill id, but asm-construction:

Code: Select all

6A29                         push        029
6A19                         push        019
So, if you wish add ability, you need to create small asm-programm for it. If you skilled enough in asm-programming, you can made it with manual's examples.
User avatar
Mosqua
Level 1 Hero
Level 1 Hero
Posts: 6
Joined: Sun Aug 01, 2010 17:35

Post by Mosqua »

Cпасиба! Cпасиба! Cпасиба!!!

And how to change the spellbook spellcasters?
And how to change bonus for advance class?
And how replace recruitment creature in town_buildings and creature_generator?

And this is all.
Post Reply