Manual Editing of GTA Vice City AI Paths

Although rather unpleasant and time-consuming, if you plan to make quite a lot of paths you really should learn how to make them manually. It is very easy to make a mistake in some editors and it is often unclear why things are not working. Therefore knowing how to make the paths work by hand if something goes wrong is crucial. As with a lot of computer stuff, being able to do it manually means you can use the editors much more easily. You will also be able to make very intricate paths which cross at different levels, such as large intersections, footbridges and staircases.

One program you will need is PlayerPos by Steve-M. This allows you to display and save your current position in the game. We will be using it to save the positions we want to use as nodes while manually building our small path. It can also be used where you need a very precise position which can be difficult to get using the editor.

I recommend reading my GTA Vice City Paths Definition because I will be using the technical terms defined in it.

Getting Started

When I first started fiddling with paths, I tried creating a pedestrian path from the pavement just outside El Swanko Casa to go up the driveway to the front porch. Although very tricky to get started, I found this a very helpful exercise. I will save you the trouble of the tricky starting stuff, though.

Open the data\paths.ipl file from your GTA Vice City folder using NotePad. I have associated the .ipl filetype with NotePad, so manual editing is much easier. We need to create some new groups, like this:

# Group A, Peds
0, -1
	2, 01, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 02, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 03, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 04, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 05, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 06, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 07, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 08, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 09, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 11, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	1, 00, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	1, -1, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1

# Group B, Peds
0, -1
	2, 01, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 02, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 03, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 04, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 05, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 06, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 07, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 08, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	2, 11, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1
	1, 00, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1
	1, -1, 0, 00000.0, 00000.0, 00000.0, 1, 0, 0, 0, 0, 1

Copy and paste them in your paths.ipl file, just above the end line at the bottom of the file. Save the file and make sure it keeps the .ipl extension.

Step 1: Saving Your Game

The nodes we added are set to type 0 which you should know means they will all be ignored. Therefore we can load up the game, go to El Swanko Casa and save the game there. This will allow us to see how the paths are working immediately when entering the game. It also means you do not have to drive across the city to check coordinates of nodes you want to add.

El Swanko Casa is shown on the big map poster which comes with GTA Vice City. It is just South of Vice Point, North-East from the Leafs Link golf course and is placed at the end of the wide road which runs East from Prawn Island. It has a single, small garage and a machine gun powerup on the roof at the rear.

Step 2: Planning the Route

Using a helicopter and switching to the first-person view, pressing your buttons for look left and look right together makes the camera look down. This view will allow us to get a top-down view of the area, like this:

Top-down view of 'El Swanko Casa'

We can use this image to visually mark where we would like each node to go by opening it in MS Paint and using the Brush and Line tools but we need to think about exactly where we want pedestrians to walk. I do not want them to be on the middle of the driveway because they will get in the way when I am trying to use the garage. Therefore, I suggest we do something like this:

New path plan

Step 3: Getting the Coordinates

Start the PlayerPos program and turn on the option to use precision units (sixteen times smaller than normal units). As you walk around the city, it will show your current position in the top-left corner of the screen. When you press F4, it stores that current location and displays it on the actual PlayerPos program. We will put the player at the start of our new ped path, then walk along it pressing F4 when there is a change in direction. Once we have walked the route, we will close GTA Vice City and the coordinates will still be displayed on the PlayerPos form.

Now, load up GTA Vice City and start the game you saved at El Swanko Casa. You will need to remember the plan and will have to chose one end to start walking from. I suggest starting where the new path joins the existing paths, out by the road. Go there, stop and press F4. Then walk along the planned route, pressing F4 roughly where there was a dot on the plan. Once you have done the whole route, exit GTA Vice City and return to the desktop.

PlayerPos should be displaying a big set of data. You will have to highlight the display and drag the mouse to make it scroll. However, this is roughly what it should have stored:

6475.659, 10466.695, 165.450
6543.113, 10454.278, 164.121
6554.892, 10299.606, 165.833
6814.759, 10267.854, 164.976
7087.576, 10240.097, 163.739
7128.309, 10164.294, 164.689
7228.410, 10076.812, 165.766
7131.135, 9948.399, 176.926
6976.020, 9962.909, 177.305
6977.694, 9830.413, 222.295
7057.493, 9831.250, 244.309
7055.529, 9712.768, 284.417

