external next up previous contents index
Next: Dealing with exits Up: 4.2 Rooms and exits Previous: 4.2 Rooms and exits

Basic digging


Creating rooms and exits with @dig

There are several commands for building rooms and exits, of which you need to know at least @dig. Here is the definition from the help system of TECFAMOO:  

>help @dig
Syntax:  @dig "<new-room-name>"
         @dig <exit-spec> to "<new-room-name>"
         @dig <exit-spec> to <old-room-object-number>

This is the basic building tool.  The first form of the command
creates a new room with the given name.  The new room is not connected
to anywhere else; it is floating in limbo.  The @dig command tells you
its object number, though, so you can use the @move command to get
there easily.

The second form of the command not only creates the room, but one or
two exits linking your current location to (and possibly from) the new
room.  An <exit-spec> has one of the following two forms:


where the first form is used when you only want to create one exit,
from your current room to the new room, and the second form when you
also want an exit back, from the new room to your current room.  In
any case, the <names> piece is just a list of names for the exit,
separated by commas; these are the names of the commands players can
type to use the exit.  It is usually a good idea to include explicitly
the standard abbreviations for direction names (e.g., 'n' for 'north',
'se' for 'southeast', etc.).  DO NOT put spaces in the names of exits;
they are useless in MOO.

The third form of the command is just like the second form except that
no new room is created; you instead specify by object number the other
room to/from which the new exits will connect.

NOTE: You must own the room at one end or the other of the exits you
create.  If you own both, everything is hunky-dorey.  If you own only
one end, then after creating the exits you should write down their
object numbers.  You must then get the owner of the other room to use
@add-exit and @add-entrance to link your new exits to their room.

    @dig "The Conservatory"

creates a new room named "The Conservatory" and prints out its object

    @dig north,n to "The North Pole"

creates a new room and also an exit linking the player's current
location to the new room; players would say either 'north' or 'n' to
get from here to the new room.  No way to get back from that room is

    @dig west,w|east,e,out to "The Department of Auto-Musicology"

creates a new room and two exits, one taking players from here to the
new room (via the commands 'west' or 'w') and one taking them from the
new room to here (via 'east', 'e', or 'out').

    @dig up,u to #7164

creates an exit leading from the player's current room to #7164, which
must be an existing room.

Common mistakes and hints:

Beginners often do the following: They create a a room like ``Snow Castle'' with a command like:

>@dig enter|out to Snow Castle
Snow Castle (#7164) created
Next they create another room
 @dig garden|office to Lovely Garden
Next they go to the second room created (``Lovely Garden'' here) and try to dig an exit into the first room by typing:
>@dig enter|out to Snow Castle
Snow Castle (#8545) created
This will create a second room called ``Snow Castle''. If you want to dig into a room that exists already, you have to use room object numbers like this:
  @dig enter|out to #7164

Also, don't use exit names containing more than one single word because the @dig command AND the users will get confused if you don't type it right. Here is an example that demonstrates the principle:

>@dig drown under | "swim to shore" to sea
Usage:  @dig <new-room-name>
    or  @dig <exit-description> to <new-room-name-or-old-room-object-number>

>@dig "drown under" | "swim to shore" to sea
Usage:  @dig <new-room-name>
    or  @dig <exit-description> to <new-room-name-or-old-room-object-number>

>@dig "drown under"|"swim to shore" to sea
sea (#3951) created.
Exit from beach (#1442) to sea (#3951) via {"drown under"}
 created with id #1780.
Exit from sea (#3951) to beach (#1442) via {"swim to shore"}
 created with id #4346.

>drown under
I don't understand that.
>go drown under
You can't go that way (drown).
>go "drown under"
You see nothing special.
Obvious Exits: Swim to shore (to beach).

Daniel K. Schneider
Thu Apr 17 12:43:52 MET DST 1997