Adding bots to a dedicated private server.

Get support for Unvanquished.
Sabun
Posts: 11
Joined: Thu Feb 07, 2013 2:02 am UTC

Adding bots to a dedicated private server.

Post 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:

Code: Select all

!bot add [botname] [team]

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.

User avatar
ViruS
Granger
Posts: 1020
Joined: Sun Mar 11, 2012 4:24 am UTC
Location: Antartica - West Australian Post shore
Contact:

Re: Adding bots to a dedicated private server.

Post 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

ImageImageYou[TubeImage

User avatar
danmal
Posts: 193
Joined: Thu Mar 08, 2012 1:44 am UTC

Re: Adding bots to a dedicated private server.

Post 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.

User avatar
Viech
Project Head
Posts: 2139
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

Re: Adding bots to a dedicated private server.

Post 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.

Responsible for: Arch Linux package & torrent distribution, Parpax (map), Chameleon (map texture editor), Sloth (material file generator), gameplay design & programming, artistic direction

Sabun
Posts: 11
Joined: Thu Feb 07, 2013 2:02 am UTC

Re: Adding bots to a dedicated private server.

Post 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:

  1. plat23-b5-navmesh.pk3
  2. navmesh-default-0.2.pk3
  3. navmesh-default-0.1.pk3
  4. 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:

Code: Select all

/cmdlist *bot
0 commands 

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:

Code: Select all

/rcon test123 setlevel Sabun 5

I believe 5 is the highest admin level by default.

To try and add bots I did:

Code: Select all

/bot add ROBOCOP humans

and

Code: Select all

/bot add ALIENZ aliens

but both returned

Code: Select all

Can't add a bot

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 :)

User avatar
Viech
Project Head
Posts: 2139
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

Re: Adding bots to a dedicated private server.

Post 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.

Responsible for: Arch Linux package & torrent distribution, Parpax (map), Chameleon (map texture editor), Sloth (material file generator), gameplay design & programming, artistic direction

Sabun
Posts: 11
Joined: Thu Feb 07, 2013 2:02 am UTC

Re: Adding bots to a dedicated private server.

Post by Sabun »

Thanks Viech!

navmesh-default-0.4.pk3 did the trick.

"cmdlist bot*" and "cmdlist bot" return:

Code: Select all

bot
1 commands

Now, I've only got one remaining issue. When I do:

Code: Select all

/bot add TESTBOT humans

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:

Code: Select all

set sv_privateclients 7

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

User avatar
Viech
Project Head
Posts: 2139
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

Re: Adding bots to a dedicated private server.

Post 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.

Responsible for: Arch Linux package & torrent distribution, Parpax (map), Chameleon (map texture editor), Sloth (material file generator), gameplay design & programming, artistic direction

Sabun
Posts: 11
Joined: Thu Feb 07, 2013 2:02 am UTC

Re: Adding bots to a dedicated private server.

Post 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 :)

User avatar
danmal
Posts: 193
Joined: Thu Mar 08, 2012 1:44 am UTC

Re: Adding bots to a dedicated private server.

Post 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

Post Reply