Floogen / Stardrop

Stardrop is an open-source, cross-platform mod manager for the game Stardew Valley.
https://floogen.gitbook.io/stardrop/
GNU General Public License v3.0
114 stars 31 forks source link

Add multiple mod archives from folder #146

Closed Adda0 closed 8 months ago

Adda0 commented 8 months ago

This PR adds a convenience function to add (+ update) multiple mods at once by just clicking one button. It allows for specifying one folder where to find mods (the folder is searched for archive files).

I find this workflow very pleasant to use:

  1. Click to all Update available notifications to open mod websites.
  2. Download all mods to a single folder. (Your favourite browser will remember which folder you last used for NexusMods website (and for GitHub and other websites) which makes it especially easy to update everything very swiftly.)
  3. Click one button to update all.
  4. (In another PR) Since you can disable the “delete previous folder” warning, you can immediately update all of your updatable mods, and add new mods you have found, all without any unnecessary clicking.

I have 3k mods installed. Each refresh of mod list or update of profiles takes several seconds. Therefore, it is crucial that each install of a new mod doe not refresh the mod list or update the profile. Refresh is performed only after all bulk-installed mods are installed.

Furthermore, each click on any checkbox in mod list takes several seconds, shifts the mod list view (when the mod list refreshes). For Stardrop to be usable for such quantity of mods, updating after every checkbox click is undesirable. I added a button to save changes which updates the profile, refreshes the mod list, etc. It is also automatically run when starting SMAPI, as it already was previously. For this reason, when a user clicks the checkbox, nothing happens until they click either run SMAPI, save changes, or click one of the menu save/update something options. If this is an undesirable design approach in your eyes, a settings option "Save changes manually" with tooltip description "Do not save changes until changes are confirmed." or something similar can be added, too.

If you find this feature interesting, translations (for now just copy-paste the English description, I presume) for other languages need to be added. Tested on Linux, not tested on Windows and MacOS.

Floogen commented 8 months ago

Adding multiple mods already exists as a feature via drag-and-dropping multiple mod archives, so I am unsure if I want to merge this due to feature overlap.

If drag-and-drop is not available (I assume it is not with the Steam Deck), I think a simpler solution would be to enable multiple archive selection to the File > Add Mod command.

Furthermore, each click on any checkbox in mod list takes several seconds, shifts the mod list view (when the mod list refreshes). For Stardrop to be usable for such quantity of mods, updating after every checkbox click is undesirable.

I am not able to replicate this issue, but that is likely due to a hardware difference. I do like the idea of not automatically updating the profile until SMAPI is started / via Save Profile button / before Stardrop is closed.

Adda0 commented 8 months ago

Adding multiple mods already exists as a feature via drag-and-dropping multiple mod archives, so I am unsure if I want to merge this due to feature overlap.

I can understand your reasoning. I can therefore keep this feature as a feature specific to my fork, as I really enjoy the simplicity of its workflow and do not want to lose the option. It is a pretty isolated feature which should not get in the way too much when working on other changes, I hope.

I think a simpler solution would be to enable multiple archive selection to the File > Add Mod command.

As far as I know, that should be as easy as setting the file picker call to allow selection of multiple files. The infrastructure to support the multi-selection should be already in place.

I can refactor the PR to:

  1. Allow selecting multiple archives in File -> Add Mod file picker.
  2. Remove Adding multiple archives from predefined folder automatically.
  3. Keep the save changes button and save changes only on SMAPI start or when the button is clicked.

Alternatively, I can further split the PR into:

  1. Firstly, adding a button to save changes and disabling automatic save after a mod Enable check box is clicked.
  2. After merging 1., enabling selecting multiple archives from File -> Add Mod.

How do you feel about this approach?

Floogen commented 8 months ago

The second approach works best, as I always prefer to have separate pull requests for different features.

Thank you for your efforts!

Adda0 commented 8 months ago

Closed due to splitting the PR into multiple smaller PRs and refactoring, as per https://github.com/Floogen/Stardrop/pull/146#issuecomment-1872370829.