Phantasmal MUD Lib for DGD

Phantasmal Site > Phantasmal Tutorials > OLC > Exits

Basic Portables

You've done a fair bit with rooms, portables and maybe even a creature or two, but still you need to hook it all up with more interesting exits. Let's talk about how you can do that.

There are several interesting things about exits, so we'll hit them in no particular order.

Deferred Exits

Sometimes when you load a zone or other area, not every exit can resolve. For instance, there's a command called @load_rooms which will let you load just certain rooms from a zone. That can be useful when you're testing particular rooms. But if you load just a few specific rooms from a zone, then those rooms are going to have exits that lead to nowhere... When that happens, you get what are called "deferred" exits.

You can determine if you've got any of those wacky deferred exits by typing @check_deferred by itself on the command line. If you have some, you can type @add_deferred or @add_deferred_exits to resolve the deferred exits and make them appear as 'real' exits. Note that the rooms at both ends of the exit must exist for @add_deferred to work. If you can't resolve and add all your deferred exits, @add_deferred_exits will tell you so.

Old-style and New-style Exits

If you have some exits added the old way, with @new_exit, you'll want to convert them over to the new style. Simply type @fix_exits and all old-style exits should be painlessly and immediately converted.

Removing Exits

Sometimes you'd like to get rid of an exit you've already created. The command @clear_exits will delete every exit coming from this room. If you'd like to be more specific, you can type "@remove_exit <dir>" where dir is a direction like "northwest" or "sw" or "d". An exit in that direction will be removed.

One-way and Two-way Exits

You can use the @new_oneway_exit and @new_twoway_exit commands to make new-style one- or two-way exits. The syntax is like @new_exit -- "@new_<num>way_exit <dir> #<room num>". For instance, "@new_oneway_exit sw #344" would create a new one-way exit from this room, heading southwest, and ending in room #344. The two-way exit version would also create a return exit.

What's next? I'd vote for more tutorials. Everybody loves tutorials!