Difference between revisions of "BSP (File Format)"
Jump to navigation
Jump to search
m |
m |
||
Line 1: | Line 1: | ||
− | '''BSP''' is a file format that contains vehicle collision data. BSP files are found in the bsp directory in [[Filesystem/Race/Common.szs| | + | '''BSP''' ('''B'''inary '''S'''etting '''P'''arameter) is a file format that contains vehicle collision data. BSP files are found in the ''bsp'' directory in [[Filesystem/Race/Common.szs|Common.szs]]. |
== File Format == | == File Format == | ||
Line 23: | Line 23: | ||
| 0x1fc || wheel[2] || Unused. For karts, the game reuses the two previous definitions with a negated X position. | | 0x1fc || wheel[2] || Unused. For karts, the game reuses the two previous definitions with a negated X position. | ||
|- | |- | ||
− | | 0x254 || f32 || Maximum vertical distance | + | | 0x254 || f32 || Maximum vertical distance of the vehicle body's rumble animation. |
|- | |- | ||
| 0x258 || f32 || Speed of the vehicle body's rumble animation. | | 0x258 || f32 || Speed of the vehicle body's rumble animation. | ||
Line 33: | Line 33: | ||
{| class="wikitable" | {| class="wikitable" | ||
|+ hitbox substructure | |+ hitbox substructure | ||
− | |||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || bu16 || Enable. | + | | 0x00 || bu16 || Enable flag. |
|- | |- | ||
| 0x02 || u16 || Padding. | | 0x02 || u16 || Padding. | ||
Line 54: | Line 53: | ||
{| class="wikitable" | {| class="wikitable" | ||
|+ wheel substructure | |+ wheel substructure | ||
− | |||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || bu16 || Enable. | + | | 0x00 || bu16 || Enable flag. |
|- | |- | ||
| 0x02 || u16 || Padding. | | 0x02 || u16 || Padding. | ||
Line 79: | Line 77: | ||
| 0x2c || colspan=2 {{unknown|End of substructure.}} | | 0x2c || colspan=2 {{unknown|End of substructure.}} | ||
|} | |} | ||
+ | |||
+ | == Tools == | ||
+ | The following tools can handle BSP files: | ||
+ | * [[BSP Table]], by [[Atlas]]. | ||
[[Category:File Format/MKW]] | [[Category:File Format/MKW]] |
Revision as of 01:02, 17 December 2020
BSP (Binary Setting Parameter) is a file format that contains vehicle collision data. BSP files are found in the bsp directory in Common.szs.
File Format
Offset | Type | Description |
---|---|---|
0x00 | f32 | Initial Y position. If a collision is found, the normal to the floor multiplied by this value is added to the position from the KMP. |
0x04 | hitbox[16] | An array of 16 hitboxes. |
0x184 | vec3 | First cuboid dimensions for the inertia tensor, with mass 1. |
0x190 | vec3 | Second cuboid dimensions for the inertia tensor, with mass 12. |
0x19c | f32 | A value that also affects rotation speed. |
0x1a0 | f32 | Unknown. |
0x1a4 | wheel | For bikes, the front wheel. For karts, the front right wheel. |
0x1d0 | wheel | For bikes, the back wheel. For karts, the back right wheel. |
0x1fc | wheel[2] | Unused. For karts, the game reuses the two previous definitions with a negated X position. |
0x254 | f32 | Maximum vertical distance of the vehicle body's rumble animation. |
0x258 | f32 | Speed of the vehicle body's rumble animation. |
0x25c | End of file. |
Offset | Type | Description |
---|---|---|
0x00 | bu16 | Enable flag. |
0x02 | u16 | Padding. |
0x04 | vec3 | Sphere center position. |
0x10 | f32 | Sphere radius. |
0x14 | bu16 | Only collide with walls. |
0x16 | u16 | Unknown. |
0x18 | End of substructure. |
Offset | Type | Description |
---|---|---|
0x00 | bu16 | Enable flag. |
0x02 | u16 | Padding. |
0x04 | f32 | Suspension factor that multiplies the distance between the current position and the bottommost position. |
0x08 | f32 | Suspension factor that multiplies the wheel speed on the vertical axis. |
0x0c | f32 | Distance between the topmost and the bottommost wheel positions. |
0x10 | vec3 | Wheel center position. For bikes' front wheel, this is relative to the handle position and rotation from bikePartsDispParam.bin. |
0x1c | f32 | Wheel X rotation. Always zero. |
0x20 | f32 | Wheel radius. |
0x24 | f32 | Sphere radius used for collision detection. The difference between this value and the previous one is added to the wheel center to get the sphere center. 43 most of the time. |
0x28 | u32 | Unknown. |
0x2c | End of substructure. |
Tools
The following tools can handle BSP files: