adv3Lite conversations---no recovery for bad user input?

I have a conversation using a ConvAgendaItem that hands off to a ConvNode that uses NodeContinuationTopic and NodeEndCheck to keep the player in the conversation until it’s finished. So far, so good, it works as expected, as long as the player enters commands as required—"tell it about ".

But if the user enters the command without reference to the other character—enters "tell about " instead of "tell it about " not only does the game respond with a “does not respond” message, but from that point on, no input, correctly or incorrectly phrased, will work.

Here’s a transcript when the player input is correctly phrased…

And here’s a transcript where the player input is incorrectly phrased the first time, then correctly phrased but still rejected…

(Pronoun is it, because it’s a nonentity, no gender, but it doesn’t matter, I’ve tried it with isHim = true, same results).

Here’s the code…

[code]#charset “us-ascii”

#include <tads.h>
#include “advlite.h”

versionInfo: GameID
IFID = ‘445C38A3-AD1B-4729-957A-F584600DE5C1’
name = ‘test’
byline = ‘by Jerry Ford’
htmlByline = ‘by
Jerry Ford

version = ‘1’
authorEmail = ‘Jerry Ford jerry.o.ford@gmail.com
desc = ‘Testing conversation.’
htmlDesc = ‘Testing conversation.’

;

gameMain: GameMainDef
/* the initial player character is ‘candidate’ */
initialPlayerChar = candidate
paraBrksBtwnSubcontents = nil

;

// candidate, initial player char
candidate: Actor ‘you;self body’ @testChamber
“You are a…well, that’s what we’re here to find out. <.p>”
globalParamName = ‘candidate’
isHim = true
person = 2
contType = Carrier

dobjFor(Examine)
{
    action()
    {
        if(gDobj == self)
        {
            "In your currently fogged state of mind, you slowly take stock 
            of yourself---face, hands, feet, arms, legs. \b
            Cables are attached to various parts of your body.\b
            <i>Thump thump. Thump thump.</i> You feel a rhythmic beating
            inside your chest.
            <.reveal selfExamined> <.p>";
        }
        else
            inherited;
    }
}

;

// candidate, initial player char
innerSelf: Actor ‘voice in your head’
“”
globalParamName = ‘innerSelf’
person = 3
contType = Carrier
;

// ********* ConvAgendaItem *********************************************

  • ConvAgendaItem
    isReady = (gRevealed(‘selfExamined’))
    invokeItem()
    {
    “A voice inside your head speaks. \b
    Assess the data, it instructs. What did your self examination
    discover?

    <.convnodet dataPoints><.p>”;
    isDone = true;
    }
    initiallyActive = true
    ;

// ********* ConvNodes **************************************************

  • selfDiscovery: ConvNode ‘dataPoints’
    ;
    ++ cablesDiscovered: TellTopic @tCables
    There are cables…I’m attached to… you begin. What are they?
    What does it mean?
    \b
    That’s curious, replies the inner voice. I don’t know. We’ll need
    more data.

    <.p>
    <.convstayt>”
    name = ‘the cables’
    ;
    ++ heartBeat: TellTopic @tHeartBeat
    I feel a rythmic thumping in my chest, you silently tell your
    inner voice. \b
    We have a heart beat, that’s a data point, the inner voice replies.
    We are alive. That’s useful to know.
    <.p>
    <.convstayt>”
    name = ‘the thumping sensation’
    ;
    ++ NodeContinuationTopic
    Con’t let the mind wander, the voice says. We must finish
    this phase in order to move on.

    <.p>”
    ;
    ++ NodeEndCheck
    canEndConversation(reason)
    {
    switch(reason)
    {
    case endConvBye:
    “No, not good bye, the inner voice tells you. We are
    bound intricately and irrevocably.
    <.p>”;
    return blockEndConv;
    case endConvLeave:
    There is nowhere to hide from me, says the voice in your
    head. <.p>”;
    return blockEndConv;
    default:
    return nil;
    }
    }
    ;

tCables: Topic ‘the cables’;
tHeartBeat: Topic ‘the thumping sensations’;

// ********* Rooms ********************************************************

testChamber: Room ‘Test Chamber’ ‘test chamber’
“The test chamber.
<.p>”
;

// self discovery
selfDiscoveryScene: Scene
name = ‘selfDiscovery’
startsWhen = candidate.isIn(testChamber) && !gRevealed(‘candidateNameSet’)
endsWhen = gRevealed(‘candidateNameSet’)
recurring = true
whenStarting()
{
if(!gRevealed(‘selfDiscoverySceneInitialized’))
{
commLink.connectTo(innerSelf);
gReveal(‘selfDiscoverySceneInitialized’);
}
}
whenEnding()
{
commLink.disconnectFrom(innerSelf);
}
;
[/code]

I am new to both TADS and adv3Lite, and don’t really know the details about NodeContinuationTopic, but is there any reason that you don’t have a DefaultAnyTopic in your ConvNode? In my test, that seems to catch the TELL ABOUT THE CABLES command.

minghua:

The only reason there is no default any topic (or default tell topic) is that the posted code is a pared down test-bed that focuses only on the problem at hand. In the actual game code, there are default topics.

Adding a default topic does not fix the problem. Yes, it gives a response other than the boilerplate “it does not respond”, but that’s not the problem. There isn’t a need for a default topic here. There is text for the cables topic, and the game code recognizes it when the player input is in the correct format.

I don’t necessarily mind that “tell about…” doesn’t work (well, I do sort of—it’s not consistent; sometimes it works to omit reference to the other party to the conversation, sometimes it doesn’t—but that’s not the problem I’m bringing to light in this thread).

The more serious problem is that, once the player enters the bad input, there is no way to go back and enter correct input. Make a mistake, and the conversation is over.

Jerry

Well, okay, minghua, you seem to be on to something.

Adding a <.convstayt> tag to the default topic (or in the case of the test bed, adding a default topic with the <.convstayt> tag) keeps the conversation going so that a second try, with a correctly phrased command, can be attempted.

Thanks.

Jerry

About this, it turns out that the reason TELL ABOUT THE CABLES doesn’t work is that whichever part of the parser that resolves that command to TellImplicitAbout doesn’t take the word “about” out before passing it on, and as a result, TellImplicitAbout is receiving a strange topic:

So while TELL ABOUT THE CABLES doesn’t work, TELL THE CABLES works just like TELL IT ABOUT THE CABLES.

I encountered a similar problem with the ASK command earlier, so I’m bringing it up here (even if Jerry has said it’s not what this thread is about). Do others feel that TELL ABOUT THE CABLES should be parsed differently?

Well, sometimes yes sometimes no.

Here’s a transcript from Dark Angel, a different game of mine, where “ask about…” works even though there is no reference to the character being addressed…

It’s not consistent, and so far I have been unable to identify what makes it work or what prevents it from working in any given situation.

Jerry