Repository navigation
Conversation
|
I can see the use case for retaining mod packages temporarily, but I am hesitant to change the default behavior. If this behavior was opt-in (such as with a setting to specify retention days with 0 as default), I would be more than happy to merge this over! Thank you for taking the time to help improve Stardrop! |
You bet! Thanks for looking at it! When I get the chance, I'll implement it as an opt-in |
Archives downloaded from Nexus Mods are no longer deleted after installing. They stay in the Nexus folder for mods like ModSyncCheck to move out, and Stardrop deletes any still there once they are a week old. A download whose name is already taken by a kept archive overwrites it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZe5qavYftiucj2HUFfcDC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZe5qavYftiucj2HUFfcDC
54fe459 to
a510c11
Compare
Add an "ArchiveRetentionDays" setting, shown in the settings window under Miscellaneous. It defaults to 0, which keeps the previous behavior: an archive is deleted as soon as it is installed, and the Nexus folder is emptied on startup. A value above 0 keeps archives for that many days, and startup only deletes archives older than that. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WmGx3mbnmBQtiBLQ3BPH7b
|
Thanks for the feedback! It's now opt-in: there is a new Keep Downloaded Mod Archives (Days) setting under Miscellaneous in Settings, and it defaults to 0, which keeps the current behavior (archive deleted right after install, Nexus folder emptied on startup). Any value above 0 keeps archives for that many days. I've updated the PR title and description to match. |
Summary
Stardrop currently deletes the archive it downloaded from Nexus Mods as soon as the mod is installed, and empties the
Nexusdownload folder every time it starts. This adds an opt-in setting to keep those archives for a number of days, so other tools can pick them up. The default is unchanged.ArchiveRetentionDaysinSettings.json). It defaults to 0, which keeps the current behavior: the archive is deleted right after installing, and theNexusfolder is emptied on startup.Nexusfolder that are older than that many days.Collection installs are still deleted immediately as ModSyncCheck has no use for them.
FileMode.Createinstead ofFileMode.CreateNew, so it overwrites the old copy. The overwrite only happens once the response has succeeded, so a download that never starts leaves the old archive alone.Motivation
I maintain Mod Sync Check, which lets a multiplayer host send missing mods to joining players. When the host has a mod's original Nexus archive, it sends that file unchanged, and the player checks its MD5 with Nexus Mods before installing it. Players using Stardrop never had those archives, because Stardrop deleted them. With the setting enabled, Mod Sync Check moves them out of
%AppData%\Stardrop\Data\Nexuswhen the game starts, whether or not the game was launched from Stardrop. Otherwise they're cleaned up once they pass the retention period.Screenshots
Testing
Nexusfolder, a retention of 7 deleted only the 10-day-old one, and a retention of 0 deleted all three.Settings.json.Nexusfolder. Starting the game, Mod Sync Check moved it out and performed its actions correctly.