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).