1 (edited by sid 2008-01-22 01:01:16)

Topic: [TOOL] stats for teewars

Hi,
i wrote a little stats script for teewars. Get it here: http://teewars.meetr.de/teewars_stats.tar.bz2 Just a quick hack, but it works and maybe helps someone to write a better one. (If i have time maybe i'll write a better one myself wink)
It's opensource and you're free to do with it whatever you want, but please respect the copyright of the website design, i think its creative commons licensed but just ask the teewars guys before altering it.
To install it, first setup your server to log to a file, by starting it with ./teewars_srv -f my_config.cfg >> teewars.log. Then install jinja, which is described here: http://jinja.pocoo.org/download and run "stats.py teewars.log www/index.html", first argument is the logfile, the second the output file. You probably want to setup a cronjob to do this every 5 minutes or so.

I have the script running at http://teewars.meetr.de for my server at 87.118.118.174 and it runs pretty good, but if you find some bugs simply post here.

Have fun with it,
sid

2

Re: [TOOL] stats for teewars

http://www.teewars.com/?page=stats

big_smile

3

Re: [TOOL] stats for teewars

http://teewars.meetr.de/teewars-stats.tar.bz2
404 - Not Found sad

4

Re: [TOOL] stats for teewars

Oops, try http://teewars.meetr.de/teewars_stats.tar.bz2

5

Re: [TOOL] stats for teewars

nice

6 (edited by Inxo 2008-01-21 22:33:49)

Re: [TOOL] stats for teewars

sid, thanks. smile

If somebody is necessary, I can share written by me server monitor. smile
It shows the list of players on server. Example in the signature with this stats. smile
Sorry for English. smile

7

Re: [TOOL] stats for teewars

Please update URL in the first post. (:

8

Re: [TOOL] stats for teewars

Done wink

And inxo, it would be interesting to see yours!

9

Re: [TOOL] stats for teewars

I have two feature requests.

- "per weapon" kill stats (shotgun X kills, hammer Y kills and so on...)
- "player vs player" - something like "player1 killed player2 X times", few (one? two? three? all? ;) "best versus".

10 (edited by Daniel 2008-02-03 11:10:20)

Re: [TOOL] stats for teewars

edit:gone

11

Re: [TOOL] stats for teewars

lazy_bum wrote:

I have two feature requests.

- "per weapon" kill stats (shotgun X kills, hammer Y kills and so on...)
- "player vs player" - something like "player1 killed player2 X times", few (one? two? three? all? wink "best versus".

The first one is really easy, its already there but not displayed, i only need to write some js/css to show/hide it.

The second one is a bit more difficult, as there would be n^2 player combinations (ok, probably a lot less, but still too much). I think something like what Daniel implemented with top 5 killers/victims would make more sense and is pretty easy, too.

12 (edited by ShootMe 2008-01-24 02:10:04)

Re: [TOOL] stats for teewars

I had recently started writing a stats program as well. It only works for DM games right now and not all of it is done, but the program generates pages like this: http://wmdb.org/teewars
The main page and the player links are all that I have done so far.

13

Re: [TOOL] stats for teewars

@ShootMe
Looks impressive. (:

14 (edited by ShootMe 2008-01-24 06:37:03)

Re: [TOOL] stats for teewars

Got a little more completed in the program. The game stats page is now working as well. http://wmdb.org/teewars

And if you want to try it yourself you can download the program here http://wmdb.org/teewars/logger.zip

Just put the stats folder and the logger.jar file in the teewars directory or where ever the log file is.

For it to work the log file needs to be named teewars.log and you'll need Java JRE 6 to run it http://java.sun.com/javase/downloads/index.jsp

If you have that then you can run the jar file which will create the pages in the stats folder.

The main page only lists the top 500 and only people with 20 kills or more. The personal pages only list the 100 most people killed by that person.

15

Re: [TOOL] stats for teewars

Wow yikes
Really good job!

aka oop²

16 (edited by ShootMe 2008-01-25 10:05:44)

Re: [TOOL] stats for teewars

Another update, got the map statistics and awards page working now. I also changed it so only the top 250 are listed on main page and for player pages only 50 people are listed. The map pages also only list the top 50 people for that map and their kills/deaths/kpd for that map only. I also went ahead and got rid of any stats that might be based off of the player "nameless tee"

http://wmdb.org/teewars

I updated the zip file with the newer program. http://wmdb.org/teewars/logger.zip

And I also added the name of the server to the template pages(stats shown are for (- DM World -) 7626 Hammer kills, people must like the hammer smile

And apparently the server has crashed again! sad Last time it crashed I got an assert error

[4797e868][assert]: F:/projects/code/teewars/build_zone/work/teewars/teewars-0.3.3-src/src/engine/server/es_server.c(265): client_id is not valid

Im assuming its the same error, too bad ill have to wait till the morning to reset it.

17

Re: [TOOL] stats for teewars

Can anyone explain in detail how you create a log file and get it to work?

Thanks.

18

Re: [TOOL] stats for teewars

this stats thing is so COOL! i always play on DM world (it the only sever i can find with less than 100 ping) and I'm ranked number 141 big_smile!

my name is NOT clasic_traveller_die its CLASIC_TRAVELLER_DIEHARD classic traveller is a si-fi rpg from the same era as dungens and dragons lookit up on wikipedia smile

19 (edited by ShootMe 2008-01-25 19:37:34)

Re: [TOOL] stats for teewars

DangerousDale wrote:

Can anyone explain in detail how you create a log file and get it to work?

Thanks.

Its pretty simple and was explained in the top post,but to obtain a log for the server:

teewars_srv -f your_config.cfg >> teewars.log

and I should have - DM World - back up in an hour or so since Im heading that way soon. smile

20

Re: [TOOL] stats for teewars

I dont know what you mean by this.... what do i do with it??

What is this and where does it go??-->> teewars_srv -f your_config.cfg >> teewars.log

Not simple when you dont know what to do with it, your help with this will stop me from beating up my PC big_smile

Cheers,

Dale.

21

Re: [TOOL] stats for teewars

you start your server, just like usual, and in the end of the line, you add " >> teewars.log"

That will make the all the server output go to the file teewars.log in the same folder as the server.

If you don't know how to set up a server, I'd suggest the docs smile

Used to be very active waay back

22

Re: [TOOL] stats for teewars

I have read the docs thanks thats why im askin here and when i add >> teewars.log to the end it says in valid characters.

I have the server running fine just need the logs, what i would suggest is if you cant help me out by  explaing to me where the >> teewars.log does dont reply to my post.

23

Re: [TOOL] stats for teewars

Under windows, make a .bat file as follows:

cd c:\teewars_directory
teewars_srv -f your_config.cfg >> teewars.log

that should be all you need. if you are running something other than windows then that might be your problem

24

Re: [TOOL] stats for teewars

When you start a server, you type "teewars_srv -f my_config.cfg" into a console, right?

If you don't, then please post how you started your server.

If you do, you replace that with "teewars_srv -f your_config.cfg >> teewars.log"

What OS do you run?

Used to be very active waay back

25

Re: [TOOL] stats for teewars

is'nt it -f your_config.cfg > teewars.log in windows? i know i only used one > when i did it..try:
cd teewars dir (where teewars_srv.exe is)
teewars_srv.exe -f configfile.cfg > log.txt