Sniper's Paradise!


PATHNODING FOR THE UNREAL ENGINE BOTS

Here are a few more excellent tutorials on how to path Unreal levels for the Unreal Bots.

For Unreal:

Unreal Creature Care and Feeding Guides

Tweaking Pathnodes

Bot Pathnoding 101



PATHNODING UNREAL LEVELS FOR THE UNREAL BOTS

In a very real sense, the Unreal Bots are ONLY as good as the levels designed for them. In other words, for the Bots to play at their optimal best, the Unreal levels must be carefully created for them. While there are many good deathmatch levels out there for human play, there are unfortunately too few that are great for Bot play. (I have seen some levels that can NOT be adequately pathed for the Bots!) This tutorial will attempt to help the level designers design levels that will make the Unreal Bots and the Bot loving community happy.

WHERE DO YOU BEGIN?

First, design a level with the Bots in mind. This means that you must know the limitations of the Unreal Bots. (Yes, they DO have their limitations!) The Bots do NOT like levels with too much water, lava, slime, or acid in them. Even with good pathing, they either will avoid these areas altogether, or you will always find them jumping in and choking it down. Another little problem with the Bots is they apparently cannot use all of the items (i.e., jump boots, force field, etc.) that the human players might find in their inventory.

All in all, the best levels for the Bots are those that are designed with an elegant simplicity. If a level is too complicated or has a lot of tricks and traps, it will probably present problems for the Bots. Now, while it is tempting to design a killer level with all kinds of bells and whistles, the best levels for deathmatch (whether for humans or for Bots) are those levels that tend to be the simplest in design. Save all of the unique and unusual effects for the single player levels. For the deathmatch levels, the best ones are those that are fast and efficient—given to the one and only goal of "kill or be killed." Of course this does not mean that a good deathmatch level must be boring. Use textures that work well together and support the theme of your creation. But keep the "eye candy" to a minimum. Levels that contain a lot of special effects (i.e., lighting, fog, etc.) will really slow down when a Bot or two are added to them.

THEN WHAT?

After a level has been completely designed, pathnode the level for the Unreal Bots. In the "Browse" Menu at the right hand side of the Unreal Editor choose "Classes." Under Actor Classes choose "NavigationPoint." Under NavigationPoint you will be using "PathNode" to path the level for the Bots. And, so the Bots can use the elevators, you will also be using "LiftExit" and "LiftCenter." In one of the Map View screens (Mode—Textures; View—Show Moving Brushes; Actors—Full Actor View) choose the view that allows you the first person perspective so that you can move through the level.

THE PATHNODES

