Stats program for ET??


(SyRinX) #21

Hey there
I wanted to make a log parser for ET as well (I had started one for RTCW but I left it unfinished since I started playing ET beta).

Thanks for all the info you guys have gathered in this thread. Although the WeaponStats log entry is still a mystery. Any SplashDamage developer can tell us the specifications of this log entry???


(Awol) #22

Spookstah, there are some missing weapons not many thought. Glad to see someone else was doing this. Here is what I gathered for my program.

Straight from my perl program sorry


$gun{0} = "MOD_UNKNOWN";
$gun{1} = "MOD_MACHINEGUN";
$gun{2} = "MOD_BROWNING";
$gun{3} = "MOD_MG42";
$gun{6} = "MOD_KNIFE";
$gun{7} = "MOD_LUGER";
$gun{8} = "MOD_COLT";
$gun{9} = "MOD_MP40";
$gun{10} = "MOD_THOMPSON";
$gun{11} = "MOD_STEN";
$gun{12} = "MOD_GARAND";
$gun{14} = "MOD_SILENCER";
$gun{15} = "MOD_FG42";
$gun{16} = "MOD_FG42SCOPE";
$gun{17} = "MOD_PANZERFAUST";
$gun{18} = "MOD_GRENADE_LAUNCHER";
$gun{19} = "MOD_FLAMETHROWER";
$gun{26} = "MOD_DYNAMITE";
$gun{27} = "MOD_AIRSTRIKE";
$gun{30} = "MOD_ARTY";
$gun{31} = "MOD_WATER";
$gun{34} = "MOD_CRUSH";
$gun{36} = "MOD_FALLING";
$gun{37} = "MOD_SUICIDE";
$gun{39} = "MOD_TRIGGER_HURT";
$gun{41} = "MOD_CARBINE";
$gun{42} = "MOD_KAR98";
$gun{43} = "MOD_GPG40";
$gun{44} = "MOD_M7";
$gun{45} = "MOD_LANDMINE";
$gun{46} = "MOD_SATCHEL";
$gun{49} = "MOD_MOBILE_MG42";
$gun{50} = "MOD_SILENCED_COLT";
$gun{51} = "MOD_GARAND_SCOPE";
$gun{52} = "MOD_CRUSH_CONSTRUCTION";
$gun{54} = "MOD_CRUSH_CONSTRUCTIONDEATH_NOATTACKER";
$gun{55} = "MOD_K43";
$gun{56} = "MOD_K43_SCOPE";
$gun{57} = "MOD_MORTAR";
$gun{58} = "MOD_AKIMBO_COLT";
$gun{59} = "MOD_AKIMBO_LUGER";
$gun{60} = "MOD_AKIMBO_SILENCEDCOLT";
$gun{61} = "MOD_AKIMBO_SILENCEDLUGER";
$gun{64} = "MOD_SWITCHTEAM";

Also I’m almost finished my program. Still have some bugs mostly dealing with time on. I have to check to see if the kills and deaths are correct and all that. I expect by the end of the week I will have it fully working.


(SyRinX) #23

do you have the WeaponStats log entry sorted out??


(snakeinthegrass) #24

please post here guys if anyone finds a client based stats program… thanks…


(HeinGray) #25

You can find answer in this topic …maybe :banana:


(Awol) #26

No I don’t have WeaponStats figured out. I have nothing to base it or where to start in hacking it to figure it out. I think Splash Damage needs to tell us what this is and how it works.


(SyRinX) #27

Working on it as I speak… I’ve figured a few things in the WeaponStats line. However, this line is variable, meaning that the number of digits is unknown at start. I just don’t know how to determine this yet though. But in the line, you have all the weapon stats (hits/attempts/kills/deaths/headshots) for each weapon. Though, there must be a way to know how they group these stats.

Here’s a sample WeaponStats line I got on my server :

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

I think that the 264732 number which is always a pretty large number must be a bitflag or something like it… I have to figure it out. The rest of the stats are in the order I told you (hits/attempts/kills/deaths/headshots) for Colt (1/5/0/0/0), MP40 (0/0/0/8/0), Thompson (69/180/7/0/9), Grenade (3/5/3/0/0), Dynamite (0/6/0/0/0), Landmine (1/2/1/0/0).

2126 is the damage given, 936 the damage received. The rest of the numbers are XP points in an order which I don’t know. 34 = battle sense, 79 = engineering, 36 = light weapons. I dunno what are 0 and 19 nor the first 1’s in the beginning of the line.

Anyway… I’ll keep posting this thread when I get new developments…


(Awol) #28

The line being varible lenght doesn’t matter in perl I would use split on " " and it will just give me everything in an array that I can loop through to get the info. Yes I figure the 3 number in was a bitmask of the weapons just don’t know what the weapon values mean. Then after that which set of 5 numbers go to which weapons.

