Disambiguation problem [I7] [SOLVED!]

Help. I’m sure this has been answered before, but I can’t seem to be able to use neither the RB or this site’s search engine.

I have this:

[code]A Gem is a kind of thing. The printed name of a Gem is “*Gem”.

G1 is a Gem in Here. G2 is a Gem in There.[/code]
What happens is that if I try to drop one *Gem when holding two, disambiguation asks “Which one? *Gem or *Gem?” (ofc).
Same applies to when I take one when there’s 2.

I succeeded in solving part of the problem by adding:

[code]Does the player mean taking a random Gem not held by the player when taking a gem: it is very likely.

Does the player mean dropping a random Gem held by the player when dropping a Gem: it is very likely[/code]

  1. the disambiguation pops up when trying to take a Gem that I already hold (and same applies to dropping Gems I don’t hold)
  2. one could actually perform every action in the game with the Gems, resulting in me coding 130.000 lines of disambiguation help.

I’m sure there is a simpler way. I’ve seen the Inform port for the classic Questprobes where you could get and drop *Gems on the fly.

Thanks for the help!

Ps: I’m trying to acquire the same exact result that in QP. So, no: I can’t name the Gems one by one. I just want the parser to decide for me and just drop gems I hold and take those I don’t. And examine, eat, push, pull, digest and send them to stratosphere.

I love you all. Sincerely,

To add:

this thing, that I was sure didn’t work at all: Does the player mean doing something to a random visible Cylinder when doing something to a Cylinder: it is very likely.
works. But only SOMETIMES. Sometimes it doesn’t. Which goes against anything I was ever sure about computers.

I think it’s because you’re giving the gems distinct names in the code. Try this:

[code]A gem is a kind of thing. The printed name of a gem is “*Gem”. Rule for printing the plural name of a gem: say “*Gems”.

Test Room is a room. Best Room is north of Test Room.

Test Room contains a gem. Best Room contains a gem.

Test me with “get gem / n / drop gem / l / get gem / get gem / i”[/code]

Note, if you want plural gems to be printed with the asterisk, you have to write a rule for it (see code), otherwise Inform automatically constructs a plural based on the kind name (which has no asterisk).

Also, you have to say “[Room] contains a gem.” If you say “A gem is in [room],” Inform will kick back an error message, because it has no way of knowing whether you mean a new gem or an already existing gem.

Thanks a lot! Trying it now.

Btw: If I was a teenager, I’d be around the house screaming and tearing off my hair, now. I mean. Are you Mike Gentry? The one n only?

I’m not the only Mike Gentry, but as far as I know I am the only Mike Gentry who writes interactive fiction.

The one I admire. I finished your game* on an iPhone3. If this is not dedication…

ETA: Well, I mean Anchorhead, ofc. The phrasing sounded a bit harsh.

---- to add, now I have a new problem:

How can I:

  • make a *gem part of something, as in “a gem is part of XXX”
  • make a *gem appear somewhere, as in “now a gem is in Room1”


Thanks again. I’m not sure about syntax, here.

The toaster incorporates a gem.

The gem repository is a container. There are 20 gems in the gem repository. Definition: a gem is unowned if it is in the gem repository. ... now a random unowned gem is in the Sanctum.