Title: In need of a server bot Post by: hemite on March 15, 2012, 05:06:01 PM Yo,
So I've set up my own little server, and so far everything has been going swimingly. However I saw on the wiki quite a few server administration tools that I would like to try out. What I would really like to do is be able to run a script that roughly does this: If (playersInServer == 1){ say "you look lonely, here's a friend" addbot sarge } From what I learned on the IRC this is not possible natively on the openarena server client. I was told to try Big Brother Bot, but that seems really heavy for what I need my server to do, plus it requires mysql, which I rather not clog my system with. Do you guys know of any lightweight server bots for openarena or possibly a way to run this type of script from the server? Title: Re: In need of a server bot Post by: Gig on March 16, 2012, 02:17:26 AM If you only need to add a bot character when not enough players are in the server, but you don't really need to specify a certain bot or to display a custom message, you may simply use bot_minplayers <min_players_number> instead: that automatically adds and removes bots to fit the min players limit specified (in team-based games, the value refers to each team). Bots are chosen randomly. Skill is selected accordingly to g_spskill value.
(DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Manual/Multiplayer#Commands I'm sorry I can't help you with advanced tools that automatically send messages etc. Title: Re: In need of a server bot Post by: grey matter on March 16, 2012, 11:15:36 AM There are several bots similar to B3 for UrT (http://www.urbanterror.info/forums/topic/23556-server-setup-guide-tools/). Most of them do statistics and bans as well, so they require some sort of database.
If you're on a Unix system, you might script your own, using cron, some rcon tool (e.g. multircon (http://aluigi.altervista.org/papers.htm#q3)) and grep/awk/whatever to parse either /status or use (qstat and) getInfo reply and look at g_humanPlayers. Title: Re: In need of a server bot Post by: hemite on March 16, 2012, 12:37:18 PM Yea the multicron option looks like its the way to go. I originally thought of doing some bash scripting while also using something like sed or grep, but I wasn't sure how to run a script that actively sends a command to the server, and then parses that command.
Also grey matter: Do you have any suggestions on how I would write my own script to interact with the server output? Title: Re: In need of a server bot Post by: GrosBedo on March 17, 2012, 05:50:57 AM If you know a bit of Python, I strongly advise to use Big Brother Bot, it's the easiest way to do what you seek, because a plugin is easy to write for this bot, and it always maintain a lot of infos about the server (number of players currently connected included).
Also, you could simply edit the OAX gamecode to send a message prior to adding bots with bot_minplayers. This would probably be one line of code. But it is not very advised since you will have to make your server unpure. Title: Re: In need of a server bot Post by: hemite on March 18, 2012, 07:49:26 PM Allright, so incase anyone is still wondering I found the perfect solution (for me anyway).
I found this program called crcon: https://sourceforge.net/projects/crcon/ It did exactly what I wanted, which is output commands like "status" and "systeminfo" into bash shell. Now I can run bash scripts using crcon and use sed to parse this information and call commands on the server accordingly. I am still getting some weird errors that I need to figure out such as when I type: ./crcon -p "password" -P 27961 localhost 'status' I get: ???? map: ztn3tourney1 num score ping name lastmsg address qport rate --- ----- ---- --------------- ------- --------------------- ----- ----- And I'm not sure why those question marks are there. I am still trying to figure that out. I think this is a great alternative to big brother bot especially for me. I did not see any refrence to this except in some long forgotten forum post, so maybe I will add to the wiki regarding this program and how to write a simple script with it. I will add to the wiki if you guys think its necessary. Title: Re: In need of a server bot Post by: Gig on March 19, 2012, 02:28:02 AM It's okay for me. I suppose you may write a "crcon" page in the wiki, where you may explain how to use that tool, and then place a link to it in the "tools" section of the "servers" page.
Title: Re: In need of a server bot Post by: grey matter on March 19, 2012, 01:23:48 PM Also, you could simply edit the OAX gamecode to send a message prior to adding bots with bot_minplayers. This would probably be one line of code. But it is not very advised since you will have to make your server unpure. Actually, that's a perfect candidate for a server-side only mod. This won't require any downloads on clients and does not cause any problems with sv_pure 1.The four '?' are start of each OOB text command in Quake 3 (see NET_OutOfBandPrint()), the "print" text which is also included is stripped by crcon. Title: Re: In need of a server bot Post by: GrosBedo on March 19, 2012, 03:28:12 PM Actually, that's a perfect candidate for a server-side only mod. This won't require any downloads on clients and does not cause any problems with sv_pure 1. Yes but the server admin will either have to set sv_allowdownload 0 to avoid clients to autodownload it (which may conflict with their install), or use a trick by setting fs_game to a random name so that the game thinks it's running on a mod, and so it will avoid forcing clients to download pk3 that resides in .openarena(localfolder)/baseoa. I think it should not be advised unless the admin is experienced with "tricking" the engine. But that indeed would be the easiest. I think that reworking the autodownload facility would do a lot of good and allow for such customizations to easily happen. But that's a bit off-topic ;) Title: Re: In need of a server bot Post by: grey matter on March 19, 2012, 03:53:46 PM Just drop vm/qagame.qvm into home or basepath, preferably under baseoa/. No downloads needed. That's how server-side mods work ever since.
Title: Re: In need of a server bot Post by: hemite on March 19, 2012, 09:56:21 PM I have edited the wiki mentioning crcon and linking to its download location. I will add its own separate page to the wiki sometime next week. Also I will make a github repo as a lot of the code can be edited to work better with openarena.
Title: Re: In need of a server bot Post by: Gig on March 20, 2012, 01:56:36 AM Good. :)
Title: Re: In need of a server bot Post by: GrosBedo on March 20, 2012, 05:35:45 AM @grey matter: indeed, you're right, please excuse me for having forgotten this method!
@hemite: good news! Your code will be very much appreciated :) Title: Re: In need of a server bot Post by: hemite on March 20, 2012, 01:40:06 PM Here is the github repo for crcon, everyone feel free to fork.
https://github.com/hemite/crcon EDIT: The wiki page is up: (DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Crcon Title: Re: In need of a server bot Post by: GrosBedo on May 31, 2012, 04:48:17 PM Thank's a lot!
But are you sure that changing this variables does not amper any other function? |