Raptor Level Format

From ModdingWiki
Jump to navigation Jump to search

File Format

Files in Raptor Level Format have the following header:

 0 | UINT32LE       | iFileSize    | size of the entire level file
 4 | UINT32LE       | iActorOffset | always 0x1524
 8 | UINT32LE       | iActorCount  | always (iFileSize-iActorOffset)/24
12 | UINT32LE[1350] | iTileData    | could also be two UINT16LE per tile

Every Level is 9 tiles wide and 150 tiles high, so there are always 1350 tiles per level.

Tile Data

Tile data starts at offset 12 in the level file and always has a size of 5400 bytes. The levels are all 9 tiles wide and 150 tiles high. The tile rows are stored sequentially in the file, starting with the top row.

Each cell value could be interpreted as one UINT32LE with the 16 low bits being the tile number and the 16 high bits being the tileset number (0-3). The data could also be interpreted as two UINT16LE values per tile, with the fist being the tile number and the second being the tileset.

Actor Data

Each actor entry consists of 6 (U)INT32LE values:

 0 | INT32LE  | iSquadTag?	| either -1, 0 or 1
 4 | UINT32LE | iActorID?	| 0..163
 8 | UINT32LE | iPosX		| 0..8
12 | UINT32LE | iPosY		| 0..139
16 | UINT32LE | iSpriteSet?	| 0..3
20 | UINT32LE | iSkillFlag?	| 0..5 (3..5 for normal actors, 0..2 for easter eggs?)

! Most of these values still need to be investigated.

The iSquadTag value seems to be used to link some actors into a group (or squad or whatever pilots might call it), letting all of them move at the same time. The remaining values should be obvious.


This file format was reverse engineered by K1n9_Duk3. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)