Site hosted by Angelfire.com: Build your free website today!

Format of stats.txt generated by the Uploader

BAB.stats Uploader outputs stats in format that can be easily parsed in PHP or any other programming language. Heres an example of stats.txt:

GameStart__&__DF:LW v1.00.37__&__serveridcode__&__bab.stats test__&__Desert Hole__&__0__&__2__&__0__&__2002-07-29 23:20:19
Player__&__5_12_3_1_0_0_0_0_2_0_1_0_44__&__Bobby Brown
Player__&__16_19_18_2_0_0_0_0_0_1_2_0_23__&__Moby Dick
Player__&__9_2_3_0_1_2_0_0_0_0_1_0_23__&__Jim
GameEnd

If OutputLog in babstats.cfg was enabled, theres a list of death messages, then the stats.txt would look like this:

GameStart__&__DF:LW v1.00.37__&__serveridcode__&__bab.stats test__&__Desert Hole__&__0__&__2__&__0__&__2002-07-29 23:20:19
Player__&__5_12_3_1_0_0_0_0_2_0_1_0_44__&__Bobby Brown
Player__&__16_19_18_2_0_0_0_0_0_1_2_0_23__&__Moby Dick
Player__&__9_2_3_0_1_2_0_0_0_0_1_0_23__&__Jim
LogStart
Message__&__2002-07-29 23:18:05__&__Taskbar is leaving the game.
Message__&__2002-07-29 23:19:40__&__Moby Dick committed suicide.
Message__&__2002-07-29 23:20:10__&__Jim joining the game (blue).
Message__&__2002-07-29 23:20:19__&__Bobby Brown shot Jim in the head.
LogEnd
GameEnd

Data for each game starts with "GameStart" line and ends with "GameEnd". Each element in "GameStart" line is separated by "__&__". All elements go like this:

GameStart__&__Game and version__&__Server id code__&__Server name on NovaWorld__&__Map name__&__Dedicated__&__Game Type__&__Winner__&__Date/Time

If "Dedicated" is 0 then server was not dedicated (playing host), otherwise, if it is 1, server was dedicated. Heres a list of all "Game type" and what they mean:

0COOP
1DM
2TDM
3KOTH
4TKOTH
5CTF
6FB
7AD
8SD

Note: these game type codes are for DFLW, DFTFD and DF2 - theres no data what game type codes are in other games. If "Winner" is 0 then there was no winner on that map, 1 - blue won, 2 - red won, 3 - yellow, 4 - violet.

"Player" line is decoded like this:

Player__&__Score_Kills_Deaths_Headshots_Knifings_Medic saves_Flags picked_Flags saved_Murders_Suicides_Team code_Shots fired_Weapon code__&__Name

If Team Code is 0 then the player didn't have a team, 1- blue, 2 - red, 3 - yellow, 4 - violet. Weapon codes for DFLW are these:

0None
1PSG-1
2M82A1 Barret
4M401
8M249 SAW
9FN MAG
10M4/MK
11G11
12Steyr Aug
13AK-47
14OICW
19UAR
20MM-1
21Jackhammer

For DFTFD weapon codes are these:

0None
2PSG-1 SD
3M82A1 Barret
4SA80-A2
5AK-47
6AKS-74U
8M4A1/M203
10M4A1-SD
11M16A2/M203
12M249 SAW
13OICW
15AW Sniper
19F88 Austeyr
20M24 Sniper
21M40A3 Sniper
23M60E3 Saco
44FN MAG

For DF2 Demo weapon codes are these (Theres only one weapon - M4/MK):

0M4/MK

And the weapon codes for DF2:

0None
9M4 Carbine. Grenade
10M4 Carbine. Shotgun
11M249 SAW
12M82A1 Barret
15H&K MP5 SD3
23M401
29UAR