Table of Contents

Setup Files

Overall File Structure

Address Value/Syntax Description
0x00 01 01 Possibly File Start?
Voxel Count
Objects
Cameras
Lighting
-0x01 00 Possibly File End?

Voxel Count Structure

Address Value/Syntax Description
0x00 XX XX XX XX Negative X Voxel Count
0x04 YY YY YY YY Negative Y Voxel Count
0x08 ZZ ZZ ZZ ZZ Negative Z Voxel Count
0x0C XX XX XX XX Positive X Voxel Count
0x10 YY YY YY YY Positive Y Voxel Count
0x14 ZZ ZZ ZZ ZZ Positive Z Voxel Count

Objects Structure

Voxel Structure

Address Value/Syntax Description
0x00 03 0A Indicates The Start Of A Voxel With Objects
0x02 NN Number Of Complex Objects (Objects With 20 Bytes)
0x03 0B Indicates Start Of Complex Object List
Complex Object List
+0x01 08 End Of Complex Object List
+0x02 NN Number Of Simple Object List (Objects With 12 Bytes)
+0x03 09 If Number Of Simple Objects > 0, Indicates Start Of Simple Object List
Simple Object List

Voxels Are Separated By 0x01. Empty voxels will not have the above after the 0x01

Here are the lists of known objects with their script ids and object ids: Object Ids

Known Complex Object Structures

Actor Structure

Actors: Objects that are given scripts to follow, typically involving multiple states. These will have a 2-byte Object Id and a 2-byte Script Id.

Address Value/Syntax Description
0x00 XX XX X Position
0x02 YY YY Y Position
0x04 ZZ ZZ Z Position
0x06 SS SS Script Id
0x08 OO OO Object Id
0x0A UU Unknown Byte
0x0B UU Unknown Byte
0x0C RR Rotation » 1 (Y Axis)
0x0D UU Unknown Byte
0x0E SS SS Size
0x10 CCC NNN Nodes (C=Current, N=Next)
0x13 40 End Of Object Indicator

Timed Structure

Timed: Objects that perform follow a script, but are limited on how long their use is. These will have a 2-byte Object Id and a 2-byte Script Id.

Address Value/Syntax Description
0x00 XX XX X Position
0x02 YY YY Y Position
0x04 ZZ ZZ Z Position
0x06 SS SS Script Id
0x08 OO OO Object Id
0x0A UU Unknown Byte
0x0B UU Unknown Byte
0x0C TT Timer
0x0D UU Unknown Byte
0x0E SS SS Size
0x10 CCC NNN Nodes (C=Current, N=Next)
0x13 40 End Of Object Indicator

Script Structure

Script: Objects that cause another object or set of objects to perform actions.

Address Value/Syntax Description
0x00 XX XX X Position
0x02 YY YY Y Position
0x04 ZZ ZZ Z Position
0x06 SS SS Script Id
0x08 OO OO Object Id
0x0A UU Unknown Byte
0x0B UU Unknown Byte
0x0C UU Unknown Byte
0x0D UU Unknown Byte
0x0E UU Unknown Byte
0x0F UU Unknown Byte
0x10 CCC NNN Nodes (C=Current, N=Next)
0x13 40 End Of Object Indicator

Radius Structure

Radius: Objects that trigger when Banjo-Kazooie enter their radius. These will have a 1-byte Object Id and a 2-byte Associated Id (used for flag ids, warp ids, etc)

Address Value/Syntax Description
0x00 XX XX X Position
0x02 YY YY Y Position
0x04 ZZ ZZ Z Position
0x06 RR Radius » 1
0x07 OO Object Id
0x08 AA AA Associated Id (For Stuff Like Flags)
0x0A UU Unknown Byte
0x0B UU Unknown Byte
0x0C UU Unknown Byte
0x0D UU Unknown Byte
0x0E UU Unknown Byte
0x0F UU Unknown Byte
0x10 CCC NNN Nodes (C=Current, N=Next)
0x13 40 End Of Object Indicator

Known Simple Object Structures

Sprite Structure

