Asobo Classes - widberg/fmtk GitHub Wiki

Information

The same warning about accuracy from the Asobo BigFile Format Specification entry applies to the class format pages. I recommend reading that entry first. The class specifications are regarding the serialized format found in BigFiles NOT the C++ object structure.

Older Versions

While there are some noticeable differences, ImZouna, the Chum World wiki, and zouna-templates-docs are incredibly useful. A number of the file formats are exactly the same and the remaining ones only require minor modifications in most cases.

Shared Structure Definitions

In addition to the usual Asobo File Format Idioms, the following structures are shared by some of the object formats. Furthermore, the Keyframer Classes are used extensively in objects like Animation_Z, MaterialAnim_Z, Particles_Z, and Rtc_Z.

struct Vec2f {
    float x;
    float y;
};

struct Vec2i16 {
    std::int16_t x;
    std::int16_t y;
};

struct Vec3f {
    float x;
    float y;
    float z;
};

struct Vec4f {
    float x;
    float y;
    float z;
    float w;
};

struct Vec3u32 {
    std::uint32_t x;
    std::uint32_t y;
    std::uint32_t z;
};

struct Vec3i32 {
    std::int32_t x;
    std::int32_t y;
    std::int32_t z;
};

struct Vec3i16 {
    std::int16_t x;
    std::int16_t y;
    std::int16_t z;
};

struct Quat {
    float i;
    float j;
    float k;
    float w;
};

struct Quati16 {
    std::int16_t i;
    std::int16_t j;
    std::int16_t k;
    std::int16_t w;
};

struct Mat3f {
    float data[3][3];
        // left to right top to bottom. Row major.
};

struct Mat4f {
    float data[4][4];
        // left to right top to bottom. Row major.
};

struct Sphere_Z {
    Vec3f center;
    float radius;
};

Headers

ResourceObject_Z : BaseObject_Z

struct ResourceObject_Z : BaseObject_Z { // 4
    crc32_t linkCRC32;
};
struct ResourceObject_Z : BaseObject_Z { // > 4
    crc32_t linkCRC32;
    PascalArray<crc32_t> crc32s;
};

Object_Z : ResourceObject_Z

Chum World TransformationHeader
zouna-templates-docs rat/GameObj_Z

enum ObjectType : u16 {
    Points_Z = 0,
    Surface_Z = 1,
    Spline_Z = 2,
    Skin_Z = 3,
    RotShape_Z = 4,
    Lod_Z = 5,
    Mesh_Z = 6,
    Camera_Z = 7,
    SplineZone_Z = 9,
    Occluder_Z = 10,
    CameraZone_Z = 11,
    Light_Z = 12,
    HFog_Z = 13,
    CollisionVol_Z = 14,
    Emiter_Z = 15,
    Omni_Z = 16,
    Graph_Z = 17,
    Particles_Z = 18,
    Flare_Z = 19,
    HField_Z = 20,
    Tree_Z = 21,
    GenWorld_Z = 22,
    Road_Z = 23,
    GenWorldSurface_Z = 24,
    SplineGraph_Z = 25,
    WorldRef_Z = 26,
};
struct Object_Z { // 98
    crc32_t linkCRC32;
    crc32_t dataCRC32;
        // The associated data object for this object or 0 if there is none
    Quat rot;
    Mat4f transform;
    float radius;
        // radius of the object
        // meshes use this in the close calculations
        //   if 0 then the object will never pop out
        //   how close the camera is allowed to get to the object before it pops out
        // particles also use this
    std::uint32_t flags;
        // 0x2 - mesh load additional field
        // 0x4 - set in a mesh but never checked
    ObjectType type;
};
struct Object_Z { // > 98
    crc32_t linkCRC32;
    PascalArray<crc32_t> crc32s;
    crc32_t dataCRC32;
        // The associated data object for this object or 0 if there is none
    Quat rot;
    Mat4f transform;
    float radius;
        // 0, 99.99999
    float flags;
    ObjectType type;
};

Data Classes

The engine uses a paradigm called Data Classes which is important to understand when working with BigFiles.

Classes

Class Name Status
Animation_Z Solvedish
Binary_Z Solved✔️
Bitmap_Z Tooled🎉
Camera_Z Tooled🎉
CollisionVol_Z Tooled🎉
Fonts_Z Tooled🎉
GameObj_Z Tooled🎉
GenWorld_Z Solved✔️
GwRoad_Z Tooled🎉
Keyframer*_Z Solved✔️
Light_Z Unused
LightData_Z Tooled🎉
Lod_Z Tooled🎉
LodData_Z Tooled🎉
Material_Z Solvedish
MaterialAnim_Z Solvedish
MaterialObj_Z Tooled🎉
Mesh_Z Solved✔️
MeshData_Z Tooled🎉
Node_Z Tooled🎉
Omni_Z Tooled🎉
Particles_Z Solvedish
ParticlesData_Z Solved✔️
RotShape_Z Tooled🎉
RotShapeData_Z Tooled🎉
Rtc_Z Solvedish
Skel_Z Solved✔️
Skin_Z Solved✔️
Sound_Z Tooled🎉
Spline_Z Solved✔️
SplineGraph_Z Solved✔️
Surface_Z Solvedish
SurfaceDatas_Z Solved✔️
UserDefine_Z Tooled🎉
Warp_Z Tooled🎉
World_Z Solvedish
WorldRef_Z Solved✔️

Status meanings in order of increasing completeness:

  • Unused: The format is not used in the game.
  • Unstructured: The format cannot be read or written and the field names and purposes are mostly unknown.
  • Structured: The format can be read and written but the field names and purposes are mostly unknown.
  • Solvedish: The format can be read and written and the field names and purposes are somewhat known.
  • Solved✔️: The format can be read and written and the field names and purposes are mostly known.
  • Tooled🎉: Tooling exists to edit the format in a reasonable way.
    • For simple formats, this could mean a bff export, or for more complex formats, a Blender addon
⚠️ **GitHub.com Fallback** ⚠️