How to configure BFStats

Posted by -{ T h e # 1 }- at 06 September 2007 (20:00). Viewed 3658 times. Back to tutorial list

Step 1: Download the stats generator

To be able to get the stats from the CSV file you get from the Server Manager you need a stats generator. The one I'm going to write about is called BFStats and is made by Mario Köhler. BFStats uses the CSV file to generate some HTML files which you then may put on your website.

BFStats - CSV to HTML generatorClick to download

Download the BFStats program and extract the files to a new folder with a suitable name, e.g. "Stats".
To be able to run the stat generator you need Java JDK. You can download it from Sun's website.

Java JDK - Java RuntimeClick to download

Click on accept and then choose either the first link or the second. It's the same program but they use different ways of installing. (Offline = You download the whole setup file. Online = You download a small setup file that will download the whole setup file when it runs.)

When you have installed the Java program you may go on to step 2

↑ To the top

Step 2: Configure stats

First go to the folder called Bin in the stat generator program folder. Find the file called "run.cmd". Right click on it and choose Edit. You will then get notepad up.
Change the following line to where you have saved the CSV file.
set INPUT="C:\Games\Battlefield 1942\Statistics.csv"

Then save the file and close notepad.
Now double click on the run.cmd file. You will get a command screen where it will say "generating page..". After a few seconds it says done, then close that window and go back one step in the folder structure.

Find the folder "www" and open it. Now you will see seven HTML files. Open Index.html file. This is your stats!

Every time you want to update the stats then you go to the Bin folder then start the "run.cmd" file and it's done.

↑ To the top

Step 3: Upload the stats to a website

This step is for people which want to upload the stats to a website.

First you have to find a place to put the site. If you have one then you can continue.

Now go to the "www" folder and then "mappics". Select all pictures except the Hellendoorn.jpg file. Then delete them (this is if you're making a server for BF Secret weapons demo.) Because you will not use them as the demo only have one map, Hellendoorn. So it's waste of website space if you upload them.

Open your website's FTP (File Transfer Protocol). Then go back to the place where your stats files are saved (the "www" folder). Select all the files in the "www" folder and upload it to the website FTP. Then it's done.

The second time you update the stats then you only select the HTML files in the "www" folder because you have already uploaded the other files and they have not changed.

↑ To the top