Sprites: 2D Objects that will face the camera at all times (aka Billboarding). Sprites contain information about their id, RGB values, their scale, whether they are mirrored or not, their position and which “frame”. The sprite id has no offset in it's declaration. However while loading the sprite asset an offset of 0x572 is added on top of the id.

The 12 bytes contain this information in the following parts:

The first 4 bytes contain the object id, RGB, scale and whether the sprite is mirrored or not: The next 6 bytes are 3 s16's to describe the position (XYZ) The last 2 bytes mainly define the frame

Address Value/Syntax Description
0x00 SSSS SSSS SSSS PRRR Sprite id, padding, RGB red
0x02 GGGB BBSS SSSS SSMP RGB green, RGB blue, scale, is mirror, padding
0x04 XX XX X Position
0x06 YY YY Y Position
0x08 ZZ ZZ Z Position
0x0A FFFF FPPP PPPP PPPP Frame, padding

Example(s) for the music notes on the shelve in Nabnuts house in autumn:

Bytes in level setup: 0x16 0x40 0x00 0xB4 0x01 0x20 0x01 0x9D 0xFE 0x9B 0x4A 0xF0

First 4 bytes are 0x16 0x40 0x00 0xB4 in hex or 00010110 01000000 00000000 10110100 in binary

Next 6 bytes are the position:

Last 2 bytes are 0x4A 0xF0 in hex or 01001010 11110000 in binary

Bytes in level setup: 0x16 0x40 0x00 0xB6 0x01 0x7E 0x01 0x9D 0xFE 0xD8 0x21 0x10

First 4 bytes are 0x16 0x40 0x00 0xB6 in hex or 00010110 01000000 00000000 10110110 in binary

Next 6 bytes are the position:

Last 2 bytes are 0x21 0x10 in hex or 00100001 00010000 in binary

Bytes in level setup: 0x16 0x40 0x00 0xB4 0x01 0xD7 0x01 0x9D 0xFF 0x15 0x1D 0xD0

First 4 bytes are 0x16 0x40 0x00 0xB4 in hex or 00010110 01000000 00000000 10110100 in binary

Next 6 bytes are the position:

Last 2 bytes are 0x1D 0xD0 in hex or 00011101 11010000 in binary

Model Structure

Models: Objects that have a model ID associated with it which are placed in the map. The Model ID has no offset in it's declaration. However while loading the model asset an offset of 0x2D1 is added to the id.

Address Value/Syntax Description
0x00 MMMM MMMM MMMM PPPP Model Id, padding
0x02 PP Pitch
0x03 RR Roll
0x04 XX XX X Position
0x06 YY YY Y Position
0x08 ZZ ZZ Z Position
0x0A SS Scale
0x0B UU Padding

The 12 bytes contain this information in the following parts:

The first 12 bits are the model id padded with 4 bits to create 2 byte. The next 6 bytes are 3 s16's to describe the position (XYZ) The last 2 bytes mainly define the scale of the model

Example(s) for the dust bins next to banjos house in Spiral Mountain:

Bytes in level setup: 0x01, 0xC4, 0x01, 0x2B, 0x13, 0x02, 0xFE, 0x30, 0x1A, 0xE9, 0x32, 0xD2

First 2 bytes are 0x01 0xC4 in hex or 00000001 11000100 in binary

Next 2 bytes are pitch and roll which are used for the rotation of the model:

Next 6 bytes are the position:

The last 2 bytes contain the scale and padding bits:

Bytes in level setup: 0x01, 0xC4, 0x41, 0x00, 0x12, 0x81, 0xFE, 0x11, 0x1A, 0x3A, 0x32, 0x52

First 2 bytes are 0x01 0xC4 in hex or 00000001 11000100 in binary

Next 2 bytes are pitch and roll which are used for the rotation of the model:

Next 6 bytes are the position:

The last 2 bytes contain the scale and padding bits:

Bytes in level setup: 0x01, 0xC4, 0x00, 0x01, 0x12, 0x3A, 0xFE, 0x0E, 0x1A, 0xF0, 0x32, 0xD2

First 2 bytes are 0x01 0xC4 in hex or 00000001 11000100 in binary

Next 2 bytes are pitch and roll which are used for the rotation of the model:

Next 6 bytes are the position:

The last 2 bytes contain the scale and padding bits:

