MM7: Is there a way to extract map height maps and textures?

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).
dat_ugly_dude
Leprechaun
Leprechaun
Posts: 4
Joined: 18 Feb 2024

MM7: Is there a way to extract map height maps and textures?

Unread postby dat_ugly_dude » 09 Feb 2025, 22:53

Hi! Would anyone know whether there is a way to extract height information of the maps available in Might and Magic 7? Ideally: some information on how the maps are encoded, for example, if one wanted to modify the a part of the map.

Also, how are textures encoded in the map files, or - in other words - how does the engine know where to use which texture??

If not, any info on the map file format would help!

User avatar
DaveHer
Swordsman
Swordsman
Posts: 559
Joined: 13 Mar 2019

Re: MM7: Is there a way to extract map height maps and textures?

Unread postby DaveHer » 10 Feb 2025, 01:33

You need MMAchive to extra the textures and they are in Bitmaps.lod.

Tomsod
War Dancer
War Dancer
Posts: 391
Joined: 31 Jul 2020

Re: MM7: Is there a way to extract map height maps and textures?

Unread postby Tomsod » 10 Feb 2025, 04:14

For modifying maps you need MMExtension with MMEditor. In particular, height and texture indices of the current map can be accessed via console as Map.HeightMap and Map.TileMap respectively.

dat_ugly_dude
Leprechaun
Leprechaun
Posts: 4
Joined: 18 Feb 2024

Re: MM7: Is there a way to extract map height maps and textures?

Unread postby dat_ugly_dude » Today, 10:17

Thank you for the responses! I could extract the height map of the Emerald Island in the following way:

1. I installed the Grayface's patch, then extracted MMExtension to the directory with the .exe files.
2. Start a new game.
3. On the island, open up the debug menu: Ctrl+F1.
4. Run a very simple script, just dumping the map table:

Code: Select all

map_file = io.open("emerald_height_map.txt", "w")
for k in Map.HeightMap do
  for j in Map.HeightMap[k] do
    map_file:write(Map.HeightMap[k][j], " ")
  end
  map_file:write("\n")
end
map_file.close()
and I've got a file in the .exe location "emerald_height_map.txt" with the (sort of expected) contents: 128x128, mostly zeroes (water), but the island looks reasonable:

Image


Return to “Might and Magic”

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests