Building - an introduction to the database
Before we start talking about building rooms or creating things in the MUSH, it is worthwhile to discuss how the MUSH works internally, at least in broad terms.
Because the game is extensible (ie. you can add new rooms at any time) the program stores a "database" of rooms descriptions, links and so on in memory. The database consists of "objects" which can be one of:
- Players
- Rooms
- Exits
- Things
Players are the people who log into the MUSH and play the game. Each player is represented internally by his or her database object (containing the player description, sex and so on).
Rooms are the places where players visit. Players are always in a room of some sort.
Exits are the way that rooms are linked. An exit named "south" for example links a room to the room to the south of it.
Things are things that players can pick up and take around, or look at (eg. keys, wands, chickens, notice boards and so on).
Every object has some fundamental characteristics:
- Database number (ie. where in the MUSH database it is) - Usually represented as: #nnn
- Name - the name of the object (eg. "Merlin", "A table", "The Inn" and so on)
- Location - where the object is
- Contents list - what it contains (inventory for players, objects in a room)
- Owner - who owns this object
- Pennies - how much "currency" the object owns (might not be called "pennies" as such)
- Zone - which "zone" the object belongs to
- Flags - various flags which can be on or off, such as "wizard", "dark" and so on
- Locks - these control who can do what to whom.
- Attributes list - attributes of the object, such as its description, failure message and so on.
- Powers - Special powers the object may use
Examining an object
You can usually see most of the above characteristics by "examining" an object. For example:
examine me
examine here
Unless you are a wizard, you can only examine object you own (unless the object has the "visual" flag set). Objects other people own will only tell you the name of the owner. This is to stop you examining objects and possibly finding out secrets about them (for example, you might examine a room and find its secret exits).
For example:
examine here
The Town Square(#9RnAJ) is owned by Gandalf