Server Config + Website Monitor (updated for 1.2 patch)

slackX
Posts: 20
Joined: Sat Oct 22, 2005 5:05 am

Post by slackX »

Great cfg/template thx :)

Here is a .pl script I've rewritten which will monitor quake 4 servers using qstat on your web server. I threw it together rather quickly today for someone who was needing it, so please consider it a work in progress.

This script was derived from the late q3mon/qsmon and has now progressed into a full-fledged server monitor & browser.

Live Example (browser & monitor):
Image

Server Monitor Only Example -- For those who only need q4mon to display the status of their server(s):
http://www.qxmon.net/q4mon-spy.pl

You can download the latest version here:
http://www.dev1ance.net/download/

The official $0.10 Readme file: here

Version 2.3b (Feb 15, 2007)
- Replaced autobalance info with si_fps info in browser popup layer. Does anyone really care about autobalance?
- si_tv (q4tv) info added to both browser and spy
- Updated code for compatibility with qstat 2.11.
- Spy now reads, calculates, sorts then displays additional player info (scores, team, status) given to it by q4max mod. gg q4max.
- Added q4 protocol 2.76 (1.4) support.
- Added si_fps info in spy
- Some new eyecandy here n there

Version 2.3a (Nov 18, 2006)
- Added xfire launch support
- Fixed html header on spy
- Added separators and js validation for gametype dropdown selection box
- Added buying mode settings for q4mon queries
- Added napalm launcher icon for ^iw10
- Added q4 protocol 2.71 (1.3) support.
- Added q4 protocol 2.69 (1.2) support.
- Added q4 protocol 2.68 (1.1 Final) support.
- Fixed some 'untidy' html code and hope to have xhtml compliance in the near future. Currently the layers won't work @ xhtml.
- Fixed names that were enclosed in < and > tags that were not being displayed

Version 2.2h (Feb 25, 2006)
- Latest Point Releases added for compatibility (=>1.1)
- Added mod images for the popup layer in browser
- Added optional GeoIP City, Region and ISP
- Added add/remove favs via q4mon-spy
- Added mod url links
- Added more icons to spy
- Added launcher to spy
- Added an 'instant connect' checkbox for the launcher function. This value will be perm saved in a cookie.

Version 2.2b (December 02, 2005)
- Ability to enable/disable GeoIP lookups. It will now run if you don't want to install the GeoIP module/api.
- Fixed continuous scrollbars to be displayed after the server info popup layer became hidden.
- Finally decided to write the ^+ and ^- gradient codes. These colors will now display properly.
- Fixed improperly displayed os. Now calculating info from si_version rather than osmask.
- Added q4 demo listings (protocols 2.64 and 2.66)
- Added find player/clan function
- Fixed improperly displayed weapon icons
- Server 'popup' now shows player names
- Changed layout of search header
- Added the ability to set,store and monitor favorites. (cookies)
- Join server button added. 3 selectable lauchers: qtracker, kquery and hlsw.
- Added GeoIP module to display/search/sort by server country name and to display country flags in results.
- Added server listing query/generation time

Version 2.0a (November 12, 2005)
- browser: Big changes to browser interface
- browser: Added custom server ip/host query form
- q4mon-grey.css stylesheet is useless unless someone wants to skin this new layout. It will still work for q4mon-spy.pl for the time being, so I've included it with this release if that's all you need.

Version 1.1c (November 9, 2005)
- browser: Added a rollover popup box to display server info and map image
- browser: Fixed a few hard coded image urls

Version 1.1b (November 8, 2005)
- Added additional skin/css (q4mon-grey.css)

Version 1.1a (November 8, 2005)
- Fixed a small typo in linking css. Firefox wasn't forgiving.

Version 1.1 (November 8, 2005)
- browser: q4mon browser created from scratch.
- browser: Master server caching script created for the browser
- spy: q4mon-spy (formerly known as q4mon.pl) has undergone a face lift.
- spy: Many more server settings are now displayed in spy.
- spy: New progress-meter'like bar added for current players / max players
- grey css/theme has not been included as I haven't had time to skin the browser yet

Version 0.4 (Nov 2, 2005)
- q4mon will now display a default 'no image' jpeg for servers using maps that don't have a levelshot in images_q4mon.
- Added misc icons for ^ivce ^ivcd ^ifdd ^ifde ^ifls ^iflm ^irgn ^idbl ^igrd ^isct ^ipbe ^idse ^ipse ^ifve ^idm0 ^idm1 and ^iarr.

