AttribSys Vault: Difference between revisions
Added breakdown and replaced Node with AttribEntry.
(dumping random scribblings from very outdated notes - not sure where the "start node" name referenced here comes from so might have missed some info here.) |
(Added breakdown and replaced Node with AttribEntry.) |
||
(26 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 5 ⟶ 14:
==== 32-bit ====
{| class="wikitable"
|-▼
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
Line 19 ⟶ 27:
==== 64-bit ====
{| class="wikitable"
|-▼
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
Line 26 ⟶ 33:
| 0x8 || 0x4 || uint32_t || muVltSizeInBytes || ||
|-
| 0xC || 0x4 || || ||
|-
| 0x10 || 0x8 || uint8_t* || mpau8BinData || ||
|-
| 0x18 || 0x4 || uint32_t || muBinSizeInBytes || ||
|}
== Common substructures ==
{| 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
|-▼
|}
= 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:▼
▲The vault is a set of structures with [[#Attrib::Vault::ChunkBlock
* '''Vers''': The version
* '''DepN''': The dependency node
Line 44 ⟶ 80:
=== Attrib::Vault::ChunkBlock ===
{| class="wikitable"
▲|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
Line 53 ⟶ 88:
== Version ==
=== Attrib::Vault::VersionNode ===
{| class="wikitable"
▲|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock
|-
| 0x8 || 0x8 || uint64_t || mVersion || Version hash ||
Line 65 ⟶ 100:
=== Attrib::Vault::DependencyNode ===
{| class="wikitable"
▲|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock
|-
| 0x8 || 0x8 || [[Attribute hash
|}
This structure is immediately followed by the [[Attribute hash
== Start node ==
{| class="wikitable"
▲|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock
|-
| ??? || || || || ||
Line 89 ⟶ 122:
== Data node ==
{| class="wikitable"
▲|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock
|}
This is followed by several [[#Attrib::CollectionLoadData
This node is not read directly. Pointers in other nodes read the data that lies in this node.
Line 101 ⟶ 133:
=== Attrib::CollectionLoadData ===
{| class="wikitable"
▲|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[Attribute hash
|-
| 0x8 || 0x8 || [[Attribute hash
|-
| 0x10 || 0x8 || [[Attribute hash
|-
| 0x18 || 0x4 || uint32_t || mTableReserve || Amount allocated for entries ||
Line 120 ⟶ 151:
| 0x26 || 0x2 || uint16_t || mTypesLen || Amount allocated for types ||
|-
| 0x28 || 0x4 || void* || mLayout ||
|-
|
|}
This is always followed by the types, then the
=== Attrib::
{| class="wikitable"
▲|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[Attribute hash
|-
| 0x8 || 0x4 ||
|-
| 0xC || 0x2 || uint16_t ||
|-
| 0xE || 0x1 || uint8_t ||
|-
| 0xF || 0x1 || uint8_t ||
▲|}
▲=== Attrib::Node::anon_union_0 ===
▲{| class="wikitable"
|-▼
▲! Length !! Type !! Name !! Description !! Comments
|-▼
▲| 0x4 || void* || mPtr || ||
|-▼
|-▼
|-▼
|}
Line 160 ⟶ 176:
=== Attrib::Vault::ExportNode ===
{| class="wikitable"
▲|-
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock
|-
| 0x8 || 0x8 || [[Attribute hash
|}
Followed by [[#Attrib::Vault::ExportEntry
=== Attrib::Vault::ExportEntry ===
{| class="wikitable"
|-▼
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[Attribute hash
|-
| 0x8 || 0x8 || [[Attribute hash
|-
| 0x10 || 0x4 || uint32_t || mDataBytes || Size of the data node entry ||
|-
| 0x14 || 0x4 || uint32_t || mDataOffset ||
|}
Line 187 ⟶ 201:
=== Attrib::Vault::PointerNode ===
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock
|}
Followed by several [[#Attrib::PtrRef
=== Attrib::PtrRef ===
{| class="wikitable"
! 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.<br />The area pointed to is normally null and allocated specifically for this
|-
| 0x4 || 0x2 || uint16_t || mPtrType || Pointer type || See [[#EPtrRefType|type]].
|-
| 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
|}
=== Attrib::PtrRef::anon_union_0 ===
{| class="wikitable"
! Length !! Type !! Name !! Description !! Comments
|-
| 0x8 || [[Attribute hash
|-
| 0x8 || [[Attribute hash
=== 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 227 ⟶ 253:
The rest of the data in the bin is not associated to a chunk and is instead pointed to by the vault.
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Attrib::Vault::ChunkBlock
|}
|