Changing location of tile cache?

Is there any way to change the location of the tile cache? Ideally, I’d like to move it from the default C: drive to a different drive (where I have more room). It doesn’t look to me like that’s possible, but wondering if I’m missing something. Thanks!
-Dave

I don’t believe VASSAL provides any method for moving the tile cache, no. It might be possible to symlink the default location to another folder on a different drive, but I wouldn’t bet on it working.

You can set the config directory by setting VASSAL.conf. To do that, you’d need to pass -DVASSAL.conf=path/you/want as an option to java when you start Vassal.

Thank you, Joel. I’m not sure my Java knowledge is sufficient for me to implement this, but I appreciate the response.

–Dave

Open VASSAL.bat in a text editor, such as Notepad. Find the line that begins START javaw and add -DVASSAL.conf=path/you/want after javaw -client. Save it. You may want to copy the settings files from the old location, but I don’t recall exactly where that is on Windows off the top of my head.

VASSAL default settings on Windows will be in:
C:\Users\<your-username-here>\AppData\Roaming\VASSAL\prefs

Thank you, jr, for the instructions; I’ll give it a try!

Thanks again, Joel. With the help from you and jr, I’ll give it a try!

I’m finally checking a chance to look at this more, and I don’t see a vassal.bat file anywhere. I’m running Vassal from vassal.exe; is there a startup .bat file I should be using instead?

–Dave

Joel, I see the prefs folder you referenced a file called V_Global (which I assume is Vassal global preferences). When I open it with Notepad, though, I don’t see any entry for the location of the tile cache.
–Dave

Couple of things here–yes, you found VASSAL’s global preferences file. There is no item specifying the local of the tile cache because I assume it’s “wired” to be a subfolder of where VASSAL’s preferences live by default (the aforementioned path a couple posts ago, which you obviously found).

It sounds like the Windows package for VASSAL doesn’t contain a VASSAL.bat file anymore. You can steal one from what’s in the generic build for all architectures and modify it to suit your needs.

The line I’m looking at in that batch file currently reads:
START javaw -client -cp lib/Vengine.jar VASSAL.launch.ModuleManager %*

As indicated upthread, you’ll have to append something else to this command to set the alternative folder where VASSAL will look for preferences (and if not found, create them)–I assume a new folder for the tile cache would be created there. So pretend you wanted your prefs and tile cache to go in D:\VASSAL, I think you’d want to edit to this:

START javaw -client -DVASSAL.conf=D:\VASSAL -cp lib/Vengine.jar VASSAL.launch.ModuleManager %*

There’s another way you can set -DVASSAL.conf which I always forget about. If you look in your config directory, there should be a file named vassal.vmoptions. You can add the -DVASSAL.conf line to that and it will be used whenever you start Vassal.

1 Like

I’m not finding either a config directory, or a file named vassal.vmoptions, using File Explorer. Any guidance for me? I appreciate the help very much!
–Dave

You’ll find this file one folder up from the path I mentioned here, so look in:

C:\Users\<your-username>\AppData\Roaming\VASSAL

Note that the AppData folder in your home directory is hidden by default–you have to know how to change the settings of the file browser to show hidden items in order to see it.

I have tried adding the following line at the end of the vassal.vmoptions file:
-DVASSAL.conf=path/D:Program Files/Vassal

When I then run vassal.exe, I get an “internal error” message for Vassal. The text of the error is below. Once again, any help appreciated, and TIA!
–Dave

2023-04-01 07:19:00,352 [18004-main] INFO VASSAL.launch.StartUp - Starting
2023-04-01 07:19:00,366 [18004-main] INFO VASSAL.launch.StartUp - OS Windows 10 10.0 amd64
2023-04-01 07:19:00,366 [18004-main] INFO VASSAL.launch.StartUp - Java version 18.0.1
2023-04-01 07:19:00,366 [18004-main] INFO VASSAL.launch.StartUp - Java home D:\Program Files\Vassal\VASSAL-3.6.7\jre
2023-04-01 07:19:00,366 [18004-main] INFO VASSAL.launch.StartUp - VASSAL version 3.6.7
2023-04-01 07:19:00,598 [18004-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManager - Manager
2023-04-01 07:19:21,595 [18004-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module file D:\Users\dave1\OneDrive\Board Games\Gunslinger\Vassal GS Mod update\Gunslinger Module version library\Gunslinger_v_1.9.2.vmod
2023-04-01 07:19:22,462 [18004-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.TilingHandler - No images to tile.
2023-04-01 07:19:22,463 [18004-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module Gunslinger v 1.9.2
2023-04-01 07:19:22,469 [18004-SwingWorker-pool-2-thread-1] INFO VASSAL.tools.io.ProcessLauncher - launching D:\Program Files\Vassal\VASSAL-3.6.7\jre\bin\java -Xms512M -Xmx512M -DVASSAL.conf=path/D:Program Files/Vassal -Duser.home=C:\Users\dave1 -Duser.dir=D:\Program Files\Vassal\VASSAL-3.6.7 -cp lib\Vengine.jar VASSAL.launch.Player --load – D:\Users\dave1\OneDrive\Board Games\Gunslinger\Vassal GS Mod update\Gunslinger Module version library\Gunslinger_v_1.9.2.vmod
2023-04-01 07:19:23,294 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - Exception in thread “main”
2023-04-01 07:19:23,294 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - java.nio.file.InvalidPathException: Illegal char <:> at index 6: path/D:Program Files/Vassal

2023-04-01 07:19:23,294 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)

2023-04-01 07:19:23,294 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)

2023-04-01 07:19:23,294 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)

2023-04-01 07:19:23,294 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - at java.base/java.nio.file.Path.of(Path.java:147)

2023-04-01 07:19:23,294 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - at VASSAL.launch.StandardConfig.(StandardConfig.java:58)

2023-04-01 07:19:23,294 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - at VASSAL.launch.Player.main(Player.java:56)

2023-04-01 07:19:23,330 [18004-SwingWorker-pool-2-thread-1] INFO VASSAL.tools.io.ProcessLauncher - launching D:\Program Files\Vassal\VASSAL-3.6.7\jre\bin\java -Xms128M -Xmx128M -DVASSAL.conf=path/D:Program Files/Vassal -Duser.home=C:\Users\dave1 -Duser.dir=D:\Program Files\Vassal\VASSAL-3.6.7 -cp lib\Vengine.jar VASSAL.launch.Player --load – D:\Users\dave1\OneDrive\Board Games\Gunslinger\Vassal GS Mod update\Gunslinger Module version library\Gunslinger_v_1.9.2.vmod
2023-04-01 07:19:24,069 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - Exception in thread “main”
2023-04-01 07:19:24,069 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - java.nio.file.InvalidPathException: Illegal char <:> at index 6: path/D:Program Files/Vassal

2023-04-01 07:19:24,069 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)

