ZDaemon Forum Index ZDaemon
Client/Server DOOM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DoomStats
Goto page 1, 2  Next
 
Post new topic   Reply to topic    ZDaemon Forum Index -> ZDaemon Help & Chatter
View previous topic :: View next topic  
Author Message
Punaxe
God like!


Joined: 14 Jun 2004
Location: the Netherlands Clan: [dp]

PostPosted: Thu Feb 12, 2009 10:32 am    Post subject: DoomStats Reply with quote

So, I finally started on a little application to extract statistics from logs.

Right now it's really simple, it just reads through logs and reports certain events:

Code:
if(line.startsWith(playername + " joined the game")) {
   events++; games++;
} else if(line.startsWith(playername + " rode") ||
   line.startsWith(playername + " chewed") ||
   line.startsWith(playername + " was") ||
   line.startsWith(playername + " couldn")) {
   events++; deaths++;
} else if(line.endsWith(playername + "'s fist.") ||
   line.endsWith(playername + "'s pea shooter.") ||
   line.endsWith(playername + "'s boomstick.") ||
   line.endsWith(playername + "'s super shotgun.") ||
   line.endsWith(playername + "'s chaingun.") ||
   line.endsWith(playername + "'s rocket.") ||
   line.endsWith(playername + "'s plasma gun.") ||
   line.endsWith(playername + "'s BFG.") ||
   line.endsWith("telefragged by " + playername + ".")) {
   events++; frags++;
} else if(line.startsWith(playername + " has taken")) {
   events++; touches++;
} else if(line.startsWith(playername + " scored")) {
   events++; scores++;
}


To in the end tell you the following:

Code:
Stats for [dp]Punaxe:
  Events found:   32343

  Games played:  ~668
  Frags:          15362
  Deaths:         13812
  Flag touches:   2030
  Scores:         471

  Frags/game:     23.0
  Frags/death:    1.11

  Scores/game:    0.71
  Scores/death:   0.03 (1 out of 29.3)
  Scores/touch:   0.23 (1 out of 4.3)
  Touches/death:  0.15 (1 out of 6.8)
  Touches/game:   3.04


For what it is so far, you can get it here. To run it, just get the .class file, put a log in the same dir, and (provided you have JRE), type "java DoomStats" in the command prompt when you're in the directory. The "a" file is 10 meg worth of my own logs since August 2008, chances are if you've been playing CTF during that period, you can extract some stats from it. To use your own logs, you're going to have to merge them all into one file first.

