Upvote Upvoted 68 Downvote Downvoted
1 2
trends.tf - TF2 stats collected from logs.tf
posted in Projects
1
#1
trends.tf
0 Frags +

trends.tf

All the useless stats you've ever wanted.

Currently running on the cheapest Azure instance I could find, so try not to hug it too hard. Initial page loads can be pretty slow (5-10s), but everything after that should be faster.

Around 2ish years of logs are imported. I eventually plan for everything to get imported, but for the moment I am only importing new logs.

This website is open source, so please feel free to open an issue or pull request. I will try to fix bugs, but I have a pretty big feature backlog already. If you would like to see a new feature, you can react to the issue and that will help me decide what to work on. At the moment I am trying to get the database ported to PostgreSQL so I can have multiple inserts running at once :)

[url=https://trends.tf/]trends.tf[/url]

All the useless stats you've ever wanted.

Currently running on the cheapest Azure instance I could find, so try not to hug it too hard. Initial page loads can be pretty slow (5-10s), but everything after that should be faster.

Around 2ish years of logs are imported. I eventually plan for everything to get imported, but for the moment I am only importing new logs.

This website is [url=https://github.com/Forty-Bot/trends.tf]open source[/url], so please feel free to [url=https://github.com/Forty-Bot/trends.tf/issues/new]open an issue[/url] or pull request. I will try to fix bugs, but I have a pretty big feature backlog already. If you would like to see a new feature, you can react to the issue and that will help me decide what to work on. At the moment I am trying to get the database ported to PostgreSQL so I can have multiple inserts running at once :)
2
#2
tf2pickup.org
15 Frags +

Looks straight out of 2010, but the details and the data are phenominal. Great job on this!

You may be intriuged to port into DigitalOcean and their App platform. The CI/CD as well as horizontal/vertical scalability is amazing for these types of projects - you just won't be able to run a local SQL DB in this environment, but you could just run a Droplet for an additional $5 or an AWS instance for free (for up to 12 months) or GCP (for up to 12 months) I have some credit I can send your way if you wish to experiment with this.

Looking forward to how this project grows!

Looks straight out of 2010, but the details and the data are phenominal. Great job on this!

You may be intriuged to port into DigitalOcean and their App platform. The CI/CD as well as horizontal/vertical scalability is amazing for these types of projects - you just won't be able to run a local SQL DB in this environment, but you could just run a Droplet for an additional $5 or an AWS instance for free (for up to 12 months) or GCP (for up to 12 months) I have some credit I can send your way if you wish to experiment with this.

Looking forward to how this project grows!
3
#3
8 Frags +

this is sick as fuck

this is sick as fuck
4
#4
trends.tf
8 Frags +
24Looks straight out of 2010, but the details and the data are phenominal. Great job on this!

Thanks! Any web design help would be great, since it's not really my area of expertise.

24You may be intriuged to port into DigitalOcean and their App platform. The CI/CD as well as horizontal/vertical scalability is amazing for these types of projects - you just won't be able to run a local SQL DB in this environment, but you could just run a Droplet for an additional $5 or an AWS instance for free (for up to 12 months) or GCP (for up to 12 months) I have some credit I can send your way if you wish to experiment with this.

I looked into it a while back, but I had $100 of credit on Azure, so I decided to use them (at least initially).

[quote=24]Looks straight out of 2010, but the details and the data are phenominal. Great job on this![/quote]

Thanks! Any web design help would be great, since it's not really my area of expertise.

[quote=24]
You may be intriuged to port into DigitalOcean and their App platform. The CI/CD as well as horizontal/vertical scalability is amazing for these types of projects - you just won't be able to run a local SQL DB in this environment, but you could just run a Droplet for an additional $5 or an AWS instance for free (for up to 12 months) or GCP (for up to 12 months) I have some credit I can send your way if you wish to experiment with this.
[/quote]

I looked into it a while back, but I had $100 of credit on Azure, so I decided to use them (at least initially).
5
#5
tf2pickup.org
0 Frags +
Forty-Bot

Gotcha, there's so much credit now everywhere lol.

To answer the web design help, try to use programs like AdobeXD or Figma. Both are free too!

[quote=Forty-Bot][/quote]
Gotcha, there's so much credit now everywhere lol.

To answer the web design help, try to use programs like AdobeXD or Figma. Both are free too!
6
#6
5 Frags +

These stats are really good. What I'd love to see now is if you could make a rankings leaderboard out of all the data you've made.

These stats are really good. What I'd love to see now is if you could make a rankings leaderboard out of all the data you've made.
7
#7
trends.tf
7 Frags +
MitchThese stats are really good. What I'd love to see now is if you could make a rankings leaderboard out of all the data you've made.

Yeah, I'd like to add some kind of elo eventually. But there are a lot of other things which need doing first.

[quote=Mitch]These stats are really good. What I'd love to see now is if you could make a rankings leaderboard out of all the data you've made.[/quote]

Yeah, I'd like to [url=https://github.com/Forty-Bot/trends.tf/issues/22]add some kind of elo[/url] eventually. But there are a lot of other things which need doing first.
8
#8
5 Frags +

would be sick if you could filter certain logs. shit like filtering out ultiduo logs

would be sick if you could filter certain logs. shit like filtering out ultiduo logs
9
#9
trends.tf
5 Frags +
janga7would be sick if you could filter certain logs. shit like filtering out ultiduo logs

Good idea. I made an issue for it.

edit: Seemed really simple, so I just added it. Have fun ;)

[quote=janga7]would be sick if you could filter certain logs. shit like filtering out ultiduo logs[/quote]

Good idea. I [url=https://github.com/Forty-Bot/trends.tf/issues/34]made an issue for it[/url].

edit: Seemed really simple, so I just added it. Have fun ;)
10
#10
3 Frags +

sick as frick, really great project.

sick as frick, really great project.
11
#11
1 Frags +
Forty-Botjanga7would be sick if you could filter certain logs. shit like filtering out ultiduo logs
Good idea. I made an issue for it.

edit: Seemed really simple, so I just added it. Have fun ;)

