As you may have already read here on the forum, I’ve been working on a “story mode” extension for Inform 7. Wade Clarke has recently published version 4 of his own "Guide Mode.’ There may yet be more on the way, I’m not sure. I think: the more the merrier!
So far as mine goes, I have a couple of questions. First, is publishing multiple extensions with the same general functionality worthwhile? If the answer to that question is, “yes,” I might need a hand with some very specific playtesting. I’ve had story mode tested qualitatively, but it hasn’t received a technical evaluation, nor has it been subject to attempts to troll/break it. That might be wise, pre-release.
It could be useful to have more than one solution available! There are some aesthetic differences between the three (mine, Wade’s, and John’s TADS code, too) currently available, and future authors may have preferences. Additionally, I don’t know if Onno intends to release an extension as well (based on code from One King to Loot Them All).
Anyway, this my first time writing something like this, so any advice or suggestions would be most welcome.
Absolutely. Part of the goal of the extension ecosystem is to not enshrine any extension as “the right way” to do things, even the ones shipped with Inform itself—I like to use Implicit Actions by Eric Eve rather than the built-in Locksmith by Emily Short because it does the same things in a way I like better.
OK, great. That makes sense. Credit where credit is due, with autosave, preloading, and command repair, this is basically a @Draconis greatest hits record!
In order to hone the code, I’d like to request maybe a couple of people to poke at the extension in action. I’m not envisioning a major effort, and I’m certainly not asking anyone to complete an entire game. The question is simply, “can you break this feature?” I’ll make the text of the extension available, of course.
This isn’t a request for help fixing problems, just finding problems I may have missed. If anyone is willing, please get in touch.
I am in fact considering to put at least some code into an extension, because that would make managing the code much easier. Now everything (the “engine” and the “world model”) is stuck together in one big file because with Borogove I cannot use custom extensions as far as I know.
I am looking into at least isolating the “engine” part so I can re-use that for a potential sequel. But then it would only fit the limited model I implemented.
I would much prefer to generalize things, and my current WIP would be a good test case since it is not a Single Choice game and it would give the player a lot more freedom (solving quests in any order, and free exploration). I do want to retain its core feature: allow the player to switch story mode on/off at any time without changing game state as I have now (i.e. no rollback to the last save point when the player left story mode).
So I will definitely put out an extension, but probably with some limitation of game state, so probably of limited use. I do not mind sharing code (one of the reasons I am adding a lot of comments to it), but I do not want to promise people more than I actually offer. To me it sounds like your extension can be used in ANY Inform game, while I have some limitations.
I’ll just pass on where most bugs in my extension were found. i.e. Places where you should test aggressively.
Around the start of a game session. Inform has different messages for undo being unavailable and the stack being exhausted, because they’re produced by different conditions. And some actions that shouldn’t use up an undo (cancelled SAVEs and the like) do take one. So you want to throw combinations of these conditions at your extension.
Start a game. Follow the guide for one move. Go off the guide. Cancel a SAVE. Are we still in guide mode. Rewind. Did it work? Are you where you want to be? Now UNDO some and see if it stays happy.
Basically you want to go in and out of guide mode, and throw in some curveballs like out of world actions that end up on the UNDO stack, nudging in and out of the first few moves of a game and butting up against the wall of there being no undos available.
The Final Question. This is where I was doing due diligence, because I generally don’t even use the normal final question mechanisms in my own games (do you want to undo, restart, or quit? or AMUSE?). But most people do, and I found my extension could get confused up after UNDOing from the final question, as opposed to UNDOing at other times. You just want to make sure yours keeps working.
I added a spoof response for cases when the turn count is one but the walkthrough step is higher. Which… really shouldn’t happen, but just in case.
Generally speaking, the undo stuff is all working really well. If a player wants to pause, resume, then undo their way back into the pause, they can… and probably should be able to do that. It will just resume again. My main concern is that it always be possible to return to the walkthrough, which should never miss a beat.
While I didn’t observe any problems, it was noteworthy that RTE’s heavy use of “resume the story,” which negates the current turn, doesn’t increment turn count (it does increment action count). For troubleshooting purposes, I’ve tried to keep turn count and action count synced. I like to see that undoing and decrementing the walkthrough consistently happen in concert.
For final Q, if the story is paused, I overwrite the UNDO rule with a resume rule (autorestore). It feels pretty solid. Otherwise, the player can undo all the way through the stack, pause, resume, etc. I’ve tried to beat the hell of it, but we’ll see if bug reports come in!
I wondered about other things, like the name of the autosave file. I currently generate it based on the (up to)first five characters of story title plus release number. Featuring a very ugly, hacked up regex that I’m frankly embarrassed to show anyone! I feel the chances of conflict are remote. Please don’t start your next game with “I, Th” or “Marbl”!
I will do more poking today, but I think I’d be ready to post it as early as tomorrow, pending an upload of Daniel’s Command Preloading. It’s not a crisis; I will do it whenever that happens to avoid discussing a missing dependency.
I don’t have write access to the GIT repository, but I’m not sure that I should have it. I’m not familiar with the tool.
Is it still not up there? Something must have gone wrong with my pull request…gah.
I’ll hopefully get that fixed before the end of the week; if I don’t, next week there are no classes so I’ll have plenty of time for things like uploading extensions, starting letsplays, and finishing IFComp games.