Custom Library Messages

version 28/100614 by David Fisher

  • Home page
  • Beginning
  • Previous
  • Next



  • Section: Before And After Library Messages

    Two "hooks" are provided to allow something to be done before and after
    a library message is printed:

        the before library messages rule
        the after library messages rule

    Note that Inform prints some kinds of text before library messages are
    printed; in particular, room names and descriptions. These cases may
    be handled using the standard Inform 7 rule books.

    During the "before library messages" rule, the special value
    "library-message-id" is set to the id of the message which is about to
    be displayed. This may be changed to another message id if desired.
    A "stop the action" command will also work here (but will only prevent
    a message from being printed, not the action from taking place).

    For example, to see the message id of each library message before it is printed:

        This is the id printing rule:
            say "{ [library-message-id] }[line break]"
        
        When play begins:
            change the before library messages rule to the id printing rule.