Documentation
Updates
Version 1.3:
- Translate Comments to english
- First Public Release Version
- Code Optimization
What is NexuizStats
NexuizStats is a simple PerlScript which generate a Player Stats for the Ego-Shooter Nexuiz.
Simple take a look at live Stats from AnimeArchive.de.
Example Death Match:
http://animearchive.de/service/nexuiz/stats_dm/
Example Key Hunting:
http://animearchive.de/service/nexuiz/stats_kh/
Features of NexuizStats
- Only need Perl
- Generate static HTML Files
- BadWord Filter
- OpenSource, so you can simple modify it for your needs
- Very Fast and need no Database or something
- Can also run under Windows with Active Perl
License and Copyright
* Copyright (c) 2008 Markus Bordihn (markusbordihn.de) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses.
Requirements
Perl
Linux: http://www.perl.com/download.csp
Debian: apt-get install perl
Windows: Active Perl - http://www.activestate.com/Products/activeperl/features.plex
Nexuiz Server Logfile
Its realy needed, no joke. ;)
Can simple turn on in the Server.cfg:
...
log_file server.log // server console output will also be copied to this file
...
Installation
Copy the PerlScript and the Template Folder to your Webserver or also your PC.
Please make sure that the Template Folder and the PerlScript nexuizStats.pl are on the same Location.
e.g:
/home/dummy/nexuizStats.pl
/home/dummy/template/template_dm.htm
/home/dummy/template/template_kh.htm
Run the Script
Simple execute the Script and pass the Gamemode, the Logfile and the SavePath.
e.g for Death Match:
/usr/bin/perl nexuizStats.pl dm server.log /var/www/home1
This will save the Hightscore to the folder /var/www/home1
e.g for Key Hunting:
/usr/bin/perl nexuizStats.pl kh server.log /var/www/home2
This will save the Hightscore to the folder /var/www/home2
Tip:
You can also set the Path in the PerlScript so you can simple run "/usr/bin/perl nexuizStats.pl dm dm_server.log" and "/usr/bin/perl nexuizStats.pl kh kh_server.log".
When you set the Path in the Script you can also run this simpler as CronJob.
Copy Webfiles
You also need to copy the files nexuiz.css and tablesort.js from the folder"webfiles" to your webfolder e.g: "/var/www/home1".
nexuiz.css
Is a example of CSS how you can realise a Player Stats Popup Window only over CSS.
tablesort.js
With this JavaScript from Dietmar Meier ( http://dhgm.de/ ) you can simple sort the Tables over the small Arrows.
So there is no PHP or an Database needed for sorting the PlayerStats.
Please keep in mind that this JavaScript is copyrighted by Dietmar Meier and it is not allowed to used it without his permissions for other tools or orther script.
A big thanks to Dietmar for this wonderfull small and good working JavaScript. ;)
Bad Word Filter
In the Perlscript there is a simple Bad Word Filter, simple insert the badwords and the Player wont appeare in the PlayerStats there will be also complet ignore.
Customs Templates
You can modify the Template in the Way you want, you will see that there are some Placeholder so you can simple change anything and put the Placeholder on the right Place.
Performance
Because Perl is realy fast, you dont get Performance Issue also for large Logfiles.
I have tried Logfile with 200 MB and it was parse in under 7 mins.
The next Release Version will also include a Logfile compressor so that you can store the essential Infos from the Logfile.
So you can safty run this Script 1 per hour when you need such details Infos.
No Perl on your Webserver ?
No Problem, you can simple install Perl on your PC or a friend of you can run this Perlscript.
After then, copy the Output files and the "webfiles" to your Webpage and now you have a Player Stats for Nexuiz.
Next Version ?
The next Version will include some cool Features like, Details Player Stats and also a Vote and Map Stats.
I will also try to support all Characters which you can used in Nexuiz.
What other things to say
Please keep in mind to set the surrounding div to "overflow: auto" to display the content also to user with no JavaScript enabled.
I hope you have fun with it ;)
Greetings,
- Markus B.