Z Object Placement Format

From ModdingWiki
Jump to navigation Jump to search

Object placements for a Z level are stored separately from its MAP file.

File format

The file is 1500 bytes: 150 records of 10 bytes. It is loaded to static address 0xd5364. Record offsets follow; multi-byte values are little-endian.

Offset Data type Name Description
0 UINT16LE x Position passed to createObject; 0xffff marks an unused record.
2 UINT16LE y Position passed to createObject.
4 UINT8 type Object type; 0x25 is skipped by the initial creation loop.
5 UINT8 class ROBOTS.DAT class argument, or 0xff.
6 BYTE[4] remainder Not read by this creation loop; preserve.

Notes

The 10-byte disk record is distinct from the 0x28-byte runtime object record. Do not serialize runtime pointers back into this file.

Source code

From re-z, the open-source browser port:

Credits

This file format was reverse engineered by VorticonCmdr. 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!)