Camera Structure

Address Value/Syntax Description
0x00 00 03 Camera Section Start
0x02 List Of Cameras

Known Camera Structures

Camera Type 0 Structure

Address Value/Syntax Description
0x00 01 Start Of Camera
0x01 II II Camera Id
0x03 02 Unknown
0x04 00 Camera End

Camera Type 1 Structure

Address Value/Syntax Description
0x00 01 Start Of Camera
0x01 II II Camera Id
0x03 02 Unknown
0x04 01 Camera Type
0x05 01 Indicates Section One
0x06 XX XX XX XX X Position (Float)
0x0A YY YY YY YY Y Position (Float)
0x0E ZZ ZZ ZZ ZZ Z Position (Float)
0x12 02 Indicates Section Two
0x13 HH HH HH HH Horizontal Speed (Float)
0x17 VV VV VV VV Vertical Speed (Float)
0x1B 03 Indicates Section Three
0x1C RR RR RR RR Rotation (Float)
0x20 AA AA AA AA Acceleration (Float)
0x24 04 Indicates Section Four
0x25 PP PP PP PP Pitch (Float)
0x29 YY YY YY YY Yaw (Float)
0x2D RR RR RR RR Roll (Float)
0x31 05 Indicates Section Five
0x32 UU UU UU UU Unknown (Float)
0x36 00 Camera End

Camera Type 2 Structure

Address Value/Syntax Description
0x00 01 Start Of Camera
0x01 II II Camera Id
0x03 02 Unknown
0x04 01 Camera Type
0x05 01 Indicates Section One
0x06 XX XX XX XX X Position (Float)
0x0A YY YY YY YY Y Position (Float)
0x0E ZZ ZZ ZZ ZZ Z Position (Float)
0x12 02 Indicates Section Two
0x13 PP PP PP PP Pitch (Float)
0x17 YY YY YY YY Yaw (Float)
0x1B RR RR RR RR Roll (Float)
0x1F 00 Camera End

Camera Type 3 Structure

Address Value/Syntax Description
0x00 01 Start Of Camera
0x01 II II Camera Id
0x03 02 Unknown
0x04 01 Camera Type
0x05 01 Indicates Section One
0x06 XX XX XX XX X Position (Float)
0x0A YY YY YY YY Y Position (Float)
0x0E ZZ ZZ ZZ ZZ Z Position (Float)
0x12 02 Indicates Section Two
0x13 HH HH HH HH Horizontal Speed (Float)
0x17 VV VV VV VV Vertical Speed (Float)
0x1B 03 Indicates Section Three
0x1C RR RR RR RR Rotation (Float)
0x20 AA AA AA AA Acceleration (Float)
0x24 04 Indicates Section Four
0x25 PP PP PP PP Pitch (Float)
0x29 YY YY YY YY Yaw (Float)
0x2D RR RR RR RR Roll (Float)
0x31 05 Indicates Section Five
0x32 UU UU UU UU Unknown (Float)
0x36 06 Indicates Section Six
0x37 CC CC CC CC Close Distance (Float)
0x3B FF FF FF FF Far Distance (Float)
0x3F 00 Camera End

Camera Type 4 Structure

Address Value/Syntax Description
0x00 01 Start Of Camera
0x01 II II Camera Id
0x03 02 Unknown
0x04 01 Camera Type
0x05 01 Indicates Section One
0x06 UU UU UU UU Unknown (Float)
0x0A 00 Camera End

Lighting Structure

Address Value/Syntax Description
0x00 00 04 Start Of Lighting Section
0x02 List Of Lightings
-0x01 End Of Lighting Section

Lighting Structure

Address Value/Syntax Description
0x00 01 Section One Header
0x01 02 Section Two Header
0x02 XX XX XX XX X Position (Float)
0x06 YY YY YY YY Y Position (Float)
0x0A ZZ ZZ ZZ ZZ Z Position (Float)
0x0E 03 Section Three Header
0x0F UU UU UU UU Unknown (Float)
0x13 UU UU UU UU Unknown (Float)
0x17 04 Section Four Header
0x18 00 00 00 RR Red
0x1C 00 00 00 GG Green
0x20 00 00 00 BB Blue