Detecting contractions in player's speech and reacting to it

Understand "why is that", "why", "why not", "how come", "why's that" as "[why]".

Asking the adult male about "[why]" is being investigative.

Answering the adult male that "[why]" is being investigative.

Instead of being investigative:

Why does adult male, why’s that not trigger the above? What is the trick to get it to work. Use a \ in the definition? That did not work. I can find nothing in the help text or forum.

1 Like

This works for me – I suspect the issue is the apostrophe possibly being typed as a different unicode character if it’s curly vs. straight (I think there have been recent threads on this?)

EDIT: this is the thread I was thinking about, hope it’s helpful!

2 Likes

it would be a straight one for sure; I even tried the backtick, Could it be that a [unicode 169] that was set early on in the story.nl for a copyright symbol? Does this change the encoding for the program that something must be set back? or would specifying[unicode 027] in the text be a solution?

I’m pretty sure that only works for printed text. A solution might be to use Emily Short’s Punctuation Removal or a similar process to just remove the character entirely from the input.

1 Like

Hmm, I installed Emily’s extension, included it and placed a remove stray punctuation. in my story.nl file. But it gives an error

Problem. In the sentence 'remove stray punctuation' , I can't find a verb that I know how to deal with.

1 Like

It needs to be included as part of an “After reading a command:” rule

1 Like

ok, compiles successfully:

After reading a command:
	remove apostrophes.

but still does not execute that statement

Understand "why is that", "why", "why not", "how come", "whys that" as "[why]".

Your original command also formatted as an instruction to the man, rather than a question—try “ask the adult male why’s that”.

The comma is understood by inform as separating the actor you want from the action you want them to take—literally, you’re telling him to “why’s that”.

I think Punctuation Removal replaces removed characters with spaces; try “why s not”.

Unintuitively, Inform interprets non-action text after a character named followed by a comma as the answering it that action, so this command structure does actually work (even though I doubt many players use it!)

1 Like

If that were true, then adult male, why is that would not work which it does. ask the adult male about why’s that does not work

Hm, Inform converts apostrophes in text into quote marks, but it’s not supposed to do that within a word, and that logic tends to work pretty well.

Unfortunately I don’t have one; I still don’t have a working Inform 7 install to experiment with, unfortunately. Hopefully someone else will know.

Apologies I got it, I haven’t saved a change in a remote file and I ended up having two After reading commands where one trumped the other.

1 Like