POO Builder's Guide
This Guide is intended for POO players who want to create their own rooms, objects, and sundry gizmos in POO. It assumes that you already have a character on a POO server, and you are familiar with the basics of getting around and manipulating objects. The help creation command should be your reference, but this document will get you started more easily.
1. How to tell if you're a builder
Not all POO characters are able to create objects. Those who can are called "builders"; their ancestry includes an object called $builder. Simply try one of the commands below; if you're not a builder, then you'll get the "Huh? [Command (whatever) not found.]" error message.
2. Basics of creation
Most objects in POO are created with the @create command (but see @dig, below). You give this command the name of the object you want to create, and identify its parent object.
What is a "parent object"? Every object in POO can be derived from (or descended from, if you prefer) any number of other objects. (Though normally, each object has only one parent.) An object "inherits" all the behaviors and attributes of its parent(s); it can then be specialized with its own behaviors and attributes. Inheritance forms an "is-a" relationship: if the parent is "door", then we correctly say that the child object is a door.
To create an object, then, you invoke @create with the parent object and a name for the new object, as in the following examples:
Note that the parent object must have its "f" (fertile) flag set to 1; otherwise, the creation attempt will fail.
- @create $thing as tree
- @create $exit as south
- @create $pub.misc.clock as watch
- @create $pub.rooms.exitLister as Crossroads
If the creation is successful, the new object is put into your inventory (i.e. you'll be carrying it). If it's an exit or some such, don't forget to drop it in the room where it belongs!
3. Referring to objects
The POO parser must be able to find the object you identify as the parent object. If it is present (either in your inventory, or in the same room with you), you can just refer to it by name -- as in the last two examples above. Several common parent objects are not to be found by mere mortals, but you can refer to them by dollar-reference -- as in the first two examples above. Objects which can be specified in this way include $thing, $exit, and $room. Other fertile objects can be found within directories,
You can also refer to objects by their numeric identifier, e.g., "#34". This is rarely useful for specifying a parent, but may be useful in other circumstances (e.g., specifying an exit's destination, as shown below).
4. Customizing your objects
Once you've created an object, you'll want to set some of its properties to make it unique. Important properties include:
Here are some examples of setting these properties:
- name - as it appears in the room contents, etc.
- aliases - a list of alternate names players can use to refer to the object
- desc - description (printed by the look command)
- dest - destination of an exit (for exits only)
- salient - if 0, the object doesn't appear in room contents
- @set tree.aliases = ['oak', 'conifer', 'shade']
- @set here.desc = "You're in a big empty room, dimly lit."
- @set out.dest = #42
5. Digging rooms & tunnels
While it's possible to create rooms and connect them with exits all with the
@create command, there is another command that makes these operations much easier: @dig. You can use @dig whenever you're building a connection in one of the ten cardinal directions (n, s, e, w, ne, se, sw, nw, u, d). It simultaneously creates a new room, an exit from the current room to the new one, and a reciprocal exit from the new room to the current one.
The format of @dig is illustrated by these examples:
Note that @dig always creates a new room if you specify the destination by name. This is true even if the name you give matches some existing room! If you want to dig a connection to an existing room, you must specify that room numerically, as in the last example.
@dig is a powerful command; use it wisely.
- @dig n to Great Hall
- @dig w to Antechamber
- @dig u to Tower
- @dig se to #34
6. Imitation: the sincerest form of flattery
The best way to learn how to make your own objects is to examine existing objects and see how they tick. That's exactly what the @ex command is for. Find some objects similar to what you want to create, @examine them, and study their properties -- you may discover tricks you hadn't known before.
Finally, do read the help file on creation -- it gives several useful commands for manipulating properties which are not covered here.
. . . . . . Joe Strout