Braindead's Mordor Site

Personal tools

Mordor 2: Dungeon File Format

From Braindead's Mordor Site

Jump to: navigation, search

Mordor 2 v.0992b dungeon is stored in M2BetaDungeon.mdr instead of the usual mdata11.mdr for previous versions. This version did ship with mdata11.mdr file, but that file is not even loaded by the game.

Contents

M2BetaDungeon.mdr format

Header - terminates after dungeon offsets

 6 bytes - Version string (0.992b)
 2 bytes - Number of dungeon levels
 2 bytes - Size X of the map
 2 bytes - Size Y of the map
 4 bytes - Number of unique areas in the dungeon - These many Area Records follow the Level Data.

Repeated Number of dungeon level times

 4 bytes - Byte Offset in file for level X

Level data: = Level Header + Cell records: repeated number of level times

Level Header:

 8 bytes - literal string "TEST" followed by 4 spaces
 2 bytes - Size X of the level
 2 bytes - Size Y of the level
 2 bytes - Level number
 4 bytes - unknown (possibly number of areas)
 2 bytes - unknown
 1 byte - unknown
 165 bytes - Level Description string ( ex: TEST MAZE LEVEL 1 surrounded by spaces)

CellRecords - repeat number of cell times (Level SizeX * Level Size Y) = 2025 for 45x45

CellRecord: size 17 bytes

 2 bytes - unknown
 2 bytes - unknown
 2 bytes - unknown
 2 bytes - unknown
 2 bytes - unknown
 2 bytes - unknown
 2 bytes - unknown
 2 bytes - AreaIndex in AreaRecords
 1 byte - unknown

AreaRecords: 20 bytes each - Number of them is specified in the file header

File ends after the AreaRecords

This page was last modified 01:17, 18 June 2010.  This page has been accessed 3,080 times.  Disclaimers 
Copyrights And Credits