6855.981, 9725.587, 284.417
6655.912, 9712.730, 284.417
6650.735, 9827.957, 244.304
6729.247, 9832.868, 222.295
6730.767, 9961.358, 178.251
6671.958, 9957.333, 178.290
6671.818, 9757.801, 179.041
6857.359, 9737.811, 187.855
7042.318, 9748.999, 177.658
7046.595, 9915.998, 177.184

Step 4: Turning Coordinates into Nodes

As we are starting on the pavement outside the driveway, Group A will look much like the ordering examples in my paths definition guide. This means we will start with an external node at A10 and this will link to node A00 which will then run down through to A9 where the order will jump over A10 to finish at the A11 external node.

Therefore, the first coordinate displayed by PlayerPos should be rounded off and placed as the (X,Y,Z) value for the A10 node. The second coordinate replaces those parameters for node A00 and so on, until the twelfth coordinate replaces A11 as the final external node. Once you have done that, Group A will look something like this:

# Group A
0, -1
	2, 01, 0, 6543.113, 10454.278, 164.121, 1, 0, 0, 0, 0, 1
	2, 02, 0, 6554.892, 10299.606, 165.833, 1, 0, 0, 0, 0, 1
	2, 03, 0, 6814.759, 10267.854, 164.976, 1, 0, 0, 0, 0, 1
	2, 04, 0, 7087.576, 10240.097, 163.739, 1, 0, 0, 0, 0, 1
	2, 05, 0, 7128.309, 10164.294, 164.689, 1, 0, 0, 0, 0, 1
	2, 06, 0, 7228.410, 10076.812, 165.766, 1, 0, 0, 0, 0, 1
	2, 07, 0, 7131.135, 9948.399, 176.926, 1, 0, 0, 0, 0, 1
	2, 08, 0, 6976.020, 9962.909, 177.305, 1, 0, 0, 0, 0, 1
	2, 09, 0, 6977.694, 9830.413, 222.295, 1, 0, 0, 0, 0, 1
	2, 11, 0, 7055.529, 9712.768, 284.417, 1, 0, 0, 0, 0, 1
	1, 00, 0, 7057.493, 9831.250, 244.309, 1, 0, 0, 0, 0, 1	
	1, -1, 0, 7055.529, 9712.768, 284.417, 1, 0, 0, 0, 0, 1

Because we do not have a number of nodes which divides equally into twelve, Group B will be slightly different. We will start at B10 with an external node which is in the same position as A11 so that the two groups link together. Then we set B10 to link to B0 and run downwards but we will jump to B11 earlier. The gap between where we jump and B10 will be filled by a null node.

This is what I came up with:

# Group B
0, -1
	2, 01, 0, 6855.981, 9725.587, 284.417, 1, 0, 0, 0, 0, 1
	2, 02, 0, 6655.912, 9712.730, 284.417, 1, 0, 0, 0, 0, 1
	2, 03, 0, 6650.735, 9827.957, 244.304, 1, 0, 0, 0, 0, 1
	2, 04, 0, 6729.247, 9832.868, 222.295, 1, 0, 0, 0, 0, 1
	2, 05, 0, 6730.767, 9961.358, 178.251, 1, 0, 0, 0, 0, 1
	2, 06, 0, 6671.958, 9957.333, 178.290, 1, 0, 0, 0, 0, 1
	2, 07, 0, 6671.818, 9757.801, 179.041, 1, 0, 0, 0, 0, 1
	2, 08, 0, 6857.359, 9737.811, 187.855, 1, 0, 0, 0, 0, 1
	2, 11, 0, 7042.318, 9748.999, 177.658, 1, 0, 0, 0, 0, 1
	0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1
	1, 00, 0, 7055.529, 9712.768, 284.417, 1, 0, 0, 0, 0, 1
	1, -1, 0, 7046.595, 9915.998, 177.184, 1, 0, 0, 0, 0, 1

Save the paths.ipl file.

