User Tools

Site Tools


banjo_kazooie:setup_file_data

This is an old revision of the document!


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).

Address Value/Syntax Description
0x00 OO OO Object Id
0x02 SS SS Size
0x04 XX XX X Position
0x06 YY YY Y Position
0x08 ZZ ZZ Z Position
0x0A UU Unknown Byte
0x0B UU Unknown Byte

Static Structure

Static: Objects that do not change unless given accompanied by a script object.

Address Value/Syntax Description
0x00 OO OO Object Id
0x02 RR Rotation (Y Axis)
0x03 RR Rotation (XZ Axis)
0x04 XX XX X Position
0x06 YY YY Y Position
0x08 ZZ ZZ Z Position
0x0A SS Size
0x0B UU Unknown Byte

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 Type?/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
banjo_kazooie/setup_file_data.1691060261.txt.gz · Last modified: 2023/08/03 10:57 by minirop