MAPU (File Format)

From Retro Modding Wiki
Revision as of 22:37, 3 March 2015 by imported>Antidote
Jump to navigation Jump to search

The MAPU format is used to build the game's Universe Map, which is separated into several "Worlds", the format is extremely simple and is one of the few formats where we know absolutely everything about it.

Format

The MAPU format is broken in to 2 part, the header, and the world descriptors. Each world has it's own transform matrix, and a list of area transforms you multiply with the world's matrix. However due to the way geometry works, the number of areas in the actual world may differ from the amount stored here, several rooms may share the same hexagon model for instance.

Header

The header is extremely simple following this format:

Type Description
u32 Magic; Always 0xABCDEF01
u32 Version; Always 1
u32 MAPA ID; The hexagon model
u32 World Count (WC)

World

Each world defines it's name, it's MLVL, 3x4 Transformation Matrix, Areas, and it's color.

Type Description
string Name; The internal name of the world e.g "Ruins"
u32 MLVL ID; The World metafile.
CTransform4f World Transform; The worlds position in the map
u32 Area Count (AC); The number of areas in this world
CTransform4f[AC] Area Transforms; The areas location relative to the worlds transform
Color4f World Color; Used to color each room correctly