IPB

Welcome Guest ( Log In | Register )

7 Pages V  1 2 3 > »   
Reply to this topicStart new topic
> [sourcemod] Bot management
Tom Hackers
post Aug 8 2009, 08:15 PM
Post #1


Member
**

Group: Members
Posts: 26
Joined: 8-August 09
Member No.: 1,649



~EDIT~ by cheeseh ---- file uploaded attached below

~EDIT~ by Tom ---- sorry, guys, i don't support this anymore, source code can be found in attachment.

First of all, i would like to thank Cheeseh for RCBot.

But i thought it would be great to make bots change classes after a while, as well as removing them when humans connect, and adding them when they disconnect, i saw "rcbot config minbots" and "rcbot config maxbots" cvars somewhere on forum. But i decided to create a sourcemod plugin for maintaining bots.
And i guess i can post it here on forum. Source code of my sourcemod plugin is provided.

CODE
Plugin game: Team Fortress 2
Plugin require: RCBot!
Plugin author: Tom Hackers
Plugin category: Server Management
Plugin version: 1.0.6 (updated 10 august 2009)
Plugin description:
bot_count_blue - Keep that count of bots in blue team. Default: 9.
bot_count_red - Keep that count of bots in red team. Default: 9.
bot_changeclass2 - Allow bots to change classes after X deathes. Default: 1.
bot_changeclass_dc - Death amount. Default: 4.
bot_count_humans - Count humans as bots. So humans replace bots. Default: 1.
bot_class_limit - Do not allow bots class spam. Automatic. Default: 1.
bot_class_adv - More advanced class limit. Keeps atleast 1 character for each class. Default: 1.
bot_fall_speed - Bot's fall speed multiplier. Default: 0.05.
bot_gravity - Bot's gravity multiplier. Default: 0.7.
bot_ping - Change bot's ping. Default: 1.
bot_ping_min - Bot's minimal ping. Default: 15.
bot_ping_max - Bot's maximum ping. Default: 120.
bot_respawn_time - Respawn time of bot's in second, keep in mind that this will be +1 second longer due to class changing. Default: 1. Value less then 1 - Disabled.
bot_respawn_humans - This will respawn humans just like bots. Default: 1. If zero, only bots will be spawned if time >= 1.
bot_names_file - Bot names file. Default: botnames.txt, warning! File should exist in "sourcemod/configs" directory!
bot_console_cheats - Allow server console to use cheat commands and adding bots without sv_cheats 1. Default: 1. Switch this to 0, if you use admin cheats plugin.

I will keep this updated... Also you should find "tf2.bots.cfg" in "cfg/sourcemod" folder. Have a nice time.
Do not forget to create botnames.txt file in "sourcemod/configs" folder, with names of bots.

Notes: This is sourcemod's plugin, extract sourcemod folder into addons folder, overwrite: yes. Enjoy.


QUOTE(Tom Hackers @ Aug 9 2009, 12:24 PM) *
Changelist 1.0.3 to 1.0.4:
- Fixed SourceTV bug, now you can use SourceTV on server and it won't crash (tv_enable 1).
- Fixed possible join/disconnect spam issues.
- Now sv_cheats cvar affect bot_console_cheats cvar, if sv_cheats is 1, everyone can use cheats, i.e. my plugin won't block cheat commands from clients.
- Changed version to 1.0.4.


QUOTE(Tom Hackers @ Aug 9 2009, 02:29 PM) *
Changelist 1.0.4 to 1.0.5:
- Now you can use spaces in bot's names.
- Default names file plugin looking for is botnames.txt! But you can create your own one and change the file name plugin is looking for!
- Changed version to 1.0.5.


QUOTE(Tom Hackers @ Aug 10 2009, 01:26 PM) *
Changelist 1.0.5 to 1.0.6:
- 2 new cvars!
bot_respawn_time - Respawn time of bot's in second, keep in mind that this will be +1 second longer due to class changing. Default: 1. Value less then 1 - Disabled.
bot_respawn_humans - This will respawn humans just like bots. Default: 1. If zero, only bots will be spawned if time >= 1.
- Fixed possible issue when server is full and bots do not respond to their count cvars.
- From now plugin works both on dedicated and listen servers.
- Plugin do not work without RCBot dll!
- Few misc. changes in code.
- Changed version to 1.0.6 and made "bot_manager_version" cvar, so from now you should be able find servers that use my plugin, for example, thro game-monitor.


You can get latest version ~snip it is attached~.

