Writing game statistics to a file

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Writing game statistics to a file

Re: Writing game statistics to a file

by Graf Zahl » Sun Sep 19, 2010 4:11 pm

Well, of course it could be added - but considering the tediousness of item hunting I saw no reason to add it.

Re: Writing game statistics to a file

by dennisjj4 » Sun Sep 19, 2010 3:30 pm

This looks like it's (mostly) in, but not possible to stat items? (Only kills and secrets?)

Re: Writing game statistics to a file

by Graf Zahl » Sun Sep 19, 2010 3:13 am

I forgot to mention 2 new MAPINFO options related to this. Since there are many mods that use some map for special purposes the following can be defined now:

'nostatistics' No info will be collected for this map. For use in intermission maps like in KDiZD or skill selection maps that don't contain any actual gameplay.
'endofgame' When entering a map with this flag the episode's statistics will be finalized and written out. Normally this happens when the game actually ends but I've seen several mods recently that let the epilogue map run indefinitely. Obviously this implies 'nostatistics' for the map.

Re: Writing game statistics to a file

by Graf Zahl » Sat Sep 18, 2010 10:35 am

Here's one good piece of advice: If you can make your computer do the number crunching for you, don't bother with manual workarounds. :P

Re: Writing game statistics to a file

by XutaWoo » Sat Sep 18, 2010 10:25 am

Karl Murks wrote:And then what? I still have to grab paper and pen (or notepad) to write them down in a usable manner.
...You're going to write down a screenshot you just took? What?

But yeah, sorry; I misread that you were using that for contests or something. Making fake DOOM intermission screens is easy, but not as easy as, say, just cracking open Notepad and filling it with misinformation.

Re: Writing game statistics to a file

by Karl Murks » Sat Sep 18, 2010 10:11 am

Thanks. That's perfect. :)

But it would be even better if you could make the necessary changes to handle pistol-started levels, too.

Re: Writing game statistics to a file

by Graf Zahl » Sat Sep 18, 2010 10:05 am

Ok, I just managed my old code to get working. But I don't really feel like fully polishing it into a super-user-friendly feature so I'll leave it as it is for now and won't expose it to the menu.

Here's the deal:

- set the 'savestatistics' CVAR to 1 to enable it
- the 'statfile' CVAR contains the file name to save to.
- It will currently only work for proper episode starts so it can't yet be used to save info for pistol-starting a level. The original code was not designed for that and it'll require a bit more of work.

Some test output (2 sessions of cheating myself through Doom's E2):

Code: Select all

DOOM.E2M1 "The Shores of Hell"
{
	 1. 18.09.2010 "  96/ 336,   2/ 51,  8" 00:01:24 0
	{
		E2M1     "  15/  15,   0/  4    " 00:00:04
		E2M2     "  52/  52,   0/ 12    " 00:00:16
		E2M3     "  28/  28,   0/  6    " 00:00:05
		E2M4     "   0/  46,   2/ 10    " 00:00:16
		E2M5     "   0/  70,   0/ 10    " 00:00:09
		E2M6     "   0/  60,   0/  3    " 00:00:10
		E2M7     "   0/  64,   0/  6    " 00:00:14
		E2M8     "   1/   1,   0/  0    " 00:00:06
	}
	 2. 18.09.2010 " 220/ 336,   2/ 51,  8" 00:01:23 0
	{
		E2M1     "  15/  15,   0/  4    " 00:00:04
		E2M2     "  52/  52,   0/ 12    " 00:00:16
		E2M3     "  28/  28,   0/  6    " 00:00:05
		E2M4     "   0/  46,   2/ 10    " 00:00:16
		E2M5     "   0/  70,   0/ 10    " 00:00:09
		E2M6     "  60/  60,   0/  3    " 00:00:13
		E2M7     "  64/  64,   0/  6    " 00:00:12
		E2M8     "   1/   1,   0/  0    " 00:00:04
	}
}

Re: Writing game statistics to a file

by Gez » Sat Sep 18, 2010 8:56 am

I was going to suggest a console variable that, if set, would log the statistics when changing level (even if they aren't shown, as in Hexen or Strife).

Re: Writing game statistics to a file

by Graf Zahl » Sat Sep 18, 2010 8:51 am

Ok, people, I don't know what's going on here but there have been 2 posts now which blissfully ignored the OP's motivation for this feature (namely the hassle of manually maintaining this data) and provided absolutely worthless 'workarounds'.

So, luckily I had written something similar for testing purposes years ago. (you can even still find the stubs for that in g_level.cpp) It only collects the time spent in a level but it shouldn't take too long to make the necessary adjustments to turn it into a usable feature. Just don't expect miracles here. It will be rather simple and feature restricted but should be enough for someone who wants this data handy after finishing a game.

Re: Writing game statistics to a file

by Karl Murks » Sat Sep 18, 2010 8:45 am

And then what? I still have to grab paper and pen (or notepad) to write them down in a usable manner.

Re: Writing game statistics to a file

by XutaWoo » Sat Sep 18, 2010 8:34 am

Image

Re: Writing game statistics to a file

by Karl Murks » Sat Sep 18, 2010 5:10 am

Don't you think that other people would like such a feature, too, so that they can compare their achievements with previous efforts or other users?

For god's sake, why does everything have to be so complicated? All the necessary information is already there, all that's missing is a way to store it in some list that can be written out to a text file that can be looked at in a text editor.

Why should I write this stuff down each time a level ends? As long as an intermission screen pops up it's at least doable but what about mods that don't - like Hexen, for example?

Re: Writing game statistics to a file

by Nash » Sat Sep 18, 2010 5:02 am

Graf was that directed at me? I really don't see what's so hard in writing down your end level stats in a text file.

There are also many more ways to do this. Grab a screenshot of the intermission screen, code in your own stat tracker with a globally loaded ACS...

Re: Writing game statistics to a file

by Graf Zahl » Sat Sep 18, 2010 5:00 am

Just...

Why do so many people fail to use that word in a proper context... :?

Re: Writing game statistics to a file

by Karl Murks » Sat Sep 18, 2010 4:59 am

Please tell me, in which way would that be better than a piece of paper and a pen?

A computerized scratch pad is still a scratch pad.

Top