So, tell me. Did I cover all desired statistics? Is there something that could make it awesome?
Or, shatter my dreams and tell me someone already made this :(
Back to top
View user's profile Send private message Visit poster's website
Kayer-vd-PLAS
On a Rampage!


Joined: 09 Feb 2006

PostPosted: Thu Feb 12, 2009 11:35 am    Post subject: Reply with quote

Weapon stats maybe? :O
Back to top
View user's profile Send private message Visit poster's website
soncdoommario
Unstoppable!


Joined: 19 Jun 2004
Location: Attleboro, Massachusetts

PostPosted: Thu Feb 12, 2009 12:40 pm    Post subject: Reply with quote

Aw, now Chainsaw reference?

Don't worry, we've got the stats system covered for 1.09...

....I hope
Back to top
View user's profile Send private message Send e-mail AIM Address
andymun
Unstoppable!


Joined: 13 Mar 2006

PostPosted: Thu Feb 12, 2009 12:44 pm    Post subject: Reply with quote

Revstar created one a long time ago. They use it for the IDL.
Back to top
View user's profile Send private message
Punaxe
God like!


Joined: 14 Jun 2004
Location: the Netherlands Clan: [dp]

PostPosted: Thu Feb 12, 2009 1:11 pm    Post subject: Reply with quote

andymun wrote:
Revstar created one a long time ago. They use it for the IDL.

Wouldn't that be using the server's log? Isn't that different?

Anyway, included chainsaw and weapon stats.
Back to top
View user's profile Send private message Visit poster's website
andymun
Unstoppable!


Joined: 13 Mar 2006

PostPosted: Thu Feb 12, 2009 1:32 pm    Post subject: Reply with quote

Punaxe wrote:
andymun wrote:
Revstar created one a long time ago. They use it for the IDL.

Wouldn't that be using the server's log? Isn't that different?

Anyway, included chainsaw and weapon stats.

Record demo including txt file. Load the txt file with the program and it spits out stats.
Back to top
View user's profile Send private message
Punaxe
God like!


Joined: 14 Jun 2004
Location: the Netherlands Clan: [dp]

PostPosted: Thu Feb 12, 2009 1:36 pm    Post subject: Reply with quote

andymun wrote:
Punaxe wrote:
andymun wrote:
Revstar created one a long time ago. They use it for the IDL.

Wouldn't that be using the server's log? Isn't that different?

Anyway, included chainsaw and weapon stats.

Record demo including txt file. Load the txt file with the program and it spits out stats.

Alright, that's petty much the same then. Where can we get it? :3
Back to top
View user's profile Send private message Visit poster's website
andymun
Unstoppable!


Joined: 13 Mar 2006

PostPosted: Thu Feb 12, 2009 2:20 pm    Post subject: Reply with quote

Punaxe wrote:
andymun wrote:
Punaxe wrote:
andymun wrote:
Revstar created one a long time ago. They use it for the IDL.

Wouldn't that be using the server's log? Isn't that different?

Anyway, included chainsaw and weapon stats.

Record demo including txt file. Load the txt file with the program and it spits out stats.

Alright, that's petty much the same then. Where can we get it? :3

I'm not sure if it has been updated but it doesn't work as well with 1.08.07 because there's some more junk in the logs or some shit. You'll get the idea but. Download here.
Back to top
View user's profile Send private message
Punaxe
God like!


Joined: 14 Jun 2004
Location: the Netherlands Clan: [dp]

PostPosted: Thu Feb 12, 2009 2:33 pm    Post subject: Reply with quote

Ah yeah, I've had my hands on that before. It doesn't seem to provide very readable information in itself. Does IDL have a script running to interpret it or something?
Back to top
View user's profile Send private message Visit poster's website
ufon
God like!


Joined: 25 Aug 2003
Location: Czech republic

PostPosted: Thu Feb 12, 2009 4:31 pm    Post subject: Reply with quote

I wrote one too in c++ about a year or so back, the output was a simple txt file, unfortunatelly i don't have that anymore, neither the .exe nor the source code. Confused

edit: looking at your output, mine was a bit different for a different purpose, anyways good luck with the development, gonna check it out further when i can
Back to top
View user's profile Send private message
DX-Chain
God like!


Joined: 24 Jan 2006

PostPosted: Sat Feb 14, 2009 8:51 am    Post subject: Reply with quote

Per-match statistics organized by week

Overall IDL 5 statistics organized per map played and teams

All of this thanks to Revstar's little program he did a few seasons back Smile.
Back to top
View user's profile Send private message
Ladna
Posting Spree!


Joined: 26 Jul 2008

PostPosted: Sun Feb 15, 2009 6:21 am    Post subject: Reply with quote

Yeah Revstar's program was what inspired me to work with ZD stats, which led to me writing ZDStack... which is what provides the parsing for the official IDL stats.

You can see how ZDStack does this (mostly anyway) here: http://code.google.com/p/zdstack/source/browse/trunk/ZDStack/ServerRegexps.py. It doesn't have support for exotic weapons like the Railgun, and if a map changes the messages for any of the events they won't be picked up, but there's not much I can do about that except continually add regexps... which I hate Smile

I did write a small utility called stats2html (http://rapidshare.com/files/198254261/stats2html.py.html) which takes the output from Revstar's stats program and puts it in a nice, sortable HTML table.

I keep meaning to replace Revstar's program with something that can be scripted, and parses the new client logs correctly. As it stands now you have to run Windows, and I usually end up editing the output in Excel before running stats2html on it... not awesome. An enterprising young fellow (or lady) could easily use the companion ClientRegexps.py in ZDStack to replace Revstar's program themselves though...
Back to top
View user's profile Send private message
SuperNova
Unstoppable!


Joined: 12 May 2008
Location: Toledo, OH, Clan: >AC<

PostPosted: Sun Feb 15, 2009 8:57 am    Post subject: Reply with quote

Punaxe, the most important thing isn't even being logged in your application:

Wins and Losses.
Back to top
View user's profile Send private message
JKist3
Dominating!


Joined: 27 May 2003
Location: North Carolina

PostPosted: Mon Feb 16, 2009 2:54 am    Post subject: Reply with quote

nicely put
Back to top
View user's profile Send private message
revstar
Dominating!


Joined: 16 Jan 2007

PostPosted: Mon Feb 16, 2009 9:13 am    Post subject: Reply with quote

hey good work punaxe. maybe if you get a nice updated prog for stats it can replace mine Smile i have some time this year, so i might get to work on updating it so it deals with the extra stuff that gets spit out in the logs. i also might make it more useful somehow....

if people do want me to update mine, then perhaps writing down a list of fixes/updates they'd like to see, that would be good. it will give me a direction to work in.
Back to top
View user's profile Send private message
Dopefish
Dominating!


Joined: 18 Aug 2006
Location: From the shadows I come!

PostPosted: Wed Feb 18, 2009 6:15 pm    Post subject: Reply with quote

Oh..this is not good, now I will have to hear about Nero's great ratios and what not..hehe, anyway gj Very Happy
Back to top
View user's profile Send private message
dewww
God like!


Joined: 29 Dec 2006

PostPosted: Wed Feb 18, 2009 8:30 pm    Post subject: Reply with quote

SM*Dopefish wrote:
Oh..this is not good, now I will have to hear about Nero's great ratios and what not..hehe, anyway gj :D

YES! KILL IT WITH FIRE, QUICK!
Back to top
View user's profile Send private message
Fastidious
On a Rampage!


Joined: 08 Mar 2007

PostPosted: Fri Feb 20, 2009 1:58 am    Post subject: Reply with quote

After you crunch a log with revstar's program you take the output and open it in either excel or open office calc with comma delineation. I use calc and you can save to .html from there, which looks decent(not great). The only annoying thing is you have to cut out any pre/post game stuff and usually zdaemon startup info as that adds junk to the stats. Overall it seems to cover most things possible to log right now, and works well.
Back to top
View user's profile Send private message
Dopefish
Dominating!


Joined: 18 Aug 2006
Location: From the shadows I come!

PostPosted: Fri Feb 20, 2009 3:02 pm    Post subject: Reply with quote

I never used revstars programm, but use this Punaxe's code in the Netbeans and it is pretty quick, you just need to cut the pregames outta logs manually, but after that add name and path to the file and stats are done with easy copy and paste - Only disadvantage is that netbeans is slow when starting up and you have to own all the java crap in your pc Smile.
Back to top
View user's profile Send private message
_Beast_
Unstoppable!


Joined: 11 Nov 2006
Location: Clan [R]enegad3s

PostPosted: Sat Feb 21, 2009 8:00 pm    Post subject: Reply with quote

By own you mean, be the administrator of? When java is initially installed you should have to option to allow all users or just the administrator.

Looking at the IDL states makes me miss playing in the IDL this is the first season I sat out because I was too busy I can't wait for the summer season
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ZDaemon Forum Index -> ZDaemon Help & Chatter All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group