Formats/SSXTricky:PBD Level File
PBD Header
enum class eDataFormatType : byte {
GenericFormat,
Ps2Format,
XboxFormat,
NgcFormat
};
struct tPbdHeader {
byte version[3];
eDataFormatType format;
uint32 NumPlayerStarts;
uint32 NumPatches;
uint32 NumInstances;
uint32 NumParticleInstances;
uint32 NumMaterials;
uint32 NumMaterialBlocks;
uint32 NumLights;
uint32 NumSplines;
uint32 NumSplineSegments;
uint32 NumTextureFlips;
uint32 NumPrefabs;
uint32 NumParticleModels;
uint32 NumTextures;
uint32 NumCameras;
uint32 LightMapSize;
uint32 PlayerStartOffset;
uint32 PatchOffset;
uint32 InstanceOffset;
uint32 ParticleInstancesOffset;
uint32 MaterialOffset;
uint32 MaterialBlocksOffset;
uint32 LightsOffset;
uint32 SplineOffset;
uint32 SplineSegmentOffset;
uint32 TextureFlipOffset;
uint32 PrefabPointerOffset;
uint32 PrefabsOffset;
uint32 ParticleModelPointerOffset;
uint32 ParticleModelsOffset;
uint32 CameraPointerOffset;
uint32 CamerasOffset;
uint32 HashOffset;
uint32 MeshDataOffset
};
Patch Data
public struct Patch
{
Vector4 LightMapPoint;
Vector4 UVPoint1;
Vector4 UVPoint2;
Vector4 UVPoint3;
Vector4 UVPoint4;
Vector4 R4C4;
Vector4 R4C3;
Vector4 R4C2;
Vector4 R4C1;
Vector4 R3C4;
Vector4 R3C3;
Vector4 R3C2;
Vector4 R3C1;
Vector4 R2C4;
Vector4 R2C3;
Vector4 R2C2;
Vector4 R2C1;
Vector4 R1C4;
Vector4 R1C3;
Vector4 R1C2;
Vector4 R1C1;
Vector3 LowestXYZ;
Vector3 HighestXYZ;
Vector4 Point1;
Vector4 Point2;
Vector4 Point3;
Vector4 Point4;
uint32 PatchStyle;
uint32 Unknown1;
uint16 TextureAssigment;
uint16 LightmapID;
uint32 Unknown2;
uint32 Unknown3;
uint32 Unknown4;
}
Instance Data
public struct Instance
{
public Matrix4x4 matrix4X4;
public Vector4 Unknown1;
public Vector4 Unknown2;
public Vector4 Unknown3;
public Vector4 Unknown4;
public Vector4 Unknown5;
public Vector4 Unknown6;
public Vector4 Unknown7;
public Vector4 RGBA;
public int ModelID;
public int PrevInstance; //Seems to be used if instances are grouped together for animations (Mainly Fences)
public int NextInstance;
public Vector3 LowestXYZ;
public Vector3 HighestXYZ;
public uint32 UnknownInt8;
public uint32 UnknownInt9;
public uint32 UnknownInt10;
public uint32 ModelID2;
public uint32 UnknownInt11;
public uint32 UnknownInt12;
public uint32 UnknownInt13;
}
Particle Instances
public struct ParticleInstance
{
public Matrix4x4 matrix4X4;
public uint32 UnknownInt1;
public Vector3 LowestXYZ;
public Vector3 HighestXYZ;
public uint32 UnknownInt2;
public uint32 UnknownInt3;
public uint32 UnknownInt4;
public uint32 UnknownInt5;
public uint32 UnknownInt6;
}
Spline And Spline Segment Data
public struct Spline
{
Vector3 LowestXYZ;
Vector3 HighestXYZ;
uint32 Unknown1;
uint32 SplineSegmentCount;
uint32 SplineSegmentPosition;
uint32 Unknown2;
}
public struct SplinesSegments
{
Vector4 Point4;
Vector4 Point3;
Vector4 Point2;
Vector4 ControlPoint;
Vector4 ScalingPoint; //Not really sure about that
uint32 PreviousSegment;
uint32 NextSegment;
uint32 SplineParent;
Vector3 LowestXYZ;
Vector3 HighestXYZ;
float SegmentDisatnce;
float PreviousSegmentsDistance;
uint32 Unknown1;
}