legend

[quote=Forty-Bot][quote=janga7]would be sick if you could filter certain logs. shit like filtering out ultiduo logs[/quote]

Good idea. I [url=https://github.com/Forty-Bot/trends.tf/issues/34]made an issue for it[/url].

edit: Seemed really simple, so I just added it. Have fun ;)[/quote]

legend
12
#12
0 Frags +

this is dope, thanks for putting the time in (:

this is dope, thanks for putting the time in (:
13
#13
trends.tf
10 Frags +

A little update:

I'm migrating the database from SQLite to PostgreSQL. I started this last week, and did the switchover this past weekend. However, some of the queries are now taking way longer than they used to. I am currently working on this. Availability might be a bit spotty until I can get to the bottom of things. I am also trying to get log importing back up, but that is going much slower than before too. Please be patient for the next few days :)

In the longer term, performance was and is a big problem with the site, even before switching databases. I would love if some more experienced developers could look over my schema/queries and help out.

A little update:

I'm migrating the database from SQLite to PostgreSQL. I started this last week, and did the switchover this past weekend. However, some of the queries are now taking way longer than they used to. I am currently working on this. Availability might be a bit spotty until I can get to the bottom of things. I am also trying to get log importing back up, but that is going much slower than before too. Please be patient for the next few days :)

In the longer term, performance was and is a big problem with the site, even before switching databases. I would love if some more experienced developers could look over my schema/queries and help out.
14
#14
serveme.tf
7 Frags +
Forty-BotA little update:

I'm migrating the database from SQLite to PostgreSQL. I started this last week, and did the switchover this past weekend. However, some of the queries are now taking way longer than they used to. I am currently working on this. Availability might be a bit spotty until I can get to the bottom of things. I am also trying to get log importing back up, but that is going much slower than before too. Please be patient for the next few days :)

In the longer term, performance was and is a big problem with the site, even before switching databases. I would love if some more experienced developers could look over my schema/queries and help out.

I'll take a look if you share some slow queries (use postgres' slow query logger) and the entire DDL (pg_dump --schema-only) and put it in a github gist.

[quote=Forty-Bot]A little update:

I'm migrating the database from SQLite to PostgreSQL. I started this last week, and did the switchover this past weekend. However, some of the queries are now taking way longer than they used to. I am currently working on this. Availability might be a bit spotty until I can get to the bottom of things. I am also trying to get log importing back up, but that is going much slower than before too. Please be patient for the next few days :)

In the longer term, performance was and is a big problem with the site, even before switching databases. I would love if some more experienced developers could look over my schema/queries and help out.[/quote]

I'll take a look if you share some slow queries (use postgres' slow query logger) and the entire DDL (pg_dump --schema-only) and put it in a github gist.
15
#15
trends.tf
3 Frags +

