Inform Reference for Simulations

© 2005,2006,2007 Jeremiah McCall – permission is granted for non-profit educational reproduction. Please credit the author. Feel free to link to this page but do not reproduce the contents on another webpage

Reference Conventions

Text contained within signs (example ) represents a placeholder. When writing your own programs you will need to substitute your own appropriate terms without the signs

Contents

  • Part I The Three Main Types of Nouns: Rooms, Things, & People.
  • Part II Interacting with People
  • Part III Interacting with Characters Part II: Giving Things to Characters and Getting Things from Characters
  • Part IV Having Characters Respond Differently Depending  upon What the Player is Carrying.
  • Part V Events – Making things happen after certain actions

Part I – The Three Main Types of Nouns: Rooms, Things, & People.

A. Rooms

A room is any location in Inform or, to be more precise, any place where the player is given a chance to enter commands. A room can be an actual room, a location (“the grassy field”) or even a part of a location (“upper grassy field” and “lower grassy field”).

To create a room with a description the player sees upon entering.
Format:
is a room. Cool descriptive text here.
Example:
Cave is a room. "This is a dank, dark cave."
To make additional rooms after the first.
Format:
is of . “Cool descriptive text of room 2 here.”
Example:
The forest is south of the cave. "You are in a forest to the south of the cave."
The river is north of the cave. "A shallow river, more of a stream really, runs past on the north side of the cave."
B. Things ****

A thing is any object. When a thing is created in Inform, a player can examine, take, and drop that thing by default.

To create a thing and set its starting place in a room
Format:
is in . The description of the is “.”
Example:
A hammer is in the cave. The description of the hammer is "A rusty old hammer.
To create a thing and give the thing to the player to carry.
Format:
The player is carrying the . The description of the is “.”
Example:
The player is carrying the hammer. The description of the hammer is "A rusty old hammer."
To create a more detailed description of a thing that will display when the user looks at or examines the thing:
Format:
The description of the is “description of thing.Example:
The player is carrying the hammer. The description of the hammer is "A rusty old hammer."

Notes about things:

  • Items do not require descriptions (though descriptions add to the richness of the simulation world) things. Inform will display the names of things in the room if no description is given for them.
  • Unless the sentence is fixed in placeis written, the thing can be taken and dropped by the user.
C. People: Men, Women, and Animals

People are the characters the player will encounter in the game. There are three types of people: men, women, and animals (the last one isn’t perfect, I know, but it works).

To create a person and set its starting place in a room:
Format: (3 options based on man, woman, and animal)
is a man. The description of is “description of person. is in .
is a woman. The description of is “description of person.” is in .
is an animal. The description of is “description of person.” is in .Examples:
Caesar is a man. Caesar is in the study.
Emmeline Pankhurst is a woman. Emmeline Pankhurst is in the Parliament.
The grizzly bear is an animal. The grizzly bear is in the cave.

To create a more detailed description of a person that will display when the user looks at or examines the person:
Format:
The description of is “”
Examples:
The description of Caesar is "A man of distinction whose ready access to power has ingrained a look of confidence in his eyes."
The description of Emmeline Pankhurst is "A cheerful looking woman with an impish curve in her smile, she looks ready for trouble."
The description of The grizzly bear is "A bear that is old enough to be grizzled if bears had grey hairs.

Part II – Interacting with People

The player asks a person about something by typing in the command >ask about and tells a character about something by entering the command>tell about . Inform will only understand the text entered by the player if it matches the text specified by the designer exactly. For example, if the designer writes the statement:

After telling Marie Antoinette about "[hunger]", say "Marie says 'Well, if they cannot afford cake,let's get them some bread'."

The say statement will only be activated if the player enters “tell Marie Antoinette about hunger.”

To create greater flexibility for the player so that she can enter a range of similar phrases and be understood by Inform — for example”hunger” “hungry people” or”starving peasants”, the understand statement is used. The purpose writing an understand statement in this context is to allow a player to speak about a topic, without having to know the exact wording of the topic.

