Anyway to stop losing my library of modules

It has taken me a long time to realise why this happens, but I eventually figured it out. I store all of my documents and downloads in the cloud, specifically GoogleDrive, this includes any and all modules I download (although not the installed Vassal engine itself of course). This has the benefit of meaning whatever laptop/pc etc. I am on all my modules are in the correct place (with no need to download them multiple times). However, if I turn on my pc or laptop and too quickly open Vassal before GoogleDrive is fully connected OR if I wake my laptop from sleep and for whatever reason the GoogleDrive app has crashed upon waking: when Vassal loads it checks to see if the modules are there and if they aren’t it WIPES my entire library, this is huge. I have to then open each module again.

Is there no way to build in a grace period or just get the engine to relax, sure you cannot follow the path right now, but maybe on a future boot up you will be able to: I would much sooner it give me an error message to say it cannot locate all modules that will remind me to close Vassal, verify GoogleDrive is loaded, connected and working then reopen Vassal and then all my modules will be there?

I imagine for someone who has outside of Vassal deleted the modules this feature is great, it means Vassal cleans up its listing, but for me it is a nightmare and a constant pain for me. I try and remind myself to slow down, but when I am due to play a scheduled game I so often just load Vassal as soon as the PC has booted and boom I lose EVERYTHING.

I have been meaning to post this for about 6 months, but I have eventually remembered now!

Thank you all.

1 Like

There relevant code is in ModuleManagerWindow.buildTree, in case anyone is looking for it.

1 Like

This is a well-known problem - see for example Vassal Library does not show up.

Vassal keeps a registry of all known modules, etc., as well as settings for individual modules in a user-specific directory

OS Directory
windows C:\Users\USERNAME\AppData\Roaming\VASSAL\
macosx ~/Library/Application Support/VASSAL/
linux ~/.VASSAL/

Specifically, the file

OS Directory
windows C:\Users\USERNAME\AppData\Roaming\VASSAL\prefs\V_Global
macosx ~/Library/Application Support/VASSAL/prefs/V_Global
linux ~/.VASSAL/prefs/V_Global

contains a list of the known modules as well as the most recently opened modules.

Thus, if you back-up that file from time to time,

OS Back-up command
windows copy C:\Users\USERNAME\AppData\Roaming\VASSAL\prefs\V_Global C:\Users\USERNAME\AppData\Roaming\VASSAL\prefs\V_Global.backup
macosx cp ~/Library/Application\ Support/VASSAL/prefs/V_Global{,.backup}
linux cp ~/.VASSAL/prefs/V_Global{,.backup}

and restore it from that back-up

OS Restore command
windows copy C:\Users\USERNAME\AppData\Roaming\VASSAL\prefs\V_Global.backup C:\Users\USERNAME\AppData\Roaming\VASSAL\prefs\V_Global
macosx cp ~/Library/Application\ Support/VASSAL/prefs/V_Global{.backup,}
linux cp ~/.VASSAL/prefs/V_Global{.backup,}

you will not need to re-import the modules into the manager.

Of course, that requires a bit of discipline on your behalf.

On linux Linux, you can open a module at a specific location by passing the --load option. Suppose you have your Google Drive Vassal directory mounted as /mnt/googledrive/vmods, and you want to play Foo.vmod from there, then you can do

$ vassal --load /mnt/googledrive/vmods/Foo.vmod

which you won’t be able to do until the directory is actually mounted. lll

That’s a looong method. Perhaps there should be a command line option that will disable the clean-up of the known modules - say --keep-modules or perhaps an explicit --clean-modules, or both defaulting to --clean-modules.

Yours,
Christian