Pathnoding Unreal Levels for the Unreal Tournament Bots

by: Randar
mimpchnk@uswest.net

Now, familiarize yourself with UnrealEd2. Here are some of the basic changes you need to be aware of. After loading a level go to "View" and select "Actor Class Browser." Here you will find the "Navigation Points." To build the pathnode network after laying out the paths for the level, go to "Build" and choose "Rebuild AI Paths" (or choose "Build Options"). To show the paths, right mouse click on the top viewport bar and you will find the "Mode, View, Actors, Windows" menu. Then select "View" and "Show Paths."
The following are basic tips I have learned from pathing the Unreal Tournament levels for the Unreal Tournament Bots. I will be adding to them from time to time. If you have any tips, let me know, and I will give you proper credit.

The Bots can do Hammer-jumps and use the Jump Boots. But, make sure their is a reason for them to make these jumps. Place an item in the immediate area that the Bots are to jump to. (In other words, do NOT expect the Bots to do most jumps if there is nothing for them to actually get when they make the jump.) Also, set the bImpactJump (in the JumpSpot"s properties sheet) to true for the Hammer-jumps. Next, be sure that you place Jump Boots in the general vicinity of the jump that you want them to make. If you put the boots at one end of the level, and the jump is at the other end, the Bots will rarely, if ever, make the jump. But, if the boots are in the immediate area of the jump, they will first run and get the boots and then go to the Jump Spot.
Kickers are sometimes a pain. It is actually the LiftExits at the beginning and the end of the Kicker path that help the Bots get on and off the Jumpad. The JumpSpot (not the LiftCenter—the JumpSpot is a special LiftCenter) at the top tells the Bots where they are supposed to land and the second LiftExit completes the jump. (Hint: Set the JumpSpot"s bAlwaysAccel to "True." In fact, this should probably be set to "True" for any and all kinds of jumps including hammer jumps, jump boots or jumpad jumps.) Thus, there must be a LiftExit at the bottom of the jump, in front of the JumpPad; a JumpSpot that the Bot jumps to; and a final LiftExit near the JumpSpot at the top of the jump. Make sure these nodes have the right (same) names or tags. (Also, don"t forget the Triggers on the Jumpad for the sounds, etc.) One of the best ways that I know to learn how to node for the Kickers is to go into a level that you are sure is done correctly and look at the Kickers with their associated JumpSpot and LiftExits. Then do what they have done.
The Bots always seem to have trouble going through portals. They frequently get hung up in them. To correct this, the best solution that I have found (and I have tried everything) seems to be to put an item on BOTH sides of the portal just a short distance from the actual portal itself. This seems to make the Bot "see" through the portal and then move through it to get that item.
To make the Bots "trip a trap" or "use" a button make sure that you put a pathnode up against the button or trigger. In other words make sure that the network path created by a path define "forces" the Bots to go through the area of the trigger device. (If you have too many paths in the area of the button, the Bots may take them rather than the path to the button. If possible, try to force the Bot to take the path to the button or trigger by making it the only path available.) Now, with all of this said, you can"t make the Bots "time it right" so that they catch other players in the trap. It will just be a random thing.
One of the most obvious things that could be done, that is not apparently being done by too many mappers, is to go into "Spectator Mode" and watch the Bots play the level. First put in one Bot and watch it for five minutes, then put in several more, and watch them for another five minutes. (Switch between the Bots by pressing the "Fire" button on the mouse.) This simple test will uncover most any problem with the pathing in the level. What, of course, you are looking for is any problem area. Do the Bots get hung up on something? Do they get caught in a loop? Do they get all the items? Do they go into every part of the level? Do they make the jumps? Do they use the elevators correctly? Do they go through the portals?
In CTF maps, Salvation let me know that if the Bots don"t go for the flags the only thing you can do is delete the flags, replace them, do another "Path Define" and then it should work. Now, The-Crow has just confirmed that this does work. I have also found this little hint to work in other situations as well. For instance, I have found some lifts that refuse to work, even though it looks like everything is okay. I deleted all the related nodes and laid down fresh ones, did another "Path Define" and it came back to life. Try it on dead links.
Latch sends in this tip: "With some help, I"ve found that the height of the flagbase actor is critical. If the flagbase is too high, even though it is still attached to the floor and has blue paths to it from other nodes, the bots will ignore it. They"ll run right by it. Simply lowering the flagbase so that its node-path connecting point is more even with the blue paths fixes it."
I have noticed that when you fire up a map in UnrealEd, the log will give you an error if you use "BumpOpenTimed" on your movers. The message tells you that Bots do not understand this. So, use "StandOpenTimed" instead. This brings up another interesting point. Read the log file that is created when you build and play a map in UnrealEd. It gives you a ton of information about your level and may point out a few problem areas.
Sometimes a Bot will appear to get "stuck." For instance, it will run into a wall and keep running. It actually looks like the Bot is trying to get something that is not in the immediate network of nodes. Well, it is and thanks to AlleyCat here is a tip to actually find out what the Bot is trying to do when it gets stuck. "Join the map as a Spectator, use fire to view from the Bot of your choice, then hit TAB and type VERBOSE. This gives a running insight in to what the Bot is actually thinking, even the pathnode number that he is after. (In UnrealEd the pathnode number is in it"s properties under Object/Name)" After you find the pathnode or item that the Bot is trying to get, that is causing the problem, move it out of the way. That should solve the problem of the Bots running into walls.
Now, all of you probably already know this one, but it took me forever to find the answer to this frequently asked question: "What is the difference between the red and blue paths after you do a "Paths Define"? Well, it is simple. BLUE lines from node to node are the best routes, and the Bots will usually choose to take these paths most frequently. RED lines mean a less desirable route. The Bots will take red routes, but blue is better! Sometimes by tweaking (i.e., moving) the nodes you can change a red path to a blue one. But, sometimes, no matter what you do, the path will remain red. Just remember: BLUE IS BETTER! There, now you know.
Well, here is a little problem that apparently is a "bug" in Unreal Tournament. I have noticed in a couple of maps that have TWO Invisibility power-ups, that when you or a Bot picks one of them up the game crashes with a Critical Error message. The solution is to delete one of the Invisibility power-ups, re-do the Path Define, and have only one Invisibility per level.
I am amazed that I am still finding so many maps that are not properly pathed for the Bots. (Even some of the major UT Map sites are not catching the glaring pathing errors in some of the better maps they have reviewed. Many of the maps that are getting high scores are Bot-broken.) Some of the UT maps I have downloaded have pathnodes, but a "Path Define" was never done. Other maps do not have the elevator"s LiftExit and LiftCenter nodes properly tagged and placed. And some mappers are just putting JumpSpots in the level without the proper LiftExits and their tags. This will never do. PLEASE read the tutorials listed above! I have even found the need to go back and re-read Polge"s tutorials to figure out a few Bot-problems. I actually missed a few tid-bits on the first read. So, my advice is to read it again.