Also i uploaded example of botnames.txt file (255 names). Also i guess people can post bug reports here (plugin's bugs).
I'm not super plugin coder... I do my best. ^^

Screenshot:
IPB Image

P.s. Good evening. And if something wrong, guess admin/mods can remove topic...


Attached File(s)
Attached File  botnames.txt ( 2.57k ) Number of downloads: 1471
Attached File  tf2_bots.rar ( 18.14k ) Number of downloads: 759
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
naMelesS
post Aug 9 2009, 04:38 AM
Post #2


Member
**

Group: Members
Posts: 46
Joined: 24-June 09
Member No.: 1,585



QUOTE(Tom Hackers @ Aug 9 2009, 04:15 AM) *

First of all, i would like to thank Cheeseh for RCBot.

But i thought it would be great to make bots change classes after a while, as well as removing them when humans connect, and adding them when they disconnect, i saw "rcbot config minbots" and "rcbot config maxbots" cvars somewhere on forum. But i decided to create a sourcemod plugin for maintaining bots.
And i guess i can post it here on forum. Source code of my sourcemod plugin is provided.

CODE
Plugin game: Team Fortress 2
Plugin require: RCBot! Only dedicated server side!
Plugin authors: Tom Hackers
Plugin category: Server Management
Plugin version: 1.0.3
Plugin description:
bot_count_blue - Keep that count of bots in blue team. Default: 9.
bot_count_red - Keep that count of bots in red team. Default: 9.
bot_changeclass2 - Allow bots to change classes after X deathes. Default: 1.
bot_changeclass_dc - Death amount. Default: 4.
bot_count_humans - Count humans as bots. So humans replace bots. Default: 1.
bot_class_limit - Do not allow bots class spam. Automatic. Default: 1.
bot_class_adv - More advanced class limit. Keeps atleast 1 character for each class. Default: 1.
bot_fall_speed - Bot's fall speed multiplier. Default: 0.05.
bot_gravity - Bot's gravity multiplier. Default: 0.7.
bot_ping - Change bot's ping. Default: 1.
bot_ping_min - Bot's minimal ping. Default: 15.
bot_ping_max - Bot's maximum ping. Default: 120.
bot_console_cheats - Allow server console to use cheat commands and adding bots without sv_cheats 1. Default: 1. Switch this to 0, if you use admin cheats plugin.

I will keep this updated... Also you should find "tf2.bots.cfg" in "cfg/sourcemod" folder. Have a nice time.
Do not forget to create botnames.txt file in "sourcemod/configs" folder, with names of bots. Do not use spaces in names.

Notes: This is sourcemod's plugin, extract sourcemod folder into addons folder, overwrite: yes. Enjoy.


You can get it here (i couldn't attach it xD).

Also i uploaded example of botnames.txt file. Also i guess people can post bug reports here (plugin's bugs).
I'm not super plugin coder... I do my best. ^^

P.s. Good evening. And if something wrong, guess admin/mods can remove topic...


I am having this Page Load Error - Connection Interrupted The connection to the server was reset while the page was loading. The network link was interrupted while negotiating a connection. Please try again.

Could you change the link.?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Darkwrld
post Aug 9 2009, 05:48 AM
Post #3


Newbie
*

Group: Members
Posts: 4
Joined: 27-July 09
Member No.: 1,627



It worked..Though when using the ping it spams!.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
naMelesS
post Aug 9 2009, 06:05 AM
Post #4


Member
**

Group: Members
Posts: 46
Joined: 24-June 09
Member No.: 1,585



QUOTE(Darkwrld @ Aug 9 2009, 01:48 PM) *

It worked..Though when using the ping it spams!.


Aww man, i am from singapore. How D:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Tom Hackers
post Aug 9 2009, 07:37 AM
Post #5


Member
**

Group: Members
Posts: 26
Joined: 8-August 09
Member No.: 1,649



QUOTE(naMelesS @ Aug 9 2009, 09:05 AM) *

Aww man, i am from singapore. How D:

PMed. Check your inbox.

QUOTE(Darkwrld @ Aug 9 2009, 08:48 AM) *

It worked..Though when using the ping it spams!.

What do you mean? They change ping too much? biggrin.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
naMelesS
post Aug 9 2009, 08:13 AM
Post #6


Member
**

Group: Members
Posts: 46
Joined: 24-June 09
Member No.: 1,585



Thanks i downloaded your files. It works !
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Tom Hackers
post Aug 9 2009, 08:22 AM
Post #7


Member
**

Group: Members
Posts: 26
Joined: 8-August 09
Member No.: 1,649



QUOTE(naMelesS @ Aug 9 2009, 11:13 AM) *

Thanks i downloaded your files but, i dont see any tf2-bots.cfg

Launch server, if it doesn't exist plugin will create it automaticly. Then you can change cvars.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
naMelesS
post Aug 9 2009, 09:22 AM
Post #8


Member
**

Group: Members
Posts: 46
Joined: 24-June 09
Member No.: 1,585



QUOTE(Tom Hackers @ Aug 9 2009, 04:15 AM) *

First of all, i would like to thank Cheeseh for RCBot.

But i thought it would be great to make bots change classes after a while, as well as removing them when humans connect, and adding them when they disconnect, i saw "rcbot config minbots" and "rcbot config maxbots" cvars somewhere on forum. But i decided to create a sourcemod plugin for maintaining bots.
And i guess i can post it here on forum. Source code of my sourcemod plugin is provided.

CODE
Plugin game: Team Fortress 2
Plugin require: RCBot! Only dedicated server side!
Plugin authors: Tom Hackers
Plugin category: Server Management
Plugin version: 1.0.4 (Updated since 9 august 2009)
Plugin description:
bot_count_blue - Keep that count of bots in blue team. Default: 9.
bot_count_red - Keep that count of bots in red team. Default: 9.
bot_changeclass2 - Allow bots to change classes after X deathes. Default: 1.
bot_changeclass_dc - Death amount. Default: 4.
bot_count_humans - Count humans as bots. So humans replace bots. Default: 1.
bot_class_limit - Do not allow bots class spam. Automatic. Default: 1.
bot_class_adv - More advanced class limit. Keeps atleast 1 character for each class. Default: 1.
bot_fall_speed - Bot's fall speed multiplier. Default: 0.05.
bot_gravity - Bot's gravity multiplier. Default: 0.7.
bot_ping - Change bot's ping. Default: 1.
bot_ping_min - Bot's minimal ping. Default: 15.
bot_ping_max - Bot's maximum ping. Default: 120.
bot_console_cheats - Allow server console to use cheat commands and adding bots without sv_cheats 1. Default: 1. Switch this to 0, if you use admin cheats plugin.

I will keep this updated... Also you should find "tf2.bots.cfg" in "cfg/sourcemod" folder. Have a nice time.
Do not forget to create botnames.txt file in "sourcemod/configs" folder, with names of bots. Do not use spaces in names.

Notes: This is sourcemod's plugin, extract sourcemod folder into addons folder, overwrite: yes. Enjoy.


You can get it here (i couldn't attach it xD).

Also i uploaded example of botnames.txt file. Also i guess people can post bug reports here (plugin's bugs).
I'm not super plugin coder... I do my best. ^^

P.s. Good evening. And if something wrong, guess admin/mods can remove topic...


Does this bot management works on listenserver..?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Tom Hackers
post Aug 9 2009, 09:24 AM
Post #9


Member
**

Group: Members
Posts: 26
Joined: 8-August 09
Member No.: 1,649



Warning!
New version is 1.0.4, can be found on my site (first post).

Changelist 1.0.3 to 1.0.4:
- Fixed SourceTV bug, now you can use SourceTV on server and it won't crash (tv_enable 1).
- Fixed possible join/disconnect spam issues.
- Now sv_cheats cvar affect bot_console_cheats cvar, if sv_cheats is 1, everyone can use cheats, i.e. my plugin won't block cheat commands from clients.
- Changed version to 1.0.4.

Download mirror for those who can't access my site: here (1.0.4.).

P.s. If you use my plugin, i highly recommend update.

EDIT:
QUOTE(naMelesS @ Aug 9 2009, 12:22 PM) *

Does this bot management works on listenserver..?

Plugin designed for server administrators. I.e. you can admin them on your listen server on your own, otherwise if your server is dedicated, you can (and able to) use my plugin.
QUOTE(Tom Hackers @ Aug 8 2009, 11:15 PM) *
Plugin require: RCBot! Only dedicated server side!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Tom Hackers
post Aug 9 2009, 11:29 AM
Post #10


Member
**

Group: Members
Posts: 26
Joined: 8-August 09
Member No.: 1,649



I will update plugin shortly, next version will support spaces in bot names... ^^

New version is 1.0.5, can be found on my site (first post).

Changelist 1.0.4 to 1.0.5:
- Now you can use spaces in bot's names.
- Default names file plugin looking for is botnames.txt (sourcemod/configs/botnames.txt)! But you can create your own one and change the file name plugin is looking for!
- Changed version to 1.0.5.

Note: If file doesn't exist, plugin will tell you. So create one.

DL Mirror: click.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
naMelesS
post Aug 9 2009, 05:01 PM
Post #11


Member
**

Group: Members
Posts: 46
Joined: 24-June 09
Member No.: 1,585



QUOTE(Tom Hackers @ Aug 9 2009, 07:29 PM) *

I will update plugin shortly, next version will support spaces in bot names... ^^

New version is 1.0.5, can be found on my site (first post).

Changelist 1.0.4 to 1.0.5:
- Now you can use spaces in bot's names.
- Default names file plugin looking for is botnames.txt (sourcemod/configs/botnames.txt)! But you can create your own one and change the file name plugin is looking for!
- Changed version to 1.0.5.

Note: If file doesn't exist, plugin will tell you. So create one.

DL Mirror: click.


It does not support on listenserver, the bots just stand there only and i keep getting this message [Rcbot] Error no maps running on dedicated server. ohmy.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Tom Hackers
post Aug 9 2009, 05:06 PM
Post #12


Member
**

Group: Members
Posts: 26
Joined: 8-August 09
Member No.: 1,649



QUOTE(naMelesS @ Aug 9 2009, 08:01 PM) *
It does not support on listenserver, the bots just stand there only and i keep getting this message [Rcbot] Error no maps running on dedicated server. ohmy.gif


QUOTE(Tom Hackers @ Aug 9 2009, 12:24 PM) *
Plugin designed for server administrators. I.e. you can admin them on your listen server on your own, otherwise if your server is dedicated, you can (and able to) use my plugin.


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
chann
post Aug 10 2009, 04:08 AM
Post #13


Member
**

Group: Members
Posts: 15
Joined: 10-August 09
Member No.: 1,651



QUOTE(naMelesS @ Aug 10 2009, 02:31 AM) *

It does not support on listenserver, the bots just stand there only and i keep getting this message [Rcbot] Error no maps running on dedicated server. ohmy.gif


It can be fixed! Look for this section in addons\sourcemod\scripting\tf2-bots.sp:

CODE

        if (IsClientInGame(i) && IsFakeClient(i) && ControlSkips[i] > 3 && !UnderControl[i])  
        {
            GetClientName(i, temp, sizeof(temp));
            ServerCommand("rcbot control \"%s\"", temp);
            UnderControl[i] = true;
        }


Just change "rcbotd control" to "rcbot control" (so it doesn't use the dedicated servercommand), recompile the script with spcomp.exe from the command line, and overwrite the tf2-bots.smx in sourcemod\plugins with the new one from sourcemod\scripting\compiled.

Thanks Tom, this plugin is much better than trying to manually balance teams. And it's awesome you included the source code biggrin.gif

Also for some reason I can't access your website unless I use a proxy...weird.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Tom Hackers
post Aug 10 2009, 07:13 AM
Post #14


Member
**

Group: Members
Posts: 26
Joined: 8-August 09
Member No.: 1,649



QUOTE(chann @ Aug 10 2009, 07:08 AM) *
Just change "rcbotd control" to "rcbot control" (so it doesn't use the dedicated servercommand), recompile the script with spcomp.exe from the command line, and overwrite the tf2-bots.smx in sourcemod\plugins with the new one from sourcemod\scripting\compiled.

Thanks Tom, this plugin is much better than trying to manually balance teams. And it's awesome you included the source code biggrin.gif

Also for some reason I can't access your website unless I use a proxy...weird.


Yes it can be fixed, i don't wan't to make version for listen servers, becouse dedicated one's are better. Yesterday i was running such server for 6 hours on dustbowl, fun.

Np, i will keep this updated, as soon, as i find bugs.

Yeah it's strange, what does it says, when you try visit my site?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
chann
post Aug 10 2009, 08:01 AM
Post #15


Member
**

Group: Members
Posts: 15
Joined: 10-August 09
Member No.: 1,651



QUOTE(Tom Hackers @ Aug 10 2009, 04:43 PM) *

Yes it can be fixed, i don't wan't to make version for listen servers, becouse dedicated one's are better. Yesterday i was running such server for 6 hours on dustbowl, fun.

Np, i will keep this updated, as soon, as i find bugs.

Yeah it's strange, what does it says, when you try visit my site?


I get an "Operation timed out" error after about 20 seconds, but I can access it through http://hidemyass.com/ and http://anonymouse.org/, so I think it is a geographical or an ISP problem.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Tom Hackers
post Aug 10 2009, 10:26 AM
Post #16


Member
**

Group: Members
Posts: 26
Joined: 8-August 09
Member No.: 1,649



1.0.6 version incoming, track this post, i will edit this and first post when i finish.

EDIT: K done, uploaded to my site.
Changelist:
- 2 new cvars!
bot_respawn_time - Respawn time of bot's in second, keep in mind that this will be +1 second longer due to class changing. Default: 1. Value less then 1 - Disabled.
bot_respawn_humans - This will respawn humans just like bots. Default: 1. If zero, only bots will be spawned if time >= 1.
- Fixed possible issue when server is full and bots do not respond to their count cvars.
- From now plugin works both on dedicated and listen servers.
- Plugin do not work without RCBot dll!
- Few misc. changes in code.
- Changed version to 1.0.6 and made "bot_manager_version" cvar, so from now you should be able find servers that use my plugin, for example, thro game-monitor.

Enjoy and dl mirror.

P.s. is it possible to rename topic a bit? For example "[sourcemod] RCBot manager"? ^^
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
KeReMiD4O
post Aug 10 2009, 12:56 PM
Post #17


Member
**

Group: Members
Posts: 28
Joined: 12-July 07
Member No.: 1,175



Great work mate (:
Will test asap.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Fillmore
post Aug 10 2009, 06:57 PM
Post #18


RCBot Guru
*****

Group: Waypointers
Posts: 447
Joined: 1-April 09
Member No.: 1,511



QUOTE(Tom Hackers @ Aug 10 2009, 10:26 AM) *

1.0.6 version incoming, track this post, i will edit this and first post when i finish.

EDIT: K done, uploaded to my site.
Changelist:
- 2 new cvars!
bot_respawn_time - Respawn time of bot's in second, keep in mind that this will be +1 second longer due to class changing. Default: 1. Value less then 1 - Disabled.
bot_respawn_humans - This will respawn humans just like bots. Default: 1. If zero, only bots will be spawned if time >= 1.
- Fixed possible issue when server is full and bots do not respond to their count cvars.
- From now plugin works both on dedicated and listen servers.
- Plugin do not work without RCBot dll!
- Few misc. changes in code.
- Changed version to 1.0.6 and made "bot_manager_version" cvar, so from now you should be able find servers that use my plugin, for example, thro game-monitor.

Enjoy and dl mirror.

P.s. is it possible to rename topic a bit? For example "[sourcemod] RCBot manager"? ^^

This management is awesome!
I don't have to name the bots with the -name tag,because there's an text file doing it for me!
And the gravity prob seems to have been fixed,occasionally their gravity's too low tongue.gif
Cheers,Tom. An excellent plugin you've made.
However,I've noticed that my teams bots don't switch classes.
I got 3 spies on my team on Gravel pit biggrin.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
wyn10
post Aug 11 2009, 08:14 AM
Post #19


Member
**

Group: Members
Posts: 24
Joined: 27-July 09
Member No.: 1,626



You should make a mod like this for mani....
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Tom Hackers
post Aug 11 2009, 08:29 AM
Post #20


Member
**

Group: Members
Posts: 26
Joined: 8-August 09
Member No.: 1,649



QUOTE(Fillmore @ Aug 10 2009, 09:57 PM) *

This management is awesome!
I don't have to name the bots with the -name tag,because there's an text file doing it for me!
And the gravity prob seems to have been fixed,occasionally their gravity's too low tongue.gif
Cheers,Tom. An excellent plugin you've made.
However,I've noticed that my teams bots don't switch classes.
I got 3 spies on my team on Gravel pit biggrin.gif


bot_changeclass2 1 - this will allow them to change class after death count.
bot_changeclass_dc - this is death count, if they do not change class as often as you want, decrease value.
bot_class_limit 1 - this will make sure that you won't have 8 engies on team by some random reason. If you switch this to zero, your team will have many soldiers/engies/spyes or i.e. sometimes.
bot_class_adv 0 - switching this to zero will tell them that they shouldn't search for a free (0 class count character) class. So try switch bot_class_adv to zero and look at your spyes, they will change class somewhen def.
Advanced class limit is good to use, if your server is being visited by humans, so bot's stay with free classes that humans don't play.
Also you can switch off fast respawn, so by pressing tab with bot_changeclass_dc 1, you will see that they change class every death.

QUOTE(wyn10 @ Aug 11 2009, 11:14 AM) *

You should make a mod like this for mani....


Sorry i didn't even use mani admin plugin, if you can point me somewhere i can learn more about it...
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

7 Pages V  1 2 3 > » 
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: 28th March 2024 - 02:22 PM