Ok, I've addressed most of the major performance issues. The responsiveness should be back to what it was before the migration. I'm still importing logs from the past week, but it is going much faster than it had been.

ArieI'll take a look if you share some slow queries (use postgres' slow query logger) and the entire DDL (pg_dump --schema-only) and put it in a github gist.

Here's the explain analyze output for the peers query, which is currently the slowest page on the site. And here is the schema. My current plan is to move most columns out of the round table to reduce the amount of data we have to read in that inner loop to determine win/loss statistics.

Ok, I've addressed most of the major performance issues. The responsiveness should be back to what it was before the migration. I'm still importing logs from the past week, but it is going much faster than it had been.

[quote=Arie]I'll take a look if you share some slow queries (use postgres' slow query logger) and the entire DDL (pg_dump --schema-only) and put it in a github gist.[/quote]

Here's the [url=https://explain.depesz.com/s/nHQZ]explain analyze output[/url] for the [url=https://github.com/Forty-Bot/trends.tf/blob/master/player.py#L241]peers query[/url], which is currently the slowest page on the site. And here is the [url=https://github.com/Forty-Bot/trends.tf/blob/master/schema.sql]schema[/url]. My current plan is to move most columns out of the round table to reduce the amount of data we have to read in that inner loop to determine win/loss statistics.
16
#16
serveme.tf
3 Frags +

Hehe, those are some cool queries, I was hoping you were just missing some indexes or something, but it looks like you got all that covered.

An on-the-fly aggregation like the peers is always going to be challenging, especially since you're trying to find the top 100 players most played with/against.
One thing I would consider, is to move "log_wlt" and "player_last" from views to materialized views (unlike a view these need their own indexes). You could update these materialized views (concurrently) after a new batch of log files is imported. This might improve part of the peers query.

Hehe, those are some cool queries, I was hoping you were just missing some indexes or something, but it looks like you got all that covered.

An on-the-fly aggregation like the peers is always going to be challenging, especially since you're trying to find the top 100 players most played with/against.
One thing I would consider, is to move "log_wlt" and "player_last" from views to materialized views (unlike a view these need their own indexes). You could update these materialized views (concurrently) after a new batch of log files is imported. This might improve part of the peers query.
17
#17
tf2pickup.org
-1 Frags +

does this site has any sort of API? it would be cool to have it because then we could use it for skill prediction on tf2pickup.org I guess + some option to filter 6v6/hl/2v2 games out from the rest when checking a player
that would be way cooler than looking at the divisions on etf2l for europeans, in case of burgers there is probably no good way to do that atm
no idea about apac

ps: this is probably the biggest issue why we don't have a european pickup site atm

does this site has any sort of API? it would be cool to have it because then we could use it for skill prediction on tf2pickup.org I guess + some option to filter 6v6/hl/2v2 games out from the rest when checking a player
that would be way cooler than looking at the divisions on etf2l for europeans, in case of burgers there is probably no good way to do that atm
no idea about apac

ps: this is probably the biggest issue why we don't have a european pickup site atm
18
#18
0 Frags +

couple things i noticed

-tried filtering blaze's logs down to just soldier on product in the logs.tf era, and it returned nothing
-is there a way to generate winrate after filtering out ultiduo and stuff?
-b4nny has 283% acc on pyro
-class stats seem inaccurate. it is claiming arrek is undefeated on sniper, n=5. is that like, logs where he played majority sniper

cheers. don't change the design. every website built after 2010 looks like shit

couple things i noticed

-tried filtering blaze's logs down to just soldier on product in the logs.tf era, and it returned nothing
-is there a way to generate winrate [i]after[/i] filtering out ultiduo and stuff?
-b4nny has 283% acc on pyro
-class stats seem inaccurate. it is claiming arrek is undefeated on sniper, n=5. is that like, logs where he played [i]majority[/i] sniper

cheers. don't change the design. every website built after 2010 looks like shit
19
#19
1 Frags +
glasscouple things i noticed

-tried filtering blaze's logs down to just soldier on product in the logs.tf era, and it returned nothing
-is there a way to generate winrate after filtering out ultiduo and stuff?
-b4nny has 283% acc on pyro
-class stats seem inaccurate. it is claiming arrek is undefeated on sniper, n=5. is that like, logs where he played majority sniper

cheers. don't change the design. every website built after 2010 looks like shit

the pyro acc is possible because of the detonator or other flare guns

[quote=glass]couple things i noticed

-tried filtering blaze's logs down to just soldier on product in the logs.tf era, and it returned nothing
-is there a way to generate winrate [i]after[/i] filtering out ultiduo and stuff?
-b4nny has 283% acc on pyro
-class stats seem inaccurate. it is claiming arrek is undefeated on sniper, n=5. is that like, logs where he played [i]majority[/i] sniper

cheers. don't change the design. every website built after 2010 looks like shit[/quote]

the pyro acc is possible because of the detonator or other flare guns
20
#20
trends.tf
2 Frags +
ArieOne thing I would consider, is to move "log_wlt" and "player_last" from views to materialized views (unlike a view these need their own indexes). You could update these materialized views (concurrently) after a new batch of log files is imported. This might improve part of the peers query.

Hm, that's a good idea. Previously, player_last was a table, which I suppose is a kind of manually-materialized view.

supradoes this site has any sort of API?

Nope. Please send a PR :)

it would be cool to have it because then we could use it for skill prediction on tf2pickup.org I guess

This is being tracked by this issue. But it's not very high on the list of priorities atm. Though part of the reason for switching to postgres in the first place was so I could have multiple processes modifying the database at once, such as a process which calculated elo.

+ some option to filter 6v6/hl/2v2 games out from the rest when checking a player
that would be way cooler than looking at the divisions on etf2l for europeans, in case of burgers there is probably no good way to do that atm
no idea about apac

ps: this is probably the biggest issue why we don't have a european pickup site atm

I want to start scraping RGL at some point (see this issue). Unfortunately, RGL doesn't really have an API, so I'd have to scrape their site :l. Honestly, if ETF2L has an API I would look into them first.

glasscouple things i noticed

-tried filtering blaze's logs down to just soldier on product in the logs.tf era, and it returned nothing

Can you link? Thanks.

-is there a way to generate winrate after filtering out ultiduo and stuff?

Nope, sorry. I'm working on adding filters for every page on the site, but the overview hasn't gotten that treatment yet. Though perhaps I could just add this to the totals page...

-b4nny has 283% acc on pyroTimTumthe pyro acc is possible because of the detonator or other flare guns

Basically this. At the moment there is not too much processing on top of raw stats from logs.tf. So if/when I write my own logs parser we can address this. But until then pyro will always have like 3x the hits vs shots.

-class stats seem inaccurate. it is claiming arrek is undefeated on sniper, n=5. is that like, logs where he played majority sniper

Winrate is calculated based on games with at least ⅔ time on this class. You can hover over the column headers and the tooltip will show some of the criteria. DPM, accuracy, and time played are based on all times you played that class.

cheers. don't change the design. every website built after 2010 looks like shit

I didn't have much of a choice :)

(that being said, if anyone can help me make a logo/favicon or can help with the CSS, I'd appreciate it)

[quote=Arie]One thing I would consider, is to move "log_wlt" and "player_last" from views to materialized views (unlike a view these need their own indexes). You could update these materialized views (concurrently) after a new batch of log files is imported. This might improve part of the peers query.[/quote]

Hm, that's a good idea. Previously, player_last was a table, which I suppose is a kind of manually-materialized view.

[quote=supra]does this site has any sort of API?[/quote]

Nope. Please send a PR :)

[quote]it would be cool to have it because then we could use it for skill prediction on tf2pickup.org I guess[/quote]

