VSP extracts statistical and other data from the log files of games and mods based on id’s Tech 3 engine by utilizing MySQL and PHP.
The original application (created by Myrddin) was broken by Excessive Plus 1.03 back in 2005 and therefore I created a fork to primarily support the Quake III and OpenArena Excessive Plus (E+) Mods.
Please note that as of version 1.2, we will no longer support other id Tech 3 engine based games. That is, version 1.2 only supports Quake III Arena, Q3 Team Arena, OpenArena, Xreal (2009 version) and several Mods (BattleMod, CPMA Promode, Excessive Plus, FreezeTag/uFreeze, Lokis Revenge CTF, OSP, Rocket Arena 3, Threewave, and UrbanTerror).
However, you may continue to use version 1.1.1 – VSP 0.45 Excessive Plus Community Edition 1.1.1 (14.0 MB) – which also supports Call of Duty 1, Half-Life 1, Medal of Honor 1/OpenMoHAA, Return to Castle Wolfenstein, Soldier of Fortune 2, and Wolfenstein: Enemy Territory.
To successfully use VSP, your server must have a version of MySQL 5.x and PHP 5.x released in 2009 or later.
You will need to customize the following files to suit your server (i.e., Server name, IP and Port, etc,):
- 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 recommended.
- 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.
Optional Configuration:
- pub/games/q3a/awardsets/default/default-awards.php: Awards definition.
- pub/games/q3a/skillsets/default/default-skill.php: Skills definition.
To see the program in action take a look at the LINKS section (in the sidebar).
Skill system:
The main idea was taking from here: http://www.scivox.net/smf/index.php?topic=574. However, I went further and applied the same concepts for events and team events. This was done in such a way that skill points are now “transferred” among players. That is, the final sum of all the players of the system remain the same at every time.
The purpose of this change is to keep the stats indefinitely without resetting them in some period basis, because the skill of each player is based on the quality of the opponents he plays against, not the quantity of frags he makes.
All skill configuration is located in the default-skills.php file. The first 2 parameters are the mean and variance for the logistical distribution used to compute the probability of winning. When a new player is encountered, he is given the value of the mean, and his skill changes depending of the type of event he plays on.
For frag events, the most basic example, you compute the probability of the killer fragging the victim with both players skills as parameters along with the variance, like this:
prob_winning = 1/(1+e^((loser_skill-winner_skill)/variance)).
Then, the the killer gets his skill points increased in (1-prob_winning)*weapon_factor, and the victim skills decrease by the same amount. Use of negative weapon factors are allowed, so if you decide that killing someone with the grapple (to say an example) is lame you can penalty the killer for making a frag. The good thing about the system is that if you kill someone with higher skill points than you, you’ll get more skill points, but if you keep fragging noobs, your skill points will increase very little.
For normal events (thaw, ctf events, suicide, teamkills, item pickup, ammo pickup, weapon pickup and a few more), a variant of the above calculation is used: you (the player to which the event is awarded) get skill points increased (or decreased in case of negative values, i.e. for suicides of team kills) by the same (1-prob_winning)*event_factor, using the average skill level of the enemy team in the probability calculation, and the same points are subtracted (or added) to the enemy team, making individual calculation for probability of losing against you to calculate how much will actually be subtracted (or added) to each player of the enemy team, so that the sum of the amounts are the same that will be increased (or decreased) to your points. Also, if the enemy team has less players than the winner, the skill points you’ll earn will be reduced by the factor players_of_loser_team/players_of_winner_team, so that the points are more carefully awarded on unbalanced teams. However, the opposite is not true: you won’t earn more points if the enemy team has more players than your team.
Team events are events that affects the entire team. They are only three: score (for round based and flag gametypes only, i.e. all team gametypes except team deathmatch), wins, and loses. They all are fired at the end of the match. The points are increased/decreased for every one of the team (even players that left earlier in the game or players that switched sides in the middle of the game) using the system explained in the previous section, and multiplied by the amount of events (wins and loses will always be one per game, but not for score). Also, team unbalance penalties/rewards are applied.


