|Anonymous | Login | Signup for a new account||2018-06-22 21:11 PDT|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000555||Core Inform||Understanding||public||2011-02-12 09:58||2014-05-07 07:33|
|Target Version||Fixed in Version||6L02|
|Summary||0000555: Compiler accepting Understand rules but subsequently ignoring them.|
|Description||I was trying to create a basic understanding of the reflexivity of the term "yourself". By default, it is the name of the player object, but I wanted this to be overridden while asking an NPC to try doing something, so that it would refer to the NPC.|
The [DOES NOT WORK AS INTENDED - COMPILES BUT NO EFFECT] block is the approach I originally tried, which seemed straightforward. The compiler accepts these statements but invariably translates "yourself" as the player object regardless.
The [WORKS AS INTENDED - MIRACLE SOLUTION CREATED BY ZARF] is a deep magic statement that zarf came up with when I asked about this on IFMUD. It accomplishes the intended effect, but it's not 100% clear to me how. Works perfectly in a situation with one NPC present, but it has one minor side effect when multiple are present: A disambiguation line with the name of the NPC being spoken to is produced after parsing. This effect is demonstrated in the attached example. I was unable to get rid of this; the attempted "Does the player mean the person asked when asking a person to try doing anything: it is very likely." does not compile.
The [ALSO DOES NOT WORK AS INTENDED - DOES NOT COMPILE BUT WISH IT DID] is the most elegant version of the statement I could come up with. It does not compile, but it naively looks to me like it is very close to workable with some tinkering, given the effectiveness of zarf's version. Making this work would be the optimal solution.
|Minimal Source Text To Reproduce|
"Bug Demonstration" by Otis Featureless Space is a room. Joe and Bob are people in Featureless Space. Persuasion rule for asking a person to try doing anything: rule succeeds. [DOES NOT WORK AS INTENDED - COMPILES BUT NO EFFECT] Understand "yourself" as Joe while asking Joe to try doing anything. Understand "yourself" as Bob while asking Bob to try doing anything. [ALSO DOES NOT WORK AS INTENDED - DOES NOT COMPILE BUT WISH IT DID] [ Understand "yourself" as the person asked while asking someone to try doing anything. ] [WORKS AS INTENDED - MIRACLE SOLUTION CREATED BY ZARF] [ Understand "yourself" as a person when the item described is the person asked. ] test me with "joe, x bob / joe, x joe / joe, x yourself"
|Additional Information||This bug was reclassified as ``accepts invalid'' because the condition ``while asking Joe to try doing anything'' isn't something that can be safely tested during understanding, and, at least in this case, the compiler could detect that.|
|Tags||No tags attached.|
|Effect||(mild) Compiler accepts invalid code|
|The underlying problem is a lack of consistency in I7 which makes such tortured prose necessary, which fights the whole mantra of "code that reads like English". The first is MUCH, MUCH clearer than the functional but magical incantation of the the third (that is, no-one will ever guess that is what they have to write in order to make the code work). Please do something about this and get rid of at least one example of the tortured prose/magical incantation aspect to I7.|
|Poster, editorializing belongs on your blog, not on the bug tracker. Thanks.|
As an added note: With further reading, I did find a way to get rid of that side effect I mentioned...
Rule for clarifying the parser's choice of the person asked while the player's command includes "yourself" (this is the suppress parser choice for use of yourself in a command rule): say "".
I am not sure whether ``no effect'' source text is valid or not. Before going on to give an example much like Zarf's solution, WI 16.17 says ``...nor do we know what the action will be...,'' which would seem to imply that ``while asking Joe to try doing anything'' ought not to be a condition put on an understand line. As evidence that the action understood hasn't yet stabilized,
- - - -
Understand "yourself" as Joe while an actor doing anything and the person asked is Joe.
- - - -
works; Inform has Joe as the actor when the understand condition is checked, and the player only becomes the actor later on.
The ``wish'' solution does not work for this reason and also because ``the person asked'' is an object that varies rather than just an object. You could put in a request at UserVoice for understanding as something that varies.
I'm still learning the details of how things get executed internally, so if my source text is invalid because of the stage of processing, I accept that. zarf also said he wasn't sure that the test made sense but didn't elaborate.
Maybe there could be a problem message indicating that the action in the test is too specific for an understand rule? At least then I would have had some indication that the original version was functionally illegal.
After some discussion this is being marked as accepts invalid. The compiler could probably flag the presence of a ``while <action>'' condition on an understanding line, though this wouldn't catch all cases; the check on the current action could always be buried in an arbitrarily complicated to-decide phrase:
- - - -
There is a room.
Here is a person called Joe.
Persuasion rule for asking a person to try doing anything: rule succeeds.
To decide whether the player is making a request of Joe:
if the current action is asking Joe to try doing anything:
Understand "yourself" as Joe when the player is making a request of Joe.
- - - -
|This is not really a bug, more a feature request, but I've added a problem message to trap Understand sentences where the condition depends on the current action. It won't catch all of the strange indirect ways to do this, but it'll catch a lot of mistakes.|
|2011-02-12 09:58||otistdog||New Issue|
|2011-02-12 13:01||Poster||Note Added: 0001012|
|2011-02-12 18:47||jmcgrew||Severity||serious => mild|
|2011-02-12 18:47||jmcgrew||Status||new => acknowledged|
|2011-02-12 18:50||jmcgrew||Note Added: 0001015|
|2011-02-13 08:40||otistdog||Note Added: 0001018|
|2011-02-13 22:48||EmacsUser||Note Added: 0001024|
|2011-02-14 11:41||otistdog||Note Added: 0001027|
|2011-02-16 15:15||EmacsUser||Effect||(serious/mild) Game compiles but misbehaves => (mild) Compiler accepts invalid code|
|2011-02-16 15:15||EmacsUser||Note Added: 0001033|
|2011-02-16 15:15||EmacsUser||Status||acknowledged => confirmed|
|2011-02-16 15:15||EmacsUser||Additional Information Updated||View Revisions|
|2011-03-21 13:30||EmacsUser||Additional Information Updated||View Revisions|
|2014-02-16 07:20||graham||Note Added: 0002513|
|2014-02-16 07:20||graham||Status||confirmed => resolved|
|2014-02-16 07:20||graham||Resolution||open => fixed|
|2014-02-16 07:20||graham||Assigned To||=> graham|
|2014-05-07 07:32||jmcgrew||Fixed in Version||=> 6L02|
|2014-05-07 07:33||jmcgrew||Status||resolved => closed|
|Copyright © 2000 - 2010 MantisBT Group|