Creating MOOseum Objects on Connections

This tutorial will get you started with creating MOOseum objects on Connections. You'll also learn how to find things you've made that you've lost or forgotten about, how to get rid of things you don't need, how to keep track of your use of your quota, and a few other useful tricks.

The one kind of basic creation that is not covered here is the creation of rooms on Connections; you can learn about building in Tutorial 2, Building a Room on Connections.

Before you do this tutorial, skim this background information about making objects in MOO. Even if you don't understand all of it, it will answer some questions everyone asks and make what you're about to do make a lot more sense.


Reminder: Throughout this tutorial, <> are used to enclose types of information that you need to replace with the specifics that apply to your objects. Don't type the <>; just type your replacement for the generic terms between them.


Making an object

As you saw in the background information, the basic command for creating objects in MOO is this:

@create <parent object> named <name you give your object>

Let's make something so you can see how that works. You're not going to keep the objects we make in this tutorial, because I want to show you how to delete things as well as how to make them. So you can just make the same things I make in my examples for now and be creative later.

We're going to use the generic basic MOOseum object as a parent; #225 is the most basic object you'll use as a parent for MOOseum objects that you make.

Do this:

@create #225 named rubber ball

You always get a confirmation message from the MOO when you @create something; for example, I saw this:

You now have rubber ball with object number #1674 and parent (#225).
The created object is now your current object.

The object number is the identification number of the object you make--even if everyone on the MOO makes a rubber ball, you can find the one that belongs to you by finding its object number. (You can ignore that business about your "current object." Some people find the "current object" options useful when programming, but we're not going to program anything in this tutorial.)

Do `look me' and you'll see that you're carrying a rubber ball.

Now try:

drop rubber ball

Do `look here' and you'll see that the rubber ball is sitting in the room you're in. Now pick it up again:

get rubber ball

As you can see, you do indeed have a real object.


Two things it's good to know at this point

!) You can work on your objects "long-distance" by referring to them by their object numbers, but it's easier if you can just use their names (so that you can say "@describe ball" rather than "@describe #1674," for example). In order for you to be able work with your objects using their names to refer to them, you need to be in the same room as the object, or holding the object. If someone else is holding the object, even if that person is in the same room as you, you'll have to ask that person to drop the object or hand it to you before you can work with it using its name.

2) You can experiment without worrying that you're going to make an unfixable mess with any mistakes you might make:
You can use objects that you don't own, but you can't modify them--you can't change their descriptions or set messages on them or add code to them, for example. (Sometimes you'll find exceptions to those rules; someone could make an object that allowed everyone to write on it, for example, but you couldn't do anything to the object that the person who made it didn't want you to.) You can't @recycle (delete) anyone else's objects. You can't @recycle your character, either, even though you do own it and can modify it. Also, the @recycle (delete) command asks you to confirm that you really want to delete something, so even if you name the wrong one of your objects in a @recycle command, you'll get a chance to change your mind.


Adding aliases to objects

It would be nice not to have to type "rubber ball" every time you want to do something with it, so you can give it the alias "ball," like this:

@addalias ball to rubber ball

You'll see a message like this, except with the object number of your rubber ball instead of mine:

Alias "ball" added to rubber ball(#1674).
Aliases for rubber ball(#1674) are now {"rubber ball", "ball"}

Now try doing `drop ball' and `get ball'. Let's hear it for less typing--yay. You can add aliases to any object with the @addalias command:

@addalias <desired alias> to <name of object>


@Describing objects

Having undescribed objects is Very Bad Form, particularly if you've kept them around awhile. The description is part of what makes the object what you've called it, and if it's worth taking up space in the database, then it's worth describing the object properly.

Do `look ball' and you'll see that it just says "You see nothing special." That's what an undescribed object looks like. Describe objects with this command:

@describe <object name> as <description>

Just like when you wrote your character's description, you need to type the whole description before you press [Enter]--as soon as you press [Enter], whatever you've typed so far will be entered as your object's description.

For the rubber ball, do something like this:

@describe ball as A big red rubber ball with a blue stripe.

Now you can do `look ball' to see its new description.

Setting the provenance for your objects

The provenance of an object is the object's story: dates, makers, owners, circumstances of its discovery, testing, information on how it came to the museum, etc. The provenance of a silver tea set might say something like, "Maker: Paul Revere, 1768. Commissioned by Mrs. Robert Johns as a wedding gift for her daughter Theresa Johns Smith. Purchased by the museum from the 1975 estate sale of Thomas Brown, great-great grandson of Theresa Smith." All of your MOOseum objects will need to have provenance. It can be as simple as "This text excerpted from John Doe, The Way Things Are (Houghton-Mifflin: Boston) 1999: 32." It can also be as complicated as you like--you might for example, include a detailed description of how and why you thought of constructing this object, and you might list several sources where you found the information.

To add a provenance field to an object:

@prov <object> is <Whatever you want to say.>

To clear the provenance field for an object:

@prov <object> is

(In other words, enter the command, but don't enter any text.)

If you want to use an editor to fill in your provenance field, enter:

@edit <object> provenance

(You'll be sent to the in-MOO note editor, or to your local editor, depending on which option you use for editing.)

Setting the references for an object:

The references field of a MOOseum object is intended as a place for the owner of an exibit object to refer the viewer to further sources of information on subjects related to the object; the references on a silver tea set made by Paul Revere might refer the viewer to books or URLs about Paul Revere or about tea sets of the period.

To add references to an object:

@ref <object> is <Whatever you want to say.>

To clear the reference field for an object:

@ref <object> is

(In other words, enter the command, but don't enter any text.)

If you want to use an editor to fill in your reference field, enter:

@edit <object> references

(You'll be sent to the in-MOO note editor, or to your local editor, depending on which option you use for editing.)


Object @messages

There are various @messages on objects that you can set to make them more interesting. The @messages are a particular kind of object property, and they cause messages to be printed to people in the room when an object is used in various ways.

You have to be patient enough to experiment till you get @messages right, or you can end up with your object printing nonsense to the people in the room with it. Objects you create inherit default @message settings from their parents that will serve if you don't want to mess with them; you can always write down these default settings before you change them, and then you can put the defaults back if you can't get your changes to work right.


Viewing the @messages on an object

Here's the command to see what @messages are on an object:

@messages <object name>

Try this:

@messages ball

That's a pretty imposing mess when you look at it the first time, but after looking at a lot of objects you'll be able to figure out more and more about what various @messages are doing, and so be able to find the ones that you want to customize. You can even look at the @messages on objects you don't own and get examples and ideas from them.

Many @messages have a bunch of code in them; when you're ready to know what it all means, you can enter `help pronoun-substitution'. But you don't have to worry about all that now.


Setting @messages on an object

The basic command for setting a message on an object is this:

<@message name> <object name> is "<message>"


Setting the @integrate_room message

This one's easy and really useful--you can use room integration to make all the objects that are permanent parts of a room integrate themselves into the room's description instead of appearing in a list ("You see this and that here") following the room's description.

Try entering this:

@integrate_room ball is "A rubber ball is rolling around on the floor here."

The MOO confirms that you set the @message; e.g, here's what I saw when I entered the above command:

You set the "integrate_room" message of the rubber ball (#1674).

Now drop the ball and do "look here"--you'll see that line you just set in the description of the room you're in, instead of seeing "You see a rubber ball here" after the room's description.

One warning about @integrate_room messages: If you make an object with the generic piece of furniture as a parent, don't set the @integrate_room message on it--it will break other cool things furniture does. If you make furniture, do `look $furniture' for information on setting it up, and if you need less terse instructions than are offered there, check out the "Making furniture on Connections" tutorial.


Setting the @integrate_player message

Another message you saw on your ball is the @integrate_player message. If you set that message on an object, whenever someone is holding that object, the @integrate_player message will appear in the person's description instead of in the list of objects the person is carrying.

In most cases, that means you want the message to be something like "<Name> is carrying a rubber ball." You could put your name in the message, but obviously the message would only make sense if you were carrying it. If Rufus does `@integrate_player ball is "Rufus is carrying a rubber ball"', it'll look fine if he's carrying the ball, but if I pick it up, it will tack "Rufus is carrying a rubber ball" onto my description, which would be all wrong.

So in order to set an @integrate_player message, you need a bit of that pronoun-substitution code I mentioned earlier, so that you can make the right person's name appear in the message.

Here's an @integrate_player message you can get a lot of mileage from, because you can copy it exactly as the @integrate_player message of almost any object, and it will insert all the right names and make sense. Enter this (make sure you copy it exactly):

@integrate_player ball is "%Tld %tl:(is) carrying %ti."

Now pick up the ball if you're not holding it already, and do `look me'.

Find a friend and hand the ball to that person by doing:

hand ball to <name>

Then look at that person.

The code in the first part of the @player_integrate message you just set makes the person's name and the right conjugation of "is" get printed. The %ti on the end makes the name of the object appear. (Note: the codes for "make the person's name print" and "make the object's name print" are not the same in every circumstance where pronoun substitution is used, so don't copy those to other kinds of @messages and expect them to do the right thing there.)

You could have just used "a rubber ball" instead of %ti, but this way, if you change the name of the ball, you don't have to rewrite the @integrate_player message.

If you use that exact @message as the @integrate_player message on any object you own, it will (probably) work the same way on that object. Or try a little substitution; you could, for example, make a jacket and use `@integrate_player jacket is "%Tld %tl:(is) wearing %ti."' as the @integrate_player message.


Social conventions and player integration

Be a bit careful about what objects you put @integrate_player messages on, and about what you put in @integrate_player messages; people don't like having things they think are insulting or embarrassing or otherwise offensive appear in their descriptions. I wouldn't care to be handed an object that made "Tari is smoking a crack pipe" appear in my description, for example, and "Tari is covered with dog doodie" is right out.


Getting rid of unwanted @messages

Sometimes you'll want to clear a @message, so that it doesn't print anything; here's how to do that:

<@message> <object> is ""

Don't put spaces between those empty quotes.

Try getting rid of the @integrate_room message of the ball. Enter this:

@integrate_room ball is ""

Now if you drop the ball and look at the room, you should see that the ball once again appears in the "You see this and that here" list.


Keeping track of your stuff

Drop your ball somewhere and go to some other room in the MOO. It doesn't even matter if someone picks it up while you're gone. Just walk away from it. You're about to find out how to get it back no matter where it is.

Okay, so you lost your ball: you're not holding it, it's not in the room you're in, and you can't remember where you left it. Enter this:

@audit me

You'll get a list of all the things you own, their object numbers, and their current locations. For anything you've had awhile, you'll see how big the object is, too, but your ball may have "???" where the size would normally appear, because you just made it and the MOO probably hasn't measured it yet.

Usually, you'd just go to the room your ball is in (or, if someone picked it up in the meantime, to that person) and get the ball, but what if the person holding the ball has disconnected, or the ball has been carried off to a room you can't find or are locked out of? Here's how to get objects back when you can't just walk somewhere and get them:

@move <object number of your ball> to me

So for example, if I do `@audit me' and see that my ball's object number is #1674, I'll do:

@move #1674 to me

If you used that command successfully, the MOO confirmed it by printing "Moved." on your screen, and you can enter `look me' to see that you have your ball back in your possesion. You can use the @move command to get one of your objects even if someone else is carrying it, or it's been carried off to a room you can't find or can't enter.

You can only @move your own objects. You won't be able to @move an object that you've @locked to a room, even though you own the object; you'll have to @unlock the object first. Also, occasionally someone writes code banning a kind of object s/he doesn't like from a room s/he owns, and if you're in such a room, you won't be able to @move your object there.


Other useful tricks

@Locking objects

Suppose an object is an important part of your room; e.g., it would be kind of annoying if someone picked up the bartender in the Village Inn and walked off with him. Drop your ball in the room you're in now, and then enter this:

@lock ball with here

The MOO will confirm that you've locked your ball with a message like this one that I got:

Locked rubber ball to this key:
#1092[flower garden]

Now try to pick up your ball. You can't--it's locked to the room. Do this:

@unlock ball

You'll get this message:

Unlocked rubber ball.

Now you can pick up the ball. Another way to lock objects is to lock them to yourself; if you did this:

@lock ball with me

only you could pick up the ball. Again, you'd do `@unlock ball' to unlock it.


Getting unwanted @locked objects out of rooms you own

Remember not to leave @locked objects in other people's rooms, unless of course they invite you to.

You can rid a room you own of an unwanted object, even if the object is @locked, by doing this:

@eject <object>

That sends the object to its home, if it has one, or else to #-1, also known as $nowhere. $Nowhere isn't a room, and so you can't just walk there and get your objects; if your stuff ends up in $nowhere, just use the @move command to get it back. You can only @eject things from your own room, and if you leave your stuff in someone's room, it's considered perfectly fair for the owner of the room to @eject it if s/he doesn't want it there.

You can, as a matter of fact, @eject a person from a room that you own, which is a good thing to know in case you're invaded by a jerk. Of course, if a visitor is unwanted but isn't harrassing anyone, it's friendlier to try first just asking the uninvited person to leave. When you @eject someone from your room, the person gets sent to his/her home.


@Renaming objects

You can change the names of your objects with this command:

@rename <object> to <new name>

Try this:

@rename ball to Leonard

You'll get a message like this one:

Name of #1674 changed to "Leonard", with aliases {"Leonard"}.

If you were going to keep Leonard, you'd also change the description so Leonard wouldn't look like a rubber ball, but don't worry about that in this case.


Setting the .proper property on objects

Now that the former rubber ball is named "Leonard," when you do `look me' or `look here' (depending on whether you're holding Leonard or he's sitting in the room), you'll see "a Leonard." If you try commands like `drop Leonard' and `get Leonard', you'll see "the Leonard" or "a Leonard" at various points.

Those articles are being prepended due to a default property that is usually the right thing, but isn't the right thing for Leonard. To make Leonard be just plain Leonard, you can make him "proper" by setting his .proper property to a true value. (Properties will start to make more sense if you decide to learn how to do some MOO programming.)

Enter this:

@set Leonard.proper to 1

The confirmation message you get from the MOO when you use a @set command looks something like this:

#1674.proper set to 1.

Now look at yourself or the room, depending on whether you're holding Leonard or not, and you'll see that he's just Leonard.

A conclusion you can draw from that bit of info: don't give your rooms and objects names that start with "the" or "a," since those articles will be prepended. If we'd done `@create $thing named a rubber ball' we'd have ended up seeing "a a rubber ball" sometimes and "the a rubber ball" other times.


Help keep our MOO clean: getting rid of unneeded objects

When an object you've made has outlived its usefulness, you should @recycle it. Do that with this command:

@recycle <object>

Let's get rid of the formerly-ball-now-Leonard object. Do this:

@recycle Leonard

The MOO will ask you if you're sure, since this is an irreversible command. Enter `yes' and Leonard will be gone. Here's me @recycling my Leonard:

me: @recycle Leonard
the MOO: Sure you want to recycle Leonard (#1674)? [Enter `yes' or `no']
me: yes
the MOO: Leonard (#1674) recycled.

@Recycle your Leonard. Then look around, @audit yourself, etc. to confirm--no more Leonard.

From time to time, do `@audit me' to remind yourself what you've @created, and @recycle what you don't need. The MOO won't let you @recycle anything that isn't yours, and it won't let you @recycle your character, so don't worry that typing errors will result in either of those disasters.


About your quota

If you don't need this information yet, just skim through it so that when you run into the situations described, you'll know where to look for help.

Everyone on Connections has a quota. It's a set amount of space that's allotted to you for making things. Your initial quota on Connections is 20K, which for most people is enough to make what they need for their class's or group's work and have some left to play around with.

You can keep an eye on your usage of your quota with this command:

@quota me

That command tells you how much quota you have and how much of it you've already used.

Obviously, @recycling what you don't need is a way to get quota back to make things you want. For more information about quota, enter `help quota' and `help quota-policy'.

If you @create a whole bunch of stuff in a single session, at some point the MOO will refuse to let you @create anything more, and will tell you "Object quota exceeded" or "Resource limit exceeded."

What that means is that the MOO hasn't had time to measure all your new objects and compare the total bytes of the objects you've made with your @quota, and since you've made a lot of objects at once, it wants to force you to stop till you get measured. (If you entered `@audit me' after seeing that message, you'd see a bunch of things with ??? in the object size column.) If you get that message, enter this:

@measure new

The MOO will measure your recently-created objects, and then, if you're not out of quota, you can go on making things.


Other kinds of objects to try out

There are some other objects besides the generic basic exhibit object (#225) you can make children of the Generic Basic MOOseum version of $furniture (#366) , $container (#616) $openable_container (#632) and $note (#395). The marked difference is the ability to add provenance and references to these objects, which is not present in their parents. To create those objects, simply choose the number of the generic MOOseum object you wish to create, and follow the steps listed above.When you're done, if you're not going to use it, @recycle it.

About the MOOseum Tools Project | Animatronic | Exhibit Object | Conversational Bot | Cue Card
Docent | Exhibit Stand | Guestbook | Notepad | Random Narrator | Timecard


This tutorial text is based on the work of Tari Lin Fanderclai.

Copyright 1997, 1998, 1999. Tari Lin Fanderclai. All rights reserved.