Contents
English (United Kingdom)French (Fr)Deutsch (DE-CH-AT)
Random Thumbnail
monsat02.jpg
Search
Login
Who Is Online?
We have 152 guests online
Navigation
Home Descent 3 Descent 3 dedicated server tool for Windows Processing game statistics data
Most Recent
Featured Articles
Joomla 1.5 Featured Articles
Navigation
Home Descent 3 Descent 3 dedicated server tool for Windows Processing game statistics data
English (United Kingdom)French (Fr)Deutsch (DE-CH-AT)
Processing game statistics data E-mail
User Rating: / 7
PoorBest 
Descent 3 - Descent 3 dedicated server tool for Windows
Written by Thomas   
Monday, 02 June 2014 07:53
Article Index
Processing game statistics data
Statistics settings - reference
All Pages

 

Dedicated Descent 3 servers can be configured to produce statistics data. This means that ".stats" files are written into the "Descent3\netgames" folder when a level ends or when a player disconnects.

The files are plain text files with some information about the time in game, kills, goals, suicides, etc. for each player.


To start uploading .stats files with D3Server3 you'll only need an FTP account at d3stats.de. Descent 3 and D3Server3 can then handle the rest.

 

 

Send a private message to Maulwurf at the server OPs forum to obtain your FTP details, which includes a username and a password. Don't forget that he needs the name of your server (or servers) too when you contact him.

Preparing D3Server3 for the upload is as simple as editing a few lines in the file D3Server3.ini. I'd suggest to use Notepad ++ for editing the file. Don't use Notepad that comes with Windows.

All the settings for the upload and further statistics processing can be found in the section [UploadStatistics] in D3Server3.ini. The file is located in your D3Server3 folder where D3Server3.exe is located too.

 

At the end of the section [UploadStatistics] there's these entries:

UploadStatistics=0
UploadStatisticsFTPUser=
UploadStatisticsFTPHost=d3stats.de
UploadStatisticsFTPPort=21
UploadStatisticsFTPPass=

 

Place your FTP username for the d3stats.de project (the one obtained from Maulwurf) behind UploadStatisticsFTPUser=.
Place your FTP password for the d3stats.de project (obtained from Maulwurf too) behind UploadStatisticsFTPPass=.

 

UploadStatisticsFTPUser=Your_FTP_username_for_d3stats
UploadStatisticsFTPHost=d3stats.de
UploadStatisticsFTPPort=21
UploadStatisticsFTPPass=Your_FTP_password_for_d3stats

The settings for UploadStatisticsFTPHost ("d3stats.de") and UploadStatisticsFTPPort (FTP port 21) are correct already. You don't need to change them. In case the statistics FTP upload hostname or the port changes in the future we're going to provide an automatic software update for D3Server3 which will contain the correct data again.

 

To make everything live, change:
UploadStatistics=0
to:
UploadStatistics=1

 

Save the file and restart D3Server3.
If you have ".stats" files already the server tool should start uploading them after about a minute or two.

If nothing happens you probably don't have any statistics files. One possible cause could be that there's no dedicated server configured to create the files. Configure at least one Descent 3 dedicated server to create statistics data (see below), then start this server, let it run for a minute, and stop it again. This should produce at least one .stats file which D3Server3 should process.

Whether a dedicated Descent 3 server generates statistics files or not can be configured in its configuration dialog window. Click Start in D3Server3's main window, then pick a server or create a new one and change its settings ("Edit..." or "New..."). Make sure the server generates statistics data ("Save game stats at server disconnect" and "Save game stats at level end" should be ticked).

D3S3ServerConfigStats 

 

D3Server3 processes statistics files (.stats files) in three steps.

  1. Upload the file per FTP. If no backup is required/wished the file is deleted afterwards.
  2. Move the file to the backup folder.
  3. Archive one or more backed up files and optionally delete them.

 

The default configuration follows this more detailed process:

  1. D3Server3 monitors the Descent3\netgames folder and waits for the creation of files.
  2. A dedicated Descent 3 server creates a .stats file. This is usually done when a level ends or just before a server is stopped. Writing the .stats file is part of the shutdown process of a dedicated Descent 3 server, provided it is configured to do so.
  3. D3Server3 notices the creation of the .stats file. If this is the first time after program start the tool waits for 20 seconds before continuing.
  4. The .stats file is uploaded via FTP to the statistics server (d3stats.de). The FTP connection is established in active mode.
  5. After a successful upload the file is moved to the subfolder "stats_backup" in D3Server3's directory structure.
  6. D3Server3 pauses for 5 seconds.
  7. Go back to step 1. If the amount of backed up files is 200 or more go to step 8.
  8. Call the commandline version of 7-Zip to archive all backed up .stats files ("stats_backup\*.stats") into a yearly archive ("stats_archive\StatsArchive2014.7z").
  9. Delete all backed up .stats files since they are now in the archive.

 

