BWP Architecture

From Grigbertz

(Difference between revisions)
Jump to: navigation, search
m
m
Line 69: Line 69:
* Owner name
* Owner name
* Owner initials
* Owner initials
 +
* <b>Set Channel</b>
* <b>Operators</b> Anybody / Just me / Operator list
* <b>Operators</b> Anybody / Just me / Operator list
* <b>Operator list</b> list of names (or Groups (level 2))
* <b>Operator list</b> list of names (or Groups (level 2))
Line 77: Line 78:
==== Set State ====
==== Set State ====
* <b>Key state:</b> Key Activated / Key Not Activated
* <b>Key state:</b> Key Activated / Key Not Activated
-
* <b>Cuffed state:</b> Free / Cuffed / Cufflocked
+
* <b>Cuffed state:</b> Not Cuffed/ Cuffed
 +
* <b>Cufflocked state:</b> Not Cufflocked / Cufflocked  
* <b>Locked state</b> Unlocked / Locked
* <b>Locked state</b> Unlocked / Locked
 +
* <b>Freedom state:</b> Free (Not Cufflocked and Unlocked )/ Locked Free (Not Cuffed and Locked) / Not Free ((Cuffed and Locked) or Cufflocked)
 +
** Derived State
 +
** Free: All menu choices available.
 +
** Locked Free: You can make some menu choices like "Leash..." or "Poses..."
 +
** Not Free: Severely restricted menu choices
* <b>Sit state</b> Sitting / Not Sitting
* <b>Sit state</b> Sitting / Not Sitting
* <b>Sit pose</b> Sit Pose / Cuff Pose
* <b>Sit pose</b> Sit Pose / Cuff Pose
-
* <b>Current animation</b> Animation name
+
* <b>Cuff pose</b> Showing cuff pose / Not showing cuff pose
 +
** Derived state. A function of Sit State, Sit pose, Cuffed state
 +
* <b>Current animation</b> Animation name / NULL_STR
 +
* <b>Current squirm animation</b> Animation name / NULL_STR
 +
* <b>Current playing animation</b> Animation name / NULL_STR
 +
** Derived state. A function of Sit State, Sit pose, Current animation, Current squirm animation
 +
* <b>Leash state</b> Leashed / Unleashed
 +
* <b>Leash anchor</b> Agent key / Object Key / NULL_KEY
==== Item Properties ====
==== Item Properties ====
 +
* <b>Set Channel</b>
* <b>Item color:</b> Steel / Gold / Iron / etc....
* <b>Item color:</b> Steel / Gold / Iron / etc....
* <b>Sparkles:</b> Sparkles On / Sparkles Off
* <b>Sparkles:</b> Sparkles On / Sparkles Off

Revision as of 10:28, 6 September 2008

Second Life
Bondage Witch Project logo

Contents

Comm Module

This script listens on the Set Channel and relays incoming commands as Link Messages.

The command string looks the same sent by chat, link or e-mail.

BWP Communications Protocol

<command> = BWP::<relay info>::<set name>::<receiver>::<sender>::<action>

<action> = <action name>[|id=<key>][|<arg1>|<arg2>...|<argN>]

<receiver> = <sender> = <name>[|id=<key>][|num=<number>][|<arg1>|<arg2>...|<argN>]

Fields

  • BWP The Magic Word
  • <relay info> Values:
    • 0 - handled by any receiver
    • 1 - handled by Comm module only. Ignored by others.
    • 2 - ignored by Comm module.
  • set name Common name of all objects using the set channel
  • receiver An identifier telling the receiving end this is the action for me
    • num Optional. Script number for initial filtering of link messages. Sent as the num argument in the link message.
    • id Optional. Is this useful?
  • sender Identifies the original source of the command
    • num Optional. Sent as the sender_num argument in the link message.
    • id Optional. Is this useful?
  • action The info handled by the receiver.

The Relayed Link Message

  • sender_num = sender->num (default: 0)
  • num = receiver->num (default: 0)
  • msg = the command string
  • id = original chat message id (default: NULL_KEY)

To Do

  • How best to specify sender and recever?
  • Fields for handling of e-mail info
  • Adapt this for efficient handling of menus

Example

(take this from Techno Cuffs 'chains' script)

Main Comm module

  • All Comm modules listen to Basic Channel (set class specific) and Set Channel (set instance specific)
  • The Main Comm module handles requests on the Basic Channel for Set Channel number, if set owner matches.
  • The Main Comm module broadcasts Set Channel number on the Basic Channel when rezzed.
  • Other Comm modules request Set Channel number on the Basic Channel when rezzed.

Status Module

Handles Item status and Set status.

Any change in status is relayed to other Status Modules of the set through the set channel.
(Anti-loop exeption: A status change from a set channel message is not relayed again).

A status update is also sent to the link set.

Status should be properly applied on re-log.

Examples of status (Magic Cuffs)

Set Constants

  • Set name
  • Basic Channel
  • Basic key channel
  • Dialog strings

Set Properties

  • Owner id
  • Owner name
  • Owner initials
  • Set Channel
  • Operators Anybody / Just me / Operator list
  • Operator list list of names (or Groups (level 2))
  • Item color: Steel / Gold / Iron / etc....
  • Sparkles: Sparkles On / Sparkles Off
  • Sparkle color: White / Green / etc...

Set State

  • Key state: Key Activated / Key Not Activated
  • Cuffed state: Not Cuffed/ Cuffed
  • Cufflocked state: Not Cufflocked / Cufflocked
  • Locked state Unlocked / Locked
  • Freedom state: Free (Not Cufflocked and Unlocked )/ Locked Free (Not Cuffed and Locked) / Not Free ((Cuffed and Locked) or Cufflocked)
    • Derived State
    • Free: All menu choices available.
    • Locked Free: You can make some menu choices like "Leash..." or "Poses..."
    • Not Free: Severely restricted menu choices
  • Sit state Sitting / Not Sitting
  • Sit pose Sit Pose / Cuff Pose
  • Cuff pose Showing cuff pose / Not showing cuff pose
    • Derived state. A function of Sit State, Sit pose, Cuffed state
  • Current animation Animation name / NULL_STR
  • Current squirm animation Animation name / NULL_STR
  • Current playing animation Animation name / NULL_STR
    • Derived state. A function of Sit State, Sit pose, Current animation, Current squirm animation
  • Leash state Leashed / Unleashed
  • Leash anchor Agent key / Object Key / NULL_KEY

Item Properties

  • Set Channel
  • Item color: Steel / Gold / Iron / etc....
  • Sparkles: Sparkles On / Sparkles Off
  • Sparkle color: White / Green / etc...

Item State

  • Part of current bound anim: Cuffed / Not Cuffed
  • Cuff state: Red / Yellow / Green


Menu Module

Personal tools