Hello everyone!
As the year begins anew, so too does my ever-optimistic attempt at coding I7. I seem to have a knack for disregarding basic solutions and problems and heading unerringly for the most complex and arcane stuff. This, I fear, is no different.
I was playing around with a scene in which an NPC would react to orders, but would be insulted if you used a particular name or title for the character. I want to create an extra step within the Understand process that not only translates but flags; in effect, almost another pronoun which carries a connotation of its own (addressing your boss as “shithead” as opposed to “milord”, for instance).
Basically, the issue is to make a variant of the Cave Troll example, in which an error-producing command is halted, analyzed, and then regexped into a new command, which finally is fed back into the parser. Cave Troll or simpler variants suffice to trap all of this kind of parser errors. Unfortunately, there seems to be a host of errors that are not amenable to such solution, and which do in fact finish executing before the rules are even called.
For instance, take this code:
The Lounge is a room. The Study is north of the Lounge.
John Armitage Wakinshaw IIIrd is a man in the Lounge.
A persuasion rule for asking someone to try doing something: persuasion succeeds.
Test me with "actions / Jack, go north / John, go north"
As I understand it, the reason this occurs before we can affect it is because the library file Language.i6t performs its magic before the parser proper, and (for some reason I can’t fathom) isolates these operations within a place where I7 can’t easily reach.
I know that, if need be, we can do an “every turn” sort of chunking effect which would match every command beginning with "[certain words], ". It feel like more than a little overkill to do it for every single command, however, especially since I don’t want it to trigger if we actually do have a character named “Madame” or “Mylady.”
I’ve poked around rec.arts.int-fiction in search of an answer, but there’s not much there. All I found was the Cherubim example, which doesn’t seem to work as advertised. Any takers?