Difference between revisions of "Paths (GTA SA)"

From GTAMods Wiki
Jump to navigation Jump to search
m (added to a category)
m (Description)
Line 1: Line 1:
==Description==
+
The 64 <code>nodes*.dat</code> files in <code>gta3.img</code> (or any other archive) contain the paths and some other path-related information. There's a file for every 750&times;750 unit square, starting at the south-west corner (-3000, -3000).
The "nodes*.dat" files in "gta3.img" contain the paths and some other path-related information. There's a file for every 750&times;750 unit square, starting at the south-west corner (-3000,-3000).
 
  
 
==Header==
 
==Header==

Revision as of 20:47, 13 November 2006

The 64 nodes*.dat files in gta3.img (or any other archive) contain the paths and some other path-related information. There's a file for every 750×750 unit square, starting at the south-west corner (-3000, -3000).

Header

Contains information for locating the various sections in the file.

Total 20 bytes:

[DWord, 4b] Number of entries in section 1
[DWord, 4b] Number of entries in section 1a
[DWord, 4b] Number of entries in section 1b
[DWord, 4b] Number of entries in section 2
[DWord, 4b] Number of entries in section 3/5/6

Section 1

Contains node data for pedestrians and vehicles. Section 1a contains the nodes for vehicles and section 1b contains the nodes for pedestrians.

Total 28 bytes per entry:

[Signed Word, 2b] Unknown
[Word, 2b]        Unknown
[DWord, 4b]       Unknown (always zero)
[Signed Word, 2b] X-position (must be divided by 8)
[Signed Word, 2b] Y-position (must be divided by 8)
[Signed Word, 2b] Z-position (must be divided by 8)
[Signed Word, 2b] Unknown
[Word, 2b]        Link ID
[Word, 2b]        Area ID
[Word, 2b]        Node ID
[Byte, 1b]        Path Width
[Byte, 1b]        Node Type
[DWord, 4b]       Flags

Explanations for some of these values:-

  • Link ID is an index to entries in section 3,5 and 6.
  • Area ID is the area of the node, the same as in the filename.
  • Node ID is used to refer to nodes in the other sections.

Node Type is some kind of group for the nodes. In section 1a, a Note Type value of 1 is for cars, 2 is for boats and higher values are for race tracks and other mission applications. For peds, there is a node type per village/city.