User Tools

Site Tools


banjo_kazooie:setup_file_data

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
banjo_kazooie:setup_file_data [2023/07/18 00:08]
GiantJigglypuff3 Added Coloring To Avoid Confusion
banjo_kazooie:setup_file_data [2024/11/06 21:13] (current)
Bl00D4NGEL Improve documentation for model structures
Line 54: Line 54:
 | 0x0C | <color cyan>​RR</​color>​ | Rotation >> 1 (Y Axis) | | 0x0C | <color cyan>​RR</​color>​ | Rotation >> 1 (Y Axis) |
 | 0x0D | <color gray>​UU</​color>​ | Unknown Byte | | 0x0D | <color gray>​UU</​color>​ | Unknown Byte |
-| 0x0E | <color lightblue>​SS</​color>​ | Size |+| 0x0E | <color lightblue>​SS SS</​color>​ | Size |
 | 0x10 | <color violet>​CCC</​color>​ <color brown>​NNN</​color>​ | Nodes (C=Current, N=Next) | | 0x10 | <color violet>​CCC</​color>​ <color brown>​NNN</​color>​ | Nodes (C=Current, N=Next) |
 | 0x13 | 40 | End Of Object Indicator | | 0x13 | 40 | End Of Object Indicator |
Line 70: Line 70:
 | 0x0C | <color cyan>​TT</​color>​ | Timer | | 0x0C | <color cyan>​TT</​color>​ | Timer |
 | 0x0D | <color gray>​UU</​color>​ | Unknown Byte | | 0x0D | <color gray>​UU</​color>​ | Unknown Byte |
-| 0x0E | <color lightblue>​SS</​color>​ | Size |+| 0x0E | <color lightblue>​SS SS</​color>​ | Size |
 | 0x10 | <color violet>​CCC</​color>​ <color brown>​NNN</​color>​ | Nodes (C=Current, N=Next) | | 0x10 | <color violet>​CCC</​color>​ <color brown>​NNN</​color>​ | Nodes (C=Current, N=Next) |
 | 0x13 | 40 | End Of Object Indicator | | 0x13 | 40 | End Of Object Indicator |
Line 87: Line 87:
 | 0x0D | <color gray>​UU</​color>​ | Unknown Byte | | 0x0D | <color gray>​UU</​color>​ | Unknown Byte |
 | 0x0E | <color gray>​UU</​color>​ | Unknown Byte | | 0x0E | <color gray>​UU</​color>​ | Unknown Byte |
 +| 0x0F | <color gray>​UU</​color>​ | Unknown Byte |
 | 0x10 | <color cyan>​CCC</​color>​ <color lightblue>​NNN</​color>​ | Nodes (C=Current, N=Next) | | 0x10 | <color cyan>​CCC</​color>​ <color lightblue>​NNN</​color>​ | Nodes (C=Current, N=Next) |
 | 0x13 | 40 | End Of Object Indicator | | 0x13 | 40 | End Of Object Indicator |
Line 104: Line 105:
 | 0x0D | <color gray>​UU</​color>​ | Unknown Byte | | 0x0D | <color gray>​UU</​color>​ | Unknown Byte |
 | 0x0E | <color gray>​UU</​color>​ | Unknown Byte | | 0x0E | <color gray>​UU</​color>​ | Unknown Byte |
 +| 0x0F | <color gray>​UU</​color>​ | Unknown Byte |
 | 0x10 | <color lightblue>​CCC</​color>​ <color violet>​NNN</​color>​ | Nodes (C=Current, N=Next) | | 0x10 | <color lightblue>​CCC</​color>​ <color violet>​NNN</​color>​ | Nodes (C=Current, N=Next) |
 | 0x13 | 40 | End Of Object Indicator | | 0x13 | 40 | End Of Object Indicator |
Line 111: Line 113:
 === Sprite Structure === === Sprite Structure ===
 Sprites: 2D Objects that will face the camera at all times (aka Billboarding). 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 ^ ^ Address ^ Value/​Syntax ^ Description ^
