Page 1 of 2
Adding bots to a dedicated private server.
Posted: Thu Feb 07, 2013 11:14 am UTC
by Sabun
Alright, I've managed to set up a private dedicated server using:
Code: Select all
./daemonded +set dedicated 1 +set net_port 27960 +exec server.cfg
Starting up the game using ./daemon works and I can see my dedicated server under LAN. Joining it is also not a problem.
The problem is how do I go about adding a bot to the game?
I've been trying commands from various tremulous forums, but I'm not sure if these are valid in Unvanquished.
Specifically in my server.cfg I've added the line sv_privateclients 7 for 7 bot slots. I then enter the game and try to add bots using:
The console seems to accept it, but nothing happens. No bots are added. Am I missing something that I should have? I'm using the bots2 branch I compiled still.
Also, the server searches for a navigation mesh file but I get:
Code: Select all
ERROR: File is wrong version found: 926490673 want: 1
I'm using navmesh-default-0.2.pk3, but I'm not sure if this is the right thing to use.
Any help or guidance is greatly appreciated :)
EDIT: For people who read this in the future, this is being done on Ubuntu 12.10 64bit with a self compiled version of bots2 branch from Unvanquished github.
Re: Adding bots to a dedicated private server.
Posted: Thu Feb 07, 2013 12:39 pm UTC
by ViruS
Do /cmdlist *bot to find the actual command relating to bots.
Also, !bot is a tremulous 1.1 server-specific command, like !specme and !ban, whereas in unvanquished we just have /team s and /ban
Re: Adding bots to a dedicated private server.
Posted: Thu Feb 07, 2013 1:36 pm UTC
by danmal
I believe the navigation meshes might be different as well. I'll try and talk to Fuma (he did all the bot work) about it when he's next on.
Re: Adding bots to a dedicated private server.
Posted: Thu Feb 07, 2013 1:42 pm UTC
by Viech
Hi Sabun!
You will need navmesh-default-0.3.pk3, since the navmesh format has changed between bots and bots2. Keep in mind bots2 is even more than bots an experimental branch, so everytime you pull and recompile it might break your server. The navmesh files should be available at sourceforge.
Also, you don't need to prefix commands with ! anymore. Not sure if they work if you do.
Re: Adding bots to a dedicated private server.
Posted: Thu Feb 07, 2013 9:23 pm UTC
by Sabun
Thank you guys for the fast response!
Alright, I've been searching Unvanquished's sourceforge files, and I can only find these under Home/Map Pack:
- plat23-b5-navmesh.pk3
- navmesh-default-0.2.pk3
- navmesh-default-0.1.pk3
- maps.7z
I've made sure to download maps.7z just in case it was in there, but no dice. Am I looking in the wrong place? I checked the Assets folder as well but could not find it.
I got this when searching for the bot commands from the in-game console:
So I went about it by trial and error based on older Tremulous commands I just tried many things, and finally figured out I need to do something like this.
Set myself as admin from in-game console via:
Code: Select all
/rcon passwordhere setlevel playernamehere levelhere
Which in my case was:
I believe 5 is the highest admin level by default.
To try and add bots I did:
and
but both returned
I believe I can't add bots because I don't have the appropriate nav file. Is it possible the latest nav file has not been uploaded to Sourceforge?
Thanks a bunch for helping me out guys :)
Re: Adding bots to a dedicated private server.
Posted: Thu Feb 07, 2013 9:32 pm UTC
by Viech
navmesh-default-0.3.pk3
navmesh-default-0.4.pk3
Not sure which one is correct for your specific version.
"cmdlist bot" may have falied because the related commands start with "bot", so "cmdlist bot" or just "cmdlist bot" should work.
Re: Adding bots to a dedicated private server.
Posted: Thu Feb 07, 2013 11:06 pm UTC
by Sabun
Thanks Viech!
navmesh-default-0.4.pk3 did the trick.
"cmdlist bot*" and "cmdlist bot" return:
Now, I've only got one remaining issue. When I do:
I get:
Code: Select all
TESTBOT connected
TESTBOT disconnected
Can't add a bot
I'm guessing this has to do with my server.cfg. Is it correct to have:
To reserve 7 slots for bots?
I feel I'm very close to being able to play with bots on my local server! This is very exciting :D
Re: Adding bots to a dedicated private server.
Posted: Fri Feb 08, 2013 12:04 am UTC
by Viech
I think sv_privateclients is not for bots but for server admins. If your server has 8 slots and you assign 7 of them to admins and join yourself (as a normal player), that would explain why the bot doesn't want to stay on the server. Currently bots are pretty much handled like normal players. This will hopefully change in the future so that they can be set to leave automatically when a real player joins the server.
If you remove the sv_privateclients line and the bot still doesn't want to join then maybe you are on a map that has no navmeshes inside navmesh-default-0.4.pk3. I don't know what maps are included in that package (unzip it if you wanna know), hopefully all those that are shipped with the default installation.
Re: Adding bots to a dedicated private server.
Posted: Fri Feb 08, 2013 12:30 am UTC
by Sabun
Alright, I have removed the sv_privateclients line from my server.cfg and tried again.
It still returns the same thing. So I checked the Server Console to see what it says after the bot disconnects:
Code: Select all
│ClientConnect: 1 [127.0.0.1] (XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) "ROBOCOP" "RO││
│BOCOP" [BOT] ││
│Broadcast: ROBOCOP connected ││
│Broadcast: ROBOCOP disconnected ││
│ClientDisconnect: 1 [] (XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) "ROBOCOP" ││
│AdminExec: fail: 0 "Sabun" "Sabun" [5] (F590AEE256FA72F3695E3FDB62BB8BB3): bo││
│t: add ROBOCOP humans ││
│ERROR: Cannot load behavior tree bots/default.bt: File not found ││
│Problem when loading behavior tree default, trying default ││
│ERROR: Cannot load behavior tree bots/default.bt: File not found ││
│Problem when loading default behavior tree
AdminExec: fail? Does this mean even though player Sabun has level 5 admin rights it's still not sufficient to add a bot to the server?
I tried the nexus6 map which is present in navmesh-default-0.4.pk3. I checked the admin.dat file and yes level 5 is the highest level of admin.
The error that it can't load the behavior tree looks to be the real reason I can't get bots though. What could I be missing?
Thanks for your patience and guidance :)
Re: Adding bots to a dedicated private server.
Posted: Fri Feb 08, 2013 3:14 am UTC
by danmal
You're missing bots/default.bt (the behaviour tree). You can grab it from the git repository (it's in <git_root>/main/bot). Just chuck it in main/bot