Ah, you hadn’t mentioned that point before, about it happening only from the second question onwards. That’s interesting, because when we try that in the included examples, they show the same behaviour, so it points towards a bug in the extension itself. (I see from the added note that you also tried this now.)
I think what’s happening is that the extension, when the player just presses Enter, always uses the input from the previous question, as indicated by the following tests.
Case A – player enters 1, then blank, extension “secretly chooses” 1 and shows the response (“Harry hands the book to you”) as if the player had typed 1; and then similarly on the next question if the player presses Enter again:
talk to harry
Harry looks up as you approach him.
1) What was that book you told me about?
2) "Run! Fire!"
3) "See you later, Harry."
>> 1
"It's by some guy called Finnegan Wake, and I think it's in Irish or something. Do you want it?"
1) "Sure."
2) "No, thanks."
>>
Harry hands the book to you.
1) "See you later, Harry."
>>
"Later!"
>
Case B – player enters 2, then blank, extension “secretly chooses” 2 and shows the response (“Later!”) as if the player had typed 2:
>talk to harry
Harry looks up as you approach him.
1) What was that book you told me about?
2) "Run! Fire!"
3) "See you later, Harry."
>> 2
"We are only pixels on a two-dimensional screen. There is nowhere to run to." Harry's words shatter the fourth wall.
1) What was that book you told me about?
2) "See you later, Harry."
>>
"Later!"
>
Case C – player enters 1, then enters 2, then blank, and the extension thinks that the input was 2, but since there is no option 2, it tells the player to choose again (and repeatedly pressing Enter repeats that result):
>talk to harry
Harry looks up as you approach him.
1) What was that book you told me about?
2) "Run! Fire!"
3) "See you later, Harry."
>> 1
"It's by some guy called Finnegan Wake, and I think it's in Irish or something. Do you want it?"
1) "Sure."
2) "No, thanks."
>> 2
Harry sighs. "I'm never going to get rid of it."
1) "See you later, Harry."
>>
[Please answer by typing a number between 1 and 1.]
>>
[Please answer by typing a number between 1 and 1.]
>>
I took a quick look at the extension’s code, but the cause did not immediately jump out at me. But I also tested Mark Tilford’s Simple Chat, which the extension you’re using is based on, and it shows the same issue, as far as I see.
It seems as if the previous choice is cached/buffered and not properly cleared/overwritten, and is erroneously taken as the current choice when the player enters an empty input.
Both extensions (Activity-Based Simple Chat and Simple Chat) include a bit of Inform6 code to achieve their goals:
Include (-
[ ReadChoice low high i;
for (::) {
print (I7_string) (+ Chat prompt +);
KeyboardPrimitive (buffer, parse);
i = TryNumber (1);
if (i >= low && i <= high) return i;
else print "[Please answer by typing a number between ", low, " and ", high, ".]^";
}
];
-).
To decide what number is the choice made from (low value - a number) to (high value - a number): (- ReadChoice ( {low value}, {high value} ) -).
(This is from ABSC, but SC is similar.)
Maybe the problem has to do with the way blank input is handled inside the KeyboardPrimitive function; but it might also be something else entirely, I’m only speculating here, sorry.
Hopefully some other people can jump in with their insights.
Otherwise, I’d probably recommend, as I’ve done in several threads, to use the Hybrid Choices extension by AW Freyr (I just checked the included example there, and it doesn’t have that problem).