I’m a first-time author working on an Inform 7 game, and one of my beta-testers discovered some strange behavior – when attempting to tie an object to another object after a disambiguation prompt, the parser barfs out a list of all objects in the game. I’m an Inform newbie so I’m used to messing things up, and it’s fairly easy to prevent the issue with various Does the Player Mean instructions. but this seems like very strange behavior and since I haven’t seen it mentioned in previous topics I thought I’d post about it.
Here’s a simplified version of my code that reproduces the behavior (the rope logic is a simplified, and probably bollixed-up, version of the rope example from the Recipe Book):
Attachment relates things to each other in groups. The verb to be stuck to means the attachment relation.
A rope is a kind of thing.
Understand "tie [a rope] to [something]" as tying it to.
Instead of tying something to a rope:
Try tying the second noun to the noun.
Instead of tying a rope to something:
If the player is not carrying the noun, say "It's hard to tie something when you don't have the rope at hand!" instead;
if the second noun is not the grappling hook, say "You fiddle with the rope and the [second noun], and after a good bit of looping and tucking, you give one final pull to bring the knot together -- but instead of tightening, the rope falls slack around the [second noun]. Somehow you must have made a slip-knot?" instead;
if the noun is stuck to the grappling hook, say "It's already as knotted as it's going to get!" instead;
now the noun is stuck to the second noun;
say "After a lot of looping and a bit of pulling, you think you've knotted the [noun] to the [second noun]."
The test area is a room.
The grappling hook is an object in the test area. The frayed rope is a rope in the test area.
The tree is in the test area. The description is "This tree has one particular branch that seems low enough to break off."
The branch is an object. It is undescribed. It is part of the tree.
Before taking the branch:
If the branch is undescribed:
Say "You snap off the branch.";
Move the branch to the player;
Now the branch is described;
Stop the action;
Otherwise:
Continue the action.
Once this compiles, I can get this super fun output:
test area
You can see a grappling hook, a frayed rope and a tree here.
>tie rope to hook
It's hard to tie something when you don't have the rope at hand!
>take rope
Taken.
>tie rope to tree
You fiddle with the rope and the tree, and after a good bit of looping and tucking, you give one final pull to bring the knot together -- but instead of tightening, the rope falls slack around the tree. Somehow you must have made a slip-knot?
>tie rope to hook
After a lot of looping and a bit of pulling, you think you've knotted the frayed rope to the grappling hook.
>take branch
You snap off the branch.
>tie branch
What do you want to tie the branch to?
>tree
compass (581671)
the north
the northeast
the northwest
the south
the southeast
the southwest
the east
the west
the up
the down
the inside
the outside
(darkness object) (581703)
(Inform Parser) (581735)
(Inform Library) (581767)
(property_numberspace_forcer) (581799)
(ValuePropertyHolder_43) (581863)
(ValuePropertyHolder_47) (581895)
test area (582887)
yourself
a branch
a grappling hook
a frayed rope
a tree
>tie rope
What do you want to tie the frayed rope to?
>tree
compass (581671)
the north
the northeast
the northwest
the south
the southeast
the southwest
the east
the west
the up
the down
the inside
the outside
(darkness object) (581703)
(Inform Parser) (581735)
(Inform Library) (581767)
(property_numberspace_forcer) (581799)
(ValuePropertyHolder_43) (581863)
(ValuePropertyHolder_47) (581895)
test area (582887)
yourself
a branch
a grappling hook
a frayed rope
a tree
>tie rope to tree
You fiddle with the rope and the tree, and after a good bit of looping and tucking, you give one final pull to bring the knot together -- but instead of tightening, the rope falls slack around the tree. Somehow you must have made a slip-knot?
Apologies if this is a well-known error, but as I said, I wanted to post it in case it’s of interest to bigger brains than mine.