Chapter 18, Continued
Section 18.21 is Printing the name of a dark room. This is the same for all dark rooms and can’t really be specified. Usually it just prints the word ‘Darkness’, but you can modify it like this:
Before printing the name of a dark room, say "Near ".
to say ‘Near Darkness’.
18.22 is Printing the description of a dark room. This one also cannot be specified for specific dark rooms.
The default behavior is to print, ‘It is pitch dark, and you can’t see a thing’.
You can modify it like this:
Rule for printing the description of a dark room: say "Your eyes can barely make anything out." instead.
or this:
Rule for printing the description of a dark room: try listening instead.
Example 348 is Hohmann transfer.
Rule for printing the description of a dark room:
say "It's night on this side of the planet, so you can make out only the glow of urbanized areas along the seacoasts." instead.
Rule for printing the name of a dark room:
say "Dark Side" instead.
One reason I avoid doing things like that is because I don’t think you can put scenery items like ‘the glow of urbanized areas’ into a dark room, so why mention it in the description? Unless I’m wrong.
Example 349 is Four Stars (not a four star example though).
In this example, you can ‘listen’ or ‘smell’ to get a list of all scented or audible things:
The report listening rule is not listed in the report listening to rules.
Carry out listening to something:
say "From [the noun] you hear [the sound of the noun]."
Instead of listening to a room:
if an audible thing can be touched by the player, say "You hear [the list of audible things which can be touched by the player].";
otherwise say "A merciful peace prevails."
Definition: a thing is audible if the sound of it is not "silence".
Before printing the name of something audible while listening to a room:
say "[sound] from the "
A thing has some text called scent. The scent of a thing is usually "nothing".
The report smelling rule is not listed in the report smelling rulebook.
Carry out smelling something:
say "From [the noun] you smell [scent of the noun]."
Instead of smelling a room:
if a scented thing can be touched by the player, say "You smell [the list of scented things which can be touched by the player].";
otherwise say "The place is blissfully odorless."
Definition: a thing is scented if the scent of it is not "nothing".
Before printing the name of something scented while smelling a room: say "[scent] from the "
Rule for printing the description of a dark room: try listening; try smelling; rule succeeds.
Instead of examining an audible thing while in darkness: try listening to the noun. Instead of examining something while in darkness: try touching the noun.
Before touching something when in darkness:
say "You grope about..."
etc.
18.23 is Constructing the status line. It makes a left hand status line and right hand status line.
We can alter this construction to, for instance, provide shortened names in the status line:
The Temple Of A Thousand Mightily Peeved Deities is a room. Rule for printing the name of the Temple while constructing the status line: say "Temple".
And you can hide it:
The blindfold is wearable and carried. Rule for constructing the status line while the blindfold is worn: do nothing.
Example 350 is Ways out. I’ve copied this one many times before.
When play begins:
now left hand status line is "Exits: [exit list]";
now right hand status line is "[location]".
To say exit list:
let place be location;
repeat with way running through directions:
let place be the room way from the location;
if place is a room, say " [way]".
Rule for printing the name of a direction (called the way) while constructing the status line:
choose row with a heading of the way in the Table of Abbreviation;
say "[shortcut entry]".
Table of Abbreviation
heading
shortcut
north
"N"
northeast
"NE"
northwest
"NW"
east
"E"
southeast
"SE"
south
"S"
southwest
"SW"
west
"W"
up
"U"
down
"D"
inside
"IN"
outside
"OUT"
Example 351 is Guided Tour:
When play begins:
now left hand status line is "Nearby: [if a room is adjacent][the list of adjacent rooms][end if][if a room is adjacent and a door is visible] and [end if][if a door is visible][the list of visible doors][end if]";
now right hand status line is "".
Rule for printing the name of an unvisited room (called the target) while constructing the status line:
let aim be the best route from the location to the target;
say "something [aim]".
After printing the name of a visited room (called the target) while constructing the status line:
let aim be the best route from the location to the target;
say " ([aim])".
> Rule for printing the name of a direction (called the aim) while constructing the status line:
> choose row with a heading of the aim in the Table of Abbreviation;
> say "[shortcut entry]".
> Table of Abbreviation
|heading|shortcut|
| --- | --- |
|north|"N"|
|northeast|"NE"|
|northwest|"NW"|
|east|"E"|
|southeast|"SE"|
|south|"S"|
|southwest|"SW"|
|west|"W"|
|up|"U"|
|down|"D"|
|inside|"in"|
|outside|"out"|
Section 18.24 is Writing a paragraph about. It happens before writing a paragraph about something, and usually does nothing! But if you make a rule for writing a paragraph, it rplaces what would have been printed, and anything whose name is printed in this rule (using a name printing phrase or substitution or activity, etc.) is excluded from the ‘nondescript’ portion of the room description.
Warning: because we often want a “for” rule for this activity to make some calculation and then possibly choose to do nothing (see the example “Otranto”), Inform suppresses the usual paragraph not when a “for” rule took effect but when it detected a paragraph having been printed. This can get confused if a text substitution affecting paragraph breaks, say “[line break]”, is within the final “say” of a “for writing a paragraph about” rule.
You can use this thing to combine several ‘nondescript items’ into one:
Rule for writing a paragraph about Mr Wickham:
say "Mr Wickham looks speculatively at [list of women in the location]."
Printing the name of something in an activity like this makes it ‘mentioned’; if we want Inform to describe it again later, we can set it to ‘unmentioned’ (all of this happening in one turn).
Example 352 is Reflections:
Rule for writing a paragraph about a shiny thing:
say "The [brightness of the torch] light of [the torch] reflects in the surface[if the number of shiny things in the location > 1]s[end if] of [the list of shiny things in the location]."
Before printing the name of the torch while writing a paragraph about something:
if the torch is in the location, say "fallen ".
Example 353 is Emma:
This game replaces the concept of ‘room’ with ‘social clumps’ in a party.
by the banquet table is a room. at the corner is a room. next to the doorway is a room. by the window is a room.
Social clump is a kind of value. The social clumps are vacancy, lone person, couple, cluster, group.
A room has a social clump. Understand the social clump property as describing a room.
Before printing the name of a room:
say "a [social clump] ".
After looking:
assign clumping;
say "Elsewhere in the room, you can see [the list of rooms which are not the location]."
Understand "go to [any room]" as joining. Joining is an action applying to one visible thing. Carry out joining: move player to the noun. Report joining: do nothing.
Understand "examine [any room]" as looking toward. Looking toward is an action applying to one visible thing. Carry out looking toward a room: say "In that direction you see [a list of other people in the noun]."
When play begins: assign clumping. Every turn: assign clumping.
To assign clumping:
repeat with space running through rooms:
now the social clump of the space is vacancy;
if the space contains exactly 1 person, now the social clump of the space is Lone person;
if the space contains exactly 2 people, now the social clump of the space is Couple;
if the space contains more than 2 people and the space contains fewer than 5 people, now the social clump of the space is cluster;
if the space contains more than 4 people, now the social clump of the space is group.
The room description heading rule is not listed in the carry out looking rules.
A person has a number called longevity. The longevity of a person is usually 0. A person can be active or passive.
Definition: a person is other if it is not the player.
Every turn:
repeat with mover running through other people:
now the mover is active;
increment the longevity of mover;
if longevity of mover is greater than 3 or the mover is bored:
assign value of spaces for the mover;
let destination be the nicest room;
if the destination is not the location of the mover:
if the player can see the mover, say "[The mover] makes excuses and drifts off to join [the destination].[paragraph break]";
move the mover to the destination;
now the mover is complacent;
now the longevity of the mover is 0;
if the player can see the mover, say "[The mover] wanders over.[paragraph break]";
assign clumping;
now mover is passive.
A room has a number called attractiveness.
Definition: a room is nice if its attractiveness is 1 or more.
To assign value of spaces for (mover - a person):
repeat with space running through rooms:
now attractiveness of the space is 0;
repeat with figure running through people in the space:
if the mover is bored, decrease attractiveness of the space by 2;
if the mover likes the figure, increment attractiveness of the space;
if the mover dislikes the figure, decrement attractiveness of the space;
if the mover desires the figure, increase attractiveness of the space by 2.
Rule for writing a paragraph about Frank Churchill:
if the location contains a woman (called flirt) who is desired by Frank:
say "[Frank Churchill] is talking with great animation and slightly more than becoming warmth to [the flirt][if an unmentioned other person is in the location], while [the list of unmentioned other people in the location] look on with varying degrees of amusement or irritation[end if].";
repeat with character running through people in the location:
if the character is not Churchill and the character is not the flirt, now the character is bored.
Example 354 is a rare 4 star example
A person has some text called current occupation. The current occupation of a person is usually "None".
Mood is a kind of value. The moods are bemused, bored, attentive, rapt, and blushing. A person has a mood. A person is usually attentive.
Instead of examining a person:
now every thing is unmentioned;
carry out the writing a paragraph about activity with the noun.
Rule for writing a paragraph about a person (called X):
let the subsequent mention be "Name";
if the current occupation of X is not "None":
say "[current occupation of X]. ";
let the subsequent mention be "He";
if X is female, let the subsequent mention be "She";
if X wears something unmentioned:
if the subsequent mention is "Name", say "[The X] ";
otherwise say "[subsequent mention] ";
say "is wearing [a list of unmentioned things worn by X]";
if X carries something unmentioned, say " and carrying [a list of unmentioned things carried by X]";
say ".";
otherwise:
if X carries something unmentioned:
if the subsequent mention is "Name", say "[The X] ";
otherwise say "[subsequent mention] ";
say " is carrying [a list of unmentioned things carried by X]."
Rule for writing a paragraph about a device (called X):
let the subsequent mention be "Name";
if the X is unmentioned:
say "[The X] is here. ";
let the subsequent mention be "It";
if something is part of X:
if the subsequent mention is "Name", say "[The X] ";
otherwise say "[subsequent mention] ";
say "[if a mentioned thing is part of X]also [end if]features[if a mentioned thing is part of X], in addition to [the list of mentioned things which are part of X],[end if] [a list of unmentioned things which are part of X]";
say ".".
Rule for printing the name of the steering wheel while writing a paragraph about a person:
say "steering wheel".
Rule for writing a paragraph about a supporter (called X):
let the subsequent mention be "Name";
if the position of X is not "None":
say "[position of X]. ";
let the subsequent mention be "It";
if a mentioned thing is on X:
say "Besides [the list of mentioned things which are on X], ";
let the subsequent mention be "it";
if the subsequent mention is "Name", say "[The X] ";
otherwise say "[subsequent mention] ";
say "holds [a list of unmentioned things which are on X]."
That seems interesting, not sure how this would pan out.
Hmm…I just compiled this and it’s actually pretty neat. It prints a paragraph about the machinist, the lady, and the car, but not really all at once. When they’re all in the room, it’s wrapped up into one paragraph, but it has parts where the machinist and car have separate paragraphs and part where the car and the lady are wrapped into one. Really it’s stuff like this I think that makes Short’s games magical, real masterclass stuff.
Section 18.25 is Listing Nondescript items of something. This is the final list paragraph at th end of a room description. It usually prints “You can also see such and such”. It has an associated property which it assigns to objects caled ‘marked for listing’.
You can omit something by saying something more important about it:
Before listing nondescript items:
if the watch is marked for listing:
say "The watch catches your eye.";
now the watch is not marked for listing.
You can also change the listing style. Below is the default:
Rule for listing nondescript items of the Distressingly Messy Room:
say "Strewn carelessly on the floor";
list the contents of the Distressingly Messy Room, as a sentence,
tersely, listing marked items only, prefacing with is/are,
including contents and giving brief inventory information;
say "."
Example 355 is Rip Van Winkle.
This example shows how if you put someone’s name into the room description then you don’t want to list them independently later:
A person can be asleep.
The Catskills is a room. "Here is a lovely, secluded fold in the mountains, far from civilization[if Rip Van Winkle is asleep]: as though to prove it, Rip Van Winkle is sleeping under a tree[end if]."
A tree is scenery in the Catskills.
Rip Van Winkle is a man in the Catskills. Rip Van Winkle is asleep.
Before listing nondescript items of the Catskills:
if Rip Van Winkle is marked for listing:
now Rip Van Winkle is not marked for listing;
if Rip Van Winkle is not asleep,
say "Rip Van Winkle stands here, looking mightily confused."
Instead of waiting:
say "Rip Van Winkle wakes up with a snort.";
now Rip Van Winkle is not asleep.
Example 356 is “Happy Hour”
This example groups some nondescript items together and has some complex code about commas and periods:
Before listing nondescript items:
say "You can see [a list of people who are marked for listing] here. ";
repeat with named party running through people:
now the named party is not marked for listing;
let count be the number of visible other people who are carrying something;
if count is 0:
say paragraph break;
continue the action;
let index be count;
repeat with holder running through visible other people who are carrying something:
if index is count, say "[The holder]";
otherwise say "[the holder]";
say " has [a list of things carried by the holder]";
decrement index;
make delimiter index of count.
To make delimiter (index - a number) of (count - a number), continuing or halting:
if index is 0:
if continuing, say ". [run paragraph on]";
otherwise say ".";
otherwise if index is 1:
if count is 2, say " and ";
otherwise say "[optional comma] and ";
otherwise:
say ", ".
To say optional comma:
if the serial comma option is active:
say ",".
Example 257 is Eye of the idol:
Positioning relates various things to various things. The verb to be placed in means the positioning relation. The verb to be placed on implies the positioning relation.
Room-positioning relates various things to various rooms. The verb to be room-placed in means the room-positioning relation.
Definition: a thing (called prop) is in-place:
if the prop is in the location and the prop is room-placed in the location, yes;
if the holder of the prop is a thing and the prop is placed in the holder of the prop, yes;
no.
Definition: a thing is out-of-place if it is not in-place.
Before listing nondescript items:
now every marked for listing in-place thing is not marked for listing.
Rule for writing a paragraph about a quiet supporter (called chosen table):
if an out-of-place thing is on the chosen table:
if an in-place thing is on the chosen table,
say "On [the chosen table], in addition to [the list of in-place things on the chosen table], [is-are a list of out-of-place things which are on the chosen table].";
otherwise say "On [a chosen table] [is-are a list of out-of-place things which are on the chosen table].";
now the chosen table is mentioned.
Section 18.26 is Printing th locale decription of something
This is the part of the room description that describes visible items in the location, which can be a container like a cage. It is usually very complex, and is the activity that prints stuff like ‘writing a paragraph about’ and then ‘listing nondescript activities’.
It suggests that this should be meddled with only after trying the other two, more specifci activities first.
For instance, in a room where nothing can be seen on the ground:
Rule for printing the locale description of the Very Misty Moorlands:
say "Mist coils around your feet, thick as a blanket. You cannot even see the ground you walk upon." instead.
Report taking something in the Very Misty Moorlands:
say "You grope blindly in the mist and pick up [the noun]." instead.
You can also throw stuff in the middle of the activity like this:
The parcel is a closed opaque container on the marble table. The alarm clock is a device in the parcel. The alarm clock is switched on.
Before printing the locale description of a room (called the locale):
if the locale encloses the alarm clock and the alarm clock is switched on, say "A faint ticking noise can be heard."
Example 358 is Priority Lab
This is a debugging rule, that uses something apparently called the ‘table of locale priorities’:
Before printing the locale description (this is the dump locale table rule):
say "Locale Priority list:";
repeat through Table of Locale Priorities:
let the flag be whether or not the notable-object entry is mentioned;
say "[line break] [notable-object entry]: [locale description priority entry]";
if the flag is false, now the notable-object entry is not mentioned;
say line break.
We then manipulate it in various ways:
A thing can be early-described, late-described, latest-described, never-described, sightline-described, or ordinarily-described. A thing is usually ordinarily-described.
After choosing notable locale objects (this is the apply early and late description rule):
repeat with item running through early-described things:
if there is a notable-object of item in the Table of Locale Priorities:
set the locale priority of the item to 1; [list before everything else -- this would work with any number lower than 5 and higher than 0]
repeat with item running through late-described things:
if there is a notable-object of item in the Table of Locale Priorities:
set the locale priority of the item to 10; [list after everything else -- this would work with any number larger than 5]
repeat with item running through never-described things:
set the locale priority of the item to 0; [don't list at all]
continue the activity.
After choosing notable locale objects (this is the latest-described items priority rule):
repeat with item running through latest-described things:
if the item is a notable-object listed in the Table of Locale Priorities:
now the item is mentioned;
now the item is marked for late listing.
The late listing rule is listed after the you-can-also-see rule in the for printing the locale description rules.
A thing can be marked for late listing. A thing is usually not marked for late listing.
This is the late listing rule:
if something is marked for late listing:
say "Oh! And also [a list of things which are marked for late listing].";
now everything is not marked for late listing;
continue the activity.
Hmm, I think this is the only place we have learned about this table (so far).
Section 18.27 is Choosing Notable Locale Objects for something
This is part of the printing the locale description, it picks what gets mentioned and gives them a priority number (with 1 being the highest priority). It doesn’t print anything, it just gives a priority of 5 to everything directly contained by the locale.
You can manipulate it like this:
Rule for choosing notable locale objects for the Misty Moorlands:
repeat with item running through large things in the Misty Moorlands:
set the locale priority of the item to 5.
Report taking a small thing in the Misty Moorlands:
say "You grope blindly in the mist and pick up [the noun]." instead.
Which is weird because I thought it already had priority 5?
It recommends not making a supporter have a lower priority than things on it.
Example 359 is Low Light.
It is a different way of handling darkness.
To decide whether the light level is high:
if the brilliant lamp is switched off, no;
if the player cannot see the brilliant lamp, no;
yes.
To decide whether the light level is low:
if the light level is high, no;
yes.
The shadow is a privately-named thing on the desk.
Understand "barely-visible" or "barely visible" or "shadow" as the shadow when the light level is high. Understand "invisible" or "shadow" as the shadow when the player encloses the shadow.
Before printing the name of the shadow:
if the light level is high:
say "barely-visible ";
otherwise if the player encloses the shadow:
say "invisible (but tangible) "
After dropping the shadow when the light level is low:
say "You let it go and it fades into the ambient gloom."
After choosing notable locale objects:
unless the light level is high:
set locale priority of the shadow to 0.
So setting the locale priority to 0 is a way of hiding the object.
Example 360 is Casino Banale.
A fact is a kind of thing. A fact can be known or unknown. A fact can be ready to learn or hidden. A fact has some text called the narration.
Definition: a thing is narratively significant if it conveys an interesting fact.
Definition: a thing is narratively dull if it is not narratively significant.
Conveyance relates various things to various facts. The verb to convey means the conveyance relation.
Definition: a fact is interesting if it is unknown and it is ready to learn.
After examining something which conveys an interesting fact (called discovery):
say "[discovery][paragraph break]".
After choosing notable locale objects:
repeat through the Table of Locale Priorities:
if the notable-object entry is narratively significant:
set the locale priority of the notable-object entry to 1.
For writing a paragraph about a narratively significant thing (called item):
now the item is mentioned;
let chosen fact be a random interesting fact which is conveyed by the item;
say "[chosen fact][paragraph break]".
I tried compiling this and see what it does but I don’t really understand how changing the locale priority does anything here.
Okay, I tried deleting that line, and a paragraph changed from this (with the line):
Penny catches your eye again. The bright coral lipstick was really not a wise choice.
Frince and Tim are chattering.
To this without the line:
Frince and Tim are chattering impatiently.
Penny catches your eye again. The bright coral lipstick was really not a wise choice.
Section 18.28 is Printing a locale paragraph about.
This is part of printing the locale description, working its way through high priority items and working down.
The default behavior is these seven rules:
(1) The "don't mention player's supporter in room descriptions rule" excludes anything the player is directly or indirectly standing on or, less frequently, in. The header of the room description has probably already said something like "Boudoir (on the four-poster bed)", so the player can't be unaware of this item.
(2) The "don't mention scenery in room descriptions rule" excludes scenery.
(3) The "don't mention undescribed items in room descriptions rule" excludes the player object. (It's redundant to say "You can also see yourself here.") At present nothing else in I7 is "undescribed" in this sense.
(4) The "set pronouns from items in room descriptions rule" adjusts the meaning of pronouns like IT and HER to pick up items mentioned. Thus if a room description ends "Mme Tourmalet glares at you.", then HER would be adjusted to mean Mme Tourmalet.
(5) The "offer items to writing a paragraph about rule" gives the "writing a paragraph about" activity a chance to intervene. We detect whether it does intervene or not by looking to see if it has printed any text.
(6) 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.
(7) The "describe what's on scenery supporters in room descriptions rule" is somewhat controversial. It prints text such as "On the mantelpiece is a piece of chalk." for items which, like the mantelpiece, are scenery mentioned - we assume - in the main room description. (It is assumed that scenery supporters make their contents more prominently visible than scenery containers, which we do not announce the contents of.)
Weird that the ‘don’t mention undescribed items’ rule only includes the player.
In my current game I have a couple of areas where I wanted to move from supporter to supporter in a single room without reprinting everything al the time. So I was trying to turn a lot of these rules of manually. I ended up (from stuff I learned in an earlier chapter) putting in ‘Move the player to …without printing a room description’, but I wonder if I could have just messed with this activity.
You can remove doors from the room description:
For printing a locale paragraph about a door (called the item)
(this is the don't mention doors in room descriptions rule):
set the locale priority of the item to 0;
continue the activity.
And you can get rid of the rule the manual says may be the most contentious of all:
The describe what's on scenery supporters in room descriptions rule is not listed in any rulebook.
Example 361 is Kiwi:
A raised supporter is a kind of supporter.
For printing a locale paragraph about a raised supporter (called the high place):
if the player is on a supporter (called the riser):
say "Up on [the high place] (and only visible because you're on [the riser]) [is-are a list of things on the high place].";
otherwise:
say "The [high place] is above you."
Example 362 is Copper River:
For printing a locale paragraph about a dull thing (called item):
now the item is mentioned.
Before printing a locale paragraph about a supporter (called item):
now every dull thing on the item is mentioned.
Before printing a locale paragraph about a container (called item):
now every dull thing on the item is mentioned.
I’ll leave off there since 18.29 is scope which I want to learn more about.