[Home] [Downloads] [Search] [Help/forum]

Building rooms and exits

There are three main commands for building rooms and exits:

@dig - create a room

Syntax:

@dig Room-name = Exit-to-room , Exit-from-room

or in more detail ...

@dig[/teleport] <name> [= <name>[;<other name>]*[,<name>[;<other name>]*]]

This creates a new room with the specified name and displays its number. This costs 10 pennies. If the "= <name>" option is used, the exit will be opened and linked for you. The ",<exit>" option will link a reverse exit for you.

If the "teleport" switch is supplied, the digger will be teleported into the new room automatically.

Examples:

Command Result
@dig Waterfall
Will dig a room called "Waterfall".
@dig/teleport Cave
Will dig a room called "Cave" and teleport you to it.
@dig Waterfall = West

Will dig a room called Waterfall, and open an exit called 'West' in your current room.
@dig Waterfall = West, East

Will dig a room called Waterfall, open an exit called 'West' in the current room, AND open an exit 'East' in the room 'Waterfall' leading to the current room.
@dig Waterfall = West;W, East;E

Will dig a room called Waterfall, open an exit called 'West' in the current room, AND open an exit 'East' in the room 'Waterfall' leading to the current room. The exit names "E" and "W" can be used in place of "East" and "West"

The ; symbol means that you may enter the exits by typing 'w', or 'e' also. Only the first Exit name is displayed in the Obvious exits list.


@open - create an exit

Syntax:

@open Exit-to-room-name = #Room-number , Exit-from-room

or in more detail ...

 @open <direction>[;<other direction>]* [=<number>][,<dir>[;<other dir]*]

This creates an exit in the specified direction(s). If <number> is specified, it is linked to that room. Otherwise, it is created unlinked. You or anyone else may use the '@link' command to specify where the unlinked exit leads. Opening an exit costs 1 penny. If you specify <number>, linking costs 1 more penny. If you specify a room, you may also specify an exit leading from that room back to the current room. This second back exit costs the same as the forward one.

Use "@open" when you already have a room created, but want to add an exit to go to it (and possibly from as well).

Examples:

Command Result
@open East
Creates an exit (in the current room) called East. It does not lead anywhere.
@open East = #88
Creates an exit (in the current room) called East. It leads to room number #88
@open East = #88,West
Creates an exit (in the current room) called East. It leads to room number #88. Also creates an exit in room #88 called West, leading to the current room.
@open East;E =#88,West;W
Creates an exit (in the current room) called East. It leads to room number #88. Also creates an exit in room #88 called West, leading to the current room. You can also use "E" instead of "East" and "W" instead of "West"

@link - change the destination of an exit

Syntax:

@link object = #Room-number

This sets the destination for an exit to be the nominated room number. For example:

@link East = #88

You can use the @link command to change the destination of a previously set-up exit.

You can also set up a "variable" exit, if you are a wizard, by using:

@link object = variable

If you do this, then you must set up a "DESTINATION" attribute on the exit. This attribute is evaluated at runtime to see where to send the player to.


Changing where an exit leads from

By using @link you change where an exit leads to, however to change where an exit leads from you must teleport that exit to the appropriate room.

For example, if you had an exit numbered #80, which currently leads from room #81, but you want it to lead from room #82 you would:

@teleport me = #81
@teleport #80 = #82

Describing your new rooms, and its exits

The rooms you create with the above commands are rather sparse. To make them more interesting you should describe the room, and its exits, by using the @desc command.

For example:

@desc here = You're at a low window overlooking a huge pit, which extends up out of sight. A floor is indistinctly visible over 50 feet below. Traces of white mist cover the floor of the pit, becoming thicker to the right. Marks in the dust around the window would seem to indicate that someone has been here recently. Directly across the pit from you and 25 feet away there is a similar window looking into a lighted room. A shadowy figure can be seen there peering back at you.

@desc east = A foreboding passage leads East.

@desc west = A low crawl over crumbling rocks leads West.


Changing the name of a room or exit

By using the @name command you can rename something.

For example:

@name here = Great Western Chasm

Putting locks on exits

Very frequently you will want to "lock" an exit. This prevents unconditional passage through that exit. As a simple example, say you want to prevent anyone passing through the "east" exit unless they are carrying an object called "key" ...

@lock east = +key

In addition to locks, you will probably want to put "success" and "failure" messages on your exits.

Locks and messages are described in the following pages.


[Previous] [Next] [Back] [Home]
Written by Nick Gammon - 5K

Comments to Gammon Software support

[Best viewed with any browser - 2K]    Internet Contents Rating Association (ICRA) - 2K    [Web site powered by FutureQuest.Net]

Page updated on Wednesday, 15 December 2004