Problem: An item with the same name as a verb

Hey All:
So I have words that can be taken. Each word has a loop on it so it can be put on a string. When the player wants to put a word on a string, if they use the command “put string in loop,” the game tries to help them disambiguate between the different words they carry. But one of my words is “burn,” which is also a verb that Inform knows, and this causes some awkwardness:

put string in loop

Which do you mean, the word “fragile”, the word “hope” or the word “burn”?

burn

What do you want to burn?

It’s not terrible if I can’t do something about this… after all, the player should be more specific when they carry multiple words with loops on them. But I wonder if there’s a “does the player mean”-type rule that I can use to quash this? I’d have a very hard time finding another word that would work for my purposes as well as “burn,” so I really, really don’t want to change it.

1 Like

Sorry to ask the obvious, but do you need the verb burn in your game? If not, you can eliminate it:

Understand the command "burn" as something new.

-Wade

2 Likes

No, I don’t need the command. There is a place where the player might try burning something, but it’s not a command they need. I’m not clear on how redefining it would work to get rid of it, though. I’ve only ever redefined a verb as another verb.

With the code I gave, when you type burn, Inform will no longer recognise it. That means it shouldn’t show up for disambiguation with your string of words. EDIT: You can eliminate any verb(s) this way. In cases where the verb has synonyms, you need to make sure you round up and eliminate the synonyms, too, but burn does not.

-Wade

1 Like

Neat trick! I didn’t realize it was that easy to turn off verbs. Thanks!

Considering another solution to the original challenge, you could add in Aaron Reed’s ‘Numbered Disambiguation Choices’ extension. With this in place, when disambiguation happens, the choices are numbered and the player can reply by typing a number:

e.g. Which do you mean, 1) the word “fragile”, 2) the word “hope” or 3) the word “burn”?

Now the player could type 3 to choose burn. The thing is, they’re still allowed to type ‘burn’ to try to answer the disambiguation question, at which point we reconfront the original problem.

What warped human would want to do that when they can just type ‘3’?.. Well, the answer to this question is usually ‘many’. So it’s still better to kill a loophole than to just try to shuffle it under the rug. Nevertheless, thought you might be interested in this extension. I use it in every game.

It does have a subtle, known bug where sometimes the player types 1 and 2 is chosen. But if it happens, you can craft circumstances to prevent it happening. The it happens are as follows (gonna paste from explanation in my WIP, apologies for the CAPS). Try not to let this paragraph put you totally off, like I expect it might :wink:

“KNOWN BUG!!! - NUMBERED DISAMBIGUATION CHOICES MAY OFFER SOME CHOICES, THEN VETO ONE OF THEM (E.G. PLAYER TYPES 1, GAME GOES WITH 2) IF FOLLOWING THE PLAYER’S PICK WOULD DO SOMETHING A Does The Player Mean (DTPM) RULE HAS DEEMED ‘VERY UNLIKELY’. THIS IS NOT OVERCOME BY A GENERAL BUG FIX (ALREADY IN THE EXTENSION) DEALING WITH 1 LEADING TO 2 SOMETIMES, THE RULE THAT STARTS 'Does the player mean doing something when the player’s command includes “[number]” - THAT’S ANOTHER ISSUE. HOWEVER, THE PROBLEM ISSUE CAN BE OVERCOME IN INDIVIDUAL CASES BY GIVING ONE OF THE DESIRED ALTERNATIVES A POSITIVE DTPM VALUE FOR THE PARTICULAR ACTION, OR ALL ACTIONS.”

-Wade

1 Like

To that end, it is possible to hack the parser on the I6 level so that certain words won’t be recognized as verbs for the purpose of disambiguation. You can take a look at Heliopause: Source Code (eblong.com):

This giant NounDomain inclusion is really just to add a single function call to a single line in the library routine:

if ((0 ~= j&1) && ~~LanguageVerbMayBeName(first_word)) ...

What’s going on? If the player types “raise”, the game will respond “What do you want to raise?” and we want “sail” to be a valid response. But normally a verb response aborts the disambiguation prompt and gets parsed on its own. “Sail” is a verb in this game. So we need a special test.

1 Like

Isn’t LIGHT a synonym for burn?

Yes. But you don’t need to round up synonyms for this purpose, where you’re just having a conflict involving one word, only if you really want to eliminate all player access to it.

I’ll point out Verb Stripping by Nathanael Nerode which removes about a third of I7’s 77 Verbs, with the premise that it’s easier to put a few of those back in than to think about dozens you might want to remove.

1 Like

Oh darn it, it is. I just out and out did not read the line in the Standard Rules directly below the line I did read.

-Wade

Possibly relevant: Parser Parer: Generate Inform 7 code to limit the player’s actions. (alice-blue.github.io)

Sadly there’s no magnetic compiler…

the issue is akin to the celebrated

POT THE POT PLANT IN THE PLANT POT

or I’m wrong ?

Best regards from Italy,
dott. Piergiorgio.

Related, but nobody has ever said whether the Magnetic parser handles this cleanly.

Imagine this sequence:

> POT THE PLANT IN THE PLANT POT
Which do you mean, the pot plant, the spider plant, or the air plant?
> POT

Now, should the parser come back with “(the pot plant)” and resolve the action, or should it ask “What do you want to pot?” This is a fuzzy area; it’s best to allow the game author to decide on a verb-by-verb basis. I6 allows this. I7 requires some I6 hackery.

1 Like

There’s a book, Eats, Shoots & Leaves about how critical punctuation is.

Another example is the challenge to punctuate the following into a logical sentence:

Where John had had had Mary had had had had had had had had the Teacher’s approval.

(I know punctuation really doesn’t help in Inform and parsing and I’m derailing again, but the subject is fascinating!)

2 Likes

I already take for granted that after Lord Nelson delivers Inform 8 (whose will be OS) here we start the development of Inform 9…