Re: QUESTION: More versatile exits?

From: Barid Bel Medar (icarus@berkshire.net)
Date: 07/04/96


On Thu, 4 Jul 1996, Alex wrote:

> On Thu, 4 Jul 1996, Steve wrote:
> > On Thu, 4 Jul 1996, Nick wrote:
> > > On some other muds, exits are so versatile that an exit can be called
> > > anything you want (and you don't have to modify the source, it just allows
> > > exits to be anything).

> > I made variable exits with my mud, and the way I implemented it would 
> > require more source patches than I'm willing to post. The world files 
> > have to be completely changed, etc. Rather than an array of exits, you 
> > have a linked list, so each time you mess with exits you have to switch 
> > it to the new way.

> One possible suggestion would be to look at the MUSH implementation of
> exits (as separate objects admittedly, but the idea could still work.
> Another thought would be to add a new field to the exit... ie, make an
> exit field look like say:

> D				<-- Marking a 'door', note no dir...
> Looking in this direction you see blah.		<-- the exit desc as
> ~						<-- now
> east door~			<-- the actual exit keywords... (see below)
> 1 -1 3241			<-- similar flags to now

Doors might have to be a special object, which you'd point to in the 
first line as a vnum, or put in -1 if it didn't exist.  In other words, 
create an object (give it a num of 1234) which you consider your door.  
It has all the regular keywords of an object, descriptions, and so on.  
Then, instead of indicating that this exit has a door, you give the 
number of the object.

Looking in the specified direction (say, east) would give you the short 
description of the door, if closed, and the short description of the exit 
(as usual) if opened.  You could always get the short description of the 
door by doing a "l at east door" or whatever.

So, as an example, this might be our new door: (note that the door's 
status would be contained as a flag in the object, not the exit)

1234
Looking in this direction you see blah.
~
east~
1 -1 4321	<- I don't know about this...  it should be scrapped ;p

To shut off the presence of a door, replace 1234 with -1, as usual.  You 
wouldn't need to put in keywords for the exit; the ones for the door 
object would cover that.  The MUD should be bright enough to check those 
automatically when it figures out if the door is closed, locked, etc.

> The keywords would then be used to interact with the door in a manner
> similar to mushes... for example 'go door.east' or something would
> send you through the east door as compared to the west one or whatever...

In my continuing efforts to promote English as a viable spoken (and 
written) language, try "go east" or just "east" (assuming the door's
open and there's no others around).  The existence of a door should be 
irrelevant if it's open.

------------------------------------------------------------------
Barid Bel Medar                               icarus@berkshire.net
Knights of the Cosmos            Shayol Ghul Resort and Health Spa
------------------------------------------------------------------
"I  am  returning  this otherwise good typing paper to you because
someone has printed gibberish all over it and  put  your  name  at
the top." - English Professor, Ohio University
------------------------------------------------------------------



This archive was generated by hypermail 2b30 : 12/07/00 PST