I6: Switch Second for Noun in AskFor

I’m not sure if this is quite what you want, but I did a similar thing recently by extending the grammar for ‘ask’ as follows:

Extend only 'ask' first
  * 'about'/'for'/'to' topic -> VagueAsk
  * creature 'for' topic -> Ask;

In this way, ASK TROLL ABOUT APPLE and ASK TROLL FOR APPLE are synonymous. VagueAskSub is a custom action handler that just reminds you that you need to provide a subject.

In your example, there is no provision for a second noun in the grammar, so you won’t be able to exchange noun for second anyway.

It sounds like you’re wanting the opposite of GIVE. With GIVE, you give something to an animate object (using the creature token). It sounds like you want to get something from an animate object. In this case, the grammar would be the same as above, except that Ask would be AskFor. This is a custom action that does whatever you want.

Because you’re directing the command to an animate object, you should handle the specific overrides in a life rule by providing the following in AskForSub:

  if (RunLife(noun, ##AskFor))
    rtrue;

Then your life rule would be something like:

life
[;
  AskFor:
    if (second == 'whatever')
      ! Do something
],

This is the easiest way to do it. Apologies if this is not quite what you want. If it’s not what you want, perhaps you could be a bit more explicit with a couple of transcript examples.