TF2 and Data

NoodleCollie

Stoat fiend
aa
Jul 30, 2009
383
335
This term at university I have to do a data analytics project on some data set of my choosing, which got me thinking about what interesting data I might be able to collect from TF2/TF2Maps. This could include both data that's already collected and available (eg. map feedback) and data which I could collect myself (eg. querying the Steam API, tracking player scores by pinging servers, scraping HTML data, ...).

Are there any interesting data sources we have that I might be able/allowed to utilise? One of the things I've been contemplating is whether there's any way to gauge overall player satisfaction of a map being tested from data that's available during a test, eg. how long players stay on the map, how many times they die, their kill/death ratio, how many points they earn, whether there's a particular skew in the distribution of points (one team dominating the other), and so on. Some of this (points, play time, etc.) I'd theoretically be able to collect from ping responses, but kills and other more in-depth stats would likely require writing a SourceMod plugin.

Is this something that might be feasible? Is it something I'd need consent from players to collect, if it involves holding details that relate to their Steam accounts (total time playing TF2, etc)?
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,701
2,583
Valve used to collect and publish all kinds of data on their official maps directly through Steam, but I think they've shut that down at this point.
 

NoodleCollie

Stoat fiend
aa
Jul 30, 2009
383
335
Where the heatmaps.tf API allows a query by damage bits, is the check done via a bitwise comparison or not? Ie. if I sent a query for all kills with blast damage, would the results returned be those with blast damage only or where blast damage was potentially combined with other types?
 

Geit

💜 I probably broke it 💜
aa
May 28, 2009
598
1,161
Where the heatmaps.tf API allows a query by damage bits, is the check done via a bitwise comparison or not? Ie. if I sent a query for all kills with blast damage, would the results returned be those with blast damage only or where blast damage was potentially combined with other types?


You can't (currently) ask the API to filter by damagebits, you can only filter by killer_team, killer_class and victim_class - If you want to filter by damagebits, just pull in all the data and filter it on the client side how you wish. I still haven't got around to doing my university work on the API, but I will be soon!
 

Geit

💜 I probably broke it 💜
aa
May 28, 2009
598
1,161
you need to set the fields parameter to the data you want returned. It's a CSV field that accepts the following options:

  • id - The internal identifier for this kill
  • timestamp - The UNIX timestamp at which this kill occured
  • killer_class - The class of the killer (see Class Indexes)
  • killer_weapon - The weapon of the killer (see Item Indexes)
  • killer_x
  • killer_y
  • killer_z
  • victim_class - The class of the killer (see Class Indexes)
  • victim_x
  • victim_y
  • victim_z
  • customkill - The custom kill bits for this kill (see Custom Kill)
  • damagebits - The damage bits for this kill (see Damage Bits)
  • death_flags - The death flags for this kill (see Death Flags)
  • team - The team of the killer
e.g. ?fields=damagebits,team,killer_x,killer_y,killer_z