Comprehensive Bot Path Basics


By: Deathbliss

Deathbliss

 

Comprehensive Bot Pathing Basics:

Make sure you know the basics of UED 2.0 before you try to follow this tutorial - OK? I tried to keep everything at beginner level but there are a few things I didn't go to great lengths to explain. The purpose of this lesson is to teach you exactly how to path the various parts of a level, from water to lifts, and getting the bots to Sniper - I cover it all here. This all came about when a review I recently did left me with the desire to give mappers a comprehensive guide on this subject. I'll tell you this now, just about every well known mapper will say it's easy to botpath, but in the end they don't really know what they are saying. Some of the best pathing I have seen is in levels by some of the least known mappers. I'll tell you what I have learned so far and the basics and hopefully from there you'll be able to do whatever you want to do with the bots.

NOTE: Two things to remember when pathing:

1. Less is best (the fewer PATHNODES you use the better).
2. ALWAYS COMPLETELY path your levels
.

Pathing as I will be referring to it is the process of adding pathnodes to your level. Open up UED 2.0 and the ACTOR CLASSES BROWSER:

You're going to learn all about the PATHNODE as you go through this lesson. I guess we'll need a room so we can learn a few things. First off RE-SIZE THE GRID to 2, then open up the CUBE BUILDER and make a cube to H=256xW=1024xB=1024. SUBTRACT it after picking a texture you like. One you have the room looking the way you want go back into the ACTOR CLASSES BROWSER and find PATHNODE once again. Place one of these in each corner, in either the SIDE VIEW or the FRONT VIEW and make sure each PATHNODE is 2 darker gray grids above the floor - aligned on the cross right above the second darker gray grid. These should never be more than 4 darker gray units above the floor (chest height) and they should never be below 2 grids from the surface they are above. OK, now place a PLAYER START in the middle, and slop a light near the ceiling while you're at it, then REBUILD and SAVE INCREMENTALLY. Now in the TOP VIEW RIGHT CLICK on TOP and go to VIEW/SHOW PATHS. Click on that so a little checkmark appears next to it. Here's what you should see (minus the lights):

OK, what you are seeing here is the path the bots will take around the room. The BLUE PATHS are the most desirable to a bot - these are the paths the bots prefer to take. RED PATHS are undesirable and the bots will rarely use them or they will only use them if there is something they want at the end of the path. Now, to make a point I want you to start up Unreal Tournament, and under PLAYER SETUP I want you to check PLAY AS SPECTATOR. This is how you will watch the bots and get into their head. Select just 1 bot on NOVICE skill and start a session. You'll see that the bot just hangs around the PLAYER START as if it's fearful of something. To see what the bot is thinking press the TILDE KEY to open up the CONSOLE and type VERBOSE. The bots thoughts are seen clearly on the screen. You may want to assign this command to a key for easier access. What we have established here is that the PATHNODES are not in and of themselves what a bot needs to move around a level. The pathnodes are more like the reflecting borders in the center of a road. ITEMS such as WEAPONS, HEALTH, and POWERUPS are what a bot is after - they are the place the road takes you and what will make a bot run about a level. To demonstrate this fact select all the PATHNODES by RIGHT CLICKING on one and then SELECT ALL PATHNODE. DELETE them but leave the PLAYER START. Now in each corner place an object - in one corner a WEAPON, in another some AMMO for it, then a MEDBOX, and finally one more thing of AMMO (for a total of 2). REBUILD, SAVE INCREMENTALLY and you'll see the same pattern as before. OK, a note before we go to see what the bot does. I work with the grid RE-SIZED to 2, and I place WEAPONS precisely 1 darker gray grid unit above the floor. This is so it's not floating way above your head and looking dumb, or spinning around in the floor and looking worse. Things like AMMO and HEALTH (the MEDBOX) are all placed one small unit above the floor (there are 8 of these per darker gray grid unit 8x2=16). I suggest you position yours accordingly. In addition I place things about 1 or 2 darker gray grids away from the nearby wall(s) or floor(s).

NOTE: All WEAPONS should be placed no more more than 4 darker gray grid units above the floor with the grid RE-SIZED to 2. PLAYER STARTS, HEALTH, AMMO, etc. should be placed one small unit above the floor. ALL ITEMS should be placed with a little distance between them and any nearby walls, floors, ceilings, etc. NOTHING SHOULD BE PLACE ABOVE 4 DARKER GRAY GRID UNITS (this is 16x4 which equals 64 - between 48-64 is chest height for all players) OR BELOW 2 DARKER GRAY GRID UNITS!!!

If you adjusted anything REBUILD and SAVE INCREMENTALLY again, then PLAY the level.

You should see something like the above pic. The bots will run right from the PLAYER START, collect all it needs at the moment, and then return to the PLAYER START. It'll keep doing this until it has reached the maximum ammo count for the weapon it has. If you want to see them get the HEALTH, merely add another player start somewhere between the INVENTORY SPOTS (where the WEAPONRY, AMMO, and HEALTH is according to the bots mind). Start up a round of two bots and you'll see them duke it out. One of them will eventually retreat to get some HEALTH. So from this we determine the following:

1. PATHNODES are merely guides to ITEMS.
2. Bots will only get what they need, and they will continue to collect until an enemy comes into range.
3. A level should have as many
BLUE PATHS as possible.

OK, now for a few more complicated things. I need you to build a walkway around your level about halfway up. Leave a space H=16xW=128xB=128 opened for a lift, and make each platform 128 wide. You should have something like the following:

