AttribSys Vault: Difference between revisions

Added resource type information.
Tag: Removed redirect
(Added resource type information.)
Line 1:
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.
'''AttribSysVault''' refers to:
 
= Structures =
=== CgsResource::AttribSysVaultResource ===
==== 32-bit ====
{| class="wikitable"
|-
! 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 ====
{| class="wikitable"
|-
! 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 || ||
|}
 
= Vault =
The vault is a set of structures with [[#Attrib::Vault::ChunkBlock | 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 ===
{| class="wikitable"
|-
! 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 ==
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock | ChunkBlock]] || super_ChunkBlock || ||
|-
| 0x8 || 0x8 || uint64_t || mVersion || Version hash ||
|}
 
== Dependency node ==
=== Attrib::Vault::DependencyNode ===
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock | ChunkBlock]] || super_ChunkBlock || ||
|-
| 0x8 || 0x8 || [[Common Data Types (Burnout Paradise)#Attribute hash | HashInt]] || mCount || Number of dependencies ||
|}
 
This structure is immediately followed by the [[Common Data Types (Burnout Paradise)#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 ==
There is no data after the ChunkBlock.
 
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock | ChunkBlock]] || super_ChunkBlock || ||
|}
 
== Data node ==
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock | ChunkBlock]] || super_ChunkBlock || ||
|}
 
This is followed by several [[#Attrib::CollectionLoadData | collections]].
 
=== Attrib::CollectionLoadData ===
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[Common Data Types (Burnout Paradise)#Attribute hash | Key]] || mKey || ||
|-
| 0x8 || 0x8 || [[Common Data Types (Burnout Paradise)#Attribute hash | Key]] || mClass || ||
|-
| 0x10 || 0x8 || [[Common Data Types (Burnout Paradise)#Attribute hash | 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 || padding ||
|-
| 0x28 || 0x4 || || || padding ||
|}
 
This is always followed by the types, then the entries (which are the key followed by several unknown bytes - might be a [[#Attrib::Node | node]]).
 
=== Attrib::Node ===
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || Key || mKey || ||
|-
| 0x8 || 0x4 || anon_union_0 || field_1 || || Just a pointer
|-
| 0xC || 0x2 || uint16_t || mTypeIndex || ||
|-
| 0xE || 0x1 || uint8_t || mMax || || Assuming collections use this, it's the only part of the entry used
|-
| 0xF || 0x1 || uint8_t || mFlags || ||
|}
 
== Export node ==
=== Attrib::Vault::ExportNode ===
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock | ChunkBlock]] || super_ChunkBlock || ||
|-
| 0x8 || 0x8 || [[Common Data Types (Burnout Paradise)#Attribute hash | HashInt]] || mCount || Number of dependencies ||
|}
 
Followed by [[#Attrib::Vault::ExportEntry | export entries]] of an amount defined by mCount.
 
=== Attrib::Vault::ExportEntry ===
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[Common Data Types (Burnout Paradise)#Attribute hash | ExportID]] || mID || ||
|-
| 0x8 || 0x8 || [[Common Data Types (Burnout Paradise)#Attribute hash | TypeID]] || mType || ||
|-
| 0x10 || 0x4 || uint32_t || mDataBytes || ||
|-
| 0x14 || 0x4 || uint32_t || mDataOffset || ||
|}
 
== Pointer node ==
=== Attrib::Vault::PointerNode ===
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock | ChunkBlock]] || super_ChunkBlock || ||
|}
 
Followed by several [[#Attrib::PtrRef | PtrRefs]].
 
=== Attrib::PtrRef ===
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || uint32_t || mFixupOffset || ||
|-
| 0x4 || 0x2 || uint16_t || mPtrType || ||
|-
| 0x6 || 0x2 || uint16_t || mIndex || ||
|-
| 0x8 || 0x8 || anon_union_0 || field_3 || ||
|}
 
= Bin =
The bin is primarily data but has one ChunkBlock in Burnout Paradise:
* '''StrE''': The string exports
 
=== String exports ===
{| class="wikitable"
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock | ChunkBlock]] || super_ChunkBlock || ||
|}
 
This is followed by null-terminated strings.
 
== Attributes ==
The fields and order are defined by the AttribSys schema.
* [[Engines (Burnout Paradise)/Attributes]]
* [[Vehicles (Burnout Paradise)/Attributes]]