Custom Library Messages

version 28/100614 by David Fisher

  • Home page
  • Beginning
  • Previous
  • Next

  • Section: The Current Object

    In order to print the appropriate verb endings and so on, this extension
    must keep track of the current object (the player, the "%" object,
    the person doing the action, etc). Usually this is the last mentioned
    object in the message.

    However, sometimes a library message must refer to an object which has not
    yet been mentioned. It is possible to set the current object explicitly
    with "=>" (see below), but usually the extension can figure out which
    object was meant. For example:

        "[That's|they're] hardly portable."

    In this case, "[That's|they're]" is assumed to refer to the main object;
    it will print "That's" for singular or "They're" for plural.


        "Which [do] [you] mean, " ...

    In this case, "[do]" is assumed to refer to the player, and will print
    "do" or "does" as appropriate.

    To explicitly set the thing being referred to, the following commands
    may be embedded in the text (none of which actually print anything):

        "[=> %]"
        "[=> actor]" -- the person doing the action (usually the player)
        "[=> noun]" -- usually the same as "%"
        "[=> ...]" --- any other object, eg. "[=> the janitor]"

    For example:

        "[=> noun][That|those] seem[-s] to belong to [the % dobj]."

    (This is a rare case when "%" and "the noun" are two different objects).

    It is also possible to force the tense to be past or present (note that
    each "[=> present tense]" should have a matching "[=> default tense]").

        "[You] [=> present tense]need[-s][=> default tense] to be holding [the % dobj] before [you] can put [it|them] into something else."

    If it is ever necessary to print the current object explicitly, the symbol "$" may be used.
    This acts just like "%", so you can say:

        "[The $]"
        "[the $]"
        "[the $ dobj]"
        "[$ dobj]"