This Lua script for Counter-Strike 2D will automatically add or remove bots to a server in order to maintain a specified number of total players (bots plus humans) within the game.
Settings can be changed (and the script can be enabled or disabled) by issuing simple console commands on a "listen" server (when starting a new game), as well as on a dedicated server via RCon.
Spoiler
(Click Spoiler for complete readme and usage instructions, also included in the ZIP) Advanced Bot Team Balance v1.4
==============================
©Copyright 2012-2013, Rich ¥Weeds¥ Nagel - Some Rights Reserved
Description
-----------
This Lua script for Counter-Strike 2D will automatically add or remove bots to a server in order to maintain a specified number of total players (bots plus humans) within the game.
Settings can be changed (and the script can be enabled or disabled) by issuing simple console commands on a "listen" server (when starting a new game), as well as on a dedicated server via RCon.
Note that spectators on the server are ignored in the total players count. This allows for human spectators to be connected to the server, without affecting the team-balancing of the current actively playing bot and human players.
Lastly, note that when running this script it is recommended to enable Auto TeamBalance within the game ("mp_autoteambalance 1"), as well as setting Bots to 0 before starting the server ("bot_count 0").
Installation
------------
Unzip the files contained in the "Advanced_Bot_Team_Balance_v1.4.zip" archive to the "Counter-Strike 2D\Sys\Lua" folder on your hard drive, and then add the following line to the "Server.lua" (located in the same folder) file using Windows Notepad:
dofile("Sys/Lua/AdvancedBotTeamBalance.lua")
Alternatively, simply unzip the files to the "Counter-Strike 2D\Sys\Lua\Autorun" folder on your hard drive. Note that this method does NOT require editing of the "Server.lua" file (as the game will automatically run any Lua script files that are located in the "Autorun" folder).
Initial Setup Defaults
----------------------
The first time that you run Counter-Strike 2D (or a Counter-Strike 2D dedicated server) after installing Advanced Bot Team Balance, the script will create the configuration file "AdvancedBotTeamBalance.cfg" (located in the "Counter-Strike 2D\Sys" folder on your hard drive).
This configuration file will contain the following two initial setup defaults used by Advanced Bot Team Balance when it is run for the first time:
"bot_balance = 5" - Set total players (bots plus humans) to 5 players per team.
"bot_balance_enabled = 1" - Enable Advanced Bot Team Balance.
Runtime Defaults
----------------
The next time that you run Counter-Strike 2D (or a Counter-Strike 2D dedicated server) with Advanced Bot Team Balance installed, the script will load and apply the settings from the previously created "AdvancedBotTeamBalance.cfg" configuration file (mentioned above).
The script will also save any settings that you have changed (using the in-game and RCon console commands mentioned below) to this configuration file, so that the script will load and apply the settings the next time that you run the game (or a Counter-Strike 2D dedicated server), or when the server cycles to the next map.
Console Commands
----------------
Note that these console commands will function on a "listen" server (when starting a new game), as well as on a dedicated server via RCon.
bot_balance <players> = Enable Advanced Bot Team Balance, and change Bot Team Balance to 0-15 player(s) per team.
bot_balance on = Enable Advanced Bot Team Balance.
bot_balance off = Disable Advanced Bot Team Balance.
bot_balance welcome/message = Display join server welcome message, and current Bot Team Balance settings to all players.
bot_balance help/? = Display help screen.
bot_balance version/about = Display version information.
Version History
---------------
v1.0 (December 21, 2012)
- First Release.
v1.1 (December 21, 2012)
- Changed the "join server welcome message" function so that it is now displayed only to the players who are joining the server, instead of all of the players who are currently on the server when a new player joins.
- Changed the "bot_balance version/about" console commands so that they print to the console, instead of all of the connected players' HUDs.
- Added a routine to count the spectators who are currently connected to the server (although this number is currently unused by the script).
v1.2 (December 22, 2012)
- Changed the "join server welcome message".
- Added the "bot_balance welcome/message" console commands to display the "join server welcome message" to all of the players who are currently connected to the server.
- Changed a few other things here and there.
v1.3 (December 24, 2012)
- Added configuration file support which will save, load, and apply any settings that have previously been changed using the console commands.
- Changed the "join server welcome message" so that is also displays the current settings of the script.
- Changed a few of the displayed in-game messages.
- Changed a few other things here and there.
v1.4 (January 2, 2013)
- Changed the "join server welcome message" so that it is not quite as annoying (when used with other Lua scripts that also display a server welcome message).
- Changed the "help" and "version information" text that is printed to the console.
- Changed a few other things here and there.
ENJOY!
------
Rich ¥Weeds¥ Nagel
January 2, 2013
richnagel@***********.***
http://www.richnagel.net
http://www.unrealsoftware.de/profile.php?userid=110755
http://steamcommunity.com/id/RichNagel
==============================
©Copyright 2012-2013, Rich ¥Weeds¥ Nagel - Some Rights Reserved
Description
-----------
This Lua script for Counter-Strike 2D will automatically add or remove bots to a server in order to maintain a specified number of total players (bots plus humans) within the game.
Settings can be changed (and the script can be enabled or disabled) by issuing simple console commands on a "listen" server (when starting a new game), as well as on a dedicated server via RCon.
Note that spectators on the server are ignored in the total players count. This allows for human spectators to be connected to the server, without affecting the team-balancing of the current actively playing bot and human players.
Lastly, note that when running this script it is recommended to enable Auto TeamBalance within the game ("mp_autoteambalance 1"), as well as setting Bots to 0 before starting the server ("bot_count 0").
Installation
------------
Unzip the files contained in the "Advanced_Bot_Team_Balance_v1.4.zip" archive to the "Counter-Strike 2D\Sys\Lua" folder on your hard drive, and then add the following line to the "Server.lua" (located in the same folder) file using Windows Notepad:
dofile("Sys/Lua/AdvancedBotTeamBalance.lua")
Alternatively, simply unzip the files to the "Counter-Strike 2D\Sys\Lua\Autorun" folder on your hard drive. Note that this method does NOT require editing of the "Server.lua" file (as the game will automatically run any Lua script files that are located in the "Autorun" folder).
Initial Setup Defaults
----------------------
The first time that you run Counter-Strike 2D (or a Counter-Strike 2D dedicated server) after installing Advanced Bot Team Balance, the script will create the configuration file "AdvancedBotTeamBalance.cfg" (located in the "Counter-Strike 2D\Sys" folder on your hard drive).
This configuration file will contain the following two initial setup defaults used by Advanced Bot Team Balance when it is run for the first time:
"bot_balance = 5" - Set total players (bots plus humans) to 5 players per team.
"bot_balance_enabled = 1" - Enable Advanced Bot Team Balance.
Runtime Defaults
----------------
The next time that you run Counter-Strike 2D (or a Counter-Strike 2D dedicated server) with Advanced Bot Team Balance installed, the script will load and apply the settings from the previously created "AdvancedBotTeamBalance.cfg" configuration file (mentioned above).
The script will also save any settings that you have changed (using the in-game and RCon console commands mentioned below) to this configuration file, so that the script will load and apply the settings the next time that you run the game (or a Counter-Strike 2D dedicated server), or when the server cycles to the next map.
Console Commands
----------------
Note that these console commands will function on a "listen" server (when starting a new game), as well as on a dedicated server via RCon.
bot_balance <players> = Enable Advanced Bot Team Balance, and change Bot Team Balance to 0-15 player(s) per team.
bot_balance on = Enable Advanced Bot Team Balance.
bot_balance off = Disable Advanced Bot Team Balance.
bot_balance welcome/message = Display join server welcome message, and current Bot Team Balance settings to all players.
bot_balance help/? = Display help screen.
bot_balance version/about = Display version information.
Version History
---------------
v1.0 (December 21, 2012)
- First Release.
v1.1 (December 21, 2012)
- Changed the "join server welcome message" function so that it is now displayed only to the players who are joining the server, instead of all of the players who are currently on the server when a new player joins.
- Changed the "bot_balance version/about" console commands so that they print to the console, instead of all of the connected players' HUDs.
- Added a routine to count the spectators who are currently connected to the server (although this number is currently unused by the script).
v1.2 (December 22, 2012)
- Changed the "join server welcome message".
- Added the "bot_balance welcome/message" console commands to display the "join server welcome message" to all of the players who are currently connected to the server.
- Changed a few other things here and there.
v1.3 (December 24, 2012)
- Added configuration file support which will save, load, and apply any settings that have previously been changed using the console commands.
- Changed the "join server welcome message" so that is also displays the current settings of the script.
- Changed a few of the displayed in-game messages.
- Changed a few other things here and there.
v1.4 (January 2, 2013)
- Changed the "join server welcome message" so that it is not quite as annoying (when used with other Lua scripts that also display a server welcome message).
- Changed the "help" and "version information" text that is printed to the console.
- Changed a few other things here and there.
ENJOY!
------
Rich ¥Weeds¥ Nagel
January 2, 2013
richnagel@***********.***
http://www.richnagel.net
http://www.unrealsoftware.de/profile.php?userid=110755
http://steamcommunity.com/id/RichNagel
edited 7×, last 04.01.13 09:58:21 am
Approved by GeoB99
Download
4 kb, 532 Downloads