Where is the block answering rule? (6L38)

In attempting to nuke a couple of problems in my Notepad extension, I need some special handling for the block answering rule. But I don’t know how to find it. It doesn’t seem to show up in the Index – not in any of the pages I’ve looked at, anyhow. I don’t know what rulebook it’s in, so I can’t very well write “The block Beethoven answering rule is listed before the block answering rule in the XXX rulebook.” Not that that would necessarily do the job, but it’s a place to start.

There’s not much point in my posting my code, because it relies on the new version of the extension. The basic problem I’m trying to solve is this:

You can write commands to Beethoven in his conversation book. (He’s deaf, so he doesn’t respond to verbal commands.) If you write a command that the parser can understand but that Beethoven has no code for, you get my standard output, the non-response of Beethoven message. But if you write something in the book that the parser can’t digest (such as “do you like Mozart?”), the output (“There is no reply.”) comes directly from the block answering rule. This is not good. Beethoven should always give you his non-response message, whether or not the parser can make sense of what is written in the book.

Does that make any sense at all? Hope so.

The same problem arises if the player tries an ordinary verbal command:

This is not desirable. We should ALWAYS get the output, “Beethoven didn’t seem to have heard him,” no matter whether the parser can make sense of the command or not.

If you want to change the default response, it’s:

The block answering rule response (A) is "Beethoven didn't seem to have heard him."

Though that would be the default for all NPCs if you have more than one. The better option might be to write a rule for Beethoven:

Persuasion rule for asking Beethoven to do something: instead say "Beethoven didn't seem to have heard him."; persuasion fails.

I just realized you’re also looking for answering it that. It’s used for unrecognized commands.

Instead of answering Beethoven that: say "Beethoven didn't seem to have heard him."

Hmm. Not sure that will do the trick. Maybe. Here’s the current code:

[code]Instead of asking Beethoven to try doing something:
if Beethoven-willing is true:
say “[Beethoven] [frown] and [shake] his head. Perhaps he [can’t] understand what ‘[memo of the conversation book]’ [regarding nothing][mean].”;
say “[non-response of Beethoven][paragraph break]”.

Persuasion rule for asking Beethoven to try doing something:
if Beethoven-willing is true:
persuasion succeeds;
persuasion fails.

Rule for reading a command:
if the queued command is empty:
now Beethoven-willing is false;
make no decision;
now Beethoven-willing is true;
change the text of the player’s command to the queued command;
now the queued command is “”.[/code]

it appears I don’t need to know what rulebook the block answering rule is in, in order to replace it. The following ought to work (but it doesn’t):

[code]Report an actor answering something that (this is the fancy block answering rule):
if the actor is Beethoven:
say “[non-response of Beethoven][paragraph break]”;
else if the actor is the player:
now the prior named object is nothing;
say “[There] [are] no reply.” (A);
stop the action.

The fancy block answering rule substitutes for the block answering rule.[/code]
The output is still the same as before:

My tentative conclusion is that by the time this rule is reached, Beethoven is no longer the actor – but this seems to explicitly contradict page 12.3 in “Writing with Inform.”

What am I doing wrong?

When you type “beethoven, dance the hokey-pokey,” and “dance” isn’t a recognized verb, the action is the player answering Beethoven that “dance the hokey-pokey”–Beethoven never was the actor, because Inform didn’t recognize “dance the hokey-pokey” as a command you were attempting to give to Beethoven. The action is the same action that you’d get if you had typed “answer beethoven that dance the hokey-pokey” (I think)–the actor is the player, Beethoven is the noun, and “dance the hokey-pokey” is the topic understood. So you want your rule to be “Report answering Beethoven that” or your condition to be “if the noun is Beethoven.”

ETA: The explanation for this is hidden away in section 17.10 of Writing with Inform–if you say “person, foo” it tries to process it as a command if “foo” starts with a recognized verb… and then I think if it can process it it treats it as a command with person as the person asked, and if it can’t it converts it into an answering it that anyway. If “foo” doesn’t start with a recognized verb it doesn’t bother trying to parse it and just converts it into an answering it that. But in either case, when you have an answering it that, the person you’re talking to is the noun rather than the actor. I think the way to get someone else as the actor for an answering it that would be something like “Beethoven, answer dance the hokey-pokey to Schubert” or something like that.

Got it – thanks, Matt! I think I have the extension working now. Onward and upward.