Root / Software / Stats Tools / BFStats

Name Size Modified 1495 kB 05/02/2010 21:18:22 

BFStats.zipDownload here



BFStats generates an HTML page with statistics of your Battlefield Server.

BFstats was written by Mario Köhler aka Venkman [].


BFStats has two prerequisites:

- BFStats uses the "Statistics.csv" file generated by the "Battlefield Server Manager" (or BFSM) to create an HTML statistic. So if you don't have BFSM, stop reading and get it at

- BFStats is written in Java, so make sure you have installed a Java JDK or JRE (Version 1.4 or newer!) and have either the JAVA_HOME environment variable set to point to the root directory of your JDK/JRE installation, or have the "bin" directory of your JDK/JRE installation included in your PATH environment variable. Usually when you install a JDK/JRE this has already been done for you. But you may want to check this if you get errors like "command not found" or something simmiliar. Then this is probably because the "java.exe" could not be found.


Unzip the package to a directory of your choice and edit the "run.cmd" file in the "bin" subdirectory. Change the following variables according to your local environment:

INPUT: this will hold the full qualified path and filename of the "Statistics.csv" file generated by the BFSM tool. It's mandatory that you change this to your local Statistics.csv file or no output can be generated!!!

OUTDIR: this will hold the full qualified path (without trailing slash or backslash!) of the directory where you want the html file to be generated. By default this points to the local "www" directory where you find the support files like style sheets and images for the generated page as well. You may want to change this to the docroot of your webserver so you don't have to copy the generated file manually to your docroot each time it is generated. if you do this, don't forgett to copy the necessary support files from the "www" directory to your docroot, too. Otherwise the generated page will look rather clumsy, because it's missing it's style sheets and images.

TEMPLATE: this will hold the name of the template to be used to generate the html file. The tool will look for this file in the "template" directory. Unless you want to change the design of the generated page you don't have to touch this.

If you want your servers address and your personal contact information to show up on the generated HTML page you should edit the "statistic.template" file in the "template" subdirectory. right at the top of that file you find a block of constants that you can change to reflect your personal information:

My Battlefield Server
My Name
My Server-IP

Below those entries you will find some filter settings that reduce the amount of players that show up on the statistic to a reasonable amount. This is meant for high traffic public servers that see hundreds of players a day and a lot of one-time players who would very quickly blow up the statistic page if not filtered out.

The default values are suited for a medium to high traffic server. Especially if you have a low traffic private or LAN server you want to change the default values because otherwise you would have to play for a long time and for several rounds before one of your players would even show up in the rankings. In fact, for those kind of servers you may even want to consider turning filtering off by setting all the filter values to "-1"


When you've setup the tool like described above you only have to start the "run.cmd" script from the "bin" directory and will get an "index.html" file in the "www" directory together with some support files like style sheets and images. open the index.html in a webrowser or place it (together with the support files) in the docroot of your webserver and you're done.

Alternatively you can run the "run_plain.cmd" script to generate a plain text output instead of HTML ouput. In this case BFStats will generate a couple of files named "index*.html". Allthough the files have the .html ending they are in case plain text files (this is a small glitch i ask you to live with :-) ). And there are seven of them, each sorted by a different column.


Mario Koehler []
aka Venkman


The HTML template and it's stylesheet is based on one of the available "Day of Defeat" HTML themes for PsychoStats. Psychostats is a great statistics tool for Half-Life (and several Half-Life Mods) and you should visit their site at