HOW TO SETUP FASTSTATS 0.8.1.6
March 9, 2003
Original work from Roger Chin and Philip Warren
GO adaptation by Angus Graham of Barking Dog and enhanced by
Puma


Last updates done by
Serkoon

Overview
This version is for Windows only. But the source code does not include any Windows specific features. Consequently, there is no GUI in the Windows version anymore. If you are willing to port the source code for Linux, please contact
Serkoon to get the last version of the source code.

The command line parameters are:
-c filename
Filename is the name of the config file to use, including extension.
-i seconds
If this option is specified, Faststats automatically runs itself repeatedly, waiting the specified amount of seconds between runs. If this option isn't given, it only runs once. This is mainly for Windows users who want to have it run but don't want to rely on Windows Task Scheduler. Note from Puma: this command line parameter was never tested with this version.
-q
If this option is specified, FastStats doesn't print any messages.
-h
This shows the help screen.

Also since there is no GUI, there is also no thread priority control. In Windows NT/2K/XP, you'll have to use the start command.
Example:
start "FastStats" /LOW faststats.exe -c config.cfg -i 3600
would run FastStats in low priority, using config.cfg every hour.
I don't think this works with Windows 9X/ME (no priority control) - thread scheduling wasn't really reliable in 9X anyway.

There have been some big changes to the configurationg file format (.cfg) from earlier versions, so your old cfg files will most not work unmodified.
If you have an old 0.71 or earlier cfg, compare it with the default configuration files provided with FastStats v0.8.1.5 and update these default configuration files to match your needs.

Refer to the Config File Parameters for more details on all options.

Installation, Configuration
I recommend not to replace any previous versions by this one (just in case you have trouble configuring it). When you have tested this new version, you may delete previous ones.
Some sample configuration and batch files are provided. They assume the following:

Global Operations installation directory is:
C:\Program Files\Crave\Global Operations

This version of FastStats is installed in:
C:\Program Files\FastStats.815

Your web browser is Internet Explorer, and can be found here:
C:\Program Files\Internet Explorer\iexplore.exe

If any of those path are incorrect, please replace them in all .cfg, .ftp and .bat files. All those files are text files and you can use Notepad to edit them.

For Client Stats (local)

Edit client.cfg, and replace %PLAYERNAME% by your player name (2 occurences).
You can edit all other required parameters in this configuration file, but normally, they should be compatible with a standard configuration. More information about the parameters can be found
hereafter.

Then run client.bat
This batch will generate the player stat file in ...\faststats.815\clientstats and finally displays it thanks to Internet Explorer.

For Client Stats (Web server)

This time you want to have your stat page available from a webserver, like this.

Edit clientweb.cfg, and replace %PLAYERNAME% by your player name (2 occurences).
Replace %MAIN_URL% by the url of the stat folder on your web server.
Also replace %IMAGES% by the url of the images folder on your web server. It can be a relative path from %MAIN_URL%.
You can edit all other required parameters in this configuration file, but they should be compatible with a standard configuration. More information about the parameters can be found
hereafter.

Edit clientweb.ftp, and replace the following parameters:
%FTP_SITE%: is the the ftp server url you connect to upload your files.
%LOGIN%: is your user name to access to this ftp server
%PASSWORD%: is the password associated to %LOGIN%
%OUTPUT_FOLDER%: is a subfolder of your ftp account where you upload the stats.

Then run clientweb.bat
This batch will generate the player stat file in ...\faststats.815\clientstats
and upload it to your web server thanks to ftp.exe.

For Server Stats

This is for server admins. It works both for Windows and Linux GO servers (compatible with both log formats), but since there is not yet a Linux version of GOFastStats, Linux admins must first transfer the logs to a Windows machine.

You can edit server.cfg according to your needs.
In particular, you must define the following parameters:
Replace %MAIN_URL% by the url of the stat folder on your web server.
Also replace %IMAGES% by the url of the images folder on your web server. It can be a relative path from %MAIN_URL%.
You can edit all other required parameters in this configuration file, but they should be compatible with a standard configuration. More information about the parameters can be found
hereafter.

Edit server.ftp, and replace the following parameters:
%FTP_SITE%: is the the ftp server url you connect to upload your files.
%LOGIN%: is your user name to access to this ftp server
%PASSWORD%: is the password associated to %LOGIN%
%OUTPUT_FOLDER%: is a subfolder of your ftp account where you upload the stats.

Then run server.bat
This batch will generate the player stat files in ...\faststats.815\serverstats
and upload them to your web server thanks to ftp.exe. You may not need to use ftp.exe if you directly generate the stat pages in your web server. In this case you may delete the last line of server.bat.

For Singleplayer stats

Do it yourself;-)

Is it OK? If not, look at the trouble shooting section and try to correct the configuration parameters.