Under Classes, NavigationPoint, choose and highlight "PathNode." Place the pathnodes in the level by pointing to the location on the floor where you want the node to go, then right click the mouse and choose "Add PathNode Here." The pathnode will appear. (It is a Golden Apple.) Continue pathing the level choosing the best possible route for the Bots. All pathnodes should be placed at key points—next to weapons or items. Each pathnode should be visible to the next pathnode which is in sight of the next node, and so on. (In other words, do not separate the nodes by too great a distance. But, don't place them too close together either.) On stairs, place one pathnode on the floor at the middle of the base of the stairs, and place the next node on the floor at the middle of the top of the stairs. (In other words, you should only have two nodes per flight of stairs: one at the top, and one at the bottom. Try not to put any nodes in the middle of the flight of stairs.) The two nodes should be visible to each other. If there is a landing (that changes the direction of the stairs) place a node on that landing, and, of course, another at the top of the stairs. (Do NOT place a node on every step! Of course spiral staircases present a unique pathing challenge—just do the best you can, with as few pathnodes as possible.) Continue to path the level until you have left a trail of "golden apples" throughout the entire level.

PATHINGTIP: Area too small for the Actor.

Some areas are very difficult to path because they are too small for the Actor. (You will get a message saying: "Actor does not fit here.") Difficult areas would include ledges that are too narrow, rooms or halls that are too small, etc. One work-around is to place items in these areas, if you know that the player actually can go there. Then place a pathnode as close to this trouble spot as possible. The pathnodes will usually link to the items in and through the problem area when you do a "Path Define." But, the best work-around is this: You can MOVE any pathnode or item to exactly where you want it (moving it in any direction; left, right, front, back, up or down) by selecting it, after you have placed it, and using a combination of the CTRL key and the left or right or left-right mouse buttons, for precise placement. (You can also DUPLICATE an existing pathnode by right-clicking on it and choosing "Duplicate.") This means that you can move a pathnode into an area that gives you an "Actor does not fit here" message. So, you can put pathnodes on narrow ledges, in difficult areas, spiral staircases, etc. You can do the same thing for the elevator nodes as well. One more thing. If you use any portals or teleports in the level, make sure that you place a pathnode just outside the portal, and put a pathnode inside the portal chamber as well. You may have to move the pathnode (as described above) to place it in the best center position.

PATHINGTIP: Hard areas to path

Every once in a while, you will come across a specific area that almost defies pathing. What do you do? Well, here is a little trick that really works: use the "LiftExit" and "LiftCenter" nodes! (Just be sure and give both of their LiftTags the same name.) You read that correctly. You can use the elevator nodes to get the Bots to jump or drop to difficult areas that may not easily link when you do a "Path Define." You can even use the elevator nodes to help the Bots get into and out of water more easily. Another interesting use of the liftnodes is in a low gravity room. You can actually get the Bots to jump UP to higher areas to retrieve items. (In normal gravity, they would only jump to the same level or drop down to the next lift node. But, jumping in low gravity gets the Bots to jump higher than they even "expected.") Be creative and find other ways to use these special nodes to move the Bots into and out of unusual areas! One other thing that you can try is to increase the "desirability" of any item that the Bots can get and use. Every item has a "Properties Sheet." In it you will find the "maxdesirability" field. Tweak this number, and the Bots may show a greater interest in the area that is giving you problems.

PATHINGTIP: Bot camping issue.

Then there is the dreaded "camping" problem that sometimes happens even when a level seems to be pathed correctly. I have found that the only thing that usually works is to (sometimes drastically) change the weapons and items placement, not just the pathnode placement. Even then, be aware that the problem may not entirely go away. A different kind of problem is seen when dealing with an area that the Bots just won't frequent. (This often happens with "dead-end" rooms and areas. Remember it is best to design your levels where there are NO "dead-end" areas. Make sure that every area has an entrance and an exit for better game flow and for better routing. If you simply must have a "dead-end" area, make sure that you have something really significant in that room that will give the Bots a reason for going there.) If you follow the Bot around in Spectator Mode, you will realize that in almost any level the Bots tend to follow a predictable path. This path may leave certain areas out of the Bots territory. This problem too, demands a sometimes radical solution—change the weapons and items placement. This is a frustrating solution to an aggravating problem, but it usually does work. Don't give up! Keep at it until the level flows smoothly and works well in Bot play. If one pathing or weapons and items placement does not work, try another.

PATHINGTIP:Getting bots to use a trigger

To get the Bots to "use" a button or switch, you must place a Trigger in front of the button. The Trigger must be set so that it will "push" the button AND also activate the object you want the button to open. This is rather complicated, so for purposes of illustration, let's assume you want a button or switch to open a door. FIRST, put a Trigger in front of the button and open its Properties Sheet. Under Events, you see a field for Event and Tag. In the Event field put "Door" and in the Tag field put "DoorTrigger." Under Object of the Properties Sheet for the button the Initial State should be "NormalTrigger." Under Trigger of the Same Properties Sheet, put "True" for InitiallyActive and "False for TriggeronlyOnce. For TriggerType put "TT_PlayerProximity." SECOND, go to the Properties Sheet for the button or switch (the button or switch is actually a "Mover") and under Events, in the field for Event put "None" and in the field for Tag put "Door." Under the Properties Sheet, Mover, for the BumpType put "BT_PlayerBump." And Under the Properties Sheet, Object, for the InitialState put "TriggerOpenTimed." THIRD, go to the Properties Sheet for the door (this is also a "Mover") and go to Events. Under Event put None and under Tag put "Door." Under the Properties Sheet, Mover, for the BumpType put "BT_PlayerBump." And Under the Properties Sheet, Object, for the InitialState put "TriggerOpenTimed." (NOTE: There are quite a few other fields that you can choose to effect various aspects of the button and the door, but the above fields in the Properties Sheet tie the trigger in with both the button and the door. What you have basically done is make the trigger activate the "Door"—the name of the Events Tag for BOTH the button mover and the door mover. By the way, you should realize that you must set the time delay for the door so that it will stay open long enough for the Bots to actually go through that door. What is more, there must be something behind that door that is worth getting—like a SuperHealth or a weapons cache. Then that door must stay open long enough for them to get out of that room.)

PATHINGTIP: Bots navigating thru water

One of the hardest things for the Bots to do is navigate through water. (Perhaps the best advice is this: Do NOT put any pathnodes in the water unless you have to!) If you must have them "take the plunge" make sure that there is a very good reason for them to get all wet. Some good reasons would include items and weapons in the water (If you place items in the water, you should raise them off the ground about a foot or so. Otherwise, the Bots will get hung up trying to get the item while in swimming mode.), or the need to move into another area of the level. Do NOT make the Bots wander through underwater labyrinths just for "fun." (The Bots have a nasty habit of drowning, especially in deep water. In fact, it looks like the Bot's AI does not always tell them to go UP for air! Another little problem the Bots appear to have is that sometimes they stop swimming and go into a walking or running mode underwater. This almost always means a sure death, unless their swimming AI kicks back in.) Place the pathnodes in the water like you do on land. However, if the water is deep, you may have to move the pathnodes (up or down) into the most efficient path possible. (Sometimes, for some unexplained reason, the pathnodes under water do not always connect properly, especially if the water is deep. Make sure that you go back into the water after a Path Define to check that all the water nodes are linked properly.) Always put pathnodes at the water's edge, and put several of them at various points along the water's edge so the Bots can easily jump out of the water. One or two more things, do NOT place any pathnodes above the water. And, remember, you can use the liftexit and liftcenter nodes in and around water. But, use them only to get the Bots in and out of water areas. Do NOT use these lift nodes to try and get the Bots to move through vast underwater areas. These elevator nodes will cause the Bots to pause at the various points (or sometimes change direction) and then all they will do is choke it all down. (And, don't even think about trying to path the Bots through acid, slime or lava.)

PATHINGTIP: Bots and lifts

Do NOT use "PathNodes" (Golden Apples) for the Elevators—they do not work! Instead use the "LiftExit" and "LiftCenter" nodes. (These nodes look like a Griffin's head.) Place the LiftExit node where you want the Bot to WAIT for (or get off) the elevator. But, do NOT place the LiftExit too close to the actual elevator brush itself. If you do, and the Bots get too close to the elevator, they will active the lift too soon. (Use the same procedure as you would a regular pathnode. Point at a spot on the floor just outside the elevator platform brush and right click to place the LiftExit.) You must have at least TWO LiftExit nodes. One for the bottom of the elevator and one for the top. (You can have more than one entry or exit nodes, but it is best to only have one for each floor.) Place the LiftCenter node in the center of the elevator area, on the floor where the elevator brush is. This is where the Bot will stand and wait until the elevator reaches the top—if you do everything else correctly. (NOTE: Do not place any nodes, of any kind, in "mid-air"—floating far above the ground. They must be placed at approximately "waist-high" level above the ground.)

This next step is CRITICAL to getting the Bots to use the elevators properly. (In other words, to keep them from jumping off the elevator too early, or to keep them from standing under the elevator, etc. EACH ELEVATOR MUST BE GIVEN A UNIQUE NAME, AND EVERY "TAG" ("LIFTTAG") MUST BE SET ACCORDINGLY, AND THE ELEVATOR'S MOVER PROPERTIES MUST ALSO BE SET PROPERLY! Each elevator node (LiftExit and LiftCenter) has its own properties sheet. Right click on them and you will find their properties. When you are in the LiftExit Properties choose "LiftExit" and then "LiftTag"—Give a name to that tag that will be used for that elevator and all its tags. (Each elevator MUST have a different name.) Do the same with the LiftCenter LiftTag—give it the same name that you gave to the LiftExit for that elevator. NOW, and this is absolutely essential if the Bots are to behave themselves on the elevator, you MUST select the elevator brush, then right click that highlighted (pink) brush and choose "Mover Properties." This will give you the Properties Sheet for the selected elevator. On this Properties Sheet choose "Event" and then "Tag." Give the elevator the same name as its LiftExits and LiftCenters. This will "link" the elevator with the LiftExits and the LiftCenter nodes.

Bot Trivia: Did you know that the Bots can "call" elevators, but you can't? It looks like the Unreal Bots know how to "push all of the elevator's buttons" to use the elevators to their own advantage. If the Bot is at the top of an elevator shaft and the elevator is on the ground level, the Bot can actually summon the elevator. Hey, we can't do that!

THE PATH DEFINE

If you have completely pathed the level and properly pathed the elevators as well, the next step is to go to "Options" and choose "Rebuild." Under Rebuild, choose the "Lighting" tab and then you will find the "Paths Define" button. Press this and the level will be processed and pathed. (This can take several minutes!) After the level is pathed, choose "Close." Then go to "File" and SAVE THE LEVEL. (Of course, you should be saving the level all along at various stages of development.)

AUTO BOT TIP

You can make your level automatically add Bots by going to Options, Level Properties, Level Info, and under Default Game Type put: Class'Unreall.DeathMatchGame' (The way you place this in the field is to, under Browse Classes, choose: Actor, Info, Game Info, Unreal Game Info, and then highlight "DeathMatchGame." Then in the Level Properties field for "Default Game Type"—which probably says "None"—click on the field and then select "Use." Because you have highlighted "DeathMatchGame," this will be placed in that field. Be sure and save the level now.) This will automatically bring Bots into the game when you start the level. So, you can just double click on the name of the level in Windows Explorer to fire up a game (and then close Explorer when the Unreal Log starts) and you don't even have to fool with the BotMatch Menu! (This option reads your Bot Configuration file in the unreal.ini, so make sure that you have at least one Bot selected for BotMatch.) If you want to bring in other Bots, just go to the console and type in: addbots x (where "x" is the number of Bots you want).

THE FINAL STEPS

Unfortunately your mission to create a killer Bot level is not done. There are a few more steps that you really must take, if you want your level to be a top Bot level. First, go back into UnrealEd and load the map. Go through the level in the 3D view and look at ALL the pathnodes. Are the pathnodes and their links neat or sloppy? (It does usually make a difference! Remember, you are actually laying out the exact route that the Bots will take through the level.) Especially pay attention to trouble areas—like stairs or areas around lava or portals! Look for any pathnodes that are too far off the ground. Also, while in UnrealEd look at each elevator and their special pathnodes (LiftExit and LiftCenter) to see if they are placed and linked properly. And, if you are really brave, turn the "View Paths" option on and follow the pathnodes, looking for any broken (i.e., unconnected) links. All of the paths will appear as blue and red lines that connect all of the nodes and items. Fix any problems and then do another "Path Define" and save the level.

Secondly, whether the level was tweaked or not, go into Botmatch with ONE Bot and use "Spectator Mode" to follow the Bot through the level. Look for problems: areas where the Bot gets stuck and run in place; areas where the Bot does not go; excessive camping; etc. Then add one more Bot and watch them interact for a while. Next add several more Bots into the level and go spend time in each room/area looking for any problems. This second step will catch things you can't see in UnrealEd. If Bots don't move through a level, even if the pathnodes are great, you may have to change weapons/items placement. Sometimes Bots will just get stuck on several items if they are placed all in a row. To fix this, you have to break up the items placement—avoid straight line series placement of ammo and health. Sometimes you just have to delete and then re-place the item that gives the Bot a problem. You should realize that some Bot problems will be solved by just having another entity (Bot or human) to interact with, but observing a single Bot in the level while you are in Spectator Mode is very revealing. Watching the Bots, you really begin to notice all kinds of things that will teach you the ways of the Bots.

For a variation of the "Spectator Mode" you can also go to the console while the Bots are in play and type in "viewclass femaleonebot" (or femaletwobot, maleonebot, maletwobot, malethreebot, etc. depending on which Bot you have in the game).

Finally, go into Botmatch and go one-on-one against the Bot on your level. Then bring in a few more Bots for a good old fashioned free- for-all. The better you have pathed and optimized the level for the Bots, the better they will play . . . and the more you will die!

Yes, this is a lot of trouble! But it is an essential part of quality level design. Remember, our ultimate goal is not to just build a good level for human deathmatch play, but also to build a better level for the Bots.

CLOSING HINT

If you run across a level that someone else made and the Bots don't play it well, you can always fire up UnrealEd and follow all the steps in this tutorial to make your own Bot improvements. (But, if you want to re-release the Bot improved level, please be sure and get the permission of the level designer first.)



PATHNODING UNREAL TOURNAMENT AND UNREAL TOURNAMENT 2003/2004 LEVELS FOR THE BOTS

PATHINGTIP:

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.

PATHINGTIP:

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.

PATHINGTIP:

One of the problems that has been encountered in some CTF levels is trying to get the Bots to jump over a low gravity void. Well, an ingenious solution has been found. Nitin has passed on this tip from Clay: All you have to do is add a bridge over the void, path it and rebuild the nodes. Then you delete the bridge but don't rebuild the paths. Basically the flags need to be connected by nodes which isn't possible over a low gravity void. Without the bridge but with paths, the Bots use the jumpnodes. (It should be noted that the nodes used are the JumpSpots and their associated nodes. Do not use regular pathnodes and expect the Bots to jump over the void.)

PATHINGTIP:

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.

PATHINGTIP:

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?

PATHINGTIP:

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."

PATHINGTIP:

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.

PATHINGTIP:

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.

Here is link to a little mutator for Unreal Tournament called Mind Reader that can help with all of this! It allows you to see what a Bot is thinking during the game. Use it to help tweak the level's pathnoding for Bot play.

PATHINGTIP:

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.

MeltDown sends additional word on the subject of BLUE and RED: "The original difference between blue and red, came from Unreal. The red lines are okay . . . Bots, Nalis, players, etc. can walk on them. The blue lines, on the other hand, are walkable by players and the vast majority of the monsters, including the bigger ones like the brutes etc. I don't know if Queens and Titans are included, but this is where the blue and red lines originally came from."

PATHINGTIP:

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.

PATHINGTIP:

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.

PATHINGTIP:

For further information on advanced pathing for Bots be sure and see UnrealWiki's tutorial! *

Please let me know if there are any corrections or additions that need to be made to this tutorial. Thanks!

For other Unreal tutorials and information on related subjects be sure and see Epic's Unreal Developer Network.

A very special thanks to Robert Field, of Frog Bot fame. Without his patient help, I would have never figured out many of the problems we have encountered with the Unreal Bots. And a special thanks to Erik and his unique pathing tips on the special use of elevator nodes. And a special thanks to Donzella for his additional tip on using the elevator nodes in water. And a special thanks to Ewan for his "viewclass" tip.



TWEAKING PATHNODES

by Schlacht

This document will explain a few things I've learned while working with pathnodes so that you can avoid the pitfalls that I did not. It will not tell you the exact details of adding and manipulating pathnodes in UnrealEd. Other tutorials cover that quite well. Nor will it explain using pathnodes with lifts or using the special purpose nodes mentioned below. It will tell you some basic do's and don'ts about adjusting your pathnodes so that bots will perform better on your map.

THINGS YOU'LL NEED TO READ

So now you've got your level made, textures all aligned, and it's time to setup those pathnodes. Or maybe you've setup your pathnodes and things aren't working quite like you expect. In either case you're going to need to know a few things.

You really need to read the Unreal Creature Care and Feeding Guide - by Steven Polge of Epic MegaGames, Inc. It will tell you everything you need to know about setting up pathnodes so that bots will be able to use your level.

It tells you about placement of the pathnodes, how to set up pathnodes so bots will use lifts, and then goes on to discuss special purpose nodes like "AmbushPoint," "JumpSpot," and "TranslocDest" which tell bots that "This is a good spot to lie in wait," "You can jump to this spot," and "You can translocate to this spot."

It also covers "UT Game Types" - telling about things you must do for your level to work with bots for team games, "Triggers" - details about trigger operation, and "ZoneInfos" - information about zone settings.

Definitely required reading. It would be a good idea to save this on your hard drive for furture reference.

 

The below text assumes that you have read the section titled "The Navigation Network" of the Unreal Creature Care and Feeding Guide.

 

GETTING DOWN TO BUSINESS

Once you've read the "The Navigation Network" section you should be able to place your pathnodes fairly effectively. Keep in mind that the network of pathnodes will almost certainly require tweaking to make bots work well with your map. Since you've (hopefully) spent a lot of time tweaking and tuning your map's appearance to make it as good as you possibly can, you probably want the bots to know your map inside and out so they can give unwary players a serious thrashing.

If you have read the "Navigation Network" section of the Guide you should know how to make UnrealEd define the paths between the path nodes and how to view the paths between the nodes. You should also be aware that the BLUE paths are more "preferable" to bots than the RED paths are.

When adjusting your pathnodes you should always save your map first and then only move one or two of the pathnodes before re-defining the paths. This will let you observe any changes to the paths between the pathnodes and decide if the changes were good or bad. Once you get better at adjusting you might decide to move more pathnodes at once.

If adjusting a pathnode causes one or more of the paths connecting that pathnode to other pathnodes to turn from RED to BLUE then you have made those paths "preferable" to bots. This is GOOD. You might want to save your map at this point.

If adjusting a pathnode causes one or more of the paths connecting that pathnode to other pathnodes to turn from BLUE to RED then you have made those paths less "preferable" to bots. This is BAD. You should immediately move the pathnode(s) back where they were before. Re-defining the paths after putting the path node(s) back where they were should turn the paths back to blue again. Or you could just reload the map you saved before moving the pathnodes. You saved it before making changes didn't you?

By making as many paths as possible BLUE you give a bot more path choices when it is navigating. While it may not be possible to make every path on a pathnode BLUE you should try to ensure that at least one BLUE path goes from a pathnode to each of the pathnodes closest to it. If a pathnode doesn't have any BLUE paths at all it is unlikely that a bot will go to that node at all unless forced to by other circumstances.

Things that can make a path RED: 1) pathnodes too close together, 2) the path between two nodes being partially or completely obstructed by a brush or coming too close to a brush.

 

PATHNODE PROBLEMS

I encountered problems when I first used pathnodes. Bots would not go through the doors of my buildings and they would not go all the way up ramps. I had not read the Guide at this point and had no clue about viewing the BLUE and RED paths. Once I read the Guide things were clearer.

The problem with bots not going through doors was because the pathnodes on either side of the openings were too close togetherand had a RED path between them as in part A of the below diagram. Since it was not BLUE and "preferable" the bots werenot going to use it while other BLUE paths were available. Moving the pathnodes further apart (as in part B of the below diagram)and re-defining the paths resulted in a BLUE "preferable" path between the nodes which the bots were more than happy to use.

 

The problem with bots not going all the way up ramps was because the pathnode at the middle of the ramp did not have an unobstructed path to the pathnode at the top of the ramp and they had a RED path between them as shown in part A of the below diagram. This meant bots would go partway up the ramp but would not choose to go all the way to the top since the path there was not "preferable." Moving the pathnode at the top of the ramp upwards (as shown in part B of the diagram) and re-defining the paths resulted in a BLUE "preferable" path between the nodes. This resulted in the bots choosing to go all the way up the ramp rather than stopping halfway up the ramp.

 

REACHSPEC NUMBERS - A BALANCING ACT

In my opinion you should define paths from the log window. This way you can observe the log window output as the paths are defined and make use of two values reported to you as the definition of paths ends. The number of reachspecs added and the number of reachspecs pruned will be useful as you optimize your network of path nodes.

Sample Output From Log Window

DevPath: Added 281 reachspecs
DevPath: Prune reachspecs
DevPath: Pruned 125 reachspecs
DevPath: All done

The number of added reachspecs will increase as you add more pathnodes, player starts and inventory items to your map. More reachspecs means a more complex network.

The number of pruned reachspecs is a measure of how many unnecessary reachspecs UnrealEd was able to remove from the network. This reduces the complexity of the network.

While the Guide does not specifically say so, it would seem logical that thenumber of reachspecs in the network will be equal to the number of added reachspecs minus the number of pruned reachspecs.

You must have enough pathnodes in your map in order to ensure that bots will move everywhere that you want them to in your map but you should not have too many pathnodes because you may have more than are necessary making the network more complex than need be.

By observing these numbers in conjunction with the color changes in your paths you can get a good feel for whether your adjustments helped or hurt. If an adjustment makes the added reachspecs decrease or the pruned reachspecs increase without making any more RED paths then your change simplified the network slightly, which can hardly be a bad thing. If an adjustment makes the added reachspecs increase or the pruned reachspecs decrease without making any more BLUE paths then your adjustment made the network slightly more complex which may be a bad thing (unless the adjustment did make some BLUE paths that you needed in which case added complexity may be the price you have to pay. There's the balancing act!)

 

FINIS

That's it. Once you've read and absorbed this document and the Unreal Creature Care and Feeding Guide and possibly the other pathnode tutorial / information mentioned above you should be ready to sit down and start making beneficial adjustments to your network of pathnodes.

Good luck with your tweaking.

Schlacht (dehags@airmail.net)



PATHNODING FOR CAPTURE THE FLAG GAMES

PRE-REQUISITES:

Understanding of basic path-noding.
UnrealEd knowledge.

You should at least have a solid understanding of UnrealEd and know how to edit the properties of actors, brushes, etc.

Capture the Flag bot noding is a little bit different than typical deathmatch bot noding, but is rooted in the same principles.You want a nice network of nodes for the bots to follow, but don't want the network excessive. You want the bots to behave well.

This works great for regular deathmatch, but capture the flag has a few extras you need to pay attention to: you typically want bots to use different routes to the flags, you want bots to be able to defend the base, and of course you want bots to be able to capture the darned flag!

A list of pathing related actors a CTF level NEEDS to have:

A list of pathing related actors a CTF level SHOULD have:

All of these items, by the way, can be found in UnrealEd within the Actor browser under "NavigationPoint". Let's go over what each one does and what properties we need to look at:

  1. PlayerStart:

    If you dunno what this is then you really shouldn't be reading this. This is a spawn point for a player.
    Properties:
    • PlayerStart->TeamNumber : used to set which team color will be able to spawn here. 0 is red, 1 is blue.

  2. PathNode:

    This is the typical building block of a path system. If you've done deathmatch pathing before you'll know how to use these, if not then check my other pathing tutorials.

  3. FlagBase:

    This is the actual flag. You'll notice that if you place one of these down it plops down with only one flag color visible. Not to worry.
    Properties:
    • FlagBase -> Team : Set this to the number of the team you want this flag to belong to. 0 is red, 1 is blue. This changes the color of the flag IN GAME, but NOT in the editor - just make sure the team number is set correctly

  4. DefensePoint:

    Located under NavigationPoint->AmbushPoint->DefensePoint. If you tell your teammates to "defend the base" in a CTF game, the bots will go to these points to defend.
    Properties:
    • AmbushPoint->bSniping : Set this to true if you wish the bot to use sniping skills at this defense point.
    • DefensePoint->Team : the team to which this defense point belongs. 0 is red, 1 is blue.
    • DefensePoint->Priority : used to set the likelihood that a bot will pick this defense point to defend from.

  5. AlternatePath:

    A tricky one this is. This is used to give the bots a way of recognizing an alternate path to the flag.
    Properties:
    • AlternatePath->Team : this tells the bots which teams flag this is an alternate path to. ie if red bots are supposed to use this AlternatePath to get to the blue flag you'd set the team to be blue. 0 is red, 1 is blue
    • AlternatePath->SelectionWeight : used to set the likelihood that a bot will use this path to get to the enemy flag. Very useful if you have several paths to get to the enemy flag (which you should).

Ok so now we know what they are and we know what they can do, but how do we effectively use them? Here's the method I typically use for completely path noding a CTF level. This is NOT the only way to do it, but I find it an effective way of going about it.
  1. Place player starts:

    This one really should go without saying, but you really need to do this first. Particularly with CTF maps as you need to pay attention to the Team property and make sure the numbers are set correctly. You don't want red team members spawning in front of (or inside of for that matter) the blue base :)

  2. Place weapons and items:

    This should probably come next as it's an extremely important part of either deathmatch or CTF pathing. Weapon and item placement can make or break a level. You will typically want to put weapons and maybe weak armor in the vicinity of a spawn point. Nothing worse than spawning and getting blitzed because you didn't have a decent weapon to fight with. You'll probably want to put strong armors and items (like the shield belt, UDamage and Redeemer) farther away to make players work for them. This part is also tweakable later, but you should start thinking about good item and weapon placement at this stage.

  3. Flagbase and defensepoints:

    Odds are you knew where you wanted the flags to go when you started building the map. Go ahead and put them down if you haven't done so already. Also start finding good spots to defend the base from, put down some DefensePoints and make sure you have the Team attributes set correctly! The defense points should probably be placed at some choke points of the map and/or near the flag itself. Also remember that you can set DefensePoints to be sniping points so keep that in mind when putting them in your map.

  4. Pathnodes:

    Now you ought to start putting down your network of pathnodes just as you would in a deathmatch map. Placement of the items in sections 1, 2, and 3 above will help to guide you in your generic pathnode placement. Always keep in mind, though, that you're pathing for TWO teams here. There should be decent pathing for both teams and make sure that there are solid paths between the flags!!

  5. AlternatePaths:

    These things are tricky at best. Here's the way I handle them tho. Typical CTF levels are somewhat symmetrical in nature (ie there's a definite "halfway" point between the flags). You'll want to put an AlternatePath, for the blue team for example, on the half of the map that the blue team resides on and it needs to be part of the path that the bot should take. ie if you have a road that leads to the blue base, put the AlternatePath on the road, on the half of the map that the blue team resides. You can use MULTIPLE AlternatePaths and you're encouraged to do so. In my map "CityOfSynn" you can open it up in UnrealEd and see where I placed AlternatePaths. I put them at obvious "starting" points of a possible path to the flag on the side of the map that the base the path was to resided on. Yes these things can be tricky to get the hang of so if it doesn't work the first time through - don't feel bad. If a bot doesn't seem to be using an AlternatePath and you're just *sure* you have it in a correct physical location, don't forget that you can fiddle with the SelectionWeight property to adjust how much a bot "likes" this AlternatePath.

FAQ's typically on building a CTF level.

Q: My bots won't capture the flag no matter what I do!

A: ALWAYS make sure that the FlagBase has it's pole SUNK into the floor. Ie, it shouldn't be "hovering" above the ground, but should be firmly planted in it. Whether this is a bug kind of thing in the AI, I dunno, but I've seen this problem in action before and it does help in some cases.

Q: Ok I planted the flag. The bots still aren't going for it.

A: Make sure the path to the flag isn't very obstructed. Remember, bots dislike roaming through tight places (like small doorways/hallways) and hate lava/slime/damage areas. Also remember that a bot chooses the *shortest* route to a flag it can find. And please please please for the love of God ALWAYS do a "Paths Define" before saving your map! :)

Q: I've got people of team blue spawning in the red players spawn points.

A: Double check the Team attribute of the PlayerStarts. After that, do a "Paths Define" to rebuild the pathing.

Q: I've got really weird stuff going on with my map. Where can I get more help?

A: Goto http://unreal.gamedesign.net - you'll have to sign up for an account (absolutely free and no nagging email spam either) to be able to post there, but the people are friendly and knowledgable on Unreal editing. I keep spouting this URL all over my pages - believe me it's an *invaluable* resource. Go there and ask questions - someone is very very likely to answer. (to my recollection, I've not seen a message get posted there yet that someone hasn't at least posted a reply to)

   

UnrealEd :: Bot Path Noding 101

by Muad'dib's

PRE-REQUISITES:


     Basic knowledge of UnrealEd
     An amount of time and patience

Bot pathnoding. A lot of mappers cringe at those words, but they're really not all that terrifying if you know the basics first. If you're new to mapping or even if you're from the old-school quake community, bot path noding may be an entirely new concept. Gone are the days when a mapper could build a nice map intended for living breathing people to populate and play within - now, with the advent of Unreal Tournament (as well as Quake 3) bots are becoming a standard feature and mappers have to take good bot action into account as well. First lets discuss a bit about bots, as well as just what pathnoding is.

Bots are the generic term for a computer controlled opponent. In a way, you could think of every computer opponent as a "bot" of sorts. Ever play a fighting game like Mortal Kombat (tm), or perhaps Street Fighter (tm) ? Well, if you play the single player of those games you are, in effect, playing against bots. Bots can be essentially boiled down to lines of computer code being executed on the machine. Now, as such, bots have well defined limitations. They are NOT human opponents, and will undoubtedly have certain predictabilities.

Within the Unreal engine bots are controllable and definable, to a degree, by the map author. This control is achieved through a process called path noding. Path noding is, essentially, what it sounds like - it is creating a pathway/group of pathways or a network, of "nodes" or pre-defined positions that the bots will use to navigate the map, find powerups or weapons, as well as locate elevators, lifts, teleporters and the like.

Now the question is "what exactly is a node?" Good question. The definition of a "node" can vary within the Unreal Tournament realm. Basic definition: A node is a 3D position in your map that the bots in Unreal can travel to. However, a node can be much more than just a point that a bot goes to. A node can also contain special information about the location it is placed at. There are special nodes that tell the bot that a weapon, for instance, is located there, or that an elevator is located there, or even a place where the bot is to make a leap or a jump.

So now that you have a basic definition of this path noding business, lets get to applying it to your level so you can get bots running around your map! br>
Basic path noding isn't really that hard, however as a UT map author a main objective of yours should be attempting to path node well so that bots play better or more like a *human* would. THAT is the difficult part. Path noding is an art form, just as mapping is, so treat it as such!

First let's figure out how to place a pathnode in the map. First open up your Classes Browser and expand NavigationPoint (makes sense doesn't it?) Locate the sub item called "PathNode". There you go. Go about adding a path node to your map the same way you'd add any other actor (like a light for instance) with the usual right-click on the 3d view and choose "place PathNode here"

