Talk:List of RW section IDs

From GTAMods Wiki
Revision as of 10:53, 30 October 2010 by Aschratt (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How Chunk IDs work

Chunk/Section IDs contain both the vendor ID and object ID. RenderWare contains a macro in it's C headers to generate a Chunk ID which is used for internal use and by identifying the chunk in a binary file. There are another 2 macros for getting the vendor and object IDs from a chunk ID. The macros are something similar to the following:

 #define MAKECHUNKID(_vendorID, _objectID) ((_vendorID & 0xFFFFFF) << 8) | (_objectID & 0xFF)
 #define GETVENDORID(_chunkID) ((_chunkID >> 8) & 0xFFFFFF)
 #define GETOBJECTID(_chunkID) (_chunkID & 0xFF)

So for example; Rockstar's Frame Node Name plugin has the chunk ID 0x0253F2FE. Putting this chunk ID through the above "GET" macros results in Rockstar's vendor ID being 0x253F2 (which is used in all their "custom" sections) and the object ID being 0xFE.

Criterion have 8 vendor IDs (0x000000-0x000008) declared in their RenderWare headers. With regards to GTA, only 3 of them matter; Core is 0x000000, Toolkits are 0x000001 and the World plugin is 0x000005 (this is evident from the chunk IDs listed on the page).

--ModelingMan 21:43, 13 March 2009 (UTC)