Requires VaM v1.21 or newer
Auto Get DependenciesThis is a comprehensive plugin for checking dependencies from a meta.json and downloading them from the Hub. The primary audience of this plugin are scene creators who want to ensure their users have dependencies installed before proceeding to play the scene.
The basic use case is very simple - select a meta.json, see the results, and then download everything that's missing in one go. End users who just want an alternative way to download dependencies outside of using VaM's missing packages list can use it this way, and can add the plugin to Session Plugins.
However for the main audience, scene creators, there are many options and ways to configure the plugin in the UI, many custom triggers, and many available triggerable actions. Scene creators are encouraged to add the plugin to an Empty atom.
AutoGetDependencies does not connect to the Hub independently - downloading dependencies works by simulating button clicks in VaM's missing packages list, with the list hidden away from view.
Integration to Scene Logic
The plugin UI has explanations for everything that you see in the UI:
All of the toggles in the plugin UI are triggerable. For additional parameters and actions, scroll down.
To understand the logic of what happens (what gets triggered and on what condition) when a meta.json is scanned and when you trigger the download process, see these flowcharts:
Note: The "if download pending" trigger is split into two types of actions:
- Packages Missing actions trigger when there are *any* dependencies that are actually missing
- Only Check For Updates actions trigger when there are no packages missing, but some dependencies have the "latest" requirement and "Always check for updates to 'latest'" is enabled in the plugin UI
If you want the same actions to trigger in either case, just copy the actions.
Custom Triggers
Each TRIGGER in the flowcharts corresponds to one of the buttons in the plugin UI (e.g. "If download pending..." in the UI corresponds to the "TRIGGER If Download Pending" in the flowchart).Some of the triggers have a "Send To UIText" option in the trigger panel - example:
The selected UIText atom will receive information corresponding to that trigger's condition. The same texts are shown in the plugin UI's info text area - you can familiarize yourself with what text is shown and when by using the plugin purely via the plugin UI.
Trigger condition | Text sent |
---|---|
If Download Pending | Lists of "Missing, download required", "Installed, check for update required", and "Installed, no update required" dependencies. |
If Disabled Packages Detected | List of disabled dependencies. |
If All Dependencies Installed | List of installed dependencies. |
If VaM Bundled Packages Missing | List of missing dependencies that come preinstalled with VaM (and are not available on the Hub). |
If Some Packages Not Installed | List of errors that occurred during the download. |
If 'Not On Hub' Packages Detected | List of missing dependencies that are not found on Hub. |
Setting It Up
The attached tester scene provides an interactive way to test the plugin and understand how it works in practice. It's not really intended to be used as a template for your own custom setup, although you can use it for that - it's just for illustrating how it works. It doesn't include an example of every possible custom trigger, but every condition that can send text to UIText has a preselected UIText panel in the scene.For another example setup, see @VamTimbo 's Brenda at the Beach scene. Mind the CC BY-NC-SA license! Do not copy the setup from that scene unless you intend to release your scene for free and under the same license. I encourage scene creators to create their own setups that integrate this plugin to their scene in a manner that works for them and their users.
If you don't want your var package to depend on this plugin's var package, eliminating it as a potential missing dependency, you can copy the Custom/Scripts/everlaster/AutoGetDependencies folder from this var package into your own VaM installation, and package that folder into your own scene var. Yes, this will cause a duplicate of this script's files inside your var package, but that's how that works. Remember to still credit me for the plugin if you do this.
Triggerable Parameters
Parameter | Type | Description |
---|---|---|
Rescan packages on select meta json | Toggle (default: disabled) | If enabled, Rescan Packages is called every time a meta.json is scanned for dependencies. A meta.json is scanned every time a file is selected via the file browser, or if a trigger action for scanning is called. Rescanning packages can take a long time on bloated installations. |
Recheck dependencies | Action | Starts the Identify dependencies from meta.json process from the beginning for the previously scanned meta.json file. |
Select meta json | Action | Same as the UI button - opens the file browser. When a file is selected, starts the Identify dependencies from meta.json process. |
Scan loaded scene meta json | Action | Automatically selects the meta.json from the package that the currently loaded scene is from, and starts the Identify dependencies from meta.json process. |
Auto-download if pending | Toggle (default: disabled) | If enabled, the Download missing dependencies process will begin automatically if Identify dependencies from meta.json detects missing packages (or packages that need checking for the latest version; requires "Always check for updates to '.latest'" to be enabled). |
Recheck internet connection | Action | Starts the Recheck internet connection process (see flowchart). This makes sense to trigger only if the no internet connection was detected earlier at the end of the Identify dependencies from meta.json process. |
Download missing dependencies | Action | Same as the UI button - starts the Download missing dependencies process. |
Stop download | Action | Halts the download early. Whatever files are currently downloading will still download and finish in the background. |
Open UI | Action | Opens the plugin UI. |
Copy to clipboard | Action | Each trigger condition ("If download pending..." etc.) that can send text to a UIText has a corresponding Copy to clipboard action that copies the contents from the UIText. This can be used by users to e.g. copy the list of errors from the panel that "If some packages not installed..." updated upon some failed download. |