AttribSys Vault: Difference between revisions
m (Updated common data type links.) |
(Added breakdown and replaced Node with AttribEntry.) |
||
(28 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ParadiseResourceTypeInfobox |
|||
| name = AttribSysVault |
|||
| resourcenames = BurnoutGlobalData<br />CameraVault<br />Engine name, e.g. C5_EN<br />postfxvault<br />surfacelist<br />*_AttribSys<br /><sup><small>*Vehicle ID, e.g. PUSMC01</small></sup><br />WorldVault |
|||
| id = 0x1C |
|||
| category = Generic |
|||
| memdist = Main Memory only |
|||
| editor = Vehicles only<br />Use [https://github.com/burninrubber0/Bundle-Manager/releases/latest Bundle Manager] |
|||
⚫ | |||
AttribSys vault resources act as a database which holds attributes for vehicles, engines, surfaces and more. They are split into the vault, which holds information needed to access the data, and the bin, which holds the actual attribute data. Vaults work with the [[AttribSys schema]] found in the executable. |
AttribSys vault resources act as a database which holds attributes for vehicles, engines, surfaces and more. They are split into the vault, which holds information needed to access the data, and the bin, which holds the actual attribute data. Vaults work with the [[AttribSys schema]] found in the executable. |
||
Line 5: | Line 14: | ||
==== 32-bit ==== |
==== 32-bit ==== |
||
{| class="wikitable" |
{| class="wikitable" |
||
⚫ | |||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
Line 19: | Line 27: | ||
==== 64-bit ==== |
==== 64-bit ==== |
||
{| class="wikitable" |
{| class="wikitable" |
||
⚫ | |||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
Line 26: | Line 33: | ||
| 0x8 || 0x4 || uint32_t || muVltSizeInBytes || || |
| 0x8 || 0x4 || uint32_t || muVltSizeInBytes || || |
||
|- |
|- |
||
| 0xC || 0x4 || || || |
| 0xC || 0x4 || || || Padding || |
||
|- |
|- |
||
| 0x10 || 0x8 || uint8_t* || mpau8BinData || || |
| 0x10 || 0x8 || uint8_t* || mpau8BinData || || |
||
|- |
|- |
||
| 0x18 || 0x4 || uint32_t || muBinSizeInBytes || || |
| 0x18 || 0x4 || uint32_t || muBinSizeInBytes || || |
||
|} |
|||
== Common substructures == |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
| 0x0 || 0x2 || uint16_t || mAlloc || Number of entries allocated || |
|||
⚫ | |||
| 0x2 || 0x2 || uint16_t || mCount || Number of entries used || |
|||
⚫ | |||
| 0x4 || 0x2 || uint16_t || mSize || The length of each entry || |
|||
⚫ | |||
| 0x6 || 0x2 || uint16_t || mEncodedTypePad || Padding || |
|||
⚫ | |||
=== Attrib::RefSpec === |
|||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
⚫ | |||
| 0x0 || 0x8 || [[Attribute hash|Key]] || mClassKey || || |
|||
⚫ | |||
| 0x8 || 0x8 || [[Attribute hash|Key]] || mCollectionKey || || |
|||
⚫ | |||
| 0x10 || 0x4 || Collection* || mCollectionPtr || || Always nullptr in resource |
|||
⚫ | |||
⚫ | |||
|} |
|} |
||
= Vault = |
= Vault = |
||
[[File:PUSMC01 AttribSys Breakdown.svg|thumb|A breakdown diagram of the Cavalry's vault.]] |
|||
⚫ | |||
⚫ | |||
* '''Vers''': The version |
* '''Vers''': The version |
||
* '''DepN''': The dependency node |
* '''DepN''': The dependency node |
||
Line 44: | Line 80: | ||
=== Attrib::Vault::ChunkBlock === |
=== Attrib::Vault::ChunkBlock === |
||
{| class="wikitable" |
{| class="wikitable" |
||
⚫ | |||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
Line 53: | Line 88: | ||
== Version == |
== Version == |
||
=== Attrib::Vault::VersionNode === |
|||
{| class="wikitable" |
{| class="wikitable" |
||
⚫ | |||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock |
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || || Base class || |
||
|- |
|- |
||
| 0x8 || 0x8 || uint64_t || mVersion || Version hash || |
| 0x8 || 0x8 || uint64_t || mVersion || Version hash || |
||
Line 65: | Line 100: | ||
=== Attrib::Vault::DependencyNode === |
=== Attrib::Vault::DependencyNode === |
||
{| class="wikitable" |
{| class="wikitable" |
||
⚫ | |||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock |
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || || Base class || |
||
|- |
|- |
||
| 0x8 || 0x8 || [[Attribute hash |
| 0x8 || 0x8 || [[Attribute hash|HashInt]] || mCount || Number of dependencies || |
||
|} |
|} |
||
This structure is immediately followed by the [[Attribute hash |
This structure is immediately followed by the [[Attribute hash|hashes]] of the dependency strings, then the offsets of the strings relative to the start of the first string, then the strings themselves. |
||
== Start node == |
== Start node == |
||
There is no data after the ChunkBlock. |
|||
{| class="wikitable" |
{| class="wikitable" |
||
⚫ | |||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock |
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || || Base class || |
||
⚫ | |||
⚫ | |||
|} |
|} |
||
Size is 16 bytes, but the final 8 bytes is always null. This node appears to not be read by the game. |
|||
== Data node == |
== Data node == |
||
{| class="wikitable" |
{| class="wikitable" |
||
⚫ | |||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock |
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || || Base class || |
||
|} |
|} |
||
This is followed by several [[#Attrib::CollectionLoadData |
This is followed by several [[#Attrib::CollectionLoadData|collections]]. |
||
This node is not read directly. Pointers in other nodes read the data that lies in this node. |
|||
=== Attrib::CollectionLoadData === |
=== Attrib::CollectionLoadData === |
||
{| class="wikitable" |
{| class="wikitable" |
||
⚫ | |||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x8 || [[Attribute hash |
| 0x0 || 0x8 || [[Attribute hash|Key]] || mKey || || |
||
|- |
|- |
||
| 0x8 || 0x8 || [[Attribute hash |
| 0x8 || 0x8 || [[Attribute hash|Key]] || mClass || || |
||
|- |
|- |
||
| 0x10 || 0x8 || [[Attribute hash |
| 0x10 || 0x8 || [[Attribute hash|Key]] || mParent || || |
||
|- |
|- |
||
| 0x18 || 0x4 || uint32_t || mTableReserve || Amount allocated for entries || |
| 0x18 || 0x4 || uint32_t || mTableReserve || Amount allocated for entries || |
||
Line 116: | Line 151: | ||
| 0x26 || 0x2 || uint16_t || mTypesLen || Amount allocated for types || |
| 0x26 || 0x2 || uint16_t || mTypesLen || Amount allocated for types || |
||
|- |
|- |
||
| 0x28 || 0x4 || void* || mLayout || |
| 0x28 || 0x4 || void* || mLayout || || Always nullptr in resource |
||
|- |
|- |
||
| |
| 0x2C || 0x4 || || || Padding || |
||
|} |
|} |
||
This is always followed by the types, then the |
This is always followed by the types, then the [[#Attrib::CollectionLoadData::AttribEntry|entries]]. |
||
=== Attrib:: |
=== Attrib::CollectionLoadData::AttribEntry === |
||
{| class="wikitable" |
{| class="wikitable" |
||
⚫ | |||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x8 || [[Attribute hash |
| 0x0 || 0x8 || [[Attribute hash|Key]] || mKey || || |
||
|- |
|- |
||
| 0x8 || 0x4 || |
| 0x8 || 0x4 || void* || mData || || |
||
|- |
|- |
||
| 0xC || 0x2 || uint16_t || |
| 0xC || 0x2 || uint16_t || mType || || |
||
|- |
|- |
||
| 0xE || 0x1 || uint8_t || |
| 0xE || 0x1 || uint8_t || mNodeFlags || || |
||
|- |
|- |
||
| 0xF || 0x1 || uint8_t || |
| 0xF || 0x1 || uint8_t || mEntryFlags || || |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
| 0x4 || uintptr_t || mValue || || |
|||
⚫ | |||
| 0x4|| uintptr_t || mOffset || || |
|||
|} |
|} |
||
Line 156: | Line 176: | ||
=== Attrib::Vault::ExportNode === |
=== Attrib::Vault::ExportNode === |
||
{| class="wikitable" |
{| class="wikitable" |
||
⚫ | |||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock |
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || || Base class || |
||
|- |
|- |
||
| 0x8 || 0x8 || [[Attribute hash |
| 0x8 || 0x8 || [[Attribute hash|HashInt]] || mCount || Number of exports || |
||
|} |
|} |
||
Followed by [[#Attrib::Vault::ExportEntry |
Followed by [[#Attrib::Vault::ExportEntry|export entries]] of an amount defined by <code>mCount</code>. |
||
=== Attrib::Vault::ExportEntry === |
=== Attrib::Vault::ExportEntry === |
||
{| class="wikitable" |
{| class="wikitable" |
||
⚫ | |||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x8 || [[Attribute hash |
| 0x0 || 0x8 || [[Attribute hash|ExportID]] || mID || || |
||
|- |
|- |
||
| 0x8 || 0x8 || [[Attribute hash |
| 0x8 || 0x8 || [[Attribute hash|TypeID]] || mType || || |
||
|- |
|- |
||
| 0x10 || 0x4 || uint32_t || mDataBytes || || |
| 0x10 || 0x4 || uint32_t || mDataBytes || Size of the data node entry || |
||
|- |
|- |
||
| 0x14 || 0x4 || uint32_t || mDataOffset || || |
| 0x14 || 0x4 || uint32_t || mDataOffset || Offset of the entry in the data node || Relative to vlt start |
||
|} |
|} |
||
Line 183: | Line 201: | ||
=== Attrib::Vault::PointerNode === |
=== Attrib::Vault::PointerNode === |
||
{| class="wikitable" |
{| class="wikitable" |
||
⚫ | |||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock |
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || || Base class || |
||
|} |
|} |
||
Followed by several [[#Attrib::PtrRef |
Followed by several [[#Attrib::PtrRef|PtrRefs]]. |
||
=== Attrib::PtrRef === |
=== Attrib::PtrRef === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x4 || uint32_t || mFixupOffset || || |
| 0x0 || 0x4 || uint32_t || mFixupOffset || The offset at which to write the offset || Relative to the beginning of the dependency.<br />The area pointed to is normally null and allocated specifically for this |
||
|- |
|- |
||
| 0x4 || 0x2 || uint16_t || mPtrType || || |
| 0x4 || 0x2 || uint16_t || mPtrType || Pointer type || See [[#EPtrRefType|type]]. |
||
|- |
|- |
||
| 0x6 || 0x2 || uint16_t || mIndex || || |
| 0x6 || 0x2 || uint16_t || mIndex || Which dependency the value is relative to || 0 is normally the vault<br />1 is normally the bin |
||
|- |
|- |
||
| 0x8 || 0x8 || [[#Attrib::PtrRef::anon_union_0 |
| 0x8 || 0x8 || [[#Attrib::PtrRef::anon_union_0|anon_union_0]] || field_3 || Value || |
||
|} |
|} |
||
=== Attrib::PtrRef::anon_union_0 === |
=== Attrib::PtrRef::anon_union_0 === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Length !! Type !! Name !! Description !! Comments |
! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x8 || [[Attribute hash |
| 0x8 || [[Attribute hash|ExportID]] || mExportID || || |
||
|- |
|- |
||
| 0x8 || [[Attribute hash |
| 0x8 || [[Attribute hash|HashInt]] || mOffset || || |
||
⚫ | |||
=== EPtrRefType === |
|||
Information from Need for Speed ProStreet (RU PS2). |
|||
{| class="wikitable" |
|||
! Name !! Value !! Comments |
|||
⚫ | |||
| PtrEnd || 0 || End of the pointer node |
|||
⚫ | |||
| PtrNull || 1 || |
|||
⚫ | |||
| PtrSetFixupTarget || 2 || Via its index, marks which dependency the fixup pointers after this pointer are relative to |
|||
⚫ | |||
| PtrDepRelative || 3 || Relative to the beginning of the dependency |
|||
⚫ | |||
| PtrExport || 4 || |
|||
|} |
|} |
||
Line 219: | Line 251: | ||
* '''StrE''': The string exports |
* '''StrE''': The string exports |
||
The rest of the data in the bin is not associated to a chunk and is instead pointed to by the vault. |
|||
⚫ | |||
⚫ | |||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock |
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || || Base class || |
||
|} |
|} |
||
Latest revision as of 06:31, 22 March 2024
AttribSysVault | |
---|---|
Resource names | BurnoutGlobalData CameraVault Engine name, e.g. C5_EN postfxvault surfacelist *_AttribSys *Vehicle ID, e.g. PUSMC01 WorldVault |
Type ID | 0x1C |
Category | Generic |
Memory distribution |
Main Memory only |
Editor available? |
Vehicles only Use Bundle Manager |
AttribSys vault resources act as a database which holds attributes for vehicles, engines, surfaces and more. They are split into the vault, which holds information needed to access the data, and the bin, which holds the actual attribute data. Vaults work with the AttribSys schema found in the executable.
Structures
CgsResource::AttribSysVaultResource
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | uint8_t* | mpau8VltData | ||
0x4 | 0x4 | uint32_t | muVltSizeInBytes | ||
0x8 | 0x4 | uint8_t* | mpau8BinData | ||
0xC | 0x4 | uint32_t | muBinSizeInBytes |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | uint8_t* | mpau8VltData | ||
0x8 | 0x4 | uint32_t | muVltSizeInBytes | ||
0xC | 0x4 | Padding | |||
0x10 | 0x8 | uint8_t* | mpau8BinData | ||
0x18 | 0x4 | uint32_t | muBinSizeInBytes |
Common substructures
Attrib::Array
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x2 | uint16_t | mAlloc | Number of entries allocated | |
0x2 | 0x2 | uint16_t | mCount | Number of entries used | |
0x4 | 0x2 | uint16_t | mSize | The length of each entry | |
0x6 | 0x2 | uint16_t | mEncodedTypePad | Padding |
Attrib::RefSpec
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | Key | mClassKey | ||
0x8 | 0x8 | Key | mCollectionKey | ||
0x10 | 0x4 | Collection* | mCollectionPtr | Always nullptr in resource | |
0x14 | 0x4 | Padding |
Vault
The vault is a set of structures with ChunkBlocks which are read sequentially. In Burnout Paradise, these are:
- Vers: The version
- DepN: The dependency node
- StrN: The start node
- DatN: The data node
- ExpN: The export node
- PtrN: The pointer node
Attrib::Vault::ChunkBlock
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | uint32_t | mType | A type ID similar in form to a magic number | |
0x4 | 0x4 | uint32_t | mSize | The total size of the chunk |
Version
Attrib::Vault::VersionNode
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | ChunkBlock | Base class | ||
0x8 | 0x8 | uint64_t | mVersion | Version hash |
Dependency node
Attrib::Vault::DependencyNode
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | ChunkBlock | Base class | ||
0x8 | 0x8 | HashInt | mCount | Number of dependencies |
This structure is immediately followed by the hashes of the dependency strings, then the offsets of the strings relative to the start of the first string, then the strings themselves.
Start node
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | ChunkBlock | Base class | ||
??? |
Size is 16 bytes, but the final 8 bytes is always null. This node appears to not be read by the game.
Data node
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | ChunkBlock | Base class |
This is followed by several collections.
This node is not read directly. Pointers in other nodes read the data that lies in this node.
Attrib::CollectionLoadData
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | Key | mKey | ||
0x8 | 0x8 | Key | mClass | ||
0x10 | 0x8 | Key | mParent | ||
0x18 | 0x4 | uint32_t | mTableReserve | Amount allocated for entries | |
0x1C | 0x4 | uint32_t | mTableKeyShift | ||
0x20 | 0x4 | uint32_t | mNumEntries | Number of entries | |
0x24 | 0x2 | uint16_t | mNumTypes | Number of types | |
0x26 | 0x2 | uint16_t | mTypesLen | Amount allocated for types | |
0x28 | 0x4 | void* | mLayout | Always nullptr in resource | |
0x2C | 0x4 | Padding |
This is always followed by the types, then the entries.
Attrib::CollectionLoadData::AttribEntry
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | Key | mKey | ||
0x8 | 0x4 | void* | mData | ||
0xC | 0x2 | uint16_t | mType | ||
0xE | 0x1 | uint8_t | mNodeFlags | ||
0xF | 0x1 | uint8_t | mEntryFlags |
Export node
Attrib::Vault::ExportNode
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | ChunkBlock | Base class | ||
0x8 | 0x8 | HashInt | mCount | Number of exports |
Followed by export entries of an amount defined by mCount
.
Attrib::Vault::ExportEntry
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | ExportID | mID | ||
0x8 | 0x8 | TypeID | mType | ||
0x10 | 0x4 | uint32_t | mDataBytes | Size of the data node entry | |
0x14 | 0x4 | uint32_t | mDataOffset | Offset of the entry in the data node | Relative to vlt start |
Pointer node
Attrib::Vault::PointerNode
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | ChunkBlock | Base class |
Followed by several PtrRefs.
Attrib::PtrRef
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | uint32_t | mFixupOffset | The offset at which to write the offset | Relative to the beginning of the dependency. The area pointed to is normally null and allocated specifically for this |
0x4 | 0x2 | uint16_t | mPtrType | Pointer type | See type. |
0x6 | 0x2 | uint16_t | mIndex | Which dependency the value is relative to | 0 is normally the vault 1 is normally the bin |
0x8 | 0x8 | anon_union_0 | field_3 | Value |
Attrib::PtrRef::anon_union_0
Length | Type | Name | Description | Comments |
---|---|---|---|---|
0x8 | ExportID | mExportID | ||
0x8 | HashInt | mOffset |
EPtrRefType
Information from Need for Speed ProStreet (RU PS2).
Name | Value | Comments |
---|---|---|
PtrEnd | 0 | End of the pointer node |
PtrNull | 1 | |
PtrSetFixupTarget | 2 | Via its index, marks which dependency the fixup pointers after this pointer are relative to |
PtrDepRelative | 3 | Relative to the beginning of the dependency |
PtrExport | 4 |
Bin
The bin is primarily data but has one ChunkBlock in Burnout Paradise:
- StrE: The string exports
The rest of the data in the bin is not associated to a chunk and is instead pointed to by the vault.
String exports
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | ChunkBlock | Base class |
This is followed by null-terminated strings.
Attributes
The fields and order are defined by the AttribSys schema.