ConnectThe Universe

Claim Building on CrystalMUSH: Exit Guidelines

The guidelines for building exits that are set out in 'news building' on CrystalMUSH also apply to exits on claims:

Every exit should have several aliases.

Exit names that are made of multiple words should be the first name of the exit list, as this is the name that will appear in the Obvious exits list on the room. Use spaces in the name. One of the aliases should be made up of the first letter of each of the words in the name.

Cardinal directions like "north" and "southwest" must offer aliases such as "n" and "sw"; "up" and "down" must also provide "u" and "d".

Don't use "h", "i" or "l" in your alias list; many people use these as MUSH commands.

Every room should have an out exit, which should lead towards the main entrance, unless there's a good reason for it not to. (Add "out;ou;o" to the name of one of the exits.) It's helpful to add "exit", "back" and "leave" as well.

Maps should make logical sense. If you go east to get into a room, you should be able to go west to get out of it.


You can rename an exit to add additional aliases using the @name command. The command (where <exit> is the name or dbref of the exit and <alias list> is the list of aliases, separated by semi-colons) is:

@name <exit> = <alias list>


For example:

@name #8689 = Narrow Ledge;nl;ledge;ledg;led;up;u;climb


Exits should have @descs (descriptions), @succ's (what the character sees when he or she passes through an exit, @osucc's (what other characters in the room see when a character leaves the room through an exit), and @odrop's (what characters in the destination room see when a character passes through an exit). It is also desirable to set the @odesc (what other people in the room see when someone looks at an exit).

Here is how the code might be set up on an exit:

@desc <exit> = The path winds upward through the trees and scrub.

@succ <exit> = You pick your way through the trees up to the plateau.

@osucc <exit> = picks %p way through the trees up to the plateau.

@odrop <exit> = arrives breathless and sweating from the valley below.

@odesc <exit> = looks for a safe path back up to the plateau.


(The %p is a possessive pronoun, which becomes "his" if the character going through the exit is male, "her" if female, and "its" if the character has nothing set in its @sex attribute. %o is the objective pronoun (him/her/it), and %s is the subjective pronoun (he/she/it). The capitalized forms %P, %O and %S return the same pronouns, but with the first letter capitalized.)


