VSP ExcessivePlus Edition

77 replies [Last post]
lagstard
Developer (retired)
rabusmar's picture
Offline
Joined: Jan 2008
Posts:

VSP is an stats generator system by parsing q3 log files. However, it's been broken since excessiveplus 1.03 back in 2005. So, I've been working for like 10 days on this:

VSP 0.45 ExcessivePlus Community Edition 1.2 - 12.9 MB - md5: c879903d0b69a6fb6a43ce8f71718461
VSP OpenArena Media Pack 1.2- md5: a097488be3ae5b478e2d4083d04b42f1

The first contains an all-in-one pack of vsp with several fixes and improvements - read the readme-xp.txt file for more details. The second contains the media (players and standard maps images) for an openarena server.

For customization for your own server, you have to look forward the following files:

- pub/configs/cfg-default.php: Connection to database, ftp (if any), general options for your site and several options for the parser.
- pub/include/playerBanList-default.inc.php: List of banned players - not recomended.
- pub/include/playerExcludeList-default.inc.php: List of excluded players.
- pub/themes/bismarck/skins/*: Skins of the theme.
- pub/themes/bismarck/all.inc.php: Portions of the site presents in all the pages: header, footer, menu, credits, etc.
- pub/themes/bismarck/settings.inc.php: Some settings that affects the pages.

Advanced configuration:
- pub/games/q3a/awardsets/default/default-awards.php: Awards definition.
- pub/games/q3a/skillsets/default/default-skill.php: Skills definition.

To take a look at how the stats looks like, you can refer to WaspKiller servers stats:

Player Stats

-------------------------------------------------

All that said, there is one thing I'm not completely satisfied with: a balanced skills definition file. The file i add in the pack contains all weapons and events factors available, and the parameters for the logistical distribution. I only add factors for standard weapons kills, ctf events, thaws and - as a pilot test - team scores, but there are plenty options available. However, i don't recommend to use the ones marked with "inaccurate", because they come in batches and the first players processed are more affected that the last ones. Also, i think that some events - mainly team ones - are not too suited for public servers because of unbalanced teams, players leaving early or switching teams, etc. For a brief explanation of the skill system, refer to the readme-xp.txt file.

Any suggestions are welcome.

Regards,

WaspBeast

Había una vez un barco chiquito...

lagstard
Developer (retired)
rabusmar's picture
Offline
Joined: Jan 2008
Posts:
VSP ExcessivePlus Edition

Someone move this post to "server setup & configuration help", posted here by error Tongue

Había una vez un barco chiquito...

Laktos
Trollet's picture
Offline
Joined: Apr 2006
Posts:
VSP ExcessivePlus Edition

Nice Happy It was always a pain to get vsp to process e+ logfiles + name problems. Keep it up!

Alla blå bär är blå bär - även blåbär - men det är bara blåbär som är blåbär.
A cloud pooped out a rainbow turd.

cml
Forum moderator Rank moderator
camel-xp's picture
Offline
Joined: Mar 2006
Posts:
PL Poland
VSP ExcessivePlus Edition

[code:1]Fatal error: Call to undefined function sys_get_temp_dir() in /var/www/vsp/xp103_compat.inc.php on line 24[/code:1]

and

[code:1]Fatal error: Call to undefined function remove_xp_tmp_logfile() in /var/www/vsp/vsp-q3a.php on line 157[/code:1]

it happening when I am using vsp.php?mode=web

first error is when I want to use
-q3a-xp

second with
-q3a

Also, How do I update stats automatically ?

lagstard
Developer (retired)
rabusmar's picture
Offline
Joined: Jan 2008
Posts:
VSP ExcessivePlus Edition
The Camels Clan wrote:

[code:1]Fatal error: Call to undefined function sys_get_temp_dir() in /var/www/vsp/xp103_compat.inc.php on line 24[/code:1]

and

[code:1]Fatal error: Call to undefined function remove_xp_tmp_logfile() in /var/www/vsp/vsp-q3a.php on line 157[/code:1]

it happening when I am using vsp.php?mode=web

first error is when I want to use
-q3a-xp

second with
-q3a

You have to use the first way - q3a-xp. With the second one the stats won't be parsed as they should. The fatal error is because the version of php you are using is < 5.2.1, which is the fist version that seems to support that function. I attach the 2 files you need to modify to get rid of both errors (the latter won't affect excessiveplus, but it shouldn't appear anyway for compatibility with other q3 mods). I also updated the zip packages.

The Camels Clan wrote:

Also, How do I update stats automatically ?

You can make it several ways (all using crontabs):

1. If you want something easy, VSP has support for plain ftp. Just make the log be an ftp url and it will be downloaded to ftplogs every time the command run, so the crontab will be something like this:

/usr/bin/php /path/to/vsp.php -n -l q3a-xp -p savestate 1 ftp://server_ip/path/to/quake3/excessiveplus/games.log

Notes:
- The -n option is needed for unattended updates.
- The savestate option is needed so that vsp remembers where the parsing stopped the last time and can continue from there.
- Specifying the full paths for both php and vsp.php can solve some problems, so its better that way.

2. If you want more security (ftp is not a really safe protocol), you can alternatively make a crontab in the q3 server to put the file in a directory of the web server (or a crontab in the web server to grab the file from the q3 server) and after that parse it with the vsp.php on the web server.

Note: The log file will increase it's size quite fast, so if you don't want to be sending a really big file every time and only the new parts will be parsed because of the savestate option, you can clear your log file every once in a while. What killer does i think is a crontab in the q3 server where he:
a) Shuts down the q3 servers
Cool Sends the final log to the http server, and then it is parsed
c) Archives the log file in the q3 server
d) Clears the q3 log
e) Restarts the q3 server

Había una vez un barco chiquito...

lagstard
Developer (retired)
rabusmar's picture
Offline
Joined: Jan 2008
Posts:
VSP ExcessivePlus Edition

As i stated in the main post, after some testing with deex freeze stats, the skill definition file is not the best one for a production environment: it's too sensitive for goods and bad player performance.

I made a more conservative skill definition file, with factors reduced to half and variance increased in 50 % so its less sensitive now. I also updated the files on the packages. However, I'm still not convinced about it as a definitive version.

Había una vez un barco chiquito...

WASP*KILLER
Killer's picture
Offline
Joined: Feb 2005
Posts:
VSP ExcessivePlus Edition
The Camels Clan wrote:

...it happening when I am using vsp.php?mode=web

...

Also, How do I update stats automatically ?

My setup is probably a bit more complicated than most will need to be
because I don't run the game servers and the web server on the same PC
or the same OS. Everything is automated and none of my Q3 and OA game servers are shut down during this process.

My Setup:

Game Servers run on Windows Virtual Private Server.

A TaskManager job runs Bitvise Tunnelier (free) every 6 hours to
transfer six logfiles via SFTP (ssh) to a Linux Web Server.

The batch file that TaskManager calls:

@ECHO OFF
C:
CD\
CD utils\bvt
sftpc -profile=vsp.tlp -cmdFile=vsp.txt

The vsp.txt batch file:

cd public_html/30vsp/ftplogs
put -o c:\game\oa\tag\excessiveplus\games.log
cd..
cd..
cd 40vsp/ftplogs
put -o c:\game\oa\tdm\excessiveplus\games.log
cd..
cd..
cd 50vsp/ftplogs
put -o c:\game\q3\dhf2v2\excessiveplus\games.log
cd..
cd..
cd 60vsp/ftplogs
put -o c:\game\q3\dhf\excessiveplus\games.log
cd..
cd..
cd 70vsp/ftplogs
put -o c:\game\oa\ctf\excessiveplus\games.log
cd..
cd..
cd 80vsp/ftplogs
put -o c:\game\oa\ffa\excessiveplus\games.log
cd..
cd..
quit
exit

Then a CronTab job on the Linux PC runs ten minutes later, synchronized
with the 4 times per day that the files are transfered:

However unlike Beast's recommendation I don't use the -n parameter. I get
an e-mail after every cron job that includes the results so I would know
if it failed.

The Cron job will look like this:

#!/bin/bash

/usr/bin/php /home/goquake/public_html/30vsp/vsp.php -l q3a-xp -p savestate 1
"/home/goquake/public_html/30vsp/ftplogs/games.log"

/usr/bin/php /home/goquake/public_html/40vsp/vsp.php -l q3a-xp -p savestate 1
"/home/goquake/public_html/40vsp/ftplogs/games.log"

/usr/bin/php /home/goquake/public_html/50vsp/vsp.php -l q3a-xp -p savestate 1
"/home/goquake/public_html/50vsp/ftplogs/games.log"

/usr/bin/php /home/goquake/public_html/60vsp/vsp.php -l q3a-xp -p savestate 1
"/home/goquake/public_html/60vsp/ftplogs/games.log"

/usr/bin/php /home/goquake/public_html/70vsp/vsp.php -l q3a-xp -p savestate 1
"/home/goquake/public_html/70vsp/ftplogs/games.log"

/usr/bin/php /home/goquake/public_html/80vsp/vsp.php -l q3a-xp -p savestate 1
"/home/goquake/public_html/80vsp/ftplogs/games.log"

The only time I have done anything manually is when I was doing the daily testing with Beast and needed to clear the DB via the web (-a clear_db).

Recommendation: I would archive or delete the logfiles after a week if your server is very popular. Also, when updating via the web as opposed to Taskmanager/Crontab the size of the logfile can cause the update process to require more than 1 attempt to complete. Try to automate these functions if possible.

PHP version: 5.2.9
MySQL version: 5.1.30

cml
Forum moderator Rank moderator
camel-xp's picture
Offline
Joined: Mar 2006
Posts:
PL Poland
VSP ExcessivePlus Edition

Thx for updates, everything works good now, I started stats for 1 of my public servers, link below:

.AIM[+] FREEZE PUBLIC SERVER. - 94.23.45.132:27960 - CLICK FOR STATS

and heres the CPU consumption:

Pentium Dual-Core E5200 @ 2.50GHz
watch it here

log that I updated had 130mb, and it used some space on hd for mysql db too.

Stats are update every 24 hours at 5:30 AM.

I had problem when I was generating starts for first time with -n command, so i dont use it, cuz stats were not updated completely, dunno why Happy
(maybe its cmd only for updates? Laughing

lagstard
Developer (retired)
rabusmar's picture
Offline
Joined: Jan 2008
Posts:
VSP ExcessivePlus Edition

Nice. Just one suggestion, increase $cfg['display']['record_limit'] variable in pub/configs/cfg-default.cfg to 100 or 200, because advancing in 30's is tiresome for such a big number of players.

Había una vez un barco chiquito...

lagstard
Developer (retired)
rabusmar's picture
Offline
Joined: Jan 2008
Posts:
VSP ExcessivePlus Edition

Había una vez un barco chiquito...

cml
Forum moderator Rank moderator
camel-xp's picture
Offline
Joined: Mar 2006
Posts:
PL Poland
VSP ExcessivePlus Edition

well first one is good, cuz me and 2 of my brothers are playing on same pc, ip & cdkey, second guid as u see is using by many peoples so userdb is scrambled Happy