Upvote Upvoted 15 Downvote Downvoted
logs.tf -> Demo Ticks (Python Script)
posted in Projects
1
#1
0 Frags +

Heya. This is based on an idea from a friend of mine, pandaojo.
We always were slow whenever doing demo reviews with our team, or checking an STV demo of our matches to discuss mistakes and strategies. It occurred to him grabbing a log file straight from logs.tf and convert it into demo ticks with important events. I wrote a script from scratch that does this.

The script will show all major events on a log file, and get the corresponding tick respective to the STV demo (assuming the STV and log file start at the same time). It does have a little offset and isn't 100% exact, but it will get the closest tick to the event.

Currently, it only shows off über drops, über pops, airshots and round starts. Its main use is mainly for demo reviewing and these are the most important events in my consideration. I could make it better and add other events as well if demand is on it.
Feel free to fiddle with it as you like.

How to use?

  1. Run the script
  2. Get the log ID (ex.: logs.tf/2928367)
  3. Insert it into the input
  4. ???
  5. Profit

Download here (v1.1)
Raw (Source Code)

Download here (v1.0)
Raw (Source Code)

v1.1:
- Fixed a minor string formatting error regarding who airshots who.
- Made tick calculation more precise.

v1.0:
- Initial release.
Heya. This is based on an idea from a friend of mine, [url=https://steamcommunity.com/profiles/76561198162192537]pandaojo[/url].
We always were slow whenever doing demo reviews with our team, or checking an STV demo of our matches to discuss mistakes and strategies. It occurred to him grabbing a log file straight from [url=https://logs.tf/]logs.tf[/url] and convert it into demo ticks with important events. I wrote a script from scratch that does this.

The script will show all major events on a log file, and get the corresponding tick respective to the STV demo [i](assuming the STV and log file start at the same time)[/i]. It does have a little offset and isn't 100% exact, but it will get the closest tick to the event.

Currently, it only shows off [b]über drops[/b], [b]über pops[/b], [b]airshots[/b] and [b]round starts[/b]. Its main use is mainly for demo reviewing and these are the most important events in my consideration. I could make it better and add other events as well if demand is on it.
Feel free to fiddle with it as you like.

[b]How to use?[/b]
[olist]
[*] Run the script
[*] Get the log ID (ex.: logs.tf/[b]2928367[/b])
[*] Insert it into the input
[*] ???
[*] Profit
[/olist]

[b][url=https://pastebin.com/dl/WqUxYtbR]Download here (v1.1)[/url][/b]
[url=https://pastebin.com/raw/WqUxYtbR]Raw (Source Code)[/url]

[url=https://pastebin.com/dl/N85Bx7h8]Download here (v1.0)[/url]
[url=https://pastebin.com/raw/N85Bx7h8]Raw (Source Code)[/url]

[code]
v1.1:
- Fixed a minor string formatting error regarding who airshots who.
- Made tick calculation more precise.

v1.0:
- Initial release.
[/code]
2
#2
FBTF
1 Frags +

dont know if that's a conscious decision on your part or not but i think instead of downloading and extracting the logfile you could just have just made a request to the logstf api to retrieve the needed info

dont know if that's a conscious decision on your part or not but i think instead of downloading and extracting the logfile you could just have just made a request to the logstf api to retrieve the needed info
3
#3
1 Frags +
Zolakdont know if that's a conscious decision on your part or not but i think instead of downloading and extracting the logfile you could just have just made a request to the logstf api to retrieve the needed info

the api doesn't give you times for anything, it's the pre-parsed data that you see on screen

to get ticks you need the raw file with events, which is what you get when you DL it

[quote=Zolak]dont know if that's a conscious decision on your part or not but i think instead of downloading and extracting the logfile you could just have just made a request to the logstf api to retrieve the needed info[/quote]
the api doesn't give you times for anything, it's the pre-parsed data that you see on screen

to get ticks you need the raw file with events, which is what you get when you DL it
4
#4
FBTF
1 Frags +
JMaxchillZolakdont know if that's a conscious decision on your part or not but i think instead of downloading and extracting the logfile you could just have just made a request to the logstf api to retrieve the needed infothe api doesn't give you times for anything, it's the pre-parsed data that you see on screen

to get ticks you need the raw file with events, which is what you get when you DL it

I remember seeing once when playing around with it that most events had its times stored in the api, thats why i asked about it. If thats really not the case then all good

[quote=JMaxchill][quote=Zolak]dont know if that's a conscious decision on your part or not but i think instead of downloading and extracting the logfile you could just have just made a request to the logstf api to retrieve the needed info[/quote]
the api doesn't give you times for anything, it's the pre-parsed data that you see on screen

to get ticks you need the raw file with events, which is what you get when you DL it[/quote]

I remember seeing once when playing around with it that most events had its times stored in the api, thats why i asked about it. If thats really not the case then all good
5
#5
1 Frags +
ZolakJMaxchillZolakdont know if that's a conscious decision on your part or not but i think instead of downloading and extracting the logfile you could just have just made a request to the logstf api to retrieve the needed infothe api doesn't give you times for anything, it's the pre-parsed data that you see on screen

to get ticks you need the raw file with events, which is what you get when you DL it

I remember seeing once when playing around with it that most events had its times stored in the api, thats why i asked about it. If thats really not the case then all good

Yeah, what JMaxchill says is correct. There are no event times' information in the Logs.TF API, just pre-parsed data from the site just like you see it rendered.
This script grabs the raw log from the site, unzips and reads it entirely and calculates the approximate SourceTV Demo Tick for every major event. I will consider adding more events if players require them.

Btw, pushed a small "update" to the script to fix a silly formatting mistake (oops) and a more precise tick calculation.

[quote=Zolak][quote=JMaxchill][quote=Zolak]dont know if that's a conscious decision on your part or not but i think instead of downloading and extracting the logfile you could just have just made a request to the logstf api to retrieve the needed info[/quote]
the api doesn't give you times for anything, it's the pre-parsed data that you see on screen

to get ticks you need the raw file with events, which is what you get when you DL it[/quote]

I remember seeing once when playing around with it that most events had its times stored in the api, thats why i asked about it. If thats really not the case then all good[/quote]

Yeah, what JMaxchill says is correct. There are no event times' information in the Logs.TF API, just pre-parsed data from the site just like you see it rendered.
This script grabs the raw log from the site, unzips and reads it entirely and calculates the approximate SourceTV Demo Tick for every major event. I will consider adding more events if players require them.

Btw, pushed a small "update" to the script to fix a silly formatting mistake (oops) and a more precise tick calculation.
6
#6
5 Frags +

An overhaul of the barebones scratchpad code i threw together in an afternoon that required far more user input and hassle, with manual downloading of the log, instead of the current automated system. Should add the cfg writing script I created to allow users to change from event to event by just writing eventN (mid1,air2,drop1) and generating the command nextevent (nextmid, nextair, nextdrop) that would send you to the event following what was previously requested in the ingame console. Otherwise, 10/10.

An [i]overhaul[/i] of the barebones scratchpad code i threw together in an afternoon that required far more user input and hassle, with manual downloading of the log, instead of the current automated system. Should add the cfg writing script I created to allow users to change from event to event by just writing eventN (mid1,air2,drop1) and generating the command nextevent (nextmid, nextair, nextdrop) that would send you to the event following what was previously requested in the ingame console. Otherwise, [b]10/10.[/b]
7
#7
1 Frags +

it would be cool to have events for 4ks or 5ks as well, and the ability to select for a specific player (if that's not already a thing) for stuff like frag movies

it would be cool to have events for 4ks or 5ks as well, and the ability to select for a specific player (if that's not already a thing) for stuff like frag movies
8
#8
1 Frags +
bearodactylit would be cool to have events for 4ks or 5ks as well, and the ability to select for a specific player (if that's not already a thing) for stuff like frag movies

Yeah, I've been thinking of including this for a few weeks since I planned on creating a frag movie, it occurred to me that this would be a great tool that would help on finding the moments whenever a play happens.

I'll see of implementing a new update to the script in the foreseeable future, I don't program in Python that much and have little knowledge of it :P

[quote=bearodactyl]it would be cool to have events for 4ks or 5ks as well, and the ability to select for a specific player (if that's not already a thing) for stuff like frag movies[/quote]

Yeah, I've been thinking of including this for a few weeks since I planned on creating a frag movie, it occurred to me that this would be a great tool that would help on finding the moments whenever a play happens.

I'll see of implementing a new update to the script in the foreseeable future, I don't program in Python that much and have little knowledge of it :P
9
#9
4 Frags +
puntero

I don't want to discourage you in any way of creating your own way of finding events for fragmovies but I do want to point out that there's demoticks.tf.
I'm currently in the work of rewriting a lot of the code but it should soon be open source as well (the parser is already). And I'd love to replace the beta "demo file selection" I currently have with this.
I think the idea of creating some sort of tool to make it easier to find mistakes in teamfights etc. would be very cool but I think it's very hard to find those just via the logfiles. I think the demo viewer from demos.tf is great for this though.
Anyway best of luck to you!

[quote=puntero][/quote]
I don't want to discourage you in any way of creating your own way of finding events for fragmovies but I do want to point out that there's [url=https://demoticks.tf]demoticks.tf[/url].
I'm currently in the work of rewriting a lot of the code but it should soon be open source as well (the [url=https://github.com/TheBv/logstf-parser]parser[/url] is already). And I'd love to replace the beta "demo file selection" I currently have with [url=https://www.teamfortress.tv/59603/airshot-ticks-from-stv]this[/url].
I think the idea of creating some sort of tool to make it easier to find mistakes in teamfights etc. would be very cool but I think it's very hard to find those just via the logfiles. I think the demo viewer from [url=https://demos.tf/viewer]demos.tf[/url] is great for this though.
Anyway best of luck to you!
10
#10
2 Frags +
BvI don't want to discourage you in any way of creating your own way of finding events for fragmovies but I do want to point out that there's demoticks.tf.
I'm currently in the work of rewriting a lot of the code but it should soon be open source as well (the parser is already).

Sorry to reply so late to this. Excellent project!
I wrote this script as a scapegoat one to get ticks quickly without having a demo file (only through log files) since I have 0 to none idea about parsing demo files for information. At the time I made the script I was fully unaware of this website, so if anything I would be fully compliant to help out!

BvAnyway best of luck to you!

Thank you! It's just a simple script for anyone that ever needs to utilize it. I'm not that keen on Python so it'll most likely stay as it is right now :P

[quote=Bv]
I don't want to discourage you in any way of creating your own way of finding events for fragmovies but I do want to point out that there's [url=https://demoticks.tf]demoticks.tf[/url].
I'm currently in the work of rewriting a lot of the code but it should soon be open source as well (the [url=https://github.com/TheBv/logstf-parser]parser[/url] is already).[/quote]

Sorry to reply so late to this. Excellent project!
I wrote this script as a scapegoat one to get ticks quickly without having a demo file (only through log files) since I have 0 to none idea about parsing demo files for information. At the time I made the script I was fully unaware of this website, so if anything I would be fully compliant to help out!

[quote=Bv]Anyway best of luck to you![/quote]

Thank you! It's just a simple script for anyone that ever needs to utilize it. I'm not that keen on Python so it'll most likely stay as it is right now :P
Please sign in through STEAM to post a comment.