Default Messages

version 3 by Ron Newcomb

  • Home page
  • Beginning
  • Next



  • Documentation


    This extension allows the author to replace the many bits of prose that exist inside Inform 7. It is done by continuing a table, Custom Library Messages, like so:
        Table of custom library messages (continued)
        library-action library-message-id library-message-text
        -- 10 "I beg your pardon, but I didn't catch your drift."
        going action 2 "You can't go [noun] from here."


    The first column holds the action to which the message applies, or if the message comes from some other place, a blank entry. Because each action has multiple messages (roughly one per rule), the second column holds a number that selects which. An action's messages are typically numbered from 1 on up. To see which number a particular message is, we can be alerted when the message happens.
        Use library message alerts.

    This gives something like the following transcript.
        > TAKE PILLOW
        { taking action #1 }
        
        Taken.
        
        > TAKE A NAP
        { library message #30 }
        
        You can't see any such thing.
        
    We then add to the table as appropriate. If the action within the curly braces is "library message", then we use the -- blank entry in the action column.
        Table of custom library messages (continued)
        library-action library-message-id library-message-text
        taking action 1 "You've always wanted [a noun]."
        -- 30 "I don't know the word '[the misunderstood word]'."

    It is worth mentioning that once we replace a default message, the use option will no longer alert us when it's used. Thus, when our first readers give us a transcript of their experience, we can search the transcript for the # hash or } brace characters to quickly find what defaults have not yet been replaced. Furthermore, alerts are always turned off in a release build, just in case the option is long forgotten when it comes time to publish.

    There's a few variables that come in handy for certain messages. "The noun" and "the second noun" are of course available, as is "the number understood" and similar. The others are:
        the person asked -- we cannot use "the actor" within our table, but this is identical.


        library message verb -- this would be "take" for the taking action, "go" for the going action, etc. (More precisely, it is the entire command predicate typically used in "What do you want to take?")


        library message pronoun -- when our reader uses a pronoun, this is the pronoun she used.


        pronoun reference object -- the noun that the above pronoun refers to.


        library message object, second library message object, library message amount -- effectively synonymous with the noun, the second noun, and the number understood for non-action messages.


        library message action, library message number -- these are the variables that are compared to our two table columns. The first differs from the library message verb in that it has the present participle ("taking") rather than the root form ("take"). For actions which take two nouns, the preposition is also included ("giving it to").


    A final note on line breaks: usually the extension guesses correctly, but for those cases where it adds an extra, the say phrase "[ignore library line break]" should cure it. (This can be mixed-n-matched with the normal "[run paragraph on]" if need be.)

        Table of custom library messages (continued)
        library-action library-message-id library-message-text
        -- 35 "I see nothing that '[library message pronoun]' could possibly refer to."
        going action 2 "I don't think [library message action] [noun] from here is possible."
        -- 49 "Which will you [library message verb]?"
        giving it to action 2 "You put [the noun] into your other hand."
        -- 50 "You've [if library message amount > 0]gained[otherwise]lost[end if] [library message amount in words] point[s][ignore library line break]"