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 > MapHaven Guild > Thread: The H3M file format
Thread: The H3M file format
vedran
vedran

Tavern Dweller
posted June 12, 2005 03:02 PM

The H3M file format

Does anyone know anything about the H3M format, or a way to analyse its contents apart from HOMM editors?

My general idea is to implement advanced random map generation algorithms for HOMM3 in order to eliminate the need for those awkward templates, and to give the player a wide set of variable parameters to tailor his/her map.

Although the HOMM3 map editor is quite well built and has a lot of options, the random map generation is totally untransparent.

The only way to do this (apart from debugging the editor at runtime) is to be able to read and write data to H3M.

So I would be really grateful for any documentation, data and suggestions!

Thanks in advance!

--
Negus Nagast!

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


Supreme Hero
Supreme Noobolator
posted June 12, 2005 06:19 PM

Wellcome to the community

the original 3Do templates may look ackward and unballanced, i agree.But people nowdays gathered the skill to make templates of their own, who are more balanced and fun to play.If you want to do something about this, you could learn how the RMG file works and you could design a template of your own.These temlates made by H3 platers for H3 players keep this game alive for a while now and are IMHO the only way to keep this game chalanging.So i suggest you to visit the Library's table of contents to pearn more about this.

On a side note i didn't fully understand what you want to do, improuve the quality of the map editor or what?
____________

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


Admirable
Legendary Hero
ghost of the past
posted June 12, 2005 11:00 PM

This has been posted by numi:

Quote:
does anyone really know anything about the h3m format?

this is what i know: it's a gzipped format (just change extenstion from h3m to gz and you can use winzip to unzip it)

on a 1-level map that only has terrain added, the first 385 bytes seem to be a header and the last 257 seem to be a footer or something.

the data between this header and footer can be seperated into chunks of 7 bytes each to give a person a representation of the map with last 2 bytes of the 7 bytes seeming to be terrain type and subtype.

what i don't know:

does adding heroes, objects, underworld, etc alter the above data? are those last 257 bytes really a footer or do they serve some as-yet-unknown purpose.

where are text-strings stored? example: if i make an event that says "boo" where is 'boo' stored in h3m?

since i've only peeked into a 36x36 map, do the above numbers also apply to 72x72, 108x108, and 144x144 maps?

there's alot more i don't know, but i can't think of any of it right now. if someone could get good info on the h3m format, you could use this info to turn a picture (say a 36x36x24 bmp file) into a map.


Onion Knight replied:

Quote:
What about .snd files? Dragon Unpacker can open them and extract stuff but not replace.

____________

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

Tavern Dweller
posted June 13, 2005 10:27 AM

thanks!

this is precisely something i wanted to know.
it's funny how i didn't find that post already.. 'cause i've been searching a lot.

the idea is to make an entirely new stand-alone random map generator, since i don't believe in HOMM V, i find this idea worthwhile.

the key thing is gz. who would have thought of that?!

thanks again..

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


Admirable
Legendary Hero
ghost of the past
posted June 13, 2005 04:49 PM

Quote:

it's funny how i didn't find that post already.. 'cause i've been searching a lot.

It's not from this forum, but from Celestial Heavens.

P.S. Vedran, where do you come from?
____________

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

Tavern Dweller
posted June 13, 2005 05:43 PM

croatia.

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


Admirable
Legendary Hero
ghost of the past
posted June 13, 2005 10:13 PM

Quote:
croatia.


Yeah, I guessed by your name.

Dobrodosao na forum!
____________

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

Tavern Dweller
posted November 12, 2005 11:17 PM
Edited By: samiam on 12 Nov 2005

Quote:
Does anyone know anything about the H3M format, or a way to analyse its contents apart from HOMM editors?

My general idea is to implement advanced random map generation algorithms for HOMM3 in order to eliminate the need for those awkward templates, and to give the player a wide set of variable parameters to tailor his/her map.

Although the HOMM3 map editor is quite well built and has a lot of options, the random map generation is totally untransparent.

The only way to do this (apart from debugging the editor at runtime) is to be able to read and write data to H3M.

So I would be really grateful for any documentation, data and suggestions!

Thanks in advance!

--
Negus Nagast!


The trick is that an H3M file is compressed using the gzip compression algorithm (also called zlib).  To make the gibberish that is a H3 map readable binary data (where you can see the names of events with a hex editor, etc); put a .gz at the end of the file, then decompress it with winzip or gzip.

____________

 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.0230 seconds