In the current story I’m creating, there is a living room that other characters come and go from. If the player is just standing inside the living room, it gives a standard report of this happening such as “Charlotte arrives from the south.” However, if the player is doing something like sitting on a chair, that text is replaced with “Charlotte goes north.” Is there any way to make the reporting consistent, no matter where in the room the player is?
Here is a simple example that recreates this behavior:
Living room is a room. Kitchen is a room. Kitchen is south of the living room.
The chair is an enterable supporter in the living room.
The player is in the living room. Charlotte is a woman in the living room.
Every turn:
If Charlotte is in the Living room, try Charlotte going south;
otherwise try Charlotte going north.
Test me with "wait / wait / get on chair / wait".
if the location is the room gone from or the player is within the
vehicle gone by or the player is within the thing gone with:
This is evaluating to true when the player is on the chair. Why I’m not sure, but when the player is on the chair, then they are considered to be “within nothing”.
In other words, the following code:
Every turn:
if the player is within nothing:
say "within nothing.";
will print “within nothing” when the player is on the chair.
I don’t know if that’s proper or improper behavior. Someone smarter than me will have to answer that question.
This is what the I6 logic for the player is within nothing condition test looks like (as generated by 6M62):
! True or false?
! [ DoesNotExist x IN[ IN] : is(x, ContainerOf('player')) ]
[ Prop_3
x ! internal use only
x_ix ! internal use only
qcy_0 ! internal use only
qcn_0 ! internal use only
;
;
qcy_0 = 0;
qcn_0 = 0;
objectloop (x ofclass Object){ ! <-- for every I6 object...
qcn_0++;
if ((x == ContainerOf(player))){ ! <-- ... does it contain the player object?
qcy_0++; ! <-- if so, make qcy_0 a positive integer
}
}
if (qcy_0 == 0){ ! <-- if no matching object was found...
rtrue; ! <-- ... then answers "does no such thing exist?" with "yes"
}
rfalse; ! <-- otherwise, answer no
];
[ ContainerOf A p;
if (A ofclass K1_room) return A.map_region; ! <-- player not a room
p = parent(A); ! <-- evaluates to supporter when on one
if (p == nothing) return nothing;
if (p ofclass K5_container) return p;
if (p ofclass K1_room) return p;
if (p ofclass K9_region) return p;
return nothing; ! <-- returns nothing since no preceding line handles supporters
];
I guess one can consider it to be a subtlety of Informese. After all, the statement “The player is in no thing.” is technically correct when on a supporter.
Seems like the Standard Rule should be rephrased. I think @Zed has been working on fixing this sort of thing for the next release. In the meantime, here’s a replacement that should serve as a workaround:
corrected describe room gone into rule
The describe room gone into rule is not listed in any rulebook.
Report an actor going (this is the corrected describe room gone into rule):
if the player is the actor:
if the action is not silent:
produce a room description with going spacing conventions;
otherwise:
if the noun is a direction:
if the location is the room gone from or
the vehicle gone by is a thing containing the player
or the thing gone with is a thing containing the player:
if the room gone from is the room gone to:
continue the action;
otherwise:
if the noun is up:
say "[The actor] [go] up" (A);
otherwise if the noun is down:
say "[The actor] [go] down" (B);
otherwise:
say "[The actor] [go] [noun]" (C);
otherwise:
let the back way be the opposite of the noun;
if the location is the room gone to:
let the room back the other way be the room back way from the
location;
let the room normally this way be the room noun from the
room gone from;
if the room back the other way is the room gone from or
the room back the other way is the room normally this way:
if the back way is up:
say "[The actor] [arrive] from above" (D);
otherwise if the back way is down:
say "[The actor] [arrive] from below" (E);
otherwise:
say "[The actor] [arrive] from [the back way]" (F);
otherwise:
say "[The actor] [arrive]" (G);
otherwise:
if the back way is up:
say "[The actor] [arrive] at [the room gone to] from above" (H);
otherwise if the back way is down:
say "[The actor] [arrive] at [the room gone to] from below" (I);
otherwise:
say "[The actor] [arrive] at [the room gone to] from [the back way]" (J);
otherwise if the location is the room gone from:
say "[The actor] [go] through [the noun]" (K);
otherwise:
say "[The actor] [arrive] from [the noun]" (L);
if the vehicle gone by is not nothing:
say " ";
if the vehicle gone by is a supporter:
say "on [the vehicle gone by]" (M);
otherwise:
say "in [the vehicle gone by]" (N);
if the thing gone with is not nothing:
if the player is within the thing gone with:
say ", pushing [the thing gone with] in front, and [us] along too" (O);
otherwise if the player is within the vehicle gone by:
say ", pushing [the thing gone with] in front" (P);
otherwise if the location is the room gone from:
say ", pushing [the thing gone with] away" (Q);
otherwise:
say ", pushing [the thing gone with] in" (R);
if the player is within the vehicle gone by and the player is not
within the thing gone with:
say ", taking [us] along" (S);
say ".";
try looking;
continue the action;
say ".";