Grouped Messages As Dialogue

version 1 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Example: ** "The Inquisitive Sort" - The NPC asks questions and accepts single noun replies by piggybacking on the parser's which-disambiguation abilities.

        "The Inquisitive Sort"

        Include Grouped Messages as Dialogue by Ron Newcomb. [ Use grouped messages as dialogue debugging.]

        The observer is usually Bob.

        The pet store is a room. Bob is a man in the pet store. Alice is a woman in the pet store. A collar and a brush are things in the pet store. Persuasion rule: rule succeeds. A pet carrier is a closed container in the pet store. The pet store contains a white puppy and a black puppy.

        Test me with "take brush/the puppy/drop all/take brush/collar/carrier/take brush/drop all/take brush/alice/take bob/drop all/take brush/no/no/ok/yes/drop all/take brush/yes/collar/no/yes".

        Table of library messages (continued)
      Message Id  
      LibMsg <ok>   

        Understand "ok" or "okay" as a mistake ("[run paragraph on][observe LibMsg <ok>][run paragraph on]").

        section 4 - Bob's errorbook

        Bob's error are an rulebook. Bob's error rulebook have default success. The observations of Bob is Bob's error rules. [ ACTIVITIES MUST COME FIRST ]
        
        Rule for Bob's error when asking which do you mean:
            say "'Which one, man? I got [a prepared list delimited in sequential style].'".

        Rule for Bob's error when the message of the game error is LibMsg <cannot take other people>:
            if the noun is Bob, say "Bob gives you a funny look.";
            otherwise say "Bob grins. 'Ah, ya'd have to ask her about that.'".

        Rule for Bob's error when the message of the game error is LibMsg <report player taking>:
            say "'[']ere ya go.' Bob hands you [the noun]. ";
            if ask "'Can ya think of anything ya might also need?'" expecting a thing except things carried by the player begin;
                No is the Said No To Need Anything Else rule;
                Yes is the Whazzat rule and ignored;
                now the verb word is "take";
            end if;
            say line break.

        This is the Whazzat rule: say "'OK, whazzat?'".

        this is the Said No To Need Anything Else rule:
            say "'Ya ready to check out then?'[line break]";
            Yes is the Price rule;
            No is the Not Ready To Check-Out rule.
        
        this is the Not Ready To Check-Out rule:
            say "'Well lemme or Alice know when ya are and we'll getcha taken care of, ok?'";
            reset yes and no.

        this is the Price rule: say "'[']at's $29.95.'".

        Rule for Bob's error when the message of the game error is LibMsg <ok>:
            say "Bob nods, and goes on to other tasks. ".