Raptor007 / aq2-tng

Action Quake 2: The Next Generation. Raptor007's sandbox for testing changes. When verified stable, this code is pushed to the official aq2-tng repo:
https://github.com/aq2-tng/aq2-tng/tree/bots
4 stars 2 forks source link

Request: Stats condump/generated at end of map #96

Open lowkeyau opened 4 years ago

lowkeyau commented 4 years ago

Hey,

I'm topdeck, a player in the Australian AQ2 community. We've been running a few tournaments over the past 6 months and have been trying to find solutions to obtain stats on individual players in the hope of creating a ranking system. Is it possible to get an XML condump of stats at the end of each map / or to generate some sort of HTML report similar to speed/fragstats (http://quake2.doomdns.org/fragstats.html)?

Cheers in advance

Raptor007 commented 3 years ago

Sorry for the delay! I've been surprisingly busy with other things.

Dumping stats in some form would certainly be possible. Something like CSV or XML would be pretty easy. The only catch might be that Quake2 has nothing like SteamID to uniquely identify players, so you'll have to rely on their names in your analysis.

If you have an example of the kind of log Fragstats knows how to parse, I could make AQ2 output in that format too, and then you'd already have a utility available to do the analysis.

stan0x commented 3 years ago

Its posible to parse out .mvd2 demo files. Al info u need for player stats is collected there.

Other possibilities is to build a lua plugin for q2admin to collect the stats and put it in a dump file.

m4son commented 3 years ago

Just use a format like this https://github.com/janstuemmel/csgo-log/blob/master/example/example.log Basicaly the same as this in CSGO. When a player joins hes logged with his ID, name, ipaddress

Raptor007 commented 3 years ago

Unfortunately there is no "ID" in Quake2 because it's not tied to Steam, so it'd just be name and IP address, neither of which is a reliable identifier of unique players. A player could easily defeat rank-by-name by rejoining with a different name, but identifying by IP address would be better than nothing.

That CSGO example seems to log every event of the game as they happen. It'd be a lot of work for me to implement comprehensive event logging, and not much point if it's not even the data that would help @lowkeyau analyze statistics for ranking. I'd rather know what stats they'd like dumped at the end, and in what format if they have some other scripts ready to parse it like fragstats.

m4son commented 3 years ago

I know there is no unique ID, I meant ID player gets when joining a server for that session.

Why not adopting a logfile to existing nice-looking stats analyzers for modern games rather than fragstats which is old and useless? Tracks only frags +deaths. That's shit, I'm sorry.

I made a script for parsing MVD years ago. it ain't in detail but for a start it's good. Gives more than fragstats. Per weapon given/taken kills and streaks. http://tgt.mooo.com/stats/2016-04-21_233003_a5k_theLeftovers_plaza.txt What's missing is weapons stats, like acc hits/shots and that's is what people are asking the most, probably.

So, I am just saying, if you're going to do anything, do it properly. If not, just dump cmd "stats" for each player at the end to a csv file and @lowkeyau will be happy. Or at least extend "stats list" with more individuals stats and dump it to a console. It's saved then in MVD for example and ready to parse.

KaniZ0r commented 3 years ago

I'm working on with lua plugin for q2admin which gives players UUID. It currently requires users to register via discord bot and then add little script to config. I think it could be used for tracking individual player scores etc. since UUID is added to server side player object when user joins and login triggers so it's global variable for every other lua plugin there is.

Raptor007 commented 3 years ago

I was talking to stan0x about this, and it sounds like the end goal is something like this: http://ts3servut.com/z0rbot/stats/

So a good starting point might be the output of the stats command for each player, plus time played. I'll probably just do a plain text format if nobody has any other specific preference.

lowkeyau commented 2 years ago

Thanks for all the comments and for following this up. I'm actually only coming back into it now after a long hiatus. I'll have a read up on any of the changes, apologies I wasn't able to provide more insight into my thoughts, however it seems m4son and zorbot is pretty damned close.

lowkeyau commented 2 years ago

I know there is no unique ID, I meant ID player gets when joining a server for that session.

Why not adopting a logfile to existing nice-looking stats analyzers for modern games rather than fragstats which is old and useless? Tracks only frags +deaths. That's shit, I'm sorry.

I made a script for parsing MVD years ago. it ain't in detail but for a start it's good. Gives more than fragstats. Per weapon given/taken kills and streaks. http://tgt.mooo.com/stats/2016-04-21_233003_a5k_theLeftovers_plaza.txt What's missing is weapons stats, like acc hits/shots and that's is what people are asking the most, probably.

So, I am just saying, if you're going to do anything, do it properly. If not, just dump cmd "stats" for each player at the end to a csv file and @lowkeyau will be happy. Or at least extend "stats list" with more individuals stats and dump it to a console. It's saved then in MVD for example and ready to parse.

Sorry, just adding further clarification - fragstats was more just an example of something that could be a dump of information after a match. I have nil understanding of exactly what format that information could be generated in. Regarding the actual information, at the very minimum I was thinking an exact replication of the stats/score board in-game. I.e kills, deaths, damage and accuracy. Anything additional, i.e. headshots, fpm, weapon used % of the time, time alive etc would be a wonderful bonus (assists as well, which I noticed was a suggested enhancement).

Hope that helps, but, as I mentioned.. I'm more than a year late in reply.

darkshade9 commented 2 years ago

There has been a little bit of discussion around this at https://github.com/actionquake/distrib/issues/17

Regarding a unique ID, we could tie it to a cvar that is set in the player's config files or Player Setup menu, the value being the user's Discord ID. If one isn't setup, a hash of the player's name and IP address could be used, it would be less accurate, but the player who has setup their Discord ID still has accurate stat tracking.