"lie" command not being parsed correctly (Adv3Lite)

In a game created by creating a new Adv3Lite project in Workbench, when the player enters lie as a command, the parser interprets the word lie as lip.

Code for the above is the result of my creating a new project using the Adv3Lite library. The only thing I added was to locate the PC in the startroom.

But in a using only the code generated by the WorkBench when a new project is started using the Adv3 starter library, lie is interpreted to mean lie down and the character does so.

This came to light when a beta tester for my Dark Angel game (Harry, the San Francisco detective) tried the lie command and it was interpreted as lit (that’s a third variant—original game from workbench interprets it as lip not lit).

Is there something wrong that can be fixed, or is this just a “that’s the way it is” artifact of using a different library?


This is just the normal behavior of the spellchecker in adv3Lite. The difference you see between your game and a new game should be due to the defined vocabulary in the two games.

I find it sometimes counter-productive, too, but I don’t know how to turn it off yet.

Edit: I guess I should also add, the difference between adv3 and adv3Lite is likely because adv3Lite doesn’t have an implicit lie action, but I can’t be sure without digging into the library code.

Well, I have just discovered that this code, in harry.t (definition of the player char)…

            doInstead(LieOn, harrysBed);

…gets me the correct behavior, but it still flags the parser reinterpretation…

…with the parenthetical b[/b]. I haven’t yet figured out how to suppress that.

Well, not quite true, I believe this code for suppressing then reenabling implicit action reporting will suppress it, I just haven’t figured out where to place the code that calls these functions…

    Action.showImplicitAction = nil;
    Action.showImplicitAction = true;


I am not sure a dobjFor() that redirect “lit” to “lie on bed” is the best solution to this problem, but if you just want to suppress the “(lit)” message, it’s generated in adv3Lite’s spelling.t, line 755:

DMsg(corrected spelling, '(<i>{1}</i>)<br>', str);

Change this will change all the spelling correction prompts, though.

Actually, I got my wires crossed when I wrote that. I’ve tried several things and the dobj was not the one that got me the right text in the game window, it was a new verb rule for “lit”…

// lit
    : VerbProduction
    action = Lit
    verbPhrase = 'lit/litting'
        if(harry.location == harrysBed)
            doInstead(LieOn, harrysBed);
        else if(harry.location == livingRoom)
            doInstead(LieOn, couch);
        else if(harry.location == hernandezUpstairsRoomNorth)
            doInstead(LieOn, bedInHernandezUpperRoomNorth);
            "Harry looked around for something to lie on. <.p>";

And I think I agree with you the neither of these are the correct solution, but the verb rule solution is the only one I’ve found yet that works, at least partially.

I think the least desirable solution is to not do anything other than just tell gamers, “that’s life.”


The adv3Lite deliberately doesn’t recognize the command LIE because it’s ambiguous (does it mean LIE DOWN or TELL AN UNTRUTH)? In a game heavy on conversation the author may want the conversational meaning.

The command LIE DOWN works as expected.

If you want the command LIE to be interpreted as LIE DOWN in your game, just add the following to your code:

modify VerbRule(Lie)
    'lie' ('down' |) :

Well, I don’t think I want to repurpose the verb lie to mean something other than a falsehood. There are a couple of places later in the game when lying—telling an untruth—is a correct response during a conversation. So I don’t want to shut that down.

I just want to prevent the game’s reinterpretation of the word lie as lit, or lip, which have no valid meaning in any context.

If lie is valid as a conversational verb, then the game should treat it as a conversational verb. It’s other meaning is handled quite well by the existence of lie down or lie on.

If I enter other conversational verbs, such as ask or tell, the game does the right thing and recognizes them as verbs out of context. It should do the same thing with lie.

In fact, the game does do this, but only after a tell command has been entered.

That is, if I enter lie then ask then lie, the game misinterprets lie both times. But if I enter tell then lie, the game does the right thing and interprets lie as a conversational verb. It should do this from the beginning, not just after a tell command.

LIE is not implemented as a conversational verb either. Since it’s ambiguous (lie down or tell a lie), it’s left to game authors to implement it if they want it to suit their particular requirements.

Another approach might be to use a StringPreParser:

    doParsing(str, which)
        if(str.toLower == 'lie')
            "Do you mean <<aHref('LIE DOWN', 'LIE DOWN',' LIE DOWN')>> or 
                <<aHref('TELL A LIE', 'TELL A LIE', 'TELL A LIE')>> ";
                    str = nil;
        return str;

Okay, that works. Thanks.