Difference between revisions of "Paths (GTA SA)"
Jump to navigation
Jump to search
JGuntherS@NL (talk | contribs) m |
m (Tidied code to use correct headings, paragraph format, punctuation and list code.) |
||
Line 1: | Line 1: | ||
− | = Description = | + | ==Description== |
+ | The "nodes*.dat" files in "gta3.img" 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. | |
− | |||
− | = Header = | ||
− | |||
+ | Total 20 bytes: | ||
[DWord, 4b] Number of entries in section 1 | [DWord, 4b] Number of entries in section 1 | ||
[DWord, 4b] Number of entries in section 1a | [DWord, 4b] Number of entries in section 1a | ||
Line 13: | Line 12: | ||
[DWord, 4b] Number of entries in section 3/5/6 | [DWord, 4b] Number of entries in section 3/5/6 | ||
− | = Section 1 = | + | ==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 | [Signed Word, 2b] Unknown | ||
[Word, 2b] Unknown | [Word, 2b] Unknown | ||
Line 28: | Line 26: | ||
[Word, 2b] Area ID | [Word, 2b] Area ID | ||
[Word, 2b] Node ID | [Word, 2b] Node ID | ||
− | [Byte, 1b] Path | + | [Byte, 1b] Path Width |
− | [Byte, 1b] Node | + | [Byte, 1b] Node Type |
[DWord, 4b] Flags | [DWord, 4b] Flags | ||
− | + | Explanations for some of these values:- | |
− | + | * Link ID is an index to entries in section 3,5 and 6. | |
− | 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. |
− | 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 ID is used to refer to nodes in the other sections. | ||
− | Node | + | 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. |
− | For peds there |
Revision as of 22:26, 12 January 2006
Description
The "nodes*.dat" files in "gta3.img" 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.