Server Help

ASSS Questions - Displaying stats

Samapico - Wed Nov 03, 2010 5:43 pm
Post subject: Displaying stats
I'm looking for a way to display a bunch of stats at the end of a game, like:
Most kills : thisguy (154)
Most deaths : someotherguy (154)
[...]

This is pretty common, so I guess the code for that is probably floating around somewhere, but I can't find anything icon_sad.gif
I know it's probably quite simple, but why do something that's already been done? tongue.gif
Arnk Kilo Dylie - Wed Nov 03, 2010 5:58 pm
Post subject:
Probably because my code is too horrible to be released. I don't intend to document it, comment it, or detach it from the code template macros it uses, make a decent interface, etc. The only nice things I can say about it is that it is stable and does its job well--but I don't think I can say it will do someone else's job well.

I might consider releasing the next major version if I ever find the time to do that. It's really not quite simple, you would really be better off reinventing a simpler wheel in this case.
Samapico - Wed Nov 03, 2010 6:50 pm
Post subject:
Hmmmm, the only thing I can see complicating things (a lot) is players who play on both teams during a game...

I guess you have to save that player's game stats somewhere, and reset its game interval... and if he switches again, find the previous stats you saved, and set them?

I guess some playerextradata could do the trick

Any simpler solution?
Hakaku - Wed Nov 03, 2010 8:27 pm
Post subject:
If you're just aiming to use the basics, you could just use the stats interface and print the current game scores right before you end the current interval. The only drawback is that you can't obtain the scores of players who went offline unless you store them independently.

Anyhow, if it's of any use, I posted a simple example a while back of how to display a stats table for Warzone-style flag games. It doesn't distinguish between frequencies, nor does it take note of the top players, but it wouldn't be too difficult to implement.
Samapico - Wed Nov 03, 2010 8:54 pm
Post subject:
hmmm, I just realized I don't need to keep track of the top players anyway, since this is for an event that is played ~4v4 max... so I can just print all the stats in a table like in that example.

Thanks for that Hakaku, this should make my life easier icon_smile.gif


edit: works biggrin.gif
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group