Version 0.3 (Oct 30, 2005)
- Fixed name coloring function. Names were being displayed incorrectly when using lone ^'s.
- Added optional nametitles to display actual name/clan setting including color codes.
- Added weapon icons for ^iw tags.

Version 0.2 (Oct 28, 2005)
- Added private slots to be displayed based on si_numPlayers - si_maxPlayers.
- Added GET requests for customized server listings.
- Fixed ^c[RGB] -> Hex color conversions.
- Added additional server info. .Administrator .Location .URL
Last edited by slackX on Thu Feb 15, 2007 9:05 pm, edited 45 times in total.
nightwing
Posts: 59
Joined: Wed Oct 19, 2005 12:58 pm

Post by nightwing »

Very nice thanks!

EDIT: I forgot to ask. Should I put a server.cfg in q4base folder or does it go in idsoftware/Quake4 directory? Thanks for the help.
Bueller
Posts: 124
Joined: Tue Feb 22, 2005 3:10 pm

Post by Bueller »

My question is has anyone verified how to make the server not repeat each map twice? I see a couple possibilities in the map.cfg but not sure.
[color=Green]I Root 4 Chaos ![/color]
nightwing
Posts: 59
Joined: Wed Oct 19, 2005 12:58 pm

Post by nightwing »

Forwarded necessary ports but my server is still not showing on the gamebrowser list (public) :confused:
Qr7
Posts: 184
Joined: Mon Apr 09, 2001 7:00 am

Post by Qr7 »

I believe the in game broswer is limited to 1000 servers. So dont be alarmed if it doesn't show up. Ever since the total number of servers became greater than 1000, i haven't seen my server listed at all, but people ARE playing there so i knwo its showing up for someone.

If you wanna play on your server and its not in the list, just bring down the console and "connect IP.IP.IP.IP"
nightwing
Posts: 59
Joined: Wed Oct 19, 2005 12:58 pm

Post by nightwing »

Thank you Qr7 and riddla for your help.

riddla,

I also have an autoexec in the q4base directory. Should I take off the server commands that I already have in there and use the server.cfg instead?

Thanks for your patience guys.
DrWho
Posts: 25
Joined: Mon Oct 17, 2005 2:27 pm

Post by DrWho »

if anyone compiles the win version of q4mon, please let me know.
i am stumped....
Bueller
Posts: 124
Joined: Tue Feb 22, 2005 3:10 pm

Post by Bueller »

Ok, so if I wanted to add a map like q4dm17 (or whatever its called) to the map rotation and also only have DM maps in rotation and each map only plays 1 time per rotation...it would be something like this?

/*
map cycling script sample - select with g_mapCycle

the script is purged and reloaded at each map restart
which happens on map change, but also when hitting GAMEON
for persistance, you need to use the {get,set}Persistant functions

files with .scriptcfg extension can be loaded outside of pure paks
*/