You can hide an exit so that it is not readily obvious (i.e., doesn't appear in the Obvious exits list for a room). Refer to "Hidden Exits".


There are a number of locks that can be set on exits so that characters can only go through under certain circumstances. One of the most common locks is to an object, so that only a character who is carrying that object can pass through the exit. Two common objects are the Katz lamp and climbing equipment, which Singers can purchase from the Equipment Room at JPF. For instructions on locking to these objects or others, refer to "Locking an Exit to an Object".

Another common lock is to a command, so that a specific command or phrase must be typed to open it. This is explained in "Locking an Exit to a Command". And you can lock an exit to Lequoal's Tide Master, so that a Singer is unable to pass through the exit during certain phases of the tide. Refer to "Locking an Exit to the Tides".

If there is a chance that a character cannot pass through the exit (i.e., it is locked to an object or command), the @fail (what the character sees when he or she tries to go through the exit and fails) and @ofail (what other characters in the room see when a character tries to go through an exit and fails) attributes should be set as well. Examples of these attributes are given in "Locking an Exit to the Katz Lamp".


Injury code and other traps are usually set up on exits. It is polite to give people some kind of warning that an exit is potentially treacherous. You don't have to actually tell them that they're going to break their leg, but something to the effect of "It looks dangerous." in the @desc will at least let them think twice about going through it. Refer to Puzzles and Pitfalls.


A list of the dbrefs of all of the exits in your claim should be included on your master claim object in the &exit-list attribute. Refer to "Registers to Include on your Master Claim Object", in Getting Started.

Finally, all exits (like rooms) should pass +check and +spell. Refer to Finishing Up for more information on how to use these tools.

 

Hidden Exits

Sometimes you don't want the name of an exit to appear in the Obvious exits list for a room. For example, you might have some bushes that are described in the local description of the room, but you want the Singer to have to look at the bushes before realizing they hide an exit.

To prevent an exit from appearing in the Obvious exits list, you must set the exit to dark:

@set <exit> = dark


The exit's description will still be visible if it is now looked at, but it won't be listed as an Obvious exit.

 

Locking an Exit to an Object

By locking an exit to an object, only a character carrying that object will be able to pass the lock and go through the exit. The most common objects that an exit is locked to are the Katz lamp and climbing equipment, both of which are available for purchase from a vendor in the Equipment Room, off the Hangar at JPF. These are discussed separately below.

Remember to add @fail and @ofail attributes to the exit, since anyone who doesn't pass the exit's lock should receive these messages. For example, if you'd locked an exit to the Katz Lamp, you might set up something like this:

&fail <exit> = You take one look at that dark cave, and quiver in fear. There's no way you're going in there without light!

&ofail <exit> = takes one look at the cave entrance, and backs away.


Remember to mention the locked exit in the &note attribute of your master claim object. Refer to "Registers to Include on your Master Claim Object", in Getting Started. The exit does not have to be wiz-owned.


You can also lock an exit to an object so that the character will be able to pass through the exit, but if they do not pass the object lock they will be injured. Refer to "Injuring Someone Who Does Not Pass an Object Lock" in Puzzles and Pitfalls.

Locking an Exit to the Katz Lamp

To lock an exit to the Katz Lamp master (#3987) so that only a character who is carrying the lamp, and has it turned on, will be able to go through:

@lock <exit> = @#3987 & +status:active


In this case, the lamp's &status attribute must be set to "active" in order for the character carrying it to pass the exit lock. This is achieved by issuing the command 'lamp on' while carrying the lamp.


Locking an Exit to the Climbing Equipment

To lock an exit to the climbing equipment master (#8316) so that only a character who is carrying the gear and has issued the commands to wear and secure it will be able to go through:

@lock <exit> = @#8316 & +status1:worn & +status2:secured


In this case, the equipment's &status1 attribute must be set to "worn" and the &status2 attribute must be set to "secured" in order for the character carrying it to pass the exit lock. This is achieved by issuing the commands 'wear harness' and 'secure line' while carrying the equipment.

 

Locking an Exit to a Command

Another common method of locking an exit is to lock it to a command. For example, you may have an exit called "Narrow Crack" that is hidden until a command is issued to push a boulder out of the way. Until the Singer issues the command 'shift boulder', you don't want him or her to be able to see the exit's name on the Obvious exits list, or to go through it.

In order to do this, you will want to have Narrow Crack set to dark and locked to #0 (the Lobby of Shankill Station) every time the claim is reset. This is done by setting the &reset attribute on your master claim object. You will need the dbref of the exit:

&reset <master> = @set <exit dbref> = dark; @lock <exit dbref> = #0


If the dbref of Narrow Crack is #2575, for example:

&reset <master> = @set #2575 = dark; @lock #2575 = #0


On the Narrow Crack exit itself, you will have to set the &fail and &ofail attributes, because even though the Singer can't see the name of the exit on the Obvious exits list, they can stumble upon it in other ways (when stumped, a common Singer trick is to try "l a", "l b", "l c" through the entire alphabet until they see the description of an exit):

&fail <exit> = You try to squeeze through a crack, but it is far too narrow for you to make it.

&ofail <exit> = tries to squeeze through a crack, but it is far too narrow for %s to make it.


Finally, you want a way for the Singer to move the boulder out of the way, so they can get through the exit. In this case, the Singer must type the command shift boulder. This will unlock the exit, set the exit to !dark (so it shows up in the Obvious exits list), and notify both the character performing the action and the people watching that the action has succeeded. The code is set on the room itself:

&shift_boulder <room> = $shift boulder:@pemit %# = You brace yourself against the boulder, and push with all your might, revealing a narrow crack in the wall!; @oemit %# = %N pushes against the boulder with all %p might, revealing a narrow crack in the valley wall!; @set <exit> = !dark; @unlock <exit>


The @pemit statement is emitted to the character who issues the "shift boulder" command. The @oemit statement is emitted to everyone else in the room. (%# returns the dbref of the character issuing the command, and %N returns the character's name.) @set <exit> = !dark allows the exit to appear in the Obvious exits list, and @unlock <exit> allows people to pass through the exit.

Remember to mention the locked exit and reset code in the &note attribute of your master claim object. Refer to "Registers to Include on your Master Claim Object", in Getting Started.

 

Locking an Exit to the Tides

If you have a seaside claim and you want to do something really nefarious, try this bit of code courtesy of Seth Graham. (If you fall victim to this trap, hunt down Crystal Singer Shane Demrie!) It locks the exit to the tide object and takes into account both the level of the tide and its direction. If the tide is high, the Singer will not be able to pass through the exit. If the tide is between high and low ("medium"), the Singer can pass through the exit only if the tide is also going out. If the tide is low, the Singer can pass through without difficulty.

In order to determine the level and direction of the tide, we need to get this information from Lequoal's Tide Object, #3527. The level is retrieved using [u(#3527/tide_level)] (which returns "high", "medium" or "low"), and the direction is retrieved using [u(#3527/tide_direc)] (which returns "in" or "out").

The first step is to set up a &check_tide attribute on the exit, which will determine the current state of the tide (one of: high_in, high_out, medium_in, medium_out, low_in and low_out), and use a switch statement to set its value to either 0 or 1. The Singer will only be able to pass through the exit if the switch statement returns a 0.

&check_tide <exit> = [switch([u(#3527/tide_level)]_[u(#3527/tide_direc)], medium_in, 1, medium_out, 0, high_in, 1, high_out, 1, low_in, 0, low_out, 0, 0)]

In order to lock the exit to its &check_tide attribute, use:

@lock <exit> = CHECK_TIDE/0


Because the Singer may not be able to pass through the exit, depending on the tides, both @succ and @fail messages must be set up on the exit. For example:

@succ <exit> = You squish your way out through the narrow exit to the cavern, blinking as the change in light attacks your eyes.

@osucc <exit> = squishes %oself out through the narrow exit to the cavern, %p footsteps making soft crunching noises in the gravel just outside.

@odrop <exit> = appears from within a narrow 'opening' perhaps twenty paces south of the large crevice.

@fail <exit> = The tide is far to high to even consider moving out onto the beach for any length of time. Good thing a Singer's sled is mostly waterproof... those waters are inching pretty high up on the beach.


Finally, Seth used the [u(#3527/tide_level)]_[u(#3527/tide_direc)] combination on the exit's @desc, so that the description of the exit also depends on the state of the tide:

@desc <exit> = [v([u(#3527/tide_level)]_[u(#3527/tide_direc)])]

&high_in <exit> = Even the smallest waves ooze their way in through the narrow entrance to this cavern, making any desires to leave through the same exit fanciful ones.

&high_out <exit> = Though they're obviously receding, the waves that press against the narrow entrance to the cavern are still far too high to allow anyone to exit directly onto the beach.

&medium_in <exit> = Peering out the narrow crack, some of the larger waves seem to be offering serious threats about submerging this cave once the tide is in fully.

&medium_out <exit> = Sluggish, receding waves just a few yards outside the cliffs hint the threat of this grotto being submerged is diminishing, labelling this cavern as safe for another day.

&low_in <exit> = The waves rest far down the beach, though it does seem that they are creeping ominously closer to submerging this cave.

&low_out <exit> = Far away from the base of the cliffs rests the sluggish rolls of waves on the shore, hinting this area will be staying dry for quite a while.


Remember to mention the locked exit in the &note attribute of your master claim object. Refer to "Registers to Include on your Master Claim Object", in Getting Started. The exit does not have to be wiz-owned.

Next step: Puzzles and Pitfalls »