Common Data Types (Need for Speed): Difference between revisions

From Burnout Wiki
Content added Content deleted
(Created page.)
 
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Some of the more commonly seen data types in Need for Speed Hot Pursuit (2010) and Most Wanted (2012).
Some of the more commonly seen data types in ''Need for Speed: Hot Pursuit (2010)'' and ''Most Wanted (2012)''.


= CgsCore::UniqueId =
=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 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 <code>gamedb://</code> URIs.
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 <code>gamedb://</code> URIs.


{| class="wikitable"
{| class="wikitable"
Line 10: Line 10:
|-
|-
| 0x0 || 0x4 || int32_t || miValue || ID ||
| 0x0 || 0x4 || int32_t || miValue || ID ||
|}

=CgsContainers::ArrayList=
ArrayList is effectively the same as [[CgsArray]] from ''Burnout Paradise''. It is an array of elements with a length field that may or may not be padded with 4 bytes after.

As an example, the below is the structure of <code>ArrayList<UniqueId, 10></code>.
{| class="wikitable"
|+ CgsContainers::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 ||
|}
|}

Latest revision as of 10:59, 18 March 2023

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

CgsContainers::ArrayList

ArrayList is effectively the same as CgsArray from Burnout Paradise. It is an array of elements with a length field that may or may not be padded with 4 bytes after.

As an example, the below is the structure of ArrayList<UniqueId, 10>.

CgsContainers::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