Logging Player Input

Hello everyone! I’m new to inform 7 and this forum. I’m developing an IF game in Inform 7 for a school project and I need to be able to store all of the player’s inputs during play. If possible, I would love to be able to view entire play sessions. Is there a way to do that in inform 7?

The easiest way is to use the transcript features in the interpreter. If you add this rule…

When play begins: try switching the story transcript on.

…then it will give the player a dialog box to save their transcript to a text file, and automatically transcribe the full play session into it.

You can set up the web interpreter to send all input and output to a separate server. This requires you to set up that other server, however. There’s some documentation but it’s not at the level of “run this and it will work.”

(IFComp uses this facility to save transcripts from Inform games for the authors to look at.)

Thanks Daniel. Thanks Zarf. I really appreciate the help. The story transcript method will do for this project but I’ll certainly look into the web server suggestion for future work. Thanks again. :smiley:

It’s a looong way off, but one of the features of ifpress.org will be storage of all online play (results and commands) in a database for authors to use or share.

Anyone know of a way to force the interpreter/player to use a certain file (i.e. supply what the filename/folder etc. should be)? In a classroom setting that would take away one thing that could go wrong.

I don’t think anyone has put the pieces together for anything formal. I’ve had some alpha-level client-server implementations that do what you’re asking, but I’ve switched gears to pure client-side efforts.

However, what you probably need, and this is fairly technical, is to implement some sort of web api that accepts the data you wish to store (so student info, story name, commands) and stores these in a database. You’d need access to a server that your students’ browsers can “see” where the web api would be installed and that server would need to be able to “see” your data store.

Then in a browser hosted story, you’d need to use javascript to send messages to the API as needed.

It’s not trivial, but it’s also not rocket science for someone that understands current technology.

See this thread: https://intfiction.org/t/help-me-modify-the-script-command-for-science/1237/1

Thanks DavidC and Erik, that should get me going!