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
 
Reply to this topicStart new topic
Replies
DNA.styx
post Mar 16 2024, 11:43 PM
Post #2


Member
**

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



Currently running these .cfgs, seem pretty robust with me just playing - let see what happens with a couple of other players join.

.cfg that is run by the Sniper vote:
vote_rcbot_all_snipers.cfg
CODE
rcbotd config min_bots -1
rcbotd config max_bots -1
rcbot_bot_quota_interval 0
rcbot_dontcapture 1
sm_kick @bots
sm_dexeccfg "sourcemod/vote_rcbot_all_snipers_add.cfg" 5  


vote_rcbot_all_snipers_add.cfg
CODE
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
rcbotd config min_bots -1
rcbotd config max_bots 10
rcbot_bot_quota_interval 5


rcbot_dontcapture doesn't seem to be respected by the bots. Have confirmed via the console that it's set. But that's an issue for elsewhere.

Have changed the 'restart on empty' plugin to restart the server rather than just the map when players leave, that seems to force the 'default' bot settings if someone tried the custom setup and doesn't like it and just leaves.

Will add the two plugins to the list of things to look at.

When I first spun up my server I added gun menu, but all the bots seemed to be forced with the random gun menu option, which I didn't want as I wanted to try to control the number of Snipers (two), MG (two) and rockets (zero - they just don't rocket good!) (Line 138 of the .sp file says ' (IsFakeClient(client)) ? RANDOM_WEAPON' tried to remove the code without success). But adding your modified DoDs Equipment plugin into the mix looks like an interesting way forward. Thanks again.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
INsane_dod
post Mar 17 2024, 09:27 AM
Post #3


Advanced Member
***

Group: Members
Posts: 74
Joined: 10-March 13
Member No.: 2,261



QUOTE(DNA.styx @ Mar 17 2024, 09:43 AM) *


rcbot_dontcapture doesn't seem to be respected by the bots. Have confirmed via the console that it's set. But that's an issue for elsewhere.


I found that too, not tested that a lot myself, RCBot2 has a few quirks like that.

Have fun with DoDs Equipment!
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: 9th August 2025 - 12:35 PM