another converstation topic problem (adv3lite)

Thanks, Eric, for you help even while on the road. Much appreciated.

Your suggestion seems to have fixed the problem.

Which leads me to the next problem :slight_smile:

When Harry engages in conversation with one or another actor, the prompt often as not is on the order of Harry could ask him about XXX and I can enter ask him about XXX and get the expected reply.

But I have seen on occasion ask him about… produces a generic …has nothing to say about XXX… reply. I can then follow up the either ask about… or ask (character’s name) about… and get the expected conversational reply.

I expect the command exactly as the prompt shows it to work. But it does not.

For example, at one point Harry is prompted to ask Max about the danger Max sees, the game window prompts (Harry could ask him about the danger) and entering ask him about the danger produces the expected reply…

But later in the game, when Harry engages in conversation with Grace and the prompt displayed is (Harry could ask her about Mike and Grace) entering the command exactly as shown in the prompt—ask her about mike and grace—generates the generic nothing to say about that response while ask about… or ask Grace about… works as expected…

The AskTopic is defined as…


  • ConvNode ‘mikeAndGrace’
    ++ graceTalksAboutMikeAndAaron: AskTopic, StopEventList @tMikeAndGrace
    eventList =
    ‘What about you and Mike? Harry asked. \b
    I mean, he’s your father and all that, but, Grace, he sold me out to
    <.p> <.convstayt>’,


    name = ‘Mike and Grace’

…while the Topic is declared as…

tMikeAndGrace: Topic 'Mike and Grace';

I suspect this will be impossible for me to resolve until I’m back home at my own machine and I can try to work out what’s going on. The response you’re getting is very odd, if it’s really “Grace Oscuro didn’t appear to have any about mike and grace” rather than “Grace Oscuro didn’t appear to have anything to say about mike and grace.” At any rate I can’t see where this would be generated in the library; is it coming from a DefaultTopic you’ve defined?

I’m also wondering how the parser is actually interpreting ASK HER ABOUT MIKE AND GRACE at this point. Could you try issuing a DEBUG ACTIONS commands immediately before the ASK command and let me know what the debugging output says?

I’d also be interested to know what you get in response to ASK HER ABOUT MIKE.

The most obvious problem would be if Grace wasn’t the pronoun antecedent for HER because you’d referred to some other woman in a command just prior to your asking her about mike and grace.

Actually, from the response you’re getting, I’m beginning to think that the parser is probably interpreting HER as the possessive pronoun and is trying to find an object called ABOUT MIKE AND GRACE in her possession to ask, an interpretation that’s obviously silly to a human being but grammatically plausible to the parser. This would explain why you don’t get the problem with ASK HIM ABOUT so-and-so. Right now I have no means of testing this, but you could experiment to see whether this appears to be a plausible explanation for what you’re getting.

Obviously I have no means of fixing this right now, and I’m not even sure if it’s readily fixable (in the sense of getting the parser to make a consistently sensible choice between HER as the objective and possessive pronoun). The only workaround I can come up with is to change the way topic suggestions are listed so you see “You could ask Grace about…” and so forth. You could do this by looking at th3 definition of suggestedTopicLister in actor.t and changing ever occurrence of {him interlocutor} to {the interlocutor} (or doing the equivalent via a CustomMessages object).

But if I’m right about the cause of this problem I can’t really do anything about it until I’m back home and can investigate it properly.

Yes, Grace Oscuro didn’t appear to have any about mike and grace is what I get in the game window. That is a cut and paste.

No, nothing in any topic suggests “about mike and grace” as a valid response.

Here’s what I get for debug actions, followed by an ask her about mike

No previous conversation for several turns. The last conversation Harry participated in was with Aaron, a him, thought there was a ConvAgendaItem interjected by Lolita, a her, after the Aaron conversation.

However, it is not something exclusive to the pronoun her. I have seen this problem previously, in a conversation with a him, I think it might have been Aaron, not sure, been a while since I saw it last, it went away while I was doing some cleanup work on the game code having finally gotten through from start to finish. (That’s what I’m doing now, cleaning up and fine tuning.)

I modified the DMsg for ask about, using a new custom message string…

        Msg(ask about, 'ask {the interlocutor} about '),

…change {him interlocutor} to {the interlocutor} resulting in Grace’s name in the prompt instead of her, but the response is the same…

I tried intercepting the AskAbout command in a dobjFor(AskAbout) in the grace object, with breakpoints in the check(), verify(), and action() methods.

When I issue ask her about mike and graceor ask about mike and grace, no breakpoints get hit.

When I issue ask Grace about mike and grace, the breakpoint in verify(){ illogical(‘xxx’);} gets hit, but that doesn’t do me any good—that command produces a valid response. It’s when the command is ask her about mike and gracethat the response is incorrect.

I also tried dobjFor(AskAboutImplicit) and no breakpoints get hit no matter what I enter.

