Tutorials: Waypointing for RCBot2 - Team Fortress 2, Basics and Advanced - Updated 29th June 2009 |
Tutorials: Waypointing for RCBot2 - Team Fortress 2, Basics and Advanced - Updated 29th June 2009 |
Geralt |
Feb 11 2009, 09:39 AM
Post
#1
|
RCBot Fan Group: Waypointers Posts: 198 Joined: 6-February 09 From: Australia Member No.: 1,465 |
Written for:
RCBot Version 0.4.3 Last Updated: 13th July 2010 Added scripting and teleporter tutorial Fillmore Tutorial 1 - Basics: 1) First make sure you have RCBot installed correctly. Once at the main menu of TF2, you will of course need to load the plugin in the console with the plugin_load "..\bin\HPB_Bot2" command. 2) Open the map you wish to make custom waypoints for. 3) To make waypoints appear, you need to type these 2 commands into the console:
5) Now that we are prepared, its time to start adding waypoints. For this tutorial, we are going to be waypointing on the level cp_granary (included with the game). So, load up the level and choose any team and any class (I usually choose blue team to start with, and a spy). So, let's start by placing our first waypoint with the F1 key. Simply stand somewhere, press F1 and you will see a blue line like this appear below your character: Now, move a few steps forward and press F1 again. You will see another waypoint appear, and if you stand your character over either one of the waypoints then a white line will appear, connecting the two waypoints together. That white line is what the bot will follow. The white line looks like so: 6) So, you could waypoint a whole level with just this knowledge... but, this could get messy. Look at the diagram I have drawn below. A -- -- -- B | | | C Say we want the white lines to go from A to B, but not from A to C. If you want to remove the white line between A and C, all you need to do is hover over waypoint A and type this into console:
If you are confused with the diagrams, this should clear some things up: - We are looking at waypoints from above. - The letters (A,B,C) are waypoints (The blue lines we talked about earlier). - The dotted lines (----------) are the white lines which run between waypoints. 7) The final thing to do, would be to save our progress. We wouldn't want to waypoint a level and come back later, just to see that you didn't save it! To save the waypoints, use the console command 'rcbot waypoint save'. So, you now know the very basics of waypointing - be on the lookout for future tutorials. Note: I can't help but remind you to bind commands to keys! This will save a lot of time! Tutorial 2 - Cleaning Waypoints: 1) Cleaning waypoints. You probably hate the sound of it already, much like when your parents tell you to clean your room. But, it's best if this gets done! 2) What do I mean by cleaning? Well, take a look at the following picture: Notice how the path from waypoint C is not only going to B, but right on through B into A? Well, that is not needed at all. That may just increase CPU usage, so we may as well remove it. To remove the white line between C and A, all you need to do is hover over waypoint C and type this into console:
Once you reach A and hover over it, you will notice that there is also a line running from A to B, and from A to C. You will also need to remove the white line from A to C. You should do this with all of your waypoints. Not only for cleanness, but to help the people with not-so-good CPU's. And it may even help the bots so they don't get confused. 3) If you accidentally remove a white line that you don't mean to, and want to create it again, you would use the 'rcbot pathwaypoint create1' & 'rcbot pathwaypoint create1' commands instead. 4) Once you have finished waypointing your map, there will be a LOT of these problems that need to be cleaned. Please clean your waypoints! It may take a while, but it's for the better! Tutorial 3 - Health & Ammo Waypoint Types: 1) Now that we know the basics of waypointing, we will need to add different types of waypoints. We will start with ammo and health waypoints. 2) Once you have loaded up a level, with the plugin loaded also, find an ammo box lying on the ground somewhere. It will look like so: Walk on top of the ammo box, and press F1 to add a waypoint (That's if you have binded 'rcbot waypoint add' to F1.) You should see the blue waypoint appear on top of the ammo box. Now to change its type to an ammo pickup; hover over the newly added waypoint, open the console and type 'rcbot waypoint givetype ammo'. You will see the color of the waypoint change, this indicates that the waypoint has a type given to it. This waypoint will now enable bots to collect ammo from the ammo boxes that are laying around the level. 3) You can do a similar thing for the health bottles that are spread throughout the levels. They look like so: Now we add a health type, similar to what we did with the ammo box. Open up the console and type 'rcbot waypoint givetype health'. This will enable the bots to pick up health from this waypoint. 4) Now the bots will be able to pick up health and ammo. Remember, you need to do this to every single ammo box and health bottle that you find around the level. 5) The last thing to do is to give the resupply lockers their type. The resupply lockers I am talking about, are these: Those are usually found at a teams spawn. Simply place a waypoint in front of the locker, and give them a resupply type with the command 'rcbot waypoint givetype resupply'. You do not need to give them the ammo and health types! 6) Two more things before the end of the tutorial:
Tutorial 3.1 - Blue & Red Bases: 1) What sometimes happens. is the red bots will try and get into the blue base (or vice-versa) by running against a door, but it's impossible for the bots to get in! 2) To prevent this, simply give all the waypoints within the bases, a noredteam or noblueteam type so the bots cannot enter:
Tutorial 4 - Sniper Waypoint Types: 1) Now to make your waypointed maps a little more advanced. This time, we will be adding spots for snipers to snipe from... 2) To start off, find a suitable place for a sniper. Once you have found a good sniping position, place a waypoint down and open up the console. While the console is open, type 'rcbot waypoint givetype sniper'. You will see the waypoint change color, indicating that the waypoint has a type applied to it. Note: If you need to see what types a certain waypoint has, then stand over it and type 'rcbot waypoint info' into the console. 3) What you must not forget is that most/all maps in TF2 have two sides - blue and red. If you place sniper points for the blue team to use, the red team will also use them... which means at the beginning of a round one of the red team snipers could run straight to one of the blue teams sniper waypoints. To stop this, use the command 'rcbot waypoint givetype noredteam' or 'rcbot waypoint givetype noblueteam' on the appropriate sniper waypoints to stop the other team using them. 4) This is all it takes to make sniper waypoints. Remember to only place the sniper waypoints in logical positions, it wouldn't be wise to place a sniper position at one of the teams spawn. Tutorial 5 - Sentry Waypoint Types: 1) Now lets add some sentry points around your map. 2) To start off, place a waypoint where you would like the bot to build a sentry. Try not to place the waypoint too close to a wall or edge of bridge, etc. Try to place them in good positions, but not adding too many. 3) Once you have the waypoint in position, open up the console and use the command 'rcbot waypoint givetype sentry'. This will now allow the bots to build a sentry in this position. 4) If you put sentry's in the Blue Base, for example, it's best to also add the command 'rcbot waypoint givetype noredteam' onto it so the Red Team cannot build sentry's there. This also applies for the Red Base. 5) That's the end of this tutorial. Remember; don't place the sentry's too close to walls and edges, otherwise the bots will not build them, and the bots just often stand there while not being able to place a sentry. Note: The actual waypoint you see is where the engineer will be standing! Not where the Sentry gets placed. Tutorial 6 - Teleport Waypoint Types: Making teleporter waypoints is a simple feat. To make a entrance, go to the waypoint you want the tele entrance to be, and type rcbot waypoint givetype teleentrance. Make more than one, because if teams have two engies and both want a tele, the other would be stuck in limbo (so to say) To make a teleporter exit, use command rcbot waypoint givetype teleexit . This tutorial is pretty easy, as you wouldn't need this to know what are the commands. (rcbot waypoint givetype in console shows all givetypes) edit by cheeseh - scripting no longer needed [b]Tutorial 7 - Scripting: Scripting is a essential way to get bots to play specific maps correctly or to get some of them to play without jamming up (only happens in 3-Staged maps.) For starters, it would make sense to watch other scripts so you might get a inkling on how it works. But I'll explain it here. You start the script by telling RED and BLU what area to attack and defend. Areas work by ID you give to a waypoint by standing next to/ on it, and typing rcbot waypoint setarea <number> If we have a A/D CP/PL map, add :attack_defend_map:1 to the start of the script to tell the bots RED is defending in this map. You can see area ID's by typing rcbot waypoint drawtype 2. Setup time support has been added, to input the time, type :setup_time:<number(seconds)>in your script. So, now we should have this: :attack_defend_map:1 :setup_time:70(standard time for many A/D maps.) :blue_attack:1 :blue_defend:0 :red_attack:0 :red_defend:1 :areas: ^ I-- Areas for the script, input those areas that are in play, you don't need 0 in there. To get the bots to go after the other point, when they cap, add :on_blue_cap:<cpname>for BLU or :on_red_cap:<cpname> for RED (not needed for A/D) To get a cpname, type rcbot debug gameevent 1 in console, and cap a point. Open the console and look for the cpname line in there. The phrase after cpname is the one you wanna use. Let's say it was Cap_1_A. We could have: :on_blue_cap:Cap_1_A :blue_attack:2 :blue_defend:0 :red_attack:0 :red_defend:2 :areas:2 That should give an idea of scripting's capabilities. |
wyn10 |
Jul 27 2009, 07:48 PM
Post
#2
|
Member Group: Members Posts: 24 Joined: 27-July 09 Member No.: 1,626 |
Can you please finish this?
I'm working on 2 map's and I don't know how to add teleport's. |
Fillmore |
Jul 27 2009, 08:47 PM
Post
#3
|
RCBot Guru Group: Waypointers Posts: 447 Joined: 1-April 09 Member No.: 1,511 |
|
Geralt |
Jul 28 2009, 01:28 AM
Post
#4
|
RCBot Fan Group: Waypointers Posts: 198 Joined: 6-February 09 From: Australia Member No.: 1,465 |
Exactly what Fillmore said. I'll get around to finishing it sometime, it's just I'm pretty busy at the moment.
|
wyn10 |
Jul 28 2009, 01:58 AM
Post
#5
|
Member Group: Members Posts: 24 Joined: 27-July 09 Member No.: 1,626 |
Are dispensor's supported?
I'm working on a map that doesn't have any health or ammo spot's. |
Geralt |
Jul 28 2009, 02:39 AM
Post
#6
|
RCBot Fan Group: Waypointers Posts: 198 Joined: 6-February 09 From: Australia Member No.: 1,465 |
Engineers automatically build dispensers near their sentry guns - so all you need to place are sentry waypoints for that.
|
Fillmore |
Jul 28 2009, 09:37 AM
Post
#7
|
RCBot Guru Group: Waypointers Posts: 447 Joined: 1-April 09 Member No.: 1,511 |
They should add a 'dispenser' type.
Just in case people want the bot to put the dispenser near the fight. Or just place sentry spots there,and the engies will do the rest. |
OctoberCat |
Aug 2 2009, 07:40 PM
Post
#8
|
Member Group: Members Posts: 11 Joined: 1-August 09 Member No.: 1,634 |
Okay, I know it's off topic, but I just want to say: Great Job! Thanks for this awesome tutorial and thanks to everyone for giving RCbot to the community. TF2 has needed this for a long time, and I look forward to waypointing my rats maps.
Yes, this rocks. |
JohnnyAxe |
Aug 4 2009, 01:18 PM
Post
#9
|
Member Group: Members Posts: 33 Joined: 7-July 09 From: Portugal Member No.: 1,604 |
Cheers Geralt.
|
ickle |
Sep 9 2009, 11:06 PM
Post
#10
|
Newbie Group: Members Posts: 2 Joined: 9-September 09 Member No.: 1,687 |
looks like a nice and straightforward tut ....only trouble is when i put rcbotd pathwaypoint on in console it crashes my server :S rcbot pathwaypoint on comes up with Unknown command "rcbot"
any clues on why this would be and how it can be fixed ? have to do rcbotd waypoint on aswell rather than rcbot waypoint on Thanks |
Cheeseh |
Sep 10 2009, 11:38 AM
Post
#11
|
Admin Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 |
looks like a nice and straightforward tut ....only trouble is when i put rcbotd pathwaypoint on in console it crashes my server :S rcbot pathwaypoint on comes up with Unknown command "rcbot" any clues on why this would be and how it can be fixed ? have to do rcbotd waypoint on aswell rather than rcbot waypoint on Thanks you can only waypoint as a host in listenservers. rcbotd will crash because it requires client commands to show waypoints. |
SonicKun |
Nov 12 2009, 03:21 PM
Post
#12
|
Newbie Group: Members Posts: 9 Joined: 25-April 09 Member No.: 1,529 |
is there somethin for class only waypoint? like, in 2fort i want the spy goes in the water and others on the bridge, is this possible?
|
Lo-Fi Version | Time is now: 17th November 2024 - 07:59 PM |