Trouble Shooting
1. I get an html page with no information, or faststats just shows up and closes without generating any file.
Make sure you have
enabled client logs in Global Operations.
Make sure the log path is correct.
Make sure your player name does not contain forbidden characters (such as / \ : * " ? < > |)

2. I installed the package and haven't bothered to read any docs or tried to configure it and I'm too lazy to really think about it. Walk me through installing it.
Did you returned the registration card?

Plugins
This section is for people that want to understand how FastStats works and what is specific for Global Operations. FastStats is a sort of stats engine for games like Half-Life, CS, FLF... Each game specific features can be developed in plugins. There are 4 new plugins now. These are the event parser, event processor, output and skill plugins. The event parser actually reads each line of the log files, the event processor figures out what to do with the log lines, and the output plugin makes the pages. The skill plugin do some extra stat calculations to generate skill points for each player.

Included in the package are plugins for Global Operations only. Beware that if you try to mix and match plugins that don't go together, the program will more than likely crash.

Now an overview of the plugins for Global Operations.

Event_parser_go
This is the event parser for Global Operations.

Event_processor_go
This is the event processor for Global Operations. Most of the stats calculation is done here.

Output_globalops
This is the output plugin for Global Operations, that generates htlm files.

Skill_gostats
This is the skill plugin for Global Operations.

FTP Support
FastStats 0.8x has a built-in mini ftp client. FastStats will generate all the webpages as normal to the directory specified by HTMLDIR. It will then try to transfer everything in that directory and the players directory over, but will not recurse subdirectories.
This means it won't transfer your images directory, or any other subdirectories you create, but it also doesn't strictly transfer files that have only been modified.

The feature is still pretty experimental and might be pretty slow, depending on your connection speed to the server. Note from Puma: I never used this feature. It requires a kind of password encryption that seems to crash.

An alternate solution consists in using FTP.EXE, with a script file like:

open <your_ftp_site>
user <your_user_name>
<your_password>
prompt
cd <your_output_folder>
mput *.html
cd players
mput players\*.html
quit

and run ftp with this script:

ftp.exe -n -s:<scriptfile>

This is how the sample batch files work.

Config File Parameters
Here's the list of Config File Parameters

BANNED_NAME_CFG
Set this to the file will the list of player names banned from the stats.
Example:
BANNED_NAME_CFG=C:\Program Files\FastStats.80\banned-name.cfg

BANNED_WONID_CFG
Set this to the file will the list of player wonids banned from the stats.
This parameter is unused in GO plugins.
Example:
BANNED_WONID_CFG=C:\Program Files\FastStats.80\banned-wonid.cfg

BANNER
Set this to the banner file you want displayed at the top of the web page.
Example:
BANNER=GO_FastStats_banner.jpg

EVENT_PARSER_PLUGIN
Set this to the event parser plugin you want to use.
Example:
The file you want to use is named libevent_parser_go.dll, set
EVENT_PARSER_PLUGIN=event_parser_go

EVENT_PROCESSOR_PLUGIN
Set this to the event processor plugin you want to use.
Example:
The file you want to use is named libevent_processor_go.dll, set
EVENT_PROCESSOR_PLUGIN=event_processor_go

FOOTER
Set this to the footer file you want appended to each of the web pages.
Example:
FOOTER=C:\Program Files\FastStats\HTML\footer.html

FTP_DIR
Set this to the directory you want to store your stats to. The FTP feature changes to this dir to put your files.
Example:
If you ftp into your site and type "cd faststats"
FTP_DIR=faststats

FTP_PASSWORD
Set this to your FTP account password using ROT-128.
Take the ASCII values of each character of your password and add 128 to it.
This is simply to prevent people from opening this file and reading the password directly.

FTP_PORT
Set this to the port of the ftp server you want to connect to, if you're using the FTP feature. If you don't know what port it should be, set it to 21.
Example:
FTP_PORT=21

FTP_SITE
Set this to the address of the ftp server to connect to, if you're using the FTP feature. Do not put ftp:// in front, or :portnum after.
Example:
If you have to ftp to ftp.yourwebpage.com, set
FTP_SITE=ftp.yourwebpage.com

FTP_USER
Set this to the username you use to login on your ftp site.
Example:
FTP_USER=loginname

HTMLDIR
Set this to where you want the web page files to be saved.
Example:
HTMLDIR=C:\inetpub\wwwroot\faststats

HTML_PATH
Set this to the path on the web page where your stats will be stored.
Do not put a trailing slash.
Example:
If you were to access the stats on your web site by going to http://www.yourwebpage.com/faststats, set
HTML_PATH=http://www.yourwebpage.com/faststats
If you were to access the stats on your hard disk set the same path you set for HTMLDIR.

IMAGE_PATH
Set this to the subdirectory where you have your images stored.
Do not put a trailing slash.
Example:
If you have the images stored in your web site at
http://www.yourwebpage.com/faststats/images, set
IMAGE_PATH=http://www.yourwebpage.com/faststats/image
If you want to access the stats on your hard disk, set this parameter to the folder that contains all the images
IMAGE_PATH=C:\Program Files\Crave\Global Operations\Globalops\GOFastStats\images

LISTMAX
Set this to the maximum number of players you want to have ranked. Set this to 0 if you
want to rank all players.
Example:
LISTMAX=50

LOGDIR
Set this to where your logs are.
Example:
LOGDIR=C:\Program Files\Crave\Global Operations\GlobalOps\clientlogs\My Profile

MINIMUM_KILLS
Set this to the minimum number of kills a player must make to be ranked.
Example:
MINIMUM_KILLS=5

MINIMUM_SKILL
Set this to the minimum skill a player must have to be ranked.
Example:
MINIMUM_SKILL=1000

MINIMUM_TIME
Set this to the minimum amount of time in seconds a player must play to be ranked.

Example:
MINIMUM_TIME=3600

MONTHRANGE
Set this to the number of previous months to process. Setting this to 0 processes only
the current month. For a full year, set this to 11.
Example:
MONTHRANGE=5

NO_RANKING
Set this to YES if you don't want to display any sort of rankings pages - FastStats will
generate a player index page to look up individual player pages. Setting RANKEDONLY to
YES and NO_RANKING to YES generates no pages.
Set this to NO if you want to have rankings pages. A player index is still generated.
Example:
NO_RANKING=YES

OPPONENT_LISTMAX
Set this to the maximum number of players you want to have listed on the opponent
matchup listing on the player pages. Set this to 0 if you want to list all
opponents.
Example:
OPPONENT_LISTMAX=50

OUTPUT_PLUGIN
Set this to the output plugin you want to use.
Example:
The file you want to use is named liboutput_globalops.dll, set
OUTPUT_PLUGIN=output_globalops

PLAYERHEADER
Set this to the file you want to be prepended to each of the player pages.
Example:
PLAYERHEADER=C:\Program Files\FastStats\HTML\playerheader.html

PLUGINS_DIR
Set this to the directory where your plugins are.
Example:
PLUGINS_DIR=C:\Program Files\FastStats\Plugins

PLUGIN_BOOLEAN
This is used to configure plugins. The format is
PLUGIN_BOOLEAN=<PLUGIN_VARIABLE>:<YESorNO>
Refer to the plugins you've chosen to see if it needs this.
This parameter is not used with the GO plugins.

PLUGIN_DOUBLE
This is used to configure plugins. The format is
PLUGIN_DOUBLE=<PLUGIN_VARIABLE>:<Number>
Refer to the plugins you've chosen to see if it needs this.
This parameter is not used with the GO plugins.

PLUGIN_INT
This is used to configure plugins. The format is
PLUGIN_INT=<PLUGIN_VARIABLE>:<WholeNumber>
Refer to the plugins you've chosen to see if it needs this.
This parameter is not used with the GO plugins.

PLUGIN_STR
This is used to configure plugins. The format is
PLUGIN_STR=<PLUGIN_VARIABLE>:<Text>
Note that both the PLUGIN_VARIABLE and Text values are case sensitive.
For the GO plugins you may set the following parameters:

PLUGIN_STR=roleimages:gif
to have specialty images.

PLUGIN_STR=mode:client
to have client mode multiplayer stats. This parameter works in combination with PLUGIN_STR=profile:PlayerName.

PLUGIN_STR=mode:server
to have server stats (default).

PLUGIN_STR=mode:single
to have single player stats. This parameter works in combination with PLUGIN_STR=profile:PlayerName.

PLUGIN_STR=mode:tk
to have server stats + hall of shame (list of players that commited TK).

PLUGIN_STR=profile:<PlayerName>
to have only one stat page for this player only (no ranking). This parameter works in combination with PLUGIN_STR=mode:client or PLUGIN_STR=mode:single.

PLUGIN_STR=tkmin:<num>
Set this to the minimum number of TK a player must make to be ranked in the hall of shame. This parameter works in combination with PLUGIN_STR=mode:tk.

PLUGIN_STR=tkpkmin:<percent>
Set this to the minimum percentage of TK per kill a player must make to be ranked in the hall of shame. The value can be in the range of ]1..100] (percentage) or in the range of [0..1] (ratio). This parameter works in combination with PLUGIN_STR=mode:tk.

RANKHEADER
Set this to the file you want to be prepended to each of the rankings pages.
Example:
RANKHEADER=C:\Program Files\FastStats\HTML\rankheader.html

RANKEDONLY
Set this to YES if you only want to generate player pages for players that get ranked.
Set this to NO if you want to generate player pages for everyone - this could impact performance.
Example:
RANKEDONLY=YES

SHOW_WONIDS
Set this to YES if you want to display the player's WONID on the player page.
Set this to NO if you don't want to display the player's WONID on the player page.
This parameter is unused in GO plugins.
Example:
SHOW_WONIDS=NO

SKILL_PLUGIN
Set this to the skill plugin you want to use.
Example:
The file you want to use is named libskill_gostats.dll, set
SKILL_PLUGIN=skill_gostats

STORE_METHOD
Set this to NAME for Global Operations. The other option, WONID, is for HL only.
Example:
STORE_METHOD=NAME

USE_FTP
Set this to YES if you want to use the FTP built-in feature to transfer the web pages to another server.
Set this to NO if you don't want to use the FTP feature.
Example:
USE_FTP=NO

WEAPONIMAGES
Set this to the file extension of the weapon images.
Example:
WEAPONIMAGES=GIF