To create a series of conversation topics that the player can talk about using a variety of phrases.
Format:
Understand “” or “” or “” as “[topic name]”.Example:
Understand "hunger" or "hungry people" or "the hungry people" or "starving peasants" or "the starving peasants" as "[hunger]".
Understand "farewell" or "farewell address" or "last words" or "his last words" as "[farewell]".

To give a response to the player when she asks a character about something:
Format:
After asking character name about “”, say “.”Examples:
After asking Marie Antoinette about "[hunger]", say "Marie says ‘let them eat cake’. After asking George Washington about "[farewell]", say "‘It would be best,’ muses Washington, ‘ if our country avoided foreign entanglements’.

To give a response to the player when he tells a character about something:
Format:
After telling character name about “”, say “text that the player will see.”Examples:
After telling Marie Antoinette about "[cake]" say "Marie says ‘Well, if they cannot afford cake, let’s get them some bread’."
After asking George Washington about "[entanglements]",say "‘I agree. Entanglements can be very binding’.
Putting it all together:
Understand “hunger” or “hungry people” or “the hungry people” or “starving peasants”the starving peasants” as “[hunger].”
After telling Marie Antoinette about "", say "Marie says ‘Well, if they cannot afford cake, let’s get them some bread’."

Notes about Ask, Tell, and Understand:

  • Pay attention to the use of brackets around a topic in an understand statement. They are critical. “[hunger].” is not the same thing as “hunger.” to Inform.

Part III – Interacting with Characters Part II: Giving Things to Characters and Getting Things from Characters

Assuming that we have created at least one room, one item, and one character (see the guidelines above for doing so), players can give an item to the character.

To allow the player to give an item to the character and have the character respond
Format:
Instead of giving the to :
Say “”;
Now character name is carrying the item name.Examples:
Instead of giving the apple to Hera:
Now Hera is carrying the apple;
say "Hera raises her chin in royal triumph."

To allow the player to get an item from the character after asking about it
Format:
After asking about :
Say “text that the player will see.
Now player is carrying the .Examples:
After asking Marie about cake:
Now the player is carrying the cake;
say "Marie says, ‘See ? It’s very nice cake.’"

Notes:

  • When more than one statement follows and is associated with an “instead of …” or an ” after … ” statement as in the cases above, each statement before the final one must be ended with a semicolon, not a period.

Part IV– Having Characters Respond Differently Depending upon What the Player is Carrying.

Assuming that we have created at least one room, one item, and one character (see the guidelines above for doing so), we can write what is called a conditional statement, so that the character will respond one way if a condition is true and another if the conditions is not true. In this case, the condition is that the player is carrying a certain item.

Format:
After asking character name about “”:
if the player is carrying the begin;
say “.”
otherwise; say “”
end if.Example:
After asking Eleanor of Aquitaine about "[state of affairs]" begin;
if the player is carrying the royal signet ring begin;
say "Eleanor expounds at length on the troubles facing Aquitaine.";
otherwise;
say "Eleanor says, ‘who are you? Why should I discuss affairs of state with you?.";
end if.

Part V Events – Making things happen after certain actions

To make something happen every time the player enters a room.
Format:
After going in :
try the player looking;
say “”; ;Example: (this code causes the Cicero character to come to the assembly every time the player is there.)
After going in the assembly:
Now Cicero is in the assembly;
try the player looking.

To make something happen (text displayed, etc.) the first time the player enters a room.
Format:
After going in :
try the player looking;
if the player is in the for the first time begin;
say “”; ;
end if;Example:
After going in the assembly:
try the player looking;
if the player is in the assembly for the first time begin;
say "now that you have arrived the assembly begins its discussion";
end if;

To make something happen (text displayed, etc.) when the player enters a room a specific number of times.

Format:
After going in :
try the player looking;
if the player is in the for the time begin;
say “cool text”;
;
end if;

Example:
After going in the assembly:
try the player looking;
if the player is in the assembly for the second time begin;
say "the assembly is still in the middle of its debate.";
end if;

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: