• Hi Guest!

    We are extremely excited to announce the release of our first Beta1.1 and the first release of our Public AddonKit!
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. For access to the Public AddonKit you must be a Creator tier member. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
  • Hi Guest!

    VaM2 Resource Categories have now been added to the Hub! For information on posting VaM2 resources and details about VaM2 related changes to our Community Forums, please see our official announcement here.
AutoThruster Plus

Plugins + Scripts AutoThruster Plus

Download [<1 MB]
this is awesome, I totally missed it. Having an issue triggering the load of a preset though. I'm in VR, and it seems it wants the path or something? Can you enable a file picker to set the path to trigger the load? Button 1, triggers preset 1, button 2 triggers preset 2, etc.
Hey, glad you found the presets. Yes, the system needs a path. I uploaded a sample scene for this plug-in and you can see the format how to do it there. I tried a bunch of times to get a file picker to work, and so far I've failed. So unfortunately for now you have to use a written path. Find that demo on my resources, and it should show you how to do it. Keep in mind that's a packaged up scene, so your presets will be local. Let me know how you make out, and once I get home I can send some screen grabs if that will help
 
Hey, glad you found the presets. Yes, the system needs a path. I uploaded a sample scene for this plug-in and you can see the format how to do it there. I tried a bunch of times to get a file picker to work, and so far I've failed. So unfortunately for now you have to use a written path. Find that demo on my resources, and it should show you how to do it. Keep in mind that's a packaged up scene, so your presets will be local. Let me know how you make out, and once I get home I can send some screen grabs if that will help
I looked at Everlaster's MoCap switcher, here is what it looks like the script is doing to make it work:


C#:
// --- Fields ---
private JSONStorableUrl _presetUrl;
private JSONStorableActionPresetFilePath _loadPresetAction;

// --- Init ---
public override void Init()
{
    CreatePresetPicker();
}

// --- Picker + Trigger Action ---
private void CreatePresetPicker()
{
    string presetDir = SuperController.singleton.currentSaveDir + "/Custom/PluginData/MyPlugin/Presets";
    Directory.CreateDirectory(presetDir);

    _presetUrl = new JSONStorableUrl("presetPath", string.Empty, "json", presetDir);
    _presetUrl.allowFullComputerBrowse = false;
    _presetUrl.allowBrowseAboveSuggestedPath = false;
    _presetUrl.hideExtension = true;
    _presetUrl.showDirs = true;

    _loadPresetAction = new JSONStorableActionPresetFilePath(
        "LoadPreset",
        HandleLoadPreset,
        _presetUrl
    );

    RegisterUrl(_presetUrl);
    RegisterPresetFilePathAction(_loadPresetAction);
}

// --- Callback when trigger fires ---
private void HandleLoadPreset(string path)
{
    if (string.IsNullOrEmpty(path)) return;

    JSONClass data = LoadJSON(path).AsObject;

    // Apply your preset data here
    SuperController.LogMessage("Loaded preset: " + path);
}
 
Last edited:
Back
Top Bottom