Step 5: Testing Our Progress

Because you made that saved game at El Swanko Casa this will be easy. If GTA Vice City is currently running, switch to it and close it. Make sure your paths.ipl has the new data for Group A and Group B and has the .ipl extension. Then load the game, select the El Swanko Casa saved game and watch what the peds are doing.

In my path I made the peds walk down the driveway, across the yard, onto the patio, up the stairs and onto the balcony.

Step 6: Linking with Original Groups

The Peds do not walk in from or out to the pavement because Group A is not linked to the original groups. We must locate where they are. Clear the PlayerPos display and walk onto the pavement outside El Swanko Casa. Press F4 and exit the game.

By noting coordinates already present in paths.ipl which are close to the one PlayerPos is displaying we can find an external node in an original to link our new paths to. I located the group for you by finding the coordinates for node number two from this group:

0, -1
	2, -1, 0, 7084.79, 10424.2, 162.979, 4, 1, 1, 1, 0, 1
	2, 0, 0, 6887.54, 10449.5, 160.502, 4, 1, 1, 1, 0, 1
	2, 1, 0, 6414.67, 10479.2, 162.943, 3.5, 1, 1, 1, 0, 1
	2, 2, 0, 6198.02, 10494.6, 162.169, 3.5, 1, 1, 1, 0, 1
	2, 5, 0, 6260.6, 9430.58, 168.627, 4, 1, 1, 1, 0, 1
	2, 3, 0, 6241.03, 9819.26, 169.634, 4, 1, 1, 1, 0, 1
	1, 0, 0, 7247.46, 10391.6, 160.76, 4, 1, 1, 1, 0, 1
	1, 2, 0, 6426.11, 10655.1, 161.517, 2, 1, 1, 1, 0, 1
	1, 3, 0, 6038.22, 10515.3, 159.743, 2, 1, 1, 1, 0, 1
	1, 3, 0, 6182.8, 10680.2, 157.825, 2, 1, 1, 1, 0, 1
	1, 1, 0, 6900.49, 10618.5, 160.74, 2, 1, 1, 1, 0, 17
	1, 4, 0, 6264.26, 9299.52, 169.529, 4, 1, 1, 1, 0, 1

Unfortunatley, node two is not actually an external node. By changing the 2 at the start with 1, the node will change from an internal node into an external node. After doing that we have to match node A10 with the position that node two is at. Group A should look like this once you match the coordinates:

# Group A
0, -1
	2, 01, 0, 6543.113, 10454.278, 164.121, 1, 0, 0, 0, 0, 1
	2, 02, 0, 6554.892, 10299.606, 165.833, 1, 0, 0, 0, 0, 1
	2, 03, 0, 6814.759, 10267.854, 164.976, 1, 0, 0, 0, 0, 1
	2, 04, 0, 7087.576, 10240.097, 163.739, 1, 0, 0, 0, 0, 1
	2, 05, 0, 7128.309, 10164.294, 164.689, 1, 0, 0, 0, 0, 1
	2, 06, 0, 7228.410, 10076.812, 165.766, 1, 0, 0, 0, 0, 1
	2, 07, 0, 7131.135, 9948.399, 176.926, 1, 0, 0, 0, 0, 1
	2, 08, 0, 6976.020, 9962.909, 177.305, 1, 0, 0, 0, 0, 1
	2, 09, 0, 6977.694, 9830.413, 222.295, 1, 0, 0, 0, 0, 1
	2, 11, 0, 7055.529, 9712.768, 284.417, 1, 0, 0, 0, 0, 1
	2, 00, 0, 6414.67, 10479.2, 162.943, 1, 0, 0, 0, 0, 1
	1, -1, 0, 7055.529, 9712.768, 284.417, 1, 0, 0, 0, 0, 1

Step 7: The Final Test

There is a limited number of paths you can use in GTA Vice City. You will need to delete some paths for the new paths to work. You can safely delete any group of paths which has its object parameter set to 2 because these are boat paths. Delete five or more of these paths to make sure there is space.

Save the paths.ipl file, load up GTA Vice City and marvel at our fully integrated, scratch-made, manually constructed pedestrian path!