Skip to content

RLV Relay

The RLV Relay allows collaborative restraints and roleplay devices to work together.

Overview

The relay is a system that allows multiple objects to communicate RLV restrictions to each other. When a user wears multiple RLV-enabled items, the relay ensures they work together seamlessly.

How It Works

  1. Each RLV object sends restrictions to the viewer
  2. The relay manages these restrictions
  3. Objects can query the current state of restrictions
  4. Restrictions are cleared when objects are removed

Relay Specification

The relay specification is maintained separately from the RLV API. For detailed information, see the RLV Relay Specification.

Using the Relay

Most RLV-enabled items handle relay communication automatically. As a user, you typically don't need to configure anything.

For Scripters

If you're creating RLV-enabled items that need to interact with the relay:

  1. Use standard RLV commands (@detach, @sendim, etc.)
  2. Query status with @getstatus or @getstatusall
  3. Use @notify to receive notifications about restriction changes
  4. Clean up with @clear when your object is detached

Example: Checking Status

default
{
    state_entry()
    {
        // Check current restrictions
        llOwnerSay("@getstatus=2048");
    }

    listen(integer channel, string name, key id, string message)
    {
        // Parse the restrictions
        list restrictions = llParseString2List(message, ["/"], []);
        // Handle restrictions...
    }
}

Example: Notifying on Changes

default
{
    state_entry()
    {
        // Subscribe to all restriction changes
        llOwnerSay("@notify:2048=add");
    }

    listen(integer channel, string name, key id, string message)
    {
        // message format: "/restriction=n" or "/restriction=y"
        if (llSubStringIndex(message, "/detach") == 0)
        {
            if (llSubStringIndex(message, "=n") > 0)
                llOwnerSay("Object locked!");
            else
                llOwnerSay("Object unlocked!");
        }
    }
}

Troubleshooting

Items Not Working Together

  • Ensure both items are RLV-enabled
  • Check that restrictions don't conflict
  • Use @getstatusall to see all active restrictions

Restrictions Not Clearing

  • Use @clear to manually clear restrictions
  • Wait for the garbage collector to clean up orphaned restrictions
  • Restart the viewer if issues persist

See also: Shared Folders | Configuration