AttribSys Vault: Difference between revisions

Added breakdown and replaced Node with AttribEntry.
mNo edit summary
(Added breakdown and replaced Node with AttribEntry.)
 
(9 intermediate revisions by the same user not shown)
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.
 
Line 24 ⟶ 33:
| 0x8 || 0x4 || uint32_t || muVltSizeInBytes || ||
|-
| 0xC || 0x4 || || || paddingPadding ||
|-
| 0x10 || 0x8 || uint8_t* || mpau8BinData || ||
|-
| 0x18 || 0x4 || uint32_t || muBinSizeInBytes || ||
|}
 
== Common structuressubstructures ==
=== Attrib::Array ===
{| class="wikitable"
! 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 ===
{| 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
|-
| 0x14 || 0x4 || || || Padding ||
|}
 
= Vault =
[[File:PUSMC01 AttribSys Breakdown.svg|thumb|A breakdown diagram of the Cavalry's 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
Line 54 ⟶ 92:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || super_ChunkBlock || Base class ||
|-
| 0x8 || 0x8 || uint64_t || mVersion || Version hash ||
Line 64 ⟶ 102:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || super_ChunkBlock || Base class ||
|-
| 0x8 || 0x8 || [[Attribute hash|HashInt]] || mCount || Number of dependencies ||
Line 75 ⟶ 113:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || super_ChunkBlock || Base class ||
|-
| ??? || || || || ||
Line 86 ⟶ 124:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || super_ChunkBlock || Base class ||
|}
 
Line 115 ⟶ 153:
| 0x28 || 0x4 || void* || mLayout || || Always nullptr in resource
|-
| 0x2C || 0x4 || || || paddingPadding ||
|}
 
This is always followed by the types, then the entries (which are [[#Attrib::NodeCollectionLoadData::AttribEntry|nodesentries]]).
 
=== Attrib::NodeCollectionLoadData::AttribEntry ===
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
Line 126 ⟶ 164:
| 0x0 || 0x8 || [[Attribute hash|Key]] || mKey || ||
|-
| 0x8 || 0x4 || [[#Attrib::Node::anon_union_0|anon_union_0]]void* || field_1mData || || Just a pointer
|-
| 0xC || 0x2 || uint16_t || mTypeIndexmType || ||
|-
| 0xE || 0x1 || uint8_t || mMaxmNodeFlags || ||
|-
| 0xF || 0x1 || uint8_t || mFlagsmEntryFlags || ||
|}
 
=== Attrib::Node::anon_union_0 ===
{| class="wikitable"
! Length !! Type !! Name !! Description !! Comments
|-
| 0x4 || void* || mPtr || ||
|-
| 0x4 || Array* || mArray || ||
|-
| 0x4 || uintptr_t || mValue || ||
|-
| 0x4|| uintptr_t || mOffset || ||
|}
 
Line 153 ⟶ 178:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || super_ChunkBlock || Base class ||
|-
| 0x8 || 0x8 || [[Attribute hash|HashInt]] || mCount || Number of dependenciesexports ||
|}
 
Followed by [[#Attrib::Vault::ExportEntry|export entries]] of an amount defined by <code>mCount</code>.
 
=== Attrib::Vault::ExportEntry ===
Line 178 ⟶ 203:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || super_ChunkBlock || Base class ||
|}
 
Line 206 ⟶ 231:
 
=== EPtrRefType ===
Information from Need for Speed ProStreet (RU PS2).
Information from [https://github.com/NFSTools/VaultLib/blob/master/VaultLib.Core/DataInterfaces/IPtrRef.cs VaultLib].
 
{| class="wikitable"
! Name !! Value !! Comments
|-
| PtrEnd || 0 || End of the pointer node
|-
Line 231 ⟶ 257:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock|ChunkBlock]] || super_ChunkBlock || Base class ||
|}
 
Line 240 ⟶ 266:
* [[Engines (Burnout Paradise)/Attributes]]
* [[Vehicles (Burnout Paradise)/Attributes]]
 
== Common structures ==
=== Attrib::Array ===
{| class="wikitable"
! 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 ===
{| 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
|-
| 0x14 || 0x4 || || || Padding ||
|}