Still going strong on my WIP for a puzzly parser game in Inform7. However now I am a bit stuck on how to best handle a stressful situation. Imagine the player character being in a room together with his sister who is being threatened and needs his help to get out of this scene alive. I want to ‘use’ the sister to provide hints if the player is not being helpful (e.g. trying to do useless things), but am not sure what would be the best approach for handling commands which do not make sense here.
I know it is possible to eliminate verbs completely from the Inform7, and of course I can replace default responses with something more appropriate, but that might lead to an exponential explosion of ‘appropriate responses’ for all the scenes I am considering to add to the game.
How would you handle such a scenario?
The “helpful” commands I am expecting to be valid for a stressful scenario might be along the lines of:
 get the object you need to resolve the situation (which is present in the room, so no need to wander about. In fact I would expect the sister to loudly complain when the player character is attempting to escape.)
 ensure the object is in a usable state to resolve the situation (here I would expect the sister (who is familiar with the object) to explain what to do if the player character “does not get it”.)
 apply the object to the situation, thus removing the threat and freeing his sister.
And anything else done by the player character would probably lead to an increase of danger level to the sister up to some point where it would be game over. But I rather want to avoid that if possible (and if that would make sense. Things about player freedom, why disallow jumping 50 times in a row and all that…)
This is a tricky one because you have a scene that you want to unfold in a particular way and because it’s a tense situation you’d ideally want it to unfold quickly. You also want the scene to be driven by the actions of the PC.
I’ve had a few situations in my games where specific things needed to happen. If the player didn’t cotton on to what they needed to do I simply had the the other character take over and drive the scene. That’s not going to work here because the other character is in physical danger and can’t act; all she can do is drop hints.
I presume there is a third character in the scenario who is doing the threatening? Isn’t he or she also going to try to stop the sister dropping hints? Or stop the player from acting?
In terms of preventing specific actions, you can use scenes:
Threatening Scenario is a scene.
Instead of going somewhere during Threatening Scenario:
say "You don't want to leave your sister alone with the villain!".
You can even restrict the range of allowable actions to just those needed to solve the puzzle:
Instead of doing something other than looking, taking or loading during Threatening Scenario:
say "Your sister says 'Stop wasting time! You need to load the revolver!'".
Restricting actions in this way might ultimately prove more frustrating for the player than not, so it’s about striking a balance between player freedom and advancing the plot. Action sequences are about the hardest thing you can attempt to do in a parser game. Good luck!
FYI the scenario I have in mind involves a third party which cannot be reasoned with.
Thank you for providing the technical solution for limiting player actions, it solves the problem of trying to handle all the things people can try which do not make sense in the scenario. I saw earlier discussions on player agency and I have to agree it is a difficult problem to solve: We want to give our players maximum freedom (otherwise we could just as well think of a list of options to choose from and write it in Inkle or similar toolsets), but we do want to ensure the story somehow makes sense.
On the other hand, I can just make it easy for myself and let the scene escalate (and the player can use undo if he/she does want to try to resolve the scenario). I mean, handling every possible thing people can do has to stop somewhere: either by a generic reply (the default or a custom one), or by a reply specific to the scenario (as you suggested).
Then if the player decides not to do anything (z z z z) or do something else, he/she will have to face the consequences. Not allowing to escalate sounds too artificial to me.
I think there might be three types of player (or are there more?):
 Those who “get it” and can resolve the scenario (with or without prompting if they make a mistake, I do want to allow for some level of mistakes or extraneous actions.)
 Those who do not “get it” despite all the hints being dropped (I do not know if I should drop explicit instructions at some point.)
 Those who do not WANT to “get it”, i.e. beta testers trying to “break the game”, parser game haters trying to “prove something”, whatever…
