Lectrote - .zblorb transcripts

I think I’m seeing undesired behavior, but I want to check in case it’s intentional.

Using Lectrote 1.4.5 (Windows), here’s what I did:

  • open a .zblorb
  • start a transcript
  • enter a few commands
  • close the Lectrote window
  • launch Lectrote again and reopen the same .zblorb
  • enter a few more commands

It looks like the transcripting stopped after re-opening the zblorb, except that it included the first new command line.

The behavior is different with .gblorb files. (It automatically resumes the transcript.)

I assume the intended behavior is to automatically resume the transcript after reopening the .zblorb file, but let me know if that’s wrong.

2 Likes

I’ve noticed that behavior with Gargoyle as well - the transcript also doesn’t resume after restarts - so I wonder whether it’s something to do with the zcode format?

Lectrote does some buffering, so the transcript file doesn’t get updated immediately. That may be causing what you’re seeing? If you continue playing does it eventually send more text to the file?

No, I don’t think so. If I quit again, nothing further is added to the file. Also, if I type “script off” it says transcripting is already off.

Given the context, I assume “restart” means quitting Gargoyle and starting it back up again? Are you using autosaves so that the game picks up where it left off? Or are you restoring a game (or, maybe, not doing anything at all, starting from the beginning?)

It’s intended that transcription does not carry over from saved games, if you’ve quit the interpreter and restarted; it does carry over in the same session, if you restart or restore.

However, if you are using the autosave feature, well, it also doesn’t carry over transcription state; but I’d say there’s a good argument to be made that it ought to! The idea behind autosave is that you come back to exactly what you left, and leaving out transcription violates that. I don’t think I made a conscious decision to leave out transcription. I probably just forgot about it.

I think it should be pretty easy to add transcription carryover with autosave. I’ll see what I can do about it.

Just a note, Bocfel (the Z-machine interpreter in Gargoyle) has a concept of “persistent transcription”, which sounds like what you’re after, and it sort of is, but also isn’t. If you turn on persistent transcription, then games will automatically be transcribed, all the time. Transcriptions will be stored in save files, including autosaves, so that you have access to them implicitly, without thinking about it. This may be a decent workaround for the problem, though it does not allow you to turn on and off persistent transcripting at will. It’s just always on.

If you have the latest Gargoyle, you can type /config while playing a game to hopefully open your Bocfel config file in a text editor. Then add the lines:

autosave = 1
persistent_transcript = 1

(1 means “on” or “true”, which, I must admit, is a stupid way to indicate that state; look for fun changes in the future to allow more human-friendly naming!)

Persistent transcription does work without autosave, too: when you save your game normally, the transcript will be included. In the game, you can run /savetranscript to save the persistent transcript to a file.

1 Like

Yeah, this is what I meant – typing RESTART, not quitting the interpreter, which I would intuitively think would cease transcription (I think I’ve occasionally seen the persistent transcription you mention, which is neat!) When I’m testing, I often like to turn on transcription, then restart so I can have the game’s opening text in the transcript (and add comments, catch typos, etc.), which means that I’ve sometimes lost transcripts where I thought things were being logged, but actually it cut off after the RESTART.

…though now that I’m going back and testing this, it appears to be working? Was this something that changed in more recent builds of Gargoyle? I think I was using an old version for quite a while so could be I just needed to update!

2 Likes

Not directly, in the sense that Bocfel has always properly maintained the transcription state over restarts as mandated by the standard.

However, similar to what Dannii mentioned about buffering in Lectrote, there was a bug in Gargoyle 2022.1 (I believe) where some streams weren’t flushed properly. That meant that during the game, it was entirely possible for lots of text to buffer before being written. Once the program exited, however, all unbuffered data was flushed, so it was really only a problem if you needed realtime access to the transcript. But that may well be what you saw!

Is the “transcripting state” normally saved when you save a game? I assumed this is a service Lectrote offers, that goes beyond the normal interpreter behavior.

I tried doing the same sequence of steps in Frotz, but it clearly does not auto-resume the transcript.

I guess the practical issue here is, when you restore or auto-resume a game, there’s no way to immediately know if transcripting is on or not.

Why didn’t I think of that before, thanks!

It is only part of autosaves, not regular saves. But after restoring (of both kind of saves), the header flag 2 bit 0 should be set if transcripting is active, so the game can check that.