At this point once you have done that you should have two tiers - one is a walkway above the other one. Make a lift to fit in the space and texture as you like. When you set it up remember that bots will only understand lifts that are under OBJECT/STAND OPEN TIMED or the various trigger timed types. They do not apparently understand the various bump timed types. Oh, and yeah, the level used for this demonstration will be downloadable. One you've placed your lift in the proper place and you have it set up the way you like REBUILD, and SAVE INCREMENTALLY. Now open up the ACTOR CLASSES BROWSER once again and find NAVIGATION POINT. Place a LIFT EXIT 4 darker gray grids away from the lift on the first tier. On the next tier place one also 4 darker gray grid units to the right side of where the lift will stop. Back on the ground floor place a LIFT CENTER in the middle of the lift. Make sure all of these are 2 darker gray grid units above the ground:

Now select both the LIFT EXITS and under LIFT EXIT/LIFT TAG put bpl (as shown in lowercase - stands for bot pathing lift). then select the LIFT CENTER and under LIFT CENTER/LIFT TAG place bpl there as well. Finally RIGHT CLICK on the mover and under EVENTS/TAG place bpl.

NOTE: When pathing a lift, or when using any combination of LIFT EXIT with a LIFT CENTER (and any type of these) make sure the LIFT EXIT or CENTER TAG(S) all match the tag of the mover or goal. For example - if you want a bot to jump off a cliff into some water have a LIFT EXIT where the bot will jump off from, a LIFT CENTER out away from the ledge level with the LIFT EXIT for the bot to aim for, and either a PATHNODE or an ITEM with its EVENTS/TAG set to the same name as the LIFT CENTER(S) and LIFT EXIT(S) LIFT TAG(S). ALL LIFT TAGS MUST MATCH!!! Also remember that the LIFT EXIT or LIFT CENTERS EVENT/TAG WILL NOT WORK and it IS DIFFERENT from the LIFT EXIT or LIFT CENTERS LIFT TAG which will work.

Now as you can partially see I have placed some ARMOR2 to the other side of where the lift stops on tier 2. This is also for a demonstration - so I advise you to follow along. Since the ARMOR2 is in one corner on tier 2 I'm placing PATHNODES at the other three. Almost straight across from the lift I have placed a SNIPER RIFLE and some AMMO (BULLET BOXESx2). After you've got your level all set up REBUILD, SAVE INCREMENTALLY, and PLAY the level. You'll see the bot either go around the room or head straight for the lift, the ARMOR2, and then the SNIPER RIFLE. The PATHNODES help the bot to find the way to the SNIPER RIFLE, and all the paths so far are blue. You probably also noticed the bot will use the LIFT EXIT to get off, and then it will turn around and grab the ARMOR2. See if placing bpl in the EVENT/TAG of the ARMOR2 helps. Here's a pic of the current path network:

Well let's jazz things up a bit shall we? I'm removing the MINIGUN and MINI AMMO I used on the first tier in the corners. I'm instead under the walkway where the SNIPER RIFLE is adding 2 PLAYER STARTS in the corners, with a MEDBOX per opposite corner so we can get some one on one action going. I encourage you to do this, and then after you have REBUILT the level and SAVED INCREMENTALLY I encourage you to join the bots. I'm going to add some trim to my level and a little protection to the Sniper Point. We can then go into using AMBUSH POINTS. Here's what I have designed so far:

As you can see I have a ledge for the Sniper to stand behind, and this overlooks the lift so it is a very strategic spot. OK how high would this ledge have to be? Anyone? If you said 48 (actually between 48-64) you are correct. Once you have your ledge designed (mine is a vertice edited cylinder - you may be more basic of you so desire) go into NAVIGATION POINT and find AMBUSH POINT. Select it and add it behind the wall. Make the arrow point out toward the open area by rotating it in theTOP VIEW. To rotate all you have to do is highlight it, PRESS and HOLD CTRL, and then drag with the LEFT MOUSE BUTTON also pressed and held. Once that's done make sure it's 2 darker gray grids above the ground. Then RIGHT CLICK on it, go to AMBUSH POINT, and set BSNIPING to TRUE. This tells the bots that when they get there they can hide behind that ledge and pick opponents off. It's more useful in a team game such as a CTF or DOM match, but will also work here. After REBUILDING and SAVING INCREMENTALLY if you check SHOW PATHS again (I expect you've been unchecking it so you can align things easier) you'll see we now have a RED PATH. Not so bad considering the BLUE PATH leading right to the same area - nothing to worry about. Try it out and watch those bots have at it!

So you want your bots to navigate water huh? Make a cube H=128xW=256xB=256. Subtract this from the middle of the floor. Give it a water sheet you like and add a WATER ZONE INFO inside under the sheet. I decided since the bottom of this pool would be a high risk area that I would add a powerup. So I chose the DAMAGE AMPLIFIER, and I added it right to the bottom of the pool in the middle. Right above this and also above the water sheet place a LIFT CENTER. Then in the middle of each side place a LIFT EXIT. Put bpw under all the LIFT EXIT LIFT TAGS, and the same for the LIFT CENTER LIFT TAG and the EVENT/TAG of the powerup you chose. Here is what you should have:

The LIFT CENTER is in the middle above the water sheet and the powerup, and the LIFT EXITS are on each side. The bots should easily navigate your water now. All that's left at this point is teaching you how to make the bots TRANSLOCATE, some advanced Sniper and DEFENSE techniques, and a few other things that I think I will save for a later lesson since this one has become so long. Hopefully at this point you know how to path pretty much anything you want, from lifts to water, and maybe some misunderstandings have been cleared up as well. As always you can use the link at the bottom left of this page to e-mail me if you have further questions. Good job everyone!