FLstat version 1.5

Freelancer Rankings for the Web

Copyright © 2003-2006 Tim Rigden


Contents

1) What is FLstat?
2) Why would I want FLstat?
3) How do I use FLstat?
4) How do I customise how it looks?
5) Advanced Options
6) Tips and Tricks
7) Source Code
8) Revision History

License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

(This is the MIT style license)


Credit to Jor <flcodec@jors.net>, who wrote "flcodec", from which I shamelessly pinched the code to decode player files; and Sherlog <sherlog@t-online.de> for originally uncovering the algorithm.

Any questions, problems or suggestions for further improvements, send an email to flstat@cryosphere.co.uk.
There is also the
Global Player Rankings table, which can be joined by reading Add A Server.


1) What is FLstat?

Click here to see example...

Written for the PC game Freelancer, FLstat is a non-interactive program that decodes the player files on a multiplayer server, and generates a ranking table in HTML. This HTML file can then be published on a web server for all to see. Here is an example of FLstat in action >>>

FLstat is not a MOD, and does not change any of the files used by Freelancer. This will only run on Freelancer servers, not clients.


2) Why would I want FLstat?

A feature missing from Multiplayer Freelancer is the ability to see the stats that other players have got when they are not online. This tool displays all characters that have played on a server, whether they are online or not. The characters are sorted by Rank, then by Money, and then by number of Kills.
Since version v1.5, the sorting of characters can be changed. See the
-sort option for details.

This is designed to encourage healthy competition amongst players, and it can even assist administrators in spotting cheats on their servers. However, this is tool is not specifically aimed at server administration - for a more complete admin tool, have a look at Freelancer Server Operator from www.ioncross.com.


3) How do I use FLstat?

First
check here for the latest version.
Extract the contents of the zip file to a directory anywhere on your server. (for example "C:\FLstat"). Simply double-click on "update.cmd" to run the program, and a file called "flstat.html" will be created. If you wish, you may edit the second line in "update.cmd" to change the name and/or location of resulting HTML file. Then, all you need to do is schedule "update.cmd" to be executed once per day, or something.

Windows 95/98/Me users: you will have to rename "update.cmd" to "update.bat".

Warning: On servers with a large number of characters, this may take some considerable time to execute and will put significant load on the server, so schedule it for when the least number of players are on. Consider using the -nice option to reduce the load on the server.

You can use a web server of your choice to publish this file on the Web. I found TinyWeb to be very simple and effective.
If you want to run this from a different account or computer, have a look at the -path option in Advanced Options below.
Also see Tips and Tricks to see how you can automatically uploads the stats to another machine.


4) How do I customise how it looks?

You can edit "header.htt" and "footer.htt" to change or add additional content above and below the ranking table. You can also edit "table.css" to change the colours and style of the ranking table itself.

Note: After editing "header.htt" or "footer.htt", you will need to run "update.cmd" again to see the changes. Also, don't forget to copy/move the file "table.css" to the same place that you have "flstat.html"!


5) Advanced Options

Specify any of these options below in the file "update.cmd". For Example:
FLstat.exe -rank 25 -active 24 > middle.txt
copy /B header.htt+middle.txt+footer.htt flstat.html
-top <N> - Show only top N characters.

-rank <N> - Show only characters at rank N or higher.

-days <N> - Show only characters which have played within the last N days.

-nice <N> - Run with lower CPU usage, for example: -nice 50. This is useful on servers with very many players, as it minimises the load. Default setting is 10.

-path <dir> - Override the default location of the Multiplayer Accounts.

You might want to use this if you are running FLstat as a different user, or from a different machine. This must be the full path where the accounts are stored, for example:
-path "C:\My Documents\My Games\Freelancer\Accts\MultiPlayer"

-active <N> - Highlight characters that have logged in within the last N hours.

This is best set to a number of hours that is similar to the frequency that the page is updated. For example, if the page is update once per day, then use -active 24, but if it is updated every hour, then you could use -active 1.

-cheats <N> - Highlight cheaters, where N is the sensitivity level.

The higher cheat sensitivity number N, the less sensitive the detection becomes. If you set this too high, then cheaters will go undetected, and if you set it too low then innocent players get unfairly branded as a cheat. 30 is the recommended value to catch most cheaters, where as 50 with only catch the really serious cheats. A value of 10 will probably catch all cheaters, but may also highlight someone who hasn't actually cheated. You should experiment with different values, and stick with the one that works best for you.

-sort <key> - sort characters by Rank (default), Kills, Money, Time or Login.

It is possible to call FLstat.exe multiple times in the "update.cmd" file, each time with a different sort key. This means that you can publish different pages, each sorted by a different key. For example:

FLstat.exe -sort Rank > middle.txt
copy /B header.htt+middle.txt+footer.htt flstat-rank.html

FLstat.exe -sort Kills > middle.txt
copy /B header.htt+middle.txt+footer.htt flstat-kills.html

FLstat.exe -sort Time > middle.txt
copy /B header.htt+middle.txt+footer.htt flstat-time.html

FLstat.exe -sort Login > middle.txt
copy /B header.htt+middle.txt+footer.htt flstat-login.html
-nofile - prevent filenames of character files from appearing in the HTML code.
If this option is not specified, then the character filenames will appear as comments in the HTML code. Some admins find this a useful way to identify certain players who break the server rules.
For example: <!-- File: 23-41639410/0a-bafe861e.fl -->.

However, some servers have rules that allow players to have more than one character, and so this option can be specified to preserve the players privacy, and protect their secondary characters.


6) Tips and Tricks


7) Source code

The source code for this tool has been included, written in MS Visual C++ v6.0. The
license above allows anyone to edit and release the code, as long as the original author is credited.


8) Revision History

10th May, 2006 - v1.5
25th July, 2004 - v1.4
18th January, 2004 - v1.3
25th September, 2003 - v1.2
24th July, 2003 - v1.1
7th July, 2003 - v1.0a
6th July, 2003 - v1.0
29th June, 2003 - v0.9