namespace mapcycle {

void cycle() {
// config
float cycle_maps = 1; // 1 = cycle through maps in the current game type, 0 = keep the same map
float cycle_gametypes = 0; // 1 = cycle through game types, 0 = keep the same game type

// cycle maps and game types
float replay_count = sys.getPersistantFloat( "replay_count" );
string si_gameType = sys.getcvar( "si_gameType" );
string si_map = sys.getcvar( "si_map" );

sys.println( "cycle: replay_count = " + replay_count );

if ( replay_count <= 0 ) {
// restart n times before next map
replay_count = 1;

// add in custom replay counts here for current game type
if ( si_gameType == "DM" ) {
;
} else if ( si_gameType == "Tourney" ) {
;
} else if ( si_gameType == "Team DM" ) {
;
} else if ( si_gameType == "CTF" ) {
;
} else if ( si_gameType == "Arena CTF" ) {
;
}

}

replay_count--;
sys.setPersistantArg( "replay_count", replay_count );
if ( replay_count <= 0 ) {
// restart n times before next map

if ( cycle_gametypes > 0 ) {

cycle_maps = 1; // we want to make sure that we transition to a proper map for the new gametype

if ( si_gameType == "DM" ) {
sys.setcvar( "si_gameType", "Tourney" );
} else if ( si_gameType == "Tourney" ) {
sys.setcvar( "si_gameType", "Team DM" );
} else if ( si_gameType == "Team DM" ) {
sys.setcvar( "si_gameType", "CTF" );
} else if ( si_gameType == "CTF" ) {
sys.setcvar( "si_gameType", "Arena CTF" );
} else if ( si_gameType == "Arena CTF" ) {
sys.setcvar( "si_gameType", "DM" );
} else {
sys.setcvar( "si_gameType", "DM" );
}

}

if ( cycle_maps > 0 ) {

if ( si_gameType == "DM" || si_gameType == "Team DM" ) {

if ( si_map == "mp/q4dm1" ) {
sys.setcvar( "si_map", "mp/q4dm2" );
} else if ( si_map == "mp/q4dm2" ) {
sys.setcvar( "si_map", "mp/q4dm3" );
} else if ( si_map == "mp/q4dm3" ) {
sys.setcvar( "si_map", "mp/q4dm4" );
} else if ( si_map == "mp/q4dm4" ) {
sys.setcvar( "si_map", "mp/q4dm5" );
} else if ( si_map == "mp/q4dm5" ) {
sys.setcvar( "si_map", "mp/q4dm6" );
} else if ( si_map == "mp/q4dm6" ) {
sys.setcvar( "si_map", "mp/q4dm7" );
} else if ( si_map == "mp/q4dm7" ) {
sys.setcvar( "si_map", "mp/q4dm8" );
} else if ( si_map == "mp/q4dm8" ) {
sys.setcvar( "si_map", "mp/q4dm17" );
} else {
sys.setcvar( "si_map", "mp/q4dm1" );
}

} else if ( si_gameType == "Tourney" ) {

if ( si_map == "mp/q4dm11v1" ) {
sys.setcvar( "si_map", "mp/q4dm8" );
} else if ( si_map == "mp/q4dm8" ) {
sys.setcvar( "si_map", "mp/q4dm3" );
} else if ( si_map == "mp/q4dm3" ) {
sys.setcvar( "si_map", "mp/q4dm6" );
} else if ( si_map == "mp/q4dm6" ) {
sys.setcvar( "si_map", "mp/q4dm7" );
} else if ( si_map == "mp/q4dm7" ) {
sys.setcvar( "si_map", "mp/q4ctf5" );
} else {
sys.setcvar( "si_map", "mp/q4dm11v1" );
}

} else if ( si_gameType == "CTF" || si_gameType == "Arena CTF" ) {

if ( si_map == "mp/q4ctf1" ) {
sys.setcvar( "si_map", "mp/q4ctf2" );
} else if ( si_map == "mp/q4ctf2" ) {
sys.setcvar( "si_map", "mp/q4ctf3" );
} else if ( si_map == "mp/q4ctf3" ) {
sys.setcvar( "si_map", "mp/q4ctf4" );
} else if ( si_map == "mp/q4ctf4" ) {
sys.setcvar( "si_map", "mp/q4ctf5" );
} else {
sys.setcvar( "si_map", "mp/q4ctf1" );
}

}
}
} else {
sys.say( "map cycle: restarting current map " + replay_count + " more time(s)" );
}
}
}
Last edited by Bueller on Mon Oct 24, 2005 7:11 am, edited 2 times in total.
[color=Green]I Root 4 Chaos ![/color]
Bueller
Posts: 124
Joined: Tue Feb 22, 2005 3:10 pm

Post by Bueller »

Also, if I'm not concerned about getting real involved with the map cycle would it be possible to not use the map script and just use:

//===========
// MAPCYCLING
//===========
seta si_gameType "DM" //gametype
seta si_map "mp/q4dm1" //start with map
seta g_mapCycle "mp/q4dm3;mp/q4dm6;mp/q4dm7;mp/q4dm8" //map rotation
[color=Green]I Root 4 Chaos ![/color]
Bueller
Posts: 124
Joined: Tue Feb 22, 2005 3:10 pm

Post by Bueller »

riddla wrote:I doubt it.
What about my previous reply?
[color=Green]I Root 4 Chaos ![/color]
Bueller
Posts: 124
Joined: Tue Feb 22, 2005 3:10 pm

Post by Bueller »

riddla wrote:I dunno, can you edit it and make the changed parts a diff color? :p
2 locations I changed are green above. My bad. ;-)
[color=Green]I Root 4 Chaos ![/color]
GODLIKE
Posts: 387
Joined: Tue Nov 30, 1999 8:00 am

DM17

Post by GODLIKE »

So far as I know, there's no q4dm17... "The Longest Day" which looks like dm17 is q4dm8.

:icon26:
clkou
Posts: 41
Joined: Wed Oct 19, 2005 1:51 pm

Post by clkou »

I have a ClanServers.Com server and I've got everything to work except rcon. In their config file, they had:

net_serverRemoteConsolePassword "rcon pass here" //change this!

Your file has:

seta net_serverRemoteConsolePassword "rcon pass here" //change this!

I tried both of those plus:

set net_serverRemoteConsolePassword "rcon pass here" //change this!

