Friday, June 16, 2017

Q2 Mesmerizer Update

It's been a slow year for releases so far, but I haven't been idle.  I've been working on the updates to the Hubs and The Enforcer that I mentioned in the previous posting, along with looking at the update process in general.  Much of the CHAOS range involves configuring things with notecards or other additional inventory, and doing updates by simply replacing an item with the updated version makes for a lot of manual copying of these extra configuration items.  And for the Hubs, replacing them with an updated version requires that all the users have to reconnect.  The user migration feature that I have planned will help with this, but it would be better to perform updates in-place where possible, which is what I've been focusing on for much of the year.

In the previous post, I said that the Hubs and Enforcer updates would likely come out before the next Mesmerizer update.  I think I'm going to change my mind on that now.  As a result of user feedback, I have a couple of new Mesmerizer features that I'd like to get out ASAP, so I will likely release a Mesmerizer update first, as soon as I'm happy with the testing.

There are two main features I've added.  These are subliminals and multiple #RLV folder searching.

Subliminals

In the context of the Mesmerizer, subliminals are text messages that are selected at random from a set defined by the Owner, and are displayed briefly at random places on the wearer's screen.  These messages aren't really "subliminal" - for a message or image to be truly subliminal, it would have to be displayed in such a way that it wasn't visible to the conscious mind, but hypothetically would be seen and understood by the subconscious.  That's the definition of "subliminal" - something that's "below the threshold of sensation or consciousness".  Research pretty much indicates that true subliminal messages don't really work - if something is shown in such a way as to be invisible to the conscious mind (for example, being displayed in a single frame in a movie), then the subconscious won't see it either.

In the Mesmerizer, however, they can be useful in several ways.  First, in RP, they can be assumed to work as true subliminals, and the sub can roleplay being affected by them.  And in the context of genuine hypnosis, they can be used as subtle reminders or reinforcements of suggestions.  There are four new commands that relate to subliminals:

Command Parameters Description
subliminal 1 Start displaying subliminals as indicated by <p1> (see text). Specify "-" to disable subliminals without discarding them, and "." to re-enable them.
listsubliminals 0 List the current subliminal(s) and available sets.
subliminaltiming 2 Defines the timing to be used for subliminals. <p1> is the mean interval in seconds between displaying subliminals (default = 20 seconds); <p2> is the length each one is displayed (default = 0.5 seconds). Remember that a period is treated as a separator, so to include one in a parameter value, you need to enclose the parameter in double-quotes
subliminalparameter 2 Defines a parameter to be used within subliminals (see text).

The subliminal command is the most interesting of these. It takes a string parameter, which can be either of the two 'special' strings "-" or ".", or it can specify the actual subliminal messages to be displayed.  The two special strings are used to temporarily disable ("-") and re-enable (".") display of subliminals, without discarding the actual strings.  This is especially useful within a login event trigger - the actual subliminal messages are retained when the wearer logs out, but upon relogging, the display will be temporarily disabled.  Simply adding a subliminal "." command to a login event handler in either the Mesmerizer or The Enforcer will cause display of the currently defined subliminals to be automatically restarted on each login.

When used to define the actual subliminal messages, the parameter consists of one or more items, separated by commas, where each item is either a string that will be displayed, or "set:" that identifies a notecard containing a set of subliminals, one on each line.  The name of the notecard must start with "Subliminal:", and everything after that is the name of the "set".  So, assume you had added a notecard to the Mesmerizer called "Subliminal:Obedience", containing three lines:

Obey
I Need to Obey
I Love to Serve

The command subliminal "set:Obedience" will begin displaying subliminals, chosen at random from the three lines of the notecard, at whatever timing is currently in force.  Or you could augment the set with a literal string of your own: subliminal "set:Obedience,Obedience is Pleasure" - now each time a subliminal is displayed, it will be randomly chosen from four strings - the three in the notecard, and "Obedience is Pleasure".

While each subliminal string in a notecard has to appear on a single line, you can use the "\n" character sequence within a string to make the resulting text appear as multiple lines on-screen.

Subliminal strings, either in a notecard or given directly in the subliminal command, can contain 'parameters'.  This is mostly so that I can include some sample subliminal sets that can be used directly, without requiring editing.  The use of subliminal parameters is best illustrated by an example.

Assume you wanted a subliminal message to say "I will obey my owner".  That's fine, but it's rather impersonal.  It would be better for the message to include your name, for example "I will obey Fred".  And indeed you can create subliminals that contain your name like this.  But it's more flexible to used a parameterized syntax, where the subliminal includes a "placeholder" where the owner name will be inserted.  This lets you set the owner name without having to change the subliminal text.  So in the above string, instead of "Fred", you would put the special string "{O}" which means "Insert the O (Owner) parameter here".  The O parameter is defined via the subliminalparameter command, like this:

subliminalparameter O "Fred".

This defines the "O" parameter to be "Fred", so that the subliminal string "I will obey {O}" will be displayed as "I will obey Fred". 

Currently, "O" is the only supported parameter, but the syntax allows for other future parameters to be added.

