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”?
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.
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.
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
“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.”
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.
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.
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?
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.