BTW the first number is the client number that I know for sure

Hmm so the last sets are exp I was wondering if XP was recorded after I find the few bugs I have left I will be posting my code as beta for those who want to test it out. Then I will help out with the weapon stats.

Those who wish to run my program as beta send me a PM and I will let you know when it aviaible. (Should be tomorrow is work doesn’t shove crap my way as soon as I walk in the door)


(SyRinX) #29

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…


(Spookstah) #30

Awol i want to test it, i think i did send you a pm yesterday about it already :slight_smile:


(Awol) #31

SyRinX for bit flags everything needs to be a power of 2 for it to work correctly you have some weapons listed as 9 and such this can’t be right

it would be something like this (this chart is made up as an example)


1 = colt
2 = luger
3 = (means colt and luger) 2 + 1
4 = mp40
5 = (means mp40 and colt)  4 + 1
6 = (mean mp40 and luger) 4 + 2
7 = (means mp40 luger and colt) 4 + 2 + 1
8 = thompson

So every weapons needs to be some power of 2 BTW from running some test for my stats program I think grenade number is 512.

Just reread were the numbers you were referring to for weapon was the column number when its in binary form right?

Stats program update… Later today I should have a beta ready to go out. Stay tuned if you PM me I will reply to it with a link to the zip file.


(SyRinX) #32

Yes well, actually, we’re saying the same thing. :slight_smile:
Basically, I reduced the weapon ID to it’s exponent for the power of 2. Meaning that grenade ID is 9 because 2^9 = 512. See?

And yes, therefore, the bitflags is a sum of these powers of 2.


(snakeinthegrass) #33

Welll hey guys, keep up the work… if ya ever need a server to test it on let me know, the funny farm will be glad too :banana:


(Awol) #34

LOL so I was reading it wrong… :slight_smile:

Though I might of been right as I was about to hit sumbit thats why I added the hard to read line about the columns :slight_smile:


(Awol) #35

Ok people in a few hours I will have a beta ready. I need to collect all the files and create the schema for the database, and write a little documentation on how to set it up and run.

For those who run multiple servers the database is setup for this but the code isn’t. It will be added later on when I come up with a good way for doing it. Until its just a matter of having a different perl program per server.

When I have everything ready I will be PMing those who have ask for it the link to the zip file. At that point I will not accept any more tester (for now) I belive I have 5 people willing to test this out.

Also you can head to my site and see the output I have which is plain and boring but functional :smiley:


(SyRinX) #36

By the way, do you have a <ET color codes> to <HTML colors> translation?

There are a lot of color codes and I know I can just go in ET and try’em all to check what they’re results are, but I was wondering if you had that already.


(Vaticool) #37

I have a question (below):

Does any of server stats establish player rank based on a rank matrix ?

I agree Aestats seems to be not longer maintained so I wont lick author’s @55 … but a feature I really find great in Aestat was its capability to establish rank as a rank matrix.

For those who don’t know, rank matrix takes in account ranks of players you are opposed to … so if you win vs noobs you gain less
if you win against l33t you gain more

I even don’t know how this could be implemented in RTCW ET stats but I find the feature very powerfull.

this was my 2 cents :drink:


(Awol) #38

No I don’t but they can be easily added in the php side of the program as I put the full unedited name in the database with color codes and all. I do plan on creating this for the final or release version as well. I am just saving it to last cause its an easy thing to do. I want to get rid of all the hard stuff first.

Also since its all in a database anything can be done with small changes to the php files including calculating total health given out (medpack given * 20)

Also does anyone know what this is


 55:13 Item: 17 weapon_magicammo2
 55:13 Item: 20 weapon_magicammo

I believe weapon_magicammo is the ammo boxes that are on some maps
but what is weapon_magicammo2 ??? Is there some other ammo boxes on racks that I’m missing when I play? Also does anyone know if the logs capture which type of ammo boxes were given? All I see if Ammo_Pack: # # and it can be for both types of ammo packs (normal 1 clip and super 2 clips ammo packs)


(SyRinX) #39

My parser computes the HTML name whenever a name is encountered in the log and saves it in the database. Although it is tempting to store the raw name in the database, I believe that generating it immediately takes off a load from the PHP side as you don’t have to compute over and over again the HTML name for players. Anyway… just my two cents.

Well, the magicammo line thing was there in vanilla RTCW as well and, as to my knowledge, it happened when players give out ammo. So, I don’t think it is associated with the ammo packs already in the map.

There doesn’t seem to be a way to retrieve the size of the ammo pack, but whatever size it is, the player gave out ammo to another player, whatever the size of the pack. IMO, it does not matter how much ammo the pack contained but the fact that the player gave out some does matter.


(Dawg) #40

The logical guess is *_magicammo2 refers to the megaammo packs. That is, the ones that you gain as a higher level fieldOps.

Dawg