Conversation Defaults Just Prints Blank Prompt

After installing Conversational Defaults extension by Eric Eve, asking about things now just prints a blank line. I copied his example verbatim from the documentation and ran his Captain Sisko example in a new room, but when I ‘ask sisko about war’, it comes back with

>ask sisko about war

There is no ‘don’t understand’ or ‘there is no reply’, just a blank line. I’ve even created a completely new game and just pasted the code from, and used all the recommended test commands, but I’m still getting a blank line.

I had to comment out the line ‘try saying hello’ in Conversational Framework by Eric Eve as Inform kept tripping up on this line every time I tried to compile. I don’t know if these are related.


If I comment out all of these extensions and then just do a normal:

A framed photo is on the desk. The description is "This ia a picture of the receptionist." 

Understand "photo", "pic", "picture", "image", "framed photo", "framed photograph", "frame", "framed", "snap" as "[framed photo]".

Instead of asking receptionist about "[framed photo]": 
	say "'Why, it's a photo of me', exclaims the receptionist as she flutters her eyelashes. '".

It all works fine. So how come I’m getting these blank prompts?

I’m not sure about that since the example works fine with me. Maybe you can try reinstalling the extension?

OK, I’ve worked out half of what the problem is but it’s not a solution:

When I first walk into reception and try “ask receptionist about photo” I get the blank prompt.

Instead if I say “hello” first Inform knows I am saying hello to the receptionist and it then allows me to ask the question, and I get the correct response.

Is this normal?
Is a blank command prompt a normal way for an IF game to tell the player to continue with their questioning?

This doesn’t seem right.

Perhaps something in the source text gets in the way of Conversation Frameworks’ ‘implicit greetings’. What does your rules for ‘saying hello’ look like?

I do not have any rules about saying hello. This shouldn’t make a difference, should it? I’m just asking the receptionist about an item so why would she not tell me anything until I say ‘hello’ to her first? I’m not sure I understand the logic of this, if this is the default of Inform.

This is not default to Inform, as Inform itself does not have rules for greeting NPCs, everything is brought in by the extensions.

If you have modified the extensions as you say in the first message there’s a high chance that you have removed or altered something in a way that breaks the functionality. The first step would be to re-install the extensions and try again. If it still doesn’t work, we need a full text of what you tried; I just tested both Sisko examples in the Conversational Defaults extension and they both work fine.

