I know that the variability of the length of this log entry is not a programming problem. I was more thinking of it as an analytic problem where we had to understand the meanings of the numbers.
I think the set of numbers are pretty easy to associate with the weapons once you’re able to understand the meaning of the bitflag (the huge number). They’re always presented in the same order (like Colt and Luger before MP40 and Thompson for example).
Here is what I’ve understood from my WeaponStats log entry :
WeaponStats: 1 1 264732 1 5 0 0 0 0 0 0 8 0 69 180 7 0 9 3 5 3 0 0 0 6 0 0 0 1 2 1 0 0 2126 936 0 19 34 79 36
--------- --------- ------------ --------- --------- ---------
Colt MP40 Thompson Grenade Dynamite Landmine
* first digit (0 and 1) : client ID
* second digit : dunno but always 1 or 0
* third digit : some bit flag about the weapons
264732 = 1000000101000011100
Colt =? 2
MP40 =? 3
Thompson =? 4
Grenade =? 9
Dynamite =? 11
Landmine =? 18
* weapon stats
hits/attempts/kills/deaths/headshots for all weapons specified in third digit
* damage given (2126)
* damage received (936)
* 0 and 19 : dunno was same for both players during both rounds
* battle sense / engineering / light weapons XP points
I’ve read a few other WeaponStats log entry and compared their meaning with all the events in the log (… killed by …) to try to figure out the other values for the other weapons. However, I’ve ran into conflicts (for 12, I’ve got Air Strike and Panzerfaust. So, maybe I either counted wrong on my bits or this bitflag needs deeper understanding.
Up to now, I’ve had the following weapon names and bits :
0 = Knife
1 =
2 = Colt
3 = MP40
4 = Thompson
5 =
6 = FG42 (scoped)
7 =
8 =
9 = Grenade
10 =
11 = Dynamite
12 = Panzerfaust (or Air Strike)
13 = Artillery
14 =
15 =
16 =
17 =
18 = Landmine
19 =
20 = MachineGun (or Garand scoped)
21 =
22 = K43 (scoped)
I don’t know why they didn’t simply pick the weapon IDs as the bits for this bitflag. I tried to compute a relation between both but I haven’t figured it out yet.
Anyway… that’s where I was last night. I’ll be working on that today.
So, what does your perl script generate? HTML pages directly? … .just wondering…