2023-04-01 07:19:24,069 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)

2023-04-01 07:19:24,070 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)
at java.base/java.nio.file.Path.of(Path.java:147)
at VASSAL.launch.StandardConfig.(StandardConfig.java:58)

2023-04-01 07:19:24,070 [18004-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - at VASSAL.launch.Player.main(Player.java:56)

2023-04-01 07:19:24,192 [18004-AWT-EventQueue-0] ERROR VASSAL.tools.ErrorDialog -
java.util.concurrent.ExecutionException: java.io.IOException: failed to start child process
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at java.desktop/javax.swing.SwingWorker.get(SwingWorker.java:613)
at VASSAL.launch.AbstractLaunchAction$LaunchTask.done(AbstractLaunchAction.java:511)
at VASSAL.launch.Player$LaunchAction$1.done(Player.java:188)
at java.desktop/javax.swing.SwingWorker$5.run(SwingWorker.java:750)
at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:848)
at java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:858)
at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:311)
at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:243)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.io.IOException: failed to start child process
at VASSAL.launch.AbstractLaunchAction$LaunchTask.doInBackground(AbstractLaunchAction.java:459)
at VASSAL.launch.AbstractLaunchAction$LaunchTask.doInBackground(AbstractLaunchAction.java:262)
at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)

My expectation is that this line is malformed and should look like this:

-DVASSAL.conf=D:\Program Files\Vassal

Guess you were confused by the earlier example paths–they used forward slashes because that’s the norm for Linux filesystems. Windows uses backslashes.

Thank you, Joel! You inclination was spot on. Vassal now starts, but now I am seeing two different messages:
1, "VASSAL was unable to write the file “D:\Program Files\Vassal\plugins”, with the following details:
java.io.IOException: Could not create D:\Program Files\Vassal\plugins
at VASSAL.build.module.ExtensionsManager.ensureExists(ExtensionsManager.java:111)
at VASSAL.build.module.ExtensionsManager.(ExtensionsManager.java:69)
at VASSAL.build.module.PluginsLoader.(PluginsLoader.java:39)
at VASSAL.build.GameModule.build(GameModule.java:691)
at VASSAL.build.GameModule.build(GameModule.java:625)
at VASSAL.build.GameModule.init(GameModule.java:1858)
at VASSAL.launch.Player.launch(Player.java:87)
at VASSAL.launch.Launcher$1.run(Launcher.java:99)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

2, VASSAL was unable to write the file “D:\Program Files\Vassal\ext”, with the following details:
java.io.IOException: Could not create D:\Program Files\Vassal\ext
at VASSAL.build.module.ExtensionsManager.ensureExists(ExtensionsManager.java:111)
at VASSAL.build.module.ExtensionsManager.(ExtensionsManager.java:69)
at VASSAL.build.module.ExtensionsLoader.addTo(ExtensionsLoader.java:56)
at VASSAL.launch.Player.launch(Player.java:88)
at VASSAL.launch.Launcher$1.run(Launcher.java:99)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Sorry to be a pain, but once again, any guidance appreciated.

The initial goal was to change the location of the tile cache, so by definition this needs to be a place you have normal write privileges with your user. The default location is a (hidden) folder in your home directory, so no problems there. The larger point being: your VASSAL preferences do not go in the same location as the VASSAL program itself.

In Windows, the “Program Files” directory is a special case–normally it’s protected by Windows UAC or whatever they call the system now that prevents ordinary writing of files to places in that hierarchy, except for program installers.

You appear to have relocated the Program Files special directory to your D:\ drive, and are attempting to have VASSAL create preferences there. You should choose somewhere else on your D:\ drive, basically almost anywhere that isn’t in Program Files should work.

After a little more investigation, it looks to me like even after the modification above in the vassal.vmoptions file, new tile caches are still being written to the C: drive, in the “normal” location. Not sure if that means I’m back to square one or not!
–Dave

Ah, sorry—the config directory to be used by the Module Manager is one of the only things you can’t set from vassal.vmoptions because that file is itself in the config directory.

You need to set the config directory from the batch file if you’re going to change it.