Greetings,
I am trying to parse the logs and am getting several errors. Running PHP Version 5.4.4 with MySQL 5.5.25a.
—————————————————————————–
vsp stats processor (c) 2004-2005
version 0.45-xp-1.1.2
vsp by myrddin (myrddin8 AT gmail DOT com)
—————————————————————————–
max_execution_time is 0
[command-line options]: Array
(
[parser-options] => Array
(
[gametype] => xp
[savestate] => 1
)
[prompt] => 1
[log-gamecode] => q3a
[log-gametype] => xp
[logfile] => C:\Users\Biostar\AppData\Roaming\Quake3\excessiveplus\mp_games.log
[config] => pub/configs/cfg-default.php
)
Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\vsp\vsp.php on line 1452
Populating ip to country table…done
[parser options]: Array
(
[savestate] => 1
[gametype] => xp
[backuppath] =>
[trackID] => guid
[xp_version] => 200
)
savestate 1 processing enabled
Analyzing game 0001 (00.15%) warmup game, ignored
Analyzing game 0002 (00.36%) warmup game, ignored
Analyzing game 0003 (00.79%)
Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\vsp\vsp-q3a.php on line 538
Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\vsp\vsp-q3a.php on line 538
updating database…
Error: Table ‘vsp.vsp_gamedata’ doesn’t exist
Query: REPLACE INTO vsp_gamedata (gameID, name, value) VALUES (136634655492897300, ‘_v_time_start’, ’2013-04-18 21:07:08′), (136634655492897300, ‘_v_map’, ‘q3dm3′), (136634655492897300, ‘_v_game’, ‘q3a’), (136634655492897300, ‘_v_mod’, ‘excessiveplus’), (136634655492897300, ‘_v_game_type’, ’0′), (136634655492897300, ‘_v_players’, ’1′), (0, ‘last update time’, ’2013-04-19 06:42:34′), (0, ‘vsp version’, ’0.45-xp-1.1.2′)
Any ideas?
Fragenstein,
I believe the issue stems from your version of PHP. Starting with PHP 5.3 many older PHP commands were deprecated. VSP still works albeit with daily log errors. I have not used PHP 5.4+ but I know that even more commands were deprecated which would have exacerbated the problem and perhaps even severed compatibility. No code work has been done on our version of VSP since 2009, only minor additions like updates to the IPv4 database . That’s because WASP.Beast became inactive. We started doing some automated PHP 5.3+ compatibility testing (http://techblog.wimgodden.be/2010/06/24/automated-php-5-3-compatibility-testing-for-your-old-code/) but we have a way to go as no one in the Clan who is interested in the project is proficient with PHP.
However, I am willing to do an independent verification for you. If you can send me your config files for VSP (be sure to remove your passwords) and a log file. I can test them under PHP 5.3 to see if they work. If they do the culprit is indeed version 5.4 and in that event you can choose to have dual versions of PHP installed to deal with the issue.
Contact me via E-Mail (Killer@GoQuake.com) and we’ll resolve the issue one way or another.
Hi
What does this mean
error: cannot establish database connection or database vsp does not exist
many thanks
Hello Supersin66,
You should have a detailed e-mail from me (killer@goquake.com). Contact me via e-mail if you have further issues. Since others may be reading this, this error message usually presents itself when no MySQL DB has been created, or created but not linked to a user with sufficient permissions, or to the incorrect port, or to name of the DB. Note if you create a MySQL DB on a shared host like HostGator and most hosting sites, the name of the DB will almost always include your site name. So, if you create the DB as VSP02 it may be actually be SiteName_VSP02 (check your Management Panel, i.e., cPanel, Plesk, etc., for more info).
I am running an Openarena server on a dedicated XP machine. The logs are copied over to a linux/apache webserver, where they are processed.
VSP is not importing the games.log right. when there’s a log with several played maps, the timestamp for each maps starts at 0:00, so from only one map is imported and the rest is ignored. Is there a way to overcome this?
Jopelepoop,
What version of VSP, OpenArena, PHP, MySQL are you using? Also, is the log file from baseoa (Regular OpenArena) or are you using a Mod like AfterShock? I know that Regular OA (baseoa) does not track country info and I believe there is an issue with the time as well. I will look into the time issue while I wait for your response.
WASP.Killer
Hi WASP.killer,
I figured it out, had to set the following to ’0′
$cfg['parser']['check_unique_gameID'] = 0;
Anyway thanx for your help
Hello Wasp.
I install the VSP Stats on my Webserver. But i want load the vsp.php, always say’s:
Web Access to vsp.php is currently disabled.
If you want to enable web access to vsp.php,
look in password.inc.php under your vsp folder using a text editor(notepad).
Read the ReadME.txt file for additional information.
Im change the PW .. whtas wrong..? can u help me please.
GreetZ iLoWa
It needs to be at least 6 characters long.
I do it, my password is longer at 6 characters.
But i dont understand why doenst work. :-(
Is it possible to combine stats from 2 servers in one global stats.
I don’t see why not but there is no automatic method to do so from VSP itself.
Your best options would be to merge the game logs and then have MySQL update from that combined log
OR
merge two separate MySQL DBs.
In both scenarios, you will probably want to write a script/batch file or use a Macro Recorder to have this run prior to your normal CRON Job/Scheduled Task update for VSP.
You can use a free text merging utility like AptDiff or WinMerge (native Windows apps but both run fine in Linux with WINE) or perhaps it might be simpler to use a file joiner (although I am not sure how the VSP “SaveState” feature will work when dealing with log entries that may not be time sequential anymore).
Remember to make a backup of your MySQL DB prior to testing this for the 1st time.
Good Luck and Happy Fragging.
Hello,
I’m also using the W:ET game, I tried to remove that flag sections from files, but it still doesn’t work. Any suggestions?
Regards,
Annoyer13′
Please contact Guillaume, the Admin of this VSP Site – http://openarena.iroqwa.org/vsp/pub/themes/bismarck/index.php – regarding commenting out the Flag Sections.
His E-Mail address can be found on the sidebar of his site here: http://iroqwa.org
Nice work Beast, well done.
Our Borg team CTF vsp stats link,
http://85.17.90.133/stats/pub/themes/bismarck/
I will update the stats to 1.1.1 soon when i have time.
Faster of Borg
Relic,
The Country Flag option can only work if the WET log file captures the Players IPs. My guess is that the WET log is similar to the log file for regular OpenArena (baseoa) which also does not support this feature and so the next version (sometime in July) of our VSP will include a simple way to exclude that column.
If you cannot wait for the next release, you can do like Guillaume, the Admin of this VSP Site – http://openarena.iroqwa.org/vsp/pub/themes/bismarck/index.php – and comment out the Flag Sections in the index.php and playerstat.php files.
The original VSP – http://www.scivox.net/vsp/ – supported other games based on Quake I/II/III engines like Call of Duty, Half-Life, Medal of Honor, Return to Castle Wolfenstein, Soldier of Fortune 2, and Wolfenstein Enemy Territory.
I have asked Beast to remove these from the pub/games directory in the next E+ version of VSP as I don’t think he plans to support them. At least, not unless other PHP programmers offer to assist in this project. If you or anyone in the WET world would like to assist just post here.
Since we do not play those games or have access to their log files we don’t know how or if they work with all the ExcessivePlus (E+) modifications that we have done.
Without additional assistance, we only intend to support the E+ logs that are generated on Quake III, OpenArena, IoQuake3, Xreal, and, also the baseq3 and baseoa logs for regular Q3 and regular OA.
nice to see this work as I use vsp stats regulary. How can i get the country flag to my working vsp site?
nice update to vsp stats. Is it possible for me to get the country flag for my existing vsp stats installation? We play WET but if im not wrong log format is the same?
Link to DeeX’s Stats http://173.30.190.58/deexstats/
Dakini,
Your Stats Site for DeeX Freeze Orgy was already listed. Did you mean to list one of your other servers?
Another on-line stats with OpenArena baseoa: http://openarena.iroqwa.org/
- No country flags (because no ip address in the openarena default baseoa log file)
- No valid timestamps (because no valid timestamps in log file and ServerTime don’t exist at server startup); start from 1971 (UNIX time :D)
Sorry for not replying earlier. For the country flags i added a variable on settings.php to deactivate them (havent released it tho), but im not sure what to do with the server timestamps.
I have the same problem with timestamps.
But I can’t find any solution either.
I think the problem is the OpenArena server in UNIX. Are you running what version? (here 1.8)
FrageMall,
I assume you mean OpenArena 0.8.1 (the latest version). Yes, that is the version we use on our 5 OA servers.
And yes, the problem is with the crappy log file that baseoa creates.
The ExcessivePlus log file contains much more info than the OpenArena baseoa log file. For example, it captures a players IP address which permits location identification to be made based on an IP GeoGraphical DB.
What I find strange is that OA is based on Q3 but the baseq3 log file does not have (to my knowledge) the same time-stamp issue. So, perhaps it is some bad coding decision by the OA Developers.
Hi,
when I try to run vsp.php (http://www.mywebsite.net/vsp.php or http://www.mywebsite.net/vsp.php?mode=web) i get this error:
Parse error: syntax error, unexpected ‘=’, expecting ‘)’ in /web/htdocs/www.wolfenstein-et.net/home/ww2/vsp.new/vsp.php on line 435
What I have to do?
Sorry, could not reproduce it.
Beast,
I don’t think he plays Q3 or OA. It looks like he plays Wolfenstein Enemy Territory.
GreekM4dN3ss!,
The original VSP supported other games based on Quake I/II/III engines like Call of Duty, Half-Life, Medal of Honor, Return to Castle Wolfenstein, Soldier of Fortune 2, and Wolfenstein Enemy Territory.
I have asked Beast to remove these from the pub/games directory in the next E+ version of VSP as I don’t think he plans on supporting them. At least, not unless other PHP programmers offer to assist in this project.
Since we do not play those games we only intend to support the E+ logs that are generated on Quake III, OpenArena, IoQuake3, Xreal, and, also the baseq3 and baseoa logs for regular Q3 and regular OA.
Also, that path for VSP is wrong. The error points to
http://www.wolfenstein-et.net/home/ww2/vsp.new/vsp.php
but the correct path is
http://www.wolfenstein-et.net/ww2/vsp.new/vsp.php
Version 1.1.1:
- Added parser option: xp_version. Must be an integer containing the excessiveplus log version to be parsed, i.e. 103, 104. Default value is 103.
- Fixed special characters for both 1.03 and 1.04.
- Removed writing of temporary log file for non-1.03 version (bug is fixed on 1.04beta4).
http://wasp.goquake.com/vsp/vsp-0.45-xp-1.1.1-full.zip
Beast,
Perhaps you should make some “update” downloads so that ppl can update from a lower version to a higher version without downloading the most recent full download.
Version 1.1
- Fixed some charset problems and set utf8 as the charset – no more fucked up names.
- Added first and last seen fields to player profile based on the start time of the games they played.
- Added country flags. Using http://software77.net/geo-ip/ as the ip to country table.
- Added ip2country table and fields configuration options so multiple vsp installations can share the same table and it also can be on another database.
- Added use_most_used_playerIP config option so if set to 1 the country displayed is from the most used ip, or the last ip if set to 0.
- Replaced baseq3 maps screenshots with new 1.04 screenshots.
- Added icons for thaws and shame hall rewards by dakini.
- Fixed possible negative skill problem.
- Optimized database inserts.
You will have to reparse the log files and apply all your configurations over a fresh install because lots of files are changed. Main post link updated to latest version.
http://wasp.goquake.com/vsp/vsp-0.45-xp-1.1-full.zip
2 more stats =)
http://camel.net.pl/xstats
http://camel.net.pl/ssoul
Version 1.0.2
1.0.2
- Slightly changed formula for skill calculation.
- Tweaks on the skill file definition.
http://wasp.goquake.com/vsp/vsp-0.45-xp-1.0.2-full.zip
Version 1.0.1
- Improved accuracy awards calculation.
- Fixed double guids for players.
- Corrected some locale-related bugs.
- Added skin by fest.
http://wasp.goquake.com/vsp/vsp-0.45-xp-1.0.1-full.zip
I briefly looked at the top 20 player on the DeeX Stats and I did not see any glaring discrepancy in how you have the Players Stats weights assigned.
The Awards have never seemed difficult to rank but there has been a major improvement in the calculation of the Player Skills and the assignment of rank from when we first started to test this.
Nice Job.
Is there anyway to take out Grenades from parsing anymore?
Cuz , we only use them for jumps… not for killing
Best Regards.
Fest.
What you want is a custom filter. Those are in pub/configs/cfg-default.php, starting from line 143. So, to disable grenades kills you should add a line like this:
$cfg['data_filter']['events']['kill']=”/^GRENADE/”;
However, if you want to disable grenade acc stats, then add this line instead:
$cfg['data_filter']['events']['accuracy']=”/^GRENADE/”;