View Single Post
Re: Min_bots Max_bots
Old
  (#2)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: Min_bots Max_bots - 11-05-2006

Quote:
Originally Posted by bakonki
The facts:
cs 1.6 steam updated, metamod 1.19, amx .99 and pb 46d
maxplayers 12
min_bots 5
max_bots 11

When I run hlds PB adds 5 bots automatically (min_bots value) and change maxplayers value to 11 (max_bots value).
That's impossible. Did You try top write in th econsole mp_maxplayers to see if this cvar has been changed?

Quote:
Originally Posted by bakonki
I think it should add 11 bots starting, reserving 1 slot for players, but it won't. When I try to use fillserver to reach the max_bots value, PB do it correctly, but I can't connect players anymore.
(...)
There's something I should know ?
Yeah.
Quote:
Originally Posted by pb mm docs
Auto add/kick bot function
What do the people want? They want to keep as constant the number of bots+players at the server, but sometimes this was not working correct in old PB2.5 (client connection failed - bot didn't rejoin back) - sometimes this made a server empty. Another people want the same but with the possibility of some manual control of bots on the server (some manual kick, some manual add, some removebots and some fillserver - these function have to be still availiable). How to solve this?
Now in code is a variable invisible for user-admin. It's name is g_iPeoBotsKept - this variable defines how many bots+players shuld be still on the server. This name is only here for explaining how this is working now.
The meaning of max_bots and min_bots - these are limits only but with possibility change them from console by:
pb max_bots {new_value}
pb min_bots {new_value}
The max_bots variable defines how many bots+players will be on the server when You will use fillserver command (of course - if there are on the server some sufficient slots for all of them) or addbot commands. The min_bots variable defines the minimum number of bots must stay on the server when:
a) You will call removebots command
b) some of them will be kicked because of joining some people.
You can define max_bots as 12 and min_bots as 2 and put 8 addbot commands in podbot.cfg - then g_iPeoBotsKept is calculated (automaticaly) as 8 - for example - because it's incremented every single addbot command. If You use fillserver - this variable will reach 12 (in our example) - in the case of calling fillserver g_iPeoBotsKept is overwitten by max_bots variabale.
NOTE:
On listenserver except addbots commands also the host (the player-LS owner) is calculated (added) to g_iPeoBotsKept. So in the case if he has - for example - 8 addbots commands in his podbot.cfg - g_iPeoBotsKept variable will be 9 (at start host and 8 bots on the server).
At the first map (server started) the first bots added to the server are from podbot.cfg - these added by addbot commands or fillserver. If there are 4 addbot commands - first will enter the game these 4 specyfied by these commands and after - if there is also a fillserver command - automaticaly will be added some other bots (according to other parameters of the fillserver command, max_bots and other parameters).
So - You started the game with 8 bots. Then one player is connected and entered the game, then one bot is automaticaly kicked. Player is disconnected - bot is automaticaly added. This is checked every frame - if still g_iPeoBotsKept is the same like number of bots+players.
If You decide manualy add some bot (from podbotmenu or by pb addbot command from console) - bot will be added according to this what You specify (if You type pb addbot 100 2 2 3 "Rocky" - just exactly this bot will be added - not some bot automaticaly). In this case g_iPeoBotsKept variable will be automaticaly incremented by 1. If You decide to kick manually some bot - bot will be kicked. If from podbotmenu - You can select iwhicj one should be kicked from menu (4 pages), if from console:
pb remove #bot_id
or pb remove bot_name
bot_id means the same like id for standard kick command.
In this case g_iPeoBotsKept variable will be automaticaly decremented by 1. Of course all here is valid only if You are in range min/max bots You specyfied before. If You decide to use fillserver and You have actualy 10 bots+players on the server - bots will be added automaticaly until reaching bots + players = max_bots (in our example 12). In this case g_iPeoBotsKept will be overwritten by max_bots variable (12).
The same for removebots - If You decide to use this command, bots will be removed from the server until reaching bots + players = min_bots (in our example 2). In this case g_iPeoBotsKept variable will be overwritten by min_bots variable (2). If You will write in console :
pb max_bots 6
it will decrase (if is grater) the g_iPeoBotsKept variable to 6 and some bots will be probably kicked.
If You will write in console:
pb min_bots 7
it will incrase (if is lower) the g_iPeoBotsKept variable to 7 and some bots will be probably added. This "probably" above is depanding of actual situation on the server - if the number of human-players lets kick or add some bots in these both situations.
Connecting to the game more human-players than is actually calculated g_iPeoBotsKept will not affect this variable. If You have this variable as 10 and there is 12 human-players - of course You can't kick more bots.
All here can work automaticaly and there is still some control and possiblity of manual bots management.
If You want some delay for bots re-join at new map start then write in console this line:
pb mapstartbotdelay 10
and bot will be joined on the new map after 10s since map start. The same command (but without "pb") You can write in podbot.cfg.

If because of some reason You don't like this function (auto add/kick bots) You can simply disable it by writting in console:
pb max_bots 0
(or without "pb" in podbot.cfg file).
In this case the value of g_iPeoBotsKept is then following the current number of bots + players, but no one bot will be automatically added or kicked. Enabling back the function (by typing some different than 0 number for max_bots) should change nothing on the server (no one bot should be added or kicked after enabling this function) except the situation You specify some max_bots less than current number of bots+players on the server (in this case some of them will be kicked until reaching bots+players = max_bots).

Quote:
Originally Posted by bakonki
The only error I see is this: meta-interface version mismatch (metamod: 5:13, POD-Bot mm: 5:10)
Take the beta from filebase - but read carefully the new podbot.cfg (that beta needs these new config files included there) and You will not see that message anymore. And podbot wll work for You better.
  
Reply With Quote