Inform 7 Home Page / Documentation
§18.29. Deciding the scope of something
1. When it happens. "Scope" is a term of art in interactive fiction programming: it means the collection of things which can be interacted with at any given moment, which depends on who you are and where you are. Commands typed by the player will only be allowed to go forward into actions if the things they refer to are "in scope". Inform also needs to determine scope at other times, too: for instance, when deciding whether a rule conditional on being "in the presence of" something is valid. It is a bad idea to say anything during this activity.
2. The default behaviour. Is complicated: see the Inform Designer's Manual, 4th edition, page 227. Briefly, the scope for someone consists of everything in the same place as them, unless it is dark.
3. Examples. (a) We very rarely want to forbid the player to refer to things close at hand, but often want to allow references to distant ones. For instance, a mirage of something which is not present at all:
After deciding the scope of the player while the location is the Shrine:
place the holy grail in scope.
Two different phrases enable us to place unusual items in scope:
place (object) in scope
This phrase should only be used in rules for the "deciding the scope of..." activity. It places the given object in scope, making it accessible to the player's commands, regardless of where it is in the model world. Examples:
place the distant volcano in scope;
place the lacquered box in scope, but not its contents;
Ordinarily if something is placed in scope, then so are its parts and (in the case of a supporter or a transparent or open container) its contents; using the "but not its contents" option we can place just the box itself in scope.
place the/-- contents of (object) in scope
This phrase should only be used in rules for the "deciding the scope of..." activity. It places the things inside or on top of the given object in scope, making them accessible to the player's commands, but it does nothing to place the object itself in scope. (It ight of course be in scope anyway, and if it is then this phrase won't remove it.) Example:
place the contents of the lacquered box in scope;
place the contents of the Marbled Steps in scope;
Note that the object in question can be a room, as in this second example.
(b) Another useful device is to be able to see, but not touch, another room:
The Cloakroom is a room. "This is just a cloakroom, but through a vague, misty mirror-window you can make out the Beyond." After looking in the Cloakroom, say "In the mirror you can see [list of things in the Beyond]."
After deciding the scope of the player while the location is the Cloakroom: place the Beyond in scope.
(This must, however, also be a mirage, as at time of writing Mr Depp is alive and as well as can be expected following the reviews of "Charlie and the Chocolate Factory".) Note that "place the Ballroom in scope" doesn't just allow the player to talk about the dancers, the chamber musicians and so forth, also allows, say, "EXAMINE BALLROOM". To get one but not the other, use "place the contents of the Ballroom in scope" or "place the Ballroom in scope, but not its contents".
(c) In darkness, the scope of someone is ordinarily restricted to his or her possessions (and body), but we can override that:
After deciding the scope of the player while in darkness: place the location in scope.
4. A note about actions. This activity takes place during the process of understanding the player's command, when the action that will take place is not fully known. So if the player types "TAKE SHOEBOX", this activity would happen when SHOEBOX is being examined for meaning. Inform knows the action it would be taking if the current line of command grammar were to be accepted, but it does not yet know to what objects that command would be applied. That means attaching a proviso like "... while taking a container" to a rule for this activity will cause the rule to have no effect - whereas "... while taking" would be fine.
Start of Chapter 18: Activities | |
Back to §18.28. Printing a locale paragraph about | |
Onward to §18.30. Clarifying the parser's choice of something |
ExamplePeeled |
Suppose we have a situation where the player is in darkness, but is allowed to feel and interact with (except for examining) any large objects. In that case, we write a scope rule that puts those large objects into scope all the time, and trust the "requires light" aspect of verbs like examining to prevent the player from doing any actions that he shouldn't:
Before touching a large thing when in darkness: say "You grope for [the noun]..."
After deciding the scope of the player:
repeat with item running through large things in the location:
place item in scope.
Some generic surroundings are backdrop. They are everywhere. Understand "walls" or "wall" or "ceiling" or "ground" or "floor" or "area" or "room" or "here" as the generic surroundings. Instead of touching the generic surroundings: say "You encounter nothing extraordinary." Instead of touching the generic surroundings when in darkness: say "You try feeling your way around and reach [a list of large things in the location]." After deciding the scope of the player when in darkness: place the surroundings in scope.
The Room of Mystery is a dark room. The bearskin rug is a large thing in the Room of Mystery. Instead of touching the rug: say "It feels furry!"
The peeled grape is a small thing in the Room of Mystery. Instead of touching the peeled grape: say "Gosh, is that an eyeball?"
Test me with "feel floor / feel rug / eat rug / examine rug / get grape".
Sadly, because the grape is small, the player will never encounter this horror.
Alternatively, suppose we have a situation in which the player can use one command to interact with a kind of thing that isn't normally in scope. It's usually most convenient to write the "understand" rule appropriately rather than use the scope activity.
(Note that we define "inquiring about" as applying to one *visible* thing; otherwise we would be required to be able to touch the catsuit in order to inquire about it. More on this restriction may be found in the Advanced Actions chapter on the topic of visible, touchable, and carried things.)
Understand "ask about [any subject]" as inquiring about. A subject is a kind of thing. The skintight catsuit is a subject. Inquiring about is an action applying to one visible thing.
Carry out inquiring about something:
say "'What can you tell me about [the noun]?' you demand. Mr Steed raises his eyebrows, but does not reply."
All this said, there do arise certain complex situations when we want an activity-specific scoping.
ExampleFour Stars 2 |
As we have seen, a well-written understand rule will often solve the problem of allowing the player to apply specific actions to objects not normally in scope. When we need to adjust scope for some other reason than reading the player's command, though, "deciding the scope of..." may come in handy.
For instance, suppose we wanted to extend Four Stars 1 to add a tomcat on the balcony that will be heard whenever the player listens from the next room, as in:
>listen
You hear the soothing whalesong from the Bose speaker and the yowling from the tomcat.
To do this, we need to make sure that in the rule that assembles our listening description,
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."
now includes the tomcat in the "list of audible things which can be touched by the player".
To this end, we're going to change the way we assess scope, but only during the listening action. Otherwise the tomcat remains in the other room and off-limits. The new source text is marked out below:
A thing has some text called sound. The sound of a thing is usually "silence".
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 "
Here is our addition:
After deciding the scope of the player while listening or sleeping or looking:
if in darkness:
repeat with locale running through adjacent rooms:
place locale in scope.
A reaching inside rule while listening or sleeping or looking:
rule succeeds.
The Waning Moon Resort is a dark room. "A spacious room with a flagstone floor, and a dreamcatcher hung over the king-size bed." The dreamcatcher is scenery in the Resort. The description is "The usual web of threads and crystals, feathers and beads." Instead of taking the dreamcatcher, say "Ah, ah -- you might be tempted to take it as a souvenir, except that the price list in the minibar clearly states they charge $65 apiece if you walk off with one. Cheaper than stealing the Frette bathrobes, but still probably not a good idea."
And now our threat to the player's peace:
The Balcony is outside from the Resort. In the Balcony is a tomcat. The sound of the tomcat is "yowling". After printing the name of the tomcat when the tomcat is not visible: say " outside on the balcony".
From here we continue with the same scenario as before:
The king-size bed is an enterable supporter in the Resort. The description is "200-thread-count Egyptian cotton sheets, according to the website. You would make fun, only they really are extraordinarily comfortable." The player is on the bed. A Lindt chocolate is on the bed. It is edible. The scent of the chocolate is "chocolate-hazelnut smell".
An electric light is a kind of device. Carry out switching on an electric light: now the noun is lit. Carry out switching off an electric light: now the noun is unlit. Understand "light" as an electric light.
The solar lamp is an electric light in Waning Moon Resort. The description is "Specially designed to give light in a spectrum resembling sunlight, to improve the mood and make a person energetic." The lamp is switched on and lit.
An electric noisemaker is a kind of device. An electric noisemaker has some text called usual sound. The usual sound of an electric noisemaker is usually "beepbeepbeep". Carry out switching on an electric noisemaker: now the sound of the noun is the usual sound of the noun. Report switching on an electric noisemaker: say "[The noun] goes [usual sound of the noun]!" instead. Report switching off an electric noisemaker: say "You switch off [the noun], silencing the [usual sound of the noun]." instead.
Carry out switching off an electric noisemaker: now the sound of the noun is "silence".
The bedside table is in the Resort. The table supports a potted plant and a Bose speaker. The scent of the potted plant is "rosemary"
The Bose speaker is an electric noisemaker. The usual sound of the speaker is "soothing whalesong". The sound of the speaker is "soothing whalesong". The speaker is switched on.
Instead of touching a device: say "You feel the surface of [the noun] and discover the switch."
Instead of touching a scented thing: say "The brush of your fingers stirs loose a fresh cloud of [scent of the noun] smell."
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..."
After inserting the plant into something:
say "You unceremoniously dump [the noun] into [the second noun], hoping it sustains no important damage thereby."
Before printing the name of a dark room: if the player can touch an audible thing, say "Noisy "; if the player can touch a scented thing, say "Perfumed ".
Visibility rule when in darkness:
if examining something, there is sufficient light;
there is insufficient light.
Rule for printing the announcement of darkness: say "It is now pleasantly lightless in here." instead.
Rule for deciding the scope of the player while in darkness: place the location in scope.
Instead of sleeping when in daylight:
say "You've never been able to sleep with the light on."
Instead of sleeping when the player can touch an audible thing (called the irritant):
say "The steady [sound of the irritant] from [the irritant] prevents your slumber."
Instead of sleeping when the player can touch a scented thing (called the irritant):
if the irritant is chocolate, say "The smell of chocolate continues to tantalize you, keeping you from sleep.";
otherwise say "You sniffle. [The irritant] is probably acting on your allergies."
Instead of sleeping:
say "You slip easily into the arms of Morpheus.";
end the story finally saying "At last..."
When play begins:
say "You have at last escaped from the airport and gotten through customs; survived an unnerving taxi ride over icy highways; stared down the impertinent concierge; endured the bellhop's catalog of features in your room; and achieved, finally, a moment of peace. Time for a good night's slumber!"
Test me with "listen / x dreamcatcher / switch lamp off / look / sleep / eat chocolate / sleep / get plant / examine plant / open suitcase / put plant in suitcase / close suitcase / sleep / look / examine bose / switch bose off / sleep".
Of course, this new version is less happy for the player, as we haven't included any way to silence the cat.
ExampleGinger Beer |
Suppose we want to have a pair of linked lenses so that the player can look into one of them and see things which occur in room containing the other lense.
We begin simply with a bit of environment for the player to wander around:
The Ginger Beer Factory is a room. "In the center of the room is an enormous pot filled with crushed ginger, which seems to be bubbling slightly on its own. The fumes are overwhelming."
The pot is scenery in the Ginger Beer Factory. The description of the pot is "Cast iron." In the pot is a bubbling brew.
Instead of smelling the Ginger Beer Factory: try smelling the brew.
The Storeroom is south of the Ginger Beer Factory. "The walls here are lined with a prodigious number of small, rounded bottles, each with a screw top and a smiling pirate on the label."
The Clippings Room is west of the Ginger Beer Factory. "A clean room lined with steel tables, for preparing ingredients."
Some steel tables are a supporter in the Clippings Room. They are scenery. The description is "They are roughly the size and height of laboratory worksurfaces."
The quantity of dandelion is on the steel tables. The description is "Horrible common weed."
The wooden box is on the steel tables. It is openable and closed. The description is "A large wooden box with a lid, used for ingredient storage. There is a label on the lid."
The label is part of the box. The description is "BURDOCK: the root beaten with a little salt and laid on the place suddenly easeth the pain thereof, and helpeth those that are bit by a mad dog:... the seed being drunk in wine 40 days together doth wonderfully help the sciatica: the leaves bruised with the white of an egg and applied to any place burnt with fire, taketh out the fire, gives sudden ease and heals it up afterwards.... The root may be preserved with sugar for consumption, stone and the lax."
The quantity of burdock is in the box. The description is "It looks like a kind of thistle."
Some bottles are in the Storeroom. They are scenery. The description is "They are smaller than the average bottle, because more potent." Instead of taking the bottles, say "Take one away and the whole lineup will cascade to the floor."
Now for the lenses themselves:
The large end of the telescope is a lense in the Ginger Beer Factory. "There is a large glass lense propped against the wall, in which are reflected all the contents of the room." Understand "glass" or "lense" as the large end.
The small end of the telescope is a lense in the Storeroom. "There is a small glass lense sitting on the floor. Due to some curious effect of the optics, it appears to be giving a view of somewhere else entirely." Understand "glass" or "lense" as the small end. The description is "A gleaming lense about the size of a pound coin."
Here is the critical bit, which needs to be somewhat flexible, since the large end of the telescope could in theory be left anywhere in the game (and should still work).
After deciding the scope of the player while the small end is carried by the player:
let there be the holder of the large end;
place there in scope.
Before searching the small end when the small end is not carried by the player:
say "(first picking up [the small end] and holding it to your eye)";
silently try taking the small end.
Instead of searching the small end when the player is not carrying the small end:
say "It's too hard to look through the small end from a distance."
Instead of searching the large end,
say "You see only your own reflection."
We also want to make sure that the player who looks through the small lense does not see the large lense listed among the contents of the other location:
Instead of searching the small end:
let the far side be the holder of the large end of the telescope;
say "You peer into the little lense and through it see, in [the far side], [the list of recognizable things in the far side]."
Test me with "examine lense / south / examine lense / look through lense / north / look through small lense".
And we're done.
ExampleRock Garden |
A map of linked rooms works well for modeling enclosed or indoor space, and somewhat less well for modeling large open spaces, where a person should reasonably be able to see things which are much too far away to touch. With some modifications to scoping, though, we can create an environment where objects in nearby rooms are described and viewable, and where the player will automatically move towards distant items before interacting with them physically.
Intervisibility relates rooms to each other in groups. The verb to be connected with means the intervisibility relation.
Definition: a room is inter-visible if it is connected with more than one room.
After deciding the scope of the player when the location is an inter-visible room:
repeat with other place running through rooms which are connected with the location:
unless the other place is the location, place the other place in scope.
Rule for reaching inside a room (called target) which is connected with the location:
let way be the best route from the location to the target;
if the way is not a direction:
say "You can't get over to [the target] from here.";
deny access;
say "(first heading [way])[command clarification break]";
try going way;
if the player is in the target, allow access;
otherwise deny access.
After looking when the location is an inter-visible room:
repeat with other place running through rooms which are connected with the location:
if the other place is not the location, describe locale for other place.
Rock Garden West is west of Rock Garden East. Rock Garden East contains a rake. Rock Garden West contains a bench and a maple leaf. The bench is an enterable supporter.
Test me with "get rake / drop rake / sit on bench / get rake".
ExampleStately Gardens |
This time we're going to assume that the player can see into any room that is on a line of sight within one or two steps of travel.
After deciding the scope of the player:
repeat with the way running through directions:
let first step be the room the way from the location;
if the first step is a room:
place the first step in scope;
let second step be the room the way from the first step;
if the second step is a room, place the second step in scope;
place the obelisk in scope.
The obelisk is so large that it can be seen from every room. If we had a number of such large monuments we might want to write a systematic routine to handle them, but this will do for now.
The room description heading rule is not listed in the carry out looking rules.
Now, we set things up so that the surrounding areas are described automatically as part of the room description:
Building description is a truth state that varies. Building description is false.
After looking when the location is an outdoors room:
now count of sentences is 0;
now building description is true;
repeat with way running through directions:
let space be the room way from the location;
if space is an outdoors room, silently try looking toward space;
if the obelisk is not in the location and the obelisk is unmentioned:
let the way be the best route from location to the Upper Terrace;
if the way is a direction, say "[The obelisk] is proudly visible on [the way] horizon. [run paragraph on]";
increment the count of sentences;
now building description is false;
unless the count of sentences is 0:
say paragraph break.
But perhaps there are a few rooms where we do not wish that to happen, so we'll build in exceptions for those.
After looking in the rose garden:
say "Otherwise, you are quite cut off.".
And suppose we want to allow the player to look in any direction:
Understand "look [direction]" or "look to/toward [direction]" as facing.
Carry out facing:
let the viewed item be the room noun from the location;
if the viewed item is not a room:
if the location is indoors, say "Your view is restricted by the lack of doors or windows in that direction." instead;
otherwise say "You can't see anything promising that way." instead;
try looking toward the viewed item.
We also need to tell distant rooms how to describe themselves.
Understand "look toward [any adjacent room]" as looking toward.
Check looking toward a room which does not contain something mentionable:
if building description is false:
say "You can't make out anything of interest that way." instead.
Carry out looking toward:
now every thing is unmentioned;
now the chosen direction is the best route from the location to the noun;
now the second noun is the room the chosen direction from the noun;
if the noun contains something mentionable:
repeat with item running through mentionable things in the noun:
carry out the writing a distant paragraph about activity with the item;
if the noun contains something mentionable:
increment the count of sentences;
choose row count of sentences in the Table of Distance Sentences;
if the second noun is an outdoors room and the second noun contains something mentionable, say "[both entry] [run paragraph on]";
otherwise say "[here entry] [run paragraph on]";
otherwise:
if the second noun is an outdoors room and the second noun contains something mentionable:
increment the count of sentences;
choose row count of sentences in the Table of Distance Sentences;
say "[there entry] [run paragraph on]";
if building description is false:
say paragraph break.
And again, some exception needs to be made for seeing what's in the dip in the ground:
Instead of looking toward the Ha-ha:
now the chosen direction is the best route from the location to the noun;
now the second noun is the room the chosen direction from the noun;
if the second noun is an outdoors room and the second noun contains something mentionable:
increment the count of sentences;
choose row count of sentences in the Table of Distance Sentences;
say "[there entry] [run paragraph on]".
The following is to account for cases where the player types "look toward obelisk" or similar, rather than looking toward a room:
The following is arguably an unnecessary refinement, but the listing of items in the distance gets a bit repetitive unless we vary the sentence structure.
both |
here |
there |
"From here, you make out [a list of mentionable things in the noun] a little way [chosen direction], and, further on, [a list of mentionable things in the second noun]." |
"From here, you make out [a list of mentionable things in the noun] [if the noun is not adjacent to the location]some distance [end if]to [the chosen direction]." |
"From here, you make out [a list of mentionable things in the second noun] some distance [chosen direction]." |
"To [the chosen direction] there [is-are a list of mentionable things in the noun], partly obscuring your further view of [a list of mentionable things in the second noun]." |
"To [the chosen direction] there [is-are a list of mentionable things in the noun]." |
"Quite a way [chosen direction] [is-are a list of mentionable things in the second noun]." |
"Then [chosen direction] [is-are a list of mentionable things in the noun], and beyond [a list of mentionable things in the second noun]." |
"Meanwhile, to [the chosen direction] [is-are a list of mentionable things in the noun]." |
"Meanwhile, [chosen direction] in the middle distance [is-are a list of mentionable things in the second noun]." |
"When you turn [chosen direction], you see [a list of mentionable things in the noun], and somewhat further on [a list of mentionable things in the second noun]." |
"When you turn [chosen direction], you see [a list of mentionable things in the noun]." |
"If you turn [chosen direction], you see [a list of mentionable things in the second noun] some way off." |
"Somewhere generally [chosen direction] [is-are a list of mentionable things in the noun], beyond which, [a list of mentionable things in the second noun]." |
"Roughly [chosen direction] [is-are a list of mentionable things in the noun]." |
"Moreover, in the [chosen direction] distance [is-are a list of mentionable things in the second noun]." |
"[The chosen direction] shows [a list of mentionable things in the noun] and then [a list of mentionable things in the second noun]." |
"And to [the chosen direction] [a list of mentionable things in the noun]." |
"Meanwhile, [chosen direction] in the middle distance [is-are a list of mentionable things in the second noun]." |
"Then, [chosen direction], [is-are a list of mentionable things in the noun], and beyond [a list of mentionable things in the second noun]." |
"Meanwhile, to [the chosen direction] [is-are a list of mentionable things in the noun]." |
"Meanwhile, [chosen direction] in the middle distance [is-are a list of mentionable things in the second noun]." |
"Finally, [chosen direction], [is-are a list of mentionable things in the noun], somewhat nearer than [a list of mentionable things in the second noun]." |
"Finally, to [the chosen direction] [is-are a list of mentionable things in the noun]." |
"Finally, [chosen direction] in the middle distance [is-are a list of mentionable things in the second noun]." |
Now, our ability to view things at a distance should be determined by the size of the things we're trying to see:
A height is a kind of value. 10 feet 11 inches specifies a height. 10 feet 11 specifies a height. The verb to stand means the height property. The verb to measure means the height property. A thing has a height. The height of a thing is usually 3 feet 0.
Definition: a thing is tiny if its height is 0 feet 6 inches or less.
Definition: a thing is short if its height is 3 feet 0 or less.
Definition: a thing is tall if its height is 6 feet 0 or more.
The height of a man is usually 5 feet 10 inches. The height of a woman is usually 5 feet 6 inches.
Definition: a thing is monumental if it is taller than 25 feet 0 inches.
Definition: a thing is mentionable if it stands tall enough to see.
To decide whether (item - a thing) stands tall enough to see:
if the item is in the Rose Garden and the item is shorter than the roses, no;
if the item is mentioned, no;
if the item is in an adjacent room and item is taller than 2 feet 0, yes;
if the item is taller than 4 feet 0, yes;
no.
Instead of examining something which is within a room (called the space) which is not the location:
if the location is adjacent to the space:
if the noun is tiny, say "It is too far from here for you to make out much detail about [the noun]." instead;
let way be the best route from the location to the space;
if the way is a direction, say "You gaze off [way] at [the noun]...";
continue the action;
otherwise:
if the noun is short, say "It is too far from here for you to make out much detail about [the noun]." instead;
let way be the best route from the location to the space;
if the way is a direction, say "You gaze off [way] into the distance at [the noun]...";
continue the action.
We might also want to be able to override, manually, the way distant things are described.
Rule for writing a distant paragraph about the lily pond:
if the second noun is a room and something mentionable is in the second noun, say "A [lily pond], [chosen direction], patchily reflects [a list of mentionable things in the second noun] on the far side. [run paragraph on]";
otherwise say "To [the chosen direction], [a lily pond] shimmers in the sunlight. [run paragraph on]"
Rule for writing a distant paragraph about the roses:
if something in the Rose Garden is taller than the roses,
say "Over the tops of [the roses], [chosen direction], you see [a list of mentionable things in the rose garden]. [run paragraph on]";
otherwise say "Immediately [chosen direction] is [the roses]. [run paragraph on]"
Rule for writing a distant paragraph about the obelisk:
if a mentionable thing in the Upper Terrace is shorter than the obelisk,
say "A stupidly grand [obelisk], [chosen direction], towers over [a list of mentionable things in the Upper Terrace]. [run paragraph on]";
otherwise say "To [the chosen direction], you can't help noticing [the obelisk], which is much larger than any object really needs to be. [run paragraph on]".
After writing a distant paragraph about something:
increment the count of sentences.
Moreover, proximate things might have special descriptions too.
Rule for writing a paragraph about something tiny when the location is outdoors:
if the location is the Gravel Circle,
say "Abandoned in the gravel [is-are a list of unmentioned tiny things in the location]. [run paragraph on]";
otherwise say "Half trampled into the grass, and easy to miss, [is-are a list of unmentioned tiny things in the location]. [run paragraph on]"
Before doing something other than examining or approaching to something which is not within the location:
if the player has the noun, continue the action;
say "(first going over to [the noun])[line break]";
try approaching the noun;
if the noun is not within the location, stop the action.
Understand "go toward/to/towards/near [something]" or "approach [something]" as approaching.
Check approaching:
if the player is in something, say "You'll have to get up." instead;
if the noun is within the location, say "You're as close to [the noun] as you can get." instead;
let space be the location of the noun;
if the space is not a room, say "You don't quite see how to get there." instead;
let way be the best route from the location to the space;
unless way is a direction,
say "You can't see how to get over there from here." instead.
To head to (space - a room):
let the way be the best route from the location to the space;
if the space is adjacent to the location,
try going way;
otherwise silently try going way.
Carry out approaching:
let space be the location of the noun;
while the space is not the location:
head to space.
This is a bit primitive, since if we had an occasion where going was blocked, we could get stuck in a loop. So we would need to be careful, but for this example it won't arise.
Going state is a truth state that varies. Going state is false.
The description of a room is usually "[if going state is true]You drift [noun] across the open lawn[direction relative to obelisk]. [end if]An absolutely phenomenal quantity of manicured turf stretches from where you stand in almost every direction."
To say direction relative to obelisk:
if obelisk is in the location:
say ", as though drawn magnetically to the foot of the monument";
otherwise:
let way be the best route from the location to the Upper Terrace;
if way is the noun, say ", drawn towards [the obelisk]";
if the way is the opposite of the noun, say ", keeping [the obelisk] more or less at your back".
When play begins:
now the left hand status line is "Idyllic";
now the right hand status line is " ".
The Gravel Circle, the Ha-ha, the Sheep Field, the Open Lawn, the Croquet Ground, the Rose Garden, the Upper Terrace, the Middle Terrace, and the Lower Terrace are outdoors.
The Middle Terrace is north of the Lower Terrace and south of the Upper Terrace. The lily pond is fixed in place in the Middle Terrace."You [if going state is true]come to[otherwise]are at[end if] the north edge of a perfectly round lily pond, bordered with stones. Its surface patchily reflects [the marble anteater] on the south bank." A tent peg and a wilted orchid are in the Middle Terrace. The tent peg measures 0 feet 6. The orchid measures 0 feet 4.
The description of the Lower Terrace is "[if going state is true]You climb [noun] up a small hillock[direction relative to obelisk][otherwise]You stand on a short, round, entirely artificial hillock[end if]."
The marble anteater is a fixed in place thing in the Lower Terrace. The height of marble anteater is 6 feet 2 inches."A marble anteater stands on a pedestal at the top of the hill. In the bright sunlight the white marble makes a striking contrast with [the obelisk] in the distance." The description is "The anteater is very much more than life-size."
The obelisk of black granite is a fixed in place thing in the Upper Terrace."Now that you are at the foot of it, you can properly appreciate the stupid immensity of the obelisk, pointing stonily at heaven." The height of the obelisk is 50 feet 0 inches. The description of the obelisk is "It stands ridiculously tall, and has an inscription on the face."
The inscription is part of the obelisk. The height of the inscription is 0 feet 3 inches. The description of the inscription is "You can't read the squirming, pointed letters, but they make you uneasy.".
The Gravel Circle is west of the Upper Terrace, northwest of the Middle Terrace, and north of the Croquet Ground. The description of the Gravel Circle is "[if going state is true]You head [noun] until the lawn thins and[otherwise]Here the lawn[end if] gives way to a circle of raked gravel, which crunches pleasingly beneath you."
Instead of going northwest in the Upper Terrace, try going north.
The Ha-ha is north of the Gravel Circle and northwest of the Upper Terrace. The description of the Ha-ha is "[if going state is true]The land dips here so suddenly that you do not know the dip is there until you're in it; but it prevents livestock from crossing barriers, and that is the important thing[otherwise]You are at the base of a steep-sided depression, so the lawn continues north and south more or less at the level of your head[end if].
The tip of [the obelisk] is the only thing you can make out from this depression, off to the southeast.". North of the Ha-ha is the Sheep Field. In the Sheep Field is an animal called a black sheep. The black sheep stands 4 feet 3 inches."A black sheep grazes placidly nearby." The description of the black sheep is "It reminds you of your Uncle Tim."
Before going from the Ha-ha:
say "It's a bit of a scramble to get back up the side of the depression, and you keep slipping in the damp grass. But you manage at last."
The Rose Garden is southwest of the Lower Terrace. The thicket of red roses is a fixed in place thing in the Rose Garden. The thicket stands 4 feet 2 inches."Heavy red roses grow over a roughly horseshoe-shaped wall around you. Over this barrier, the head of [the marble anteater] is visible to the northwest, and the tip of [the obelisk] in the distance."
The description of the Rose Garden is "[if going state is true]You slip [noun] into the enclosure of the rose garden. [end if]The rest of the park, and the world, seems muted and quiet."
Instead of smelling the rose garden: try smelling the roses. Instead of smelling the roses, say "The smell tickles the back of your throat and makes you want to cough."
Instead of listening to the rose garden:
say "You can't hear anything at all."
The Open Lawn is north of the Rose Garden, west of the Lower Terrace, and southwest of the Middle Terrace. The Croquet Ground is north of the Open Lawn, west of the Middle Terrace, southwest of the Upper Terrace, and northwest of the Lower Terrace.
A discarded champagne cork is in the Open Lawn. It stands 0 feet 2 inches.
A stone bench is an enterable supporter in the Croquet Ground. It stands 3 feet 8 inches."There is a stone bench here -- a sort of stone sofa, really, with nymphs disporting themselves on the arms and back." The description of the bench is "It used to be a Roman sarcophagus -- hence the nymphs -- but someone has thoughtfully recarved it as lawn furniture."
The half-size Bentley is a vehicle in the Gravel Circle."A sort of child's-toy version of a Bentley is parked [if something parkable is in the location]beside [the tallest parkable thing in the location][otherwise]close at hand[end if]." The description of the half-size Bentley is "Of beautiful and unambiguously luxurious lines, but sized down to hold only one or (at a stretch) two people, and powered by electricity." The half-size Bentley stands 3 feet 6 inches.
Definition: a thing is parkable if it is not a person and it is not the Bentley.
Instead of touching the obelisk, say "Though it is black stone in sunlight, the obelisk is very cold to the touch."
Test me with "look east / look toward obelisk / s / s / e / sw / ne / n / n / w / n / n / examine obelisk / touch obelisk / read inscription".