Browse Community

Dungeon Master Nexus MNS files

MNS files

Study of OBAKE.MNS

0000  dword 'DMDF'
0004  dword Block size = File size
0008  dword Always 0001h
000C  dword Always 0001h
0010  dword Always 0000h
0014  dword Always 0000h
0018  dword Always 0000h
001C  dword Always 0034h. Offset of first Structure3DJoint (right after file header)
0020  dword Offset of 'MOTN' section
0024  dword Offset of 'TEXT' section
0028  dword Count of Structure3DJoint
002C  dword
0030  dword

0034 Structure3DJoint (52 bytes)
  0000  dword 0-based index to 3DJoint# in StrucMotnFrame.
  0004  dword
  0008  dword
  000C  dword Joint's relative X (signed int32 origin_x)
  0010  dword Joint's relative Y (signed int32 origin_y)
  0014  dword Joint's relative Z (signed int32 origin_z)
  0018  dword Offset of single StrucMeshDesc
  001C  dword Offset of next sibling Structure3DJoint.  No sibling if 0.
  0020  dword Offset of first child Structure3DJoint.  No children if 0.
  0024  dword
  0028  dword
  002C  dword
  0030  dword

02EC StrucMeshDesc (24 bytes)
  0000  dword ? (00 00 01 00)
  0004  word Count of Struc3DCoord  (12)
  0006  word Count of StrucFace (10)
  0008  dword Offset of first Struc3DCoord (016Ch)
  000C  dword ? (0)
  0010  dword Offset of first StrucFace (01FCh)
  0014  dword ? (274h)

016C Struc3DCoord (12 bytes per struc)
  0000  dword X Position (signed int32)
  0004  dword Y Position (signed int32)
  0008  dword Z Position (signed int32)

01FC StrucFace (12 bytes per struc)
  0000  word Index of 1st Vertex
  0002  word Index of 2nd Vertex
  0004  word Index of 3rd Vertex
  0006  word Index of 4th Vertex  (3rd=4th if Triangle, otherwise Quad)
  0008  word 
  000A  word Misc: 0x8000=Texture-flip-y, 0x4000=flip-x, LOBYTE=TextureIndex

0B20 'MOTN' section (StrucMotnHeader)
        0000  dword 'MOTN'
        0004  dword Size of MOTN. 5A8h
        0008  dword Number of tables offsets. 3
        000C  dword Number of 3DJoints (or meshes). 6
        0010  dword Offset of table 1
        0014  dword Offset of table 2
        0018  dword Offset of table 3
        001C  dword 00000000h Marks the end of the list of table offsets
        0020  Table 1   7 increasing offsets + FFFFFFFFh  (each table is ended by either FFFFFFFFh or 00000000h)
        0040  Table 2   8 increasing offsets + 00000000h
        0064  Table 3   4 increasing offsets + FFFFFFFFh

Table 1 data
relative-offset=78h, length=44h
	0019 0000 0000 0000 0000 0000 0000 7333 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
relative-offset=BCh, length=44h
	000f 0000 0000 0000 0000 0000 0000 7333 0000 0000 016c 0000 0000 0000 0222 0000 0000 0000 f1c7 0000 0000 0000 f1c7 0000 0000 0000 fc71 0000 0000 0000 fc71 0000 0000 0000 
relative-offset=100h, length=48h
	0019 0002 0000 0044 0000 0000 0000 7333 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0384 ff00 
relative-offset=148h, length=44h
	000f 0000 0000 0000 0000 0000 0000 7333 0000 0000 016c 0000 0000 0000 0222 0000 0000 0000 f1c7 0000 0000 0000 f1c7 0000 0000 0000 fc71 0000 0000 0000 fc71 0000 0000 0000 
relative-offset=18ch, length=48h
	0019 0002 0000 0044 0000 0000 0000 7333 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0384 ff00 
relative-offset=1d4h, length=44h
	000f 0000 0000 0000 0000 0000 0000 7333 0000 0000 016c 0000 0000 0000 0222 0000 0000 0000 f1c7 0000 0000 0000 f1c7 0000 0000 0000 fc71 0000 0000 0000 fc71 0000 0000 0000 
relative-offset=218h, length=4ch
	0028 0003 0000 0044 0000 0000 0000 7333 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0003 84ff 0019 0000 


Table 2 data
00 19 00 00 00 00 00 00 00 00 00 00 00 00 73 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
etc... until end of MOTN item


Table 1 data example (StrucMotnFrame):

0B98 StrucMotnFrame (20 bytes +by Flags +8 bytes per 3DJoint in StrucMotnHeader)
  0000  word Frame's relative duration time. 30fps?  (0019)
  0002  word Flags. (0000)
                    length+=4 if Flags=2.
                    length+=8 if Flags=3.
                    length+=12 if Flags=4.
                    length+=12 if Flags=5.
  0004  word (0000)
  0006  word (0000)
  0008  word (0000)
  000A  word (0000)
  000C  word (0000)
  000E  word (7333)
  0010  word (0000)
  0012  word (0000)
  0014  signed word (0000) 3DJoint#0  Relative-rotation-x
  0016  signed word (0000) 3DJoint#0  Relative-rotation-y
  0018  signed word (0000) 3DJoint#0  Relative-rotation-z
  001A  word (0000) ?
  001C  signed word (0000) 3DJoint#1  Relative-rotation-x
  001E  signed word (0000) 3DJoint#1  Relative-rotation-y
  0020  signed word (0000) 3DJoint#1  Relative-rotation-z
  0022  word (0000) ?
  0024  signed word (0000) 3DJoint#2  Relative-rotation-x
  0026  signed word (0000) 3DJoint#2  Relative-rotation-y
  0028  signed word (0000) 3DJoint#2  Relative-rotation-z
  002A  word (0000) ?
  002C  signed word (0000) 3DJoint#3  Relative-rotation-x
  002E  signed word (0000) 3DJoint#3  Relative-rotation-y
  0030  signed word (0000) 3DJoint#3  Relative-rotation-z
  0032  word (0000) ?
  0034  signed word (0000) 3DJoint#4  Relative-rotation-x
  0036  signed word (0000) 3DJoint#4  Relative-rotation-y
  0038  signed word (0000) 3DJoint#4  Relative-rotation-z
  003A  word (0000) ?
  003C  signed word (0000) 3DJoint#5  Relative-rotation-x
  003E  signed word (0000) 3DJoint#5  Relative-rotation-y
  0040  signed word (0000) 3DJoint#5  Relative-rotation-z
  0042  word (0000) ?

* Rotation unit is still unknown. It is **approximately**: value ÷ 150.0 → degree unit [°].

     738h Padding 'AA' bytes

1800 'TEXT' section
        0000 dword 'TEXT'
        0004 dword Size of TEXT. 23B0h
End Of file






'TEXT' content
54 45 58 54 
00 00 23 B0 

00 00 00 06 

00 00 00 00 00 00 00 00 00 00 00 00 

00 00 00 B0 

00 00 00 24 00 00 00 00 
                                    | Offsets |
00 00 00 A8 00 00 00 20 00 20 00 00 00 00 00 B0 00 00 00 00 
00 01 00 A8 00 00 00 20 00 20 00 00 00 00 08 B0 00 00 00 00 
00 02 00 A8 00 00 00 20 00 20 00 00 00 00 10 B0 00 00 00 00 
00 03 00 A8 00 00 00 20 00 20 00 00 00 00 18 B0 00 00 00 00 
00 04 00 A8 00 00 00 08 00 18 00 00 00 00 20 B0 00 00 00 00 
00 05 00 A8 00 00 00 08 00 18 00 00 00 00 22 30 00 00 00 00 
FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Bitmap images. 2 bytes per pixel, color encoded like in palettes.