| Home Page | Recent Changes | Preferences

Pathing For Vehicles

The common use of vehicles in UT2004 prompts mappers to take precautions and add special navigation paths for maps that include vehicles. Once properly connected to the network, bots will use the vehicles to travel on the special paths for road and sky navigation. Proper connection to the botpath network includes a complete path connection (one where each path is white, indicating the widest path) from vehicle spawn point to game objective.

Note: The main focus on this page began with Vehicle CTF, but these concepts apply to pathing for all vehicle gametypes.

Parking Spots

Vehicles are large and difficult to navigate in tight spaces. Vehicles too close to obstacles like map layout elements, decorative objects, or other vehicles will be hard for bots to get into and navigate with. When placing paths nodes that vehicles might use, make sure there is a lot of room to leave each spawn spot and be aware of areas (like PowerNodes) where bots and players will want to exit the vehicle, do something and get back in. Often gridlock can occur if RoadPaths are too close together near such areas. Nodes used to find and enter larger vehicles (like HellBenders or larger) should be away from the center of the vehicle (like towards the driver's side door), otherwise bots will get stuck trying to enter.

RoadPathNodes

RoadPathNodes define safe and easy places for ground-based vehicles to navigate. Because vehicles take up much more space than players, RoadPathNodes could always be connected by WHITE path nodes; detnoting the widest path available. It should be noted, however, that driving bots will use normal PathNodes as well, as long as they are wide enough. See also RoadPathNodes.

FlyingPathNodes

FlyingPathNodes indicate clear paths through the sky for flying vehicles. See also Pathing 2k4 Flying Vehicles and FlyingPathNodes.

Vehicle (VCTF) Pathing Info by Toonces T. Cat

The prime directive here is the K.I.S.S. principle...Keep It Simple Stupid! The more complex and meandering you make the RoadPathNode routing, the worse the bots will drive and the less likely it is that they will directly attack the other base.

In normal pedestrian gametypes, sometimes more is better with PathNodes to ensure that the bots can get everywhere on the level. Not so with vehicles. Just lay down the RoadPathNodes where you need the bots to drive the vehicles and nowhere else. The simpler and the more straight-forward the layout of the nodes, the better.

One huge problem with this is that the default range setting on a RoadPathNode is 10,000 UU (Unreal Units). If you put them down without adjusting this property, they will connect all over the level and the bots will go nuts and likely never reach the objective. I don't know any shortcuts for doing this other than to place 4 or 5 RPNs and then set their range and build the paths. If you get two-way pathing for all the Nodes, then you are in good shape. If they make connections you did not intend for them to make, then reduce the distance until they drop the connection. If they do not connect as a two-way point, then shorten it up a bit until they do. Sound tedious? Yeah it is, but the end result is well worth the trouble.


Here's a screenie of the editor to show you what it should look like:

[VehiclePathing]

Road Pathing on VCTF-Strip Mine


Here's is Steve Polge's summation of the rest of it:

"The larger vehicles require white (or forced vehicle) paths connected to the objective (flag base) and all assault paths. If the vehicle can't get all the way to the objective, make sure they can get to the assault paths for the objective, and then they'll continue on foot.

Also, objectives have a VehiclePathName property. If you can't get a vehicle path all the way to the objective, set the VehiclePathName to the name (under the object tab) of the nearest NavigationPoint that vehicles can reach.

If you need to force paths for vehicles, you'll need to check bVehicleDestination in the destination NavigationPoint properties, and then add a forced path in the normal manner.

The bottom line is that if you do not have an all white path between the objectives, the bots will not play the game properly. As Steve states above, if the bots can't reach the objective in the vehicle, then you'll have to use an assault Path to get them there. His instructions are spot-on. Follow them carefully and it will work for you.

The other instructive thing I learned from this lengthy exercise is that very few existing CTF levels will make for really good VCTF maps if you plan to use bots. I suppose you can jack an ONS map and convert it, but remember that the main deal in VCTF is they have to do the following:

  1. Get in a vehicle and drive as close as possible to the objective.
  2. Exit the vehicle and grab the objective.
  3. Make their way back to the vehicle with the objective and get into it.
  4. Drive back to their own base with the objective.
  5. Get out of the vehicle and make the capture.

That is not what happens in ONS and the A.I. in the maps is not set-up to facilitate it happening. If you use a base ONS map, dump the existing A.I. and start building it from scratch. I haven't even begun to mess with the FlyingPathNodes, but as you can't carry the flag in either a Raptor or a Manta, who cares? I put some into a level and they connected and it seemed to work okay as long they covered the map with their connections...Here's another tip, though, wait to do the FlyingPathNodes until you're just about 100% done with the RoadPathNodes. Once they are in place, with View Paths enabled, the map looks like an explosion in an orange spaggetti factory...i.e. - You can't see a thing after that.

Additional VCTF (VehicleCTF) Level Tips by Toonces T. Cat

I have discovered a few additional key points to note in the construction of a VCTF level:

  1. Using an AssaultPath after the last RoadPathNode that vehicles can reach works, and works well, but introduces new and even more complex issues into the equation. Someone else mentioned it in another thread, but what good is it to have your bot grab the flag and then not have a vehicle available when it returns to the RoadPathed area of the map? The best bet is to have the flag in an area where it can make a double (bi-directional) white connection to one or more RoadPathNodes.
  2. Think vertical and you can have your cake and eat it too. I have created a second elevated level that is pathed just for foot use and it also connects to both flags and, even though the bots use it, it does not preclude them from using the vehicles as well. In fact, combos are very possible as I have seen them use the overhead route to get the flag and then jump into a Tank or a Hell Bender that one of their team-mates is using and hitch a ride home...
  3. The Teleporter definitely needs to be in the game-type. The bots commonly chase a team-mate's vehicle with it and will jump on-board in mid-toss...It is extremely cool to watch them do this...
  4. When the flag is in a vehicle accessible area, elevate it above the floor on some type of base that the bots can climb on foot, but not in a vehicle. I am using an octagonal base that is about 256 units in diameter and about 40 units high. It has 4 narrow stairwells cut into it (one on every other side) that the bots can use. It is high enough to stop a vehicle (except for the Leviathan), but not so high that the nearby RoadPathNodes cannot make a good path connection. (Why do you need this? Because the bots playing defense will pile into a Goliath and camp the flag if they can get on top of it...and I mean literally ON TOP of it. An enemy bot cannot get to it to take the flag if they are there. This is a workaround of sorts, but it is an effective one as even if they are using a Tank, if the attacker engages them, another bot can come up form behind and take the flag...I've watched it a dozen times.)
  5. As I said above, the 40 unit high barrier will not stop a Leviathan...Hence, tip #5 is do not path the Leviathans if you have them in your level. If a Masterful bot gets into one of them with a couple of his pals, the other team is in big trouble. It's better to keep them out the Leviathans unless a human is driving it.
  6. RoadPathNodes can be further cleaned up by changing the MaxRoadDistance value in the properties. The default distance is ten thousand. This can create ALL KINDS of unwanted clutter. In the top orthographic view measure between the nodes that you want to connect using SHIFT+MIDDLEMOUSE to bring up the ruler and adjust the nodes accordingly.

External Links

Related Topics

Discussion

(relaying Toonces' sentiments): I hope this is helpful to everyone!

SuperApe: Thank you, Toonces! You da Cat!

SuperApe: Edit. Additional VCTF Notes added. Somebody should write up a VehicleCTF or VCTF page. EDIT: I will post the important stuff here on the wiki soon (after VCTF contest is over): [Mapping for VCTF].

King Mango Going to look for the proper place to post this, but in the meantime, to enable xloc in a VCTF game check [this thread] at Unreal Playground. (SuperApe: I think I got it up there now.)

Tarquin: Use the # wiki markup for numbered lists please :)

Erdrik: This is very help for pathing vehicles for VCTF, but I was wondering about Onslaught. Edit: doh, Assultpaths work in Onslaught as well, my bad :p

SuperApe: Temporarily copying VCTF information to Mapping for VCTF before I remove it from here.

Lucy: The main problem I'm having with VCTF pathing is that the bots will get in a vehicle and immediately get out. On the rare occasion they stay in the vehicle, they will not drive it anywhere and just stay in place.

SuperApe: This is a common pathing problem, akin to bots getting "stuck". In this case, the bot knows the vehicle is desirable, but the destination isn't clear, so it jumps back out or sits there. In real terms, this means the paths from the vehicle (spawn point) all the way to the enemy flag are not all white (the widest) paths. Added Blit'z Pathing Tut in External Links, which includes this explanation on the "white road":

In other words, think of this as a single, white road that connects to each vehicle and each objective. Bots will only understand how to reach objectives if there is a white route from the vehicle they just hopped into to the objective they're seeking. If this route doesn't exist, then the bot will abandon the vehicle and proceed on foot.

LionsPhil: Aww. Am I so wrong for feeling sorry for bots who have found a shiny tank to play with, but can't work out where to take it? ;)


Category Mapping

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In