Is there a way to force a turn to pass without user input?

What I actually need, really, is to force a scene recheck. I know the Inform 7 system only checks between turns, and I get why it’s set up that way, so “is there a way to advance a turn without user input” is a better question, or at least one more likely to have an affirmative answer.

My issue arises this way:

"Example" by Zyzzyva

Include Questions by Michael Callaghan.

Chapel is a room. A sacred item is a kind of thing. 
A bell, a book, and a candle are sacred items in the Chapel.

To decide what text is the name of (i - a sacred item) (this is sacred item naming): 
	decide on "[i]" in title case.

Collection is a scene. Collection begins when play begins. 
Collection ends when the player holds every sacred item.

Every turn when Collection is happening: [***]
	now current question is "What do you want to pick up?";
	now current question menu is sacred item naming applied to the list of sacred items not held by the player;
	ask a closed question, in menu mode.

A menu question rule (this is the collecting items rule):
	if Collection is happening:
		let chosen item be entry the number understood of the list of sacred items not held by the player;
		move chosen item to player; [+++]
		say "You pick up [the chosen item]."; [@@@]

(Basic inventory management is kind of a waste of the Questions extension, but it makes for a compact example to show my problem.)

The issue, as I think I’ve worked it out, is that the collecting items rule fires after the turn starts but before the every turn rules, which means Inform still thinks (correctly) that we’re in the Collection scene, so when the state changes on the line with the [+++], it doesn’t update the scene and we execute the rule with the [***], causing a bad question:

You can see a bell, a book and a candle here.
What do you want to pick up?
1 - Bell
2 - Book
3 - Candle
Please select a number between 1 and 3 > 1
You pick up the bell.
What do you want to pick up?
1 - Book
2 - Candle
Please select a number between 1 and 2 > 2
You pick up the candle.
What do you want to pick up?
1 - Book
Please select a number between 1 and 1 > 1
You pick up the book.
What do you want to pick up?
Please select a number between 1 and 0 > Uh oh

I can solve it by sticking Every turn when Collection is happening and the player does not hold every sacred item: onto the [***] line, but that seems wasteful. Since the player is intended to be stuck in a little loop of questions for the duration of the scene, nothing in the gameworld changes until Collection is over; so there’d be no harm in forcing a Z turn after the [@@@] line. Can I do it?

I haven’t used that extension so I’m not really clear on what’s happening here or how it interacts with the usual turn sequence rules, but I think you can put in Advance the turn sequence rules – or one or more specific rules in the rulebook, like the timed events rule, the every turn stage rule, etc. – to fire those off when you’d like. This seems like it could cause odd behavior, though – seems like there should be a more sensible way to do things that you might be able to figure out by digging into how the extension is working.

There isn’t really one single rule you can use for this – the turn sequence rules contain all the rules for advancing a turn, but they also include the rules for parsing the command and other things you may not want to do in the middle of a special action, so it’s usually best to pick and choose the specific rules from the turn sequence that you want to apply in the special cases, rather than trying to follow the whole rulebook.

In this case, since you want scenes to process (and perhaps also to advance the turn count), these are probably the ones you want:

follow the scene changing rules;
follow the advance time rule;
follow the note object acquisitions rule;

Adding “follow the scene changing rules” after line [@@@] worked, thank you!

Now, more meta question - how did you figure that out? I can’t find that rulebook in the index anywhere…

1 Like

Thanks for posting this, by the way, I had the exact same problem last night and it was driving me crazy. I found a workaround but this is much better!

1 Like

For most of the turn sequence rules: Index -> Rules, scroll down to “The top level”, then you should see turn sequence rules that you can click the + to expand and show the specific subrules.

You might notice that there’s a couple of blank lines in there too – both of these run the scene changing rules (and yes, that means they run twice per turn). To find that out, you need to read the Standard Rules directly.

However the scene changing rules are mentioned in the Index, just perhaps not where originally expected – they’re in Index -> Scenes rather than Index -> Rules.

I assume it is probably a bug that these two rules don’t have names, but it would probably be rare to need to move them around. (Also WI§10.9 explains why scene changes are normally not supposed to happen during actions.)


Ahhhh, thank you. I didn’t even notice the blank lines.