Grouped Messages As Dialogue

version 1 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 2 - Which Do You Mean as Dialogue - written by Emily Short

    Definition: a thing is parselist-fitting if it fits the parse list.

    Rule for asking which do you mean:
        if message of game error is LibMsg <no error>, set game error to LibMsg <which disambiguation>;
        if answering the NPC is changing phase begin; [ setting up the parser for a third go]
            now answering the NPC is ready for answer;
            rule succeeds;
        end if;
        prepare a list of parselist-fitting things;
        if using grouped messages as dialogue debugging option, say "// Asking which do you mean with [the number of filled rows in the table of scored listing in words] nouns";
    [ if using grouped messages as dialogue debugging option, say "// Asking which do you mean, [the prepared list delimited in disjunctive style]."; [ CAN ONLY PRINT THIS LIST ONCE! ] ]
        abide by the current errorbook;
        [say "'Which one, man? I've got [a prepared list delimited in sequential style].'"]

    To decide whether (N - an object) fits the parse list: (- (FindInParseList({N})) -)

    Include (-

    [ FindInParseList obj i k marker;
        marker = 0;
        for (i=1 : i<=number_of_classes : i++) {
            while (((match_classes-->marker) ~= i) && ((match_classes-->marker) ~= -i)) marker++;
            k = match_list-->marker;
            if (k==obj) rtrue;
        }
        rfalse;
    ];

    -).