Difference between revisions of "Paths (GTA4)"

From GTAMods Wiki
Jump to navigation Jump to search
(New page: {{file-stub}} ==External Link== * [http://www.gtaforums.com/index.php?showtopic=388886 IV Paths Format] - GTAForums topic Category:Map FormatsCategory:GTA 4)
 
Line 1: Line 1:
 
{{file-stub}}
 
{{file-stub}}
 +
 +
Paths in [[GTA_IV|GTA IV]] are similar to the 64 node-files introduced with [[GTA_SA|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 <code>nodes0.nod</code> 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 [[Wikipedia:row-major order|row-major order]].
 +
 +
==Preamble==
 +
 +
Before you start understanding GTA IV's path format you should start reading [[GTA_SA_Paths|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 <code>.dat</code>. In GTA IV paths are stored in the <code>~\pc\data\cdimages\paths.[[img]]</code> file as 64 <code>.nod</code> 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
 +
4b - UINT32  - Number of Car-Nodes
 +
4b - UINT32  - Number of PED-Nodes
 +
4b - UINT32  - Links
 +
 +
''This section is incomplete''
 +
 +
===Section 1 - Nodes===
 +
 +
''To be filled in''
 +
 +
===Section 2 - Links===
 +
 +
''To be filled in''
  
 
==External Link==
 
==External Link==

Revision as of 20:46, 6 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
4b - UINT32  - Number of Car-Nodes
4b - UINT32  - Number of PED-Nodes
4b - UINT32  - Links

This section is incomplete

Section 1 - Nodes

To be filled in

Section 2 - Links

To be filled in

External Link