[I7] Questions Extension Rules Not Firing

Hello! I’m newer to i7 and I’ve just started using the Questions extension by Michael Callaghan. It’s real neat, but I’m having some trouble getting it to work the way I want. I’m trying to create a questioning action, where the player can question a person, which in turn gives them some information about the person and then (if the person has not asked the player the question before), the person asks the player a question. Below is the basic code I’m using (without the flavor) and how I’m going about it. The problem I’m having is that once the player enters a response to the question (1 or 2), there is no response, meaning that the rule doesn’t seem to fire. This problem started after I entered the “if current question is “[line break]‘Question’”:” line to clarify which question I’m referring to (as I’d like there to be multiple questions eventually). It’s as if the current question isn’t recognized, and it’s a bit frustrating because the code LOOKS like it should make sense. How should I go about this? Thanks in advance, and I apologize for my inexperience.

Include Questions by Michael Callaghan.

Test is a room. TestPerson is a person in test.

Questioning is an action applying to one visible thing.

personaskedplayerquestion is a truth state that varies. personaskedplayerquestion is false.

Instead of questioning testperson:
	say "[line break]testperson: 'Thanks for questioning me, here's my response.'";
	if personaskedplayerquestion is false:
		now current question is "[line break]'Question'";
		now current question menu is {"Response one.", "Response two."};
		ask a closed question, in menu mode;
		follow the person answer rule;
	stop the action.
A menu question rule (This is the person answer rule):
	if current question is "[line break]'Question'":
		if the number understood is 1:
			say "[line break]testperson: 'Response to answer.'";
			now personaskedplayerquestion is true;
		if the number understood is 2:
			say "[line break]testperson: 'Response to answer.'";
			now personaskedplayerquestion is true;
1 Like

You haven’t defined any way for the questioning action to actually trigger. Usually actions are triggered via understand grammar, but they can also be triggered by other rules; you have done neither of these things.

It’s not entirely clear to me what you’re actually trying to accomplish, but probably a good place to start is to try out the two examples listed inside that extension as-is and then play around with them a bit to get a feel for how things work.

(follow the person answer rule is wrong, btw. Just remove that, it does completely the wrong thing at the wrong time.)

1 Like

It’s possibly worth noting that while Questions can be used for conversation, that’s not really its intended purpose – it’s typically for more procedural things (such as a quiz minigame or a character creation system, as in the given examples).

If you’re looking for something for general conversation with NPCs, it might be better to look at Chris Conley or Eric Eve’s extensions instead.

1 Like

So sorry, I forgot to include my “understand “question [something]” as questioning”. I didn’t realize there was a better option for what I was trying to accomplish for extensions, I will give them a shot, using documentation examples, thanks so much for responding!