Difference between revisions of "PATH"

From GTAMods Wiki
Jump to navigation Jump to search
(standardized page)
(added images)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{IplSection
 
{{IplSection
| game        = [[GTA VC]]
+
| game        = {{Icon|VC}}
 
| description = Used to define paths for traffic
 
| description = Used to define paths for traffic
 
}}
 
}}
'''PATH''' is a section in the [[item placement]] file. It is used to define paths for traffic. Paths are grouped into nodes, each with at most 12 sub-nodes. The group nodes define the type of vehicle going to be used by the sub nodes. Sub nodes contain path coordinates which are linked to each other. There are two kinds of links:
+
'''PATH''' is a section in the [[item placement]] file in [[Vice City]]. It is used to define paths for traffic. Paths are grouped into nodes, each with at most 12 sub-nodes. The group nodes define the type of vehicle going to be used by the sub nodes. Sub nodes contain path coordinates which are linked to each other. There are two kinds of links:
 
* internal links – connecting nodes within the same group.
 
* internal links – connecting nodes within the same group.
 
* external links – connecting nodes over two different groups.
 
* external links – connecting nodes over two different groups.
  
 
== Format ==
 
== Format ==
<pre<includeonly></includeonly> style="overflow-x: auto;">
+
{{Pre|
 
path
 
path
Object, -1
+
GroupType, -1
 
NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
 
NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
 
NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
 
NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
Line 24: Line 24:
 
NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
 
NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
 
end
 
end
</pre>
+
}}
  
 
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
Line 34: Line 34:
 
! colspan="4" | Group
 
! colspan="4" | Group
 
|-
 
|-
| A || Object || integer ||
+
| A || GroupType || integer ||
* 0 = Pedestrian traffic
+
* ''0'' = Pedestrian traffic
* 1 = Road traffic
+
* ''1'' = Road traffic
* 2 = Water traffic
+
* ''2'' = Water traffic
 
|-
 
|-
| B || -1 || integer || always -1, used as a delimiter
+
| B || -1 || integer || always ''-1'', used as a delimiter
 
|-
 
|-
 
! colspan="4" | Node
 
! colspan="4" | Node
 
|-
 
|-
 
| A || NodeType || integer ||
 
| A || NodeType || integer ||
* 0 = Null
+
* ''0'' = Null
* 1 = External
+
* ''1'' = External
* 2 = Internal
+
* ''2'' = Internal
 
|-
 
|-
 
| B || NextNode || integer ||
 
| B || NextNode || integer ||
* -1 = Do not link to any other node in this group
+
* ''-1'' = Do not link to any other node in this group
* 0 to 11 = Link to this node number in this group
+
* ''0'' to ''11'' = Link to this node number in this group
 
|-
 
|-
 
| C || IsCrossRoad || integer || Boolean determining if there is a cross road in the imaginary line joined by two nodes
 
| C || IsCrossRoad || integer || Boolean determining if there is a cross road in the imaginary line joined by two nodes
 
|-
 
|-
| D,E,F || X, Y, Z || float[3] || X, Y, Z coordinates of the node
+
| D,E,F || X, Y, Z || float[3] || X, Y, Z coordinates of the node * 16
 
|-
 
|-
 
| G || Median || float ||
 
| G || Median || float ||
 
* Pedestrian traffic: width of walkway
 
* Pedestrian traffic: width of walkway
* Road traffic: width of divider between left and right lanes
+
* Road traffic: width of divider between left and right lanes.
 
|-
 
|-
| H || LeftLanes || integer || Number of lanes left of the node
+
| H || LeftLanes || integer || Number of lanes left of the node. This is ignored for internal nodes
 
|-
 
|-
| I || RightLanes || integer || Number of lanes right of the node
+
| I || RightLanes || integer || Number of lanes right of the node. This is ignored for internal nodes
 
|-
 
|-
 
| J || SpeedLimit || integer || Sets the speed of vehicles traveling through the path
 
| J || SpeedLimit || integer || Sets the speed of vehicles traveling through the path
* 0 = Slow
+
* ''0'' = Slow
* 1 = Average
+
* ''1'' = Medium
* 2 = Fast
+
* ''2'' = Fast
* 3 may be possible
 
 
|-
 
|-
 
| K || Flags || integer || General node behavior
 
| K || Flags || integer || General node behavior
* 0 = No flags
+
* ''0'' = No flags
* 1 = Ignored by traffic
+
* ''1'' = Ignored by traffic
* 2 = Police roadblock (only for road traffic node)
+
* ''2'' = Police roadblock (only for road traffic node)
* 4 = Restricted node
+
* ''4'' = Restricted node
* 8 = No effect, used by water traffic
+
* ''8'' = No effect, may be used by water traffic to increase maneuverability
 
|-
 
|-
| L || SpawnRate || float || Spawn rate frequency ranging from 0.0 to 1.0
+
| L || SpawnRate || float || Spawn rate frequency ranging from ''0.0'' to ''1.0''
 
|}
 
|}
  
 
== Description ==
 
== Description ==
First of all, consider a small segment of the line in a group node. The group node has to be defined and then there are the 12 sub-nodes inside it. The number of coordinates vary from 2 to 12. If the number of coordinates does not reach 12, then they are filled with null nodes which does not do anything just to make the group node hold always 12 nodes. The internal and external sub nodes are defined each with a special attribute in it. The internal sub nodes are the middle parts of a segment of the line, while the external sub nodes are the end points of the segment of the line. They are used to connect to other external sub-node or end point of another segment (another group) of the line. To connect the external sub-nodes or end points, they must and always must have the same coordinates. All the other group nodes link up together using this concept, thus you get a path which a vehicle or a ped follows from the beginning and to the end of the line.
+
[[File:Vc car paths.png|thumb|200px|Car Paths Visualization]]
Spawns are made in the external nodes (always remember that fact) and then they follow the route of the line.
+
[[File:Vc ped paths.png|thumb|200px|Ped Paths Visualization]]
 +