-| 0x00 | <color red>OO OO</​color>​ | Object Id +| 0x00 | <color red   ​>SSSS SSSS SSSS PRRR</​color>​ | Sprite id, padding, RGB red 
-| 0x02 | <color orange>SS SS</​color>​ | Size |+| 0x02 | <color orange>GGGB BBSS SSSS SSMP</​color>​ | RGB green, RGB blue, scale, is mirror, padding ​|
 | 0x04 | <color yellow>​XX XX</​color>​ | X Position | | 0x04 | <color yellow>​XX XX</​color>​ | X Position |
-| 0x06 | <color green>YY YY</​color>​ | Y Position |+| 0x06 | <color green >YY YY</​color>​ | Y Position |
 | 0x08 | <color lightgreen>​ZZ ZZ</​color>​ | Z Position | | 0x08 | <color lightgreen>​ZZ ZZ</​color>​ | Z Position |
-| 0x0A | <color gray>UU</​color>​ | Unknown Byte +| 0x0A | <color gray>FFFF FPPP PPPP PPPP</​color>​ | Frame, padding ​
-0x0B | <color gray>UU</​color| Unknown Byte |+ 
 +Example(s) for the music notes on the shelve in Nabnuts house in autumn: 
 +{{:​banjo_kazooie:​bk_notes_nabnut_house_autumn.png?​400|}} 
 + 
 +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 
 +  * 0x164 = object id = Music Note (0x6D6 with offset) 
 +  * 0b0 = padding 
 +  * 0b000 = RGB red 
 +  * 0b000 = RGB green 
 +  * 0b000 = RGB blue 
 +  * 0b00101101 = scale 
 +  * 0b0 = is mirrored 
 +  * 0b0 = padding 
 + 
 +Next 6 bytes are the position: 
 +  * 0x0120 = X = 288 
 +  * 0x019D = Y = 413 
 +  * 0xFE9B = Z = -357 
 + 
 +Last 2 bytes are ''​0x4A 0xF0''​ in hex or ''​01001010 11110000''​ in binary 
 +  * 0b01001 = frame 
 +  * 0b010111100 = padding 
 +  * 0b0 = isModelProp -This is false for all "​Sprite structures"​ 
 +  * 0b0 = isActorProp -This is false for all "​Simple Object structures"​ 
 + 
 +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 
 +  * 0x164 = object id = Music Note 
 +  * 0b0 = padding 
 +  * 0b000 = RGB red 
 +  * 0b000 = RGB green 
 +  * 0b000 = RGB blue 
 +  * 0b00101101 = scale 
 +  * 0b1 = is mirrored 
 +  * 0b0 = padding 
 + 
 +Next 6 bytes are the position: 
 +  * 0x017E = X = 382 
 +  * 0x019D = Y = 413 
 +  * 0xFED8 = Z = -296 
 + 
 +Last 2 bytes are ''​0x21 0x10''​ in hex or ''​00100001 00010000''​ in binary 
 +  * 0b001000 = frame 
 +  * 0b01000100 = padding 
 +  * 0b0 = isModelProp -> This is false for all "​Sprite structures"​ 
 +  * 0b0 = isActorProp -> This is false for all "​Simple Object structures"​ 
 + 
 +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 
 +  * 0x164 = object id = Music Note 
 +  * 0b0 = padding 
 +  * 0b000 = RGB red 
 +  * 0b000 = RGB green 
 +  * 0b000 = RGB blue 
 +  * 0b00101101 = scale 
 +  * 0b0 = is mirrored 
 +  * 0b0 = padding 
 + 
 +Next 6 bytes are the position: 
 +  * 0x01D7 = X = 471 
 +  * 0x019D = Y = 413 
 +  * 0xFF15 = Z = -235 
 + 
 +Last 2 bytes are ''​0x1D 0xD0''​ in hex or ''​00011101 11010000''​ in binary 
 +  * 0b000111 = frame 
 +  * 0b01110100 = padding 
 +  * 0b0 = isModelProp -> This is false for all "​Sprite structures"​ 
 +  * 0b0 = isActorProp -> This is false for all "​Simple Object structures"​ 
 + 
 +=== 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.
  
-=== Static Structure === 
-Static: Objects that do not change unless given accompanied by a script object. 
 ^ Address ^ Value/​Syntax ^ Description ^ ^ Address ^ Value/​Syntax ^ Description ^
