Using .cfg files to change bot setup |
param1: #(param2: 123
param3: Anyone try to do this on a dedicated server?
I would like to have the option to kick all bots, return the bots, make all bots snipers etc without having to restart the server, or even the map.
Default setup
my config.ini file includes
rcbot_bot_quota_interval 5
rcbotd config min_bots -1
rcbotd config max_bots 10
All the bot profiles have team = -1 but have their class set.
I've got a plugin that restarts the map when all real players leave in the hope that it will reset everything back to default when the next player joins - as I'm planning to have these .cfg files available to be voted for my non-admins.
I've created a vote_rcbot_kick_all.cfg that contains
rcbotd config max_bots -1
rcbot_bot_quota_interval 0
sm_kick @bots
and a vote_rcbot_return_all.cfg that contains
rcbotd config max_bots 10
rcbot_bot_quota_interval 5
sm_kick @bots
All the above seems to work well. So far so good.
The next option I wanted to create was a sniper only server. I was hoping a .cfg file like the below would work.
rcbotd addbot 3 2
rcbotd addbot 3 3
rcbotd addbot 3 2
rcbotd addbot 3 3
rcbotd addbot 3 2
rcbotd addbot 3 3
rcbotd addbot 3 2
rcbotd addbot 3 3
rcbotd addbot 3 2
rcbotd addbot 3 3
But some non-sniper bots mange to sneak in before the rcbotd addbot command(s) do
Here's the console log when I run the above .cfg
https://pastebin.com/CRwqKHxP
I also note that restarting the map doesn't return the bots to thier 'default' profiles.
Anyone tried this before? Any obvious bugs in my setup/logic?
IPB WARNING [2] preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead (Line: 376 of /sources/classes/bbcode/class_bbcode.php)
param1: #(param2: 123
param3:
<snip>
But some non-sniper bots mange to sneak in before the rcbotd addbot command(s) do
Here's the console log when I run the above .cfg
https://pastebin.com/CRwqKHxP
I also note that restarting the map doesn't return the bots to thier 'default' profiles.
Anyone tried this before? Any obvious bugs in my setup/logic?
On the non-sniper bots "sneaking in".
Look at the timing on how (when) your plugins load, RCBot2 will be one of the last.
I make my server to permanently turn off all bot loading or changing class.
rcbot_addbottime 5
rcbot_bot_quota_interval -1
rcbotd config min_bots -1
rcbotd config max_bots -1
I then use a plugin called "Delayed sm_execcfg"
https://forums.alliedmods.net/showthread.php?p=2638480
That plugin waits until RCBot2 loads, I place a 6 second delay on map start to manually add bots via a config file like you have.
RCBot2 is loading after you issue your config file could be the problem of bots "sneaking in".
I have found the only way to get RCBot2 to obey strict control over classes is to have rcbot_change_classes 0 and have no way for RCBot2 load at the map start (around 6-20 seconds) and control that loading with Delayed sm_execcfg.
I use a set of config files and on every map I use a default set to call the bots via the "Extended map configs" plugin.
https://forums.alliedmods.net/showthread.php?p=760501
You could also use a choice in the admin menus I suppose.
I have never released that set of files, only tested it on my local Lan dedicated server but it controls class in that I do not allow RCBot2 to have any choice to load bots at any time and the server loads bots using manual config files... controlled by the Extended map configs plugin that uses the Delayed sm_execcfg and some custom files to get what I want in class types and server amount of bots.
The below is what is in dod_anzio...
Using .cfg files to change bot setup |
DNA.styx |
Mar 12 2024, 09:12 PM
Post
#1
|
Newbie Group: Members Posts: 8 Joined: 15-December 23 Member No.: 2,660 |
|
INsane_dod |
Mar 15 2024, 10:25 PM
Post
#2
|
Advanced Member Group: Members Posts: 74 Joined: 10-March 13 Member No.: 2,261 |
|
DNA.styx |
Mar 16 2024, 07:55 PM
Post
#3
|
Newbie Group: Members Posts: 8 Joined: 15-December 23 Member No.: 2,660 |
|
INsane_dod |
Mar 16 2024, 09:54 PM
Post
#4
|
Advanced Member Group: Members Posts: 74 Joined: 10-March 13 Member No.: 2,261 |
|
DNA.styx |
Mar 16 2024, 11:43 PM
Post
#5
|
Newbie Group: Members Posts: 8 Joined: 15-December 23 Member No.: 2,660 |
|
INsane_dod |
Mar 17 2024, 09:27 AM
Post
#6
|
Advanced Member Group: Members Posts: 74 Joined: 10-March 13 Member No.: 2,261 |
|
DNA.styx |
Mar 18 2024, 11:03 PM
Post
#7
|
Newbie Group: Members Posts: 8 Joined: 15-December 23 Member No.: 2,660 |
|
INsane_dod |
Mar 25 2024, 01:30 AM
Post
#8
|
Advanced Member Group: Members Posts: 74 Joined: 10-March 13 Member No.: 2,261 |
|
Lo-Fi Version | Time is now: 28th April 2024 - 03:12 PM |