Really long commands

I’m back with more issues with Inform’s automatic “what do you want to [verb]?”. Specifically, if the player tries to use a command that’s more than 9 characters long, that gets cut off, which ends up turning “understand ‘appropriate [something]’ as taking” into “what do you want to appropria?”

I’d ask about overriding the “what do you want to” behavior, but I got some good answers on that in my last thread. That said, is there any way to make it so Inform reads more than the first 9 characters of a given verb? Thanks.

Recipe book 2:2.

When we are compiling for Glulx, the limit is easily changed with a single line, setting the constant called DICT_WORD_SIZE. For instance, if we wanted to raise the limit to 15, we would write


9 is the maximum word size of the z5-8 machine (the Zmachine being proverbially incapable of figuring a superperson’s gender… :wink: ) so I can’t exclude that angryisoscele is coding in z8 format.

Best regards from Italy,
dott. Piergiorgio.

If you’re using the Z-machine, unfortunately that’s an intrinsic limit of the format that can’t be overcome (except by switching to a different VM).

If you only care about the full word for a few specific purposes (like this error message), you can look at the input buffer to see the exact characters the player entered. But for this case in particular, it would probably be cleaner to handle it the same way as X for EXAMINE, etc.

For reference, this is a way to do that. (I later came up with a way to express this via extensible rules, but it requires some extension code I haven’t actually written yet. Let me know if there’s interest.)

Well, technically it’s only an intrinsic limit of the way Inform is using the Z-machine.

To clarify this: the length of dictionary words is defined by the Z-machine spec and cannot be changed.

If Inform bypassed the Z-machine dictionary (by providing an alternate word-match mechanism or defining an entirely new word list) it wouldn’t have this problem. This is true, but not practical. :)

1 Like

Yes, I agree with this. It’s intrinsic to the way Inform is designed, and in the context of this subforum—Authoring in I6 and I7—there is no practical way around it except switching to Glulx.