Post tutorial Report RSS Creating, modifying and installation of waypoints

This will show you how to create, modify and install waypoints for CoD4, WaW and MW2 Bot Warfare.

Posted by on - Intermediate Server Side Coding

Creating and modifying the waypoints


First things first; you want to load the game of your choice and load Bot Warfare. Then you need to set the DVAR 'bots_main_debug' to '1' before you load a map (use the console). Then load the map of your choice.

Untitled

It will look something like this. As you can see, the controls are at the bottom of your screen.
In CoD4 and WaW, each primary button as a secondary button which you can press after pressing the primary. In MW2, there are no secondary buttons needed as all the primary buttons do the functions. (notifyOnPlayerCommand)

CoD4/WaW controls:
SecondaryOffhand (stun) - Add Waypoint
Press nothing - Make a waypoint of your stance
ADS - Make a climb waypoint
Attack + Use - Make a tube waypoint
Attack - Make a grenade waypoint
Use - Make a claymore waypoint


Melee - Link Waypoint
Press nothing - Link
ADS - Unlink


FragButton (grenade) - Delete Waypoint
Press nothing - Delete Waypoint
Attack - Delete all waypoints
ADS - (Re)Load Waypoints


UseButton + Attack - Save Waypoints
Press nothing - Save waypoints
ADS - Toggle autolink waypoints (links waypoints as you create them)


MW2 controls:
SecondaryOffhand (stun) - Add Waypoint
Press nothing - Make a waypoint of your stance
ADS - Make a climb waypoint
Attack + Use - Make a tube waypoint
Attack - Make a grenade waypoint
Use - Make a claymore waypoint


Melee - Link waypoint


Reload - Unlink waypoint


SwitchWeapon - Toggle autolink waypoints (links waypoints as you create them)


ActionSlot3 (switch to alt weapon mode (noobtube)) - Delete Waypoint


ActionSlot4 (killstreak activate) - Delete all waypoints


ActionSlot1 (Nightvision) - Save Waypoints


ActionSlot2 - (Re)Load Waypoints

2

Untitled 1

Here I added a waypoint.

3

And here I added a second waypoint, but I was in crouch stance before I did, the type of waypoint you place is dependent on what stance you are in or what secondary button you are pressing.

Types of waypoints:
any stance ('stand', 'crouch', 'prone') - bots will have this stance upon reaching this waypoint
grenade - bots will look at the angles you were looking at when you made the waypoint and throw a grenade from the waypoint
tube - bots will look at the angles you were looking at when you made the waypoint and switch to a launcher and fire
claymore - bots will look at the angles you were looking at when you made the waypoint and place a claymore or tactical insertion
camp ('crouch' waypoint with only one linked waypoint) - bots will look at the angles you were looking at when you made the waypoint and camp
climb - bots will look at the angles you were looking at when you made the waypoint and climb (use this for ladders and mantles)

4

You will need to link the waypoints so the bots know how to navigate the map. You can also unlink waypoints the same way. Deleting waypoints will unlink all waypoints that were connected to it just fine.

5

In WaW and CoD4, the data of the closest waypoint to you will be shown to you, the top portion shows what waypoints are linked to it, the middle is what waypoint number it is and the bottom will display what type of waypoint it is.
In MW2, the data is displayed on the top right of your screen.

6

You can then save the waypoints, this will dump a function to 'games_mp.log'.

7

Installing the waypoints


Open NotePad and input
main(mapname)
{
}
exactly.

15

Save the document as '_custom_map.gsc'.

18

Then create a folder called 'bots' and inside that folder a new folder called 'waypoints' and move the '_custom_map.gsc' file into it. (.\bots\waypoints\_custom_map.gsc)

17

Now right click the folder and using WinRAR's shell, click 'Add to archive...'.

21


Use Archive format 'ZIP' and name it 'z_svr_customWaypoints.iwd'.

22


Then move the .iwd file WinRAR created with the 'z_svr_bots.iwd' file.
CoD mods are loaded alphabetically, so any conflicting raw files inside .iwd archives will have the iwd with the highest alphabet ordered loaded.

23

Now search for the 'games_mp.log' file and open it with notepad. (It will be with your installation of Bot Warfare)

8

Go to the bottom of the document and you'll find some GSC script code. Copy the function the game dumped.

10

Now open your '_custom_map.gsc' file with a text editor (I use NotePad++). (You can use WinRAR to open .iwd archives) Paste the function into the script.

Now you need to script it so that level.waypoints point to the array of stucts.
Here I checked to see if 'mapname' is "mp_nuketown", and if it was, I had level.waypoints equal the function we pasted into the script.

11

If you were doing this for MW2, you want game["bots"]["waypoints"] instead of level.waypoints.

Untitled 3


Legacy waypoints (PeZBOT) have procedures that have level.waypoints created inside it. These can be installed too. Look for the GSC script that contains the waypoints and open it with a text editor.

12

Copy the procedure entirely.

13

Paste the procedure into your _custom_map.gsc script file.

Now these are procedures, not functions, which means that they do not return anything back to the call. So I left out the 'level.waypoints = ' because level.waypoints was being created in the procedure.
I also renamed the 'load_waypoints' to 'mp_nuketown' to be more specific.

14


If you were doing this for MW2, you want to do something like this.

All in the main function, I first initialized level.waypoints, then after the procedure call, I had game["bots"]["waypoints"] equal level.waypoints.
In MW2, it has the ability to retain structs after a round, whereas CoD4 and WaW do not. This allows it to store the loaded waypoints so it does not have to load it again.

Untitled 4


Now save it up. Now you should have bots play the map normally with the waypoints you installed on the map.

Credit to >>N.B.Z.I.<< for their Nuketown map that I used to demo this tutorial.

Post comment Comments
PetrenkaPie
PetrenkaPie - - 1,040 comments

This is how you do god's work. Thanks a lot for the tutorial and the effort.

Reply Good karma Bad karma+3 votes
Steklovata
Steklovata - - 3 comments

Good. I was able to create waypoints for the custom map mp_fav for code 4, added the data to the _custom_map.gsc file instead of mp_nuketown, it turned out that the bots go correctly on the map and fight. Please tell me how to add waypoints for other user maps, so that there would be more than one user map, but several. For example, still mp_uplink map mp_fallen map mp_inv map mp_fav map mp_arkona. How to add more maps, waypoints for these maps?

Reply Good karma Bad karma+1 vote
BF2all
BF2all - - 1,144 comments

This waypoint (330 WPs) addon should work for bots warfare, too:

Moddb.com

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: