The program parses Unvanquished games.log and stores the extracted information in a database. Then it can be viewed through a set of PHP pages.
It is derived from Tremstats Too.
From Tremstats Too:
Version 2.0.0 adds the computation of individual players' skills based on the TrueSkill algorithm.
Version 2.1.0 adds two separates skills for games played as a human and for games played as an alien.
Version 2.2.0 renames all references to the term TrueSkill to avoid legal issues.
Version 2.3.0 hashes QKEYs so that they cannot misused. It upgrades the database automatically. Note that the database becomes backward incompatible.
You need at least the following things for the Unvanquished server:
- Python 2.6
- Site-Packages: (common .deb or .rpm package name)
- MySQLdb (python-mysqldb or MySQL-python)
- Python Imaging Library "PIL" (python-imaging)
And the following things for the webserver (may be the same box):
- MySQL 4.1 or higher
- PHP 5.1 or higher
- php-gd (php module for gd graphics library)
A server running:
- Unvanquished
Note: Windows specific code has been removed from the log parser, this plus the lack of any testing whatsoever on Windows almost guarantees that you will need to fix unvstats.py if you plan to parse logs on a Windows platform.
By default everything is enabled for viewing from the web, including player chat and name aliases.
You may wish to protect some of your player's privacy by disabling the PRIVACY options in web/core/config.inc.php by setting them to '1'.
To make it slightly easier, a setup.sh script is included which will walk you through setting up the initial database config files. (needs bash)
First you have to setup your MySQL database. So create a new database or change to an existing one. Then execute both of the SQL files structure.sql and data.sql.
Now copy all files from the parser directory to a directory on your Unvanquished
server, for example /usr/local/games/unvstats/. Then give the mainfile
execute rights by typing chmod a+x unvstats.py
.
Then copy config.py.default to config.py, open config.py in your prefered
texteditor and edit the first few lines and enter your MySQL data and location
of the games.log and all your custom maps PK3s. After this part is done, you
may parse your log which was created so far by typing ./unvstats.py
.
You may want to parse your logfile every 12 hours or something like that. (as your database gets bigger, calculating stats will take more time, so try to avoid parsing more than once or twice a day unless you have processing power to spare -Rezyn ) If you use crontab, you can enter the following line into /etc/crontab:
0 */12 * * * root /usr/local/games/unvstats/unvstats.py
For further information about crontab, see Google.
Now, as you have setup all important things, you also want to see some output.
So copy all files from web to a directory reachable from the internet. Copy
the file core/config.inc.php.default to core/config.inc.php, edit
core/config.inc.php and enter your MySQL data here again. The last setting in
this file is the address of your Unvanquished server. This should be something
like localhost:27960
or an external address. If you have done this step, you
have done everything. Have fun with Unvstats!
unvstats.py offers you some nice features. Type unvstats.py --help
for
more information.
The output system is written very simple. If you want to just change the colors, you may edit the CSS file. If you want a bigger change to the layout, you can change the template files in the template directory. They are written in PHP, so you don't have to learn any complicated template system syntax. Even if you don't know PHP but HTML, you will understand the really simple syntax used there.
If you change the colors background behind the graphs, you may also edit the _graphs.php file and set the colors there.
I want to thank Ingar, who supported me with a lot of knowledge about linux and helped me to test the parser several times. He also patched Tremulous for me.
Then I want to thank WolfWings, who wrote the patch for Tremulous, very good work.
Also a big thanks to Gilmor, who found the cause for this nasty bug of unlogged kills and destructions and also to DigiFad, who submitted a patch for windows.
At this point, thanks to Basilisk for the really great icons!
At least I want to thank all users in #tremulous, who helped me with some small information and gave me lots of tips. Your are the best!
Contact us at the github project webpage. Do not contact Rezyn, DASPRiD or Petr about problems with this Tremstats fork.
- Name: Petr
- Website: https://github.com/ppetr/tremstats
- Name: Rezyn
- E-Mail: [email protected]
- Website: https://rezyn.mercenariesguild.net
- IRC: find me in #tremulous on freenode.net
Original tremstats release by DASPRiD
- Name: Ben 'DASPRiD' Scholzen
- Jabber: [email protected]
- ICQ: 105677955
- IRC: #DASPRiDs @ quakenet
- E-Mail: [email protected]
- Website: https://www.dasprids.de