CD file

files, as used by Tt Games, are "Character Definition" files. They contain all the information about where to find the assets for a character's model and textures. The format was first used in Lego Indiana Jones 2, replacing the plain text .TXT files used for characters in prior games (although .TXTs are still used for other purposes).

StreamInfo
The first block of data inside of the .CD file is the StreamInfo and is usually 2129 bytes long. This information is unknown but is most likely related to classes and other objects within C++.

Containers
The .CD files are made up of containers that contain certain data for use within the game. Each container header is made up of either 17 bytes or 22 bytes.

Container Types
OLST: these are a larger container containing MOBJs.

MOBJ: these are the smaller containers containing reference data, though on some use-cases, can contain other OLSTs and MOBJs.

OLST Header
The OLST Header is comprised of 17 bytes.

NOTE: 0x04 is the number of bytes in HEX that the value is.

0x04 - Size of the full container

0x04 - Size of the "OLST" string + 1

0x05 - "OLST" String plus a null byte

0x02 - Type of OLST container

0x02 - Number of items in OLST Container

MOBJ Header
The MOBJ Header is comprised of 23 bytes.

NOTE: 0x04 is the number of bytes in HEX that the value is.

0x04 - Size of the full container

0x04 - Size of the "MOBJ" string + 1

0x05 - "MOBJ" String plus a null byte

0x05 - Unknown

0x02 - An arbitrary ID value which changes depending on the OLST type 0x02 - An arbitrary ID value which changes depending on the OLST type

Useful tools

 * HxD - Popular hex editor for Windows