Paths (GTA SA)

From GTAMods Wiki
Revision as of 09:48, 29 December 2005 by JGuntherS@NL (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description

The nodes**.dat files in gta3.img contain the paths and some other path-related information. There's file for every 750*750 square, starting at the southwest corner (-3000,-3000)

Header

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

This section contains the nodes.
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

Section 1a contains the nodes for vehicles, section 1b contains the nodes for peds

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 is 1 for cars, 2 for boats and higher values for race tracks and other mission-stuff. For peds there's a node type per village/city.