Wednesday, May 30, 2018

Mesmerizer 1.1 released

The V1.1 Mesmerizer is in the vendors now;  I'll be updating the version on MP soon.  If you already own a Mesmerizer, this update is free.  To get your copy, just visit one of my vendors in Pak, Sleepy Hill or Coghaven and request a re-delivery.  You can actually ask for a re-delivery from any CasperVend vendor, but if you use one of my vendors, purchases from my store will be shown at the top, which will save you having to search.

Included in the V1.1 version is the CHAOS Installer, which greatly simplifies the installation of custom content (e.g. trance scripts, subliminals, animations, sounds, images, environments, etc).  You just place the content inside the installer (with notecards named according to the convention discussed in the previous post), and touch the installer to have the content automatically uploaded into your Mesmerizer (V1.1 or higher).  The installer is transferable, so your Dom(me)/hypnotist can fill it up with content and then transfer it to you for easy installation. 

Another use for the CHAOS Installer is to use it as a backup of any custom content you wish to load into your Mesmerizer.  If you load all your custom content into a "backup" Installer, then updating to a new Mesmerizer release is much easier:

  1. while wearing your old Mesmerizer, issue a /99 backup command (or have your owner do that if you don't have command access) to save your triggers and settings to local as one or more /99 messages.
  2. Take a copy of the Access notecard from your old Mesmerizer's contents by dragging it into your inventory.
  3. Switch to the new Mesmerizer and let it initialize, then drag the Access notecard you saved in step 2 into the new Mesmerizer's contents.
  4. Touch the "backup" installer to upload your custom content into the new Mesmerizer.
  5. Replay the /99 messages that were emitted in step 1 (or have your owner do that if you don't have command access) to restore all your triggers and settings.

Without a "backup" installer, step 4 above would involved dragging lots of notecards and other assets into various prims within your Mesmerizer.  Having all your content sitting in an Installer makes this step trivial.

I may enhance the Installer in a future release to be able to "snapshot" a Mesmerizer, thereby automatically creating a backup.

As mentioned in the previous post, I'm also working on a new AutoInstaller product, which you can set up to act as a channel from your Dom(me)/Hypnotist to your Mesmerizer, so that they can add and delete custom content without requiring you to be actively involved (once you've given them permission to use the AutoInstaller).  The CHAOS AutoInstaller should be released within a couple of weeks.

Wednesday, May 23, 2018

Trance Scripts and the AutoInstaller

I had planned for V1.1 of the Mesmerizer to focus on outfits, but instead two other features seem to have taken center stage in the release:  Trance Scripts and Installers.  I realized that I've never documented how to write a Mesmerizer script, other than by including the 'Default' script, so here's a quick overview of how a Mesmerizer script is structured.

Mesmerizer Scripts

Non-dynamic Mesmerizer scripts are contained in notecards, whose name starts with "Script:".  So the "Default" script is stored in a notecard called "Script:Default".  A simple script is just a series of lines of text to be displayed in the center of the sub's screen:

This is the first line
This line will be displayed next
These two lines\nare displayed together
And finally, this.

These will cause a sequence of four messages to be displayed to the sub, with the third message spanning two lines - the "\n" sequence means a line-break.  After each message is displayed, the Mesmerizer will pause to allow the sub to read the message.  The length of the pause is somewhat dependent on the length of the message - the longer the message, the longer the pause will be.

Lines starting with an exclamation point (!) are considered commands.  Commands are either script commands or Mesmerizer commands.  A script command is of the form:
!keyword = value
There are only a few script commands.  Here are examples of each of them:
!pause=60.0 (new in V1.1)
!delay=5.0

!
blank=3.0 (new in V1.1)
!
call=Sub1 (new in V1.1)
!
note=This is a note to the hypnotist (new in V1.1)
!speed=10.0

!picalpha=0.7
!piclength=10
(lines of text per picture)
!bgpics=pic1, pic2 
(keys or names of images)
!addbgpics=pic3
!subbgpics=pic1
Anything else on a line beginning with an exclamation point is assumed to be a Mesmerizer command, and will be issued to the Mesmerizer.  Any Mesmerizer command can be executed like this from within a script, so scripts can be very powerful - they can apply RLV restrictions, they can force-sit the sub, and they can even teleport the sub anywhere on the grid.  If you create triggers that perform many actions, you might want to put those actions into a notecard script and reduce the trigger action to something like runscript "myTriggerActions" - that will both free up trigger memory and improve the speed of trigger matching.

Since pause is both a Mesmerizer command and a script command, it will actually work with or without the equals sign, but using the equals sign to make the script engine interpret it directly is much more efficient, and ensures proper synchronization with subsequent script commands.  Pause and delay commands are very similar to one another - they both add the specified number of seconds to the wait period before the next line is executed or displayed.  The difference is in the notification that is sent to the hypnotist.  Delay will just add some extra seconds before executing the next command;  pause will do this too, but in addition it will inform the hypnotist that the script is waiting for his input, as described in the previous post.  Typically, the interval given to a pause command would be much larger than that used as a delay, and should be thought of as a timeout that usually won't be reached, whereas delay is expected to wait for the full interval.

blank is very similar to delay, except that it removes any on-screen text first, leaving the screen free of text for the specified number of seconds.  This is sometimes useful to insert a short break between messages.  A blank text line will do this too, but it will result in the normal delay between messages; blank is needed if you want a shorter break.

The call command invokes a second script, and the first script will wait until the called script has finished.  Dynamic scripts can call notecard scripts (and vice versa, although it's probably not a good idea to do this as dynamic scripts are expected to be fairly short-lived compared to notecard scripts).  One good use for this is to create a number of trance fragment scripts as notecards, and then create one or more higher-level scripts (either dynamic or notecard) to assemble the fragments into more complete trances.  This allows you to use the same fragment in multiple trances.

The note command sends a message to the hypnotist.  This is intended to be used to remind the hypnotist about what the trance script has done.  For example, I use it in scripts that turn on the spiral (induction scripts), to remind myself at the end of the script that the sub's spiral is still running.

speed sets the minimum wait between successive lines.  The default speed has a minimum of ten seconds between messages (more after longer messages).  I would suggest making only minimal use of the speed command though - the ideal pace of a trance is more a function of the particular sub than it is to do with the content of the trance, and there is a new scriptscale Mesmerizer command that will allow trance speed to be tweaked globally.

picalpha, piclength, bgpics, addbgpics and subbgpics allow for the automated display of background pictures during trance, behind the spiral.  picalpha sets the opacity with which pictures will be displayed, while piclength says how many messages a picture will be displayed for before the next picture is used.  bgpics is used to specify a list of pictures, and addbgpics and subbgpics make it easy to add or remove pictures from the list as the trance progresses.

Script-related Mesmerizer Commands

Since the previous posts, I've made a couple of small changes to the script-related commands.  Since I think that most often a hypnotist will want to see the text of scripts they run, I've made that the behavior you get from the playscript command, while the original "silent" behavior has been moved to the (new) runscript command.  So the playscripti command no longer exists.

Also, as mentioned above, I've added a scriptscale command, used to tweak the interval between messages displayed by a script.  The algorithm to decide how long to wait between successive messages is fairly complex, but it seems to give reasonable results.  The script can set a "speed" parameter (which defaults to ten seconds) - this is the default time to wait after displaying a short message - one of less than about 70 characters.  If the message is longer, then the wait is increased somewhat.  But the interval is multiplied by the current scriptscale value (which defaults to 1) before being used.  This lets you use copies of a common script in multiple subs' Mesmerizers, even if their reading and comprehension speeds are very different.

So here is the full set of script-related commands in V1.1:

Command Parameters Description
runscript 1 Execute script <p1>
playscript 1 Execute script <p1>, informing the hypnotist as each line is displayed
scriptscale 1 Adjust timing. The pauses between messages will be multiplied by <p1>
stopscript 0 Terminate the currently running script
pause 1 Pause the currently running script for at most <p1> seconds
resume 0 Resume the current script
createscript 1 Create a dynamic script called <p1>
deletescript 1 Delete dynamic script <p1>
addscript 2 Add line(s) <p2> to dynamic script <p1>
listscripts 0 List available dynamic and notecard scripts
dumpscript 1 Display the contents of dynamic script <p1>


CHAOS AutoInstaller


I've mentioned installers in a previous post.  They are devices that will install custom content (e.g. trance scripts, animations, subliminal sets, etc.) into a Mesmerizer.  V1.1 of the Mesmerizer will come with an installer that can be transferred, allowing for an owner to give a bundle of content to their sub in a way that's easy to add to their Mesmerizer.  The sub simply rezzes the installer, and touches it to install the content. An installer provides an easy way to pass custom content between avatars, and avoids the complexity (and danger) of directly editing the Mesmerizer's content.

The AutoInstaller is a new product that builds on this idea.  Unlike a regular installer, which an owner will edit to load up with custom content and then pass to subs (this can also be a way to sell custom content), the AutoInstaller is no-transfer, and belongs to the sub into whose Mesmerizer it will upload custom content.  It is designed to remain rezzed in a place that the sub visits frequently (their home, for example).  The sub can permit specified other people (their owner(s)) to drop content into the AutoInstaller, and it will be automatically uploaded when the sub is nearby.

This allows for an owner to easily make incremental changes to a script, or to add completely new scripts, without having to have the sub get involved with a potentially complex edit.

To capitalize on the Installer and AutoInstaller, I've made some changes to how the Mesmerizer stores some of its configuration data.  Version 1.0 stored all its Windlight environment definitions in a notecard called Env, and stored all its modes and bind definitions in a notecard called Modes.  In V1.0, adding a windlight environment or a mode involved the sub editing these notecards and adding sections for the new definition.  The installers can't do this - they can only add or replace entire notecards.  So, in order to allow an installer to add (for example) a new mode, I've changed this so that now each mode is specified in its own notecard, with a name of "Mode:" followed by  the name of the mode.  So the standard "Doll" mode is now defined in a notecard called "Mode:Doll".

The same goes for binds and Windlight environments - these are now specified in individual notecards with names starting with "Bind:" and "Env:" respectively.  Notecards defining subliminal sets must also now be prefixed with "Subliminal:".  The Installer greatly simplifies the installation of subliminal notecards compared to using the object editor.

This naming convention has the useful side-effect of collecting all definitions of a given "type" together in the Mesmerizer's contents, when viewed via the object editor.

Availability

Mesmerizer V1.1 updates should be available in vendors next week.  I will post a note here and in the CSD group, and also send out a notification via CasperVend to existing purchasers.  The AutoInstaller should be available soon after.  Note that the AutoInstaller and regular Installers will only work with Mesmerizer V1.1 (or higher).