Page 1 of 1
Recordings File Format
Posted: Fri Jul 10, 2009 2:28 pm
by methnen
Hello,
I'm working on a little project built around the recordings ability in Myth and wondered if you guys could point me to some information (or maybe provide some information) in regards to the actual format of the data.
I'd basically like to be able to reliably pull out the list of people in the battle (as well as teams if appropriate), the text chat/discussion as well as possibly the outcome (who won?).
This would be ideally done server side via a PHP script or something along those lines.
The file appears to be in a Binary format which obviously isn't ideal in this case so any insights would help.
Thanks a lot.
Methnen
Re: Recordings File Format
Posted: Fri Jul 10, 2009 2:32 pm
by Doobie
you need to talk to baak, he's put together some cool tools for working with films.
Re: Recordings File Format
Posted: Fri Jul 10, 2009 4:19 pm
by Graydon
As far as I'm aware (and that might not be very much) recordings in myth are basically 'saved games' that instead of loading all the actions and events that have occured and starting where you left off, it instead loads it up from the beginning and plays all the actions out real-time, allowing you to watch what occured. It's all bits of code that tell Myth 2 what to do with the units loaded on that mesh though.
Extracting the data that occurs in string list format (text basically) could be quite the trick.
Re: Recordings File Format
Posted: Fri Jul 10, 2009 4:29 pm
by Pyro
Baak has done stuff like that if I recall correctly, he has extracted chat from films.
You could find him at the
OoH forums.
Re: Recordings File Format
Posted: Sat Jul 11, 2009 12:44 am
by Baak
Graydon is correct: the films are like a series of vectors that play out only if run through the Myth Engine itself. There is no final information in there (unfortunately) -- although there has been talk of putting something in there at some point.
I remember dissecting a film long ago (when I first got into it) and staring at the screen in wonder as the game kept playing even though I had hacked off the end of the film. I kept hacking bits off and then it started ending differently. It's because the engine thought everything was at a certain point and just kept going from there, but I could not find the "exact point" when something happened because everything depends on everything else.
You can glean a certain amount of information from the film header (though some of it gets a little cryptic). One thing you cannot glean without access to the source code (don't even ask) is "random teams". Unless the teams are preset from the start, the teaming happens based on the random number seed in the film header and follows a non-obvious method (you have to have the source code to get it to work). So I just marked teams as random for these films, although you can still see the players.
Pyro is correct I dissected the chat code many moons ago as well and made it create a basic HTML extraction from the films. Here's a sample (team games show the team captain primary color for all players on the team -- ffa examples are further down -- note the special chars all print correctly and the time on the left shows pre-game Planning Time (-PT-) and post-game (+PG+) time as well as the timestamp including 1/30ths of a second ticks. Dang I got thorough on that:
http://www.orderofhpak.com/FilmPaks/HPa ... _Chat.html
I made a film renamer program and a separate Perl script (before I got into PHP -- again this was long ago) that dissected all the stats I could glean from the films and dumped them as a text file. Here's the last one for all the OoH official games (kinda stopped last April at the 6,418 game mark):
http://www.orderofhpak.com/Archives/HPa ... ummary.txt
Re: Recordings File Format
Posted: Sat Jul 11, 2009 3:59 am
by Archer
It'd be a bit of a trick to filter out the garbage, and information about who said a given thing in in-game chat (as well as win/loss info) is lost, but you get a decent chunk of what you're looking for by just running strings on the film.
~J
Re: Recordings File Format
Posted: Sat Jul 11, 2009 11:28 am
by GodzFire
Baak I'm currently going through our Tools list to see what Myth Tools are still workable. Check out the thread there:
http://tain.totalcodex.net/forum/viewto ... f=3&t=4476
Could you post your Film Programs you did, and if they are currently workable on Intel Macs.
Re: Recordings File Format
Posted: Sat Jul 11, 2009 3:06 pm
by Baak
Godzfire: Alas, the program for film renaming is PC-only and the version I currently have is not suitable for public consumption. It's been on my list for awhile to make an on-line version (where you could submit films singly or in packs) as part of my toolbox of myth goodies. Also on the list is adding some aspects of the library of function to The Tain as a built-in feature. So they should make their way to public use eventually.
Re: Recordings File Format
Posted: Fri Jul 17, 2009 8:01 am
by killerking
Wasn't there somekind of program for windows (could've been mac classic to, forgot that) that allowed you to play replay's outside Myth in a seperate program?