Redirecting "Ask grandparents about a toy" to "Ask grandparents *for* a toy"

Basically, the title. I’ve tried every possible permutation I can think of.

First attempts:

Instead of asking grandparents about a toy:
	try asking them for it;

Instead of asking grandparents for a toy:
	say "You can't have a toy";

Instead of asking grandparents about a toy:
	try the player asking them for it;

Instead of asking grandparents for a toy:
	say "You can't have a toy";

Resulted in an error:

You wrote ‘Instead of the player asking your grandparents about a toy’ , which seems to introduce a rule taking effect only if the action is ‘the player asking your grandparents about a toy’. But that did not make sense as a description of an action. I am unable to place this rule into any rulebook.

Which… Why isn’t that a valid rule form? I’ve seen a similar syntax work just fine in the second rule, the Instead of asking grandparents for a toy rule.

The next thing I tried was:

Instead of the player asking your grandparents about something:
	try asking grandparents for the noun;

Instead of asking grandparents for a toy:
	say "You can't have a toy";

Now we get this strange behavior:

>ask grandparents for a toy
You can't have a toy <--- This part works okay
>ask grandparents about a toy
(your grandparents first taking your grandparents)
your grandparents have better things to do.

Harsh! And also surprising. What am I doing wrong here?

I don’t know Inform super well, but tinkering around a little bit… It seems like in ask grandparents for a toy the two arguments are the noun (the person you’re asking) and the topic understood (that you’re asking about) but the topic understood is a snippet, not a thing, so you can’t pass it to the asking it for action?

So when you try asking grandparents for the noun you’re asking them for themselves. And then `… has/have something better to do" is the default response to asking it for, I believe? It’s not firing the asking grandparents for a toy rule because you’re not asking them for a toy. Yeah, I think that’s it.

This seems to work:

Instead of asking grandparents about a toy:
    try asking the noun for a toy;

But I don’t know Inform well enough to know if there’s some way to get it to look up a “snippet” and turn it into a “thing” (or whichever kind it is that asking it for wants…)

2 Likes

asking it about only works for asking about text, not things.

3 Likes

Remember to check the index :slight_smile:

1 Like

If your WIP will have a fair amount of conversation you might want to try the conversational extensions by Eric Eve. Conversation Responses and Conversational Defaults. Those would include quizzing about a thing as well as default responses for things you don’t want to code specific responses for. Some untested examples.

Response of grandparents when given-or-shown a toy:
	say "'Oh, that's very nice dear. Have fun playing with it,' they respond as they hand it back to you.".

default ask response for grandparents:
	say "'[one of]Oh, I don't know much about that[or]You should ask your mother when she gets back[or]Cowabunga, my dude[in random order]'".

Check quizzing grandparents about a toy:
	try asking grandparents for a toy instead.

You can also add qualifiers to the end of those. So you can have “default ask response for grandparents during an exciting scene” etc. And if you really want to get into it those also include another extension that introduces subjects as a new kind for asking about more abstract things like love.

1 Like

Okay so question: what would I have been looking for in the index? I checked the actions and could see that “asking it for” existed and so did asking about, but the distinction between text and a thing is kind of muddy to me. Can you explain what I should have looked for or how the index would have helped me solve this? Genuine question, btw!

Sorry if I came off as snarky. I was in a hurry.

Check the index here:


and click through to here:

Where it says “Asking something about some text”.

This means that the parser will not attempt to parse the text after about, so it will not recognize it as describing a thing (e.g., a toy). “teddybear” will stay “teddybear”, and won’t be recognized as the teddybear.

In contrast, asking it for:


applies to two things.

No snark detected! I literally want to learn how to help myself figure things out on my own better. And thank you!