intfiction.org

The Interactive Fiction Community Forum
It is currently Fri Feb 22, 2019 12:11 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Dec 20, 2013 11:43 pm 
Offline
User avatar

Joined: Wed Nov 20, 2013 11:28 am
Posts: 237
Start up your favourite piece of Inform 7 IF, pick up a few items, then find a supporter like a table to put it on, and then type "drop x on down" to put item x... ...where? On down? Yes, why not?
You'll get a question like "What do you want to drop " followed by some gibberish - for example "What do you want to drop the apple the keyring?" or "What do you want to drop the stone those things?".
Try to answer that question however you like, and you'll get an outcome similar to "I only understood you as far as wanting to drop the apple on down.".

I won't act like I haven't already patched this bug, and have a theory as to why the bug existed in the first place, but I feel that I need to run this by you, because maybe I'm blameing the wrong reasons for Inform 7 acting like this. Are there more bugs like this that I need to be aware of? Try to contribute to solving this "christmas mystery", and I'll post my code for the patch in a few posts. =)

_________________
Buried under a huge pile of I7 printouts you can see Andreas.
>talk to andreas
He feverishly mumbles something about upholding the integrity of the cosmos, and doesn't seem to even notice you.
>leave basement


Last edited by Andreas on Sun Feb 09, 2014 11:56 pm, edited 1 time in total.

Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Dec 20, 2013 11:47 pm 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5921
I can't reproduce this.

Code:
The Kitchen is a room.
The player carries a rock.
The table is a supporter in the Kitchen.


Result:

Quote:
>drop rock on down
You must name something more substantial.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Dec 20, 2013 11:51 pm 
Offline
User avatar

Joined: Wed Nov 20, 2013 11:28 am
Posts: 237
Yes, it works perfectly fine until you pick up *another* item. You need more than one item to choose from (and I don't know why).

_________________
Buried under a huge pile of I7 printouts you can see Andreas.
>talk to andreas
He feverishly mumbles something about upholding the integrity of the cosmos, and doesn't seem to even notice you.
>leave basement


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Dec 21, 2013 10:30 am 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2692
Location: The Midwest
I could not reproduce the bug either.

Code:
The kitchen is room. The table is a supporter in the kitchen. The player carries a rock and an apple.


Code:
>put rock on down
You must name something more substantial.

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Dec 21, 2013 10:38 am 
Offline
User avatar

Joined: Wed Nov 20, 2013 11:28 am
Posts: 237
Draconis wrote:
I could not reproduce the bug either.


Strange. I'll get back to you once I've isolated what makes this happen, because right now I have a bunch of extensions messing with the grammar.

_________________
Buried under a huge pile of I7 printouts you can see Andreas.
>talk to andreas
He feverishly mumbles something about upholding the integrity of the cosmos, and doesn't seem to even notice you.
>leave basement


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Dec 21, 2013 11:21 am 
Draconis, actually you can replicate it indeed with the code you posted. But the syntax that makes it appear is not "put", but "drop".

Same source code as you posted.

"kitchen
You can see a table here.

>drop rock on down
What do you want to drop the rock on those things?"

EDIT - Hello hello hello, the bug only appears once, on the first move.

Quote:
kitchen
You can see a table here.

>drop rock on up
You must name something more substantial.

>drop rock on east
You must name something more substantial.

>drop rock on down
What do you want to drop the rock on?

>undp
I only understood you as far as wanting to drop the rock on down.

>undo
kitchen
[Previous turn undone.]

>undo
kitchen
[Previous turn undone.]

>undo
kitchen
[Previous turn undone.]

>undo
kitchen
[Previous turn undone.]

>undo
[You can't "undo" what hasn't been done!]

>drop rock on down
What do you want to drop the rock on those things?


EDIT 2 - Well, actually no, the actual bug always appears, but we only get gibberish on the first move.


Top
  
Reply with quote  
PostPosted: Sat Dec 21, 2013 12:15 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2692
Location: The Midwest
Replicated successfully with Peter's syntax. This is very odd.

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Dec 21, 2013 4:16 pm 
Offline
User avatar

Joined: Wed Nov 20, 2013 11:28 am
Posts: 237
Draconis wrote:
Replicated successfully with Peter's syntax. This is very odd.


Yes, the more I look at it, the more I feel that my patch is just covering up the symptoms of a bug deeper in the core, but I discovered this bug when I saw the rules specifically mentioning "down" in the rules for "putting it on" and "inserting it into". ...but if it would just involve those two simple rules, "drop stone down down", or even "put stone on down", would reasonably result in errors, but it turns out that it doesn't. ...and why does it only trigger when I have more than one items in my inventory?

Very well, here's my patch:

Code:

Section - drop x on down

[The standard rules list two faulty check rules, that results in bad grammar for the putting it on action in combination with multiple carried objects.
The rules are named "convert put to drop where possible" and "convert insert to drop where possible".
A likely explanation is that they were both written to handle "put [things preferably held] [something]", but since then the grammar got changed to "put [things preferably held] down" being directly interpreted as dropping.
The only apparent effect in-game, is that "drop [other things] on down" results in a question like "What do you want to drop x those things?" (to which there doesn't seem to be a correct reply).
]


The new convert put to drop where possible rule is listed instead of the convert put to drop where possible rule in the check putting it on rulebook.

Check an actor putting something on (this is the new convert put to drop where possible rule):
   If the actor is on the second noun,
      convert to the dropping action on the noun.


The new convert insert to drop where possible rule is listed instead of the convert insert to drop where possible rule in the check inserting it into rulebook.

Check an actor inserting something into (this is the new convert insert to drop where possible rule):
   If the actor is in the second noun,
      convert to the dropping action on the noun.


_________________
Buried under a huge pile of I7 printouts you can see Andreas.
>talk to andreas
He feverishly mumbles something about upholding the integrity of the cosmos, and doesn't seem to even notice you.
>leave basement


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Dec 22, 2013 12:19 pm 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5921
Thanks for posting the working example code. I mean, the not-working example code.

I have not yet had a chance to look into this. However, I can give some history.

The Inform grammar has never included "put [things preferably held] [something]". It *does* include "put [things] down" and "put down [things]", which already handle that case without any action-conversion rule.

Inform used to include "floor" as a synonym for "down", so I'm sure this rule is intended to cover "put rock on floor".

However, "floor" *isn't* a synonym for "down" any more. Also, the "You must name something more substantial" error has been added for commands like "take north". I believe this error happens before check rules, so it should supersede the "put rock on down" case. In other words, the conversion rules really have no reason to handle the "down" case any more.

However again -- this should not lead to confusing parser output. It should reliably say "You must name something more substantial". I'll have to dig into what's going on there.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Dec 23, 2013 5:25 pm 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5921
Did some more testing. I'm afraid your patch doesn't affect the bug at all. Which makes sense -- the bug appears before the "check" action phase.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group