Common Data Types (Need for Speed)
Some of the more commonly seen data types in Need for Speed: Hot Pursuit (2010) and Most Wanted (2012).
CgsCore::UniqueId
Unique ID is the data type used to hold game changer IDs. It is a global, sequential numeric ID given to every item tracked by the database. As IDs are not per-game, items from Hot Pursuit may be reused directly in Most Wanted or any other project. Nearly every asset in both games have at least one game changer ID.
Unique IDs were previously used to a more limited extent in Burnout Paradise. While they are not explicitly named, they are present in several assets, such as the triggers, traffic, and sound resources. These IDs are referred to by the modding community as GameDB IDs as they are typically seen in gamedb://
URIs.
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int32_t | miValue | ID |
CgsResource::ID
This type is a container for a resource ID. It may hold a UniqueId, or it can be used in the same way it was in Burnout Paradise.
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | CHash | mHash | Resource ID |
CgsContainers::ArrayList/CgsContainers::Set
ArrayList and Set are effectively the same as CgsArray/CgsSet from Burnout Paradise. They both represent an array of elements with a length field that may or may not be padded with 4 bytes after. If the element type is less than 4 bytes long, padding may be present before the length field to align it.
As an example, the below is the structure of ArrayList<UniqueId, 10>
.
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x28 | UniqueId[10] | maElements | The elements in the array | |
0x28 | 0x4 | uint32_t | muLength | The number of elements in use |