Saturday, August 26, 2017

One more thing...

Two more things actually.  As I was wrapping up 0.99g coding, I added two more commands: the spiralalpha and setgroup commands.  They will be in this update, as well as all the things mentioned in the last couple of posts.

spiralalpha was a user request, and does pretty much what you'd expect.  It takes a single parameter which is a floating point number between 0.0 and 1.0, and sets it as the alpha (or opacity) of the spiral. An alpha of 1.0 means the spiral will be completely opaque, and non-zero values below 0.1 will be almost completely transparent.  Attempting to set it to 0 will reset it to its default value, which is 0.58.

setgroup takes a single string parameter which can be either the name or the key of a group that the subject belongs to, and it will set that as their active group.  I was prompted to add this feature as a result of frequenting a sim with rather aggressive group-based security:  if you enter the sim and you're not wearing the authorized group, then you'll be ejected in 30 seconds.  I got fed up with scrambling for my groups once the first warning arrived, so I added the ability to change groups to the Mesmerizer.  When used in conjunction with a couple of trigger rules, the group activation can be made automatic.

Assume that the sim in question is named "Ejection City", and the group that has to be active to be allowed to remain is called "City Dweller".  First, create an internal trigger to switch to that group:

/99 dwell = internal setgroup "City Dweller"

Then create a second trigger that will fire when you change regions, and which will invoke the first trigger if you're in "Ejection City":

/99 on-region = internal executeif "'$sim' 'Ejection City' streq" dwell

Note the use of double-quotes around the expression parameter to executeif, to group '$sim' 'Ejection City' streq into a single parameter, and also the use of single quotes within that expression around $sim and Ejection City to similarly ensure that each of those is treated as a single argument to streq.

Now, whenever you enter a new region, the second rule will fire.  That rule compares the current sim-name with "Ejection City", and if it matches, it invokes the first trigger, which will set the active group to "City Dweller".  So now I no longer have to worry about being too slow in changing groups and getting accidentally ejected.

Of course, you'll have to wait for 0,99g to be released before you can do this yourself.  I did send out the note to purchasers concerning the permission changes that I mentioned in the previous post, as well as sending it as a group notice to my support group, and I've pretty much decided that 0.99g will be when I make that change.  So if you bought a Mesmerizer and have given it to someone else, please send me a notecard with your name and the name of the person you've given it to, so that they will get future updates, rather than you.



Edit, 12/11/2017:

I gave a couple of triggers above that allow you to have the Mesmerizer automatically set your default group on entering a sim.  It turns out that doing this can run into an extremely annoying SL bug.  Apparently, changing the default group stops the rezzing process, so if you change your group very soon after entering a sim, you may find that various objects don't rez at all, and stay invisible.  They're still there, in that you can't walk through them, but you won't see them, and you can't click on them.  The only way to bring them back is to TP out of the sim and then come back again.

The solution is relatively simple.  I gave the following as the trigger above to change the group:

/99 dwell = internal setgroup "City Dweller"

To avoid this SL bug, you just need to delay the group change for long enough that the scene will be rezzed, for example:

/99 dwell = internal wait "10.0" setgroup "City Dweller"

Thursday, August 17, 2017

August update

The previous post talked about the upcoming 0.99g version of the Mesmerizer.  This release has grown somewhat, both in response to feature requests from users, as well as some bugs that surfaced from a new project, which I'll preview below.  As well as the two items discussed in the previous post - supporting multiple results from #RLV folder searches (which required the ability to handle list variables), and subliminals - 0.99g will now also include these new features:
  • A variant of the text command that allows you to specify how many seconds the text should stay visible.  Specifying 0 makes the text remain visible until replaced or explicitly cleared.  This can be useful during trance, to avoid "blanks" between phrases.
  • A fix for color handling and newline processing within in-trance text.  Previously, these options were honored by on-screen text when not in-trance, but broken when a spiral was displayed.
  • A fix for the image distortion that crept in unnoticed (by me at least) in an earlier update.
  • A fix to make negative setspiral numbers work properly.  Now they mean the same as the corresponding positive spiral number, except the spiral will rotate in the opposite direction.  I will also be documenting how to add your own custom spirals.
  • A new feature where, when in trance, the up-arrow and down-arrow keys can be used to supply yes/no responses.  This is discussed in more detail below.
  • A change to allow commands to be issued by a device worn by an owner.  This is needed to support the new Owner HUD.
The new 'feedback' feature was a user request, and is intended to allow a subject to respond easily to yes/no questions when in trance.  Subjects who are touch-typists typically have no problem in using the keyboard to type complex responses, even in trance.  But many people have to look down at the keyboard when typing, which immediately pulls their focus away from the trance.  I often ask new subjects to position their hands over the keyboard so that they can easily type Y or N without looking down, but that still requires two keystrokes (Y or N, plus the Enter key), and the keys are far enough away from one another that they usually need to use both hands.  So 0.99g provides a feature where, when in trance, the up-arrow and down-arrow generate "yes" or "no" responses in local chat.  There's visual feedback on the screen, in the form of a green "thumbs-up" icon, or a red "thumbs-down" icon.  And if you press the arrow keys multiple times within a short interval (half a second), you can indicate stronger agreement or disagreement (indicated by the somewhat Orwellian "+yes" or "++yes" and "-no" or "--no").

I will likely also make the change in permissions I've been talking about, making the Mesmerizer copy/mod/no-transfer.  Currently, it's no-copy/mod/transfer, the intent being that this allows a dom(me) to buy a Mesmerizer and configure it before transferring it to a sub.  This ability for the dom(me) to configure the device is valuable, but I intend to address this requirement with a separate tool, to allow just the transfer of configuration information (which will also serve as a configuration backup).  More on this in a future post.  When I do switch from transferable to copiable, I won't be able to send out the initial copiable version of the Mesmerizer automatically, since if anyone has transferred their Mesmerizer, the current owner should receive the update, and not the original purchaser.  So I'll be reaching out to current purchasers, asking them to let me know who should get future updates for the Mesmerizers they've purchased.  I'll be making a similar change in permissions to the Hubs in their next update, and again will be reaching out to prior purchasers first.

Other than the Mesmerizer itself, the other big news is that I've been working on an Owner HUD.  This will let you issue the most common Mesmerizer commands at the push of a button.  It also makes using the on-screen text command much easier than the command line, especially if you like to create multi-line messages.  With the HUD, you just type them as multiple lines - no need for messing around with "\n" character sequences.  The HUD also echoes the text and the commands that it sends, so that they appear in your local chat log, but are not visible to anyone else.  It similarly echoes Mesmerizer commands you manually type on channel 99, giving you a record of those too.  The Owner HUD works seamlessly with a CHAOS Communicator, allowing it to control remote Mesmerizers.

I expect the Mesmerizer 0.99g update to be ready for release very soon, with probably a preview version of the Owner HUD to follow soon after.