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
dest | The room that the exit leads to. | |
size | The physical size of the exit. | |
obvious | Whether the exit is included in the list of obvious exits. | |
relative | Whether the exit is displayed as a relative direction. | |
relative nice | Whether the exit is displayed as a relative direction but still responds to compass directions. | |
no follow | Whether NPCs are prevented from following a person through the exit. | |
function | The function to call when a person attempts to leave through the exit. | |
look func | The function to call when a person attempts to look through the exit. | |
look | The message printed to a person looking through the exit. | |
exit mess | The message printed to the room when a person leaves through the exit. | |
exit_mess | Same as "exit mess", deprecated. | |
message | Same as "exit mess", deprecated. | |
enter mess | The message printed to the destination room when a person leaves through the exit. | |
enter_mess | Same as "enter mess", deprecated. | |
enter | Same as "enter mess", deprecated. | |
move mess | The message printed to the person when moving through the exit. | |
follow mess | The message printed to someone following a person through the exit. | |
linker mess | The exit and enter room messages for the linker. | |
delta | The relative x,y,z position delta of the destination room. | |
upgrade | The vertical distance up to the destination room. | |
downgrade | The vertical distance down to the destination room. | |
no map | Whether the exit should be excluded from maps. |
Settings that apply only to exits with a door |
Basic door settings
door name | The internal reference-name of the door. | |
door short | The short description of the door. | |
door long | The long description of the door. | |
double doors | Whether the door is composed of multiple parts and should be pluralised. | |
one way | Whether there isn't a door in the destination room that leads to this room. | |
other | The exit id of the door in the destination room that leads to this room. | |
stuck | Whether the door can't be opened, closed, locked or unlocked. | |
open | Whether the door is open. | |
closed | Whether the door is closed. | |
open/close func | The function to call when an attempt is made to open or close the door. | |
secret | Set the player perception bonus required for the door to be visible. | |
transparent | Whether the door can be seen through when closed. | |
undoor | A call to remove an existing door from an exit. |
Lock settings
difficulty | How difficult the lock on the door is to pick. | |
locked | Whether the door is locked. | |
unlocked | Whether the door is unlocked. | |
autolock | Whether the door automatically locks when closed. | |
key | The property name defined on valid keys for the door. | |
lock owner | The name of the owner of the lock. | |
lock/unlock func | The function to call when an attempt is made to lock or unlock the door. | |
add pick skill | Add a skill requirement for picking the the lock. | |
pick tool | Define a tool for picking the lock. |
Trap settings
setup trap | Define a trap for the door. | |
trap armed | Whether the trap is armed. | |
add trap skill | Add a skill requirement for disabling the trap. | |
trap tool | Define a tool for disabling the trap. | |
remove trap | Remove 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_exits | Settings that apply to any exit. | |
help modify_exit_doors | Settings that require a door type exit. | |
help modify_exit_locks | Settings that are related to locks on doors. | |
help modify_exit_traps | Settings that are related to traps on doors. |