You can implement a does the player mean rule for entering, and it will get used… but you’re correct that it doesn’t get used when the player just types ENTER. As I mentioned, does the player mean is used when you type ENTER FROB and there are multiple things called “frob”.
It’s a bad idea even here! Imagine commands like LIE ON NIGHTSTAND, or X NIGHTSTAND THEN SIT ON FLOOR. At the very least they should use subcommands to make sure they’re actually looking at the verb.
I disagree with this design decision also; I think implicit opening is a kindness that players are well within their rights to expect in this era.
I disagree with a lot of parts of the entering action, apparently. Though I see why they did it this way. (“The number of things on the noun” vs “the number of things in the noun”, rather than delegating to “held by”.)
I’m surprised this uses surreptitious movement. I don’t see where the object-tree invariants get restored afterward. Backdrops and doors aren’t concerns, because the location didn’t change, but what if you entered a container without a light in it?
I think it’s just a mistake. I don’t see any way that could happen.
Not relevant – the container is open, so the light (or lack thereof) from the location takes priority. If lighting were to change, it would be upon opening or closing a container that you’re in, not upon entering it.
Let’s keep moving.
Standard Rules: Actions 5
§44. Looking.
Looking happens so often that that I sometimes forget about it, but of course not all lookings are equal. There is no after looking, for instance, when a player looks while going.
Section 4 - Standard actions concerning the actor's vision
Looking is an action applying to nothing.
The looking action translates into Inter as "Look".
We’ll take the specification in bites, as its rather long. We’ve already gotten a taste of Inform’s approach to handling spatial immediacy, ie, checking to determine common ancestry between the player and a thing. Here, we are introduced to the concept of visibility levels. As a first consideration, a visibility-holder is the next “higher” object in the tree. For instance, if a chair sit on a podium in a classrom, the visibility-holder of the podium is the clasroom, and the visibility-holder of the chair is the podium.
The specification of the looking action is "The looking action describes the
player's current room and any visible items, but is made more complicated
by the problem of visibility. Inform calculates this by dividing the room
into visibility levels. For an actor on the floor of a room, there is only
one such level: the room itself. But an actor sitting on a chair inside
a packing case which is itself on a gantry would have four visibility levels:
chair, case, gantry, room. The looking rules use a special phrase, 'the
visibility-holder of X', to go up from one level to the next: thus the
visibility-holder of the case is the gantry.
The second consideration is the visibility level count.
The 'visibility level count' is the number of levels which the player can
actually see, and the 'visibility ceiling' is the uppermost visible level.
For a player standing on the floor of a lighted room, this will be a count
of 1 with the ceiling set to the room. But a player sitting on a chair in
a closed opaque packing case would have visibility level count 2, and
visibility ceiling equal to the case. Moreover, light has to be available
in order to see anything at all: if the player is in darkness, the level
count is 0 and the ceiling is nothing.
We’ve already seen the phrase produce a room description with going spacing conventions, but I deferred discussing it until now. This is an Inform 6 inclusion, and I’m not sure what it involves. I would rather see how these things play out in natural language, but perhaps that can’t always be helped. I suppose looking in these cases is handled more or less out of world, which would require some lower-level coding.
Finally, note that several actions other than looking also produce room
descriptions in some cases. The most familiar is going, but exiting a
container or getting off a supporter will also generate a room description.
(The phrase used by the relevant rules is 'produce a room description with
going spacing conventions' and carry out or report rules for newly written
actions are welcome to use this too if they would like to. The spacing
conventions affect paragraph division, and note that the main description
paragraph may be omitted for a place not newly visited, depending on the
VERBOSE settings.) Room descriptions like this are produced by running the
check, carry out and report rules for looking, but are not subject to
before, instead or after rules: so they do not count as a new action. The
looking variable 'room-describing action' holds the action name of the
reason a room description is currently being made: if the player typed
LOOK, this will indeed be set to the looking action, but if we're
describing a room just reached by GO EAST, say, it will be set to the going
action. This can be used to customise carry out looking rules so that
different forms of description are used on going to a room as compared with
looking around while already there."
The specification explains what most of the action variables for looking are for, but abbreviated form allowed goes unmentioned. That is a shame, since it seems unique in that its value is never set explicitly with a now abbreviated form allowed is phrase. It’s never mentioned on this forum, either. This appears to be a separate check from evaluating whether brief or superbrief use options are in force, which also occurs while looking with phrases like if set to sometimes abbreviated room descriptions.
The looking action has an action name called the room-describing action.
The looking action has a truth state called abbreviated form allowed.
The looking action has a number called the visibility level count.
The looking action has an object called the visibility ceiling.
The determine visibility celling rule appears to set action variables that are produced by a handful of phrases invoking I6 code. I think looking is, so far, the action most obscured by I6. I think “obscured” sounds more critical than I mean. I don’t mean it that way! I suppose it is only obscure if you don’t understand Inform 6.
Setting action variables for looking (this is the determine visibility ceiling
rule):
if the actor is the player, calculate visibility ceiling at low level;
now the visibility level count is the visibility ceiling count calculated;
now the visibility ceiling is the visibility ceiling calculated;
now the room-describing action is the looking action.
§45. Carry out.
No checks here, just getting right to the thing.
First, a palate-cleanser for a later printing the locale description of something, since room descriptions can mention things.
Carry out looking (this is the declare everything unmentioned rule):
repeat with item running through things:
now the item is not mentioned.
I’ll break this next rule into chunks. First, printing room headings while in darkness:
Carry out looking (this is the room description heading rule):
say bold type;
if the visibility level count is 0:
begin the printing the name of a dark room activity;
if handling the printing the name of a dark room activity:
say "Darkness" (A);
end the printing the name of a dark room activity;
A subtle distinction: rooms are typically proper-named, but things closed opaque containers are not:
Correction: I had things backwards.
otherwise if the visibility ceiling is the location:
say "[visibility ceiling]";
otherwise:
say "[The visibility ceiling]";
Finally, if the player is in/on something that is not the visibility ceiling, the Standard Rules will print in parentheses the name of the visiblity-holder of the player. This is an exhaustive loop: if things are in or on other things, each will be accounted for. For instance:
lab is a room.
platform is an enterable supporter in lab.
box is an enterable container on platform.
chair is an enterable supporter in box.
the player is on chair.
produces
Welcome
An Interactive Fiction
Release 1 / Serial number 260812 / Inform 7 v10.1.2 / Dlab (on chair) (in box) (on platform)
>
Most of the room description body text rule is committed to handling darkness. Here we also encounter the previously mentioned Inform 6 computations.
Carry out looking (this is the room description body text rule):
if the visibility level count is 0:
if set to abbreviated room descriptions, continue the action;
if set to sometimes abbreviated room descriptions and
abbreviated form allowed is true and
darkness witnessed is true,
continue the action;
begin the printing the description of a dark room activity;
if handling the printing the description of a dark room activity:
now the prior named object is nothing;
say "[It] [are] pitch dark, and [we] [can't see] a thing." (A);
end the printing the description of a dark room activity;
The remainder of the rule is straightforward, especially if we set aside the possibility of Infocom-style brevity/verbosity considerations: print the location's description.
otherwise if the visibility ceiling is the location:
if set to abbreviated room descriptions, continue the action;
if set to sometimes abbreviated room descriptions and abbreviated form
allowed is true and the location is visited, continue the action;
print the location's description;
That isn’t all. The locale description must be handled. If visibility level count is 0, the rule does nothing. This is a fairly elaborate rule, since the player might see the contents of various locales. I’m confused, though. The room description paragraphs about objects rule is broken into two loops, the first of which marks visibility-holders for listing. But I don’t see where any list is printed! The printing the locale description of something sets all things unmarked for listing early on. What am I missing? This is too much trouble to have no purpose.
Carry out looking (this is the room description paragraphs about objects rule):
if the visibility level count is greater than 0:
let the intermediate position be the actor;
let the IP count be the visibility level count;
while the IP count is greater than 0:
now the intermediate position is marked for listing;
let the intermediate position be the visibility-holder of the
intermediate position;
decrease the IP count by 1;
The second half of the rule describes the locales of all visibility-holders holding locale objects, using a loop to exhaust the possibilities. As a reminder, describe locale for (O - an object) is not an Inform 6 reference, it is a straightforward invocation of the printing the locale description of something activity.
let the top-down IP count be the visibility level count;
while the top-down IP count is greater than 0:
let the intermediate position be the actor;
let the IP count be 0;
while the IP count is less than the top-down IP count:
let the intermediate position be the visibility-holder of the
intermediate position;
increase the IP count by 1;
describe locale for the intermediate position;
decrease the top-down IP count by 1;
continue the action;
The visited property is assigned when the player reads the description of a lit room. This make sense, doesn’t it?
Carry out looking (this is the check new arrival rule):
if in darkness:
now the darkness witnessed is true;
otherwise:
if the location is a room, now the location is visited;
§46. Report.
A report rule that applies only to NPCs.
Report an actor looking (this is the other people looking rule):
if the actor is not the player:
say "[The actor] [look] around." (A).
§47. Examining.
One of Inform’s most commonly-used actions, I am sure. Dispenses clues and gives worlds their savor.
Examining is an action applying to one visible thing and requiring light.
The examining action translates into Inter as "Examine".
The specification of the examining action is "The act of looking closely at
something. Note that the noun could be either a direction or a thing, which
is why the Standard Rules include the 'examine directions rule' to deal with
directions: it simply says 'You see nothing unexpected in that direction.'
and stops the action. (If you would like to handle directions differently,
list another rule instead of this one in the carry out examining rules.)
Some things have no description property, or rather, have only a blank text
as one. It's possible that something interesting may be said anyway (see
the rules for directions, containers, supporters and devices), but if not,
we give up with a bland response. This is done by the examine undescribed
things rule."
A small wrinkle deserving its own space. How many would guess that examining involves an action variable?
The examining action has a truth state called examine text printed.
§48. Carry out.
Again, no checking involved. The first is the most common case, and those that follow are supplemental.
Note the check for description of the noun is not ""; The undescribed noun is an author’s bogeyman. It is quite painful to see one mentioned in a review!
Carry out examining (this is the standard examining rule):
if the noun provides the property description and the description of the noun is not "":
say "[description of the noun][line break]";
now examine text printed is true.
A custom response for examining direction objects. Some authors will add something more elaborate in its place, but looking into other rooms is hard to carry off.
Carry out examining (this is the examine directions rule):
if the noun is a direction:
say "[We] [see] nothing unexpected in that direction." (A);
now examine text printed is true.
The next, container-specific rule will print its output whether or not the noun has a text description: a list of relevant things within nouns that are containers. This will also flag examine text printed as true (but only if the container is open or transparent).
Carry out examining (this is the examine containers rule):
if the noun is a container:
if the noun is open or the noun is transparent:
if something described which is not scenery is in the noun and something which
is not the player is in the noun:
say "In [the noun] " (A);
list the contents of the noun, as a sentence, tersely, not listing
concealed items, prefacing with is/are;
say ".";
now examine text printed is true;
otherwise if examine text printed is false:
if the player is in the noun:
make no decision;
say "[The noun] [are] empty." (B);
now examine text printed is true;
A similar rule for supporters. Note that Inform does not declare supporters “empty,” so unless something is on a supporter noun, examine text printed will not be set to true.
Carry out examining (this is the examine supporters rule):
if the noun is a supporter:
if something described which is not scenery is on the noun and something which is
not the player is on the noun:
say "On [the noun] " (A);
list the contents of the noun, as a sentence, tersely, not listing
concealed items, prefacing with is/are, including contents,
giving brief inventory information;
say ".";
now examine text printed is true.
A check to determine if examined things providing the property switched on are on or off. If the rule is applicable, examine text printed is set to true.
Carry out examining (this is the examine devices rule):
if the noun provides the property switched on:
say "[The noun] [are] [if story tense is present tense]currently [end if]switched
[if the noun is switched on]on[otherwise]off[end if]." (A);
now examine text printed is true.
A final check. If we have reached the end of the check examining rulebook having produced zero output regarding the noun, Inform returns one of the most dreaded sentences in the Standard Rules:
Carry out examining (this is the examine undescribed things rule):
if examine text printed is false:
say "[We] [see] nothing special about [the noun]." (A).
§49. Report.
Only NPC’s generate report examining output.
Report an actor examining (this is the report other people examining rule):
if the actor is not the player:
say "[The actor] [look] closely at [the noun]." (A).
I think that’s it for today. Because looking is pretty I6-heavy, I may not have fully understood what is happening there. I am still confused about the room description paragraphs about objects rule marking visibility holders for listing. Have I missed a list somewhere? Quite possibly!
As always, comments, corrections, etc are welcome.
This supports a minor detail of Inform’s display style:
>east
Pantry
This is the Pantry.
>look
Pantry
This is the Pantry.
A movement command is followed by an extra line break after the prompt. This is handled by an I6 routine, although in principle it doesn’t have to be.
(The I6 library has a slightly different convention: it prints an extra line break before any full room description, whether this is caused by LOOK or GO. I don’t know why Graham decided to change that.)
“Abbreviated form allowed” is set manually at the I6 level, inside the “produce a room description with going spacing conventions” routine. As part of the process of feigning the action, it constructs a “verb frame” that holds the action variables, and manually sets the room-describing action to whatever action is happening at the moment, and abbreviated form allowed to true.
In other words, it’s how you can tell if it’s an actual “looking” action or just producing a room description. This matters because brief mode suppresses room descriptions when going, but not when looking.
As zarf said, the “…with going spacing conventions” refers to a special type of paragraph break inserted before the room header, the “going paragraph break”. This special paragraph break, uniquely, is not suppressed if it comes right after the player’s typed input. No, I don’t know why this is an important convention to preserve either; according to the comments, Inform does it because Infocom did it, and no other reason.
Oh no, if they were proper-named, this check wouldn’t be necessary! This is for when rooms aren’t proper-named, so that the game can print “you go north to the Library” or whatnot. When that happens, the header should still print “Library” instead of “The Library”; but for a container, it should print “The Cage”.
Hmm. I don’t see the reason either.
Note that this does not care about the “device” kind. The Standard Rules in general don’t actually care about “devices”; they care about the “switched on” property being provided.
Thanks for clarifying that. I had noticed that the spacing wasn’t always the same, but I hadn’t worked it out.
Got it. That makes sense!
Doh! I’ll add this to the post.
Judging from the position of the scrollbar, we are just under halfway through the text of the Actions section of the Standard Rules. My wrist pain is acting up, so this will probably be a short post. Just something to keep the thread rolling. Additionally, since unlocking it with and locking it with are nearly identical, I only discuss the latter.
Standard Rules: Actions 6
§50. Looking under.
looking under things is a nostalgic action that reminds me of 1980s text adventures. There’s a non-universal craft consensus that it and searching (see below) are redundant to examining. my perception is that some contemporary players with not attempt these actions or will resent having to attempt them. In Marbles, D, and the Sinister Spotlight, the title character can look under the auditorium chairs, but winning doesn’t require doing so. Cats are more or less looking under things all the time, aren’t they? It often goes without saying.
Looking under is an action applying to one visible thing and requiring light.
The looking under action translates into Inter as "LookUnder".
The specification of the looking under action is "The standard Inform world
model does not have a concept of things being under other things, so this
action is only minimally provided by the Standard Rules, but it exists here
for traditional reasons (and because, after all, LOOK UNDER TABLE is the
sort of command which ought to be recognised even if it does nothing useful).
The action ordinarily either tells the player he finds nothing of interest,
or reports that somebody else has looked under something.
The usual way to make this action do something useful is to write a rule
like 'Instead of looking under the cabinet for the first time: now the
player has the silver key; say ...' and so on."
§51. Carry out.
No checks here, and hardly any carry out.
A lone rejection message that authors may wish to rewrite in their own voice.
Carry out an actor looking under (this is the standard looking under rule):
if the player is the actor:
say "[We] [find] nothing of interest." (A);
stop the action.
§52. Report.
No state change here; just an observation.
Report an actor looking under (this is the report other people looking under rule):
if the action is not silent:
if the actor is not the player:
say "[The actor] [look] under [the noun]." (A).
§53. Searching.
Moving on! As I’ve already suggested, looking under and searching have similar legacy associations. Unlike looking under, though, searching has no defined carry out phase, and is meant to apply only to containers and supporters.
Searching is an action applying to one thing and requiring light.
The searching action translates into Inter as "Search".
The specification of the searching action is "Searching looks at the contents
of an open or transparent container, or at the items on top of a supporter.
These are often mentioned in room descriptions already, and then the action
is unnecessary, but that wouldn't be true for something like a kitchen
cupboard which is scenery - mentioned in passing in a room description, but
not made a fuss of. Searching such a cupboard would then, by listing its
contents, give the player more information than the ordinary room description
shows.
The usual check rules restrict searching to containers and supporters: so
the Standard Rules do not allow the searching of people, for instance. But
it is easy to add instead rules ('Instead of searching Dr Watson: ...') or
even a new carry out rule ('Check searching someone (called the suspect): ...')
to extend the way searching normally works."
§54. Check.
It makes sense that only things capable of holding other things can be searched, though, if we had a game involving the searching of people (as suggested above), we’d have to dismantle prohibitive rules.
Check an actor searching (this is the can't search unless container or supporter rule):
if the noun is not a container and the noun is not a supporter:
if the player is the actor:
say "[We] [find] nothing of interest." (A);
stop the action.
The Standard Rules will block the searching of closed opaque containers rather than attempt opening the noun.
Check an actor searching (this is the can't search closed opaque containers rule):
if the noun is a closed opaque container:
if the player is the actor:
say "[We] [can't see] inside, since [the noun] [are] closed." (A);
stop the action.
§55. Report.
Searching a container will, by default, print its contents. Since this is happening at the report phase, an author could easily “get in front” of it via an after or another, earlier report.
A search will not uncover concealed items.
Report searching a container (this is the standard search containers rule):
if the noun contains a described thing which is not scenery:
say "In [the noun] " (A);
list the contents of the noun, as a sentence, tersely, not listing
concealed items, prefacing with is/are;
say ".";
otherwise:
say "[The noun] [are] empty." (B).
Near-identical code pertaining to supporters:
Report searching a supporter (this is the standard search supporters rule):
if the noun supports a described thing which is not scenery:
say "On [the noun] " (A);
list the contents of the noun, as a sentence, tersely, not listing
concealed items, prefacing with is/are;
say ".";
otherwise:
now the prior named object is nothing;
say "[There] [are] nothing on [the noun]." (B).
We may never know what wonders the NPC has discovered!
Report an actor searching (this is the report other people searching rule):
if the actor is not the player:
say "[The actor] [search] [the noun]." (A).
§56. Consulting it about.
Was the earliest appearance of this action in Infocom’s Sorcerer? I’m recalling the Encyclopedia Frobozzica, a reference found in the Circle of Enchanters’s Guildhall.
The report rule is not terribly prohibitive, which is a good thing in my opinion. I like to carry actions through the entire turn when possible.
Consulting it about is an action applying to one thing and one topic.
The consulting it about action translates into Inter as "Consult".
The specification of the consulting it about action is "Consulting is a very
flexible and potentially powerful action, but only because it leaves almost
all of the work to the author to deal with directly. The idea is for it to
respond to commands such as LOOK UP HENRY FITZROY IN HISTORY BOOK, where
the topic would be the snippet of command HENRY FITZROY and the thing would
be the book.
The Standard Rules simply parry such requests by saying that the player finds
nothing of interest. All interesting responses must be provided by the author,
using rules like 'Instead of consulting the history book about...'"
§57. Report.
This is all there is to it.
Report an actor consulting something about (this is the block consulting rule):
if the actor is the player:
say "[We] [discover] nothing of interest in [the noun]." (A);
otherwise:
say "[The actor] [look] at [the noun]." (B);
§58. Locking it with.
The locking it with action’s specification is almost as detailed as its code, so perhaps we should take our time with it.
Section 5 - Standard actions which change the state of things
Locking it with is an action applying to one thing and one carried thing.
The locking it with action translates into Inter as "Lock".
Locking is a familiar idea, and adventure games are often filled with locked containers and doors. As Inform understands it, the lockability pattern describes a thing that provides the properties lockable, locked, openable, and open. We authors can attempt to declare anything—a chest, a goldfish, a block of wood—lockable, but the basic framework for locking it with will assume all ingredients are in place, and that the right properties are provided.
The specification of the locking it with action is "Locking is the act of
using an object such as a key to ensure that something such as a door or
container cannot be opened unless first unlocked. (Only closed things can be
locked.)
Locking can be performed on any kind of thing which provides the either/or
properties lockable, locked, openable and open. The 'can't lock without a lock
rule' tests to see if the noun both provides the lockable property, and if
it is in fact lockable: it is then assumed that the other properties can
safely be checked. In the Standard Rules, the container and door kinds both
satisfy these requirements.
The creation of new kinds that provide these properties by default is suggested. If an author has several lockable containers in mind, there is no reason not to, though a new kind of container makes the most sense, probably.
We can create a new kind on which opening, closing, locking and unlocking
will work thus: 'A briefcase is a kind of thing. A briefcase can be openable.
A briefcase can be open. A briefcase can be lockable. A briefcase can be
locked. A briefcase is usually openable, lockable, open and unlocked.'
A matching keyproperty allows for general purpose checking as opposed to specific rules like carry out unlocking the brass lock with the brass key.
Even if authors do not wish to implement locking and unlocking at a deeper level, Emily Short’s “Locksmith” is recommended for its key-specific holdall, the keychain.
Inform checks whether the key fits using the 'can't unlock without the correct
key rule'. To satisfy this, the actor must be directly holding the second
noun, and it must be the current value of the 'matching key' property for
the noun. (This property is seldom referred to directly because it is
automatically set by assertions like 'The silver key unlocks the wicket
gate.')
The Standard Rules provide locking and unlocking actions at a fairly basic
level: they can be much enhanced using the extension Locksmith by Emily
Short, which is included with all distributions of Inform."
§63. Check.
A basic check: unless the noun provides the property lockable and is in fact lockable, the action will fail.
Check an actor locking something with (this is the can't lock without a lock rule):
if the noun provides the property lockable and the noun is lockable:
continue the action;
if the actor is the player:
say "[regarding the noun][Those] [don't] seem to be something [we] [can] lock." (A);
stop the action.
That which is locked cannot be locked.
Check an actor locking something with (this is the can't lock what's already
locked rule):
if the noun is locked:
if the actor is the player:
say "[regarding the noun][They're] locked at the f story tense is present
tense]moment[otherwise]time[end if]." (A);
stop the action.
Inform will not attempt a courtesy close: open things cannot be locked.
Check an actor locking something with (this is the can't lock what's open rule):
if the noun is open:
if the actor is the player:
say "First [we] [would have] to close [the noun]." (A);
stop the action.
The final check verifies a few things. The noun must provide the property matching key, the actor must hold the second noun, and the second noun must be the matching key of the noun. Otherwise, the action fails.
Check an actor locking something with (this is the can't lock without the correct key rule):
if the holder of the second noun is not the actor or
the noun does not provide the property matching key or
the matching key of the noun is not the second noun:
if the actor is the player:
say "[regarding the second noun][Those] [don't] seem to fit the lock." (A);
stop the action.
§60. Carry out.
If all checks succeed, the locked property is applied to the noun.
Carry out an actor locking something with (this is the standard locking rule):
now the noun is locked.
§61. Report
A single rule for both player’s and NPCs.
Report an actor locking something with (this is the standard report locking rule):
if the actor is the player:
if the action is not silent:
say "[We] [lock] [the noun]." (A);
otherwise:
if the actor is visible:
say "[The actor] [lock] [the noun]." (B);
§62. Unlocking it with.
The code—including the specification—for unlocking it with is practically identical to that for locking it with, so I have pasted it, without comments, under a collapsible “details” heading.
Details for unlocking it with action
Unlocking it with is an action applying to one thing and one carried thing.
The unlocking it with action translates into Inter as "Unlock".
The specification of the unlocking it with action is "Unlocking undoes the
effect of locking, and renders the noun openable again provided that the
actor is carrying the right key (which must be the second noun).
Unlocking can be performed on any kind of thing which provides the either/or
properties lockable, locked, openable and open. The 'can't unlock without a lock
rule' tests to see if the noun both provides the lockable property, and if
it is in fact lockable: it is then assumed that the other properties can
safely be checked. In the Standard Rules, the container and door kinds both
satisfy these requirements.
We can create a new kind on which opening, closing, locking and unlocking
will work thus: 'A briefcase is a kind of thing. A briefcase can be openable.
A briefcase can be open. A briefcase can be lockable. A briefcase can be
locked. A briefcase is usually openable, lockable, open and unlocked.'
Inform checks whether the key fits using the 'can't unlock without the correct
key rule'. To satisfy this, the actor must be directly holding the second
noun, and it must be the current value of the 'matching key' property for
the noun. (This property is seldom referred to directly because it is
automatically set by assertions like 'The silver key unlocks the wicket
gate.')
The Standard Rules provide locking and unlocking actions at a fairly basic
level: they can be much enhanced using the extension Locksmith by Emily
Short, which is included with all distributions of Inform."
§63. Check.
Check an actor unlocking something with (this is the can't unlock without a lock rule):
if the noun provides the property lockable and the noun is lockable:
continue the action;
if the actor is the player:
say "[regarding the noun][Those] [don't] seem to be something [we] [can] unlock." (A);
stop the action.
Check an actor unlocking something with (this is the can't unlock what's already unlocked rule):
if the noun is not locked:
if the actor is the player:
say "[regarding the noun][They're] unlocked at the f story tense is present
tense]moment[otherwise]time[end if]." (A);
stop the action.
Check an actor unlocking something with (this is the can't unlock without the correct key rule):
if the holder of the second noun is not the actor or
the noun does not provide the property matching key or
the matching key of the noun is not the second noun:
if the actor is the player:
say "[regarding the second noun][Those] [don't] seem to fit the lock." (A);
stop the action.
§64. Carry out.
Carry out an actor unlocking something with (this is the standard unlocking rule):
now the noun is not locked.
§65. Report.
Report an actor unlocking something with (this is the standard report unlocking rule):
if the actor is the player:
if the action is not silent:
say "[We] [unlock] [the noun]." (A);
otherwise:
if the actor is visible:
say "[The actor] [unlock] [the noun]." (B);
I think that’s good progress for today. Tomorrow: switching on, switching off, opening, and closing.
I wouldn’t mind this action as much if it had any reasonable default behavior. But no! It only exists for special cases, and that means players can’t have any expectation about where it will or won’t work.
Dialog also provides LOOK UNDER, but it’s part of a coherent system: you can PUT X IN/ON/UNDER/BEHIND Y, then you can LOOK IN/ON/UNDER/BEHIND Y, or just SEARCH Y to try every relation at once. So I don’t mind it as much there.
I do find it odd that SEARCH prints its results in a Report rule, while EXAMINE, INVENTORY, LOOK UNDER, etc print their results in Carry Out rules. (The logic being that the entire point of the action is to print that information, rather than the narration being secondary to the action itself.)
I believe you still have to specify the second noun; the “matching key” just determines what works and what doesn’t to unlock the thing. It’s Locksmith that creates rules that work without specifying a second noun.
Right! It makes sense if there’s a “there” there.
I agree! The outcome is the revealed information, report examining would be something like “Thus concludes your examination.”
I completely mangled that sentence! I’ll fix it up.
I wish we could do this in Inform. You can add relations and stuff for under or behind, but it seems that no amount of effort will allow you to tell the engine that they’re part of the world model.
For example, even if you say “The coin is under the rug”, that won’t cause Inform to consider the coin as something that’s in the same room as the rug.
Essentially, I’d like to add new relations that can be taken to situation objects in the world object tree.
Yeah; I like how Dialog does this (every object has its object-tree parent, and a separate property defining its relation to that parent, such as “in”, “on”, “part of”, “held by”, “worn by”, “under”, or “behind”). But the current world model (where “in/on/held by/worn by” and “part of” are implemented in entirely separate and unrelated ways held together with duct tape at the template level, and the former is marked partially on the parent and partially on the child with more duct tape to hold them together) is so deeply ingrained into I7 that it will never be changed.
Today I was continuing to read through this topic on my phone while riding a Sydney metro. My absorption caused me to miss my stop. I’ve been making ‘blink and you’ll miss your stop’ jokes about the metro for a year or two, but it hadn’t happened to me until now.
-Wade
Still at it! We have thee pairs of actions today, opening/closing, switching on/switching off, and wearing/taking off.
Standard Rules: Actions 6
§66. Switching on.
As the specification suggests, the property switched on on is associated with the device kind, but another thing could be made to provide it. This is otherwise a minimal implementation that pivots based on a single truth state, handling things like lamps without too much fuss.
Switching on is an action applying to one thing.
The switching on action translates into Inter as "SwitchOn".
The specification of the switching on action is "The switching on and switching
off actions are for the simplest kind of machinery operation: they are for
objects representing machines (or more likely parts of machines), which are
considered to be either off or on at any given time.
The actions are intended to be used where the noun is a device, but in fact
they could work just as well with any kind which can be 'switched on' or
'switched off'."
§67. Check.
A simple evaluation: can the noun be assigned the switched on property?
Check an actor switching on (this is the can't switch on unless switchable rule):
if the noun provides the property switched on, continue the action;
if the actor is the player:
say "[regarding the noun][They] [aren't] something [we] [can] switch." (A);
stop the action.
If so, is it switched on already?
Check an actor switching on (this is the can't switch on what's already on rule):
if the noun is switched on:
if the actor is the player:
say "[regarding the noun][They're] already on." (A);
stop the action.
§68. Carry out.
The relevant truth state is set.
Carry out an actor switching on (this is the standard switching on rule):
now the noun is switched on.
§69. Report.
Authors will almost certainly wish to intervene with their own feedback (or even a prior carry out rule), unless the ramifications of the new switched on state are not apparent. A light switch might require a new lit property somewhere, and a new room description could be in order.
Report an actor switching on (this is the standard report switching on rule):
if the action is not silent:
say "[The actor] [switch] [the noun] on." (A).
§70. Switching off.
The switching off action mirrors the switching on action perfectly. It assigns the switched off property to things that are switched on. Since there are no new features or techniques to explore, I’ll include the code in a collapsible summary.
Switching Off: Details
Switching off is an action applying to one thing.
The switching off action translates into Inter as "SwitchOff".
The specification of the switching off action is "The switching off and switching
on actions are for the simplest kind of machinery operation: they are for
objects representing machines (or more likely parts of machines), which are
considered to be either off or on at any given time.
The actions are intended to be used where the noun is a device, but in fact
they could work just as well with any kind which can be 'switched on' or
'switched off'."
§71. Check.
Check an actor switching off (this is the can't switch off unless switchable rule):
if the noun provides the property switched on, continue the action;
if the actor is the player:
say "[regarding the noun][They] [aren't] something [we] [can] switch." (A);
stop the action.
Check an actor switching off (this is the can't switch off what's already off rule):
if the noun is switched off:
if the actor is the player:
say "[regarding the noun][They're] already off." (A);
stop the action.
§72. Carry out.
Carry out an actor switching off (this is the standard switching off rule):
now the noun is switched off.
§73. Report.
Report an actor switching off (this is the standard report switching off rule):
if the action is not silent:
say "[The actor] [switch] [the noun] off." (A).
§78. Closing.
opening and closing are not quite a mirrored pair. There is more to opening than there is to closing, it turns out, and a better writer might spin that into a compelling metaphor. Here, for better or for worse, we’ll have to focus on the mechanical differences instead.
Because of minor distinctions, it make sense to go out of order. Let’s examine closing first, then consider what more opening does.
It’s interesting to consider the case of the, er, case file, as a thing which doesn’t align with the way the Standard Rules evaluates open and closed properties. If a player reads a book, for instance, authors do not (or I would not, anyway) simulate the opening and closing of the book. This is to say nothing of the situations in which a detective might declare a case “closed!”
On the heels of yesterday’s looking under action, it might be safe to say that Inform would resist such constructions, even if they are syntactically reasonable.
Closing is an action applying to one thing.
The closing action translates into Inter as "Close".
The specification of the closing action is "Closing makes something into
a physical barrier. The action can be performed on any kind of thing which
provides the either/or properties openable and open. The 'can't close unless
openable rule' tests to see if the noun both can be and actually is openable.
(It is assumed that anything which can be openable can also be open, and
hence can also be closed.) In the Standard Rules, the container and door
kinds both satisfy these requirements.
We can create a new kind on which opening and closing will work thus:
'A case file is a kind of thing. A case file can be openable.
A case file can be open. A case file is usually openable and closed.'
The meaning of open and closed is different for different kinds of thing.
When a container is closed, that means people outside cannot reach in,
and vice versa; when a door is closed, people cannot use the 'going' action
to pass through it. If we were to create a new kind such as 'case file',
we would also need to write rules to make the open and closed properties
interesting for this kind."
§79. Check.
Only things that provide the openable property and are, in fact openable can be closed.
Check an actor closing (this is the can't close unless openable rule):
if the noun provides the property openable and the noun is openable:
continue the action;
if the actor is the player:
say "[regarding the noun][They] [aren't] something [we] [can] close." (A);
stop the action.
A closed thing cannot be closed.
Check an actor closing (this is the can't close what's already closed rule):
if the noun is closed:
if the actor is the player:
say "[regarding the noun][They're] already closed." (A);
stop the action.
§80. Carry out.
A simple rule setting the closed property.
Carry out an actor closing (this is the standard closing rule):
now the noun is closed.
§81. Report.
The rule handles non-visible actors. For instance, an NPC in an adjacent room might close a door visible to the player.
Report an actor closing (this is the standard report closing rule):
if the actor is the player:
if the action is not silent:
say "[We] [close] [the noun]." (A);
otherwise if the player can see the actor:
say "[The actor] [close] [the noun]." (B);
otherwise:
say "[The noun] [close]." (C);
§74. Opening.
There’s a fair bit of redundancy here, but the differences are worth discussing.
Here, the lockable property is a consideration. Open things cannot be locked (via the Standard Rules), so this is never a factor for the built-in closing action.
Opening is an action applying to one thing.
The opening action translates into Inter as "Open".
The specification of the opening action is "Opening makes something no longer
a physical barrier. The action can be performed on any kind of thing which
provides the either/or properties openable and open. The 'can't open unless
openable rule' tests to see if the noun both can be and actually is openable.
(It is assumed that anything which can be openable can also be open.)
In the Standard Rules, the container and door kinds both satisfy these
requirements.
In the event that the thing to be opened is also lockable, we are forbidden
to open it when it is locked. Both containers and doors can be lockable,
but the opening and closing actions would also work fine with kinds which
cannot be.
We can create a new kind on which opening and closing will work thus:
'A case file is a kind of thing. A case file can be openable.
A case file can be open. A case file is usually openable and closed.'
The meaning of open and closed is different for different kinds of thing.
When a container is closed, that means people outside cannot reach in,
and vice versa; when a door is closed, people cannot use the 'going' action
to pass through it. If we were to create a new kind such as 'case file',
we would also need to write rules to make the open and closed properties
interesting for this kind."
§75. Check.
The mirror opposite of the can't close unless openable rule above.
Check an actor opening (this is the can't open unless openable rule):
if the noun provides the property openable and the noun is openable:
continue the action;
if the actor is the player:
say "[regarding the noun][They] [aren't] something [we] [can] open." (A);
stop the action.
As promised, the opening action must account for things that are locked.
Check an actor opening (this is the can't open what's locked rule):
if the noun provides the property lockable and the noun is locked:
if the actor is the player:
say "[regarding the noun][They] [seem] to be locked." (A);
stop the action.
Finally, opening’s answer to the can't close what's already closed rule.
Check an actor opening (this is the can't open what's already open rule):
if the noun is open:
if the actor is the player:
say "[regarding the noun][They're] already open." (A);
stop the action.
§76. Carry out.
The open property is applied.
Carry out an actor opening (this is the standard opening rule):
now the noun is open.
§77. Report.
Things get a little more interesting here! If the noun is an opaque container meeting certain conditions, a list of the contents will print. A prototypical case might be the treasures revealed after opening a chest.
Report an actor opening (this is the reveal any newly visible interior rule):
if the actor is the player and
the noun is an opaque container and
the first thing held by the noun is not nothing and
the noun does not enclose the actor:
if the action is not silent:
if the actor is the player:
say "[We] [open] [the noun], revealing " (A);
list the contents of the noun, as a sentence, tersely, not listing
concealed items;
say ".";
stop the action.
Because of the stop the action phrase above, the following rule will only apply if the previous one does not. Support for NPCs opening doors from adjacent rooms is once again accounted for, though the feedback “The ominous door opens,” might suit some tones better than others.
Report an actor opening (this is the standard report opening rule):
if the actor is the player:
if the action is not silent:
say "[We] [open] [the noun]." (A);
otherwise if the player can see the actor:
say "[The actor] [open] [the noun]." (B);
otherwise:
say "[The noun] [open]." (C);
§82. Wearing.
The wearing/taking off rules aren’t complex, though the wearing relation can complicate other actions (dropping, eating, etc). Authors have simulated clothing at more complex levels, ie, parts of body covered, layers, and so forth, but Inform’s model simply relates one person to items of clothing.
Wearing is an action applying to one carried thing.
The wearing action translates into Inter as "Wear".
The specification of the wearing action is "The Standard Rules give Inform
only a simple model of clothing. A thing can be worn only if it has the
either/or property of being 'wearable'. (Typing a sentence like 'Mr Jones
wears the Homburg hat.' automatically implies that the hat is wearable,
which is why we only seldom need to use the word 'wearable' directly.)
There is no checking of how much or how little any actor is wearing, or
how incongruous this may appear: nor any distinction between under or
over-clothes.
To put on an article of clothing, the actor must be directly carrying it,
as enforced by the 'can't wear what's not held rule'."
§83. Check.
All things provide the wearable property, so it isn’t necessary to check for that. Checking whether or not the noun is a thing is interesting. Not because it is likely to cause problems, but because someone taking the trouble so make a non-thing object wearable and in-scope probably knows what they’re getting into.
Check an actor wearing (this is the can't wear what's not clothing rule):
if the noun is not a thing or the noun is not wearable:
if the actor is the player:
say "[We] [can't wear] [regarding the noun][those]!" (A);
stop the action.
The command grammar for wearing appears much later in the Standard Rules, so we do not see here that the action will attempt implicitly taking the noun before this check occurs.
Check an actor wearing (this is the can't wear what's not held rule):
if the holder of the noun is not the actor:
if the actor is the player:
say "[We] [aren't] holding [regarding the noun][those]!" (A);
stop the action.
Finally, worn things cannot be successfully worn.
Check an actor wearing (this is the can't wear what's already worn rule):
if the actor is wearing the noun:
if the actor is the player:
say "[We]['re] already wearing [regarding the noun][those]!" (A);
stop the action.
§84. Carry out.
If all checks pass, the wearing relation is set.
It might not be immediately obvious, but carrying and wearing are mutually exclusive. A worn thing is not carried, and vice versa. Note that both fall under the category of held!
Carry out an actor wearing (this is the standard wearing rule):
now the actor wears the noun.
§85. Report.
The report is straightforward.
Report an actor wearing (this is the standard report wearing rule):
if the actor is the player:
if the action is not silent:
say "[We] [put] on [the noun]." (A);
otherwise:
say "[The actor] [put] on [the noun]." (B)
§86. Taking off.
What of taking off? There is less to check than there was for putting on, because the wearer of a thing is also its holder. The same goes for the wearable property: a worn thing must be wearable!
Still, there is one useful wrinkle to consider, as we’ll see below.
Taking off is an action applying to one thing.
The taking off action translates into Inter as "Disrobe".
Does the player mean taking off something worn: it is very likely.
The specification of the taking off action is "The Standard Rules give Inform
only a simple model of clothing. A thing can be worn only if it has the
either/or property of being 'wearable'. (Typing a sentence like 'Mr Jones
wears the Homburg hat.' automatically implies that the hat is wearable,
which is why we only seldom need to use the word 'wearable' directly.)
There is no checking of how much or how little any actor is wearing, or
how incongruous this may appear: nor any distinction between under or
over-clothes.
When an article of clothing is taken off, it becomes a thing directly
carried by its former wearer, rather than being (say) dropped onto the floor."
§87. Check.
Only something worn can be taken off.
Check an actor taking off (this is the can't take off what's not worn rule):
if the actor is not wearing the noun:
if the actor is the player:
say "[We] [aren't] wearing [the noun]." (A);
stop the action.
If taking off an item of clothing would cause the player to exceed their carrying capacity, the action will fail, and the item will remain worn. This is a possibility I had never considered!
Check an actor taking off (this is the can't exceed carrying capacity when taking off rule):
if the number of things carried by the actor is at least the carrying capacity of the actor:
if the actor is the player:
say "[We]['re] carrying too many things already." (A);
stop the action.
§88. Carry out.
At this point, the wearing relation is unset, as the actor now carries the noun.
Carry out an actor taking off (this is the standard taking off rule):
now the actor carries the noun.
§89. Report.
All ends with a very typical report.
Report an actor taking off (this is the standard report taking off rule):
if the actor is the player:
if the action is not silent:
say "[We] [take] off [the noun]." (A);
otherwise:
say "[The actor] [take] off [the noun]." (B).
That is it for today! We are now beyond the halfway mark, text-wise, for the Actions section of the Standard Rules. Next time, we will be able to cover giving it to and showing it to at minimum. Many upcoming rules are less complex, so I’ll do as many as seems comfortable.
The check wearing rules are much more excitable than the others!
Tiny note: you mean to say “mutually exclusive” here.
To be honest, I kind of don’t like this. I think it should drop on the floor instead. Dropping also had a similar check, and I think that too should attempt to drop up one or more levels (potentially the floor) and only fail if you’re inside a closed container that’s at capacity.
Let’s do some more actions. I have some IRL stuff going on, so post frequency might be irregular for a while.
Standard Rules: Actions 7
§90. Giving it to.
giving it to is another one of those actions that I always forget to test against. Fortunately, playtesters tend to remember. I believe that this is the first time authors are advised to replace or delist a rule (the block giving rule in this case) if an action is of interest.
Section 6 - Standard actions concerning other people
Giving it to is an action applying to one carried thing and one thing.
The giving it to action translates into Inter as "Give".
The specification of the giving it to action is "This action is indexed by
Inform under 'Actions concerning other people', but it could just as easily
have gone under 'Actions concerning the actor's possessions' because -
like dropping, putting it on or inserting it into - this is an action
which gets rid of something being carried.
The Standard Rules implement this action fully - if it reaches the carry
out and report rulebooks, then the item is indeed transferred to the
recipient, and this is properly reported. But giving something to
somebody is not like putting something on a shelf: the recipient has
to agree. The final check rule, the 'block giving rule', assumes that
the recipient does not consent - so the gift fails to happen. The way
to make the giving action use its abilities fully is to replace the
block giving rule with a rule which makes a more sophisticated decision
about who will accept what from whom, and only blocks some attempts,
letting others run on into the carry out and report rules."
§91. Check.
Six evaluations must be passed before giving it to can be carried out.
Note that giving it to involves a carried thing, so an implicit take will be attempted before this check occurs.
Check an actor giving something to (this is the can't give what you haven't got rule):
if the actor is not the holder of the noun:
if the actor is the player:
say "[We] [aren't] holding [the noun]." (A);
stop the action.
Player’s cannot give things to themselves.
Check an actor giving something to (this is the can't give to yourself rule):
if the actor is the second noun:
if the actor is the player:
say "[We] [can't give] [the noun] to [ourselves]." (A);
stop the action.
Only members of the person kind can be given things.
Check an actor giving something to (this is the can't give to a non-person rule):
if the second noun is not a person:
if the actor is the player:
say "[The second noun] [aren't] able to receive things." (A);
stop the action.
The player will attempt a taking off action on any give attempt. If the noun cannot be taken off, the action fails.
Check an actor giving something to (this is the can't give clothes being worn rule):
if the actor is wearing the noun:
say "(first taking [the noun] off)[command clarification break]" (A);
silently try the actor trying taking off the noun;
if the actor is wearing the noun, stop the action;
The aforementioned block giving rule. Without authorial intervention, it is impossible for any giving it to action to succeed. Note that, should the actor be an NPC, no output prints.
Check an actor giving something to (this is the block giving rule):
if the actor is the player:
say "[The second noun] [don't] seem interested." (A);
stop the action.
A last evaluation against carrying capacity. The recipient cannot exceed their capacity.
Check an actor giving something to (this is the can't exceed carrying capacity
when giving rule):
if the number of things carried by the second noun is at least the carrying
capacity of the second noun:
if the actor is the player:
say "[The second noun] [are] carrying too many things already." (A);
stop the action.
§92. Carry out.
Note that the phrase move the noun to the second noun is used instead of now the noun carries the second noun. Is this significant? Possibly not. The move phrase allows for clauses that don’t apply here, like without printing a room description. If there is a difference beyond the surface level (applying relation vs calling I6), please let me know!
eta:
Carry out an actor giving something to (this is the standard giving rule):
move the noun to the second noun.
§93. Report.
Simple boilerplate reporting here, though there is the added consideration of two NPCs interacting with each-other.
Report an actor giving something to (this is the standard report giving rule):
if the actor is the player:
say "[We] [give] [the noun] to [the second noun]." (A);
otherwise if the second noun is the player:
say "[The actor] [give] [the noun] to [us]." (B);
otherwise:
say "[The actor] [give] [the noun] to [the second noun]." (C).
§94. Showing it to.
showing it to is very lightly implemented, which only makes sense. There are few physical impediments involved. It’s worth noting, though, that a person must carry whatever it is they intend to show. A player cannot show scenery to someone, for instance.
Just as is the case with giving it to, showing it to will, out of the box, always fail.
Showing it to is an action applying to one carried thing and one visible thing.
The showing it to action translates into Inter as "Show".
The specification of the showing it to action is "Anyone can show anyone
else something which they are carrying, but not some nearby piece of
scenery, say - so this action is suitable for showing the emerald locket
to Katarina, but not showing the Orange River Rock Room to Mr Douglas.
The Standard Rules implement this action in only a minimal way, checking
that it makes sense but then blocking all such attempts with a message
such as 'Katarina is not interested.' - this is the task of the 'block
showing rule'. As a result, there are no carry out or report rules. To
make it into a systematic and interesting action, we would need to
unlist the block showing rule and then to write carry out and report
rules: but usually for IF purposes we only need to make a handful of
special cases of showing work properly, and for those we can simply
write Instead rules to handle them."
§95. Check.
Only a few checks here.
The first test requires that a player carry the noun (it will attempt an implicit take if the player does not, including taking things from carried containers).
Check an actor showing something to (this is the can't show what you haven't
got rule):
if the actor is not the holder of the noun:
if the actor is the player:
say "[We] [aren't] holding [the noun]." (A);
stop the action.
This evaluation is probably only present to handle mischief-makers, as the typical player isn’t going to want to type all of these extra characters.
Check an actor showing something to (this is the convert show to yourself to
examine rule):
if the actor is the second noun:
convert to the examining action on the noun.
the block showing rule prevents all showing it to actions from succeeding. Note that there is no carry out phase!
Check an actor showing something to (this is the block showing rule):
if the actor is the player:
say "[The second noun] [are] unimpressed." (A);
stop the action.
§96. Waking.
Many of these actions are presumably implemented because they existed in Infocom games. waking, for instance, is one of the ways to end the opening sequence of Steve Meretzky’s Sorcerer.
Waking is an action applying to one thing.
The waking action translates into Inter as "WakeOther".
The specification of the waking action is "This is the act of jostling
a sleeping person to wake him or her up, and it finds its way into the
Standard Rules only for historical reasons. Inform does not by default
provide any model for people being asleep or awake, so this action does
not do anything in the standard implementation: instead, it is always
stopped by the block waking rule."
§97. Check.
There is, as promised, very little here. We do see our first application of the prior named object variable, without which the adaptive text [seem] might turn out oddly.
Check an actor waking (this is the block waking rule):
if the actor is the player:
now the prior named object is nothing;
say "That [seem] unnecessary." (A);
stop the action.
§98. Throwing it at.
Like other recent actions, it’s hard to generalize what such an action might do. So much comes down to what the individual work is up to. It is nevertheless something players are likely to try, so there must be something for player’s to bounce off of. Authors are advised to delist or replace relevant rules if throwing it at is going to play a role in their work.
The Tom Jones joke is funny. I had never seen it before!
Throwing it at is an action applying to one carried thing and one visible thing.
The throwing it at action translates into Inter as "ThrowAt".
The specification of the throwing it at action is "Throwing something at
someone or something is difficult for Inform to model. So many considerations
apply: just because the actor can see the target, does it follow that the
target can accurately hit it? What if the projectile is heavy, like an
anvil, or something not easily aimable, like a feather? What if there
is a barrier in the way, like a cage with bars spaced so that only items
of a certain size get through? And then: what should happen as a result?
Will the projectile break, or do damage, or fall to the floor, or into
a container or onto a supporter? And so on.
Because it seems hopeless to try to model this in any general way,
Inform instead provides the action for the user to attach specific rules to.
The check rules in the Standard Rules simply require that the projectile
is not an item of clothing still worn (this will be relevant for women
attending a Tom Jones concert) but then, in either the 'futile to throw
things at inanimate objects rule' or the 'block throwing at rule', will
refuse to carry out the action with a bland message.
To make throwing do something, then, we must either write Instead rules
for special circumstances, or else unlist these check rules and write
suitable carry out and report rules to pick up the thread."
§99. Check.
There are only check rules in place.
The player will attempt to remove clothing before throwing it, though, since the throw will later fail, they will be left carrying it.
Check an actor throwing something at (this is the implicitly remove thrown clothing rule):
if the actor is wearing the noun:
say "(first taking [the noun] off)[command clarification break]" (A);
silently try the actor trying taking off the noun;
if the actor is wearing the noun, stop the action;
throwing it at fails in all cases, but inanimate second nouns prompt a specific message.
Check an actor throwing something at (this is the futile to throw things at inanimate
objects rule):
if the second noun is not a person:
if the actor is the player:
say "Futile." (A);
stop the action.
If the action makes it this far, the target must be a person.
Check an actor throwing something at (this is the block throwing at rule):
if the actor is the player:
say "[We] [lack] the nerve when it [if story tense is the past
tense]came[otherwise]comes[end if] to the crucial moment." (A);
stop the action.
§100. Attacking.
attacking does nothing in the standard rules. In fact, it does not even accommodate a second noun, as in the familiar, Zorkian attack the troll with the elvish sword. I don’t fully embrace the suggestion that “IF is not Grand Theft Auto,” as only authors and players—not platforms—can make such claims, but it is definitely true that the Standard Rules do not attempt to simulate combat in any way. As is the case with other rules discussed today, it would be very hard to arrive at a general ruleset.
§101. Check.
As promised: a single check that prevents the action entirely.
Check an actor attacking (this is the block attacking rule):
if the actor is the player:
now the prior named object is nothing;
say "Violence [aren't] the answer to this one." (A);
stop the action.
§102. Kissing.
An action that players are bound to try, whether or not they recall that Zork I’s players could try kissing, for instance, the troll.
Note that the command grammar for kissing, not included here, specifies the token someone rather than something, so kissing inanimate objects will produce a parser error rather than an amusing response.
Kissing is an action applying to one thing.
The kissing action translates into Inter as "Kiss".
The specification of the kissing action is "Possibly because Inform was
originally written by an Englishman, attempts at kissing another person are
normally blocked as being unrealistic or not seriously meant. So the
Standard Rules simply block attempts to kiss people, but the action exists
for rules to make exceptions."
§103. Check.
There isn’t a lot going on here. Authors committed to simulating kissing will have to pave their own roads.
Kissing the player gets a specific rule response.
Check an actor kissing (this is the kissing yourself rule):
if the noun is the actor:
if the actor is the player:
say "[We] [don't] get much from that." (A);
stop the action.
Kissing an NPC generates a different rejection message.
Check an actor kissing (this is the block kissing rule):
if the actor is the player:
say "[The noun] [might not] like that." (A);
stop the action.
This might be a good place to stop. There aren’t a lot of rules governing answering it that and the like, but they may have a bit of nuance to think through.
No difference at all under the hood. I thought that using the carrying relation might entail some type checks (since carrying relates people to things), but I see no type checks in the compiled I6 code.
I’d suspect the use of move here is a relic – old code that was never updated, in essence.
This is a general rule for NPC actions that fail. The results are reported by the “unsuccessful attempt” rulebook, not by the check rules. The idea is that if an NPC fails to do something, it’s probably because they refused to take an illogical action, not because they actually tried to take the house and found they weren’t strong enough. Thus, the NPCs should be the ones to report what went wrong.
Of course, the default “unsuccessful attempt” rules are incredibly vague, and making more precise ones is an enormous amount of work. So I don’t love this design choice myself. Inform provides a ton of machinery for NPCs taking actions…and then actually requires the author to do a bunch of non-obvious work to make it happen. Dialog just doesn’t provide that machinery at all.
Note that the safer way to do this is to “say regarding nothing”, which also resets some other ancillary variables along with the prior named object.
It’s come up a few times with earlier actions; “regarding nothing” is good for English phrases like “there is” or “it seems”, which need to inflect for tense (“there was”, “it seemed”) but not for person or number.
I don’t like how specific some of these responses get about the protagonist’s intentions. It’s very easy for an author to override ATTACK but not THROW AT, because there are no ranged weapons in the game—but if the author hasn’t read the Standard Rules, their battle-hardened assassin character won’t have the nerve to throw a frisbee.
It comes down to design philosophy, really. The Standard Rules come from an era where games wanted to respond to every possible action, ideally with dry snark, to show that the system could handle it. Nowadays, I get the sense that many parser players care more about the quality of responses than the quantity; implementing only five verbs, where every response is custom and tailored to the specific game, can get a better response in a comp than a hundred verbs with default implementation.
Specifically, this is the spec:
The specification of the attacking action is “Violence is seldom the answer, and attempts to attack another person are normally blocked as being unrealistic or not seriously meant. (I might find a shop assistant annoying, but IF is not Grand Theft Auto, and responding by killing them is not really one of my options.) So the Standard Rules simply block attempts to fight people, but the action exists for rules to make exceptions.”
Inform started with very specific ideas about what sorts of things it ought and ought not to be used for, but those ideas have gotten gradually less specific over time, with the default messages becoming less opinionated and more impartially neutral. You’ve all heard me snark about its profanity handling before.
This is one of the holdouts. Inform is fairly insistent that its protagonists not solve their problems with violence (as reflected in those general statements about how all IF should be), which leads to the situation I commented on with THROW.
Lest I seem too biased, I will note that this is a place where Dialog had an overly opinionated message (“[The noun] [are] unmoved by your display of affection.”) that had to get changed. The assumption that you actually go through with the action, and the target doesn’t react in any way, is inappropriate for quite a lot of NPCs!
(As we all know, though, Dialog was mainly intended for games about old women’s dogs, who are allowed to kiss whomever they want with impunity.)