Color Guide:
Red indicates a command (or commands) you enter into the MUCK.
Navy indicates text returned by the MUCK, usually a result of a command you typed.


Creating and Using Puppet Characters
In this tutorial you'll learn what a puppet is, how to make a puppet, and a few ideas on how to make using a puppet easier. You don't need to know much to use this tutorial-- I'll show and explain everything you need to know, all you have to do is be able to type in muck commands similar to the ones I show you here. My goal with this tutorial isn't just to show you how to make a puppet, but to give you an understanding of all the steps behind making and using puppets. If you want to get a puppet up and playing fast and don't care how it all works, here's a better resource:
Contents
What is a Puppet?

A puppet is an object that is controlled by a player and acts seemingly independently much like a player character. If you want more than one character on a muck you have two options: you could apply for another player character or you can create a puppet. Puppets have two advantages over alternate characters (alts): they don't require an extra client window when you want to play your player-character and your puppet at the same time, and you can (usually) create puppets at will without applying for the character.

Puppets are characters much like your player character. They can see and hear in the muck just like a player character, and everything that happens to them is reported to you as the owning player. Puppets can have descriptions, move around in the muck, carry things and use most muck commands just like players. Only a few commands are forbidden to puppets, and these are /very/ few in A Bug's Muck.

A well-developed puppet is a role-play asset equal to a player. In fact, in role-play there is virtually no difference between a puppet and a player. There's no requirement that your puppet be related to your player, or that your puppets even /like/ your player. In a Bug's Muck, there's at least one puppet who detests his creator, and many examples of puppets who are completely indifferent to their owning players. In a way, puppets are more native to their mucks than their owning players, for they have no lives outside of their muck. Puppets are sometimes known as 'zombies' in other mucks, but you'll never hear a puppet referred as such in A Bug's Muck. A zombie is a mindless shuffling monster, while a puppet is unique and colorful character.


Creating The Puppet Object

A puppet starts life as a 'thing' object. A 'thing' is an object you can pick up and carry around. Other types of objects are rooms, players and actions/exits. You create the object that will become a puppet character like any other object:
Let's create a puppet who we'll call 'Lily':
The number 2974 is the unique number representing the object, called a 'dbref'. Dbrefs are usually written like: #2974. The muck will give you your own unique number when you create your puppet. It's a good idea to record the number you receive because we'll use it a little later in this tutorial.

Now you can describe Lily as you would any object, or wait to describe her at a later time.


Making Your Puppet Forcible

A puppet needs to be able to move around in the muck just like a player can and use many of the commands players use. The first step in making a puppet character from an object is to set the object's X flag so that the object can be made to do muck commands just as if a player had done them. This is called 'forcing' an object. The command for setting an object's forcible flag looks like this:
A flag is like a little switch on an object that turns on or off special properties. Once you turn the X flag on, you can make the object do things, rather like issuing instructions to a robot. For example, let's set the Lily object's X flag by typing:
If you want to turn off the ability to force an object, use the flag removal command:

Force-Locking The Puppet To Yourself

Once you make an object forcible, you need to specify who can force it by using the force-lock command, @force_lock or @flock. Only players who are force-locked to an object may force it. Here's what the force-lock command looks like:
For the object-name you'll use the name (or dbref) of your puppet. For the lock-expression you can do many things, but generally you supply a list of player names separated by the pipe-symbol '|', which mean the same as 'or'. For example, '@flock stick=Silver|Locus' will allow Silver and Locus to force a stick. You won't want other people telling your character what do to and say, so you'll want to force-lock your puppet only to yourself. Let's force-lock the Lily object:
Now the Lily object will respond to your force commands but other non-wizard players cannot force it. Wizards can always force your object even if it is not force-locked to the wizard, but don't worry, I've never seen this done. If you want to remove a force-lock, you can clear the force-lock like by setting the object's force-lock to nothing:

Now that the object is force-locked to you, let's look at the force command:

Commands are the same things you type into the muck as a player. You can force an object to 'look' or use an exit or perform a spoof. You can make the Lily object talk by typing one of these two commands:
Everyone in the room will see:
At this point 'Lily' is still just an object like anything else you might create. If you are in the same room as the Lily object you can create the illusion that Lily is a character, but you could do the same with spoofs. If you are not in the same room as the lily object, you could still force it to do and say things, but you wouldn't know what effect those things had on others in the room.


Breathing Life Into The Puppet

Now we have an object that responds to your commands to do and say things. But the object is still completely dependent on your presence to respond to situations in a room. It's not aware of anything that happens around it. We can make it aware by setting the Z flag:
When this flag is set, an object becomes 'live' and assumes many of the properties of a player, depending on the muck's features. At a minimum, turning on the Z flag allows the object to hear what happens in a room even if your player character is not present. Let's set the Z flag on the Lily object:
At this point Lily becomes aware and can hear what's going on around her. If a character called Muin in Lily's room said "I need a nap.", it would be reported to you like this:
So, even if you're not in Lily's room with her, you still know what's going on and can use the force command to have Lily respond. Lily is now a real, independent character.

The 'Z' in the Z flag stands for 'zombie', which might seem a misnomer since setting the Z flag turns an object into an independent living character. Once you turn the Z flag on, your puppet goes 'live'. Mucks like A Bug's Muck start treating your puppet object as if it were a player object. Your puppet will now show up in room contents not as an object, but as a player just like true player-objects.


Puppet Actions

You could go around typing ugly commands like: '@force #2974=:takes a nap.' every time you wanted your puppet to do something, but wouldn't it be much easier if you could just type 'li :takes a nap.'? Let's use actions and a little MPI to simplify using puppets.

What's an action? Actions are links between two objects. It may be easiest to think of an action as a teleporter. If you use an action on object A that is linked to object B, you will be moved to B. The most common use of actions is room exits. You can attach messages on actions to report what happens when they are used. Exits often have 'success' messages that elaborate on what happens when you use a door, etc. For puppets, we're not interested in the teleporter function of actions, but we are interested in the success message of an action. You'll see why in a moment.

You can make an action on yourself like this:
Let's make an action for telling Lily what to do. First you need to pick a name for the puppet's controlling action. A good action name is short and easy to remember. I recommend using the first two or three letters of the character's name. Never use the puppet's name for the puppet's action. Lily and her controlling action are both objects, and having objects with the same name can cause ambiguous situations for some muck operations. We'll use 'li' for Lily's controlling action.
You can ignore the dbref of the action, #3221, as we'll only need the action name 'li' to do what's needed.

Now that we have an action, let's turn off the action's teleporting effect:
All actions have a link. Normally an action's link is the destination that you teleport to when you type the action's name. What the above command does is sets the action's target destination to a MUF program that does nothing. In other words, when you use the action, you don't go anywhere. On some mucks you will want to use '$nothing' in place of '$null'. Ask a wizard if you aren't sure which is used.

Now when you use the li action you won't go anywhere, but the muck will still look for a success message and try to display it if one exists. Typically a success message sends a message to the user, and success messages can include MPI, a programming language used to dynamically build or modify text messages. Instead of using MPI to build a message to send to the user, we're going to use MPI to set up the puppet's force command. Here are two ways to do this. Both do the same thing, so take your pick:
Let's put a success message to use for Lily:
When you try this, remember to replace the example dbref #2974 with whatever your puppet's dbref is.

Here's what's happening: When you type 'li', the muck tries to take you to the linked destination of the li action. But we turned that off, so you don't go anywhere. The muck still thinks you successfully used the action, so it tries to display a success message to you. But instead of a message, we've made an MPI function that will force Lily to do something.

What are those weird things with the braces, like {force} and {&arg}? Those are MPI functions and they're very helpful once you tame them. {force} is an MPI function that does the same thing as the @force command, with a few tighter restrictions. {force} requires two parameters in order to work: the dbref of the object we're going to force, and the command we want the object to do.

The first parameter is easy, it's simply Lily's dbref, #2974. When you create an object, the muck tells you the dbref associated with the object. If you didn't write that number down, don't worry. Just 'examine' the puppet to find its dbref. For example, examining Lily we might see something like this:

The second parameter to the {force} function is the command we want to send to Lily. When you type an action into the muck, anything after the name of the action is called the 'argument' and is saved for possible later use. That's how you get some toys with actions to work, they might have an action that is used like this: 'squirt Silver'. 'Squirt' is the action name, and 'Silver' is the argument. We can do the same thing with the li action, using it like this:
'takes a nap' is the argument. MPI can retrieve an action's argument by using the {&arg} function. When you use the action, '{&arg}' is simply replaced by whatever the argument was. In the above example, {&arg} is automatically replaced by ':takes a nap'. So when you type 'li :takes a nap.', you're issuing a force command to tell #2974 (that's Lily) to do the pose command ':takes a nap.' You'll see this as a result:
Everybody else will see:

More On Puppets

Now that you know all about the mechanics of creating and using puppets, here are a few things you can do to enhance your puppet's experience on the muck.
Unhand me sir!

Since a puppet is still essentially a 'thing' object, players can pick up puppets. You probably won't want people picking up your puppet characters. To prevent this, lock the puppet so that only you can pick the character up. For example:
I don't like the idea of carrying people around in my pocket-- it just doesn't feel right, so I lock my puppets so nobody can pick them up, even me:
This means someone can pick Lily up only if the person is Silver and not Silver at the same time. That's impossible under any circumstances, so the lock always fails.

I'm so confused!

What happens if you don't provide a command with your puppet action, you simply type 'li'? Let's try it:
Nasty. That's MPI telling us that you didn't provide one of the two required arguments for the {force} function. We can improve on that a bit. Here's an alternative MPI function for a puppet's action success message:
Now when you mistakenly type the puppet's action without a command, you get a believable response for the character that still serves to remind you that you need to give Lily something to do when you type her action:
I'd like a birth certificate, please.

Support for puppets varies from muck to muck, but A Bug's Muck has been significantly adapted to accommodate puppets as full characters. 'Jump', 'spoof', etc. are all puppet-aware, and ABM has a special find-like utility called 'pfind' just for locating puppets. The catch: your puppet must be globally registered with the muck.

Not all puppets are intended to be developed role-play characters. Some might be made simply for OOC fun, or as support characters for just a few role-play scenes. Those puppets you won't likely want to register. Puppets based on the muck's theme with developed personalities are good candidates for registration.

To register your puppet on the ABM muck, just ask a wizard.


That's it for my tutorial on making and using puppets. I hope I was able to to de-mystify some of the puppet-making process. For more on making puppets including solutions to common puppet-making problems, visit: