Vagrant Story/MPD files: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
mNo edit summary
m (Xkeeper moved page Vagrant Story:MPD files to Vagrant Story/MPD files: normalize subpages and titles)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Map Data
{{subpage|game=Vagrant Story}}


  $0 4 pointer to [room section]
MPD files store all map data of a single room, i.e. geometry, enemies, doors, and so on. Textures are not part of the MPD, instead they are stored in the [[Vagrant Story:ZND files|ZND files]].
$4 4 lenght of section
 
$8 4 pointer to [section 2]
== File Format ==
$c 4 lenght of section
 
$10 4 pointer to [section 3]
  MPD_HEADER =======================================
$14 4 lenght of section
$0 4 ptrRoomSection
$18 4 pointer to [section 4]
$4 4 lenRoomSection
$1c 4 lenght of section
$8 4 ptrClearedSection
$20 4 pointer to [enemies section]
$C 4 lenClearedSection
$24 4 lenght of section
$10 4 ptrScriptSection
$28 4 pointer to [chest section]
$14 4 lenScriptSection
+ [room section]
$18 4 ptrDoorSection
+ [section 2]
$1C 4 lenDoorSection
+ [section 3]
$20 4 ptrEnemySection
+ [section 4]
$24 4 lenEnemySection
+ [enemies section]
$28 4 ptrTreasureSection
$2C 4 lenTreasureSection
   
   
  + chest section
  + RoomSection ====================================
+RoomHeader
+$00 4 lenGeometrySection
+$04 4 lenCollisionSection
+$08 4 lenSubSection03
+$0C 4 lenDoorSection
+$10 4 lenLightingSection
  +$14 4 lenSubSection06
  +$18 4 lenSubSection07
+$1C 4 lenSubSection08
+$20 4 lenSubSection09
+$24 4 lenSubSection0A
  +$28 4 lenSubSection0B
  +$2C 4 lenTextureEffectsSection (Fire, SavePoints, ExitArrows etc)
+$30 4 lenSubSection0D
+$34 4 lenSubSection0E
+$38 4 lenSubSection0F
+$3C 4 lenSubSection10
+$40 4 lenSubSection11
+$44 4 lenSubSection12
+$48 4 lenSubSection13
+$4C 4 lenAKAOSubSection (Audio)
+$50 4 lenSubSection15
+$54 4 lenSubSection16
+$58 4 lenSubSection17
+$5C 4 lenSubSection18
+ GeometrySection (Polygon groups)
+$00 4 numGroups
for (numGroups)
+$00 $40 GroupHeaderStructure
for (numGroups)
+$00 4 numPoly3gts
+$04 4 numPoly4gts
for (numPoly3gts)
+$00 2 p1x
+$02 2 p1y
+$04 2 p1z
+$06 1 p2x ( Relative to p1 )
+$07 1 p2y ( Relative to p1 )
+$08 1 p2z ( Relative to p1 )
+$09 1 p3x ( Relative to p1 )
+$0A 1 p3y ( Relative to p1 )
+$0B 1 p3z ( Relative to p1 )
+$0C 1 r1
+$0D 1 g1
+$0E 1 b1
+$0F 1 type // 52|54 => triangle. 60|62 => quad. maybe doublesided?
+$10 1 r2
+$11 1 g2
+$12 1 b2
+$13 1 u3
+$14 1 r3
+$15 1 g3
+$16 1 b3
+$17 1 v3
+$18 1 u1
+$19 1 v1
+$1A 2 texelMask ( Controls texel transparency )
+$1C 1 u2
+$1D 1 v2
+$1E 2 idTexture ( Changes value at runtime )
for (numPoly4gts)
+$00 2 p1x
+$02 2 p1y
+$04 2 p1z
+$06 1 p2x ( Relative to p1 )
+$07 1 p2y ( Relative to p1 )
+$08 1 p2z ( Relative to p1 )
+$09 1 p3x ( Relative to p1 )
+$0A 1 p3y ( Relative to p1 )
+$0B 1 p3z ( Relative to p1 )
+$0C 1 r1
+$0D 1 g1
+$0E 1 b1
+$0F 1 type // 52|54 => triangle. 60|62 => quad. maybe doublesided?
+$10 1 r2
+$11 1 g2
+$12 1 b2
+$13 1 u3
+$14 1 r3
+$15 1 g3
+$16 1 b3
+$17 1 v3
+$18 1 u1
+$19 1 v1
+$1A 2 texelMask ( Controls texel transparency )
+$1C 1 u2
+$1D 1 v2
+$1E 2 idTexture ( Changes value at runtime )
+$20 1 p4x ( Relative to p1 )
+$21 1 p4y ( Relative to p1 )
+$22 1 p4z ( Relative to p1 )
+$23 1 u4
+$24 1 r4
+$25 1 g4
+$26 1 b4
+$27 1 v4
+ CollisionSection
+$00 2 TyleWidth
+$02 2 TyleHeight
+$04 4 unknown
for (TyleWidth*TyleHeight) // West to East, South to North
+$00 1 FloorHeight
for (TyleWidth*TyleHeight) // West to East, South to North
+$00 1 CeilingHeight
for (TyleWidth*TyleHeight/2) // appears to be nibble based
+$00 1/2? Incline (angle of the floor tyle)
+$00 ? unknown (some form of bitmask one bit per tyle)
+ SubSection03
+ DoorSection
for (numDoors) // numDoors = lenDoorSection/0x0C
+$00 1 destZone
+$01 1 destRoom
+$02 6 unknown
+$08 4 idCurrentDoor
+ LightingSection
  + SubSection06
  + SubSection07
