The main reason for wanting to support chaining was to enable bound poses, or "Binds", within the Mesmerizer. These are poses that involve the sub being tied up in some way. Previously, while the Mesmerizer might have been able to move the sub's body into, say, a hogtie position, it would have looked rather strange without any ropes to keep them that way. As of 0.98l, the Mesmerizer can cause ropes or chains to be drawn as part of a Bind.
I will cover Binds in detail in a future post; this post is specifically about chaining. While Binds certainly use chaining, the Mesmerizer also makes the chaining features directly available, which allows for some creative "custom rigging" when securing a sub. Here's an example:
Perhaps I was a little over-zealous with those chains, and if I were doing it again, I think I'd use ropes rather than chains, but I don't think she'll be going anywhere for a while.
The restraints she's wearing are Marine Kelley's new Deluxe Straps, which have a number of LockGuard points available, and are therefore ideal for this kind of over-the-top custom rigging. I suppose I should take a step back and explain how LockGuard works.
LockGuard is the name of a protocol supported by many restraints that lets you tell them to draw a particle chain or rope from a prim on the restraint to some other prim. In addition, it provides a way for the prims that can emit chains to identify themselves by a label. For example, the loop on a collar where you would attach a leash would by convention be labeled "collarfrontloop". So if I had a wall-mounted ring (or a table-mounted ring as in the picture) and I wanted to cause a leash to be drawn from the sub's collar to that ring, I'd send a LockGuard command to "collarfrontloop" telling it to draw a chain to the ring, and I'd identify the ring by its key. Each prim in second life has a unique "key" which you can find by a somewhat convoluted process I'll describe in detail later in this post.
So the Mesmerizer doesn't really have to do very much to support chaining - it just has to be able to find the LockGuard-enabled prims that the sub is wearing, and then be able to tell them to draw chains to other prims. The following low-level LockGuard commands support that:
| Command | Params | Description |
|---|---|---|
| lglist | 0 | List all the LockGuard points that the sub is currently wearing. This command takes a few seconds to complete to give all points time to respond, even in a laggy sim. |
| lgchains | 0 | Use chains for subsequent LockGuard bindings |
| lgropes | 0 | Use ropes for subsequent LockGuard bindings |
| lgsize | 1 | Specify a size for subsequent LockGuard bindings. <p1> is a floating-point value; the default is 0.04 |
| lggrav | 1 | Specify how much subsequent LockGuard bindings should sag under gravity. <p1> is a floating-point value; the default is 0, or no sag. Negative values will make the chains or ropes lift in the middle |
| lglink | 2 | Draw a chain or rope from <p1> to <p2>. <p1> is the name of the initiating LockGuard point; <p2> is either the name of a second LockGuard point, or the key of the target prim |
| lgunlink | 1 | Remove the chain/rope drawn from LockGuard point <p1> |
| lgrestore | 0 | Restore the links that were previously drawn |
lgrestore needs a little more explanation. It is intended to be used in an on-init or on-rlv-enabled event handler, and will restore the chains that were being drawn when the sub previously logged off. Used outside that context, its behavior may be unpredictable.
These commands are what I used to draw all of the chains in the picture above, except for the one from her collar to the front left tie-point, which is a regular collar-drawn leash.
The low-level LockGuard commands only create particle chain or rope effects - they don't restrict the sub's movement in any way. In order to create chains that do restrict movement, use the leash family of commands:
| Command | Params | Description |
|---|---|---|
| leash | 0 | Draw a leash from the sub's collarfrontloop point to the command issuer. If the command issuer is wearing a compatible leash-holder, the leash will be drawn to that; if not, then it will be drawn to the center of their body |
| leashto | 1 | Draw a leash from the sub's collarfrontloop point to the prim whose key is <p1> |
| unleash | 0 | Remove the leash |
| leashlen | 1 | Set the length of the leash. <p1> is a floating point number giving the desired length in meters. |
I may add to the leash family of commands to permit leashing from other points, if I can figure out what to do if the avatar is leashed to two different points that are further apart than the sum of the lengths of the leashes.
I did discover one small annoyance when implementing LockGuard. While the LockGuard specification defines a set of standard names for various LockGuard points, not all restraints strictly follow the standard. The most common cuff attachment points should be named leftwrist, rightwrist, leftankle and rightankle according to the standard. However, several popular brands of cuffs instead use lwrist, rwrist, lankle and rankle instead. For the most part, the Mesmerizer treats these as synonyms for the standard names.
Finally, as promised, here's the process to find the key of an individual prim, in order to chain or leash to it. The process puts the key into your paste buffer, so you can then paste it into a command. The instructions are written for Firestorm, but most viewers should behave similarly.
- Right-click the object containing the prim and choose "Edit"
- Make sure the "General" tab is showing in the edit window
- If your object has just a single prim, press the "Copy Keys" button and you're done
- Otherwise, check the "Edit Linked" checkbox near the top left of the edit window.
- Use the left/right arrow buttons below the "Edit linked" checkbox to move through the individual prims of the object until the one you want is highlighted. Then press "Copy Keys" and you're done.

No comments:
Post a Comment