Basics (Need Some Help I7)

Hello, I’m just getting into inform for the first time, and I’m having a bit of trouble right from the start. I’m wondering about promting at the first of the game. I want an intro text before anything else.

I typed

say " … "

and pressed the go button, but I got this error.

Problem. You wrote ‘say “Hello”’ : but I can’t find a verb here that I know how to deal with, so I am ignoring this sentence altogether.

Thanks in advanced,

That’s a common mistake.

Inform works by invoking a number of rules (normally) organized in “rulebooks”. It goes through the relevant rulebooks in order and if it finds a rule in the rulebook that applies to the state the game is in, that rule is run.

So to make the game say anything, you have to put the say-phrase inside a rule, such as

When play begins: say "Hello world!"

(EDIT: “When play begins” is the name of a rulebook.
A line that starts with the name of rulebook and a colon creates a new rule in the rulebook specified. The content of that new rule is whatever comes after the colon.)

Note that you also have to create a room, for the game to compile at all.

This should work:

The World is a room.
When play begins: say "Ciao mondo!"

Awesome, that worked great. I’m gonna keep going trough the documentation. I just jumped the gun here at the first because I wanted to start, lol.

My Inform Handbook ( hasn’t been updated to cover a few features in the latest versions, but it’s designed to help you grasp the basics.


I strongly recommend you pick up the book “Creating Interactive Fiction with Inform7” by Aaron Reed. You can get electronic or printed versions via Amazon etc. It’s a great book to introduce Inform7 and how to write interactive fiction.

More info and links available here: … form7.html

Yes, the book Zurlocker mentioned was how I got into Inform, as it has a much nicer introductory curve and focuses on things in a way that seems to make more sense. It also does this hand in hand with discussing the most obvious design issues authors face. The Inform docs are full of informative nuggets of, uh, information, but the nuggets are sometimes hard to find, and ultimately I don’t think the arrangement is great for beginners.

awesome, thanks guys. I’m gonna have a look around for those books. Also in the meantime, I have another post to put in here. I’m having a little trouble trying to learn this on the fly with the included documentation, creating a game as I go. Here’s a little bit, can you have a look at it and maybe show me some errors, and ways to improve?

[code]“Eshers Quest” by InterFiction

chapter 1 - Esher’s Island

Esher’s Cabin is a room. Esher’s bed is in Esher’s Cabin. Esher’s bed is a supporter. Esher’s chest is in Esher’s cabin by Esher’s bed Esher’s chest is a closed container. Esher’s cape is a thing. Esher’s cape is in Esher’s chest.

when play begins: say "Esher lay asleep in his home, a small log cabin his father, the lighthouse keeper, had built years before. The wind outside howled like raging wolves, while rain pummelled down on the home outside.

‘Esher…’ a faint voice called.

‘Esher…’ it spoke again within his head.

‘huh…’ Esher groaned as he stirred from his sleep.

‘Esher!’ The voice said again, this time, more urgent, but only slightly so.

Esher jumped out of his bed, and looked about, but no one was there. Lightning claps lit up the room casting eerie shadows about the place.

‘Esher…check the light.’ The voice said. It was the sound of a beautiful woman. She spoke within his mind with peace, but also a sense of urgency, a need. She sounded like she needed freedom.

‘Who’s there!?’ He called as he looked about the room, but there was no one."

Your code gives the following error message (by the way – including error messages in your posts is often helpful):

The Standard Rules are the rules that get Inform 7 running.

What has happened is that Inform reads the line

Esher's chest is in Esher's cabin by Esher's bed Esher's chest is a closed container.

‘(A thing called) “Esher’s chest” is in (a container called) “Esher’s cabin by Esher’s bed Esher’s chest is a closed container”.’

So you have inadvertently created a container called “Esher’s cabin by Esher’s bed Esher’s chest is a closed container”. (The absurd name is a result of your omitting a full stop after “Esher’s bed”.) And Inform allows authors (and players) to refer to in-game objects by merely a part of their names. Therefore, since “closed container” is part of the name of this container, Inform thinks that the Standard Rules are here referring to that container in a context where it can’t do so. And that is what the error message objects to (even though, in this case, it apparently supposes that it was you who wrote the Standard Rules!).

Note that even if you put the full stop where it should be

Esher's chest is in Esher's cabin by Esher's bed. Esher's chest is a closed container.

these lines will create two containers: a container called “Esher’s cabin by Esher’s bed” and (inside it) a closed container called “Esher’s chest”.
Moreover, neither of them will be in the room called “Esher’s cabin”.
What you want is this:

Esher's chest is in Esher's cabin. Esher's chest is a closed container.

That works since you have already told Inform that Esher’s Cabin is a room. Otherwise it would again have interpreted it as the name of a container.

Inform has no built-in notion of one thing being by or beside another.

Thanks for breaking that down, Felix. I think I’ve gotten that kind of error before, and was annoyed that the error message was so unhelpful. I wonder if it would be possible for the message to add one of those “what I understood was” lists, explaining the name of the object that it understood and where it was defined.

Of course if you want to move things together in a room you can create a relation for it:

[code]Proximity relates various things to each other in groups. The verb to be nearby implies the proximity relation.

Esher’s chest is nearby Esher’s bed.[/code]

:bulb: Whoa - this just occurred to me. A while back I was trying to write a ropes extension, and the relations were killing me. Maybe I should have used group relations…

Hey, thanks guys. I’m starting to get the basics here. I can now create rooms that link, with working descriptions…so that’s a plus, lol.

now I’ve run into a new problem though…

I’m having trouble understanding how to change room description after it’s been entered, so that when they type look they get something else…

also having an issue with moving the player. I’d like to move the player as soon as they enter a certain room how would I go about that?

I’ve tried.

if player is in RoomName: move player to RoomName… but that clearly didn’t work, lol…bot names being different.


when player is in roomname: now player is in roomnam, and a bunch of others but it’s not working…

To make those phrasings work, you have to wrap them in headings, like “every turn,” like this:

Every turn when the player is in Room 1: Move the player to Room 2.

or this:

Every turn: If the player is in Room 1, move the player to Room 2.

Those will print the description of Room 1, move the player to Room 2, and then print its description. (You’d probably want to say something about how the player got moved!) If you just want to move the player to Room 2 without printing anything about Room 1, you could try:

After going to Room 1: Move the player to Room 2.

Though that would raise the question of why Room 1 was there at all!

For changing room descriptions, you could just try making the description something like

The description of room 1 is "[one of]Description 1 goes here.[or]Description 2 goes here.[stopping]".

Section 5.7 of the documentation gives you a lot of different ways to vary texts like this.

Thanks, I’m gonna take a look at that. I don’t know why, but once things get a bit more advanced I have trouble learning it, book or no book, haha, I guess that’s normal. I find forums a good source, advanced users are like tutors, lol…

I do have a book by the way, and combing the documentation has helped a little, but I find a bit of it to be vague. I guess I’m having trouble with this rule business…

now I’m having trouble moving objects based on what room they’re the players in. I have a dream state where the player is surrounded by light, and created it as an thing, but now I need to move this thing as the player moves through the four rooms of the dream…

I can’t figure out how to move objects based on what room the player is in though…

I’ve tried using the same method…

After going to Room 1: Move the player to Room 2.

but making it

but that’s not working…

it’s a little fustrating, lol.

Here’s an exact example of what I mean in my source code. I’m not sure how to work this…

after going to Memory Of Childhood: move The Light to Memory Of Childhood.

okay folks. Inform is not only case sensitive, but word sensitive…haha…I was using names of rooms that weren’t the names of the rooms. This little issue has been fixed.

on thing I am having trouble with now is moving multiple things. It seems that if I type each thing its line of code only the first thing is moved. I tried combining the code, but inform seems to think I’m trying to move an object to an object, or something like that… Here’s what I have…

after going to Childhood Memory: move The child to Childhood Memory and move The Light to Childhood Memory.

If you want to do two things in one rule, indent them on separate lines and join them with semicolons:

After going to Childhood Memory: move the light to Childhood Memory; move the child to Childhood Memory.

The second and third lines should be indented with tab stops.

One issue that you’re probably having is that “after” rules by default end the action, so if you have two different “after” rules they won’t both fire (unless you do something special to make them fire, which is usually to put “continue the action” in your rule). See section 7.5 of the documentation. (Perhaps I should have mentioned that when I suggested the “after going” rule; sorry!) One way to get around this would be to use “carry out” rules instead, so instead of “after going to childhood memory” you write “carry out going to childhood memory.”

Also, if you want the light to move around with the player in the dream state, have you thought about making it a backdrop? See section 3.9; backdrops are designed to be things that are in a bunch of different rooms at once, or anyway to fake it. To get this to work the way you want it, you’d probably have to define the rooms of the dream state as a region, as in section 3.4.

Sorry if I’m throwing too much stuff at you!

nope it’s fine. I’ve got regions set up in the game. Dream containing 4 rooms, each a memory, and after that an island containing a few locations. Thanks for giving exact locations in documentation too. It helps.

I found a closer representation of what I was trying to do with the room descriptions changing. It’s using [if unvisites]. I have one room working, but the other it’s not working so well.

this one works.

[code]the description of Childhood Memory is "[if unvisited]Esher could see himself as a child playing with a ball. He laughed as he saw the memory of himself kicking the little red ball, that his father had given him, back and forth. Somehow the memory made him feel uneasy though. It was as if remembering how things were, remembering how simple things were when he was a child, made him realize how difficult things had become…

To the north Esher could vaguely make out another memory. He could see himself talking to his father. Part of him wanted to get there quickly so that he didn’t miss much of the conversation.[end if] Esher could see himself as a child kicking about a ball that his father had given him".

when the player enters the room it gives the description I want, and then when they type look it gives the second description…

This one is only half working.

[code]the description of Memory Of Father is "[if unvisited]Esher could see himself talking to his father.

‘Now Esher, be a good boy.’ his father said, as his son nodded happily.

‘I’m going to check on the light, and make sure everything’s alright. Make sure nothing happens to the house while I’m gone.’ he said, and then added ‘I wont be long.’

‘Yes dad’ Esher said.

Unlike in his prior memory Esher was now an adolescent. Looking at the memory brought back a great love that Esher had for his father.

‘Esher’ The female voice spoke from within the light again.

‘To the north is the memory of your father leaving.’[end if] Esher is standing there, thinking about his father.".

it gives the description as well as the second part, yet when the player types look it only gives the second part…lol Which is what I would like, without it giving the second part the first time…

say “[if unvisited]Text 1.[else]Text 2.[end if]”

Although that may generate extra newlines. If so, the common (although annoying) fix is to move both periods outside the if section:

say “[if unvisited]Text 1[else]Text 2[end if].”