MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Portable source form of MOO database



I've been tinkering with MOOs for a month or so.  I'd like to create a
map that could conveniently be loaded into any MOO, a kind of ASCII
"source" with no references to object numbers.

Creating a series of rooms, using `@dig' to go from one to the next and
`@describe here as ...' to set the descriptions was working for me up to
a point.

Example that hopefully will suggest what I an am trying to accomplish:

    @create $room called train station,Innsmouth train station
    drop train station
    @move me to train station
    @describe here as "Inside a dilapidated train station.  The tracks are to the west.  The front door is to the east."
    @dig e,east|w,west to "Train Station Steps"
    e
    @describe here as "Front door of the Innsmouth Train Station.  Up a short stairway to the west is the front door leading into the train station.  To the east are the streets of Innsmouth."
    @dig e,east|w,west to "Bank Street/Place of Hawks intersection"
    e
    @describe here as "The intersection of the N/S Place of Hawks and E/W Bank Street.  To the immediate north, Place of Hawks crosses a bridge over the Manuxet River.  The Innsmouth Train station lies directly west of here."

Here is a sort of program to create three rooms, all without the need to
refer to any object number.

I got stuck on the problem of connecting two previously created rooms.
None of @dig, @add-entrance or @add-exit is able to accept the object
name but only the object number.

I experimented with the following verb:

    >@verb misc:objnamed
    Verb added (1).
    >@args misc:objnamed any none none
    Verb arguments changed.
    >@chmod misc:objnamed rxd
    Verb permissions set to "rxd".
    >@program misc:objnamed
    Now programming misc:objnamed(1).
    [Type lines of input; use `.' to end or `@abort' to abort the command.]
    >for n in [0..tonum(max_object())]
    >  o=toobj(n);
    >  if (valid(o))
    >    if(o.name == argstr)
    >      player.location:announce_all(argstr, " is ", o);
    >      return o;
    >    endif
    >  endif
    >endfor
    >.
    0 errors.
    Verb programmed.
    >objnamed Train Station Steps
    Train Station Steps is #85

in the hopes that I would somehow be able to create a function that
would allow, e.g.,

    @dig n,north|s,south to objnamed("Train Station Steps")

Hovever, my efforts to come up with something that could be evaluated,
would take a place name as input and return an object were fruitless.
The verb seems to be the closest thing I can find to a user defined
function in the programmer's manual.

Surely I am not the first to want to do this.  Can it be done?

-- 
Larry Mulcahy                           larry@ambient.uucp
lmulcahy@nyx.cs.du.edu   ambient!larry@mnemosyne.cs.du.edu
	http://nyx10.cs.du.edu:8001/~lmulcahy/home.html
GCS d H s !g p1 au-- a w+++ v--- C++ U+ P++ L++ 3 E+ N++ K W--- M--
    V-- po--- Y+ t 5++ j- R G? tv b++ D++ B--- e+++ u h+ f? r* n--- !y
The Failed Clinton Presidency: day 1042, 420 days to go


Follow-Ups:

Home | Subject Index | Thread Index