Classic Battlefield Modding Wikia

Fixing the Navmesh and convert to Aipathfinding

This is the part where we convert the navmesh files into a format that is used in game and it's the quickest part. Load up the editor. You can use the BFSP navmesher script to launch the editor or launch it normally. The script will select the mod and map for you. When loading the editor with the script, the editor will look only part load the map. Just switch between object to level mode in the editor and the level will finish loading. 

Just to clarify, we are working now in the mods\[mod-editing-name]\levels\[level_name] area. We are done working in the Navmeshing folder.

Once the editor is finished loading, use the command windows at the bottom right of the screen and select 'Aipathfinding' in the first and 'loadgtsdata' in the second and then select the green button to the right as the execute button. Large maps could take a little while. 

The next step is to then select 'savequadtrees' from the second window and the execute button to the right. If the command window has any red letter error messages, your navmesh has issues. Go back to the navmesh obj file in the 3d modeling tool and check those common errors as listed in the tutorials. Then re-fix it and repeat this step again. The command window info isn't helpful in identifying an error. It only tells you that there is a problem.

Go back to the command windows in the editor and create the Aerial Height map, by selecting 'AI' in the first window and 'Aerial height map' in the second and then select the execute button to the right. Larger maps can take a few minutes to complete. If after testing, you can create a more accuate test map by typing 64 or 128 in the third window. Default is believed to be 32. A lower resolution map would be 16. 

If sucessful, you will have an AIpathfinding folder in your map updated with new files. 

Now, check your vehicle and soldier spawns in the editor. You can display the AI path as a green texture over the terrian in the editor. 

Select the 'Render' Menu - 'AI' - and select "Toggle Draw AI" (this will enable you to see the strategic areas and neighboring).

Then select 'Render' Menu - 'AI' - and select "Toggle Draw Infantry navmesh" or "Toggle Draw Vehicle navmesh" to check the Soldier and vehicle spawns. Green is good path. Red is bad. A more detailed explanation is here:

The next step is to pack everything up and test it out in game.