Inform 7 Room Description Rule

Hello! When a particular scene begins, I would like to alter this “[Rule “room description body text rule” applies.]” so that for only the beginning of this scene it doesn’t work, and then switch it back on. However, the way I’ve managed so far, with “do nothing” or “does not apply”, isn’t working at all and inform just tells me that maybe I didn’t define the rule.

For example, when doing something like this:

Meet Gammleid is a same-chapter scene. Meet Gammleid begins when Spooky Plants has ended. Meet Gammleid ends when location is Player's Room.

When Meet Gammleid begins:
	room description body text rule does nothing when location is Lobby;
        [etc etc etc]

inform tells me perhaps I haven’t defined the room description body text rule–even though I’m directly copying it from the rules on report!

Also, if someone could tell me how to reliably find these rules instead of having to sort through every single action and rulebook in the hopes I just maybe manage to locate it so I can just copy it from there, that would be swell! Thanks for your time. :slight_smile:

I have found a workaround for how to do what I want, but I would still like to know a more reliable way to actually find the spot in the index these rules are beyond just praying I happen to guess the right tab and book/activity.

I’m not sure what you’re trying to do. Scenes start at a particular point in the turn sequence (right before “every turn” rules). A scene won’t start during an action, so it doesn’t make sense to alter the action behavior in the “when scene begins” rule.

I believe the layout of the GUI varies slightly between the different platforms (apple, windows and linux) so you may not see exactly what I see. (I’m using Linux, btw.)

In my I7 app, there is a row of tabs town the right hand side of each window: Source, Results, Index, Skein etc.

Click on the “Index” tab. This brings up all the different Indexes available to you, arranged as a set of tabs across the top of the window. These indexes are automatically updated every time you recompile your project, so they will contain pointers to your own code, too. They’re a very handy way of moving around, in fact. You should see 7 tabs: “Home”, Contents, Actions, Kinds, Phrases, Rules and Scenes.

Click on the “Actions” tab. You’ll see that the actions are grouped by function, “Standard actions which move the actor”, or “Standard actions which happen out of world”, for example.

The section you want is “Standard actions concerning the actor’s vision”. You’ll find “Looking” listed there. If you click on the magnifying glass, it’ll describe the mechanics of the action in more detail.

I find it especially useful for finding out which typed commands trigger which Action. e.g. if you have a window, and want it to respond sensibly to a player attempting to “look through the tiny window”, I discovered you need to amend the message produced by the “searching” action. That’s the trouble with computers: logical, but not sensible!

Unfortunately for your case, Looking is about one of the most complicated actions that Inform does, because it works out the visibility rules during the course of running it - working out if the location is lit, and if the player-character (“Actor”) is placed to take advantage of that, or not.

So, in this case I’d suggest trying something other than fiddling with the Look action itself.

If you look at chapter 3 of the Inform Recipe Book, 3.1 is about changing room descriptions, and example 334 “Ant sensitive sunglasses” shows you how to substitute a rule for a simple text description by breaking it out into a “to say” rule.

So you might try…

"Descriptions" by "blank"

The vaulted laboratory is a room. "[lab-description]".

To say lab-description:
	say "Ancient, sooty brickwork vaults this immense space. The windows are no more than barred slits, casting brilliant shafts of light onto the furnishings and the eldrich equipment racked against the walls. ";
	if monster awakening is happening:
		say paragraph break;
		say "[one of]On a grooved mortuary slab at the far end of the room, raised like an altar to the soulless gods, an ungainly figure stirs[or]On the slab, the figure strains against its bonds[stopping].";
	otherwise:
		say "The mortuary slab at one end of the room is empty, broken leather restraints dangling from its edges."; 

The orb of regret is a thing in the vaulted laboratory. "Amongst the dusty equipment on a nearby bench, you see a glittering orb."

Monster awakening is a scene. Monster awakening begins when play begins. Monster awakening ends when monster loose begins.

Monster loose is a scene. Monster loose begins when the player is holding the orb of regret.

Test me with "look / look / take orb / look".

Well, that was fun! Hope it helps, anyway!

:slight_smile:

1 Like

Just for reference, the issue with the original code is that “so-and-so rule does nothing” statements have to be put as standalone declarations instead of inside rules.

If you want to have a rule do nothing conditional on a certain scene happening, you’d put that as an additional condition on the “does nothing” declaration, like this;

Room description body text rule does nothing when the location is Lobby and Meet Gammleid is happening.

Here’s a little example that works:

Lobby is a room. "This is the lobby." Bedroom is north of lobby. "This is the bedroom."
Street is south of lobby. "This is the street."

Introduction is a scene. Introduction begins when play begins. Introduction ends when the location is the bedroom.

The room description body text rule does nothing when introduction is happening and the location is the lobby.
test me with "s/n/n/s".
1 Like

I see, thank you so much everyone for your replies! I understand scenes a bit better now too. :slight_smile:

@Dizzydonut Thank you very much for helping break down where I can find this particular rule, as well as the example suggestion! That’s what I ended up doing as my work around.

@matt_weiner And thank you for describing how does nothing works, as well as your example to show me what would work.

I really appreciate the help!

2 Likes