Skip to main content

modify_exit

Discworld room help

modify_exit

Name

modify_exit - Change the settings of an exit.

Syntax

int modify_exit(string dir, mixed *settings);

Description

The modify_exit call is the call you use to change any settings about an exit to non-default values. The 'dir' is the handle onto the exit you wish to change and 'settings' is an array of the format:-


({ type1, param1, type2, param2 ... })

Each type has a single param, but there is no retriction on the size of the 'settings' array you can supply to the function, so it is possible to setup an exit's configuration completely with a single call.

Every type relates to a single property of an exit, these are listed in the tables below. All types are a string such as "locked", the form of the associated param value will depend on the type but the majority require only a single integer or string value. More complex param values are usually supplied as a mixed array.

Settings

The following table lists all the settings that modify_exit supports. It gives the type string and a brief description of what the setting controls. The table is split into a number of sections in order to group related setting types.

Settings that apply to all exit types

Exit settings

destThe room that the exit leads to.
sizeThe physical size of the exit.
obviousWhether the exit is included in the list of obvious exits.
relativeWhether the exit is displayed as a relative direction.
relative niceWhether the exit is displayed as a relative direction but still responds to compass directions.
no followWhether NPCs are prevented from following a person through the exit.
functionThe function to call when a person attempts to leave through the exit.
look funcThe function to call when a person attempts to look through the exit.
lookThe message printed to a person looking through the exit.
exit messThe message printed to the room when a person leaves through the exit.
exit_messSame as "exit mess", deprecated.
messageSame as "exit mess", deprecated.
enter messThe message printed to the destination room when a person leaves through the exit.
enter_messSame as "enter mess", deprecated.
enterSame as "enter mess", deprecated.
move messThe message printed to the person when moving through the exit.
follow messThe message printed to someone following a person through the exit.
linker messThe exit and enter room messages for the linker.
deltaThe relative x,y,z position delta of the destination room.
upgradeThe vertical distance up to the destination room.
downgradeThe vertical distance down to the destination room.
no mapWhether the exit should be excluded from maps.

Settings that apply only to exits with a door

Basic door settings

door nameThe internal reference-name of the door.
door shortThe short description of the door.
door longThe long description of the door.
double doorsWhether the door is composed of multiple parts and should be pluralised.
one wayWhether there isn't a door in the destination room that leads to this room.
otherThe exit id of the door in the destination room that leads to this room.
stuckWhether the door can't be opened, closed, locked or unlocked.
openWhether the door is open.
closedWhether the door is closed.
open/close funcThe function to call when an attempt is made to open or close the door.
secretSet the player perception bonus required for the door to be visible.
transparentWhether the door can be seen through when closed.
undoorA call to remove an existing door from an exit.

Lock settings

difficultyHow difficult the lock on the door is to pick.
lockedWhether the door is locked.
unlockedWhether the door is unlocked.
autolockWhether the door automatically locks when closed.
keyThe property name defined on valid keys for the door.
lock ownerThe name of the owner of the lock.
lock/unlock funcThe function to call when an attempt is made to lock or unlock the door.
add pick skillAdd a skill requirement for picking the the lock.
pick toolDefine a tool for picking the lock.

Trap settings

setup trapDefine a trap for the door.
trap armedWhether the trap is armed.
add trap skillAdd a skill requirement for disabling the trap.
trap toolDefine a tool for disabling the trap.
remove trapRemove the currently defined trap from the door.

More Detail & Examples

More detail on each of the modify_exit types along with examples are available in :-

help modify_exit_exitsSettings that apply to any exit.
help modify_exit_doorsSettings that require a door type exit.
help modify_exit_locksSettings that are related to locks on doors.
help modify_exit_trapsSettings that are related to traps on doors.

See also

add_exit, remove_exit