This is being tracked by [url=https://github.com/Forty-Bot/trends.tf/issues/22]this issue[/url]. But it's not very high on the list of priorities atm. Though part of the reason for switching to postgres in the first place was so I could have multiple processes modifying the database at once, such as a process which calculated elo.

[quote] + some option to filter 6v6/hl/2v2 games out from the rest when checking a player
that would be way cooler than looking at the divisions on etf2l for europeans, in case of burgers there is probably no good way to do that atm
no idea about apac

ps: this is probably the biggest issue why we don't have a european pickup site atm[/quote]

I want to start scraping RGL at some point (see [url=https://github.com/Forty-Bot/trends.tf/issues/28]this issue[/url]). Unfortunately, RGL doesn't really have an API, so I'd have to scrape their site :l. Honestly, if ETF2L has an API I would look into them first.

[quote=glass]couple things i noticed

-tried filtering blaze's logs down to just soldier on product in the logs.tf era, and it returned nothing
[/quote]

Can you link? Thanks.

[quote]-is there a way to generate winrate [i]after[/i] filtering out ultiduo and stuff?[/quote]

Nope, sorry. I'm working on adding filters for every page on the site, but the overview hasn't gotten that treatment yet. Though perhaps I could just add this to the totals page...

[quote]-b4nny has 283% acc on pyro[/quote]
[quote=TimTum]the pyro acc is possible because of the detonator or other flare guns[/quote]

Basically this. At the moment there is not too much processing on top of raw stats from logs.tf. So if/when I write my own logs parser we can address this. But until then pyro will always have like 3x the hits vs shots.

[quote]-class stats seem inaccurate. it is claiming arrek is undefeated on sniper, n=5. is that like, logs where he played [i]majority[/i] sniper[/quote]

Winrate is calculated based on games with at least ⅔ time on this class. You can hover over the column headers and the tooltip will show some of the criteria. DPM, accuracy, and time played are based on all times you played that class.

[quote]cheers. don't change the design. every website built after 2010 looks like shit[/quote]

I didn't have much of a choice :)

(that being said, if anyone can help me make a logo/favicon or can help with the CSS, I'd appreciate it)
21
#21
1 Frags +
Forty-Bot + some option to filter 6v6/hl/2v2 games out from the rest when checking a player
that would be way cooler than looking at the divisions on etf2l for europeans, in case of burgers there is probably no good way to do that atm
no idea about apac

ps: this is probably the biggest issue why we don't have a european pickup site atm

I want to start scraping RGL at some point (see this issue). Unfortunately, RGL doesn't really have an API, so I'd have to scrape their site :l. Honestly, if ETF2L has an API I would look into them first.

https://api.etf2l.org/

[quote=Forty-Bot][quote] + some option to filter 6v6/hl/2v2 games out from the rest when checking a player
that would be way cooler than looking at the divisions on etf2l for europeans, in case of burgers there is probably no good way to do that atm
no idea about apac

ps: this is probably the biggest issue why we don't have a european pickup site atm[/quote]

I want to start scraping RGL at some point (see [url=https://github.com/Forty-Bot/trends.tf/issues/28]this issue[/url]). Unfortunately, RGL doesn't really have an API, so I'd have to scrape their site :l. Honestly, if ETF2L has an API I would look into them first.

[/quote]

https://api.etf2l.org/
22
#22
trends.tf
4 Frags +

Feature update:

  • You can now sort the logs, peers, and weapons pages by (almost) every column. So e.g. you can find your highest DPM log, or the player you have the best winrate with.
  • There is now a leaderboard which ranks players by winrate with 50 wins/losses added (to help filter out players who have 100% winrate over 5 games). You can also sort by raw winrate, time played, and number of logs played. In addition, you can filter by class, map, and format, making it easy to answer questions like "Who's the best pyro player in Prolander on koth maps". Currently, leaderboard stats are recalculated every night.
  • And just for glass, I added the overview stats (winrate, W-L-T, etc.) to the totals page so you can filter by class.
Feature update:

[list]
[*] You can now sort the logs, peers, and weapons pages by (almost) every column. So e.g. you can find your highest DPM log, or the player you have the best winrate with.
[*] There is now a [url=https://trends.tf/leaderboard]leaderboard[/url] which ranks players by winrate with 50 wins/losses added (to help filter out players who have 100% winrate over 5 games). You can also sort by raw winrate, time played, and number of logs played. In addition, you can filter by class, map, and format, making it easy to answer questions like "Who's the best pyro player in Prolander on koth maps". Currently, leaderboard stats are recalculated every night.
[*] And just for glass, I added the overview stats (winrate, W-L-T, etc.) to the totals page so you can filter by class.
[/list]
23
#23
trends.tf
5 Frags +

Feature update:

  • Avatars are now displayed on player profiles, search results, and on the leaderboard and peers pages. Player pages now use their name on steam.
  • I added a temporary site logo/favicon. I am still looking for someone to design a proper one.
  • The totals page now shows averages either per minute (for damage) or per 30m (for kills, etc.).
  • The weapons page now shows totals for kills, damage, logs, and time played.
  • There is now a discord which you can use to suggest features or report bugs.
Feature update:

[list]
[*] Avatars are now displayed on player profiles, search results, and on the leaderboard and peers pages. Player pages now use their name on steam.
[*] I added a temporary site logo/favicon. I am still looking for someone to design a proper one.
[*] The totals page now shows averages either per minute (for damage) or per 30m (for kills, etc.).
[*] The weapons page now shows totals for kills, damage, logs, and time played.
[*] There is now [url=https://discord.gg/szeZmthBa4]a discord[/url] which you can use to suggest features or report bugs.
[/list]
24
#24
trends.tf
6 Frags +

Feature update:

  • You can now view logs on the site. It is possible to combine up to five logs and view them just like an individual log. This should hopefully make manual log combiners mostly unnecessary.

    Some stats are not displayed. Medic stats like "average time before healing" are not displayed because it is impossible to display them accurately for multiple logs. In the future, I may display them as a list. Other stats like killstreaks and per-round stats are not currently extracted from the log summary information.
  • Replaced the trends chart library with C3.js (thanks Bv!). This should help with performance.
  • You can now vary the size of the rolling average on the trends page.
  • There are now links to RGL, UGC, ETF2L, and OZFortress on player profile pages.
Feature update:

[list]
[*] You can now view logs on the site. It is possible to combine up to five logs and view them just like an individual log. This should hopefully make manual log combiners mostly unnecessary.

Some stats are not displayed. Medic stats like "average time before healing" are not displayed because it is impossible to display them accurately for multiple logs. In the future, I may display them as a list. Other stats like killstreaks and per-round stats are not currently extracted from the log summary information.
[*] Replaced the trends chart library with C3.js (thanks Bv!). This should help with performance.
[*] You can now vary the size of the rolling average on the trends page.
[*] There are now links to RGL, UGC, ETF2L, and OZFortress on player profile pages.
[/list]
25
#25
0 Frags +

is the "peers" page using all the logs? It seems to be missing peers I played with in the distant past a lot

EDIT okay I see now the oldest log is 2019

is the "peers" page using all the logs? It seems to be missing peers I played with in the distant past a lot

EDIT okay I see now the oldest log is 2019
26
#26
1 Frags +
Forty-BotSome stats are not displayed. Medic stats like "average time before healing" are not displayed because it is impossible to display them accurately for multiple logs.

Fwiw you can get this by multiplying avg time before healing by deaths for each log, to get total time, then add this up and divide by total deaths.

[quote=Forty-Bot]Some stats are not displayed. Medic stats like "average time before healing" are not displayed because it is impossible to display them accurately for multiple logs.[/quote]

Fwiw you can get this by multiplying avg time before healing by deaths for each log, to get total time, then add this up and divide by total deaths.
27
#27
trends.tf
1 Frags +
Hedgeis the "peers" page using all the logs? It seems to be missing peers I played with in the distant past a lot

EDIT okay I see now the oldest log is 2019

I've been holding off on importing all the logs

  • so I can work out the kinks in the importer
  • so I can work on the performance (more data means slower site)
  • until I migrate to a server with a larger disk
JMaxchillForty-BotSome stats are not displayed. Medic stats like "average time before healing" are not displayed because it is impossible to display them accurately for multiple logs.
Fwiw you can get this by multiplying avg time before healing by deaths for each log, to get total time, then add this up and divide by total deaths.

This will give incorrect results. You need to use respawns and not deaths, since you always respawn at the start of each round. Unfortunately, this is not recorded by logs.tf. Really, the only way to fix this would be to use an alternative parser.

[quote=Hedge]is the "peers" page using all the logs? It seems to be missing peers I played with in the distant past a lot

EDIT okay I see now the oldest log is 2019[/quote]

I've been holding off on importing all the logs

[list]
[*] so I can work out the kinks in the importer
[*] so I can work on the performance (more data means slower site)
[*] until I migrate to a server with a larger disk
[/list]

[quote=JMaxchill][quote=Forty-Bot]Some stats are not displayed. Medic stats like "average time before healing" are not displayed because it is impossible to display them accurately for multiple logs.[/quote]

Fwiw you can get this by multiplying avg time before healing by deaths for each log, to get total time, then add this up and divide by total deaths.[/quote]

This will give incorrect results. You need to use respawns and not deaths, since you always respawn at the start of each round. Unfortunately, this is not recorded by logs.tf. Really, the only way to fix this would be to use an alternative parser.
28
#28
2 Frags +

https://cdn.discordapp.com/attachments/556302040943296512/900634192583467038/s7hardlyworking.png

[img]https://cdn.discordapp.com/attachments/556302040943296512/900634192583467038/s7hardlyworking.png[/img]
29
#29
3 Frags +
Forty-BotThis will give incorrect results. You need to use respawns and not deaths, since you always respawn at the start of each round. Unfortunately, this is not recorded by logs.tf. Really, the only way to fix this would be to use an alternative parser.

Just had a look at a log file (link, vod) and it turns out neither of us are right - it almost measures the time between spawning and healing damage (ie not just buffing someone on rollout) but that doesn't seem to be what it's actually doing. Looking for

"4.T Domo<3><[U:1:96525192]><Blue>" triggered "first_heal_after_spawn"

and working backwards, we see that on the first mid, it took Domo 20.1s to trigger this (healing toemas). Before that happened, he buffed players from full health to rollout, healed papi from his pocket rollout, then at mid papi took damage and was healed (though not enough damage to remove his buff). Finally, toemas took damage from the other team, taking him below full health, and was healed by Domo to trigger the log event.

I've not checked in this detail on other logs, but this suggests "Average time before healing" is time before healing damage done by the other team to take a player below full health, and as such is not only difficult to reverse engineer but also mildly pointless.

[quote=Forty-Bot]This will give incorrect results. You need to use respawns and not deaths, since you always respawn at the start of each round. Unfortunately, this is not recorded by logs.tf. Really, the only way to fix this would be to use an alternative parser.[/quote]

Just had a look at a log file ([url=https://logs.tf/3020061]link[/url], [url=https://www.twitch.tv/videos/1142855688]vod[/url]) and it turns out neither of us are right - it almost measures the time between spawning and healing damage (ie not just buffing someone on rollout) but that doesn't seem to be what it's actually doing. Looking for [code]"4.T Domo<3><[U:1:96525192]><Blue>" triggered "first_heal_after_spawn"[/code] and working backwards, we see that on the first mid, it took Domo 20.1s to trigger this (healing toemas). Before that happened, he buffed players from full health to rollout, healed papi from his pocket rollout, then at mid papi took damage and was healed (though not enough damage to remove his buff). Finally, toemas took damage from the other team, taking him below full health, and was healed by Domo to trigger the log event.

I've not checked in this detail on other logs, but this suggests "Average time before healing" is time before healing damage done by the other team to take a player below full health, and as such is not only difficult to reverse engineer but also mildly pointless.
30
#30
4 Frags +
JMaxchill

Hey there!
Guy that spent way to much time trying to recreate the logs.tf parser as closely as possible here:

"Average time before healing" most definitely corresponds to the event "first_heal_after_spawn".
All it does is just save all the times logged by that in a list and average it out at the end.

The reason it takes 20.1s before the event gets logged is because of the decision made by F2 (who wrote the medicstats SM plugin) which is to wait at least 20 seconds from when the last round ended before saying that the medic "spawned".
You can see the relevant lines related to logging the event "first_heal_after_spawn" here and the code where it sets the "MedicInitialHealSpawnTime" here.
Hope that clears up all the confusion around it :)

[quote=JMaxchill][/quote]
Hey there!
Guy that spent way to much time trying to [url=https://github.com/TheBv/logstf-parser]recreate[/url] the logs.tf parser as closely as possible here:

"Average time before healing" most definitely corresponds to the event "first_heal_after_spawn".
All it does is just save all the times logged by that in a list and average it out at the end.

The reason it takes 20.1s before the event gets logged is because of the decision made by F2 (who wrote the medicstats SM plugin) which is to wait at least 20 seconds from when the last round ended before saying that the medic "spawned".
You can see the relevant lines related to logging the event "first_heal_after_spawn" [url=https://github.com/F2/F2s-sourcemod-plugins/blob/1fc730995a7cc7b068a06c8b7bf3970f298f6e8b/medicstats/medicstats.sp#L251]here[/url] and the code where it sets the "MedicInitialHealSpawnTime" [url=https://github.com/F2/F2s-sourcemod-plugins/blob/1fc730995a7cc7b068a06c8b7bf3970f298f6e8b/medicstats/medicstats.sp#L467]here[/url].
Hope that clears up all the confusion around it :)
1 2
Please sign in through STEAM to post a comment.