Upvote Upvoted 1 Downvote Downvoted
Custom Stats Retrieval? Mods/Plugins that do this?
posted in Customization
1
#1
0 Frags +

Hey all,

I've been wondering for awhile if it's possible to track and collect very specific stats during my playtime. I'm not sure if there's a mod for this already, or if it'd be a very technical endeavor to make one, but I'd be interested in trying my hand at it. I'm just not really sure how the system works for this. I'm thinking of plugins like Sizzling Stats and Logs.tf - do those pull numbers from a database that the server or game itself keeps, or does it create the numbers off of specific, coded triggers?

My primary curiosity is about accuracy, probably in the form of shots fired:shots landed. Then, if possible, I'd like to expand it to looking at average damage per landed shot, and other similar micro-analysis stats.

I guess, in short, my questions are: Is this level of analysis even possible by the game engine? And, if so, where does one begin gathering the data to make this analysis possible?

I'm aware that it'll likely not be a casual project, but I'm curious nonetheless. Thanks for any input you have.

--Lilith.

Hey all,

I've been wondering for awhile if it's possible to track and collect very specific stats during my playtime. I'm not sure if there's a mod for this already, or if it'd be a very technical endeavor to make one, but I'd be interested in trying my hand at it. I'm just not really sure how the system works for this. I'm thinking of plugins like Sizzling Stats and Logs.tf - do those pull numbers from a database that the server or game itself keeps, or does it create the numbers off of specific, coded triggers?

My primary curiosity is about accuracy, probably in the form of shots fired:shots landed. Then, if possible, I'd like to expand it to looking at average damage per landed shot, and other similar micro-analysis stats.

I guess, in short, my questions are: Is this level of analysis even possible by the game engine? And, if so, where does one begin gathering the data to make this analysis possible?

I'm aware that it'll likely not be a casual project, but I'm curious nonetheless. Thanks for any input you have.

--Lilith.
2
#2
serveme.tf
5 Frags +

Sizzling and logs.tf work on log lines. Sizzling works on streaming logs (every log line gets sent to sizzling when it happens), while logs.tf parses log files uploaded to the service.
Some log lines are built-in by default to the TF2 server, others are added by plugins (heals, damage, accuracy, airshots).

If you want accuracy stats and damage per shot, this is what you need:

- A plugin that supports accuracy logs, e.g.: TFTrue with tftrue_logs_accuracy 1.
- A server with this plugin loaded and setting enabled.
- Either you get the logs from the server after your match and process it. Or you build a log listener program that can receive streaming logfiles (through the logaddress_add command) and you could do it live.

Sizzling and logs.tf work on log lines. Sizzling works on streaming logs (every log line gets sent to sizzling when it happens), while logs.tf parses log files uploaded to the service.
Some log lines are built-in by default to the TF2 server, others are added by plugins (heals, damage, accuracy, airshots).

If you want accuracy stats and damage per shot, this is what you need:

- A plugin that supports accuracy logs, e.g.: TFTrue with tftrue_logs_accuracy 1.
- A server with this plugin loaded and setting enabled.
- Either you get the logs from the server after your match and process it. Or you build a log listener program that can receive streaming logfiles (through the logaddress_add command) and you could do it live.
3
#3
SizzlingStats
5 Frags +

SizzlingStats doesn't parse log lines/files, it reads data directly from game memory. For non scoreboard stats, it does custom game event handling and tracks the stats manually. At the end of tournament rounds, the stats are formatted and shipped off to the web server.

SizzlingStats doesn't parse log lines/files, it reads data directly from game memory. For non scoreboard stats, it does custom game event handling and tracks the stats manually. At the end of tournament rounds, the stats are formatted and shipped off to the web server.
4
#4
serveme.tf
1 Frags +
SizzlingCalamariSizzlingStats doesn't parse log lines/files, it reads data directly from game memory. For non scoreboard stats, it does custom game event handling and tracks the stats manually. At the end of tournament rounds, the stats are formatted and shipped off to the web server.

Oh wut....I though this was a dead giveaway: https://github.com/SizzlingStats/sizzlingplugins/blob/master/sizzlingstats/LogStats.cpp#L148

Guess I was wrong :)

[quote=SizzlingCalamari]SizzlingStats doesn't parse log lines/files, it reads data directly from game memory. For non scoreboard stats, it does custom game event handling and tracks the stats manually. At the end of tournament rounds, the stats are formatted and shipped off to the web server.[/quote]

Oh wut....I though this was a dead giveaway: https://github.com/SizzlingStats/sizzlingplugins/blob/master/sizzlingstats/LogStats.cpp#L148

Guess I was wrong :)
5
#5
SizzlingStats
0 Frags +

That code was just part of a test we were doing at one point. Same with any proto stats or event stats code.

KayleeSeranadaI guess, in short, my questions are: Is this level of analysis even possible by the game engine? And, if so, where does one begin gathering the data to make this analysis possible?

Last I checked, there wasn't an easy way to get this data without some funky c++ work. That's exactly what AnAkkk did in TFTrue. https://github.com/AnAkkk/TFTrue/blob/public/logs.cpp#L655

So you could either mess with the code and build a custom plugin, or use tftrue_logs_accuracy in TFTrue.

That code was just part of a test we were doing at one point. Same with any proto stats or event stats code.

[quote=KayleeSeranada]I guess, in short, my questions are: Is this level of analysis even possible by the game engine? And, if so, where does one begin gathering the data to make this analysis possible?[/quote]

Last I checked, there wasn't an easy way to get this data without some funky c++ work. That's exactly what AnAkkk did in TFTrue. https://github.com/AnAkkk/TFTrue/blob/public/logs.cpp#L655

So you could either mess with the code and build a custom plugin, or use tftrue_logs_accuracy in TFTrue.
Please sign in through STEAM to post a comment.