Home Artists Posts Import Register

Content

This update introduces script presets for saving, loading and setting user defaults for individual scripts. The Alternate Plugins List module of UXPlus is now finalized and UXPlus is out of beta! 🎉

Hub update post: https://hub.virtamate.com/resources/uxplus.44333/update/66303/

The main Hub post is also updated: https://hub.virtamate.com/resources/uxplus.44333/

Script Presets

Script presets are like plugin presets, but individual to each script storable. Most plugins have only one script (sometimes called a module), while some have multiple scripts (e.g. Naturalis TittyMagic, BootyMagic etc.).

With script presets, you can now save and load presets and set user defaults for any script, without each plugin having to have separately implemented their own saving and loading functions, and without having to mess around with Plugin Presets which are inherently designed for collections of plugins rather than individual plugins or scripts.

The new functions are listed in a new Actions menu that opens up to the side of the plugins tab:

  • Save preset file: Opens a file browser to save a new preset file. Presets are stored in Saves/PluginData/ScriptPresets/Script_Name/

  • Load preset file: Opens a file browser to load an existing preset file.

  • Set current as user defaults: Stores the current plugin parameters to file UserDefaults.json.

  • Load user defaults: Loads UserDefaults.json if it exists.

  • Clear user defaults: Deletes UserDefaults.json if it exists. It asks for confirmation.

The other two options are moved from the Restore menu which is gone from the plugin button row:

  • Load plugin defaults: Restores the script from an empty JSON which sets all of its storable parameters to default values

  • Load pre-reload settings: Restores the script's parameters from before it was reloaded

Going into more detail:

If the user defaults file exists, it's automatically loaded when you add the plugin via Add Plugin, Add Recent or Favorites. Other means of adding a plugin (such as when plugins programmatically add them) do not trigger the default preset to load.

The same user defaults file is loaded regardless of which atom type you add the plugin to, and regardless of which var package the plugin is from. Plugin authors need to ensure newer versions of their plugins are backwards compatible anyway, so loading presets saved with parameters of earlier versions should work in the newer versions as well. However: it may not work correctly the other way around! If you save a user default preset with a plugin from package version 2, and then add the plugin from package version 1, UXPlus will try to automatically load the user defaults that were saved with the newer version's parameters. This could result in some unexpected behavior.

It's a good idea to type something into the plugin label field before saving a preset. The label is restored when you load the preset, so if you're descriptive with the labels, you'll know based on the label which preset you've loaded. UXPlus does not enforce the preset filename to be the same as the label, think of the label more as a description. However, when setting current as user defaults, if the label is empty it will automatically be set to "UserDefaults".

In the configuration UI of Alternate Plugins List, there are two additional options, both enabled by default:

As a side note, you can store user defaults for Naturalis as well using script presets. User defaults saved with UXPlus prevents Naturalis from loading the defaults saved from Naturalis itself.

Other

  • The selected option in the right click menu is now highlighted just with the usual button color change rather than bold text

  • UXPlus source files are now merged into one .cs file in the var package (which is then loaded via UXPlus.cslist)

-everlaster

Comments

babul

Awesome improvement! Can't wait to try it out!

Jeevz

doin gods work, keep it up!