PDA

View Full Version : [Windows] Statsgen2



CaptainSlow
14th September 2015, 20:56
Not really a script, but I was unsure in which subforum to post this. Feel free to move it to the correct subforum if it doesn't belong here.

I’m currently in the process of migrating our Call of Duty 2 servers from Linux to Windows. Why? Well, I made a small oopsy which would take me a long time to fix, so I decided to migrate the COD2 servers to Windows, but let’s not go into details. If you must know, my /boot directory was full so I had to clean it up. Accidentally, I deleted the wrong kernel files, so the server didn’t want to boot anymore. Of course I could fiddle around with the rescue option my VPS had, but I was a bit tired of messing around with the command-line.

Anyway, we used to run our Call of Duty 2 servers before on Windows as well, back in 2010. The main advantage of running your COD2 servers on Windows is that you can use Statsgen2, a free statistics generator. Of course one can also use Statsgen2 with your COD2 servers running on Linux. You would just have to (automatically) FTP the logfiles over to your Windows box running Statsgen, but that would require 2 servers, which is silly. So naturally during the migration I decided to go and download statsgen2 from its official website statsgen.co.uk, just to find out that the website no longer exists :-(

Almost every link I tried on Google was dead, but in the end I managed to download a clean copy of statsgen2.zip. Those of you who have used statsgen2 in the past know that you need more than just the program itself; Without the imagepacks, your stats website will look like crap. Finding a working link to the imagepacks turned out to be a real pain in the ass. I couldn’t find a working link anywhere, so I had to use my reverse engineering skills to download the images from stats pages created by statsgen2 in the past. Basically what I did was search on Google for clans still hosting an (old) statsgen2 generated stats page and used DownThemAll to download all images on their stats pages. Doing so, I managed to recreate complete imagepacks for Call of Duty, Call of Duty 2, Call of Duty 4, Call of Duty 5, Wolfenstein: Enemy Territory and the base images (i.e. Home button etc).

According to the official website, archived by web.org, I am still missing the files for other games like MOHAA and Enemy Terrirory: QuakeWars but this was the best I could do. At least you have the files for the complete Call of Duty series and the program itself to get you started J Should you have these files, please email me so I can put them up for everyone else to download.

########################################

Statsgen 2 is a Statistics Generators for Call Of Duty 1/2/4/5, MOHAA, Spearhead, Wolfenstein/Enemy Territory and Quake Wars. Statsgen automatically downloads the server logfiles, processes them using a flexible template system, and then transmits the resultant webpages to the webserver. Templating allows the pages produced to be very flexible to fit in with the style of your clan website. Additionally, it can send messages to your game servers stating who are the top scorers (COD1, COD2, COD4, QuakeWars).

Demo:

Click here for an example statistics page, generated by statsgen2
(http://stats.defeestcommissie.tk/COD2/)

Download:

Latest Statsgen2 Release:
Version 1.9.3 (23 November 2009) – statsgen2.zip (http://data.freek.ws/public/statsgen2/statsgen2.zip)

Image packs:
Basic Statsgen Images – Required for all server types – statsgen2images.zip (http://data.freek.ws/public/statsgen2/statsgen2images.zip)
COD 5 Specific Images – Supplied by Odin – cod5images.zip (http://data.freek.ws/public/statsgen2/cod5images.zip)
COD 4 Specific Images – cod4images.zip (http://data.freek.ws/public/statsgen2/cod4images.zip)
COD 2 Specific Images – cod2images.zip (http://data.freek.ws/public/statsgen2/cod2images.zip)
COD 1 Specific Images – cod1images.zip (http://data.freek.ws/public/statsgen2/cod1images.zip)
Wolfenstein: Enemy Territory Specific Images – wolfensteinimages.zip (http://data.freek.ws/public/statsgen2/cod1images.zip)

Unzip the contents and upload them to the root of your statsgen2 output folder of your webserver.
Note: I am still missing the imagepacks for other games like MOHAA and Enemy Terrirory: QuakeWars but this was the best I could do. Should you have these files, please email me so I can put them up for everyone else to download.

Upgrade files:
No idea what these are for, but I saved them just in case. Personally I’ve never used/needed them.

cod5images.ini (http://data.freek.ws/public/statsgen2/cod5images.ini)
cod4images.ini (http://data.freek.ws/public/statsgen2/cod4images.ini)
cod2images.ini (http://data.freek.ws/public/statsgen2/cod2images.ini)
cod1images.ini (http://data.freek.ws/public/statsgen2/cod1images.ini)
mohaaimages.ini (http://data.freek.ws/public/statsgen2/mohaaimages.ini)
quakewarsimages.ini (http://data.freek.ws/public/statsgen2/quakewarsimages.ini)
wolfensteinimages.ini
(http://data.freek.ws/public/statsgen2/wolfensteinimages.ini)

Installation:

Consult the included README.txt for a quick installation guide. Consult the detailed documentation, which can be found in the help.zip, for more information.
To get you started, it basically comes down to this:

– Create a directory statsgen2 and unzip its contents
Contents should include:
statsgen2.exe
help.zip
libmySQL.dll – This is a library used to connect to MySQL databases (Note: A MySQL compatible template is not included! I could not find a working download link)
statsgen2.ini
readme.txt
upgrade.ini – Upgrade files, used when upgrading from an older statsgen version to the latest one (Never used it myself).

– Run statsgen2.exe – On first run various files / directories will be created including the default templates. This can take a while, please be patient.

– Click on Run –> First Time Configuration – Again, this can take a while. DO NOT CANCEL THIS OR INSTALLATION WILL NOT COMPLETE

– Setup statsgen2 to your liking, upload the corresponding imagepack and you’re done!

Statsgen2 is even compatible with Windows Server 2012 R2! Just make sure to run it in compatibility mode (XP SP2/SP3) with Administrator privileges.
Additionally, I also had to hack together this .bat file, which basically just deletes the database before the stats are parsed. Else, my webpage would have missing data. Deleting the database before the statistics are parsed ensures the database is completely rebuilt from the start instead of being appended, which apparently gives issues on Windows Server 2012 R2. I’ve scheduled this .bat file using Windows Task Scheduler to be run before the stats are parsed:

taskkill /F /IM statsgen2.exe
del “D:\statsgen2\statsgen2.db”
“D:\statsgen2\statsgen2.exe”
exit

Disclaimer:

Statsgen2 is created by Shaun Jackson – nazarine666@hotmail.com
I’ve mailed Shaun and requested permission to re-host the files. Sadly I never received a reply. It’s a great shame as many still use it since no one has created anything near as good.


Source: Originally posted on my blog (http://freek.ws)

IzNoGoD
15th September 2015, 00:08
Could you export an example database?

CaptainSlow
15th September 2015, 21:50
Could you export an example database?

I don't have one at hand right now, but try this one instead :)
http://www.wet4all.com/forum/statsgen2/statsgen2.db
Let me know if it works for you

kung foo man
16th September 2015, 09:32
I sentimentalized over MOHAA with some Google Image screenshots yesterday, visited some pages and looking through some old mods, then suddenly statsgen2 spiked into my view on some old Mod download site:

http://109.70.148.92/AAAAMOHAA/content/statsgen

Dunno if you found that already, but it has two .db files (both some Mega Bytes) in it and even some old MOHAA .log files (14MB), so I guess the uploader just zipped a running copy (which is good to recover some data). The .db files should contain the whole MySQL database layout, though it should also be regenerateable by the statsgen2.exe, Notepad++ found many interesting strings in the binary:



...
CREATE TABLE location(idx integer,id string (32),realname string (100),image string (150))
CREATE TABLE SkillWeights(key string,weight float,realname string,image string)
...


I'm actually not sure how I found this site, was just an left open tab from last evening, so maybe I even found the link in your post and you had all files in there already, no clue, just posting, maybe it helps. ^^

IzNoGoD
16th September 2015, 12:51
I sentimentalized over MOHAA with some Google Image screenshots yesterday, visited some pages and looking through some old mods, then suddenly statsgen2 spiked into my view on some old Mod download site:

http://109.70.148.92/AAAAMOHAA/content/statsgen

Dunno if you found that already, but it has two .db files (both some Mega Bytes) in it and even some old MOHAA .log files (14MB), so I guess the uploader just zipped a running copy (which is good to recover some data). The .db files should contain the whole MySQL database layout, though it should also be regenerateable by the statsgen2.exe, Notepad++ found many interesting strings in the binary:



...
CREATE TABLE location(idx integer,id string (32),realname string (100),image string (150))
CREATE TABLE SkillWeights(key string,weight float,realname string,image string)
...


I'm actually not sure how I found this site, was just an left open tab from last evening, so maybe I even found the link in your post and you had all files in there already, no clue, just posting, maybe it helps. ^^

Same stuff is inside the .db if you open it with an sqlite viewer

was thinking about the possibility of porting this to mysql in native codscript, but motivation is a bit meh