Telling actor to perform action

Hey, all!

I’m playing around a bit with code, and got to the point where I wanted to allow the player to order about another character to do something. The format, however, is a bit hard. Is there a facility to enable wildcards of this kind, on the format of

tell [someone] to [perform action]


As always, the fallback of Regex remains. Still, if there’s a better way than to manually reshape the text from “tell (someone) to (something)” into “(someone), (something)”, I’d be very glad to hear it.

The example “Northstar” shows how to do exactly this. (ETA: it is a regexp solution, but fairly tidy and pre-written. Wildcards of the kind you describe are not possible because you’d be nesting a whole new set of parsing inside the [perform action] part.)

Thank you very much. Now I do feel silly, though; all along it was right before my eyes, and yet every time my eyes just skipped over it to the Cave Troll example.

I’ve never quite grasped why the workings of the ask/tell system is kept separate from the rules core (in that all such parsing occur before the visible rulebooks kick in). Is this fundamental to I7’s nature, or will it someday change?

I assume you’re not talking about >ASK COUNT DRACULA ABOUT RED WINE (which is accessible enough) but about >COUNT DRACULA, DRINK WINE – that is, why there’s no rulebook allowing you to fiddle with addressing commands to other characters.

I think the answer is that (a) this part of the parser is a thicket of complexity and (b) Inform 6 provided few or no hooks into it, so Inform 7 by default didn’t either. The regexp solution is actually MASSIVELY easier than what you had to do in I6 to turn TELL DRACULA TO DRINK WINE into DRACULA, DRINK WINE.

That doesn’t mean that there could never be changes here. If you have something in mind for how this portion of the system could be made more accessible and more I7y, please do put it on the suggestions site, and we can talk about whether it’s feasible.

Yeah, that’s what I meant. I should have been more precise in my phrasing.

Interesting. That makes a fair amount of sense, to be honest.

Allright. I hope I’m not being too annoying by asking a follow-up question: how do I go about phrasing such a request? I mean, blithely asking someone to rewrite that entire section of the parser would be vague enough to be disrespectful, IMHO. Would it be better if I supplied a rules suggestion or two (such as adding a persuasion stage rulebook, for instance)?

The most useful suggestions are not necessarily those that suggest how the change should be implemented, but the ones that are clear about what you as an author would like to be able to do, what syntax you want to use, and how that would be helpful in actual real-world game situations.

So “it would be great if, instead of the parser automatically preparsing commands of the form Blah, blah blah… into a direction to another player, there was a rulebook of command preprocessing rules which included that rule, and it could be delisted.” – or whatever it is you do want – perhaps followed by suggestions for the syntax you’d imagine seeing and a brief description of a case where that would be useful.

I can’t guarantee that you’ll get what you ask for this way, but the specific requests are much easier to evaluate and act on. Vague requests often wind up in a heap labeled “this sounds like it might be useful somehow but we’d have to spend a while figuring out what the specs even are before we start so let’s do it later.”