Category  is of course the most worrisome. How to hint them properly etc. A lot of discussions on this forum and others, but “properly hinting” is yet another problem.
Yes. Your scenario is a timed puzzle, essentially, and timed puzzles can be quite divisive even among fans of parser games. It might seem rather unrealistic to allow the player unlimited moves to solve the puzzle, and it would certainly harm the realism of the scene. On the other hand, having a timed puzzle might put some players off altogether. I would suggest that you do it your way, get some feedback from your testers, and perhaps rethink it if it proves too off-putting. I would definitely allow a little latitude for mistakes.
Yeah, this can be a tricky thing to balance - especially since many players will want to poke around, examine everything, try to talk to the sister, etc., even in the face of clear danger (many will also want to see what happens if time runs out!)
As a result, preempting the player’s actions and having the sister get upset might make some players annoyed and/or dislike the NPC, even though these are reasonable ways to make an action scene feel action-y.
I agree that testing is going to be the ultimate rubric here, but just to throw out one more implementation idea, you could also do the sister’s hints as an every turn rule - like every fifth turn (or a randomized duration), have her interject with a hint based on how far through the puzzle the player’s gotten. The advantage here is that the player gets the hints without seeing their attempts to act get frustrated; the disadvantage is the player can still get up to silly, inappropriate behavior.
Doing anything except examining to the evil villain is prohibited action.
Examining is allowed action. Taking inventory is allowed action. Looking is allowed action. Taking is allowed action.
Instead of prohibited action during the standoff: say "'Don't even think about it,' the villain snarls."
Instead of doing anything except allowed action during the standoff: say "That's not going to help your sister!"
IMHO that is the major disadvantage of parser games, the “freedom” one gets. Players might totally (mis)behave differently from IRL just because they can. I do not want to railroad players (then I would have to tie them to the proverbial chair and shout the plot at them). As I see it, I then basically have four options:
 - avoid time/turn limited scenes altogether, and dream up other scenarios instead
 - use time/turn limited scenes, and when time runs out, end the game in failure. Then the player can still use undo or reload a previous save.
 - In case the scene is not fatal to the story (i.e. failing it can still result in partial success), use time/turn limited scenes, and when time runs out, inform the player of the consequences of their (lack of) actions, so then they still can decide to undo/reload if they want to achieve a “perfect result” (dunno if such players exist.) I want to avoid people only realizing much later that they “lost something” in the past without being told about it.
 - just pretend it is time/turn limited, with some random “hurry up” messages, but without any consequences if players tend to go and explore/kiss/jump/whatever instead.
A fifth option would be to have the game end once time runs out, but offer a “try again” command that resets the scene to the beginning. (This of course may be very tricky to implement, depending on how the scene works.)
Apologies for the wall of text; it’s fun to think about this kind of stuff. I think that you just can’t worry about players “getting it.” In my experience, there are all sorts of players. Some are reflective. Some are racing to the end. Some have very fixed ideas about what good IF is, and aren’t really interested in getting out of that box, even if the author has taken pains to coax them out. Some players are the opposite and crave novelty. It’s hard to please them all, and ultimately, I think that players are free to do what they like with a game. Once it is unleashed upon the world, it doesn’t really belong to the author anymore. You can see the way player experiences vary by reading reviews on IFDB.
Some types of storytelling require timed events, independent of puzzles or whatever. What can you do if you want moments of urgency in your story? Or moments where logic demands some sort of temporal bracketing? The moments before a car crash, for instance, cannot be stretched out indefinitely, and a fuse cannot burn forever.
Early IF critics (Montfort, Sorolla) were very concerned with distinguishing between IF “games” and “works” of IF, as well as the problems of reconciling puzzles with story (Nelson). It’s been decades since those authors began the important work of theorizing interactive fiction in sophisticated literary and craft terms. What would we say now?
Lowering the stakes of timed events by giving the player an easy way back is not immersive. It does not foster mimesis. Instead, it calls attention to the video gaminess of the work. Turns out, players don’t really care. In many cases, we’ve gone from “Crimes Against Mimesis” to “Crimes of Mimesis.”
I personally would (do!) handle timed events in this way:
Hard failure: use state tracking to do a seamless return to game prior to initiation of the timed event. Give a clear indication of why the player failed. No need to undo or restore.
Soft failure (complete event but might miss out on some content): breadcrumb a realization of the missed content. It would be good to provide convenient tools to determine this, but maybe there’s no need to stop or harass the player about it. Some players are incurious or in a hurry. That’s fine.
Multiple, interlocked timers: this is the hard one. Back player out to prior to the first timer, or just reset the clock? How to explain which has happened, or what the ground rules are?
I would tell whatever story I wanted to tell, and just have a design goal of avoiding making the player feel needled or hassled. As an author, I would want to make sure they understand the rules, understand the consequences for failure, and avoid reliance on UNDO or RESTORE. As a player, I am usually more irritated by getting thrown into a timed sequence without knowing what my goal is.
Finally, it seems important to carefully consider which actions should and should not require a turn during these sequences. Some actions can be tweaked to require no time during the sequence. Perhaps examining the puzzle knickknack during the event should be a freebee. It is fine to be tough if the player knows they are playing a tough game, but what is the subjective experience of toughness and temporality?
And I’m the lazy contributor: for a scene you need to happen a certain way the easiest way is cutscene/narration. You are, as the author, allowed to control the narrative and temporarily take agency out of the hands of the player to make the plot work. I’ve heard many people say that they actually enjoy cutscenes as a “reward” to sit back for a moment and watch stuff happen, so that’s one of your options. You can play with pacing with “press any key to continue”. You can even add teeny bit of choice during a cutscene by requiring a yes/no answer:
The villain stands triumphant before you, holding both the bomb and the deactivation code. He seems as though he’s about to embark on the classic evil-villain monologue.
Do you want to humor him? Type YES to calmly listen. Type NO if you want to start subtly trying to escape the ropes binding your hands behind your back while he speaks.
This is done in Inform7 with “if the player consents”:
say "Do you like oregano?";
if the player consents:
say "Then we'll add a good shake of it.";
set oregano to true;
say "Right. Many people don't. We'll have none of that.";
Another option is to temporarily switch to full choice mode. My favorite option for this is AW Freyr’s “Hybrid Choices” extension which allows you to switch between numbered choices and parser mode at any time. It can be a major time-saver when you need to limit interactions for the player or simplify a complicated interaction, and the choices made can alter the world-state as necessary.
Yeah, that’s valid. It’s a good rule of thumb to avoid simulating things if there’s no benefit for the player/story. Sometimes the stress of choice is the point, but I think that’s always worth interrogating.
I got distracted quite a bit (In a good way) by going through a lot of blog posts related to conversation handling. I think I am better off avoiding that for now.
I am now trying to work out a way of handling it:
Save game state (maybe just the locations of the portable things?) when entering a room which is an entry point to the “danger zone”.
When player enters the zone, the events start (I think I can use a scene here?), ideally announcing it like a new chapter in a book.
When player successfully completes the zone (rescues his sister), game play continues normally.
When player fails to complete the zone (I allow for extra ‘time’ if time limited, but players might still enforce a fail by e.g. trying to escape, just to see what happens) restore the game state and put the player back at the entry point, admonishing the player and informing why the player failed.
Player can then decide to try again with the newly gained experience, or go elsewhere and try some other time.
I think this way I can give the player maximum freedom and still allow for a smoother retry without the player needing to restore or do x times an undo.
It would also allow me to let the sister be more anxious about entering the zone (as if she feels something bad will happen to her) the next time around, which is a nice bonus IMHO.
The cutscene is a very interesting alternative for dealing with it indeed. I will keep it as a fallback option when I get to beta testing things (apparently I can also beta test a partial game? It would be a great help to see if I am going somewhere) in case beta testers massively fail to rescue their sisters