Paths (GTA SA)

From GTAMods Wiki
Revision as of 20:47, 13 November 2006 by Steve-m (talk | contribs) (Description)
Jump to navigation Jump to search

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.