Skip to content

META, XML and identifier hashes

RAGEData modelApplies toGTA V

META resources describe their own structures, enums and data blocks. A structure description gives its hashed name, byte size and fields; each field gives a hashed name, offset, kind and referenced type. Maps (ymap) and archetype dictionaries (ytyp) use this representation. Proven

The structural census covers every YMAP and YTYP copy in every archive: 19,941 maps and 2,869 archetype files. Every root, array and pointer decodes through the stored descriptions with no refused files or unreached data-block bytes. The proven header, field and kind descriptions below have that scope; the separate RBF examples do not. Proven · all YMAP and YTYP entries

META’s block references pack a 1-based block ID in the low 12 bits and a byte offset in the next 20 bits. An array of structures can continue at the beginning of the next block when it outgrows one block. Proven

Schema identifiers are case-sensitive Jenkins hashes: CMapData hashes to 0xD3593FA6. Asset names normally use lowercase joaat instead. Applying case folding to a schema identifier changes the lookup. Proven

The Jenkins one-at-a-time mix starts with h = 0. For each byte: add the byte, add h << 10, then XOR h >> 6. After the final byte: add h << 3, XOR h >> 11, then add h << 15; additions wrap at 32 bits. Sourced · CodeWalker

The NG cipher has a separate lookup-table-based name hash; it does not share the plain filename-hash procedure. Sourced · CodeWalker

The following offsets are in the decoded resource’s system root, not in the compressed file. Proven

META root header112 bytes43% known
ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x016bytesresource baseSourced
0x104u32 = 0x50524430identifierProven
0x142u16 = 0x79header versionProven
0x161u8encrypted strings flagSourced0 or 1; CodeWalker's HasEncryptedStrings
0x175bytesunknown bytesUnknownzero in accepted resources
0x1C4u32root block IDProven
0x208pointerstructure descriptionsProven
0x288pointerenum descriptionsProven
0x308pointerdata block tableProven
0x388pointername stringProven
0x408pointerencrypted stringsSourcedCodeWalker's pointer to the encrypted strings
0x482u16structure countProven
0x4A2u16enum countProven
0x4C2u16block countProven
0x4E34bytesunknown tailUnknownzero in accepted resources

A structure description’s word at offset 8 is an alignment code, n << 8 with n from 0 to 4 (0, 256, 512, 768, 1024), n being the base-2 logarithm of the alignment. In ragekit’s count over Legacy files it equals the alignment of the widest field in 38,377 of 39,225 descriptions. Sourced · ragekit

META field description16 bytes94% known
ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x04u32field name hashProven
0x44u32byte offsetProven
0x81u8kindProven
0x91u8unknownUnknown
0xA2i16reference indexProven
0xC4u32reference keyProven
Kind code Representation Confidence
0x01 Boolean Proven
0x10–0x15 Signed/unsigned 8-, 16- and 32-bit integers, in pairs Proven
0x21, 0x33, 0x34 Float, vec3, vec4 Proven
0x4A Hash Proven
0x05, 0x07 Inline structure, structure pointer Proven
0x52 Array Proven
0x40, 0x44, 0x50, 0x59 Fixed characters, character pointer, inline data, data block Proven
0x60, 0x62–0x65 Enum/flag variants Proven

Mount and water configuration includes text XML. Other configuration, including gtxd.ymt, uses RBF, a binary element tree beginning with RBF0. The extension .ymt alone therefore does not identify META. Observed

RBF records use a descriptor-index byte and type byte. A previously unseen descriptor introduces a 16-bit name length and name. Element-open records carry three 16-bit words, the third counting attributes. Observed

RBF type/marker Value Confidence
0x00 Open element Observed
0x10 u32 Observed
0x20, 0x30 True, false Observed
0x40, 0x50 Float, three floats Observed
0x60 String with 16-bit length Observed
FF FF Close element Observed
FD FF Text, with 32-bit byte length Observed
What do the unnamed META header and field bytes control?

Their locations are known, but zero values or a limited value range do not establish their meaning. Unknown