Greetings.
I'm currently developing a program for PrBoom+ (and probably CNDoom) which can show the progress of a speedrun automatically. This is useful for people who stream Doom.
PrBoom+ has a parameter -levelstat which dumps the run information thus far at the end of each map completion. My program simply checks this file periodically for updates and displays the results.
I have noticed that your console command "printstats" contains exactly the information I need for this. I've not found a way to dump this information periodically to a file which can be read externally. If possible, could you please add this as a parameter or an option within the config file?
Let me know if I've missed something or if I'm being hard to understand.
Thanks.
Request: Dump printstats to file after each map
Moderator: Graf Zahl
- Gez
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: Request: Dump printstats to file after each map
The only thing to remember is that these only save after completing a game, but aside from that should do what you need.
-
- Posts: 2
- Joined: Sat Dec 20, 2014 6:21
Re: Request: Dump printstats to file after each map
Hi thanks for the response.
I can't seem to get savestatistics to produce a file under any circumstances. I have altered savestatistics to 1 in the config file. However, playing the game and completing a few levels then exiting the game does not produce a statfile. Am I missing something obvious here?
You mention that the file saves "after completing a game". Does this refer to the entire game being completed? My program wants to update after every map completion. That way if you're speedrunning a mapset, the stream viewers can see how long it took you to complete each map in doom-time, rather than relying on real-time program like livesplit. I compare these times against a user-inputted file (such as the current world record times for the mapset) and generate on-the-fly time differences.
I can't seem to get savestatistics to produce a file under any circumstances. I have altered savestatistics to 1 in the config file. However, playing the game and completing a few levels then exiting the game does not produce a statfile. Am I missing something obvious here?
You mention that the file saves "after completing a game". Does this refer to the entire game being completed? My program wants to update after every map completion. That way if you're speedrunning a mapset, the stream viewers can see how long it took you to complete each map in doom-time, rather than relying on real-time program like livesplit. I compare these times against a user-inputted file (such as the current world record times for the mapset) and generate on-the-fly time differences.
-
- Posts: 9
- Joined: Sun Feb 01, 2015 0:37
Re: Request: Dump printstats to file after each map
Hi,
I figured I would bump this thread because this has been driving me nuts and I could not find anything else on the subject. I checked the source in STAT_ChangeLevel and it looks the file will only be written at the end of the game/episode.
There is a comment for // todo: handle single level statistics, if savestatistics is 2. Like the OP, I also cannot get the statfile to be written, even at the end of the game/episode. I currently am unable to get the source to compile to debug further.
I figured I would bump this thread because this has been driving me nuts and I could not find anything else on the subject. I checked the source in STAT_ChangeLevel and it looks the file will only be written at the end of the game/episode.
There is a comment for // todo: handle single level statistics, if savestatistics is 2. Like the OP, I also cannot get the statfile to be written, even at the end of the game/episode. I currently am unable to get the source to compile to debug further.
-
- Posts: 9
- Joined: Sun Feb 01, 2015 0:37
Re: Request: Dump printstats to file after each map
OK, I finally got everything installed in order to debug. unfortunately this feature is overly specific to the point that is almost useless. As the very least, the savestatistics command documentation should be updated. It only works if you start a new game through the menu. Warping or using the map command does not set the StartEpisode variable which will stop this from working. The main reason I was looking into this because I wanted to add a feature in my launcher to parse the statistics. They would need to dumped every map, which is not the case.
However, I did find that the statistics are being written to save games (SerializeStatistics in statistics.cpp) so I'm working to parse that out. It's much more painful to parse binary but it works.
However, I did find that the statistics are being written to save games (SerializeStatistics in statistics.cpp) so I'm working to parse that out. It's much more painful to parse binary but it works.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: Request: Dump printstats to file after each map
hobomaster22 wrote:OK, I finally got everything installed in order to debug. unfortunately this feature is overly specific to the point that is almost useless.
Don't tell me.
It was originally meant for private use, someone requested something along these lines so I just added it as-is. There's certainly lots of room for improvement here, just nobody with any serious interest in expanding it.
-
- Posts: 9
- Joined: Sun Feb 01, 2015 0:37
Re: Request: Dump printstats to file after each map
I understand. Thanks for the reply
I was originally happy with using the stats in the save game. Until I figured out this method won't work with the last level...
There is a lot of work in the code so it's very easily updated to write each level's stats at the end of each level. I've already done it because I couldn't help but play it with it.
I was originally happy with using the stats in the save game. Until I figured out this method won't work with the last level...
There is a lot of work in the code so it's very easily updated to write each level's stats at the end of each level. I've already done it because I couldn't help but play it with it.