IPB

Welcome Guest ( Log In | Register )

> Using .cfg files to change bot setup
DNA.styx
post Mar 12 2024, 09:12 PM
Post #1


Member
**

Group: Members
Posts: 13
Joined: 15-December 23
Member No.: 2,660



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
CODE
rcbot_addbottime 5
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
CODE
rcbotd config min_bots -1
rcbotd config max_bots -1
rcbot_bot_quota_interval 0
sm_kick @bots


and a vote_rcbot_return_all.cfg that contains
CODE
rcbotd config min_bots -1
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.

CODE
sm_kick @bots
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?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 7th August 2025 - 11:01 PM