Tuesday, December 5, 2023

Mesmerizer 1.7.4 preview

Continuing my recent focus on use of the #RLV folder, Mesmerizer 1.7.4 adds support for "large" folders, as well as a fix for an issue with synchronous commands that's been bugging me for a while.

Large #RLV folders

Any RLV operation that returns data is limited to a message size of less than 1024 bytes.  Currently no RLV operation can return more than one message. This means that the total size of any data returned from an RLV operation has to be less that 1024 bytes.  For most operations, this isn't an issue.  However, it does become a problem when listing the contents of a folder beneath #RLV.  It is quite easy to create enough sub-folders to make the return data exceed that amount, in which case the data will be truncated.

When Mesmerizer 1.7.4 encounters a folder listing from RLV that approaches this limit, it will warn both the wearer and the requestor.  This warning also includes a suggestion to the wearer on how to fix the problem.   Assume that you asked to see the folders inside #RLV/Hair/Blonde, and that request resulted in the warning message indicating that the folder may be too large.  The way to address this is to create a new subfolder inside #RLV/Hair/Blonde called "~More" (with the leading tilde), and to move a few subfolders from #RLV/Hair/Blonde into the new folder.  The Mesmerizer will recognize the "~More" folder and will add the contents of that folder to the listing it's creating. If necessary, #RLV/Hair/Blonde/~More may itself be extended by adding a ~More folder inside it, and storing additional "overflow" subfolders in #RLV/Hair/Blonde/~More/~More.

Mesmerizer 1.7.4 limits its understanding of ~More folders to listing, but that understanding applies to both outfits and regular folders, so both getinv and listoutfits support it.  A future release will likely make these overflow folders more transparent in use (although they will always have to be set up manually by the wearer), but I wanted to get this initial level of support out as soon as possible, so for now the dominant will have to take note of whether an item to be worn is in the base folder or one of the associated ~More folders.  In playing with this feature myself, it hasn't been that complicated to use.

Synchronous commands

Most Mesmerizer commands operate asynchronously - in other words the command starts an operation but doesn't wait for it to complete before moving on to the next command.  The operations started by most commands are either quick (e.g. setting a restriction) or are intended to continue until stopped (e.g. follow).   However, a few commands operate synchronously, meaning that the operation has to complete before the next command is executes.  The moveto command is a good example.  This command is designed so that it can be paired with something like a sit command, so that the sequence moveto chair sit chair will cause the target avatar to walk over to the selected chair, and then sit on it.  For this to work, the moveto command has to operate synchronously - no subsequent commands are processed until the moveto indicates that it's finished, which it does when the avatar is close to the target.

There's a problem with this, though.  If some object is blocking the avatar's path to the target object, then they will continue trying to walk through the object indefinitely.   It was to provide a fix for this that I introduced the continue command, which effectively signals a command completion and allows subsequent commands to be executed.  Continue is special in that the command interpreter will look ahead to see if a continue command is pending and if so, will execute it immediately.  Note that continue doesn't actually cancel the command that was running - it just lets the command interpreter move on to the next command - but in the case of moveto an object followed by a sit on the same object, the act of sitting will bring the avatar to the target object which will cause the moveto to complete.

continue was always intended to be a stop-gap - a quick manual fix for an avatar that has gotten "stuck" like this.  The proper fix would be to add a timeout to every synchronous command, so that if it didn't complete within a specified time, the command would give up.  While that's still the correct long-term approach, in Mesmerizer 1.7.4 I'm introducing another partial fix, this time one that can be used sensibly in scripts (or trigger actions or macros) as a preventative measure - the continuein command.  continuein is very simple - all it does is automatically issue a continue after a specified delay.  It's intended to be used prior to a sequence like the above.  So instead of:

moveto chair sit chair

you'd write:

continuein "10.0" moveto chair continuein "0.0" sit chair

What this does is allow the moveto chair command ten seconds to complete, after which command processing will resume.  So if the avatar got stuck on their way to the chair, after ten seconds of trying they'd be force-sat there anyway.

The second continuein "0.0" cancels any pending continuein after a successful completion of the moveto command. It's usually not strictly necessary to do this, since most commands are asynchronous and executing a continue only has an effect if a synchronous command is running.


Outfit enhancements and supporting multiple bodies

Some people use multiple bodies, switching between them according to the outfit they want to wear.  I expect this to become significantly more common now that Maitreya includes LaraX with their original Lara body, and many clothes vendors are choosing to support only one of these bodies on the reasonable assumption that if you have one, then you also have the other. 

The current Outfits support assumes that you have a base avatar (defined in the core or .basics folders) that is used with each outfit.  While OC-style outfits have supported multiple core folders for a while, P9 outfits only support a single .basics folder, which means that all Mesmerizer P9 outfits need to use the same base body.

This may also be an appropriate time to add support for the "final" Peanut-style outfits, which were carried forward into the No9 collar, and which will be referred to here as "No9 outfits".   Currently the Mesmerizer supports both Open Collar and the original Peanut layouts for outfits.  About half-way through its life, the Peanut collar introduced the No9 layout that the Mesmerizer doesn't currently offer support for.  The good thing about the new layout is that it inherently supports including the body with the outfit.  It's also much easier to set up than either OC or the original Peanut layout.  The bad thing is that it doesn't make it easy to make a "global" change (e.g. change the skin worn by a body across all outfits).  Luckily, the format in use can be determined by looking at the #RLV folder layout, so it's quite possible to support any or all of these formats without requiring any sort of manual switching.  

Like the existing OC and P9 outfits, a No 9 outfit is a folder in inventory located within the #RLV folder.  Whereas OC outfits are beneath #RLV/.Outfits and P9 outfits are beneath #RLV/Outfits, No9 outfits live under #RLV/> Outfits (that's a ">" symbol, followed by a space, followed by "Outfits").  Like with OC and P9, you can use subfolders beneath #RLV/> Outfits to help organize your No9 outfits, even though the No9 Collar doesn't support this.  The overflow folders described above also work with No9 outfits, as do images.

The actual outfit folder for a No9 outfit is very simple:  It's exactly what the viewer's Outfits look like.  In fact, that's the recommended way to create a No9 outfit - use the viewer's Appearance popup window to save what you're currently wearing as an outfit, and then in the Inventory window, drag the newly created outfit folder from beneath the system Outfits folder to a place beneath #RLV/> Outfits.  And that's it.

Allowing outfits to specify which body to use is high on my priority list.  I don't think that adding that feature to P9 outfits will be ready in time for 1.7.4, but if not, it will be in the next release after that.  Regardless, Mesmerizer 1.7.4 will include the new support for No9 outfits, which inherently supports switching bodies.

Wrap-up

In addition to the above new features, there are some miscellaneous bugfixes and performance improvements.  There is a fair amount in this new version (even without multi-body P9 outfits), but I expect it to be available within the next few weeks, unless final testing uncovers a problem.

No comments:

Post a Comment