prev| toc| next
 

2.2 Overview: Rooms and the Environment Tree.

Rooms are objects created with the @dig command and having the type flag R.

The syntax for the @dig command is

    @dig <room> [=<parent> [=<regname>]]

The position of rooms —and the resulting `geography' of the MUCK — is determined in two ways. In addition to named exits creating the illusion of spatial relationships (e.g. having a room called `The Village Green' that can be reached by travelling West from `The Cove'), rooms exist in a hierarchical tree structure known as the `environment tree'. One can lead a rich VR life without ever needing to know about the MUCK's environment tree, but builders and administrators will profit from an understanding of how it works.

As an analogy, one might think of the rooms on a MUCK as numerous nested boxes. Room #0, the `global parent', would in our analogy be a large box containing all the other boxes... all the other rooms. Rooms inside #0 can also contain rooms: the boxes can contain other boxes, in an unending series. The boxes (rooms) can contain items (players, things, etc) as well as other boxes. A room that contains another room is said to be a `parent room'; a room contained in another room is said to be a `daughter room'. A given room can be contained in another and at the same time contain other rooms: in this case, the room is both a parent and daughter room. Intermediate rooms of this type are often called `environment rooms'. (Or, another analogy: rooms are like directories in a computer file system: the root directory is analogous to Room #0; environment rooms and rooms are analogous to directories and subdirectories within the root directory; players and objects in rooms are analogous to files in these directories.) Environment rooms are used to define areas of a MUCK and to provide commands or features that should only be available in certain areas (more on this below).

You can view the series of rooms containing the room you are located in by typing @trace here.

====================================
> @trace here
  Sinshe Village, by the Pier(#687RJ)
  Sinshe Parent Room(#635RA)
  Environment: Lowlands(#285RA)
  Rainforest Parent Room(#121RWA)
  Rainforest: Main Prarent(#118RA)
  Master Environment(#101RA)
  **Missing**
====================================

In this example, the administrators of the MUCK have carefully laid out a consistent, hierarchical environment tree. In addition to the `geographical position' of Sinshe Village, each room on the MUCK has a specific and meaningful place in the environment tree. The village pier is nested inside — or `parented to' — the Sinshe Parent Room (#635), which presumably contains all the rooms that make up the village of Sinshe. This room is in turn parented to Environment: Lowlands (#285), which would contain the parent rooms for all areas in the lowlands. The series continues up through rooms #121, #118, #101, and finally, room #0, which appears on this list as **Missing** (to mortals, rooms not set Abode and not controlled by them appear as **Missing** on a @trace; for security reasons, the global parent of a MUCK is usually not set Abode, and as a result the last item on the list will be **Missing**.)

In fact, not only rooms but all objects on a MUCK have a position in the environment tree. Exits are considered to be located in or on the object to which they are attached. Players and things are always located in a specific room or thing... but, unlike rooms and exits, they move around. The @trace command works on any object. If a player were holding an object called `paper sack', @trace paper sack would show the sack's current position in the environment tree.

====================================
> @trace paper sack
  paper sack(#5474)
  Jessy(#2WQJ)
  Sinshe Village, by the Pier(#687RJ)
  Sinshe Parent Room(#635RA)
  Environment: Lowlands(#285RA)
  Rainforest Parent Room(#121RWA)
  Rainforest: Main Prarent(#118RA)
  Master Environment(#101RA)
  **Missing**
====================================

A newly created room is parented to the first room above it that is set Abode, or the first room controlled by the player issuing the @dig command. If no rooms in the environment path meet one of these criteria, it is parented to Room #0. Keeping parent rooms set Abode will insure that new rooms are correctly parented: if Jessy stood on the pier and typed @dig Under the Pier, the new room would be correctly parented to Sinshe Parent Room(#635RA), the same parent as that of the pier proper.

prev| toc| top| next