• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

[Mod] Server Extension Webpage

matttthias

FNG / Fresh Meat
Mar 5, 2010
174
10
0
Austria
www.team-gmk.com
I made a little java program to extract the playerstats and save them to a database and also a webpage to view the stats.

What you need to run this:
  • Server Extension Mod from marco running on your server
  • computer where you can execute the java program
  • mysql-database (5.5 or higher)
  • a webspace or something like this with php
MySQL:
Create a new database with any name you would like (you will have to enter this name into the config files later).
Import the kf2stats.sql which you can find in the uploaded ServerExtWebMod.rar.

PHP:
Open the Webpage/secret.php and enter:
  • hostname at $mysql_host
  • port which will be used to connect to the MySQL server at $mysql_port (3306 is the standard port)
  • username to access the MySQL server at $mysql_user
  • password to access the MySQL server at $mysql_pass
  • database name which you created at the beginning at $mysql_db

To show the webpage use .../kf2stats.php?page=0&count=25

Java Program:
Open the USAConverter.ini and enter:
  • directory where your .usa file are at Directory (always use \\ for the folders instead of a single \)
  • hostname where your MySQL server runs at Hostname
  • port which will be used to connect to the MySQL server at Port (3306 is the standard port)
  • username to access the MySQL server at Username
  • password to access the MySQL server at Password
  • database name which you created at the beginning at Database
  • how frequently it should update the database at UpdateTimer in seconds (default here is every hour).

DON'T CHANGE LastUpdate. It saves the time when the database was updated so it only updates active users next time.

The initial run when i tested it took around 8 minutes for over 3000 users with 9000 stats and 4000 traits. (run locally where the database is hosted)
Drastical performance update: initial run took only 22 seconds for 2000 users with 10000 stats and 6000 traits. (run locally where the database is hosted)

Spoiler!

Spoiler!


V3:
Spoiler!

V2:
Spoiler!

V1: Released.

IF YOU ALREADY SETUP AN OLDER VERSION DON'T OVERWRITE THE "secret.php" AND THE "USAConverter.ini" OR YOU HAVE TO ENTER YOUR USER, PASSWORD,... AGAIN.

Download: here

Github Repo: https://github.com/j1gs4w/USAConverter

Known Issues: Players information like Playername are never updated once they are in the database.

Credits:
OldSchool - for sharing the stat files from his server.
Sheep - for sharing the stat files from his server.
Marco - for the Server Extension Mod.
 
Last edited:

j0s3ph

FNG / Fresh Meat
May 1, 2015
44
0
0
this mod is so exciting to me but i cant figure out the stupid java part. I installed the latest: Java SE Runtime Environment 8 from here: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

then i received a registry error here:

Code:
C:\Users\anicow\Downloads\ServerExtWebMod>java -jar C:\Users\anicow\Downloads\Se
rverExtWebMod\USAConverter.jar
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'

has value '1.8', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
ok, version mismatch, so then i changed the CurrentVersion to 1.7 and received this error instead:

Code:
C:\Users\anicow\Downloads\ServerExtWebMod>java -jar C:\Users\anicow\Downloads\Se
rverExtWebMod\USAConverter.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: j1gs4w/ddns/n
et/USAConverter : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
so now i dont know what to do, please to be helping me fix?
 

matttthias

FNG / Fresh Meat
Mar 5, 2010
174
10
0
Austria
www.team-gmk.com
Code:
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'

has value '1.8', but '1.7' is required.
ok, version mismatch, so then i changed the CurrentVersion to 1.7 and received this error instead:

Code:
Exception in thread "main" java.lang.UnsupportedClassVersionError: j1gs4w/ddns/n
et/USAConverter : Unsupported major.minor version 52.0)
so now i dont know what to do, please to be helping me fix?
Strange because the second error says it was compiled with java 8 and you try to run it on a lower version. For me it worked fine when i ran it on my server with the newest java version.
But i recompiled it with java 6 as minimum version, so maybe it helps you. It should run now on java version 6 or higher.
Just download the rar again and try it.
 

j0s3ph

FNG / Fresh Meat
May 1, 2015
44
0
0
thanks matt, also i figured out the issue, java 7 was still installed along with java 8 (dumb)

anyway thanks for the awesome mod!
 

deadsilent

