Next Previous Contents

2. Database and Programming

2.1 Where can I get the Programmer's Manual?

The LambdaMOO Programmer's Manual is a complete reference for all database-independent aspects of the LambdaMOO system, including the programming language, built-in functions, and command parser.

The Programmer"s Manual is available at ftp://ftp.research.att.com/dist/eostrom/MOO The file name is `ProgrammersManual.*' where `*' is the format tag. It is available in DVI, PostScript, TeXInfo, and plain text formats.

2.2 Is there a way to incorporate new features of LambdaCore into my MOO's DB?

There is no easy way to merge databases. The easiest thing to do is just snag the code from LambdaMOO or somewhere and build/rebuild the objects by hand. (For information on how to do so, see `help @dump' on LambdaMOO.)

2.3 Objects like $room and $player are part of the `core' of the MOO. How do I add new ones?

As documented in the Programmer's Manual Getting and Setting the Values of Properties, $name refers to the property on the system object (#0) named "name".

Therefore, object references such as `$player' are created by adding a property of that name to the system object (#0) and storing the appropriate object's number in that property. For example, referencing $room is the same as referencing #0.room.

When the verb @make-core-database is run, it searches the system object for these links in order to determine which objects belong in the core. Newer releases of the LambdaMOO core include the wizard verb @corify which will add the specified object to the core in the manner illustrated as well as checking additional features such as an `init_for_core' verb being programmed on the object.

2.4 $spell is HUGE. How can I recycle it without running out of ticks or seconds?

Mr. Spell is so large that he can't be deleted in the conventional manner. What you need to do is this:

   ;recycle($spell)
   @rmprop #0.spell

This leaves a hole in the database however. You can easily live with it but if you find that you can't, just fill it by doing this:

  ;$recycler:_recycle(renumber(create(#1)));
  ;reset_max_object()

Another option is to call $spell:clearall() and recycle the object as usual. This takes longer, but it does leave you the option of using $spell later, or with a smaller dictionary (by not recycling it). $spell without the dictionary is not very big.

2.5 How do I do execute a verb automatically each time the server starts?

When the server starts, it calls the verb #0:server_started. Create or alter that verb to have it call the verb you want to execute.

If a task has suspended or forked, and its execution is still pending when the server checkpoints or is shutdown, that task is saved along with the rest of the database. Thus, when the server is restarted, that task will be resumed.

2.6 How can I make an object in a room listen to everything that's being said?

When something is said in a room, each object in that room is sent that text via the verb tell. You can change this verb to do whatever you want it to whenever anything is said or done in a room.

2.7 My MOO checkpoints every hour. I want to change this but I don't know where to look.

Change the value of the property #0.dump_interval to the desired number of seconds between dumps; the change will take effect after the next checkpoint.

This is documented in the LambdaMOO Programmer's Manual, Checkpointing the Database.


Next Previous Contents