Consider a small segment of the line in vehicle paths node. The group has to be defined and then there must be 12 nodes inside it. If the total number of internal and external nodes in a group is not 12, then the remaining should be filled with null nodes.  
 +
 
 +
The internal nodes define the connections inside the group whereas the external nodes define the connections to other group. External nodes in a group are connected to other external nodes in different group external sub-nodes by having the same coordinates.  
 +
 
 +
Spawns are always made in internal nodes, and external nodes only act as a link. For vehicles, lane information and the median width inside internal nodes are ignored, those information are only retrieved from external nodes. And also for vehicles, junctions are always kept in a separate group and external nodes of the group must always point to beginning of a connected line segment, whereas pedestrian nodes can mix the two.
  
One can add a maximum of 24 group nodes in Vice City though this limit can be increased by Maxorator's Path hacks. {{ref|1}}
+
One can add a maximum of 4 paths group in Vice City though this limit can be increased by Maxorator's Path hacks. {{ref|1}}
  
 
== Tools and scripts ==
 
== Tools and scripts ==
Line 92: Line 96:
 
== External links ==
 
== External links ==
 
* [http://projectcerbera.com/gta/vc/tutorials/paths Description of the Vice City paths format] &ndash; by {{U|Cerbera}}
 
* [http://projectcerbera.com/gta/vc/tutorials/paths Description of the Vice City paths format] &ndash; by {{U|Cerbera}}
* [http://www.gtaforums.com/index.php?showtopic=490426 In-Game Paths Maker for VC] &ndash; by {{U|Swoorup}}
+
* {{GTAF|490426|In-Game Paths Maker for VC}} &ndash; by {{U|Swoorup}}
* [http://www.gtaforums.com/index.php?showtopic=93990&view=findpost&p=4027008 Flags description] &ndash; by {{U|AK-73}}
+
* {{GTAF|post|93990|4027008|Flags description}} &ndash; by {{U|AK-73}}
* [http://www.gtaforums.com/index.php?showtopic=93990&view=findpost&p=1856773 Statistics for paths.ipl] &ndash; by {{U|Steve-m}}
+
* {{GTAF|post|93990|1856773|Statistics for paths.ipl}} &ndash; by {{U|Steve-m}}
 
{{N|VC}}
 
{{N|VC}}

Latest revision as of 18:50, 22 May 2019

PATH (IPL section)
Short description:Used to define paths for traffic
Supported games:Vice City
IPL Sections:
2DFX AUZO BLOK CARS CULL ENEX GRGE
INST JUMP LINK LODM MLO+ MULT OCCL
PATH PICK RTFX SLOW TCYC VNOD ZONE

PATH is a section in the item placement file in Vice City. It is used to define paths for traffic. Paths are grouped into nodes, each with at most 12 sub-nodes. The group nodes define the type of vehicle going to be used by the sub nodes. Sub nodes contain path coordinates which are linked to each other. There are two kinds of links:

  • internal links – connecting nodes within the same group.
  • external links – connecting nodes over two different groups.

Format

path
GroupType, -1
	NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
	NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
	NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
	NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
	NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
	NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
	NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
	NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
	NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
	NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
	NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
	NodeType, NextNode, IsCrossRoad, X, Y, Z, Median, LeftLanes, RightLanes, SpeedLimit, Flags, SpawnRate
end
Vice City Identifier Type Description
Group
A GroupType integer
  • 0 = Pedestrian traffic
  • 1 = Road traffic
  • 2 = Water traffic
B -1 integer always -1, used as a delimiter
Node
A NodeType integer
  • 0 = Null
  • 1 = External
  • 2 = Internal
B NextNode integer
  • -1 = Do not link to any other node in this group
  • 0 to 11 = Link to this node number in this group
C IsCrossRoad integer Boolean determining if there is a cross road in the imaginary line joined by two nodes
D,E,F X, Y, Z float[3] X, Y, Z coordinates of the node * 16
G Median float
  • Pedestrian traffic: width of walkway
  • Road traffic: width of divider between left and right lanes.
H LeftLanes integer Number of lanes left of the node. This is ignored for internal nodes
I RightLanes integer Number of lanes right of the node. This is ignored for internal nodes
J SpeedLimit integer Sets the speed of vehicles traveling through the path
  • 0 = Slow
  • 1 = Medium
  • 2 = Fast
K Flags integer General node behavior
  • 0 = No flags
  • 1 = Ignored by traffic
  • 2 = Police roadblock (only for road traffic node)
  • 4 = Restricted node
  • 8 = No effect, may be used by water traffic to increase maneuverability
L SpawnRate float Spawn rate frequency ranging from 0.0 to 1.0

Description

Car Paths Visualization
Ped Paths Visualization

Consider a small segment of the line in vehicle paths node. The group has to be defined and then there must be 12 nodes inside it. If the total number of internal and external nodes in a group is not 12, then the remaining should be filled with null nodes.

The internal nodes define the connections inside the group whereas the external nodes define the connections to other group. External nodes in a group are connected to other external nodes in different group external sub-nodes by having the same coordinates.

Spawns are always made in internal nodes, and external nodes only act as a link. For vehicles, lane information and the median width inside internal nodes are ignored, those information are only retrieved from external nodes. And also for vehicles, junctions are always kept in a separate group and external nodes of the group must always point to beginning of a connected line segment, whereas pedestrian nodes can mix the two.

One can add a maximum of 4 paths group in Vice City though this limit can be increased by Maxorator's Path hacks. [1]

Tools and scripts

External links