Builder Basics

From Redwall MUCK Wiki
Revision as of 22:58, 3 April 2021 by Aeysin (talk | contribs) (Created page with "<span style="float:left; padding-right: 1em;">__TOC__</span> == Registered Names == Every player, object, exit, item, and program on a MUCK has a database reference number (...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Registered Names

Every player, object, exit, item, and program on a MUCK has a database reference number (dbref).

A player can see the dbrefs of the things they own.

You can always refer to things by their dbrefs, but large projects will mean keeping track of many number strings, which can be cumbersome.

Redwall MUCK uses registered names (regnames) to simplify this. These are nicknames you give to the things you own. By default they are attached to your character and can only by used by you.

When you refer to a thing by its regname, use the $ prefix.

+newregion

Redwall MUCK uses regions to organize and set rules for its many thousands of rooms.

If you try to use the room creation command @dig without specifying a parent region, it will often return an error.

Regions are made up of "Parent" rooms and "Child" rooms. Think of the parent as a box that contains the child rooms. Or think of it as a family tree.

This "family" of rooms is a Region Parent with two child rooms, IC Parent and OOC Parent, each of which have children of their own.

Child rooms inherit certain rules and properties from their parent. Structuring rooms like this allows you to set rules for all rooms in a region, or specify rules for only IC rooms or OOC rooms.

Simple building projects won't require complex rules for rooms. That's okay. But it's good to know this stuff and to set up a basic parent room now to save yourself headaches later.

In this tutorial we will build a two-room home called Fox Den.

Begin by creating a Region Parent for your home.

Syntax

+newregion <Region Name>=$<parent>=<regname>

Example

+newregion Fox Den=$~region=denParent

This creates a room named Region Parent: Fox Den, with the regname $denParent. This is an OOC room.

The $~region part is a generic parent.

Region Parent: Fox Den will be a child of $~region. Ideally, you would replace $~region with a local parent using the +selectregion command, but $~region is good enough for now.

@dig

Now we will build the IC structure.

The @dig command is used to create rooms.

Syntax

@dig <Room Name>=<parent>=regname

Example

@dig Fox Den: Red Room=$denParent=redroom

@dig Fox Den: Blue Room=$denParent=blueroom

@open

Exits are created with the @open command.

Syntax

@open [E]xit [N]ame;<alias>;<alias>==destination

Everything between @open and the first = are aliases--what a player types to use the exit. Style the name however you like: {C}urly {B}rackets, <North>, (Par)en(the)ses, [ETC]

You can give an exit as many aliases as you like, each separated by a semicolon.

When naming exits, avoid using only a single letter or shorthand that will conflict with global commands on the MUCK. [F]orest would be a bad exit name, because Find uses 'f'. If it happens by mistake, no big deal. The exit can be renamed, or you can recycle it and start fresh.

Example

j $redroom

@open [B]lue [R]oom;blue;br==$blueroom

br

@open [R]ed [R]oom;red;rr==$redroom

@desc

You probably used this command to describe your character. It works the same for rooms.

From within the room you want to describe...

Syntax

@desc here=Description text.

From afar...

Syntax

@desc $regname=Description text.

@succ / @osucc / @odrop

These are the success messages when a character uses an exit. They are not required.

@succ is what the player sees. @osucc is what other players in the room see. @odrop is what players in the next room see when a character enters.

Example, using the exit named [B]lue [R]oom:

j $redroom

@succ br=You enter the Blue Room.

@osucc br=enters the Blue Room.

@odrop br=comes from the Red Room.

Script

Here is the whole thing as a script. It can be copy/pasted into the MUCK as-is and will create the project described above. The script uses @door instead of @open to create exits from afar; I gave them regnames so the @succ text could be set without knowing the dbrefs.


+newregion Fox Den=$~region=denParent

@dig Red Room=$denParent=redroom

@dig Blue Room=$denParent=blueroom

@door $blueroom=[R]ed [R]oom;rr=exit/red=$redroom=[B]lue [R]oom;br=exit/blue

@osucc $exit/red=enters the Red Room.

@succ $exit/red=You enter the Red Room.

@odrop $exit/red=enters from the Blue Room.

@osucc $exit/blue=enters the Blue Room.

@succ $exit/blue=You enter the Blue Room.

@odrop $exit/blue=enters from the Red Room.

@desc $redroom=The walls of this room are painted brightly red.

@desc $blueroom=The walls of this room are painted brightly blue.


You do not have to script projects. New builders will likely find it easier to create projects one command at a time.

Extras

+register

When you first create a regname, remember it does not get a $. The dollar sign will be used when calling it later. @dig Green Room==$greenroom will register Green Room as $$greenroom. Not the end of the world--it still works. To update a regname: +register <new regname>=$<reg object> (+register greenroom=$$greenroom will "fix" the double dollar sign)

@rec

Eventually you will have a screw up and want to get rid of something. That's what the recycle command (@rec) is for:

@rec $greenroom

Poof! No more Green Room.

@tele

If you want to update a room's parent, @tele will do the trick.

@dig Fox Den Interior=$denParent=denInterior

@tele $redroom=$denInterior

@tele $blueroom=$denInterior

Now both rooms are children of Fox Den Interior, a child of the Fox Den region parent.

@find

If you lose track of something you have created, @find can track it down.

@find red

This command returns:

Red Room(#231711R)

***End of List***

1 objects found.

The parentheses contain Red Room's dbref. The number string #231711 is the important bit. "R" is a flag that tells the MUCK it's a room.

@own

The @own command will return a list of everything you own.

+lock

Locks can get complicated. +help +lock for the manual. Some useful locks:

  • +lock jumpin=$redroom=$~anyone

Sets a rule that anybody can jump to Red Room, using its dbref (j #231711).

  • +lock abode=$redroom=$~anyone

Anybody can use @link me=#231711 to set Red Room as their home.

@set me=s

Players can view the dbrefs of things that they own. If you get annoyed by the numbers on everything, @set me=s sets the silent flag, and you will no longer see them. @set me=!s unsets the flag when you want to view them again.