Well, yes it would be. Changing the prompt was never going to change the way the parser interprets player input; it was simply a way of not prompting the player to enter a command the parser might misinterpret, which was part of your original point.

The next think you could try is adding the following to your game code somewhere:

modify VerbRule(AskAboutWhat)

(The point is simply to make sure it’s never matched, since I suspect it may be this VerbRule that’s causing the problem, though I’m not in a position to test it myself right now).

Well, yes it would be. Changing the prompt was never going to change the way the parser interprets player input; it was simply a way of not prompting the player to enter a command the parser might misinterpret, which was part of your original point.

The next think you could try is adding the following to your game code somewhere:

modify VerbRule(AskAboutWhat)

(The point is simply to make sure it’s never matched, since I suspect it may be this VerbRule that’s causing the problem, though I’m not in a position to test it myself right now).

If that doesn’t do the trick, an alternative might be to define a StringPreParser somewhere:

  doParsing(str, which)
       if(str.toLower.startsWith('ask her') && gPlayerChar.currentInterlocutor != nil)
          str = str.toLower.findReplace('ask her', 'ask ' + gPlayerChar.currentInterlocutor.theName);


Again, I can’t test this right now, and it’s a bit of hack, but it may do the trick for now.


Had no effect. Response identical with or without this code.

Prevents game from responding to any command.

So I added else inherited; and I get a runtime error, wrong number of arguments.

Aargh! Comes of posting code without any means to test it. There should, of course, have been a return str; in there:

doParsing(str, which)
if(str.toLower.startsWith(‘ask her’) && gPlayerChar.currentInterlocutor != nil)
str = str.toLower.findReplace(‘ask her’, 'ask ’ + gPlayerChar.currentInterlocutor.theName);

   return str;



Sorry about that, but I did warn you that my ability to provide support is a bit limited right now!

I’m a bit surprised that modifying that VerbRule had no effect, but maybe the parser is deciding on the possessive interpretation of “her” before it even attempts to match a VerbRule. I’d really need to set a breakpoint in Parser.parse() to step through the code and try to work out just what the parser’s doing, but I’m afraid I shan’t be in a position to do that for at least a week.

In the meantime there is one more experiment you could try (before trying the corrected StringPreParser above):

modify VerbRule(AskAboutImplicit) ('a' | ('ask' | 'tell' 'me') 'about' topicIobj : ;

Even if that works, I’m not sure it’s the best fix, but at least if it does work it we would be a pretty good clue as to what’s going wrong.

If that does work, then you could also try this variant:

VerbRule(AskAboutImplicit) ('a' | ('ask' | 'ask' 'her' | 'tell' 'me') ('about' |)) topicIobj : ;

No guarantees; these are just experiments I’m not able to carry out myself right now.

Okay, progress!!!

This works:

Neither of the other two suggestions (adding return str to doParsing(), or the VerbRule mod variant) worked.


Okay, at least that confirms my guess about the cause of the problem and points to one way it could be resolved in the library, though I’m a bit surprised neither of the other two suggestions worked. The downside of the method that does is that it could disable some phrasings for questions that game authors might like to use, so I shall have to investigate further once I’m back home. But at least you have a fix for now.

Yes, thanks, working now.

As you ponder a long term fix, note that this does not happen with all characters.

Currently, I see it only with the Grace character.

I do not have definitive proof—no code to point to—just a recollection that I have seen this with other characters in the past and ignored the problem at the time because I had more pressing concerns and the finish line was still some distance away. Those gambles seem to have paid off. Whatever was triggering the problem went away as I move code around. I just don’t know what code, so I am not able to apply the fix to Grace, hence the need for your work around.

But, bottom line, it does not appear to be a universal problem. Something in my game is triggering it.


I suspect that’s because she’s female, so you get the ambiguity over whether “her” is possessive or objective, although it’s possible you may see a slightly different problem with “him”. Now I’m back at my own machine I’ve been experimenting a bit, and managed to get inconsistent behaviour with Grace.

The fix I’ve now tried which appears to work is to change the definition of VerbRule(AskAboutImplicit) in grammar.t so that the line that read:

priority = 60

Now reads:

priority = 45

This should make the parser attempt to match ASK SOMEONE ABOUT SOMETHING before ASK SOMETHING, and so select the correct interpretation over the spurious one in the case of ASK HER ABOUT SOMETHING.

If you’d like to comment out the previous temporary fix I gave you and try this proposed permanent one, we can check that it actually work without causing other problems elsewhere (there may be some reason I prioritized AskAboutImplicit over AskAbout in the past, even if I can’t now recall what it is or whether it’s likely to have been valid).

Yes, it appears to work.

With either priority = 45 or with your previous temp fix, here is the output…

With priority = 60 (default), & your previous temp fix removed…

I’ll also run through some complete conversations and see what happens there.