qolelis on 26/10/2007 at 00:40
Luthien got me interested in this subject when he wrote about the record-command ((
http://www.ttlg.com/forums/showthread.php?t=47143&highlight=record) Thief console commands). So, for what it's worth (I had fun playing around with it anyway):
There is a way to record (and play back) a demo with Thief 2 and DromEd 2 (without any external software). You can for example record demos of how to accomplish something in DromEd or record a demo of how you run around killing everyone in
Ambush! ("I didn't do it, it was Garrett!"). The main advantage is small filesize (see below). The main
disadvantage is that playback is a bit unreliable (see below). I would be interested in knowing how it works for you, if you try it out.
In Thief 2:
1. Place "record
filename" in your dark.cfg.
2. Start Thief 2. Everything you do will now be recorded.
3. Exit Thief 2.
4. Replace the record command with "playback
filename".
5. Start Thief 2 to play back what you just recorded.
In DromEd 2:
1. Place "record
filename" in your user.cfg or dromed.cfg (or dark.cfg).
2. Start DromEd. Everything you do will now be recorded.
3. Exit DromEd.
4. Replace the record command with "playback
filename".
5. Start DromEd to play back what you just recorded (except maybe menus, see below).
If you leave out the filename your demo is recorded to a file with an autogenerated (unique) name and with the extension
.rec.
Remember to remove these commands from your configuration file(s) when you are done.
The demo file is placed in your Thief 2 directory by default. A demo recorded in Thief 2 cannot be played back in DromEd 2, and vice versa. A recorded demo can be played back only through Thief 2 or DromEd 2 (as far as I know).
Almost everything gets recorded, including sound, map, objectives, all menu-choices, saving/loading, but no animations (briefing movies and such are not even shown when you record). A recorded demo is not self-contained, though, which means that the Thief 2 directory must be prepared to play the same mission that the demo was recorded for if playback is to work. Every resource that the mission needs must already be present in your Thief 2 directory. The advantage of this is that the demo's
filesize can be kept relatively small: I compared sizes for half a minute: 700kB with the record-command and 200 MB for fraps. Then, just to test the limits, I recorded for around 1½ hour (this is when Garrett made me kill everyone in
Ambush!) which required around 36 MB (compare that to what fraps would require...).
Playback is unfortunately a bit
unreliable at times (at least on my setup): Playback is sometimes interrupted under certain circumstances. Control is then handed over to the watcher. Replay the demo and playback may not get interrupted (at least not at the same point as before). Record and playback seems to work best (without interruptions) when Garrett keeps away from walls, conversations and streaming water.
When recording in DromEd 2, don't use
menus, since this may confuse the playback-command. The command console works with playback, though, so use that instead of menus if you want to be sure it works. I can only guess to why menus don't work.
I haven't found a way to end playback prematurely (other than doing it the rude way) and there doesn't seem to be any way to control playback in any other way either (fast forward, rewind etc...). I have not tried to play back a demo on a computer other than the one on which the demo was recorded (please, let me know the result if you try this).
Neither the record nor the playback command can be started from within DromEd 2 or in-game. They must be run from any of the named configuration files.
I briefly tried record/playback in Thief and Thief Gold and it seemed to work pretty much the same as in Thief 2.
Edit:
Record and playback can also be run from the command line:
1. "Thief2.exe +record" records to a file with the name "REC
number.rec",
number is autogenerated (and unique).
2. "Thief2.exe record=
filename" records to the named file.
3. "Thief2.exe playback=
filename" plays a recorded demo with the given filename.
With this method, you can create shortcuts for easy record and playback. This method also works for DromEd 2.
SlyFoxx on 26/10/2007 at 01:45
Holy shit...that works like a charm!:eek:
Seems like Thief records something akin to a MIDI file. Thus the need for all the resources to be present.
qolelis on 26/10/2007 at 11:21
Yes, I'm guessing too that it records only keyboard strokes and mouse moves (and timestamps them?), not the actual commands (the way that playback sometimes "get out of sync" suggests this). I opened up a .rec-file in a hex-editor (XVI32), but I'm not very good at analyzing file formats, so I couldn't make out much (or verify my guess).
By the way, I found this thread, it's related, but mostly of historical interest:
(
http://ttlg.com/forums/showthread.php?t=7360&highlight=terra+nova+playback) Terra Nova demos
qolelis on 26/10/2007 at 11:34
Quote Posted by SlyFoxx
Holy shit...that works like a charm!
It's fun to just sit back and relax for a change (and have DromEd do all the work for you :joke: ).
Renault on 26/10/2007 at 13:12
This is a pretty neat tool, and could be good for walkthroughs. Hopefully, we can even get a setting or option in Darkloader (or Garrettloader) for recording and playing these files back.
I did notice that although all of my actions were recorded, some of the AI comments were different on separate runthroughs (for example, one time a guard said "just the wind I guess" and the next time he said "must've been rats.")
Edit: Noticed one other thing. If you try to playback a recording of a mission, but have a different FM loaded in darkloader, the demo will quit as soon as the recording gets to something that's different than the original. Thief2 doesn't stop, but the demo does and you're dropped back into Thief2 as you would normally use it.
ffox on 26/10/2007 at 17:52
This could be also be handy for demonstrating bugs found during testing. The created file zips down very well - to less than 10% of the original size in my tests. It's much smaller than a savegame if only a couple of minutes are required.
Fidcal on 26/10/2007 at 21:51
I think someone did a script to run commands so if it runs this you could trigger it in the mission - say at the start as a briefing 'video'. The section played through could be in another part of the mission not accessed in the main game then after completion resumes normal play elsewhere in the mission. Dunno how well that would work tho'
john9818a on 26/10/2007 at 23:03
Quote Posted by Brother Renault
I did notice that although all of my actions were recorded, some of the AI comments were different on separate runthroughs (for example, one time a guard said "just the wind I guess" and the next time he said "must've been rats.")
This is probably because none of the AI's responses were recorded, but the recorded player's actions triggered the same event. The AI's comments/schemas are chosen at random for a particular event, so it won't necessarily pick the same wav file from the schema.
nightshifter on 26/10/2007 at 23:48
Quote Posted by Fidcal
I think someone did a script to run commands so if it runs this you could trigger it in the mission - say at the start as a briefing 'video'. The section played through could be in another part of the mission not accessed in the main game then after completion resumes normal play elsewhere in the mission. Dunno how well that would work tho'
that would be so cool !!
qolelis on 26/10/2007 at 23:54
Quote Posted by Fidcal
I think someone did a script to run commands so if it runs this you could trigger it in the mission - say at the start as a briefing 'video'. The section played through could be in another part of the mission not accessed in the main game then after completion resumes normal play elsewhere in the mission. Dunno how well that would work tho'
It's a cool idea and worth a try, but there are some things that must be solved first:
* There is no known way to stop playback in-game. Maybe a custom script could be made to stop the execution of a command.
* I could not get the playback command to work in-game (through the console), but maybe that script you talk about can. Side-note: DromEd doesn't even know about the record and playback commands.
* The recording must somehow be told to stop without quitting the game.
* The record command must also be invoked in-game when recording the cutscene.
* If the cutscene is in the middle of the game, playback might expect a lot of objects to be in the same position as when you recorded the cutscene. If they are not, this could halt the game with an assertion.
Problem #5 may not be a real problem, but chances are that it is.
Problem #3 can be solved by starting the recording and then alt-tab back to desktop when you want the recording to end and then you kill the Thief 2-process. This also has the convenient consequence of making playback stop and hand over control to the watcher/player, so this also solves problem #1.
If problem #2 and #4 (and #5?) could be solved, then I guess it would work:
* Transport Garrett to the starting point in the "cutscene world".
* Invoke the playback command. Everything(?) must be exactly as it was when you recorded the cutscene!?
* Wait for Garrett to reach the point where the cutscene ends.
* Control is handed back to the player.
* Transport Garrett back to where he was.
Don't let me discourage you: The only way to know for sure if it works is to go and try it out.
Edit:
What's the name of that custom script to invoke commands you talk about and who wrote it? It would be very interesting to try it out.