[I7] Order of the introductory text

In my game it does things in this order:

  1. Prints the game title/author info on a nice splash screen.

  2. Prints some introductory text that is in the “when play begins” portion.

  3. Immediately after the when play begins introductory text, it prints the banner text. I have a rule that modifies the banner text to add some additional information.

How can I print the introductory text AFTER the banner text instead?

Would it work to do “After printing the banner text for the first time” and then stick the introductory text there instead?

There are two way I can think of to do this.

  1. Place the rule printing the introductory text after the display banner rule but before the initial room description rule in the startup rulebook instead of in the when play begins rulebook.

  2. Put the introductory text in the room description of the starting room using “[first time]…[only]” so that it only shows up once.

The former is best if you want the introductory text to appear before the room description heading as well as the room description body text. However, if you want the introductory text to appear after the room description heading then I’d suggest the latter.

Hope this helps.

OK I tried to get this to work where the initial appearance property of my start room triggers a scene that plays my start text.

but for some reason I can’t figure out how to turn the “initial appearance” function on in Inform. Does anyone have experience with this?

The manual states “The “use initial appearance in room descriptions rule” prints the “initial appearance” property of an item which has never been handled as a paragraph, if it has one.” but placing “use initial appearance in room descriptions” doesn’t compile.

The initial appearance is for unhandled items in that particular room. To use it, all you have to do is define it, like so.

The initial appearance of (a thing) is "Whatever you want to say.".

This will then show up in the room description of the room the item is in until the item is handled.

Here’s a simple example of the initial appearance in action.


The Testing Room is A Room. The description of the testing room is “This is the testing room. It is used for testing things.”.

The statue is in the testing room. The initial appearance of the statue is “A great statue stands here.”. The description of the statue is “It’s very statuesque.”.

Test me with “take statue / drop statue / l”.[/code]

If you need something that lasts after taking, then you’d need a “for writing a paragraph about” rule.

Hope this helps.

I get this error:

But, the documentation SAYS I can put initial appearance on a ROOM!

Where does it say that? I can see places (8.5) where it clearly says that you can’t do that.

I must be mistaken. Does then, “use initial appearance in room descriptions” refer solely to the descriptions of objects in those rooms? I thought it meant rooms would have initial appearance descriptions.

Yes, it refers solely to things. “use initial appearance in room descriptions” most likely isn’t anything you ever have to type in your code. It’s the name of a rule in the Standard Rules, which after printing the description of a room goes through and prints special text for any things that are sitting in the room that have the “initial appearance” property and haven’t been handled yet.

So if you have this:

[code]The Lab is a room. A doodad is in the lab. “A shiny doodad is here. You can almost hear it whispering to you, ‘Take me, take me.’”

Test me with “l/get doodad/drop doodad/l”.[/code]

the text in quotes is the initial appearance of the doodad (if you put text in quotes after defining an item it usually/always becomes the item’s initial appearance), and as you can see the text prints in the room description before you’ve picked it up but not after. The “use initial appearances in room descriptions” rule is what controls that behavior, and it does it behind the scenes if you don’t try to change it.

Rooms aren’t things, so they don’t even have initial appearances themselves.

FWIW, here’s the rule from the Standard Rules:

For printing a locale paragraph about a thing (called the item) (this is the use initial appearance in room descriptions rule): if the item is not mentioned: if the item provides the property initial appearance and the item is not handled and the initial appearance of the item is not "": increase the locale paragraph count by 1; say "[initial appearance of the item]"; say "[paragraph break]"; if a locale-supportable thing is on the item: repeat with possibility running through things on the item: now the possibility is marked for listing; if the possibility is mentioned: now the possibility is not marked for listing; say "On [the item] "; list the contents of the item, as a sentence, including contents, giving brief inventory information, tersely, not listing concealed items, prefacing with is/are, listing marked items only; say ".[paragraph break]"; now the item is mentioned; continue the activity.

Oh, now that I think of it, you’re probably getting confused because of the similarity of “use initial appearances in room descriptions,” which as I said is the name of a rule, and things like “Use American dialect” and “use the serial comma,” which are use options that you can just plop into your code and have them do what they do. That’s understandable.

[EDIT: Wow, that was a terrible description of use options. They’re described in 2.12 of the documentation.]

Anyway, yeah, initial appearances won’t get you what you want here, and you don’t really have to fiddle with them to get them to work how they’re supposed to.

For the thing you want to do, climbingstars’ solution works, and you can also do this:

Welcome-text printed is a truth state that varies. After printing the banner text when welcome-text printed is false: say "Foo!"; now welcome-text printed is true.

(The welcome-text printed flag is necessary so “Foo!” doesn’t get printed every time someone types “version,” though really, who the heck does that?)

The two methods I mentioned above give something like this.


This is the introductory text rule: say “This is the first way of dealing with introductory text.”.

The introductory text rule is listed before the initial room description rule in the startup rulebook.

The Testing Room is A Room. The description of the testing room is “[first time]This is the second way of dealing with introductory text.[paragraph break][only]This is the testing room. It is used for testing things.”.[/code]

Both are rolled into one here.

Isn’t that “use the serial comma”? It’s definitely not standard if you have to put it in! :wink:

Actually, it’s how IFIDs are extracted from games for referencing purposes. Also, transcript recording automatically includes this information.

Thanks for the more detailed ways of controlling introductory text.

Climbing, your method wasn’t satisfactory because I couldn’t figure out how to insert a “press any key to continue” or a “clear screen” into a room description. And it was an awful lot of [para] statements to put all in one line.

To be honest, it also introduced a lot of potential for hard to find errors if I mistyped something or accidentally put a return inside that humongeously long description field. It would work for something short, but wasn’t right for my needs.

I already had an “after the banner” line in my code, so I adapted Matt’s idea by sticking a conditional into my existing after statement, which worked like a charm.

Derp. Retroactively edited.


Yep, it sure did! (…he said, jumping into the conversation). This enabled one of the “things” in my Inform 7 project “hang on” to the string of text that was originally its “initial appearance”.

For anyone else wrestling with this problem, see “17.22. Writing a paragraph about” in the Inform 7 documentation.