+ SubSection08
+ SubSection09
+ SubSection0A
  + SubSection0B
  + TextureEffectsSection (Fire, SavePoints, ExitArrows etc)
+ SubSection0D
+ SubSection0E
+ SubSection0F
+ SubSection10
+ SubSection11
+ SubSection12
+ SubSection13
+ AKAOSubSection (Audio)
+ SubSection15
+ SubSection16
+ SubSection17
+ SubSection18
+ ClearedSection ====================================
+ ScriptSection =====================================
        +$00 2 lenScriptSection
        +$02 2 ptrDialogText
        +$04 2 ptrUnknown1
        +$06 2 ptrUnknown2
        +$08 2 Unknown1 (Always == 0?)
        +$0A 2 Unknown2 (Always == 0?)
        +$0C 2 Unknown3 (Always == 0?)
        +$0E 2 Unknown4 (Always == 0?)
        +$10 ScriptOpcodes
                +$00 ? Opcodes (as per [[Vagrant Story:Script Opcodes|Script Opcodes]])
        +(ptrDialogText) DialogText
                +$00 2 numDialogs/ptrDialogText[0]
                for (numDialogs-1)
                        +$00 2 ptrDialogText
                for (numDialogs-1)
                        +$00 $ Dialog Text (as per [[Vagrant Story:TBL|VS Character Set]])
        +(ptrUnknown1) Unknown1
                +$00 ? Unknown data
        +(ptrUnknown2) Unknown2
                +$00 2 Unknown data
+ DoorSection ====================================
+ EnemySection ===================================
+ TreasureSection ================================
         +$000 weapon blade
         +$000 weapon blade
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
               +$0    $4    ? unknown (always 3 if item exists 0 otherwise)
               +$4    $1    [[Vagrant Story:itemnames list|itemnames list]]
               +$4    $1    [[Vagrant Story:itemnames list|itemnames list]]
               +$5    $1    [[Vagrant Story:items list|items list]]
               +$5    $1    [[Vagrant Story:items list|items list]]