This default process can be changed in several ways.

 


 

The following documentation refers to the ini keys in section [UploadStatistics] of the file D3Server3.ini. The keys are described in the order they appear in the section after the installation program has been run.

Below are the contents of the section how the installer creates them.

[UploadStatistics]
AmountStatsFilesToArchive=200
AmountStatsFilesToUpload=1
ArchiveCommandExecutable=7za.exe
ArchiveCommandParameters=a -mx3 -mmt=off -ms=off -mtc=on -y "$StatsArchivePath.7z" "$StatsBackupDir\*.stats"
CreateBackups=1
ArchiveBackups=1
DeleteBackupStatsAfterArchive=1
FTPUploadPassiveMode=1
PauseAfterUpload=5
ShowArchiverWindow=HIDE
StartupPause=20
StatsArchiveDir=stats_archive
StatsBackupDir=stats_backup
UploadStatistics=0
UploadStatisticsFTPUser=
UploadStatisticsFTPHost=d3stats.de
UploadStatisticsFTPPort=21
UploadStatisticsFTPPass=

 

AmountStatsFilesToArchive=200

The value specifies how many backed up .stats files D3Server3 is supposed to archive with a single call to the archiver application.
The backed up files are expected to be in the folder specified by the key StatsBackupDir.
Default value is 200, which means that the archiver is run once after 200 .stats files have been backed up.
The archiver only runs when ArchiveBackups=1. If ArchiveBackups=0 the value of AmountStatsFilesToArchive is ignored entirely.

 

AmountStatsFilesToUpload=1

This configuration value is currently not supported. The installation program creates this key with a value of 1, which reflects what D3Server3 currently does. It can only upload one file at a time.
To avoid confusion it is suggested not to change the value of AmountStatsFilesToUpload.
The setting is meant for a (possible) future version of D3Server3 that might be capable of uploading more than one file at a time to increase the upload speed.

 

ArchiveCommandExecutable=7za.exe

The executable file of the archiver. Since D3Server3's installation program places a copy of the 7-zip commandline archiver into the tool's installation folder the value of ArchiveCommandExecutable is set to 7za.exe by default.

The value can contain a path, which is either absolute or relative to the folder in which D3Server3.exe resides.

If you change ArchiveCommandExecutable you will most likely also have to change the value of the key ArchiveCommandParameters to something that works for your archiver unless it takes and parses the command line parameters the same way as 7za.exe does.

 

ArchiveCommandParameters

The configuration key ArchiveCommandParameters tells D3Server3 which parameters to use when invoking the archiver. The default parameters work for 7-zip. If you change ArchiveCommandExecutable you will most likely also have to change ArchiveCommandParameters to something that works for thearchiver used.

The parameters passed on to the archiver support two variables D3Server3 substitutes: $StatsArchivePath and $StatsBackupDir.

D3Server3 substitutes $StatsArchivePath with the absolute path to the archive plus the text "StatsArchive" plus the current year (4 digits). For example, if the key StatsArchiveDir is set to StatsArchiveDir=stats_archive, D3Server3 has been installed into "C:\Games\Descent3\D3Server3", and the current year is 2014, then $StatsArchivePath would be substituted with "C:\Games\Descent3\D3Server3\stats_archive\StatsArchive2014" (without the double quotation marks). To make that a .zip archive filename you could use "$StatsArchivePath.zip" (including the double quotation marks to make it a valid filename even if it contains blank characters).

D3Server3 substitutes $StatsBackupDir with the absolute path to the statistics backup folder. No backslash is added to this folder name. See the explanation of the key StatsBackupDir for an example of how $StatsBackupDir resolves.

 

CreateBackups=1

The default value of 1 advises the server tool to create backups of uploaded .stats files. If CreateBackups is set to 0 (CreateBackups=0) .stats files are simply deleted after a successful FTP upload.
If CreateBackups is set to 1 (CreateBackups=1) the statistics files are backed up to the folder specified by the configuration key StatsBackupDir.

 

ArchiveBackups=1

