How to add Singleplayer Coop to BF2-2142

Learning to Navmesh (WIP - needs updated links)

by Dnamro

Background:
DICE may have provided the AI tools, but the BFSP modding community had to figure everything out by trial and error. DICE, did not provide any tutorials on how to add bots to Battlefield maps. Powerpoker and Outsider provided valuable insights early on. Countless others worked together in the BFSP and BF2 editor forums early on to help figure things out. Kysterama developed what the BFSP community figured out into a great, step by step tutorial. It was how most AI BF2 modders learned with. However, it only covered using Maya for navmesh editing. Kysterama's tutorial had been the most comprehensive tutorial to date, but it hasn't been updated since Kysterama finished it. In fact, his site web site has been down for some time, and he is no longer active in the Battlefield modding community. Since Kysterama's tutorial, there has been a lot of information published on various websites that adds to and improves upon Kysterama's tutorial, but you have to know where to look. That's the problem that I am trying to fix. The beginner has be to very dedicated to find all the information needed.

Purpose:
The goal is to create an organized, complete, updated tutorial on Navmeshing, based on a wide group of tutorials collected from various sites around the internet. For the new user this is just too overwhelming. By bringing it all together in an organized manner, it's much easier for new users to learn and provides a ready reference for experienced modders.

Credits:

This includes works and ideas developed from many different sources. Thanks to all those countless hours trying stuff out, finding out what works and what didn't. Some of those are Mscholgen, Kysterama, Clivewil, Korben Dallas, Frank Beans, Joker, Rino, Ballard and others.

So where do you start? Just follow along with the tutorials in the following order:

Definitions
First of all, you may want to look through the AI and navmeshing definitions, or refer back to it later:
http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=9

Using the Editor:
If your not familiar with placing spawn points and CPs, go here:
http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=16&p=21#p21

Getting Started:
This tutorial provides information on setting up your system and what you will need:
http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=2

Navmesh Rules:
Getting started, you need to understand the navmesh rules:
http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=19

Generating a Navmesh
This tutorial will help you create your navmesh:
Part 1 Preparing the map for Navmeshinghttp://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=4

Part 2 Create the Navmesh http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=23

Part 3 Fixing the Navmesh and creating the AIpathfinding files
http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=25&p=32#p32

Generally, it's possible to generate a working navmesh for small combat areas without editing, but as you get into navmeshing larger and more complex maps, eventually you will want to edit your navmesh with a 3d modeling tool. It can be a lot of fun to learn. Although the navmeshing tutorials are for 3dsmax and Maya, you can use Blender, Gmax and other free 3d modeling tools. The navmesh is wavefront obj format, which is a fairly standard format. Not all 3dsmax, Maya and Blender all support the obj format, not all tools do. Gmax, for one, does not. In this case you can use Blender or other tools to convert between the obj format and something that your tool can support. These tutorials assume some basic experience with a 3d modeling tool. If you have never used these tools, google some beginner tutorials on modeling with the specific tool.

Packaging the map for play testing
http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=26

3dsmax:
Navmesh editing: http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=5
Navmesh import - Export settings: http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=11

Maya:
Getting started with Maya : http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=17
Navmesh editing Part 1: http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=18
Navmesh editing Part 2: http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=21
Advanced Navmesh: http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=14
Navmesh import - export settings (Listed seperately for easy reference)

Blender:
Navmesh import - export settings

Gmax:
Gmax not import a navmesh directly because it does not have native obj wavefront support, but by using Blender or other free tools you can convert the navmesh obj format into a gmax compatible format. This website has some good info on using Gmax with obj format: http://www.katsbits.com/tutorials/gmax/exporting-meshes-as-obj-models.php#conclusion

AImeshes
Now, once you get into navmeshing, if you have access to a copy of 3dsmax and are working with mods, you will eventually want to be able to create or fix up AImeshes.

I have created a basic step by step guide to AImesh creation in 3dsmax;
http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=28

Importing collision meshes into 3dsmax:
http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=27&p=35#p35

Setting up the AImesh hierarchy/schematic in 3dsmax:
http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=29&p=39#p39

Exporting the Aimesh in 3dsmax:
http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=30&p=44#p44

Getting the exported AImesh into the editor for navmeshing:
( To be done)

Ballard44 provides a lot of good information on AImesh editing:
http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=3

Joker provides some advanced AImesh editing with 3dsmax: http://www.battlefieldsingleplayer.com/tut\_dev\_forum/viewtopic.php?f=4&t=13

Credits
DICE created the tools.
Powerpoker and Outsider provided valuable insights early on.
Countless members of the BFSP community have contributed their ideas and experiences into various forum threads.