Line 32: Line 193:
               +$11  $1    INT
               +$11  $1    INT
               +$12  $1    AGL
               +$12  $1    AGL
               +$13  $5   ? unknown
               +$13  $1    cost value
              +$14  $1    bits 0+1 = damage type bits 3 and above = stat affected
              +$15  $3   ? unknown (always zero)
               +$18  $4    [[Vagrant Story:range|range]]
               +$18  $4    [[Vagrant Story:range|range]]
               +$1C  $8    classes
               +$1C  $8    classes
               +$24  $8    affinities
               +$24  $8    affinities
               +$2C  $2    [[Vagrant Story:materials list[material]]
               +$2C  $2    [[Vagrant Story:materials list|materials list]]
               +$2E  $2    ? unknown
               +$2E  $2    ? unknown (always zero)
         +$030 weapon grip
         +$030 weapon grip
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
Line 47: Line 210:
               +$7    $1    AGL
               +$7    $1    AGL
               +$8    $4    types
               +$8    $4    types
               +$C    $4    ?unknown
               +$C    $4    ? unknown (always zero)
         +$040 weapon gem slot 1
         +$040 weapon gem slot 1
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$2    $1    [[Vagrant Story:items list|items list]]
               +$2    $1    [[Vagrant Story:items list|items list]]
               +$3    $1    ? unknown always zero
               +$3    $1    ? unknown (always zero)
               +$4    $1    ? unknown (most likely this is special effect)
               +$4    $1    ? unknown (most likely this is special effect)
               +$5    $1    STR
               +$5    $1    STR
Line 58: Line 221:
               +$8    $8    classes
               +$8    $8    classes
               +$10  $8    affinities
               +$10  $8    affinities
               +$18  $4    ? unknown
               +$18  $4    ? unknown (always zero)
         +$05C weapon gem slot 2
         +$05C weapon gem slot 2
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$2    $1    [[Vagrant Story:items list|items list]]
               +$2    $1    [[Vagrant Story:items list|items list]]
               +$3    $1    ? unknown always zero
               +$3    $1    ? unknown (always zero)
               +$4    $1    ? unknown (most likely this is special effect)
               +$4    $1    ? unknown (most likely this is special effect)
               +$5    $1    STR
               +$5    $1    STR
Line 69: Line 232:
               +$8    $8    classes
               +$8    $8    classes
               +$10  $8    affinities
               +$10  $8    affinities
               +$18  $4    ? unknown
               +$18  $4    ? unknown (always zero)
         +$078 weapon gem slot 3
         +$078 weapon gem slot 3
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$2    $1    [[Vagrant Story:items list|items list]]
               +$2    $1    [[Vagrant Story:items list|items list]]
               +$3    $1    ? unknown always zero
               +$3    $1    ? unknown (always zero)
               +$4    $1    ? unknown (most likely this is special effect)
               +$4    $1    ? unknown (most likely this is special effect)
               +$5    $1    STR
               +$5    $1    STR
Line 80: Line 243:
               +$8    $8    classes
               +$8    $8    classes
               +$10  $8    affinities
               +$10  $8    affinities
               +$18  $4    ? unknown
               +$18  $4    ? unknown (always zero)
         +$094 weapon name
         +$094 weapon name
               +00    $18  $18str weapon name
               +00    $18  $18str weapon name
         +$0AC blade
         +$0AC blade
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
               +$0    $4    ? unknown (always 3 if item exists 0 otherwise)
               +$4    $1    [[Vagrant Story:itemnames list|itemnames list]]
               +$4    $1    [[Vagrant Story:itemnames list|itemnames list]]
               +$5    $1    [[Vagrant Story:items list|items list]]
               +$5    $1    [[Vagrant Story:items list|items list]]
Line 96: Line 259:
               +$11  $1    INT
               +$11  $1    INT
               +$12  $1    AGL
               +$12  $1    AGL
               +$13  $5   ? unknown
               +$13  $1    cost value
              +$14  $1    bits 0+1 = damage type bits 3 and above = stat affected
              +$15  $3   ? unknown (always zero)
               +$18  $4    [[Vagrant Story:range|range]]
               +$18  $4    [[Vagrant Story:range|range]]
               +$1C  $8    classes
               +$1C  $8    classes
               +$24  $8    affinities
               +$24  $8    affinities
               +$2C  $2    [[Vagrant Story:materials list[material]]
               +$2C  $2    [[Vagrant Story:materials list|materials list]]
               +$2E  $2    ? unknown
               +$2E  $2    ? unknown (always zero)
         +$0CC grip
         +$0CC grip
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
Line 107: Line 272:
               +$6    $1    [[Vagrant Story:items list|items list]]
               +$6    $1    [[Vagrant Story:items list|items list]]
               +$7    $1    [[Vagrant Story:item categories|item categories]]
               +$7    $1    [[Vagrant Story:item categories|item categories]]
               +$8    $1    ? unknown
               +$8    $1    number of gem slots
               +$9    $1    STR
               +$9    $1    STR
               +$A    $1    INT
               +$A    $1    INT
               +$B    $1    AGL
               +$B    $1    AGL
               +$C    $4    types
               +$C    $4    types
               +$10  $4    ?unknown
               +$10  $4    ? unknown (always zero)
         +$0DC sheild
         +$0DC sheild
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
Line 123: Line 288:
               +$C    $2    DPcurrent*100
               +$C    $2    DPcurrent*100
               +$E    $2    PPcurrent
               +$E    $2    PPcurrent
               +$10  $1    ? unknown
               +$10  $1    number of gem slots
               +$11  $1    STR
               +$11  $1    STR
               +$12  $1    INT
               +$12  $1    INT
Line 130: Line 295:
               +$1C  $8    classes
               +$1C  $8    classes
               +$24  $8    affinities
               +$24  $8    affinities
               +$2C  $2    [[Vagrant Story:materials list[material]]
               +$2C  $2    [[Vagrant Story:materials list|materials list]]
               +$2E  $2    ? unknown
               +$2E  $2    ? unknown (always zero)
         +$11C sheild gem slot 1
         +$11C sheild gem slot 1
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$2    $1    [[Vagrant Story:items list|items list]]
               +$2    $1    [[Vagrant Story:items list|items list]]
               +$3    $1    ? unknown always zero
               +$3    $1    ? unknown (always zero)
               +$4    $1    ? unknown (most likely this is special effect)
               +$4    $1    ? unknown (most likely this is special effect)
               +$5    $1    STR
               +$5    $1    STR
Line 142: Line 307:
               +$8    $8    classes
               +$8    $8    classes
               +$10  $8    affinities
               +$10  $8    affinities
               +$18  $4    ? unknown
               +$18  $4    ? unknown (always zero)
         +$138 sheild gem slot 2
         +$138 sheild gem slot 2
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$2    $1    [[Vagrant Story:items list|items list]]
               +$2    $1    [[Vagrant Story:items list|items list]]
               +$3    $1    ? unknown always zero
               +$3    $1    ? unknown (always zero)
               +$4    $1    ? unknown (most likely this is special effect)
               +$4    $1    ? unknown (most likely this is special effect)
               +$5    $1    STR
               +$5    $1    STR
Line 153: Line 318:
               +$8    $8    classes
               +$8    $8    classes
               +$10  $8    affinities
               +$10  $8    affinities
               +$18  $4    ? unknown
               +$18  $4    ? unknown (always zero)
         +$154 sheild gem slot 3
         +$154 sheild gem slot 3
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$2    $1    [[Vagrant Story:items list|items list]]
               +$2    $1    [[Vagrant Story:items list|items list]]
               +$3    $1    ? unknown always zero
               +$3    $1    ? unknown (always zero)
               +$4    $1    ? unknown (most likely this is special effect)
               +$4    $1    ? unknown (most likely this is special effect)
               +$5    $1    STR
               +$5    $1    STR
Line 164: Line 329:
               +$8    $8    classes
               +$8    $8    classes
               +$10  $8    affinities
               +$10  $8    affinities
               +$18  $4    ? unknown
               +$18  $4    ? unknown (always zero)
         +$170 armour 1
         +$170 armour 1
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
               +$4    $1    [[Vagrant Story:itemnames list|itemnames list]]
               +$4    $1    [[Vagrant Story:itemnames list|itemnames list]]
               +$5    $1    [[Vagrant Story:items list|items list]]
               +$5    $1    [[Vagrant Story:items list|items list]]
               +$6    $1    ? unknown
               +$6    $1    ? unknown (always zero)
               +$7    $1    [[Vagrant Story:item categories|item categories]]
               +$7    $1    [[Vagrant Story:item categories|item categories]]
               +$8    $2    DPmax*100
               +$8    $2    DPmax*100
               +$A    $2    PPmax
               +$A    $2    PPmax (always zero)
               +$C    $2    DPcurrent*100
               +$C    $2    DPcurrent*100
               +$E    $2    PPcurrent
               +$E    $2    PPcurrent (always zero)
               +$10  $1    ? unknown
               +$10  $1    ? unknown (always zero)
               +$11  $1    STR
               +$11  $1    STR
               +$12  $1    INT
               +$12  $1    INT
Line 182: Line 347:
               +$1C  $8    classes
               +$1C  $8    classes
               +$24  $8    affinities
               +$24  $8    affinities
               +$2C  $2    [[Vagrant Story:materials list[material]]
               +$2C  $2    [[Vagrant Story:materials list|materials list]]
               +$2E  $2    ? unknown
               +$2E  $2    ? unknown (always zero)
         +$1A0 armour 2
         +$1A0 armour 2
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
               +$4    $1    [[Vagrant Story:itemnames list|itemnames list]]
               +$4    $1    [[Vagrant Story:itemnames list|itemnames list]]
               +$5    $1    [[Vagrant Story:items list|items list]]
               +$5    $1    [[Vagrant Story:items list|items list]]
               +$6    $1    ? unknown
               +$6    $1    ? unknown (always zero)
               +$7    $1    [[Vagrant Story:item categories|item categories]]
               +$7    $1    [[Vagrant Story:item categories|item categories]]
               +$8    $2    DPmax*100
               +$8    $2    DPmax*100
               +$A    $2    PPmax
               +$A    $2    PPmax (always zero)
               +$C    $2    DPcurrent*100
               +$C    $2    DPcurrent*100
               +$E    $2    PPcurrent
               +$E    $2    PPcurrent (always zero)
               +$10  $1    ? unknown
               +$10  $1    ? unknown (always zero)
               +$11  $1    STR
               +$11  $1    STR
               +$12  $1    INT
               +$12  $1    INT
Line 201: Line 366:
               +$1C  $8    classes
               +$1C  $8    classes
               +$24  $8    affinities
               +$24  $8    affinities
               +$2C  $2    [[Vagrant Story:materials list[material]]
               +$2C  $2    [[Vagrant Story:materials list|materials list]]
               +$2E  $2    ? unknown
               +$2E  $2    ? unknown (always zero)
         +$1D0 accessory
         +$1D0 accessory
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
               +$4    $1    [[Vagrant Story:itemnames list|itemnames list]]
               +$4    $1    [[Vagrant Story:itemnames list|itemnames list]]
               +$5    $1    [[Vagrant Story:items list|items list]]
               +$5    $1    [[Vagrant Story:items list|items list]]
               +$6    $1    ? unknown
               +$6    $1    ? unknown (always zero)
               +$7    $1    [[Vagrant Story:item categories|item categories]]
               +$7    $1    [[Vagrant Story:item categories|item categories]]
               +$8    $2    DPmax*100
               +$8    $2    DPmax*100 (always zero)
               +$A    $2    PPmax
               +$A    $2    PPmax (always zero)
               +$C    $2    DPcurrent*100
               +$C    $2    DPcurrent*100 (always zero)
               +$E    $2    PPcurrent
               +$E    $2    PPcurrent (always zero)
               +$10  $1    ? unknown
               +$10  $1    ? unknown (always zero)
               +$11  $1    STR
               +$11  $1    STR
               +$12  $1    INT
               +$12  $1    INT
Line 220: Line 385:
               +$1C  $8    classes
               +$1C  $8    classes
               +$24  $8    affinities
               +$24  $8    affinities
               +$2C  $4    ? unknown
               +$2C  $4    ? unknown (always zero)
         +$200 gem
         +$200 gem
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
               +$0    $4    unknown (always 3 if item exists 0 otherwise)
               +$4    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$4    $2    [[Vagrant Story:itemnames list|itemnames list]]
               +$6    $1    [[Vagrant Story:items list|items list]]
               +$6    $1    [[Vagrant Story:items list|items list]]
               +$7    $1    ? unknown always zero
               +$7    $1    ? unknown (always zero)
               +$8    $1    ? unknown (most likely this is special effect)
               +$8    $1    ? unknown (most likely this is special effect)
               +$9    $1    STR
               +$9    $1    STR
Line 232: Line 397:
               +$C    $8    classes
               +$C    $8    classes
               +$14  $8    affinities
               +$14  $8    affinities
               +$1C  $4    ? unknown
               +$1C  $4    ? unknown (always zero)
         +$220 misc items
         +$220 misc items
               +$0    $4   unknown always 0
               for 4 misc items
              while (misc item entry != 00000000)
                     +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
                     +$0    $2    [[Vagrant Story:itemnames list|itemnames list]]
                     +$2    $1    ? unknown always 3
                     +$2    $1    ? unknown (always 3 if item exists 0 otherwise)
                     +$3    $1    quantity
                     +$3    $1    quantity
[[Category:Vagrant_Story]]
 
== Notes ==
 
Polygons are defined as an absolute base vector p1 and offsets p2,p3, and p4 in case of a quad. The offsets need to be scaled, usually by a factor of 8. For example, the absolute p2' is (p1 + p2 * 8).
 
== Todo ==
 
Some offset vectors are not scaled by 8. The table, e.g. in 001.MPD (group 4) is scaled by 1. It is unknown where this scale factor is defined or applied. Need to investigate this.

Latest revision as of 02:42, 24 January 2024

This is a sub-page of Vagrant Story.

MPD files store all map data of a single room, i.e. geometry, enemies, doors, and so on. Textures are not part of the MPD, instead they are stored in the ZND files.

File Format

MPD_HEADER =======================================
	$0	4	ptrRoomSection
	$4	4	lenRoomSection
	$8	4	ptrClearedSection
	$C	4	lenClearedSection
	$10	4	ptrScriptSection
	$14	4	lenScriptSection
	$18	4	ptrDoorSection
	$1C	4	lenDoorSection
	$20	4	ptrEnemySection
	$24	4	lenEnemySection
	$28	4	ptrTreasureSection
	$2C	4	lenTreasureSection

+ RoomSection ====================================
	+RoomHeader
		+$00	4	lenGeometrySection
		+$04	4	lenCollisionSection
		+$08	4	lenSubSection03
		+$0C	4	lenDoorSection
		+$10	4	lenLightingSection
 		+$14	4	lenSubSection06
 		+$18	4	lenSubSection07
		+$1C	4	lenSubSection08
		+$20	4	lenSubSection09
		+$24	4	lenSubSection0A
 		+$28	4	lenSubSection0B
  		+$2C	4	lenTextureEffectsSection (Fire, SavePoints, ExitArrows etc)
		+$30	4	lenSubSection0D
		+$34	4	lenSubSection0E
		+$38	4	lenSubSection0F
		+$3C	4	lenSubSection10
		+$40	4	lenSubSection11
		+$44	4	lenSubSection12
		+$48	4	lenSubSection13
		+$4C	4	lenAKAOSubSection (Audio)
		+$50	4	lenSubSection15
		+$54	4	lenSubSection16
		+$58	4	lenSubSection17
		+$5C	4	lenSubSection18
	+ GeometrySection (Polygon groups)
		+$00	4	numGroups
		for (numGroups)
			+$00	$40	GroupHeaderStructure
		for (numGroups)
			+$00	4	numPoly3gts
			+$04	4	numPoly4gts
			for (numPoly3gts)
				+$00	2	p1x
				+$02	2	p1y
				+$04	2	p1z
				+$06	1	p2x ( Relative to p1 )
				+$07	1	p2y ( Relative to p1 )
				+$08	1	p2z ( Relative to p1 )
				+$09	1	p3x ( Relative to p1 )
				+$0A	1	p3y ( Relative to p1 )
				+$0B	1	p3z ( Relative to p1 )
				+$0C	1	r1
				+$0D	1	g1
				+$0E	1	b1
				+$0F	1	type // 52|54 => triangle. 60|62 => quad. maybe doublesided?
				+$10	1	r2
				+$11	1	g2
				+$12	1	b2
				+$13	1	u3
				+$14	1	r3
				+$15	1	g3
				+$16	1	b3
				+$17	1	v3
				+$18	1	u1
				+$19	1	v1
				+$1A	2	texelMask ( Controls texel transparency )
				+$1C	1	u2
				+$1D	1	v2
				+$1E	2	idTexture ( Changes value at runtime )
			for (numPoly4gts)
				+$00	2	p1x
				+$02	2	p1y
				+$04	2	p1z
				+$06	1	p2x ( Relative to p1 )
				+$07	1	p2y ( Relative to p1 )
				+$08	1	p2z ( Relative to p1 )
				+$09	1	p3x ( Relative to p1 )
				+$0A	1	p3y ( Relative to p1 )
				+$0B	1	p3z ( Relative to p1 )
				+$0C	1	r1
				+$0D	1	g1
				+$0E	1	b1
				+$0F	1	type // 52|54 => triangle. 60|62 => quad. maybe doublesided?
				+$10	1	r2
				+$11	1	g2
				+$12	1	b2
				+$13	1	u3
				+$14	1	r3
				+$15	1	g3
				+$16	1	b3
				+$17	1	v3
				+$18	1	u1
				+$19	1	v1
				+$1A	2	texelMask ( Controls texel transparency )
				+$1C	1	u2
				+$1D	1	v2
				+$1E	2	idTexture ( Changes value at runtime )
				+$20	1	p4x ( Relative to p1 )
				+$21	1	p4y ( Relative to p1 )
				+$22	1	p4z ( Relative to p1 )
				+$23	1	u4
				+$24	1	r4
				+$25	1	g4
				+$26	1	b4
				+$27	1	v4
	+ CollisionSection
		+$00	2	TyleWidth
		+$02	2	TyleHeight
		+$04	4	unknown
		for (TyleWidth*TyleHeight) // West to East, South to North
			+$00	1	FloorHeight
		for (TyleWidth*TyleHeight) // West to East, South to North
			+$00	1	CeilingHeight
		for (TyleWidth*TyleHeight/2) // appears to be nibble based
			+$00	1/2?	Incline (angle of the floor tyle)
		+$00	?	unknown (some form of bitmask one bit per tyle)
	+ SubSection03
	+ DoorSection
		for (numDoors) // numDoors = lenDoorSection/0x0C
			+$00	1	destZone
			+$01	1	destRoom
			+$02	6	unknown
			+$08	4	idCurrentDoor
	+ LightingSection
 	+ SubSection06
 	+ SubSection07
	+ SubSection08
	+ SubSection09
	+ SubSection0A
 	+ SubSection0B
  	+ TextureEffectsSection (Fire, SavePoints, ExitArrows etc)
	+ SubSection0D
	+ SubSection0E
	+ SubSection0F
	+ SubSection10
	+ SubSection11
	+ SubSection12
	+ SubSection13
	+ AKAOSubSection (Audio)
	+ SubSection15
	+ SubSection16
	+ SubSection17
	+ SubSection18
+ ClearedSection ====================================
+ ScriptSection =====================================
       +$00	2	lenScriptSection
       +$02	2	ptrDialogText
       +$04	2	ptrUnknown1
       +$06	2	ptrUnknown2
       +$08	2	Unknown1 (Always == 0?)
       +$0A	2	Unknown2 (Always == 0?)
       +$0C	2	Unknown3 (Always == 0?)
       +$0E	2	Unknown4 (Always == 0?)
       +$10 ScriptOpcodes
               +$00	?	Opcodes (as per Script Opcodes)
       +(ptrDialogText) DialogText
               +$00	2	numDialogs/ptrDialogText[0]
               for (numDialogs-1)
                       +$00	2	ptrDialogText
               for (numDialogs-1)
                       +$00	$	Dialog Text (as per VS Character Set)
       +(ptrUnknown1) Unknown1
               +$00	?	Unknown data
       +(ptrUnknown2) Unknown2
               +$00	2	Unknown data

+ DoorSection ====================================
+ EnemySection ===================================
+ TreasureSection ================================
       +$000 weapon blade
             +$0    $4    ? unknown (always 3 if item exists 0 otherwise)
             +$4    $1    itemnames list
             +$5    $1    items list
             +$6    $1    WEP files
             +$7    $1    item categories
             +$8    $2    DPmax*100
             +$A    $2    PPmax
             +$C    $2    DPcurrent*100
             +$E    $2    PPcurrent
             +$10   $1    STR
             +$11   $1    INT
             +$12   $1    AGL
             +$13   $1    cost value
             +$14   $1    bits 0+1 = damage type bits 3 and above = stat affected
             +$15   $3    ? unknown (always zero)
             +$18   $4    range
             +$1C   $8    classes
             +$24   $8    affinities
             +$2C   $2    materials list
             +$2E   $2    ? unknown (always zero)
       +$030 weapon grip
             +$0    $2    itemnames list
             +$2    $1    items list
             +$3    $1    item categories
             +$4    $1    number of gem slots
             +$5    $1    STR
             +$6    $1    INT
             +$7    $1    AGL
             +$8    $4    types
             +$C    $4    ? unknown (always zero)
       +$040 weapon gem slot 1
             +$0    $2    itemnames list
             +$2    $1    items list
             +$3    $1    ? unknown (always zero)
             +$4    $1    ? unknown (most likely this is special effect)
             +$5    $1    STR
             +$6    $1    INT
             +$7    $1    AGL
             +$8    $8    classes
             +$10   $8    affinities
             +$18   $4    ? unknown (always zero)
       +$05C weapon gem slot 2
             +$0    $2    itemnames list
             +$2    $1    items list
             +$3    $1    ? unknown (always zero)
             +$4    $1    ? unknown (most likely this is special effect)
             +$5    $1    STR
             +$6    $1    INT
             +$7    $1    AGL
             +$8    $8    classes
             +$10   $8    affinities
             +$18   $4    ? unknown (always zero)
       +$078 weapon gem slot 3
             +$0    $2    itemnames list
             +$2    $1    items list
             +$3    $1    ? unknown (always zero)
             +$4    $1    ? unknown (most likely this is special effect)
             +$5    $1    STR
             +$6    $1    INT
             +$7    $1    AGL
             +$8    $8    classes
             +$10   $8    affinities
             +$18   $4    ? unknown (always zero)
       +$094 weapon name
             +00    $18   $18str weapon name
       +$0AC blade
             +$0    $4    ? unknown (always 3 if item exists 0 otherwise)
             +$4    $1    itemnames list
             +$5    $1    items list
             +$6    $1    WEP files
             +$7    $1    item categories
             +$8    $2    DPmax*100
             +$A    $2    PPmax
             +$C    $2    DPcurrent*100
             +$E    $2    PPcurrent
             +$10   $1    STR
             +$11   $1    INT
             +$12   $1    AGL
             +$13   $1    cost value
             +$14   $1    bits 0+1 = damage type bits 3 and above = stat affected
             +$15   $3    ? unknown (always zero)
             +$18   $4    range
             +$1C   $8    classes
             +$24   $8    affinities
             +$2C   $2    materials list
             +$2E   $2    ? unknown (always zero)
       +$0CC grip
             +$0    $4    unknown (always 3 if item exists 0 otherwise)
             +$4    $2    itemnames list
             +$6    $1    items list
             +$7    $1    item categories
             +$8    $1    number of gem slots
             +$9    $1    STR
             +$A    $1    INT
             +$B    $1    AGL
             +$C    $4    types
             +$10   $4    ? unknown (always zero)
       +$0DC sheild
             +$0    $4    unknown (always 3 if item exists 0 otherwise)
             +$4    $1    itemnames list
             +$5    $1    items list
             +$6    $1    WEP files
             +$7    $1    item categories
             +$8    $2    DPmax*100
             +$A    $2    PPmax
             +$C    $2    DPcurrent*100
             +$E    $2    PPcurrent
             +$10   $1    number of gem slots
             +$11   $1    STR
             +$12   $1    INT
             +$13   $1    AGL
             +$18   $4    types
             +$1C   $8    classes
             +$24   $8    affinities
             +$2C   $2    materials list
             +$2E   $2    ? unknown (always zero)
       +$11C sheild gem slot 1
             +$0    $2    itemnames list
             +$2    $1    items list
             +$3    $1    ? unknown (always zero)
             +$4    $1    ? unknown (most likely this is special effect)
             +$5    $1    STR
             +$6    $1    INT
             +$7    $1    AGL
             +$8    $8    classes
             +$10   $8    affinities
             +$18   $4    ? unknown (always zero)
       +$138 sheild gem slot 2
             +$0    $2    itemnames list
             +$2    $1    items list
             +$3    $1    ? unknown (always zero)
             +$4    $1    ? unknown (most likely this is special effect)
             +$5    $1    STR
             +$6    $1    INT
             +$7    $1    AGL
             +$8    $8    classes
             +$10   $8    affinities
             +$18   $4    ? unknown (always zero)
       +$154 sheild gem slot 3
             +$0    $2    itemnames list
             +$2    $1    items list
             +$3    $1    ? unknown (always zero)
             +$4    $1    ? unknown (most likely this is special effect)
             +$5    $1    STR
             +$6    $1    INT
             +$7    $1    AGL
             +$8    $8    classes
             +$10   $8    affinities
             +$18   $4    ? unknown (always zero)
       +$170 armour 1
             +$0    $4    unknown (always 3 if item exists 0 otherwise)
             +$4    $1    itemnames list
             +$5    $1    items list
             +$6    $1    ? unknown (always zero)
             +$7    $1    item categories
             +$8    $2    DPmax*100
             +$A    $2    PPmax (always zero)
             +$C    $2    DPcurrent*100
             +$E    $2    PPcurrent (always zero)
             +$10   $1    ? unknown (always zero)
             +$11   $1    STR
             +$12   $1    INT
             +$13   $1    AGL
             +$18   $4    types
             +$1C   $8    classes
             +$24   $8    affinities
             +$2C   $2    materials list
             +$2E   $2    ? unknown (always zero)
       +$1A0 armour 2
             +$0    $4    unknown (always 3 if item exists 0 otherwise)
             +$4    $1    itemnames list
             +$5    $1    items list
             +$6    $1    ? unknown (always zero)
             +$7    $1    item categories
             +$8    $2    DPmax*100
             +$A    $2    PPmax (always zero)
             +$C    $2    DPcurrent*100
             +$E    $2    PPcurrent (always zero)
             +$10   $1    ? unknown (always zero)
             +$11   $1    STR
             +$12   $1    INT
             +$13   $1    AGL
             +$18   $4    types
             +$1C   $8    classes
             +$24   $8    affinities
             +$2C   $2    materials list
             +$2E   $2    ? unknown (always zero)
       +$1D0 accessory
             +$0    $4    unknown (always 3 if item exists 0 otherwise)
             +$4    $1    itemnames list
             +$5    $1    items list
             +$6    $1    ? unknown (always zero)
             +$7    $1    item categories
             +$8    $2    DPmax*100 (always zero)
             +$A    $2    PPmax (always zero)
             +$C    $2    DPcurrent*100 (always zero)
             +$E    $2    PPcurrent (always zero)
             +$10   $1    ? unknown (always zero)
             +$11   $1    STR
             +$12   $1    INT
             +$13   $1    AGL
             +$18   $4    types
             +$1C   $8    classes
             +$24   $8    affinities
             +$2C   $4    ? unknown (always zero)
       +$200 gem
             +$0    $4    unknown (always 3 if item exists 0 otherwise)
             +$4    $2    itemnames list
             +$6    $1    items list
             +$7    $1    ? unknown (always zero)
             +$8    $1    ? unknown (most likely this is special effect)
             +$9    $1    STR
             +$A    $1    INT
             +$B    $1    AGL
             +$C    $8    classes
             +$14   $8    affinities
             +$1C   $4    ? unknown (always zero)
       +$220 misc items
             for 4 misc items
                    +$0    $2    itemnames list
                    +$2    $1    ? unknown (always 3 if item exists 0 otherwise)
                    +$3    $1    quantity

Notes

Polygons are defined as an absolute base vector p1 and offsets p2,p3, and p4 in case of a quad. The offsets need to be scaled, usually by a factor of 8. For example, the absolute p2' is (p1 + p2 * 8).

Todo

Some offset vectors are not scaled by 8. The table, e.g. in 001.MPD (group 4) is scaled by 1. It is unknown where this scale factor is defined or applied. Need to investigate this.