Enables/disables archiving. If ArchiveBackups is 0 (ArchiveBackups=0) the backups are not archived.

 

DeleteBackupStatsAfterArchive=1

This tells D3Server3 to remove backed up files after the archiver has completed its archiving process successfully. Some archivers (like for example Zip) support the option to "move files into an archive", meaning that a file will be added to the archive and then the original file is deleted. This basically  moves the file into the archive.
7-zip, the archiver that comes with D3Server3, does not provide this option but the server tool simulates this process if DeleteBackupStatsAfterArchive=1.

 

FTPUploadPassiveMode=1

By default D3Server3 uploads statistics files in FTP's active mode (FTPUploadPassiveMode=0 or if the key doesn't exist). If FTPUploadPassiveMode is set to 1 (FTPUploadPassiveMode=1) passive FTP mode is used.
Note that active FTP requires the uploading host to be publically available on the net.

The installation program of D3Server3 versions up to D3Server 3 version 3.2.1.0 always sets FTPUploadPassiveMode=1, independent of whether the key exists already or not. This is bacause some beta versions contained a bug that inverted this function accidentally. More recent versions of D3Server3 are not going to reset this configuration key.

 

PauseAfterUpload=5

The value of this configuration key specifies the time in seconds the server tool pauses before it continues with the next statistics file. This reduces the bandwidth D3Server3 uses for uploading files.

The default value of 5 seconds seems a good pick even if dedicated servers have players.

 

ShowArchiverWindow=HIDE

Specifies how the archiver's window is shown. The default value HIDE does not display the archiver's window at all. Other options are NORMAL, which displays a standard console window during its runtime, MAXIMIZE, MINIMIZE, and SHOWNOACTIVATE. MINIMIZE shows the archiver's window minimised to the Windows taskbar. SHOWNOACTIVATE shows a standard console window but does not activate it.

 

StartupPause=20

When D3Server3 checks for .stats files for the first time after the application has been started, it waits StartupPause seconds before processing the files.

 

StatsArchiveDir=stats_archive

The directory that contains the archives. The path can either be absolute or relative. If it's relative (as set by the installation program) it is assumed to be relative to the location of D3Server3.exe.

The archives are named "StatsArchive" + 4 digit year + ".7z" by default (see the ini key ArchiveCommandParameters).

 

StatsBackupDir=stats_backup

This is the absolute or relative (to D3Server3.exe) path of the folder in which D3Server3 backs up .stats files.

Within the configuration key ArchiveCommandParameters the variable $StatsBackupDir is resolved to the absolute path of the value of the configuration key StatsBackupDir. For example, if the key is set to StatsBackupDir=stats_backup and if D3Server3 has been installed into C:\Games\Descent3\D3Server3, the variable $StatsBackupDir would be substituted with "C:\Games\Descent3\D3Server3\stats_backup" (without a backslash at the end and without the double quotation marks). Since the path could contain blank (space) characters it is recommended to enclose the variable in double quotation marks so that it resolves to a valid path name on Windows. Have a look at how D3Server3's installation program creates the configuration key ArchiveCommandParameters initially.

 

UploadStatistics=0

Enables/disables FTP processing of statistics data. In essence, this key must be set to UploadStatistics=1 for the statistics upload to work. If set to 0 (UploadStatistics=0) D3Server3 does not look at statistics data at all, nor does it try to upload, backup, or archive these files.


UploadStatisticsFTPUser=

This is the username D3Server3 uses to connect to the FTP server given in the key UploadStatisticsFTPHost. You need to obtain this username from Mauli (Maulwurf).

 

UploadStatisticsFTPHost=d3stats.de

The name of the host to upload the statistics files to. The installation program of D3Server3 sets this value to the current Descent 3 statistics server for the D3Stats project, which is d3stats.de. Should this server name (hostname) change in the future, an updated version of D3Server3 would contain its correct name. This is one of the reasons why it is recommended to configure D3Server3 to automatically download and install updates (that's the default for new installations).

 

UploadStatisticsFTPPort=21

The TCP port for the FTP connection to the server (actually: the server's port). This should always be 21 (the standard for FTP) unless Mauli is going to change it on the server d3stats.de.

 

UploadStatisticsFTPPass=

This is the password to logon to the d3stats.de server via FTP. Mauli should have given you this password.

 

 

Last Updated on Wednesday, 18 April 2018 22:21
 
You need to login or register to post comments.
Discuss this item on the forums. (0 posts)
Discuss (0 posts)