Logged in as Nobody

Vote for Us

Epitaph Help

Categories

Concepts Creator Commands Creator Tutorials Games Innate Commands Known Commands
Lord Npc Objects Playtesters Rooms Rules

Modify Exit

Syntax

int modify_exit(string dir, mixed *arr);

Description

The modify_exit call is the call you use to change any parameters about an exit that are not as you have specified with your default. The dir is the handle onto the exit you wish to change and the array is an array of the format ({ type1, param1, type2, param2 ... })

The types are from a table given below and the parameter depends on the type. With this function you can change all of the settings of exits: the messages sent when you enter and leave the room, all of the door settings, and so on.

Shortcuts for Particular Bits

$r - query_pronoun() - he/she/it, or they when two or more objects move at once.

$o - query_objective() - him/her/it, or them when two or more objects move at once. Also himself/herself/itself, or themselves.

$p - query_possessive() - his/her/its, or their for two or more objects.

So for some silly examples:

$N climb$s out of the hole and dust$s the dirt off $p clothes.

-> Taffyd climbs out of the hole and dusts the dirt off his clothes.

-> Taffyd and Womble climb out of the hole and dust dirt off their clothes.

Here's a more slightly tricky example which still requires $V$0= to get the correct verb conjugation:

$N fall$s from the sky, landing awkwardly on $p $V$0=leg,legs$V$ before picking $oself up.

-> Taffyd falls from the sky, landing awkwardly on his leg before picking himself up.

-> Taffyd and Womble fall from the sky, landing awkward on their legs before picking themselves up.

exit mess This is the message that is printed when the person exits the room using this exit. The string should have a $N in it somewhere, eg. "$N womble$s carefully through the tight hole.". $N is replaced with the short(s) of the object(s) exiting. $F and $T are replaced with the "from" and "to" exit names. $s can be used to change verbs when multiple objects leave at the same time. You do not need a \n on the end, but you do need a . if you wish to have one. There's an old legend that the string must begin with a dummy character, but I've never seen a need for it.
message An older name for "exit mess".
exit_mess A misspelled "exit mess". :)
enter mess The message printed in the destination room when you go through the exit. The enter message should be set as a two element array or a string. The first part of the array is a number specifing if the exit message should have $F expansion done on the string or not. If it is set to 0 it does. The other element of the array is the enter string. If only a string is given, the first element of the array is assumed to be 1. Like "exit mess", legend says this needs a leading pad character, but it seems to work fine without it.
enter An old name for "enter mess".
enter_mess A misspelled "enter mess". :)
move mess This parameter is a string that is given to the player when moving through the exit. It should have a \n at the end, since none is added automatically. No $ expansion is done.
linker mess This parameter is an array of two strings, the first of which is an exiting message and the second of which is an entering message. They are the messages given to the linked area when someone uses that exit. Marketplaces and such should provide examples of this for exits to non-linked areas e.g. stalls. The following replacement is done: $N - the person's a_short, $A - the area name, $D - the direction, $P - the dynamic preposition (?), $S - the static preposition (??).
follow mess A string (trailing '.' not needed) that is printed to the follower only, when they follow someone through the exit; in the form 'You follow Aquilo <follow mess>.' (or similar fail messages such as 'You are too tall to follow Aquilo <follow mess>.').
function This is a function that is called whenever someone leaves the room using that exit. This should return 0 if the player was not able to leave through the exit and 1 if he was. The function can have several formats. If it is a string it calls the function of that name on the room; if it is an array it calls the function specified in the second element (string) on the object specified in the first element (eg: ({ object, func })). Function pointers also work. Please also read help exit_function.
size The size of an exit will be used by various items around the mud to see if they can fit through the exit. Mostly it was intended for use by things like horses, so you can't walk your horse around inside a house or a tight corridor. The size can also be set to a function, if it is a string or an array it is called every time the size the queryed.
obvious This sets whether the exit is obvious or not. If it is obvious people can see it in the obvious exits description, otherwise it is not shown in this. Set to 1 to make it show up, and 0 to not make it show up. It defaults in most cases to 1. The obvious flag can also be set to a function. If it is not a integer, but a string or an array it calls the function specified in a similar fashion to the "function" type.
dest The destination room of the exit. Remember to remove the .c at the end of the filename, or doors will tend to break, badly:).
open This is used with doors. It sets whether the exit is open or closed.
locked This is also for use with doors. It sets whether the exit is locked or not.
unlocked Seemingly the same as the locked type, except if the integer parameter is 1 the door will be unlocked, and if it is 0 the door will be locked.
autolock This will make a door automatically lock when it is closed.
key This is the property used to identify the key. If an object returns non zero from the query_property call using the parameter as a property name, the person is allowed to unlock the door. The exit function for the door checks the entire inventory of the player for an object with the specified key property. If it finds this object it lets the player unlock the door.
other The other id of the door in the destination room. This is the door we talk to.
difficulty How hard the lock is to pick. The range should normally be 1 to 10 however if necessary larger or smaller numbers could be used.
undoor Make something that was a door vanish and make it a non door.
lock/unlock func Sets up a function to be called when the door is locked or unlocked. If the function returns 0 the door is not unlocked, if the function returns 1 it does normal key checking, and if it returns 2 it skips the key checking and (un)locks the door. The function is passed two arguments: the first is 1 if the door is being unlocked or 0 if it is being locked, and the second is the (living) object that is trying to unlock or lock it. The parameter passed in modify_exit() is an array with two elements. The first being the object to call the function on and the second the name of the function. ie ({ this_object(), "check_locking" }).
open/close func This function only takes three arguments, the first is either "open", or "close" and the next is the object which is being opened/closed and the last is the object that is doing the opening and closing. If the function returns 1 the transaction is considered successful and the door is opened or closed.
door long The long description of the door.
door short The short description of the door. This will also set up all the required adjectives and so on.
door name The name of the door is a handle used by the system to associate adjacent doors with each other. This allows two doors to exist between two of the same locations and for their doors to not be confused. For example, a window and a door leading out of a house to a garden.
look A string to be given when a player tries to look through this exit into the next room.
look func A function to be called when a player tries to look through to the next room. There should be 2 parameters, an object and a function name. The function will be called in the object. e.g. ({ object, func }) .
delta This can be used to override the calculation of room coordinates from the room size, or to enable coordinate calculation for non-compass exits (eg, "out"). The parameter is a three-element integer array, giving the values that should be added to the current room's coordinates to get the coordinates of the adjoining room; eg, "delta", ({ 100, -150, 0 }) will cause the room at that exit to be 100 feet north and 150 feet west of the current room. Note that the adjoining room must have a complementary delta for its exit to this room.
upgrade The amount this exit goes up.
downgrade The amount this exit goes down.
double doors Makes the exit into a set of double doors.
one way This is (I think) for when you don't have an exit coming from the destination to this room, so that there is less chance of barfing.
secret Does the same thing as if you originally added the exit as the secret type using add_exit( direction, path, "secret" ), except you can set the required perception bonus for people to be able to see the door. If you just add the secret type using add_exit(), people with ot.pe bonuses over 200 can use/look at etc. the door. Using this parameter you can set that to whatever you want.
relative Makes the exit use relative directions, like forward and backward and so on.

Other available but undocumented parameters are no map, transparent and stuck. More are periodically added as they are required.

See Also:

add_exit, remove_exit
Copyright Statement

Epitaph - Epiphany v1.2.13 [release]. Copyright © Imaginary Realities Ltd 2009 -