Parser truncates verb in response?

>extinguish tree 
What do you want to extinguis the sacred tree at? 

This little exchange is causing me frustration for several reasons. Firstly I’m not sure why the parser isn’t handling the command (it handles “extinguish fire” fine when the tree is on fire, but here it’s getting the nouns reversed), secondly the grammar is goofy (though I at least understand this part - “extinguish” is a synonym for “shoot [something] at [something]”), but mainly I am concerned with the the truncation of the word “extinguish” to “extinguis.” I’m guessing that the parser truncates words at 9 characters. Is there a way to fix this so that the response at least spells the verb correctly?

if you’re coding in Z-code, this is plainly the infamous 9-char limit of Inform vocabulary, this being why in all Z-worlds, superheroes have undistinguishable gender, leading to embarassing situations :wink:

Best regards from Italy,
dott. Piergiorgio.

1 Like

I’m using Inform 7 and compiling to Glulx.

For Glulx, you can raise the limit like this:

Use DICT_WORD_SIZE of 10.

(I wrote 10 to accommodate “extinguish”, but of course you can also use more.)

2 Likes

Amazing, thanks! I will try this out. That’s probably what’s going on.

1 Like

There’s a low-level function called LanguageVerb() which you can use to override this output and (e.g.) print a full-length string. (This works even in Z-code.) However, you have to dink around with I6 code to replace it.

1 Like

Thanks, I’m not sure I’m ready to mess with I6 yet, but that’s good to know for future reference.

Upping DICT_WORD_SIZE is definitely the right choice in the Glulx world, but there’s an approach involving very little I6:

To decide which object is the prospective noun:
    (- parser_results-->INP1_PRES -).

for issuing the response text of the parser clarification internal rule response (E) when the "[parser command so far]" matches the regular expression "^extinguis ": say "What do you want [if the noun is not the player][the noun] [end if]to extinguish [prospective noun] at?[no line break]"
3 Likes