Supplying a missing noun (I7) [SOLVED]

I don’t exactly understand rules.

I’m trying to provide a missing noun for verbs like “ASK ABOUT [text]” so that if there is a living creature nearby the parser understand it’s her we are talking with.

This doesn’t seem to work (it does nothing, actually):

Asking someone about something is speech. Telling someone about something is speech. Answering someone that something is speech. Asking someone for something is speech. Rule for supplying a missing noun while speech (this is the provided interlocutor rule): if the player can see a person (called the queried): now the noun is the queried; otherwise: now the noun is the player.
NB: it doesn’t with with no substitutions, too. Rule for supplying a missing noun while asking etc etc.

The game compiles, btw.

Thanks a lot!

In case you are looking for a fast reply, I’m going to poke my head in through the figurative door, and guess that supplying a missing noun has to be tied to an action, and that speech isn’t an action in your case. I’m also going to guess that you’ll have to supply a missing noun separately for every action instead.

Well, for the supplying a missing noun/second noun activity to run, you need a special understand line like this:

Understand "show [something]" as showing it to.

But it looks to me as though you can’t do this with topic-based actions (or perhaps you can’t do this so as to supply something for the first of two grammar tokens), because when I include this:

Understand "ask about [text]" as asking it about.

I get this error:

The grammar you give in 'Understand "ask about [text]" as asking it about' is not compatible with the Asking it about action (defined as 'applying to one thing and one topic') - the thing you suggest this action should act on is not an object at all. See the manual: 12.7 > New actions

So you may just need to define different actions for “Ask about [text]” and redirect those actions to the queried. (zarf generally says that this is a better approach than supplying a missing noun anyway, I believe.)

I do. :slight_smile:

In general, if the “supplying a missing noun” activity confuses you, skip it. It’s a shortcut to avoid defining a second action. Which is fine if you know it, but don’t start there.

To the best of my knowledge it’s the latter.

I’ve managed to add a new action and redirect it to the default one (thanks all for the advices). What I can’t do is this:

[code]Responding is an action applying to one topic.
Understand “answer [text]” or “say [text]” or “tell about [text]” as responding.

Instead of responding:
if the player can see a person (called the queried):
try telling the queried about the topic understood;
otherwise:
try telling the player about the topic understood.[/code]
This ends up with the player always speaking with him/herself because the player can always see him/herself and that’s the person inform catches first. :slight_smile:

How would you do it?

You are precioussssss. Thanks a lot!


Edit because solved!

[code]Definition: a person is other if it is not the player.

Instead of responding:
if the player can see an other person (called the queried):
try telling the queried about the topic understood;
otherwise:
try telling the player about the topic understood.[/code]

All from the manual. :slight_smile: