====== Heroes of Might and Magic file formats ====== ===== General remarks ===== It is worth noting that HoMM I, II and III share quite a lot of general characteristics regarding data files - both their layout and internal structure. While they are different in detail, the idea remains essentially the same and knowing one set of formats makes learning the rest very easy. All the formats are quite simple and logical, except maybe saved games, that, especially in HoMM III, look like some form of automated object serialization rather than a proper file format - which is expected, however unfortunate. All HoMM files use [[http://en.wikipedia.org/wiki/Endianness|little-endian]], [[http://en.wikipedia.org/wiki/Two's_complement|two's complement]] number format for integers, at least in the x86 game versions - that might not be the case for the Mac OS version of HoMM I (bi-endian architecture), Mac OS and RISC OS (most likely big-endian) version of HoMM II and Mac OS and Dreamcast (probably big-endian too) versions of HoMM III. GameBoy Color versions of HoMM I and II should be little-endian, as is the Z80 processor clone used in GBC. However, this is all just guessing - if you happen to have such a rare version of HoMM, please [[:contact]] me, I'd be really interested in its inner workings. As a side note, I dare to say that the small group of people working on WoG, H3DefTool, DefMaker, DefView and ResEdit should feel ashamed for their complete lack of cooperation with anyone willing to improve their tools. I'd praise them for their involvement in reverse engineering HoMM3, but looking at how mediocre and unwieldy the tools they released for the public are and how impossible it is for anyone with a clue about user interface design to make them any better, I just can't. NOTE: writing decent descriptions of file formats takes as much time as actually researching them, if not more, so what you see below is just what I manage to write in my free time, not what I actually know about HoMM files, which is quite a bit more. I'll try to add a description every couple of days, but some might take a bit longer (especially maps). Just be patient. ===== HoMM1 ===== Stay tuned, I'm working on that... ===== HoMM2 ===== As above. Links: [[http://rewiki.regengedanken.de/wiki/Heroes_of_Might_and_Magic_II|quite a lot of information about HoMM2 file formats]] ===== HoMM3 ===== [[HoMM3 files layout]] [[HoMM3 LOD archives]] [[HoMM3 VID archives]] [[HoMM3 SND archives]] [[HoMM3 PCX graphics]] [[HoMM3 DEF animations]] [[HoMM3 H3M map files]] Links: [[http://modhomm3.free.fr/help_pcxfiles.htm|PCX description, sort of]]; [[http://modhomm3.free.fr/help_lodfiles.htm|LOD archives]]; [[http://forum.df2.ru/index.php?showtopic=2733|Quite a bit of file-related inner workings of the game (warning: in russian)]]