2
Fork 0
Code Activity
Var Dump:
dumpVar: only available in dev mode
Mailing List
010-templates/vt2_unit_new.bt

63 lines
1.9 KiB
Text

//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
// File: vt2_unit_new.bt
// Authors: Lucas Schwiderski
// Version:
// Purpose:
// Category: Vermintide 2
// File Mask: *.unit
// ID Bytes: BA 00 00 00
// History:
//------------------------------------------------
uint32 version;
// Assuming "MeshGeometry" based on stot's "vkextract"
uint32 num_geometries;
typedef struct {
uint32 num_index_streams;
// One potential content for such a stream is vertex data: 4 half floats.
struct IndexStream {
uint32 data_size;
hfloat data[data_size / 2];
uint32 unknown_1;
uint32 unknown_2;
uint32 size;
uint32 stride;
} index_streams[num_index_streams] <optimize=false>;
uint32 num_streams;
struct Stream {
// One of the unknown uint32 is probably the `index` from .bsi
uint32 unknown_1;
// `0x11` -> "CT_FLOAT3", `0x0F` -> "CT_FLOAT2"
uint32 channel_type;
uint32 unknown_2;
// Probably the index into `index_streams`
uint32 index;
byte unknown_3;
} streams[num_streams];
struct StreamData {
uint32 unknown_1;
uint32 unknown_2;
// Apparently the number of vertices with position values
// that don't fit in a single short/uint16
// When > 0, indicates that following data should be read as uint32
// instead
uint32 unknown_3;
uint32 num_stream_data;
uint32 size_stream_data;
// this means each entrie's size is `size_stream_data / num_stream_data`
if (size_stream_data / num_stream_data == 2) {
uint16 stream_data[num_stream_data];
} else {
byte stream_data[size_stream_data];
}
} stream_data[num_streams];
} Geometry;
Geometry geometries[num_geometries] <optimize=false>;