prev| toc| next
 

Creating Rooms and Areas (cont'd)

Creating and Propping Exits:

To avoid leaving floating rooms lying about, it's a good idea to create the exits linking rooms immediately after @digging the rooms. As discussed in Section 2.3, exit names can include aliases: alternate names, separated by semi-colons, that can be used in place of the full name. The first alias is the one that will be shown by obvious-exits programs. A common and worthwhile convention is to set the first alias as a combination of the full name and a notation indicating valid abbreviated aliases.

And, since putting message props on exits is the kind of niggling detail that's easy to forget if you leave it to later, it's also a good idea to set the message props immediately after @opening the exits.

====================================
> @open West Wing <W>;west wing;west;w = #4804
  Exit opened with number 4805.
  Trying to link...
  Linked to Amberside Inn: West Wing(#4804R)
> @desc w = A sturdy wooden door leading to rooms on the west wing.
  Description set.
> @succ w = You pull open the door to the West Wing hallway...
  Message set.
> @osucc w = goes into the West Wing.
  Message set.
> @odrop w = comes in from the Tavern.
  Message set.
====================================

Exits are one way: in order to create a `door' between rooms, you need two exits, one leading in each direction. So, we complete the door between the Tavern and the West Wing by going to the West Wing and making another exit leading back to the Tavern. We gave the Tavern the registered name `ai', so it will be easy to link back to. But, if we had not done this, and the room's dbref had scrolled off the screen, we could determine it with the @find command.

====================================
> w
  You pull open the door to the West Wing hallway...
  Amberside Inn: West Wing(#4804R)
> @find tavern
  Amberside Inn: Tavern(#4802R)
  ***End of List***
  1 objects found.
> @open Tavern ;tavern;t;east;e = #4802
  Exit opened with number 4806.
  Trying to link...
  Linked to Amberside Inn: Tavern(#4802R)
> @desc t = A strong wooden door.
  Description set.
> @succ t = You open the door into the inn's tavern.
  Message set.
> @osucc t = goes into the Tavern.
  Message set. > @odrop t = comes out of the west hallway.   Message set.
> t
  You open the door into the inn's tavern.
  Amberside Inn: Tavern(#4802R)
====================================

We gave the exits user-friendly aliases, but the exits are not showing up at all when we look at the room. The server `look' command, and most user-created look programs as well, do not show obvious exit lists by default. In order to have such a list appended to our rooms' descriptions, we will need to set the @succ message on the rooms to trigger an obvious-exit programs. You will probably need to page a wizard or helpstaff member to determine the dbref or registered name of such a program. As discussed in Section 2.1.4, the dbref or regname of MUF programs triggered by message props need to be prefaced by an @ at-mark.

====================================
> l
  Amberside Inn: Tavern(#4802R)
> p jessy = Hiya... Can you tell me the dbref or regname of the
  obvious exits program?
  You page, "Hiya... Can you tell me the dbref or regname of the
  obvious exits program?" to Jessy.
  Jessy pages, "It's dbref #183... reg name $obvex."
> p = OK, thanks.
  You page, "OK, thanks." to Jessy.
> @succ here = @$obvex
  Message set.
> l
  Amberside Inn: Tavern(#4802R)
  Obvious Exits:
    West Wing <W>
====================================

We will need to set this @succ message on all rooms in the area for which we want obvious-exit lists.

prev| toc| top| next