Grouped Messages As Dialogue

version 1 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 1 - Errors As Dialogue

    [ ACTIVITIES MUST COME FIRST in rulebooks!]

    Use grouped messages as dialogue debugging translates as (- Constant DEBUG_GROUPED_MSGS_AS_DIALOGUE; -).

    The default errors are a rulebook.
    The default errors have default success.
    First default errors rule: if using grouped messages as dialogue debugging option, say "// Parser error holds a [parser-error in words]"; continue the action.
    Last default errors rule (this is the Setup For I6 Call rule): if using grouped messages as dialogue debugging option, say "// Consulting Inform6 for messages for [message of game error]"; rule fails.

    A person has a rulebook called observations. The observations of a person is usually the default errors rulebook. The observer is a person that varies.

    The observer finder rules are a rulebook.
    A rule for observer finder (this is the Consult Character's Errorbook rule):
        if observer is nothing begin;
            if using grouped messages as dialogue debugging option, say "// 'Observer Finder' can't consult 'observer' for [message of game error]: 'observer' is Nothing";
            continue the action;
        end if;
        if using grouped messages as dialogue debugging option, say "// 'Observer Finder' consults [observer]'s '[observations of the observer]' for [message of game error]";
        abide by the observations of the observer.
    Last observer finder rule (this is the Consult Default Errorbook rule):
        if using grouped messages as dialogue debugging option, say "// 'Observer Finder' consults the default errors rulebook for [message of game error]";
        abide by the default errors rulebook.

    The current errorbook is a rulebook that varies. The current errorbook is usually the observer finder rulebook.

    To say consult the/a/an/-- (code - a rule): abide by the code.


    Before clarifying the parser's choice:
        if using grouped messages as dialogue debugging option, say "// Clarifying the parser's choice";
        now cull inform default messages is 1;
        consider the current errorbook;
        if the rule failed, now cull inform default messages is 0.

    Rule for clarifying the parser's choice when cull inform default messages is 1: if using grouped messages as dialogue debugging option, say "// 'Errors As Dialogue' skipping normal Clarifying the Parser's Choice processing"; do nothing.

    After clarifying the parser's choice: now cull inform default messages is 0.



    To decide which number is the parser-error: (- etype -).
    To decide whether the/-- parser error is did not make sense in this context: (- (etype == ASKSCOPE_PE) -). [ missing parser error ]

    [

    deprecated code, but I won't delete in case I need it again.

    Before printing a parser error:
        if parser-error is 1, set the game error to LibMsg <command not understood>; [when the parser error is didn't understand: ] ["I didn't understand that sentence."]
        if parser-error is 2, set the game error to LibMsg <command partly understood>; [when the parser error is only understood as far as:] ["I only understood you as far as wanting to "]
        if parser-error is 3, set the game error to LibMsg <number not understood>; [when the parser error is didn't understand that number] ["I didn't understand that number."]
        if parser-error is 4, set the game error to LibMsg <unknown object>; [when the parser error is can't see any such thing] ["You can't see any such thing."]
        if parser-error is 5, set the game error to LibMsg <command incomplete>; [when the parser error is said too little] ["You seem to have said too little!"]
        if parser-error is 6, set the game error to LibMsg <object not held>; [when the parser error is aren't holding that: ] ["You aren't holding that!"]
        if parser-error is 7, set the game error to LibMsg <verb cannot have multiple objects>; [when the parser error is can't use multiple objects:] ["You can't use multiple objects with that verb."]
        if parser-error is 8, set the game error to LibMsg <too many multiple objects>; [when the parser error is can only use multiple objects] ["You can only use multiple objects once on a line."]
        if parser-error is 9, set the game error to LibMsg <pronoun not set>; [when the parser error is not sure what it refers to:] [I'm not sure what {the pronoun} refers to.]
        if parser-error is 10, set the game error to LibMsg <excepted object not included anyway>; [when the parser error is excepted something not included:] [You excepted something not included anyway!]
        if parser-error is 11, set the game error to LibMsg <verb cannot have inanimate object>; [when the parser error is can only do that to something animate:] [You can only do that to something animate.]
        if parser-error is 12, set the game error to LibMsg <unknown verb>; [when the parser error is not a verb i recognise:] [That's not a verb I recognize.] [NOTE the code is always S, but may print a Z for American dialect ]
        if parser-error is 13, set the game error to LibMsg <unimportant object>; [when the parser error is not something you need to refer to:] [That's not something you need to refer to in the course of this game.]
        if parser-error is 14, set the game error to LibMsg <pronoun absent>; [when the parser error is can't see it at the moment: ] ["You can't see {the pronoun} ([the main object]) at the moment."]
        ; [ sometimes <pronoun absent> will change itself to <pronoun not set> instead ]
        if parser-error is 15, set the game error to LibMsg <command badly ended>; [when the parser error is didn't understand the way that finished:] [I didn't understand the way that finished.]
        if parser-error is 16, set the game error to LibMsg <not that many available>; [when the parser error is not enough of those available:] ["None/Only [the number understood] of those is/are available."]
    [(address) pronoun_word,]
        if parser-error is 17, set the game error to LibMsg <no objects available>; [when the parser error is not enough of those available: ] ["There are none at all available!"]
        ; [ sometimes <no objects available> will change to <zero multiple objects> instead ] [when the parser error is nothing to do:] ["Nothing to do!"]
        if parser-error is 18, set the game error to LibMsg <noun out of context>; [when the parser error is did not make sense in this context:] ["That noun did not make sense in this context"]
        if parser-error is 19, set the game error to LibMsg <empty line>; [when the parser error is i beg your pardon:] ["I beg your pardon?"]
        if using grouped messages as dialogue debugging option, say "// 'Errors As Dialogue' attempting parser error processing for #[parser-error]: [message of game error]";
        now cull inform default messages is 1;
        consider the current errorbook;
        if the rule failed, now cull inform default messages is 0.
    ]

    I6 error bug workaround is a truth state that varies. I6 error bug workaround is usually false.

    [ There's a bug in I6 file parserm.inf line 2000 that prints some stuff right there instead of putting that little routine inside L__M routine where it can be overridden properly. ]
    Before printing a parser error when parser error is only understood as far as:
        set the game error to LibMsg <command partly understood>;
        if using grouped messages as dialogue debugging option, say "// 'Errors As Dialogue' attempting parser error processing for [message of game error]";
        now cull inform default messages is 1;
        consider the current errorbook;
        if the rule failed, now cull inform default messages is 0;
        now I6 error bug workaround is true.

    [ There's a bug in I7 that does not express this parser error. ]
    Before printing a parser error when parser error is did not make sense in this context:
        set the game error to LibMsg <noun out of context>;
        if using grouped messages as dialogue debugging option, say "// 'Errors As Dialogue' attempting parser error processing for [message of game error]";
        now cull inform default messages is 1;
        consider the current errorbook;
        if the rule failed, now cull inform default messages is 0;
        now I6 error bug workaround is true.

    [ These two lines are needed in order to finish the processing of the above two paragraphs ]
    Rule for printing a parser error when cull inform default messages is 1 and I6 error bug workaround is true: if using grouped messages as dialogue debugging option, say "// 'Errors As Dialogue' skipping normal parser error processing for [message of game error]"; do nothing.

    After printing a parser error: now cull inform default messages is 0; now I6 error bug workaround is false.