-
Notifications
You must be signed in to change notification settings - Fork 0
Asobo File Format Idioms
This page contains various common structures found across many of the file formats. Be on the lookout for these. Consider this a quick reference.
struct PascalString {
std::uint32_t size;
char string[size];
};
Non-null terminated Pascal string.
struct PascalStringNULL {
std::uint32_t size;
char string[size - 1];
char null;
};
Null terminated Pascal string.
template<std::size_t size>
struct FixedStringNULL {
char string[size];
};
Null terminated fixed-size string buffer.
template<class T, class U = std::uint32_t>
struct PascalArray {
U size;
T data[size];
};
A Pascal array is any contiguous array of data prefixed by its length. This terminology is a generalization of the commonly used Pascal string which serves an identical function although limits itself to arrays of characters. By prefixing the array with its length the application reading the file may allocate sufficient space for the array before reading it from the file making it more efficient than scanning for a sentinel and seeking back to the beginning of the data after calculating the length of the array using the difference in file pointers from the beginning and end of the array.
template<class T, class U, class V>
struct AssociativeArray {
PascalArray<T> values;
PascalArray<U> indices;
PascalArray<V> associatedValues;
};
The indices
array contains information mapping values in values
to an associated value in associatedValues
this mapping may be 1-to-1 or many-to-1. The associated value for a value at index i
in values
is associatedValues[indices[i]]
. U
is usually either std::uint32_t
or std::uint8_t
depending on the anticipated size of the associatedValues
array.
template<class T, class U>
struct Pair {
T key;
U value;
};
template<class T, class U>
using Map = PascalArray<Pair<T, U>>;
T
is usually a crc32_t
. Sometimes it is a std::uint32_t
representing an index or unique ID of some kind. 1-to-1 map.
template<class T, class U = std::uint8_t>
struct Optional {
U isSome;
if (isSome != 0)
{
T data;
}
};
using crc32_t = std::uint32_t;
Same as a std::uint32_t with the semantic distinction that the value must be a valid object path hash or 0.
For FMTK Users and Mod Developers
For FMTK Developers
Asobo BigFile Format Specification
Asobo Classes
Animation_Z
Binary_Z
Bitmap_Z
Camera_Z
CollisionVol_Z
Fonts_Z
GameObj_Z
GenWorld_Z
GwRoad_Z
Keyframer*_Z
Light_Z
LightData_Z
Lod_Z
LodData_Z
Material_Z
MaterialAnim_Z
MaterialObj_Z
Mesh_Z
MeshData_Z
Node_Z
Omni_Z
Particles_Z
ParticlesData_Z
RotShape_Z
RotShapeData_Z
Rtc_Z
Skel_Z
Skin_Z
Sound_Z
Spline_Z
SplineGraph_Z
Surface_Z
SurfaceDatas_Z
UserDefine_Z
Warp_Z
World_Z
WorldRef_Z
Asobo File Format Idioms
Asobo CRC32
Asobo LZ Compression
Asobo Arithmetic Coding Compression
Asobo Save Game File Format Specification
Asobo Audio Formats
TotemTech/ToonTech/Zouna/ACE/BSSTech/Opal Timeline
Zouna Modding Resources
Miscellaneous