• Hi Guest!

    We have recently posted a VaM2 2024 Progress Update on Patreon!
    Check out the details here: https://www.patreon.com/posts/vam2-august-2024-111164439
  • Hi Guest!

    We are excited to announce a new feature on the Hub: Favorites!
    You can now add resources to your favorites, and organize your favorites into collections! You can check out the details in our official announcement!

  • Happy Holidays Guest!

    We want to announce that we will be working at reduced staffing for the holidays. Specifically Monday the 23rd until Jan 2nd.

    This will affect approval queue times and responses to support tickets. Please adjust your plans accordingly and enjoy yourselves this holiday season!
AutoGetDependencies

Plugins AutoGetDependencies

If you like this plugin, consider giving it a thumbs up or posting a review. Thanks!
Requires VaM v1.21 or newer
Auto Get Dependencies

This 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

⚠️ Warning: this is a complex plugin. Before you get started with configuring the plugin for your scenes, be sure to read this post in its entirety, read the info in the plugin UI, and try the tester scene via (download via this link).

The plugin UI has explanations for everything that you see in the UI:

1728755189881.png


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:

1728755616242.png


Note: The "if download pending" trigger is split into two types of actions:

1728757299479.png

  • 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
These allow you to differentiate between what should be shown to the user. For example, you might want to show a UIText with text "Files are missing! Proceed to download:" in one case, and "Everything is installed. Do you want to check for updates?" in the other.

If you want the same actions to trigger in either case, just copy the actions.
1728755694741.png
1728755717785.png

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:

1728757978887.png


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 conditionText sent
If Download PendingLists of "Missing, download required", "Installed, check for update required", and "Installed, no update required" dependencies.
If Disabled Packages DetectedList of disabled dependencies.
If All Dependencies InstalledList of installed dependencies.
If VaM Bundled Packages MissingList of missing dependencies that come preinstalled with VaM (and are not available on the Hub).
If Some Packages Not InstalledList of errors that occurred during the download.
If 'Not On Hub' Packages DetectedList 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.

(y) I encourage scene/look creators to create their own setups that integrate this plugin to their scene in a manner that works for them and their users, and perhaps even to share their setup under a permissive license for commercial use (CC BY, FC).

Triggerable Parameters

ParameterTypeDescription
Rescan packages on select meta jsonToggle (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 dependenciesActionStarts the Identify dependencies from meta.json process from the beginning for the previously scanned meta.json file.
Select meta jsonActionSame 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 jsonActionAutomatically 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 pendingToggle (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 connectionActionStarts 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 dependenciesActionSame as the UI button - starts the Download missing dependencies process.
Stop downloadActionHalts the download early. Whatever files are currently downloading will still download and finish in the background.
Open UIActionOpens the plugin UI.
Copy to clipboardActionEach 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.
Author
everlaster
Downloads
7,410
Views
8,555
Favorites
14
Packages
1
Total Size
0.03 MB
Version
v1.1.1 (5.var)
First release
Last update
Rating
5.00 star(s) 3 ratings

More resources from everlaster

Latest updates

  1. v1.1.1

    Fixed compatibility with VaM v1.21. Previously the plugin only compiled on v1.22, which made the...

Latest reviews

This is really useful for me!
Upvote 0
Excellent plugin, but it seems to me that logic of "If Disabled Packages Detected" should be changed - it should fire only if the dependencies needed for the current scene are disabled.

Otherwise, it turns out that the user needs to enable everything to avoid error, although this is not necessary and does not affect the scene at all.
everlaster
everlaster
Thanks for the review. It does only trigger if any dependency in the selected meta.json is disabled (and it also respects the "Search sub-dependencies" setting)
Upvote 0
This is one of the most useful concept I've seen in a while. Especially since 1/3rd of my time is spent trying to debug a problem when the real issue is... after investigation, a missing dependency on the user end.

Thank you for bringing that to the community!
Upvote 0
Back
Top Bottom