dodsynthetic
01-17-2008, 02:05 AM
Syn's Shrike Bot Controller v1.4
This script was designed to control the Shrikebot mod for DoD via menus.
===========================
v1.4 Changes
===========================
- Added support for per map shrikebot.cfgs.
- Added menu option Vote Bots On. Starts a vote to turn the bots on.
- Added menu option Vote Bots Off. Starts a vote to turn the bots off.
- Added alternating menu option Use Base Config/Use Per Map Confg. Changes between the two.
- Added console command amx_sc_vote_on to start a vote to turn the bots on.
- Added console command amx_sc_vote_off to start a vote to turn the bots off.
- Added alternating console command amx_sc_change_cfg. Changes between base or per map config.
- Added cvar sc_maps_list. Allows use of default mapcycle.txt or DeagsMapManager mapchoice.ini.
- Added cvar sc_vote_on. Allows voting to turn the bots on.
- Added cvar sc_vote_off. Allows voting to turn the bots off.
- Added cvar sc_vote_restore. Allows restoring bots to previous amount if all real players leave.
- Added cvar sc_vote_time. Specifies how long a player has to vote until voting ends.
- Updated information and added to notes.
===========================
v1.3 Changes
===========================
- Added menu option Remove Bots For Now. Will keep bots off even between map changes until menu
option Bring Bots Back is used or console command amx_sc_bring_bots_back is used.
- Added menu option Bring Bots Back. Will bring bots back to set amount in cvar sc_return_bots
and will allow them to come back on map changes.
- Added menu option Show Shrike Config to show current shrikebot.cfg settings.
- Added console command amx_sc_remove_bots. Will keep bots off even between map changes until
menu option Bring Bots Back is used or console command amx_sc_bring_bots_back is used.
- Added console command amx_sc_bring_bots_back. Will bring bots back to set amount in cvar
sc_return_bots and will allow them to come back on map changes.
- Added console command amx_sc_show_config to show current shrikebot.cfg settings.
- Added cvar sc_return_bots. Specifies how many bots to put back in the game when using menu
option Bring Bots Back or console command sc_bring_bots_back.
- Shortend console commands. If you had them bound before, be sure to update your binds!
- Fixed issues with not properly detecting an existing shrikebot.cfg that wasn't made by Shrike
Bot Controller. If you had problems with commands that required saving your settings to the
shrikebot.cfg before, this was why. Thanks {DwP} 325th ABN and johndoe on dodplugins.net for
your information that helped me locate this. After going through the code, it was blatenly
obvious as soon as I looked at it. ;)
- Added missing checks to obey cvar sc_show_changes on use of amx_sc_kick and amx_sc_add console
commands.
- Added to the notes and updated information.
- Cleaned up some unused code.
===========================
v1.2 Changes
===========================
- Added menu option to quick kick all bots. Keeps them from coming back!
- Added console command to quick kick all bots. Keeps them from coming back!
- Added console command to quick add bots.
- Added seperate access flag cvar for quick kick and quick add.
- Added more control to Fill Server / Kick On x Real Players / Min Bots / Max Bots.
- Dropped access flag cvars by letter. It was not really needed and won't work anyway. To change,
modify the access flag at the end of each console command.
- Updated information.
===========================
v1.1 Changes
===========================
- Updated confirmation message system to handle options that got issued to a live running server
but also was a savable option and said it required shrikebot.cfg be saved.
- Clarified and added to the notes.
===========================
Features
===========================
- Menu based configuration. Can be added to amxmodmenu.
- Access to the following options:
Adding a bot
All chat options
Reaction time
Skill
Team balance
Fill server
Fun Mode
Kick all bots
Kick when x real players join
Kill all bots
Max bots
Min bots
Bot shield | See notes
View clan tag
View skill
- Save option to write base shrikebot.cfg file and per map shrikebot.cfg depending on mode.
- Quick options to remove all and add bots.
- Quick options to keep bots away until needed even after map changes and bring them back later.
- Voting to turn bots on and off and mode to restore bots after all players are gone from a
successful vote off.
===========================
Notes
===========================
- Tested on an AMXMODX v1.8 Linux server and v1.76 Windows server as well.
- Immediate changes to some options will not take effect until map change and require the
configuration be saved.
- On first use, writes over shrikebot.cfg or per map shrikebot.cfg depending on mode.
- Assumes shrikebot.cfg is in the default directory of "dod\shrikebot". If you put it somewhere
else, just change the data for the sc_shrike_config array. Base dir is dod. This is the same
for per map configs but assumes they are located in "dod\shrikebot\config".
- To make sure the shrikebot.cfg location info is correct, make sure the sc_show_changes cvar is
on and either use the menu option Show Shrike Config or console command amx_sc_show_config. If
nothing shows up in the chat console then the shrikebot.cfg location is incorrect. You can also
use this to verify that options are correctly saved. If they do not update the file may be read
only (Windows) or incorrect permissions are set (Linux).
- For View Clan and View Skill, you can't have both. It's either one or the other.
- Bot fun shield mode is now usable but I can't seem to see any effect besides a glowing,
floating rat. By default, the precaching of the model is commented out. Do not use the option
without the model or the server will crash. For those without the model, you can find it on
your HL1 CD or by searching on Google. It goes in the "dod\models folder" on your server and
your computer as well. To enabe this feature, uncomment the "Precache resources" section and
also the global variable "nill".
- To change the access flag for the menu, be sure to change all of the access flages on each of
the listings in plugin init under the heading "Register menus".
- You can make changes to the shrikebot.cfg file after it has been created by Shrike Bot
Controller but do not change the structure. IE swapping options to different lines. It works by
reading/writing options in a certain order.
- If set to use base shrikebot.cfg, it will automatically delete per map configs to avoid
settings conflicts.
- If set to use per map shrikebot.cfg files, will create them if not already created.
- After changing shrikebot.cfg type to use, you will need to change the map for the changes to
properly take effect. Notice that if you have lots of maps, your server could take a temporary
hit to resources until the operation is completed.
===========================
Console Commands
===========================
amx_shrike_control
- Opens Shrike Bot Control menu. Default access level is ADMIN_CVAR.
amx_sc_kick
- Quick kicks all bots. Simplifies the task of kicking the bots without having to enter the menu.
Default access level is ADMIN_VOTE.
amx_sc_add | x
- Quick adds x amount of bots. Default access level is ADMIN_VOTE.
amx_sc_remove_bots
- Gets rid of bots even between map changes until menu option Bring Bots Back is used or console
command sc_bring_bots_back is used. Changes stay even on map change. Default access level is
ADMIN_VOTE.
amx_sc_bring_bots_back
- Bring bots back to set amount in cvar sc_return_bots. Changes stay even on map change. Default
access level is ADMIN_VOTE.
amx_sc_show_config
- Shows current shrikebot.cfg settings in console. Default access level is ADMIN_VOTE.
amx_sc_vote_on
- Starts vote to turn bots on. Uses value from shrikebot.cfg. Default access level is ADMIN_VOTE.
amx_sc_vote_off
- Starts vote to turn bots off. Uses value from shrikebot.cfg. Default access level is ADMIN_VOTE.
amx_sc_change_cfg
- Changes which shrikebot.cfg to use. Base or per map. Alternates mode on use. Default is base.
Default access level is ADMIN_RCON.
===========================
CVARS
===========================
sc_show_changes | 0 = off | 1 = on
- Gives confirmation of changes on screen. Default on.
sc_return_bots
- Sets the amount of bots to have return to the server when menu option Bring Bots Back is used
or console command sc_bring_bots_back is used. Default 8.
sc_maps_list | 0 = mapcycle.txt | 1 = DeagsMapManager mapchoice.ini
- Allows use of default mapcycle.txt or DeagsMapManager mapchoice.ini. This option is for use
with per map configs. Maps that are not listed in either file (depending on mode) will not get
a custom shrikebot.cfg. Be sure to have have all the maps you want listed. Supports up to 255
maps which should be enough but if not, change the first amount for sc_mapcycle or sc_mapchoice
under "Declare global variables and values".
sc_vote_on | 0 = off | 1 = on
- Enables or disables voting to turn bots on. Default on.
sc_vote_off | 0 = off | 1 = on
- Enables or disables voting to turn bots off. Default on.
sc_vote_restore | 0 = off | 1 = on
- Enables or disables restoring of bots when all real players leave. Sets them according to the
max_bots value from shrikebot.cfg. Default on.
sc_vote_time | x
- Specifies how long players have until vote ends. Enter intergers only. 1 = one second etc..
Default 10 seconds
===========================
Installation
===========================
- Copy syns_shrike_control.amxx into your addons\amxmodx\plugins folder
- Add syns_shrike_control.amxx to the bottom of your addons\amxmodx\configs\plugins.ini
- Change the map or restart your server to start using the plugin!
===========================
Installing Into amxmodmenu
===========================
- Add this line >
amx_addmenuitem "Shrike Bot Menu" "amx_shrike_control" "hu" "Syn's Shrikebot Controller"
to your amxmodx\configs\custommenuitems.cfg
===========================
Binding Keys
===========================
- To bind certain options like the menu or quick kick/add all you have to do is bind them to a
key. IE say you want your p key to quick kick all bots. Go into your console and type:
bind p amx_shrike_control_kick
then hit enter and now your p key will quick kick all bots.
This script was designed to control the Shrikebot mod for DoD via menus.
===========================
v1.4 Changes
===========================
- Added support for per map shrikebot.cfgs.
- Added menu option Vote Bots On. Starts a vote to turn the bots on.
- Added menu option Vote Bots Off. Starts a vote to turn the bots off.
- Added alternating menu option Use Base Config/Use Per Map Confg. Changes between the two.
- Added console command amx_sc_vote_on to start a vote to turn the bots on.
- Added console command amx_sc_vote_off to start a vote to turn the bots off.
- Added alternating console command amx_sc_change_cfg. Changes between base or per map config.
- Added cvar sc_maps_list. Allows use of default mapcycle.txt or DeagsMapManager mapchoice.ini.
- Added cvar sc_vote_on. Allows voting to turn the bots on.
- Added cvar sc_vote_off. Allows voting to turn the bots off.
- Added cvar sc_vote_restore. Allows restoring bots to previous amount if all real players leave.
- Added cvar sc_vote_time. Specifies how long a player has to vote until voting ends.
- Updated information and added to notes.
===========================
v1.3 Changes
===========================
- Added menu option Remove Bots For Now. Will keep bots off even between map changes until menu
option Bring Bots Back is used or console command amx_sc_bring_bots_back is used.
- Added menu option Bring Bots Back. Will bring bots back to set amount in cvar sc_return_bots
and will allow them to come back on map changes.
- Added menu option Show Shrike Config to show current shrikebot.cfg settings.
- Added console command amx_sc_remove_bots. Will keep bots off even between map changes until
menu option Bring Bots Back is used or console command amx_sc_bring_bots_back is used.
- Added console command amx_sc_bring_bots_back. Will bring bots back to set amount in cvar
sc_return_bots and will allow them to come back on map changes.
- Added console command amx_sc_show_config to show current shrikebot.cfg settings.
- Added cvar sc_return_bots. Specifies how many bots to put back in the game when using menu
option Bring Bots Back or console command sc_bring_bots_back.
- Shortend console commands. If you had them bound before, be sure to update your binds!
- Fixed issues with not properly detecting an existing shrikebot.cfg that wasn't made by Shrike
Bot Controller. If you had problems with commands that required saving your settings to the
shrikebot.cfg before, this was why. Thanks {DwP} 325th ABN and johndoe on dodplugins.net for
your information that helped me locate this. After going through the code, it was blatenly
obvious as soon as I looked at it. ;)
- Added missing checks to obey cvar sc_show_changes on use of amx_sc_kick and amx_sc_add console
commands.
- Added to the notes and updated information.
- Cleaned up some unused code.
===========================
v1.2 Changes
===========================
- Added menu option to quick kick all bots. Keeps them from coming back!
- Added console command to quick kick all bots. Keeps them from coming back!
- Added console command to quick add bots.
- Added seperate access flag cvar for quick kick and quick add.
- Added more control to Fill Server / Kick On x Real Players / Min Bots / Max Bots.
- Dropped access flag cvars by letter. It was not really needed and won't work anyway. To change,
modify the access flag at the end of each console command.
- Updated information.
===========================
v1.1 Changes
===========================
- Updated confirmation message system to handle options that got issued to a live running server
but also was a savable option and said it required shrikebot.cfg be saved.
- Clarified and added to the notes.
===========================
Features
===========================
- Menu based configuration. Can be added to amxmodmenu.
- Access to the following options:
Adding a bot
All chat options
Reaction time
Skill
Team balance
Fill server
Fun Mode
Kick all bots
Kick when x real players join
Kill all bots
Max bots
Min bots
Bot shield | See notes
View clan tag
View skill
- Save option to write base shrikebot.cfg file and per map shrikebot.cfg depending on mode.
- Quick options to remove all and add bots.
- Quick options to keep bots away until needed even after map changes and bring them back later.
- Voting to turn bots on and off and mode to restore bots after all players are gone from a
successful vote off.
===========================
Notes
===========================
- Tested on an AMXMODX v1.8 Linux server and v1.76 Windows server as well.
- Immediate changes to some options will not take effect until map change and require the
configuration be saved.
- On first use, writes over shrikebot.cfg or per map shrikebot.cfg depending on mode.
- Assumes shrikebot.cfg is in the default directory of "dod\shrikebot". If you put it somewhere
else, just change the data for the sc_shrike_config array. Base dir is dod. This is the same
for per map configs but assumes they are located in "dod\shrikebot\config".
- To make sure the shrikebot.cfg location info is correct, make sure the sc_show_changes cvar is
on and either use the menu option Show Shrike Config or console command amx_sc_show_config. If
nothing shows up in the chat console then the shrikebot.cfg location is incorrect. You can also
use this to verify that options are correctly saved. If they do not update the file may be read
only (Windows) or incorrect permissions are set (Linux).
- For View Clan and View Skill, you can't have both. It's either one or the other.
- Bot fun shield mode is now usable but I can't seem to see any effect besides a glowing,
floating rat. By default, the precaching of the model is commented out. Do not use the option
without the model or the server will crash. For those without the model, you can find it on
your HL1 CD or by searching on Google. It goes in the "dod\models folder" on your server and
your computer as well. To enabe this feature, uncomment the "Precache resources" section and
also the global variable "nill".
- To change the access flag for the menu, be sure to change all of the access flages on each of
the listings in plugin init under the heading "Register menus".
- You can make changes to the shrikebot.cfg file after it has been created by Shrike Bot
Controller but do not change the structure. IE swapping options to different lines. It works by
reading/writing options in a certain order.
- If set to use base shrikebot.cfg, it will automatically delete per map configs to avoid
settings conflicts.
- If set to use per map shrikebot.cfg files, will create them if not already created.
- After changing shrikebot.cfg type to use, you will need to change the map for the changes to
properly take effect. Notice that if you have lots of maps, your server could take a temporary
hit to resources until the operation is completed.
===========================
Console Commands
===========================
amx_shrike_control
- Opens Shrike Bot Control menu. Default access level is ADMIN_CVAR.
amx_sc_kick
- Quick kicks all bots. Simplifies the task of kicking the bots without having to enter the menu.
Default access level is ADMIN_VOTE.
amx_sc_add | x
- Quick adds x amount of bots. Default access level is ADMIN_VOTE.
amx_sc_remove_bots
- Gets rid of bots even between map changes until menu option Bring Bots Back is used or console
command sc_bring_bots_back is used. Changes stay even on map change. Default access level is
ADMIN_VOTE.
amx_sc_bring_bots_back
- Bring bots back to set amount in cvar sc_return_bots. Changes stay even on map change. Default
access level is ADMIN_VOTE.
amx_sc_show_config
- Shows current shrikebot.cfg settings in console. Default access level is ADMIN_VOTE.
amx_sc_vote_on
- Starts vote to turn bots on. Uses value from shrikebot.cfg. Default access level is ADMIN_VOTE.
amx_sc_vote_off
- Starts vote to turn bots off. Uses value from shrikebot.cfg. Default access level is ADMIN_VOTE.
amx_sc_change_cfg
- Changes which shrikebot.cfg to use. Base or per map. Alternates mode on use. Default is base.
Default access level is ADMIN_RCON.
===========================
CVARS
===========================
sc_show_changes | 0 = off | 1 = on
- Gives confirmation of changes on screen. Default on.
sc_return_bots
- Sets the amount of bots to have return to the server when menu option Bring Bots Back is used
or console command sc_bring_bots_back is used. Default 8.
sc_maps_list | 0 = mapcycle.txt | 1 = DeagsMapManager mapchoice.ini
- Allows use of default mapcycle.txt or DeagsMapManager mapchoice.ini. This option is for use
with per map configs. Maps that are not listed in either file (depending on mode) will not get
a custom shrikebot.cfg. Be sure to have have all the maps you want listed. Supports up to 255
maps which should be enough but if not, change the first amount for sc_mapcycle or sc_mapchoice
under "Declare global variables and values".
sc_vote_on | 0 = off | 1 = on
- Enables or disables voting to turn bots on. Default on.
sc_vote_off | 0 = off | 1 = on
- Enables or disables voting to turn bots off. Default on.
sc_vote_restore | 0 = off | 1 = on
- Enables or disables restoring of bots when all real players leave. Sets them according to the
max_bots value from shrikebot.cfg. Default on.
sc_vote_time | x
- Specifies how long players have until vote ends. Enter intergers only. 1 = one second etc..
Default 10 seconds
===========================
Installation
===========================
- Copy syns_shrike_control.amxx into your addons\amxmodx\plugins folder
- Add syns_shrike_control.amxx to the bottom of your addons\amxmodx\configs\plugins.ini
- Change the map or restart your server to start using the plugin!
===========================
Installing Into amxmodmenu
===========================
- Add this line >
amx_addmenuitem "Shrike Bot Menu" "amx_shrike_control" "hu" "Syn's Shrikebot Controller"
to your amxmodx\configs\custommenuitems.cfg
===========================
Binding Keys
===========================
- To bind certain options like the menu or quick kick/add all you have to do is bind them to a
key. IE say you want your p key to quick kick all bots. Go into your console and type:
bind p amx_shrike_control_kick
then hit enter and now your p key will quick kick all bots.