Hello, I am trying to find a way to change the location of the VCMI data from My Games to another folder of my choosing, but I cant see a way to do it.
There is no configuration option for that.
If you’re ok with a workaround, here’s how you can do it:
- Move the vcmi folder from My Games to wherever you want (for the purpose of this tutorial I’ll assume D:\Games\vcmi)
- Run the command line (cmd.exe) as administrator.
- In the command line, type:
mklink /J “C:\Users[your username]\Documents\My Games\vcmi” “D:\Games\vcmi”
If everything worked fine, you should see what looks like a shortcut to the vcmi folder in My Games. (but it’s not actually a normal shortcut).
Optionally, look into what mklink does, as it has been pretty useful for me in the past.
I’ve checked it a bit. The main problem is that configuration itself is in this folder. So even if we add a setting in configuration to move lets say logs to another place the settings file has to stay in user documents anyway. Still it might be possible to override it all from command line.
For instance we can introduce some -configPath .\userdata and override value of VCMIDirs::userCachePath or for instance put it to session settings and always fetch from there. But I am not sure if this cmd variable will automatically go to server process.
Another option for windows will be to introduce environment variable. Probably the easiest one.
Anyway it does not look like a feature which can be implemented quickly.
mklink with high probability might cause One Drive to sync this linked folder also.
Another option if you can afford to stop syncing txt files you can try
In early days configs were in the same config directory as other json files in vcmi folder. Return that. Now only one installation of vcmi is possible.
Yes, mklink doesn’t prevent OneDrive from syncing. That’s something I know for sure. But OP didn’t mention anything about OneDrive, so I didn’t think this might be his underlying reason for wanting to change the location of game files.
Haven’t used Windows for a while, but can’t you stop OneDrive from syncing certain folders altogether? I’d be surprised if he can’t stop syncing of My Games\vcmi while leaving the rest of Documents to work normally.
In ‘official’ releases (0.98, 0.99) those options are configurable in launcher.
They are readonly in last daily builds