Using BFSP to add AI to a map

By Dnamro

Start the program and select a profile. Its only important to select BF42 for a BF1942 mod, or BFV for a Battlefield Vietnam mod. Custom profiles can be created for each mod, but they are not needed and I don't bother. You will see later where a profile might be useful. For now just select for either BF42 or BFV.

 

 

Now, this is the main screen. Select File--> Open Map for Coop.


Select the map level:

Now select GO:

 

Now, this is where you can select the pathfinding maps that will be created later. The idea is to select the pathmap type for each vehicle spawn. This is used to determine which pathmaps you will need to create. This will set up your AIpathfinding.con file.

[ Sidenote: This wizard does not really help me, since I usually create all the pathmaps anyway (except for cars since they are not used anyway). The pathmaps are numbered starting with Tank as 0, Infantry as 1, Boat as 2, Landingcraft as 3, Car as 4, Heli as 5 and Amphbious as 6. Car and higher are never used in BF42, expect for Secret Weapons that uses the car pathmaps as an Amphibious map which requires special coding and is not handled by BFSP. Vietnam use up to Amphibious pathmaps. Pathmaps will be created for the highest level you select. So, for a Vietnam mod, I always select Amphibious for all types just to get all the pathmaps selected and get through this part quickly. For BF42 mods, If the map has water, I select landingcraft, to make sure thactt all the pathmaps that I need are created. If the map does not have water, I just select Infantry. If you wanted to do this correctly you could save your choices as a profile to be used later on another map. This only helps if your objectspawner are named the same, which usually only happens if the maps are created with the same person]

So, select the type for each object spawner or just go through it quickly as I explained in the sidenote above.

Now, you can save your settings and create a profile, or type no to continue.

Select Continue to create the Strategic Areas (I don't know why there is even a button here).

Now you are finished creating the necessary file. Now, select pack to pack your map up.

Now, you can check use debug and start battfield to start the map. Once the map is loaded, use the '~' key to bring up the command line and type the command Ai.createAllMaps to generate all the pathmaps. After complete, quit Battlefield 1942 and come back to bFSP

Select Continue here to copy over the pathmaps that were created into your map.

Select Continue here to remove the commands that allow the display of in-game debugging tools.

Select Pack to repack you map with the new pathmaps.

 

 

Now, if everything worked out, you have added basic AI into your map and can now play against bots. If you want tbetter AI or the AI is not working right, you will need to go onto advanced AI tutorial.