It can't be that easy can it? Well, yes and no. Like I said, you want to place your path nodes in a way to simulate human like movement with the bots. So place your path nodes in logical places that you'd want the bot to travel to - think about it - put them where YOU would go if you were to play the map.

A logical rule of thumb with path noding is to at the very LEAST place a path node at every intersection. Also path nodes work from line of sight - that is, if a path node can't be "seen" from the location of another path node, then no path will be made between the two (result: the bots won't run in between those two points). You also don't want to cram path nodes right next to each other and at the same time you don't want them too far away. What's too far away? Judgement call really - we'll get into that later down when we actually build the paths themselves...

Now I said earlier that there were special pathnodes to tell a bot where weapons and items were. These path nodes are actually *the items and weapons themselves*. So if you plop a mini gun down somewhere and want a bot to get to it, just add a pathnode somewhere around (but not to close) to the gun. The gun itself will act like a pathnode and the bot will then see it as a weapon. Ditto with things like ammo, health packs, armor, shields, invisibility and TELEPORTERS (well the right kind anyway). When using a teleporter that the bots will use you'll want to go to your classes browser, expand NavigationPoint, then expand Teleporter and find and use the class called "VisibleTeleporter" we'll get into that in a second pathnoding tutorial. The "PlayerStarts" that you place around your map will also act as path nodes.

Ok so you should now be able to plop down path nodes around your map making sure that the pathnodes you want the bots to travel between can "see" each other and with the nodes not too far apart or close together. How to tell if the distance is right? Well, to tell that you need information on the paths themselves which first need to be "built" between those nodes you plopped down. Press F8 to bring up the Rebuilder Dialogue Box. You should be familiar with this dialog, but may have wondered when you clicked on that "Lighting" tab, just what that "Paths Define" button does. Got any ideas on it now? :) Click it to actually generate the paths between those PathNodes you created. UnrealEd will chug for a while and finally finish.

Now you'll probably want to actually see the paths to get an idea of how you're bots are going to do. On your 3D view port, click the "View" menu item and choose "Show Paths" - you should now see a nice network of blue and red lines all over your map drawn in between your path nodes. REMEMBER: whenever you change the position of any of your pathnodes, weapons, items, or anything that can ACT like a pathnode you need to click that "Paths Define" button again to rebuild the paths. Just like when you rebuild your map!

Great - lots of red and blue lines. What are the red and blue colors supposed to signify? Well, these are the paths that the bots CAN (but not always necessarily) take. BLUE paths are paths that are attractive to the bots. These are the paths that the bots are most likely to take. Red paths are paths that a bot will take, but probably only if it has to for some reason. In other words, they're paths that are unattractive to the bots. So when you rebuild your paths, remember, RED is ok, but BLUE is better!

If you need to move your path nodes around, go ahead, but be sure to rebuild those paths with "paths define" before saving your map! By moving your path nodes around, you can sometimes get the red lines to change to blue. The red lines sometimes mean that the nodes are too far apart or too close together. MOST LIKELY, though, a red line means that there's an easier path to take to get to the desired location. After this is all done give your map a test run with some bots! Remember to place plenty of PlayerStart actors in your map to accommodate the number of bots you want to use. In short, it's not a good idea to have 3 PlayerStarts in your map and then decide you want to play with 6 bots. You'll get telefragging happening right out of the gate (two people will attempt to start or spawn into the game in the same position). Name your map with the appropriate prefix (like DM- for a deathmatch, CTF- for capture the flag, etc) so it will be available in the in-game map selection screen.

Most of all HAVE PATIENCE with path noding. It's easy enough to start, but takes practice to get good results with. Like I said - it's an artform! We'll discuss advanced topics like elevators, doors, teleporters, and even some CTF specific path noding techniques in another tutorial.



Spam Killer

Back To Top
2005 Sniper's Paradise
All logos and trademarks are properties of their respective owners.
Unreal™ is a registered trademark of Epic Games Inc.
Privacy Policy
Website by Softly
Powered by RUSH