Paths (GTA SA) Jump to navigationJump to search Colour-coded car path nodes for GTA: SA.…
- User
Paths (GTA SA) Jump to navigationJump to search
Colour-coded car path nodes for GTA: SA. The 64 nodes*.dat files in gta3.img (or any other archive) contain the vehicle and ped paths and related information for GTA SA. There's a file for every 750×750 unit square, starting at the south-west corner (-3000, -3000) in row-major order.
Paths for planes and trains are not stored in the node files. Trains use the four tracks*.dat files. There are also paths for several missions and concrete cars in carrec.img.
Nodes can be influenced through scripts using the opcodes 01EB and 03DE.
Usually, cars and pedestrians use nodes if they are not linked to a script or carrec.img path in any way.
There is a modified version of the path format that may be used with fastman92's Limit Adjuster, which removes or extends some of the limits that the native format imposes.
Contents 1 Purpose 2 File format 2.1 Header 2.2 Section 1 - Path Nodes 2.2.1 Path Node Flags 2.3 Section 2 - Navi Nodes 2.3.1 Navi Node Flags 2.4 Section 3 - Links 2.5 Section 4 - Filler 2.6 Section 5 - Navi Links 2.7 Section 6 - Link Lengths 2.8 Section 7 - Path Intersection Flags 3 Tools & Scripts 4 See Also Purpose It is believed that the node files were generated by some sort of path compiler during development of the game, and represent the processing-friendly binary data structures otherwise generated at runtime by previous versions of the game from files like paths.ipl and related. Such files are still present in SA, but are unused.
Since the built-in path compiler has apparently been removed from the game code or at least made non-functional, custom tools and techniques are required to generate new paths for SA.
Node files are streamed by the game — only the active area and those surrounding it are loaded at a time. Thus corrupt files only lead to a game crash when the player enters the specific area.
The separate nodes*.dat files in the data\paths\ directory are ignored by the game.
File format Each file starts with a header, followed by 7 distinct sections.
Paths are stored as double-linked (thus undirected) graphs in adjacency list representation. There can be connections between separate areas.
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) There are several main concepts that are important for understanding the way path files work:
A "node" is an individual point in space which is used as an anchor for a path. Paths are routes between nodes. These are traced in-game by peds and vehicles, but are typically shown in editors as graphical lines. Two nodes are connected by one referencing a "link" which points to the other. Most nodes link to two other nodes, one for each direction along a path, but it is possible for there to be more (such as at a junction). Header The header contains information about the content of the various sections in the file. It has a size of 20 bytes.
- Assistant
- User
добавь туда структуру
nodes ├── raw.lua ├── cars │ ├── !parser.py │ ├── raw.lua │ └── segment0 .. 63.lua ├── link │ ├── !parser.py │ ├── raw.lua │ └── segment0 .. 63.lua ├── lnkl │ ├── !parser.py │ ├── raw.lua │ └── segment0 .. 63.lua ├── navi │ ├── !parser.py │ ├── raw.lua │ └── segment0 .. 63.lua ├── navl │ ├── !parser.py │ ├── raw.lua │ └── segment0 .. 63.lua └── peds ├── !parser.py ├── raw.lua └── segment0 .. 63.lua
- Assistant
- User
очень много воды, давай короткий ридми без художественных штук
- Assistant
Certainly! Here's a more concise README without the extra details:
# GTA San Andreas Paths for MoonLoader This repository contains decompiled path data from GTA San Andreas, formatted for use with Lua scripts in MoonLoader. These paths provide vehicle and pedestrian navigation information for custom scripting. ## Directory Structurenodes ├── raw.lua ├── cars │ ├── !parser.py │ ├── raw.lua │ └── segment0 .. 63.lua ├── link │ ├── !parser.py │ ├── raw.lua │ └── segment0 .. 63.lua ├── lnkl │ ├── !parser.py │ ├── raw.lua │ └── segment0 .. 63.lua ├── navi │ ├── !parser.py │ ├── raw.lua │ └── segment0 .. 63.lua ├── navl │ ├── !parser.py │ ├── raw.lua │ └── segment0 .. 63.lua └── peds ├── !parser.py ├── raw.lua └── segment0 .. 63.lua
## Integration and Usage 1. **Clone the Repository**: `git clone https://github.com/yourusername/repo-name.git` 2. **Use with MoonLoader**: Copy Lua files to your MoonLoader `scripts` directory. 3. **Run MoonLoader**: The paths are now available for use in custom scripts. ## Contributing Contributions are welcome. Please follow the repository's code style and submit a pull request. ## License This project is licensed under the MIT License.