RMPA format - KCreator/Earth-Defence-Force-Documentation GitHub Wiki

All offsets are calculated from the first byte of the respective data block (relative offsets). Route and Camera Waypoints aren't extended to keep aligned to 0, so only the first in a route will always be at 0.

RMPA Header, which is about 0x30 in length:

  • +0x00 RMP file type string, or PMR because of byte-swapping.
  • +0x08 boolean denoting if routes are to be processed.
  • +0x0C offset to route data.
  • +0x10 boolean denoting if shapes are to be processed.
  • +0x14 offset to shape data.
  • +0x18 boolean denoting if camera paths are to be processed.
  • +0x1C offset to camera path data.
  • +0x20 boolean denoting if spawnpoints are to be processed.
  • +0x24 offset to spawnpoint data.
  • When there are less types of data (only spawns for example) the unused offsets will be duplicate pointers.

Type Headers, which are exactly 0x20 in length:

  • +0x00 is how many Enumeration Sub-Headers there are.
  • +0x04 is an offset to the start of the first enumerator?
  • +0x0C is an offset to the end of the type's data (ends up at the same place as where the next type of data starts).
  • +0x10 is the numeric waypoint identifier based on the whole RMPA.
  • +0x18 points to a null string? Or, possibly the string table for some reason?

Enumeration Sub-Headers, which are exactly 0x20 in length:

  • +0x08 points to where the enumeration will end.
  • +0x10 name string length
  • +0x14 is an offset to a string, possibly just a name.
  • +0x18 is how many pieces of data to process. Multiple Enumeration Sub-Headers add up to the total amount of data pieces in the section.
  • +0x1C points to where the enumeration will start.

Camera Type Headers, which are exactly 0x20 in length:

  • +0x04 is an offset to the end of the type's data (ends up at the same place as where the next type of data starts).
  • +0x08 is the numeric waypoint identifier based on the whole RMPA.
  • +0x14 points to a null string?
  • +0x18 is how many Camera Enumeration Sub-Headers there are?
  • +0x1C is an offset to the start of the first enumerator?

Camera Enumeration Sub-Headers, which are exactly 0x30 in length:

  • +0x04 points to where the enumeration will end.
  • +0x14 is an offset to a string, possibly just a name.
  • +0x18 is how many camera nodes to process.
  • +0x1C points to where the enumeration will start.
  • +0x24 is an offset to a timing enumerator?
  • +0x2C is an offset to a different timing enumerator?

Types

Route Waypoints, which are exactly 0x3C in length:
Remember! All offsets are calculated from the first byte of the individual waypoint's data block.

  • +0x00 is the waypoint's number in the current route, starting from 0.
  • +0x04 how many next-waypoints
  • +0x08 is an offset to a 0x10 sized block that controls what the next waypoint will be.
  • +0x10 is an offset to the end of that 0x10-sized next-waypoint block.
  • +0x14 is the numeric waypoint identifier based on the whole RMPA.
  • +0x18 extra SGO size
  • +0x1C is an offset to an SGO that'll apply extra settings, mostly just width.
  • +0x20 name string length
  • +0x24 is an offset to the path waypoint's name. Not all waypoints direct to a valid string since not all are used by name.

Shape Setup, which are about 0x30 in length:

  • +0x04 name string length
  • +0x08 is the string offset naming the shape type Rectangle, Sphere, Cylinder.
  • +0x0c name string length
  • +0x10 is the offset to the shape's name.
  • +0x18 is the offset to the shape's size data, equal with 0x24
  • +0x1C is the numeric waypoint identifier based on the whole RMPA.
  • +0x24 is the offset to the shape's size data.

Shape Data, which are about 0x40 in length:

  • +0x00 position X
  • +0x04 position Y
  • +0x08 position Z
  • +0x10 rectangle size X
  • +0x14 rectangle size Y
  • +0x18 rectangle size Z
  • +0x30 sphere or cylinder diameter
  • +0x34 cylinder height

Camera Path Nodes, which are exactly 0x74 in length:
Remember! All offsets are calculated from the first byte of the individual node's data block.

  • +0x0C is an offset to an SGO.
  • +0x10 is the numeric waypoint identifier based on the whole RMPA.
  • +0x14 is 3F80 all the time?
  • +0x18 above float 4100 a lot, sometimes zero?
  • +0x68 is the offset to the node's name.

Camera Timing?? Enumerators, which are about 0x10 in length:

  • +0x00 is a float of some kind, but can be zero.
  • +0x04 is how many nodes to process (this and the other timing enum add up to the camera path nodes minus one?).
  • +0x08 is an offset to the start of the nodes.

Camera Timing?? Nodes, which are exactly 0x1C in length:

  • +0x00 a float
  • +0x04 a float
  • +0x08 always int 1?
  • +0x14 always float 1?
  • +0x18 always float 1?

Spawnpoints, which are about 0x40 in length:

  • +0x04 appears to be a pointer to the end of the current enumeration it's a part of.
  • +0x08 is the numeric waypoint identifier based on the whole RMPA?
  • The first set of floats is the spawnpoint itself, while the second set is where the spawned entity will "Look at".
  • +0x30 name string length
  • +0x34 is the offset to the spawn's name.

mp-s notes:

RMPA Header
  • Type Header--routes
    • enumeration Sub-header 1
    • enumeration Sub-header 2
    • enumeration Sub-header 3
      • Waypoint 1-1
      • waypoint 1-2
      • route bind
      • sgo extra
      • route bind
      • sgo extra
      • ...
  • Type Header--Shape
    • enumeration Sub-header 1
    • enumeration Sub-header 2
      • Shape setup1
      • shape setup2
      • shape data
      • shape data
      • Shape setup1
      • shape setup2
      • shape data
      • shape data
  • Type Header--camera
    • placeholder
  • Type Header--spawnpoint
    • enumeration Sub-header 1
    • enumeration Sub-header 2
      • spawnpoint 1-1
      • spawnpoint 1-2
      • spawnpoint 1-3
      • spawnpoint 2-1
      • spawnpoint 2-2
  • string table list