Difference between revisions of "Paths (GTA4)"

From GTAMods Wiki
Jump to navigation Jump to search
m
(Header)
Line 23: Line 23:
 
The header is a structure of 4 values with a size of 16 bytes.
 
The header is a structure of 4 values with a size of 16 bytes.
  
  4b - UINT32  - Number of Nodes
+
  4b - UINT32  - Number of nodes ([[Paths_(GTA4)#Section_1_-_Nodes|section 1]])
  4b - UINT32  - Number of Car-Nodes
+
  4b - UINT32  - Number of car-nodes
  4b - UINT32  - Number of PED-Nodes
+
  4b - UINT32  - Number of intersection nodes
  4b - UINT32  - Links
+
  4b - UINT32  - Number of links ([[Paths_(GTA4)#Section_2_-_Links|section 2]])
  
 
''This section is incomplete''
 
''This section is incomplete''

Revision as of 17:04, 7 January 2009

Paths in GTA IV are similar to the 64 node-files introduced with San Andreas. Like the first version of the format there are 64 node files where each file corresponds to a 750x750 square unit starting with nodes0.nod in the south-west corner (-3000.0, -3000.0) and ending in the north-east corner (3000.0, 3000.0) of the game's world in row-major order.

Preamble

Before you start understanding GTA IV's path format you should start reading San Andreas paths article. Since GTA IV paths are based on the old path version the article is good to understand path basics.

Unlike San Andreas paths are not stored in the major image file (gta3.img). Also nodefiles do not longer have the ending .dat. In GTA IV paths are stored in the ~\pc\data\cdimages\paths.img file as 64 .nod files. Also the file format has changed in general. Where San Andreas had 7 sections per node file GTA IV just got 2. Linking works different and there are no navi-nodes any longer.

This section is incomplete

File Format

The following data types and structures are used within this article:

  • INT8/UINT8 - signed/unsigned 8 bit integer (1 byte)
  • INT16/UINT16 - signed/unsigned 16 bit integer (2 byte)
  • INT32/UINT32 - signed/unsigned 32 bit integer (4 byte)
  • FLOAT - single precision floating point number (4 byte)

Header

The header is a structure of 4 values with a size of 16 bytes.

4b - UINT32  - Number of nodes (section 1)
4b - UINT32  - Number of car-nodes
4b - UINT32  - Number of intersection nodes
4b - UINT32  - Number of links (section 2)

This section is incomplete

Section 1 - Nodes

To be filled in

Section 2 - Links

To be filled in

External Link