Script for working with paths.ipl (and not only).
To work you need: 3dsMax 2008 and higher.
Possibilities:
- Import of GTA VC, GTA3, GTA SA paths (including support for Fastman92 format paths, FLA4 format only)
- Export of GTA VC paths (export of all types of lines supported by the game (from 3 to 12 points inclusive));
- Ability to assign the type of path (pedas, cars, boats) to each line. If no path type is assigned, the script will automatically assign a type based on the Default Path Type value;
- Ability to create and export intersections (T-shaped and cross-shaped). For more details, see "Creating intersections.docx" or .avi files;
- Ability to change parameters for each line/point. To change parameters, just select a line. All changes will be automatically saved;
You don’t need to enter everything yourself - if the line settings are not assigned, the script will automatically generate them;
- Ability to import/export .dat path files from the data/paths folder;
- Ability to convert VC Paths.ipl to GTA 3 path format;
- Displaying the vertex numbers of the edited line in the viewport;
- Displaying path flags, number of lanes, coordinates and path width in the viewport;
- Function of changing the direction of movement of the track;
- Function for assigning the direction of movement of the path (one-way/two-way);
- Function of dividing lines with a number of points greater than 12 (for selected lines);
- Line parameters reset function (for selected lines);
- Function to enable/disable car traffic.
- Function for automatically setting up intersections based on adjacent lines (the function has not yet been properly completed).
- Function for removing “wrong” lines with the number of points less than 2.
Changes in version 2.7d (update 11/02/2024)
- When importing GTASA paths, spline point welding now occurs automatically - no longer requiring you to click OK to continue the import process.
- Added auxiliary button Reverse Knot Order.
- Support for 3dsMax versions lower than 2008 has been removed (due to the lack of the weldspline vertices spline welding function in lower versions of 3dsmax).
- The SA paths import code has been fixed - now there will be no identical path segments at the junction of regions.
- The code for displaying path parameters in the viewport has been fixed - if there is no parameter value, undefined will no longer be displayed.
- Minor code fixes.
The supported line type for Splines is Line. Initial Type - Corner. Drag Type - Bezier.
Do not apply modifiers to lines! This may result in the inability to export paths and create intersections normally.
To more conveniently register paths, use bindings in 3dsMax (see .docx files for more details).
An example of creating paths for GTAVC is described in paths_tutorial[RU].pdf
The script supports importing GTA VC paths. If something was imported incorrectly (for example, intersections), I recommend correcting it manually.
After export, the path file weighs more than the original and this leads to the fact that in some areas there is no traffic or pedestrians.
It is advisable to use a script to create new paths.
The script supports the import of GTA3 paths - import only, to export you need to export the paths to the Vice City format, and then convert to the GTA3 format.
The script supports the ability to convert paths.ipl to the GTA 3 path format.
To do this, you need to specify the starting ID of the path, the prefix for path models, the name for IPL IDE COL, the path coordinate multiplier with which paths.ipl was exported (for a standard .exe it is 16)
Then select the directory where the GTA 3 path files will be exported and the last step is to select paths.ipl.
The script will notify you that the conversion process is complete. IPL IDE COL files are completely ready to be added to the game.
It is not recommended to use this function to edit standard paths!
Please note that when adding paths to GTA 3, if there are original ones, you must increase the limit using the Dynamic Limits adjuster: Buildings, PtrNodes, EntryInfoNodes, Treadables; [Pool Limits]: Objects Models; limit on DFF files [ID LIMITS].
To do this, use Limit Adjuster by Vitlgt. It is also worth setting the "Enable path limits patch=1" parameter and increasing the maximum ID in the PATH LIMITS block.
To increase the path limit in Vice City you need to use Maxorator's Path hack.
The script supports importing GTA SA paths, including importing Fastman92 format paths.
To import, click the Import GTASA Paths button and specify the folder where the 64 NodesXX.dat path files are located.
The process of importing standard paths can take from several tens of seconds to 10 minutes.
Paths are imported as splines, which can be edited or customized using SA Path Tool by Deniska.
The author does not guarantee 100% operability of GTASA paths after their import/export.
It is strongly recommended to check the settings of all lines, including the correctness of the traffic light settings!
It is possible to download paths in GTAVC format.
The default script processes GTASA paths during the import process, namely, it removes identical segments and welds points in order to further be able to edit path lines under GTASA or under GTAVC/GTA3.
You can disable these functions in the GTASA Import Settings column, but in this case the path lines are absolutely unsuitable for editing under GTASA or under GTAVC/GTA3. This can be useful if you need to visually familiarize yourself with the path map (importing a standard path map without processing takes approximately 3-4 minutes).
Details are written in "Importing GTA SA.docx paths".
When creating a new path line, the script automatically assigns settings to it based on the parameters in the Default Parameters block!
Please note that the Lanes parameters for interior points are always 1 1! To assign the direction of movement and the number of lanes, it is enough to edit only the end (external) points.
To display line parameters in the viewport, use the Display helper tab. Available for display are point numbers, number of lanes, flags, path width, point coordinates.
To reset the default settings for leased lines, use the Reset User Properties function.
In case of the error "The script does not support splines with a number of points greater than 12 and less than 3!Please edit the spline" use the Split Lines to VC Format function.
This function splits a line into the nth number of lines if the number of its points is strictly greater than 12 or splits the line to three points if the desired line has two (Vice City does not support lines with two points).
To export traffic, just select the lines and click the Export Paths button. The finished lines for Paths.ipl will be displayed in the MAXScript Listener window (in the lower left corner of 3Ds max or press F11 to call MAXScript Listener).
The script has the ability to create intersections in two ways:
1) — For each line, select one point SEPARATELY in the vertex editing mode
— Select the lines and click the Create Crossroad button
2) — Press the button Create Dummys at line end
— Select the dummy and click the Create Crossroad button
Set Ped — assign pedestrian traffic to the line.
Select all Ped Paths - select all pedestrian paths.
Set Car—assign traffic to a car line.
Select all Car Paths — select all car paths.
Set Boat - assign a boat traffic line.
Select all BoatPaths - select all boat paths.
Select All Paths - select all paths.
Import GTAVC Paths - import GTAVC paths.
Import GTA3 Paths - import GTA3 paths.
Import GTASA Paths - import GTASA paths.
Import GTASA Paths (Fastman92 FLA4 format only!) - import GTASA paths in Fastman92 format.
Delete Double Segments - Delete identical segments when importing GTASA paths. To be able to edit paths, this checkbox must be checked!
ViceCity/III format (beta) - convert GTASA paths to GTAVC/GTAIII format. You must check this box if in the future the paths will be configured only for GTAVC/GTAIII!
Weld paths knots and split paths - weld path points and split lines when importing GTASA paths. To be able to edit paths, this checkbox must be checked!
Create CrossRoad — create a crossroad (based on auxiliary dummies or based on selected spline points)
Set CrossroadPath name — Designate the path as a crossroads.
Create dummy at line ends - create dummy at the ends of lines. Useful for creating intersections.
Delete all dummy — delete all auxiliary dummy.
Display vertex number — display the numbers of way points in the viewport (provided that the number of points in the line lies in the range from 2 to 12 inclusive).
Display Lanes — display the number of line lanes in the viewport.
Display width — display the width of the path in the viewport.
Display flags — display path flags in the viewport.
Display XYZ coordinate — display the coordinates of points in the viewport.
Import .dat - import .dat path file flightX.dat/tracksX.dat/spathX.dat.
Export .dat - export .dat path file.
Split lines - convert selected lines to GTAVC/III path format.
Reset user properties—reset all settings for the selected line.
Enable Traffic — enable traffic (sets flag 0)
Disable Traffic — disable traffic (sets flag 1)
Delete zero shapes - deletes irregular lines with less than 2 points.
Reverse knot order - changes the priority of points.
set one way traffic - make one way traffic.
set two way traffic - make two-way traffic.
Change direction traffic - change the direction of movement.
Does not work in the case of adjacent intersections!
Select Directory - select a directory to export GTA3 path files.
Select ViceCity paths.ipl - Select Vice City paths.ipl to convert it to GTAIII path format.
The script supports importing and exporting .dat files of GTA 3 or GTA Vice City paths from the data/paths folder, namely flightX.dat, tracksX.dat, spathX.dat, where X is the file number.
To export, you need to select ONE path line and click export. The script will prompt you to select a file to save.
Thanks: Shagg_E; Starenat - for support in writing the script.
Special thanks to: Ilufir - for help with the GTASA path structure.
The script code used is sa path tool by Deniska.
aleks926820. 23:41 02.11.2024