I don’t know about you all, but while working on my creative project I found the rulebook/guide to be less than helpful at times. Though I eventually figured out how to make some of the things that I wanted to do work, I figured I’d explain a few of them here step by step with simpler terms and explanations than the guide.
As Jeremy Douglass shares in his essay regarding dark rooms, Enlightening IF, “You can’t see anything; you can do very little indeed. All objects except those in your inventory are out of scope, unreachable, as if non-existent.”
There are ways to lighten up dark rooms, however; whether by turning a light on in the room, or by having some item on hand that provides light.
The first method: Using a device, such as a lantern, flashlight, or match, is significantly easier than creating a light within the room.
To begin, create the object and identify it within Inform7 as a device.e.g. The lantern is a device in the cave entrance.
Inform7 usually assumes that devices are “on” normally. So make sure that you label it as off if you want the player to have to turn it on.e.g. The lantern is switched off.
Note: The syntax here is rather picky as the word “switched” is necessary or it won’t understand what you’re saying.
In order for the lantern to provide it light, you have to tell it to provide light of course and can be accomplished via an “after” phrase.e.g. After switching on the lantern, now the lantern is lit.
- Again, the syntax is picky. switching on and lit are necessary unless you’ve defined otherwise with separate code. Also, be wary of word order, as “After the lantern is switched on” will not work. A verb ending in “ing” is necessary in order for Inform to understand.
While the device is on, any room the player is in that was previously dark, or that was coded as dark, will be illuminated.
The second method: In order to create a light-switch/light that can be turned on within a room, a few things need to happen.
First, you must create a dark room. This is done very easily and only requires that you label the room as “dark.”
e.g. The cave is a dark room.
Now, if the player enters the cave he’ll get the message, “It is pitch dark, and you can’t see a thing,” and as Douglass explains, won’t actually have anything in scope, but you can make it so.
In order to place an object in scope, you must first create the object. In this case, I’ll use matches. Then, use the following,
e.g. After deciding the scope of the player when the location is cave:
place the matches in scope.
The player must also have created a source in the room for light, like a torch on the wall. Then, use the following to light the object within the room.e.g. Instead of taking the matches: Now the torch is lit; say “You strike a match against a nearby rock and light the torch on the wall, luckily for you it was freshly soaked in gasoline.”
A few notes:
- Devices can also work for turning on lights, as shown in the game.
- While in a dark room, if the creator of the game placed any objects in scope, read the description or try typing in the command, scope.
- It is a good idea to fix light sources in place if you intend to have a light that can turn on and off.
- It is easy to make words such as “light-switch” be understood and made interact-able via others: Understand “light” and “switch” as the light-switch.
Creating a vehicle is actually very simple. In fact, Inform already understands what a vehicle is!
e.g. In the frontyard is a vehicle called the sedan.
Inform will understand that the character can get inside of “the sedan” and can then move around while inside of it. Other common syntax works for vehicles as well, such as describing.
Basic Scene Creation:
In order to create a scene, or, some event that occurs based on time passing or a certain event happening, the event must be described as such.
e.g. The Play is a scene.
Then, a condition must be met in order for the scene to begin.
e.g. The Play beings when the player is in the theater for 5 turns.
To define what happens in a scene, simply put When [the scene] begins: and then on a new line, begin defining.e.g. When The Play begins: say “The actors come on stage and perform their show for you. You are astounded.”
Ending the scene is exactly the same, only the words ends and ending must be used.e.g. When The Play ends: say “You clap.” The Play ends when the player is in the theater for 5 turns.
A few notes:
- If you plan on listing time or turns for scene length, keep in mind that Inform counts both simultaneously. Therefore, if the scene starts in 2 turns, and you want the chances to last for 2 turns, make sure that it ends after 4 turns.
- Within the scene, you can apply as much or as little change as you desire.
Hope this is helpful!