Bit of Inform 7 help needed please

Hi all,

I’m slowly working my way through the Inform 7 manual (the one included with the software) and so far so good.

I wondered though if I could cheat a little and ask here for some specifics that I want to learn please. I’m sure they are in the manual so I’m perhaps a bit impatient, but hey ho
:slightly_smiling_face:

In no particular order:

  • How to make it so that at certain points you can clear the screen.

  • Have an object that isn’t in any particular room but can be referenced by the parser. So say for example the weather, its not an object but a subject that can be referenced/discussed.

  • How to make a routine so that text is displayed on the screen after a certain amount of moves.

  • How to make a routine so that after say 5 moves it performs an action (this is possibly the same as the above question).

Thanks in advance!

Adam

If this was Inform 6, I could answer all those questions, but Inform 7 is a real mystery to me. Sorry.

2 Likes

At the top:

Include Basic Screen Effects by Emily Short.

And then whenever you wish:

	clear the screen;

If this is actually in the context of a conversation system, it might be worthwhile looking at some of the conversation extensions in the I7 GitHub. In particular, have a look at the extensions by Chris Conley and Eric Eve. They handle this sort of thing for you, among other features.

In general, though, the concept of what objects can be referred to at any given moment is called the “scope”. You can read more about this in 12.16 and especially 18.29.

See 9.11 for the basic functionality. For some powerful and useful extensions, see Ron Newcomb’s Phrases for Adaptive Pacing.

3 Likes

Thanks!

A maybe useful tip: if you want to do specific things like the ones mentionned, you can check the recipe book (the “second” manual included with Inform), which shows how to implement specific features instead of describing the whole language step by step.

For example, for “how to make a routine so that after say 5 moves it performs an action”, you can look in the “Time and Plot” chapter, especially the “Event Scheduling” section.

Or for “having an object that isn’t in any particular room but can be referenced by the parser” (for topics that can be discussed), you can look in the “Other Characters” chapter. Since it’s a more complicated topic, it’s more difficult to find the relevant section; “Saying Simple Things” seems to contain what you need.

The examples will often require some knowledge of Inform, but usually they are easy to understand (and you can jump to the corresponding section of the main manual if needed).

2 Likes

The examples are cross-indexed both ways, too, so if you can more easily locate a particular example in the Recipe Book based on theme, you can then click through to the Writing with Inform page that talks about its key feature for more information, and vice versa.

2 Likes

Thank you both, great advice, much appreciated!

Adam

Further to weather, you can also look up the “backdrop” idea in the documentation.

1 Like