Heroes of Might and Magic II
Edit: As of 20th February 2010, this information is grossly outdated and I will make every effort to update it in the near future.
Heroes of Might and Magic II Reverse Engineering
Recently, I’ve been trying to work out how the main files to Heroes of Might and Magic II (HoMMII) work.
If anybody has any information on any of the formats, please contact me.
Game Archive File: .AGG
I am able to unpack all files from a HoMMII type AGG game archive file.

There are the following file types in an AGG file:
- 82M (Raw Wave Sound files)
- BIN (?)
- BMP (? Not a typical Microsoft Bitmap file)
- FNT (? Not a typical Microsoft Font file)
- ICN (Sprite Archives)
- TIL (?)
- XMI (Miles Sound System eXtended MIDI File)
Here is what I know about each of the file formats so far:
Raw Wave Sound Files: .82M
The .82M files can be played with any sound editor capable of reading raw wave data at a rate of 22050Hz / 8-Bit Unsigned / Mono.
I am now able to output the raw data as a standard Windows PCM Wave file.
Bin Files: .BIN
Unknown
BMP Files: .BMP
Unknown
FNT Files: .FNT
Unknown
Sprite Archives: .ICN
I’ve been creating a small application to read .ICN files and have made significant progress:


There are still quite a few unknown control codes as well as pallete colours I have yet to discover.
Til Files: .TIL
Unknown
Music Files: .XMI
XMI files are similar to standard MID files and can typically be converted to MID
There are also certain files that exist outside of the main AGG game archive files:
- MP2 / MX2 (Map files)
Map Files: .MP2 / .MX2
I’ve made decent progress with the HoMMII map file format, especially regarding the basic tile type, such as Grass, Ice, Swamp, etc.
I created a small Visual Basic demonstration application to test my findings.

Although I can distinguish the different tile types (Grass, Ice, Swamp, etc) I am unable to distinguish the various tile items that add shading detail to the mini-map (e.g. mountains, trees, etc).
Downloads
Extraction utility for reading the contents of Heroes of Might and Magic I AGG game archive files.
Heroes 1 AGG Extractor / Reader
Extraction utility for reading the contents of Heroes of Might and Magic II AGG game archive files.
Heroes 2 AGG Extractor / Reader
(Last updated: 4th Jan 2008)
could you explain to me how to edit creature statistics and building costs and other variables like that?
i want to balance the game out as certain aspects are fairly strong when used in certain ways..
I don’t actually have much knowledge of this particular area of HoMMII. I get the feeling that stuff would be in the executable, however, but don’t go quoting me on that.
Try searching for the names of the creatures and look for numbers that match their statistics. I’ll try this myself if I get time and report on my HoMMII page
I was digging through some old files on a cleanup and I happened to come across something that I forgot all about!
I vaguely recall digging through the main executable for the game and this is what I figured out on my cursory glance at the time.
It’s pretty bare information, but you should be able to find reference to “titn”, which for me lies at offset 985243 (0xF089B) for Heroes II Gold v2.1.
I might pick this up again soon if I can find the time. I also can’t verify that it’s 100%, but I would have modified data and then checked the results in-game, so it should be okay.
would you know anything about starting hero secondary abilities?
for example, making Sorceress start with something other than Navigation?
some_guy: See http://www.celestialheavens.com/forums/viewtopic.php?t=5659 . UndeadHalfOrc has already done work in that area.