STUD/Hero

From owdev
Jump to: navigation, search

Outlines the format for the 075 file blob. To see the generic STUD structure that wraps the blob and array definition, see STUD. The file always starts with a header struct.

Instance Table ID: 0x0640DC92294CCF91

Local ID: 0x91E7843A

Notes

Hero packages use the identifier key.

  1. 0x0000 is the master package, this file is typically in that package
  2. 0x1000 is the sound package, this package holds MOVI structures (relating to audio)
  3. 0x2000 is the string package, this package holds strings

This way you can easily get the strings and sounds from the package key of the package file of this hero.

Common Types

struct array_definition_t {
  uint64 count;
  uint64 offset;
}

struct record_t {
  uint64 padding;
  uint64 key;
}

child1_t

 // 40 bytes
 typedef struct {
   uint64_t  zero1;  //
   record_t  record; // unknown, 003 file
   uint32_t  unk1; 
   float     unk2;
   uint64_t  unk3;   // sometimes zero
 } child1_t;

child2_t

 // 48 bytes (or 40 bytes, padded to 48)
 typedef struct {
   uint64_t  zero1;  //
   record_t  record; // unknown, 003 file
   uint32_t  unk1; 
   float     unk2;
   uint32_t  unk3; 
   float     unk4;
   uint64_t  unk5;   // sometimes zero
 } child1_t;

STUHero

 struct header {
   uint id;
   uint next_instance;
   record_t  encryption;     \\ 07C file
   uint32_t  zero1;              \\
   uint32_t  unk1;               \\ guessing, may be ID.
   uint64_t  version;            \\ guessing, always 257
   record_t  abilities;          \\ contains all numerical data for abilities, 003 file
   record_t  name;               \\ hero name, 07C file
   record_t  zero2;              \\ zero key 
   record_t  zero_1300;          \\ added in 1.3.0.0
   record_t  virtual;            \\ virtual record of this hero? leads to a 01C file, which doesn't exist
   uint64_t  offset_virtuals;    \\ offset to virtual 06C record_t array, 06C files don't exist.
   uint64_t  zero4;              \\
   record_t* child_records[4];   \\ child records? 4 003 files
   uint64_t  offset_child1;      \\ offset to child1_t array, starts with array_definition
   uint64_t  zero5;              \\
   uint64_t  offset_child2;      \\ offset to child2_t array, starts with array_definition
   uint64_t  zero6;              \\ these zeros after offsets make me wonder if the system is 128-bit.
   record_t* texture_records[4]; \\ texture records. 4 004 files. icon + icon + portrait + banner
   uint64_t  offset_child3;      \\ offset to child2_t array, starts with array_definition
   uint64_t  zero7;              \\
   uint64_t  newzero8;           \\
   uint64_t  newzero9;           \\
   uint64_t  offset_binds;       \\ offset to 09E record_t array, starts with array_definition
   uint64_t  zero8;              \\
   uint64_t  zero9;              \\
   uint64_t  zero10;             \\
   record_t  item_master;        \\ inventory item master, 058 file
   uint16_t* zero11[35];         \\ a lot of zeroes, padding?
   uint16_t* unk2[9];            \\ random numbers?
   uint32_t  index;              \\ guessing, hero index
   uint32_t  type;               \\ guessing, tracer is 1, d.va is 3.
   uint32_t  unk4;               \\ always 3?
   uint32_t  unk5;               \\ always 1?
 }