The notecard(s) containing subliminal sets aren't stored in the main prim of the Mesmerizer.  Subliminals have added a new prim, and this is where the wearer has to put any notecards that hold sets of subliminal strings.  To make the process of adding notecards to non-root prims easy, you can use the existing maintenance command.  This command takes one parameter, which is either on or off.  Maintenance on will put the Mesmerizer into Maintenance Mode, where the various prims that might need adjusting become visible to the wearer.  Each of the major prims becomes an icon - a set of gears to indicate the main (root) prim where most of the scripts and configuration are, a "brain" icon, which is where the scripts responsible for storing triggers are located, a "loudspeaker" icon, which holds scripts relating to batching messages and the help system, and a "bat" icon, which is where the subliminals live.  So, for the owner to add a subliminal set notecard:

  1. Create the notecard in your inventory and fill in the strings, then give it to the wearer.
  2. Issue the maintenance on command to make the component parts of the Mesmerizer visible to the wearer as icons.
  3. Have the wearer right-click one of the Mesmerizer icons and choose "edit".  An edit dialog should appear, and all icons should appear highlighted.
  4. Have the wearer select the "Edit linked" checkbox in the edit dialog, and then click the "bat" icon, so that it is the only one highlighted.
  5. Have the wearer switch to the "Content" tab in the edit dialog - they should see a script called "~Subliminals", plus any existing subliminal set notecards.
  6. Have the wearer drag the new notecard from their inventory into the Content tab.  The notecard should now appear in the tab along with the script.
  7. Have the wearer press "Escape" to exit the edit dialog.
  8. Issue the maintenance off command to take the Mesmerizer out of maintenance mode.
Once the notecard is in place, you should be able to see it via the listsubliminals command, which displays all the current settings for subliminals, as well as the sets that are available.

The subliminaltiming command allows you to specify the average interval between subliminals and length of time for which each subliminal is displayed.  So subliminaltiming 20 "0.3" will cause subliminals to be displayed on average every 20 seconds, and each one will be shown for 0.3 seconds (which is probably a little too fast to read unless the messages are short).  The first parameter is the mean interval - subliminals will actually be displayed at random intervals, to prevent the wearer from predicting exactly when the next one will be shown.

#RLV searching

The Mesmerizer has had the find command for a long time.  This command looks for a folder beneath the wearer's #RLV folder that contains the string specified as a parameter.  So, for example, find cuffs would return "/MD Cuffs" or "/Restraints/Cuffs/My Cuffs" if one of those folders existed in the wearer's inventory.  There are two problems with the find command.  The first is that there is a difference between RLV and RLVa in that RLVa performs this search in a case-insensitive fashion (which is what's usually wanted), whereas RLV, at least in some viewers, appears to be case sensitive.  This isn't something the Mesmerizer can easily fix.  The second problem is that find returns only one folder name, even if there are multiple matches.  The RLV recently added a new search function to address this, and in this update I have added the findall command to make it available through the Mesmerizer.

As its name suggests, findall returns all the folders that match the provided search criteria.  The search parameter to both find and findall can be more than just a simple string - it can contain several strings, concatenated with "&&" and will only return folder names that match all of the strings.  So find "cuff&&leather" should match any of "/Leather cuffs", "/Cuffs (steel and leather)", but not "/MD Cuffs".

The findall command sends a message to the command issuer, listing all the matches found, along with index numbers.  For example:

/99 findall nude
[10:56] Nue's Mesmerizer v0.99g: 1: /Nude
2: /Nude Attachments (Standard)
3: /Nude Attachments (Emerald)


The index numbers are used to pick a specific folder.  Recall that the find command sets the variable rlvpath to the search result, so that having performed a successful find, you can then use $rlvpath in a getinv or wear command. findall sets rlvpath too, but only to the first path returned (/Nude in the above example).  But findall will also set the rlvpaths variable (note the s on the end).  Using the same example, rlvpaths will be set to ":/Nude:/Nude Attachments (Standard):/Nude Attachments (Emerald):" - in other words a colon-separated list of the individual paths, with additional colons at start and end.  The Mesmerizer uses this list format elsewhere, and provides built-in functions for testing membership in a list in this form.  As of this update, you can also use a dot-selector notation to pick a specific element from a variable that contains a list.  So, if rlvpaths contains the above list, the following variable substitutions work:

Variable Result
$rlvpaths :/Nude:/Nude Attachments (Standard):/Nude Attachments (Emerald):
$rlvpaths.1 /Nude
$rlvpaths.2 /Nude Attachments (Standard)
$rlvpaths.3 /Nude Attachments (Emerald)

So, if findall returns you a single match, then to navigate to that match you can use $rlvpath just as with the find command. But if multiple matches are returned, you can use $rlvpaths.1, $rlvpaths.2 etc. to easily navigate to whichever match you want.


I will be releasing the 0.99g update shortly.  I'll announce it in this blog, and via the in-world CSD Support group.

Update 6/24:  During testing, I've come to realize that findall is a complete replacement for find, in that it preserves all behavior of find (other than the detailed format of the user message), and so there's no need to introduce a new command.   I will simply extend the find command to have the new behavior documented above for findall.

Update 5/8/2019:  As part of the support for installers in Mesmerizer 1.1, subliminal notecards must now be named with a prefix of "Subliminal:".  So in the example above of a subliminal set called "Obedience", the corresponding notecard would be named "Subliminal:Obedience".  Also, the use of an installer to install a subliminal notecard is much simpler than the manual process described above, and should be used instead wherever possible.

No comments:

Post a Comment