Parents & Environments

You may have noticed when you dig a new room the MUCK gives it a parent room. By default the parent is the parent of the room you were in when you did your @dig command (though you could explicitly state a parent in the command). The default parent is generally a complex environment room set up by a regional builder (the person that built the landscape rooms in the area) since not many small scale builders use parents and environments.

If you're going to be building more than a few rooms you should create a dedicated parent, or environment, room. This is especially true if you think you'll be using default exits (for instance, up will always take you to the same sky room), defining your own actions that will work in more than one room (altered smell messages, custom obvious exit messages, etc.), or writing programs.

Making an environment room is easy. First decide on a descriptive name and make a room:

@dig Tephra's Environment Room

Note down the database reference number (db#) of your new room, you'll need it.

Now you just need to change the parent of all you other rooms to this new room. If you have a lot of rooms this is the tedious part. Go to each room you own and type:

@tel here=#123456

Where #123456 is the db# of your parent room. You can also set the parent in editroom if it is available to you.

Now to make the parent room handier to use in the future we're going to register it with itself. Decide what short name you want for your environment room. I'll use TER.

@reg #prop #123456:_reg #123456=TER

This registers the room #123456 as TER in the property directory (propdir) _reg in the room #123456. Now if you ever have to link something to your environment room you can use $TER rather than trying to remember the db#.


Code Main


©1997-2001 Lynn A. Davis