Jump to content
Official BF Editor Forums

Creating Your First Bot Support / Navmesh


Recommended Posts

  • 4 weeks later...
  • Replies 258
  • Created
  • Last Reply

Top Posters In This Topic

Just a thought, but it might be a good idea to update the first post with the following:

You've got "Edit the 'GenerateNavmeshLocal.py' file with a texteditor for your mod , its a few lines below the start of file. The default entry is 'xpack' , change that to the mod you're working on ('bf2' for the standard game)."

But since I always forgot to change that, just add a note saying to change the line to

mod = sys.argv[1]

This way you only have to enter the mod name into each of the two .bats involved, instead of manually editing a .py each time you're changing the active mod.

Link to comment
Share on other sites

  • 1 month later...

This does not work on Vista :(

CMD is major stuffed up on vista. Every tool cmd tool i try (rexmans bundlemesh tool) does not work on vista. All it does is open it up for one second then closes it. I switched to my XP and it loaded fine which is really good. What happened on vista is that it opened up. I typed in mod name and level and then it opened up a second window for 1 second. I even tried switching UAC control on from off but no luck at all. :( Oh well it seems XP is the OS for navmeshing for me.

Link to comment
Share on other sites

To get deeper into CMD on Vista this is probably the wrong forum. But you might have the voucher to upgrade to Win7 :P Use it !

E.g. Rexmans CMD tool 'bf2materials.exe' expects that it can write into the /meshes folder - thus it needs write access to that folder. Either you change to a real OS or try to fiddle with batch files until you get behind the 'secret' of running CMD on Vista.

Link to comment
Share on other sites

  • 2 months later...

My CreateNavmesh.bat is not working correctly.. It opens and i type in the modname and mapname but then nothing happens. In fact it dont care what i type in modname and mapname. It just opens the GenerateNavmeshLocal-file, then it does nothing. I even installed bf2 again but its not working. I am using Win Vista.

Link to comment
Share on other sites

You missed a vital part in setting up python. From the tutorial:

After installation, assign the *.py files to open with the newly installed python interpreter. Their icons should change to the green snake

Double-clicking a python file should open python.exe and not Notepad :P

Link to comment
Share on other sites

You missed a vital part in setting up python. From the tutorial:

Double-clicking a python file should open python.exe and not Notepad :P

Well well I did that already. I got it sorted out with installing newer version or python :P

But now my navmeshed map is crashing at 15%. What is wrong. I packed the map but it didnt help.

Link to comment
Share on other sites

Packing the map NEVER helps - you can save that effort. Delete the zips and run the map uncompressed. This will work very well on your local machine. Packing a map should only be done when the map is fully working and ready for network.

You need to install python in the version 2.3.4 . There's problem with later versions especially from Python 2.5 and up.

Crashes at 15% ( if only encountered in SP/COOP) point to multiple islands in your navmesh. Check the /navmesh/work/<YourMap>/debug/islands folders for more than one OBJ file in them. If thats the case you either need to edit the navmesh in a 3D program or use the shortcut by copying the largest OBJ from /islands to /output and renaimng it accordingly ( to either infantry.OBJ or vehicle.OBJ depending on where you found multiple islands) Read on in the posts after the tutorial in this thread where this method is mentioned.

Link to comment
Share on other sites

How would you go about adding sp to a map with no control points? i have a deathmatch map, its a crater, spawnpoints all around edge of crater in circle, would i add just a stratigic area to the center or?? I'm puzzeled as how to set it up as its unlike the normal play of flag hopping, so any advice would be great ;)

Link to comment
Share on other sites

The crater map ? Hmm, it depends on the type of gameplay you want and the strategic targets desired. If the bots have something to conquer you can manually add a strategic area to that location but if they only should attack hostiles its probably best to leave out all SA's and just let them run free.

One single large strategic area covering the whole crater could possibly work. The bots will try to expell any hostiles from that area.

Edited by mschoeldgen[Xww2]
Link to comment
Share on other sites

  • 6 months later...
  • 1 month later...

Hmmmm i can only get this tutorial to work on WinXP, shame that I have the vista computer now :( When I run the "CreateNavmesh.bat", it says "Modname", "LevelName", then I enter in those names (CoRrEcTCaSe as well), and the cmd window crashes instantly. I tried running "Navmesh.exe" instead, however when i did run it it said 

"This application has failed to start because gts.dll was not found. Re-installing the application may fix this problem." Anybody got any spare gts.dll files?

Link to comment
Share on other sites

Yes! Got new computer with Windows 7 (64-bit). Any CMD-based program on my Windows Vista (32-bit) CTD the moment it was commanded to do something. Glad I can finally follow this tutorial again smile.gif

If you get Python to run on Win 7 (64) could you tell me the permission settings you used and/or anything else you had to do to make it work. I am having a hell of a time getting python to do anything on my copy of win 7 (64).

http://www.bfeditor.org/forums/index.php?showtopic=11128

Link to comment
Share on other sites

  • 3 months later...

I did a Dalian Plant remodel, added a few things, I created Bots once, didn't like some things and I deleted the whole map, reverting to the Vanilla\Original one, and when I created the bots again (takes about 6 hours for CreateNavmesh.bat to work out this level) my bots aren't moving. I hope someone can tell me what I did wrong.

Here's what I did:

Combat Area Used by AI checked.

Added Neighbours, waypoints etc...

Did everything according to the tut, step by step, mind you, I got it working once, so I knew how to do it again.

But apparently something got screwed up.

Anybody encountered this before? Any tips?

Link to comment
Share on other sites

OK got that one worked out, the problem was the GamePlayObjects.con, I was using the one for the 16 players, so the bots were trying to spawn in a base outside the Combat Area, and had no waypoints for that mode. But I've got another problem now...

Whenever I kill a bot, the game crashes, ant the debugger isn't giving me an error... Anybody knows why this is happening?

Edited by Nitrus
Link to comment
Share on other sites

I did a Dalian Plant remodel, added a few things, I created Bots once, didn't like some things and I deleted the whole map, reverting to the Vanilla\Original one, and when I created the bots again (takes about 6 hours for CreateNavmesh.bat to work out this level) my bots aren't moving. I hope someone can tell me what I did wrong.

Here's what I did:

Combat Area Used by AI checked.

Added Neighbours, waypoints etc...

Did everything according to the tut, step by step, mind you, I got it working once, so I knew how to do it again.

But apparently something got screwed up.

Anybody encountered this before? Any tips?

I'm certainly no expert like some of the others here, but I've navmeshed a few of my own maps.

While in the editor, can you see the green navmesh for the bots? Both infantry & vehicles?

In the '\NavMesh\work\mapname\GTSData\debug\islands\infantry' folder do you have more than one file?

In the '\NavMesh\work\mapname\GTSData\debug\islands\vehicle' folder do you have more than one file?

Also - did you give each flag an importance number (Areavalueteam1 and Areavalueteam2?

Did you move the 'landing zones' out from the flags?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

Announcements




×
×
  • Create New...