Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002031Core InformActionspublic2017-09-28 22:212017-09-29 07:20
Reporterotistdog 
Assigned To 
PrioritynormalSeveritymildReproducibilityalways
StatusnewResolutionopen 
Platformx86OSWindowsOS Version7
Product Version6M62 
Target VersionFixed in Version 
Summary0002031: "Report going" message incorrect when NPC enters room while player is on enterable supporter
DescriptionThe normal message for an NPC entering a room enclosing the player looks like:

   Bob arrives from the east.

However, if the player is on an enterable supporter when the NPC enters, the message is:

   Bob goes west.

This is the message that would normally be seen if the player were in the "room gone from" for Bob's going action.

The root cause may be buried a little more deeply. If this is something that should be reported against the Inform 6 library, feel free to close this, and I will resubmit.
Minimal Source Text To Reproduce
"Bug Report"

Place is a room.

Bob is a man in Place.

An enterable supporter called an armchair is in Place. The player is on the armchair.

An enterable container called a bathtub is in Place. [Issue doesn't occur for enterable containers.]


Someplace Else is east of Place.

Every turn:
	if turn count is odd:
		try Bob going east;
	otherwise:
		try Bob going west.

test me with "z / z / z / get up / z / z / z / sit on armchair / z / z / z".
Additional InformationIssue also occurred in 6L38.
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
(0004726)
otistdog (reporter)
2017-09-29 07:20

I poked around at this a bit more; it looks like it may be an issue with the way that some of the conditions in the Standard Rules' "describe room gone into" rule are being interpreted. If the following is added to the example code above:

=======================

Before an actor going:
say "<location = [location], actor = [actor], room gone from = [room gone from], room gone to = [room gone to], vehicle gone by = [vehicle gone by], thing gone with = [thing gone with]>[line break]";

Report an actor going (this is the alt 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:
say "<actor is not player>";
if the noun is a direction:
say "<noun is direction>";
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:
say "<key block: location is room gone from? [if the location is the room gone from]YES[otherwise]no[end if], player is within vehicle gone by? [if the player is within the vehicle gone by]YES[otherwise]no[end if], player is within thing gone with? [if the player is within the thing gone with]YES[otherwise]no[end if]>";
if the room gone from is the room gone to:
continue the action;
otherwise:
say "<room gone from not room gone to>";
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 ".";

The alt describe room gone into rule is listed instead of the describe room gone into rule in the report going rules.

=======================

then you can see that two of the conditions in the "key block" are being interpreted as true that don't seem like they should be interpreted as true:

=======================

>[8] sit on armchair
You get onto the armchair.

<location = Place, actor = Bob, room gone from = Someplace Else, room gone to = Place, vehicle gone by = nothing, thing gone with = nothing>

<actor is not player><noun is direction><key block: location is room gone from? no, player is within vehicle gone by? YES, player is within thing gone with? YES><room gone from not room gone to>Bob goes west.

=======================

Note that "location" is the location of the actor in the above, so it is correctly evaluating as false.

- Issue History
Date Modified Username Field Change
2017-09-28 22:21 otistdog New Issue
2017-09-29 07:20 otistdog Note Added: 0004726


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker