Conversation Framework

Hi all, I’m using conversation framework by Eric Eve. I’m running into what is possibly a bug and am looking to find a workaround (it may not be a bug, but it feels like one)

With the following snippet of code :

[code]Include Conversation Framework by Eric Eve.

The Kitchen is a Room.

Bob is a man in the Kitchen.

Instead of quizzing Bob about something:
say “Bob is too busy staring at the spoon.”.

Instead of doing anything other than examining with Bob:
say “Bob is too busy staring at the spoon.”.

The Spoon is in the Kitchen.

Instead of doing something other than examining with the spoon:
say “It is the ghost of a spoon. Your fingers slip right through.”.[/code]

I’m getting the following behavior :

[code]Kitchen
You can see Bob and a Spoon here.

get spoon
It is the ghost of a spoon. Your fingers slip right through. (fine)

kill bob
Bob is too busy staring at the spoon. (fine)

ask bob about spoon
Bob is too busy staring at the spoon. (fine)

a spoon
(addressing Bob)
Bob is too busy staring at the spoon.

It is the ghost of a spoon. Your fingers slip right through. (ouch)

[/code]

Is this actually a bug? I’m looking at the rules and actions and can’t see anything obvious? Is there a fix / way around this?

Thank you!

Ade.

n.b. later edit : tried ‘Instead of implicit-quizzing Bob’ also, but results in same response.

I don’t know whether this is a bug report, but I copy/pasted your code and got an error with Inform 6M62. It wouldn’t understand the !quizzing" action.

I took the following definition verbatim from the extension:

Quizzing it about is an action applying to two visible things.

And then it worked. Commented it out; error. Even though I include the first line, where I include the framework.

EDIT - I could only get the extension do work by copying the whole lot into the source text.

It may be the way the extension works.

“Ask Bob about Spoon” seems to translate into “quizzing Bob”. Makes sense. But then “a spoon” seems to translate into “implicit-quizzing the Spoon”, which is an action other than examining - and it’s applied to the spoon, rather than Bob. So it makes sense, as far as it goes. Though I’m not sure whether Eric Eve would consider this a bug or a feature…

THanks Peter,

I’ve also tried :

Instead of implicit-quizzing the spoon: say "Bob is too busy staring at the spoon.".

This is interesting in that it :

[code]>a spoon
(addressing Bob)
Bob is too busy staring at the spoon.

Bob is too busy staring at the spoon.

[/code]

It certainly seems to be a ‘feature’. I’ve tried your suggestions, but am having no luck.

Ade.

This seems to work, but it’s a stop-gap for a specific situation. Still, hopefully it’ll give you ideas.

Instead of doing something other than examining with the spoon: unless implicit-conversing, say "It is the ghost of a spoon. Your fingers slip right through."

EDIT - Have you tried “a Bob”? You’re likely to have the same issue.

Thanks Peter - I actually wasn’t aware of this ‘unless’ syntax.
I’ll give it a try.

Ade.

This is mindbending.

[code]
Instead of quizzing Bob about something:
say “Bob is too busy staring at the spoon.”.

Instead of doing anything other than examining with Bob:
say “Bob is too busy staring at the spoon.”.

The Spoon is in the Kitchen.

Instead of doing something other than examining with the spoon:
say “It is the ghost of a spoon. Your fingers slip right through.”.[/code]

a spoon (ask (bob) about the spoon)

The player is doing something other than examining to Bob, so you get "Bob is too busy…
but the player is also doing something to the spoon other than examining (asking about it) so they get that message too? One could assume that the first instead cancels the action, but it makes sense the parser would give equal attention to the spoon.

It would seem the first Instead is superfluous “Instead of quizzing bob” when the other is “Instead of doing anything other than examining” to bob. The message is the same so you wouldn’t notice, but I don’t think you ever get to quizzing bob.

Yeah, a better solution would be to lump together “examine” and all the conversation actions - or maybe just the implicit conversation actions? I dunno - and then do a "Instead of doing something other than with " every time something like this is necessary…

I think this is possible, but don’t really have the heart to go much into it.

Just a note, if you want to gather up every action where the spoon is the noun or second noun, you can use “when the current action involves the spoon.” (This will also catch cases where the spoon is the actor, but that shouldn’t be a problem.) This is mentioned in §12.20 of Writing with Inform.

However, I suspect that your message won’t be appropriate whenever the action doesn’t require you to touch the spoon. You can check this with “the current action requires a touchable noun/second noun” (see WI §12.7).

So I’d try:

[code]Instead of doing anything with the spoon when the current action requires a touchable noun: say “[spoon slips through fingers]”.

Instead of doing anything when the second noun is the spoon and the current action requires a touchable second noun: say “[spoon slips through fingers]”.

To say spoon slips through fingers: say “The ghostly spoon slips through your fingers.”[/code]

I would bet that the quizzing actions don’t require touchable second nouns, so this should keep you from getting the spoon message when you’re asking Bob about the spoon.

It seems weird that you’re apparently getting messages from two separate Instead rules, though. I’ll try firing up Conversation Defaults (if I can) and running a “RULES” check.

OK, here’s what I get for the original code with “a spoon,” with ACTIONS and RULES turned on:

So the multiple messages come because, in order to talk to Bob, you first have to implicitly perform the action “Saying hello to Bob.” When that fails, you get a “Bob is too busy” message. But then, even though you haven’t succeeded in greeting Bob, it tries asking Bob about the spoon anyway. This seems to me like a bug in the extension, or at least a misfeature.

Here’s what I think is a fix:

[code]Before implicit-conversing when the current interlocutor is nothing (this is the implicit-conversing really needs current interlocutor rule):
let np be the number of visible people who are not the player;
if np is 0, say “There’s no one here to talk to.”;
if np > 1, say “You need to specify who you want to speak to.”;
if np is not 1, stop the action;
let the interlocutor be a random visible person who is not the player;
if the interlocutor is a person begin;
say “(addressing [the interlocutor])”;
let sn be the second noun;
implicitly greet the interlocutor;
if the current interlocutor is not the interlocutor, stop the action; [this line is new]
now the second noun is sn;
otherwise ;
say “You’re not talking to anyone.”;
stop the action;
end if.

The implicit-conversing really needs current interlocutor rule substitutes for the implicit-conversing needs current interlocutor rule. [/code]

It’s definitely a bug; if we didn’t have a rule that cut off all interaction with the spoon before it got started, we’d get a “You must supply a second noun” message. I’ve filed it here (at least, I think that’s the place to put bugs on extensions in the Public Library that aren’t built-in.)

Y’all people who are getting this extension to work without having to copy/paste the whole code into your source - are any of you using the latest Inform?

It works for me in 6M62 without (I think) any significant modification.

One thing you might want to check is if you have a modified version of the extension from a previous version of Inform installed in your Library/Inform/Extensions directory. That’s what got me here. If you do, Inform will grab that version instead of the one you want, or maybe this is just something that happened if you previously installed a built-in extension (which some of the much older versions of Inform incorrectly told you to do).

I have been having weird behavior with the extensions in 6M62, in that nothing shows up on the “Open Extension” menu, but they install fine for me.

Thanks for the info, I’ll do some digging later then. Cheers