-| 0x00 | <color red>OO OO</​color>​ | Object ​Id | +| 0x00 | <color red   ​>MMMM MMMM MMMM PPPP</​color>​ | Model Id, padding
-| 0x02 | <color orange>RR</​color>​ | Rotation (Y Axis) +| 0x02 | <color orange>PP</​color>​ | Pitch 
-| 0x03 | <color yellow>​RR</​color>​ | Rotation (XZ Axis) |+| 0x03 | <color yellow>​RR</​color>​ | Roll |
 | 0x04 | <color green>XX XX</​color>​ | X Position | | 0x04 | <color green>XX XX</​color>​ | X Position |
 | 0x06 | <color lightgreen>​YY YY</​color>​ | Y Position | | 0x06 | <color lightgreen>​YY YY</​color>​ | Y Position |
 | 0x08 | <color cyan>ZZ ZZ</​color>​ | Z Position | | 0x08 | <color cyan>ZZ ZZ</​color>​ | Z Position |
-| 0x0A | <color lightblue>​SS</​color>​ | Size +| 0x0A | <color lightblue>​SS</​color>​ | Scale 
-| 0x0B | <color gray>​UU</​color>​ | Unknown Byte |+| 0x0B | <color gray>​UU</​color>​ | 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: 
 + 
 +{{:​banjo_kazooie:​bk_dust_bins_sm.png?​400|}} 
 + 
 + 
 +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 
 +  * 0x1C = model id = Dust bin (0x2ED with offset) 
 +  * 0b0100 = padding 
 + 
 +Next 2 bytes are pitch and roll which are used for the rotation of the model: 
 +  * 0x01 = Pitch 
 +  * 0x2B = Roll 
 + 
 +Next 6 bytes are the position: 
 +  * 0x1302 = X = 4866 
 +  * 0xFE30 = Y = -464 
 +  * 0x1AE9 = Z = 6889 
 + 
 +The last 2 bytes contain the scale and padding bits: 
 +  * 0x32 = scale (50) 
 +  * 0b110100 = padding 
 +  * 0b1 = isModelProp => This is true for all "Model structures"​ 
 +  * 0b0 = isActorProp => This is false for all "​Simple Object structures"​ 
 + 
 +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 
 +  * 0x1C = model id = Dust bin (0x2ED with offset) 
 +  * 0b0100 = padding 
 + 
 +Next 2 bytes are pitch and roll which are used for the rotation of the model: 
 +  * 0x41 = Pitch 
 +  * 0x00 = Roll 
 + 
 +Next 6 bytes are the position: 
 +  * 0x1281 = X = 4737 
 +  * 0xFE11 = Y = -495 
 +  * 0x1A3A = Z = 6714 
 + 
 +The last 2 bytes contain the scale and padding bits: 
 +  * 0x32 = scale (50) 
 +  * 0b010100 = padding 
 +  * 0b1 = isModelProp => This is true for all "Model structures"​ 
 +  * 0b0 = isActorProp => This is false for all "​Simple Object structures"​ 
 + 
 + 
 +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 
 +  * 0x1C = model id = Dust bin (0x2ED with offset) 
 +  * 0b0100 = padding 
 + 
 +Next 2 bytes are pitch and roll which are used for the rotation of the model: 
 +  * 0x00 = Pitch 
 +  * 0x01 = Roll 
 + 
 +Next 6 bytes are the position: 
 +  * 0x123A = X = 4666 
 +  * 0xFE0E = Y = -498 
 +  * 0x1AF0 = Z = 6896 
 + 
 +The last 2 bytes contain the scale and padding bits: 
 +  * 0x32 = scale (50) 
 +  * 0b110100 = padding 
 +  * 0b1 = isModelProp => This is true for all "Model structures"​ 
 +  * 0b0 = isActorProp => This is false for all "​Simple Object structures"​ 
 + 
  
 ===== Camera Structure ===== ===== Camera Structure =====
Line 145: Line 305:
 | 0x01 | <color red>II II</​color>​ | Camera Id | | 0x01 | <color red>II II</​color>​ | Camera Id |
 | 0x03 | 02 | Unknown | | 0x03 | 02 | Unknown |
-| 0x04 | 00 | Camera Type?/Camera End|+| 0x04 | 00 | Camera End |
  
 === Camera Type 1 Structure === === Camera Type 1 Structure ===
banjo_kazooie/setup_file_data.1689638908.txt.gz · Last modified: 2023/07/18 00:08 by GiantJigglypuff3