Nothing works. In the game console, I type:

rcon MyRconPassword

and it says bad rcon

am I using rcon wrong? What else might it be?
- Jason
axbaby
Posts: 3424
Joined: Wed Dec 22, 1999 8:00 am

Post by axbaby »

random ideas with bad guesses
try rcon then your ip then password if q4 is like q3 with remote rcon.

try set rcon password with no quotes

set rcon password in your q4config.cfg
clkou
Posts: 41
Joined: Wed Oct 19, 2005 1:51 pm

Post by clkou »

Well, I'm actually on the server where I have rcon when I'm trying rcon. Do I still have to type in the IP even in that situation?
- Jason
axbaby
Posts: 3424
Joined: Wed Dec 22, 1999 8:00 am

Post by axbaby »

clkou wrote:Well, I'm actually on the server where I have rcon when I'm trying rcon. Do I still have to type in the IP even in that situation?
doubt it .. i'm having trouble with rcon as well
rcon works and the commands get changed but they don't seem to really take effect.
i'm thinking it's because the game i tested was started via quake4 menu and not quake4 dedicated shortcut and server.cfg
Last edited by axbaby on Mon Oct 24, 2005 7:24 pm, edited 1 time in total.
Bueller
Posts: 124
Joined: Tue Feb 22, 2005 3:10 pm

Post by Bueller »

Bueller wrote:Also, if I'm not concerned about getting real involved with the map cycle would it be possible to not use the map script and just use:

//===========
// MAPCYCLING
//===========
seta si_gameType "DM" //gametype
seta si_map "mp/q4dm1" //start with map
seta g_mapCycle "mp/q4dm3;mp/q4dm6;mp/q4dm7;mp/q4dm8" //map rotation
I'm seeing servers on ASE (allows u to view server.cfg in window) and ther aren't using that script for map rotation. They are just listing maps like: seta g_mapCycle "mp/q4dm3;mp/q4dm6;mp/q4dm7;mp/q4dm8"

Something to test for sure.
[color=Green]I Root 4 Chaos ![/color]
PieceMaker
Posts: 899
Joined: Tue Jan 25, 2005 4:43 pm

Post by PieceMaker »

If anyones interested http://www.game-monitor.com supports Quake4.

Quake4World (Official Server)

Looks like http://www.serverspy.net is in the middle of configuring
for Quake4 support. But no server are showing up yet. I'll edit this post
when they do support it.

I like using a clickable link for the server I play on. Simply posting
I'm here -------->Quake4World (Official Server)
R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

Coo Piece, thanks. :icon14:
bigwest
Posts: 2
Joined: Tue Oct 25, 2005 3:18 am

Post by bigwest »

Has anyone managed to get the autodownload setting to work?

I've got a custom map on my server but I can get clients to download the map from a URL.

heres what I have at the moment

set net_clientDownload "1"
set net_serverdownload "2"
set si_serverURL "http://bigwest.f2s.com/"
set net_serverDlBaseURL "http://bigwest.f2s.com/"
set net_serverDlTable "q4base/bliptourney1.pk4"

It asks if you would like to download the file, then says download failed.


http://zerowing.idsoftware.com/linux/doom/AutoDownload

I used this site for the commands.
bigwest
Posts: 2
Joined: Tue Oct 25, 2005 3:18 am

Post by bigwest »

net_serverdownload does work even though its not in the q4 cvar,

"seta net_clientDownload "2" //pk4 download policy 0=none 1=send to DL location 2=present client with available files" <-- That does not work.
Hex
Posts: 190
Joined: Fri Oct 18, 2002 7:00 am

Post by Hex »

for the g_mapCycle questions:

si_mapCycle "mp/q4dm1;mp/q4dm2;mp/q4dm3;"
will cycle those three maps

g_mapCycle "yourcycle" will use the 'yourcycle.scriptcfg' in your q4base.

If use si_mapCycle, g_mapCycle does nothing as far as my testing has shown.

If use g_mapcycle, then include
si_mapcycle ""
in your config to set it null...
R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

Thanks. :icon14:
Hex
Posts: 190
Joined: Fri Oct 18, 2002 7:00 am

Post by Hex »

for the rcon question

in server.cfg have
set net_serverRemoteConsolePassword "rconpass"

then on client.cfg have
set net_clientRemoteConsolePassword "rconpass"

then at client console (while connected to server) type
rcon <command>
no password needed


edit: removed unnecessary = sign. thanks riddla
Last edited by Hex on Thu Oct 27, 2005 12:59 am, edited 1 time in total.
R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

:o!
Locked