Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 4 - Lands of Axeoth > Thread: Research: Adding and Modifying creatures
Thread: Research: Adding and Modifying creatures
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted April 02, 2017 06:30 PM

Research: Adding and Modifying creatures

Adding creatures will be a great breaktrough for the game in general.
This is theoretical as it hasn't been done yet.
(the adding creatures. The modifying is easy as my Lich mod shows.)

We know creature abilities are hardcoded.
Which creature has what abilities is defined in the .exe, and as such ability number for creatures is static, and there is no code for this over 4. Abilities are edited by hex editing, switching one for the other, using their hexadecimal (byte).

Equilibris added some extra abilities for already existing creatures (but still not over four) like Orcs and Earth Elementals;

In 3.51 they did this by hex editing with jumps, using otherwise unused parts of heroes 4 code, and filling them with such creature code.

After the abilities list, there is another hex code listed by the creature: This is their "reference number".

Reference numbers are used by the game internal code to know which creature is which for gameplay purposes.


The creature "keyword" name is mostly used for retrieving aesthetic assets: The creature's graphics and sounds, which much use this keyword to work (that is why "devils" are "Devils" ingame, but their files list them as "archdevils")

________

To add a new creature, the next ingredients have to be met:

- Adding the hex code with abilities and unique creature number. Next creature would be numbered 74 and be the 75th (the last one from official Heroes is numbered 73 - actually the 74th because they start at 00)
In hex, the "73" looks as "49" (megadragon), so our next creature will be 4A.
This part is tricky because space in the .exe is already limited and it cannot be expanded, except with the .dll by expert programmers. But using empty space, this should be possible. Creature data seems to be read in a linear manner by the game code, sequentially from first to last. There is also a "00" byte dividing creature codes, which may or may not be usable to compress the section.

- Adding the keyword to the .exe
This seems easy enough. Unlike the Hex codes for abilities and creature number, this is a simple list which is done in plain text.

Those "00" are definitely unused spaces, and they even vary between the creatures. It's not unreasonable to think more can be introduced.

- Putting creature in table.
You have to make a new line in the creature table and fill all data.
This includes using the keyword you introduced at the .exe

- Use that keyboard to name all the creature's resources. THis includes:
* Adventure map sprite
* Combat sprite
* Sounds for actions (walk, attack, spellcast, etc.)

- Creature dwellings use the number (NOT the keyword) to identify which creature they actually recruit. This is true for both map dwellings and castle dwellings.

UNSOLVED QUESTIONS:
- How does the keywork get related with the number?
That is to say: How does the game know that creature "25" links with the keyword "Medusa"? It does not fit the pattern in the screenshot.
This, to me, is still a mystery, which seems important to solve.


- Even if you include all these things, will the game supoort it, or is there something else we are not seeing?
____________
Never changing = never improving

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
Baronus


Legendary Hero
posted April 20, 2017 08:26 AM
Edited by Baronus at 08:27, 20 Apr 2017.

1. In txt tables game has number eg 25 in txt tables. And for creature 25 game read 25 data line.
2. In exe file is area for creature 25, with 25 id number, with abilities. Game read this and ad abilities to statiscis, name and defs, sounds from txt.
I think thats all.
...

To add creature you must:
1. Add line 4A in txt tables.
2. Add area in exe with 4A id and abilities.
If you want new look.
3. Add new defs.
4. Add new sounds.
5. Add new move sequence.

Thats all I think.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted April 28, 2017 10:06 PM

Are you sure there is such number in text tables?

Text tables have empty lines,
and also introduction lines,
which do not correspond to the number of the creature.

(line 00 is not air elemental, for example... and also creatures not in order)

So, where is this creature number in the .txt ?
____________
Never changing = never improving

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
Baronus


Legendary Hero
posted April 28, 2017 10:30 PM
Edited by Baronus at 22:32, 28 Apr 2017.

Only one way is that game read it from creature name in txt tables. The same name as def and sound. Adding  name to number must be codded in exe file...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted April 29, 2017 01:37 PM

Sounds reasonable, yes, that must be what happens...
____________
Never changing = never improving

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
Baronus


Legendary Hero
posted April 29, 2017 06:49 PM

First column name is KEYWORD! It says all. Its keyword to exe file. Names are ,,numbers".

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
ReinePedauque
ReinePedauque


Adventuring Hero
faerie
posted August 22, 2019 11:11 AM

why so discontent with Mullich Productions? )

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0304 seconds