The default of Inform is that if you define a new action without telling Inform what to do with the new action, it won’t do anything. I think that’s what you’re seeing here. (This doesn’t come up that much as ubiquitously as you might expect, since a lot of the usual sorts of things like picking things up or going from place to place come with rules predefined, and there are parser errors for input that doesn’t correspond to any undefined action; I’m thinking of when you specifically define a new action without any rules for saying something when the action is performed.

To see this, open a new project – don’t include any extensions – and type this:

Lab is a room. Saying hello is an action applying to nothing. Understand "hello" as saying hello.

If you start the game and type “hello,” you’ll get a blank prompt. That’s because the game is performing the action “saying hello,” but there aren’t any rules telling it what to do or say when it’s saying hello, so it doesn’t do anything.

Now add this:

Report saying hello: say "Hi!".

Now when you type hello into the game, you should get “Hi!” before the command prompt. That’s because the report rule fires after the game performs the saying hello action, and that’s what tells the game to print “Hi!”

So, getting back to your case, the tl;dr: you should figure out (or ask someone) why Conversation Framework isn’t compiling, because that’s where your problem is. Make sure you have the current version, and that there isn’t something in your code that’s making it go goofy; if you do, you should probably let Eric Eve know that it’s not compiling.

OK, you said you commented out “try saying hello” in the Conversation Framework extension. I’ve never used these extensions, but it looks like when your first command in the example is “a sisko” it’s supposed to trigger the following rules in Conversation Framework:

[code]Before conversing when the noun is not the current interlocutor (this is the greet a new interlocutor rule):
implicitly greet the noun;
if the noun is not the current interlocutor, stop the action.

To implicitly greet (character - a thing):
now the greeting type is implicit;
try saying hello to the character.

Carry out saying hello to a person (this is the note current interlocutor when greeted rule):
now the current interlocutor is the noun.

[and there’s this one, which won’t fire but is worth noting]
Report saying hello to someone when the greeting type is explicit (this is the default greeting rule):
say “You say hello to [the noun].”

Asking Sisko about something counts as conversing (I think), so the first “before” rule tells the game to implicitly greet him before asking him anything. Then the “to implicitly greet” rule sets the greeting type to implicit and tells the game to perform the try saying hello action. Performing the try saying hello action fires the carry out saying hello rule, which sets the current interlocutor to the “noun” (which should be the person we’re trying to talk to, Sisko) and then fires the report saying hello rule – but since we set the greeting type to implicit, this report saying hello rule doesn’t actually fire. Now we’ve finished saying hello, which means we’ve finished implicitly greeting, so we go back to the first “before conversing” rule, which says to stop the action if the current interlocutor is not the noun.* We have set the current interloctur to Sisko, so we don’t stop the action and we can continue asking him about whatever.

Now look at what happens if we comment out that “try saying hello.” We’ll get to the “implicitly greet” rule and set the greeting type to implicit. Then we hit the end of that rule (since “try saying hello” is commented out) and go back to the “before conversing” rule. The next thing is “if the noun is not the current interlocutor, stop the action.” We never did set the current interlocutor to Sisko (that would’ve happened in the “carry out saying hello” rule), so we stop the action – never having told the game to say anything. That’s why you get a blank command prompt.

In your other example, if you say “hello” then I’m pretty sure what happens is that it carries out the “saying hello” action without changing the greeting type from explicit. So the current interlocutor gets reset to the receptionist, the report saying hello rule fires and prints something else, and then when you ask her a question on the next turn you don’t have to deal with any of the “before conversing” rules quoted above, since she’s already the current interlocutor.

So the “try saying hello” is very important; if you don’t have that in there, the only way for the player to change the current interlocutor is to explicitly say hello to them, and until you do that you won’t be able to talk to them.

*The “if the noun is not the current interlocutor” clause is meant to catch cases where you tried to talk to something that isn’t a person, or where the author has written a rule that blocks that carry out saying hello rule under certain circumstances. So you might write something like

Instead of saying hello to Sisko, say "Without looking up from his paperwork, Sisko shakes his head impatiently."

then (I think) when you try saying hello, the game will print that and stop the saying hello action, so the current interlocutor never gets reset and you don’t wind up trying to ask him something anyway. It’s important to have the “say” phrase as part of this rule, so you don’t wind up with a blank command prompt. Similarly the rule that stops you from talking to inanimate objects prints a response before this clause stops the action.

Thanks for the comprehensive reply, Matt, that’s great and it helps me understand a little more. Your explanation appears to make sense under the circumstances but I’m not sure how I get Inform to avoid that empty command prompt. Despite reinstalling the extensions in question and ensuring that the ‘try saying hello…’ line is not commented out, I am still getting ‘>’ when I type “ask receptionist about photo”. What I’d like to happen is for it to come back and say “try saying hello first”. Should it do this by default or do I need to set this up?

Alternatively is there a way of getting my receptionist to answer some questions but have default responses to others (taken from a random list) without having to install these extensions and without having to say hello first?

No problem. As I said, I haven’t used these extensions myself – this was as much a way to work out how it worked for myself as anything else. Which also means that I’m not sure how to do what you say in the first paragraph – maybe some of the other folk can explain it better.

You can definitely do what you say in the second paragraph, though, especially if you don’t want your conversations to be too complicated. Check out this section of the manual and the examples in it. To do a random list of default answers to the receptionist, I think something like this will work:

[code]Instead of asking the receptionist about something:
say “[one of]She says, ‘Toodle-oo!’[or]She tries to look interested.[or]She says, ‘Yes, yes.’[at random]”.

Instead of asking receptionist about “[framed photo]”:
say “‘Why, it’s a photo of me’, exclaims the receptionist as she flutters her eyelashes. '”.[/code]

The default rule won’t interfere with the rule for the photo, because that rule is more specific and gets checked first.

Thanks, Matt. I picked up on your suggestion of certain rules being processed first, I didn’t realise Inform did this. This may be the cause of some other issues I have, so thanks again for pointing that out.