FNG / Fresh Meat
Jul 19, 2015
2
0
0
How does ist work ?

How does ist work ?

have all done
and website and USAConverter,ja ist running
but i dont see any stats
How does it works
ich have running 3 kf2 servers
from where fetch this jar the stats ?

have have now seting up update to 10 mins
Hope i see then anything ....
 

matttthias

FNG / Fresh Meat
Mar 5, 2010
174
10
0
Austria
www.team-gmk.com
have all done
and website and USAConverter,ja ist running
but i dont see any stats
How does it works
ich have running 3 kf2 servers
from where fetch this jar the stats ?

have have now seting up update to 10 mins
Hope i see then anything ....
are you running the server extension mod from marco on your server?
are you running the jar on the same machine as the servers are running?
have you put the path were the .usa files are into the ini for the USAConverter?
 

sbvinboxru

Member
Oct 11, 2012
62
0
6
i am from Russia so that sorry my English...

big request to rewrite the events for the old version of PHP and MySQL
utf8mb4 dont work, redid to utf8 and table 'kf2stats' always empty


Server version: 5.0.45-community-nt
phpMyAdmin - 2.11.2.1
MySQL client version: 5.0.45

Update all to me it makes no sense. Since there is only one site which is already running

Please !!!!!!
 
Last edited:

matttthias

FNG / Fresh Meat
Mar 5, 2010
174
10
0
Austria
www.team-gmk.com
i am from Russia so that sorry my English...

big request to rewrite the events for the old version of PHP and MySQL

Server version: 5.0.45-community-nt
phpMyAdmin - 2.11.2.1
MySQL client version: 5.0.45

Update all to me it makes no sense. Since there is only one site which is already running

Please !!!!!!
The problem with lower mysql versions is that they don't support some signs that players use in their names, like emojis or chinese letters.
 

oldschool

Active member
May 1, 2015
375
37
28
NYC
osghc.com
I just want to say thanks for the update with new classes! appreciate your time and effort.

I updated my files on my test site. The only problem I ran into was with the images within the image folder. When using my ftp program it copied the added images with Uppercase file extensions which caused the web page to not recognize the file name. Not sure if that's a problem on my end or the new update download?


I just renamed the files with .png(lowercase) in filezilla and it fixed the problem. Otherwise awesome job and thanks for your quick work!
 

matttthias

FNG / Fresh Meat
Mar 5, 2010
174
10
0
Austria
www.team-gmk.com
When using my ftp program it copied the added images with Uppercase file extensions which caused the web page to not recognize the file name. Not sure if that's a problem on my end or the new update download.
Ty for the feedback, i renamed the files and uploaded it again.

matttthias please. you my last hope
Maybe if i find some time, i'm studing two different studies so don't expect me to get it done too soon.
 

Darlin

FNG / Fresh Meat
Oct 21, 2013
95
4
0
Hi Mathias,

The web has well few days, then ...

Open connection...
Fetching stats...
U_0x011000010002A120.usaU_0x0110000100B393E4.usa
U_0x0110000100B3F8AE.usa
U_0x0110000100BA36E6.usa
U_0x0110000100BB5598.usa
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 117440606
at j1gs4w.ddns.net.USAConverter.readInt(USAConverter.java:473)
at j1gs4w.ddns.net.USAConverter.readIntString(USAConverter.java:464)
at j1gs4w.ddns.net.USAConverter.readStrings(USAConverter.java:432)
at j1gs4w.ddns.net.USAConverter.main(USAConverter.java:109)

Or is the problem in your opinion ?


Edit: Ok I understand, I put the latest version of Marco ServerExt

Notice: Undefined index: PoisonDmg in /home/chezdarl/public_html/kf2playerstats.php on line 59
Notice: Undefined index: PoisonDmg in /home/chezdarl/public_html/kf2playerstats.php on line 63
 
Last edited:

Darlin

FNG / Fresh Meat
Oct 21, 2013
95
4
0
Bug stat

Bug stat

sorry for the double post...
 
Last edited:

matttthias

FNG / Fresh Meat
Mar 5, 2010
174
10
0
Austria
www.team-gmk.com
I don't have any time to adapt this mod to the new server extension mod version.

If someone has time and the knowledge to fix and update this mod i'll share the source code with him.