126 lines
No EOL
4 KiB
Text
126 lines
No EOL
4 KiB
Text
//------------------------------------------------
|
|
//--- 010 Editor v12.0.1 Binary Template
|
|
//
|
|
// File: vt2_level.bt
|
|
// Authors: Lucas Schwiderski
|
|
// Version:
|
|
// Purpose:
|
|
// Category: Vermintide 2
|
|
// File Mask: *.level
|
|
// ID Bytes: B5 00 00 00
|
|
// History:
|
|
//------------------------------------------------
|
|
// See <https://gitlab.com/IstotI/vtextract/-/blob/master/Assets%20Types/Converters/LevelConversion.cs>
|
|
|
|
typedef struct {
|
|
float x;
|
|
float y;
|
|
float z;
|
|
} Vector3;
|
|
|
|
typedef struct {
|
|
float x;
|
|
float y;
|
|
float z;
|
|
float w;
|
|
} Quaternion;
|
|
|
|
typedef struct {
|
|
uint32 unknown_1 <format=hex>;
|
|
uint32 unknown_2 <format=hex>;
|
|
// unknown before this
|
|
// maps directly to the keys of the same name, as murmur64 hashes
|
|
uint64 id_hash <format=hex>; // has to be there
|
|
uint64 name_hash <format=hex>; // Will be `0x0` when no name was given
|
|
uint64 type_hash <format=hex>; // has to be there
|
|
uint64 material_hash <format=hex>; // will be `0x0` when not given
|
|
|
|
// defaults to 0, 0, 0
|
|
Vector3 pos;
|
|
// defaults to 0, 0, 0, 0
|
|
Quaternion rot;
|
|
// Not sure why they felt the need to abbreviate "scale". Defaults to 1, 1, 1
|
|
Vector3 scl;
|
|
// unknown after this
|
|
} Unit;
|
|
|
|
typedef struct {
|
|
uint32 name <format=hex>; // murmur64-half
|
|
uint64 resource <format=hex>; // murmur64
|
|
} Material;
|
|
|
|
typedef struct {
|
|
uint32 unit_id;
|
|
uint32 num_materials;
|
|
|
|
Material materials[num_materials];
|
|
} UnitMaterials;
|
|
|
|
// File Parsing
|
|
|
|
uint32 version <format=hex>; // correct
|
|
uint32 num_units; // correct
|
|
uint32 num_background_units; // correct
|
|
|
|
uint32 section_address_unit_data <format=hex>; //Unit Data & Level Settings
|
|
uint32 section_address_unknown1 <format=hex>;
|
|
uint32 section_address_prototypes <format=hex>;
|
|
uint32 section_address_prototypes_data_size <format=hex>; //Or adress to prototypes collision
|
|
uint32 section_address_unknown2 <format=hex>;
|
|
uint32 section_address_unknown3 <format=hex>;
|
|
uint32 section_address_unknown4 <format=hex>;
|
|
uint32 section_address_unknown5 <format=hex>;
|
|
uint32 section_address_unknown6 <format=hex>;
|
|
uint32 section_address_unknown7 <format=hex>;
|
|
uint32 section_address_unknown8 <format=hex>;
|
|
uint32 section_address_level_settings <format=hex>;
|
|
uint32 particles_count;
|
|
uint32 section_address_particles <format=hex>;
|
|
uint32 section_address_unknown12 <format=hex>;
|
|
uint32 section_address_unknown13 <format=hex>;
|
|
uint32 section_address_unknown14 <format=hex>;
|
|
uint32 section_address_unknown15 <format=hex>;
|
|
uint32 section_address_unknown16 <format=hex>;
|
|
uint32 section_address_unknown17 <format=hex>;
|
|
uint32 section_address_unknown18 <format=hex>;
|
|
uint32 section_address_unknown19 <format=hex>;
|
|
uint32 section_address_unknown20 <format=hex>;
|
|
uint32 section_address_unknown21 <format=hex>;
|
|
uint32 section_address_unknown22 <format=hex>;
|
|
uint32 section_address_stories <format=hex>;
|
|
uint32 section_address_unknown24 <format=hex>;
|
|
uint32 section_address_unknown25 <format=hex>;
|
|
uint32 section_address_unknown26 <format=hex>;
|
|
uint32 section_address_unknown27 <format=hex>;
|
|
uint32 section_address_unknown28 <format=hex>;
|
|
uint32 section_address_unknown29 <format=hex>;
|
|
uint32 section_address_unit_materials <format=hex>;
|
|
uint32 section_address_unknown31 <format=hex>;
|
|
uint32 section_address_unknown32 <format=hex>;
|
|
uint32 section_address_unknown33 <format=hex>;
|
|
|
|
uint32 num_settings_entries;
|
|
|
|
// section start: unit, position unknown:
|
|
Unit units[num_units];
|
|
|
|
FSeek(section_address_unit_materials);
|
|
uint32 num_unit_materials;
|
|
UnitMaterials unit_materials[num_unit_materials];
|
|
|
|
// section end
|
|
|
|
uint32 len_sound_environment; // position unknown
|
|
byte sound_environment[len_sound_environment];
|
|
|
|
if (len_sound_environment < 4) {
|
|
byte padding_1[4 - (len_sound_environment % 4)]; // guess
|
|
}
|
|
byte unknown_3[3 * 4];
|
|
|
|
uint32 len_timpani_sound_environment; // position unknown
|
|
byte timpani_sound_environment[len_timpani_sound_environment];
|
|
|
|
if (len_timpani_sound_environment < 4) {
|
|
byte padding_2[4 - (len_timpani_sound_environment % 4)]; // guess
|
|
} |