Jump to content

How do I change my VintagestoryData folder location?


Go to solution Solved by Streetwind,

Recommended Posts

Posted

Hey all. I have a unique setup for my computers. I switch back and forth between them with an external hard drive which they share. If I'm at home, I connect the drive, there are all of my belongings. If I'm out and about, or I'm not able to use my computer, then I can plug the drive into my laptop. The issue is that, on both computers, my saves and backups are drawn from C:/Users/Appdata/Roaming/VintagestoryData. Both computers draw from their own data folders, automatically installed on my SSD, as opposed to the external drive. I've already installed the game itself on the drive, but there's nothing I can do about the data folder right now.

Currently, my solution is to update my worlds from the other computer, by moving them from one computer's VintagestoryData folder to the other. What I want is for the data folder to be on the drive, so both computers can use the same data with little more effort than plugging in the drive (which has the rest of the game anyway) and launching the game. The question now is, how do I do that? I already visited other posts to try to discern a solution, and have been unsuccessful. 

Posted

I believe one way would be to define the path within the shortcut. Disclaimer: I'm not tech savvy; someone helped me with this for my own use and I believe you could modify it for what you're trying to accomplish. Personally, I keep my data within the game folder so that I can play different versions which you'll be able to see with my target path:

Target: C:\Games\Vintagestory\VS17-rc\Vintagestory.exe --dataPath=C:\Games\Vintagestory\VS17-rc

Posted

I gave it a go with some other experiments, including in this discussion here. 

Unfortunately, nothing really worked, with what I had. Changing the targeted application didn't help, considering that the game is drawing from a data folder, the location of that is what matters here. The problem is that the executable doesn't launch from the data folder. The game folder and its data folder are two different things, basically one stores assets and the other stores worlds. It's the worlds I need to relocate for the sake of convenience.

It was a good suggestion, though. Thank you for putting it out there.

  • Solution
Posted
2 hours ago, Euri said:

The problem is that the executable doesn't launch from the data folder.

...Wait, what? o_O What does it matter where the executable is located? You're not supposed to change that, nor is it necessary. All you're supposed to do is tell the executable at startup where it should look for its data folder.

The data folder can be located anywhere you like, completely independent of the game's install directory. You could have it inside the install directory (to keep everything in one place), but you don't have to. It can even be located on network drives or external drives, so long as you ensure these drives are mounted when you try to launch the client.

I know this because I've been playing Vintage Story like that since 1.12, and it has always worked reliably.

There is probably something you misunderstood about how to set this up. Let me try to describe it again:

  • Create the directory where you want your data folder to be located in the future, and copy its full, absolute path. Paste the path into a text file or something similar for later reference. You don't need to recreate the folder structure inside the data folder, the game will do that on its own.
  • Go to your VS install directory and create a shortcut to vintagestory.exe. The easiest way to do this in Windows is the select the file, so that it is marked blue. Then, using the right mouse button, click and drag the file to an empty space inside the folder (or some other folder, or even the desktop, wherever you want it). Upon releasing the mouse button, a context menu pops up. Select "create shortcut".
  • Rightclick the shortcut, and select "Properties". A small window pops up, with a few editable fields. The topmost one is called "Target". Inside this field, do not delete anything that's already there. Instead, go to the very end, press spacebar once, and then write --dataPath your:\path\here. That's a double dash at the front. You input the absolute path to your desired future data folder that you set aside during the first step.
  • Finally, pay attention to quotation marks inside that target field. If the absolute path to your game's install directory contained spaces, then the contents of the target field in the shortcut will likely have been encased in quotation marks, so that the operating system understands it. By appending something to the very end of that, you'll have broken it, because you'll now have a quotation mark somewhere in the middle, where it doesn't belong. Find that quotation mark, and move it to the very end again, after everything you have typed.
  • If there were no quotation marks, then add them just to be sure. One at the very start before anything else, and one at the very end. This covers the edge case where your path to your desired future data folder may contain spaces or other weirdness.
  • Press OK to close the properties window. Doubleclick the shortcut in order to launch the game. Pay attention to your desired future data folder; the game should auto-populate it with certain required files and subfolders. If this did not work, I'll need you to describe to me step by step what you did, or better yet, show me your shortcut's properties with screenshots.
  • If this worked correctly, you can now move your savegames and clientsettings.json over from the default data folder to the new one.
  • Like 9
  • Thanks 7
Posted

Yes, please follow Streetwind's excellent step-by-step instructions.

Leave the executable alone. You're only defining where you'd like the game to store the data.

In my example, everything is in the install directory. For your example, your game is in the install directory (so leave it alone) and you want your data to be on an external drive (so define that absolute path).

Best of luck! If you follow Streetwind's instructions, you should be golden.

Posted


Instructions followed, and I am happy to announce success! At least for the most part. The important part is that the games now draw their saves from the data folder in my external hard drive. Thank you, both of you, for helping me out. Currently my problem is that I have two different storage drives built in to my PC, where I only have one on the laptop. However, this is something that I am figuring out on my own, and am on the right track to success.

Thank you again! 

  • Like 1
  • Cookie time 1
  • 1 year later...
Posted (edited)

Not sure what you are asking. Or in what system.

I'll assume Windows, and you told the install to place a shortcut on the desktop. Right click on the shortcut, click on Properties. You edit the string in the "Target" box.

Skip over to the ".exe" to the end of that line, and insert " --addPath " (note the spaces) and the path you want to place your savegames. Let's say you want them in "C:\Games\VS\119". The resulting  box might say something like, 

C:\VS\119\Vintagestory.exe --dataPath C:\Games\VS\119

[EDIT]

Don't change anything else, other than appending your --dataPath switch, and the switch has to be camel case. 

You DO NOT have to create the path. When the game starts, it will create the required directories and files where they belong.

[/EDIT]

[EDIT2]

I generally leave my saves under the installed version so if I want to migrate to a different computer, it's all in one place. So in my case, it would read more like, 

C:\Games\VS\119\Vintagestory.exe --dataPath C:\Games\VS\119

[/EDIT2]

[EDIT3]

Since I play with all kinds of different configurations and people, I copy/paste that shortcut several times.

Then edit them to something like, 

C:\Games\VS\119\Vintagestory.exe --dataPath C:\Games\VS\119\sara

for the games my daughter joins in, 

C:\Games\VS\119\Vintagestory.exe --dataPath C:\Games\VS\119\thor

for the games with my son and his friends, 

C:\Games\VS\119\Vintagestory.exe --dataPath C:\Games\VS\119\dacrew

for games with my tabletop gaming group, etc.

Only the saves associated with those particular players show up.

They are actually a tad more involved than that, since I only want to maintain the mods in one place, but that should give you the idea of how powerful those switches are.

[/EDIT3]

[EDIT4]

And another shameless beg for the addition of an --addMacroPath switch. ;) 

[/EDIT4]

Edited by Thorfinn
Posted (edited)

@Jade Moon I'm not sure what you're asking either. All the steps are in the list. You are asking for a more detailed description of something that has no more detail to describe.

Some time after making the above post, I went and put everything into a formalized guide: https://www.vintagestory.at/forums/topic/10676-guide-multiple-parallel-installations-of-vintage-story/

That's worded in a slightly different way, maybe that will serve you better?

Otherwise, I recommend you get help from someone IRL. A second pair of eyes to look at it, ideally someone who knows their way around Windows a bit more than you do.

Edited by Streetwind
  • 3 months later...
Posted

I was in the same boat as Euri and your fix worked, thank you so much! Now I'm having a different, even weirder issue.  I would assume that since VS is seeing the 'data' folder in a new directory that that would include the 'mods' subfolder.  When I launch VS and click on 'show mods folder' it does indeed open the new directory with all my mods in it but the mods aren't populating in game.  The saves are there but not the mods.  I tried adding mods to the old mods folder and they do show up.  So now my VS is loading saves from the new 'data' directory but mods are being loaded from the old 'data' directory.  Do I have to change the targets individually?

Posted (edited)

The game tracks where it looks for mods via an entry in the clientsettings.json file, inside the data folder. The field is called "modPaths" and is probably near the bottom.

In many cases, the game manages to find and add the mod path inside your new custom data folder on its own, but sometimes you have to tweak it yourself. I'm not sure of the exact conditions, but I suspect that copying over an existing clientsettings.json versus letting a new one autogenerate, or other such things, influence it.

If the new mod path isn't automatically found, you can edit your settings file manually, or you can supply the --addModPath commandline switch at game startup in the same way you would use the --dataPath switch. Doing it once is technically enough, but there's no harm in leaving it in your shortcut either.

 

 

Edited by Streetwind
  • 3 months later...
Posted

Mine is also being exceptionally weird, followed all steps, had the same issue as ericisawsum, went into my Json and manually fixed modPaths and it populated correctly. But when I opened my world all modded items ceased to be for whatever reason. Interestingly it seems like mods that just changed values of vanilla stuff (ex. a boost to greenhouse temperature) worked fine but items added just dont exist (ex. Iron Spear, it has been replaced with a black rectangle). What can I do to fix this?

  • 9 months later...
Posted

Yeah Wish you could change where it saves all the data easily inside of the application its self with out changing the shortcut. It ate 3gb of 5gb free on my C:\ Drive before i found this post with a search, after the game crashed when jumping up and filling in dirt behind me and thought it might have something to do with the limited HDD space i have on the OS hdd.
 

Quote

"Q:\Program Files (x86)\Vintagestory\Vintagestory.exe" --dataPath Q:\Progra~2\Vintag~2  --addModPath Q:\Progra~2\Vintag~2\Mods

had to get the short names cause it wasn't working in steam. used dir /x

Posted (edited)

Just use a symbolic link (symlink), that's what I do. I have a fairly small boot drive that I like to keep pretty clean, no apps and no games they all go on a separate drive. This can be problematic as Microsoft keeps telling devs that they should store their data in the user profile, the user profile is on the boot drive. This means, that I am still stuck with Gb of data going to my boot drive when I don't want it to. This is what symbolic links were created for, they are about as ancient as DOS itself and is supported across all operating systems, so this trick can be used by mac/linux users too.

If you feel comfortable using the command line to create a symlink, the instructions are in the spoiler below. It's recommended that you make a backup of your folder before you do this. Don't worry, symlinks were specifically introduced to do exactly this task, but better safe than sorry. 

Spoiler

So in my example, just assume I am logged in as a user called broccoliclock and I'm on Windows, this would make the default data directory...

C:\Users\broccoliclock\AppData\Roaming\VintageStoryData -- the default location

..but I would much rather this was held on a different drive, for this example I'm going to use G:\ as the drive letter, so my preferred data directory would be this...

G:\GameData\VintageStoryData -- the new location

The first thing to do is create the GameData folder on my G:\ drive, then copy the entire VintageStoryData folder to that new location. Once done you should have identical folders located in different locations; C:\Users\broccoliclock\AppData\Roaming\ and G:\GameData\.

We now need to delete the folder from the default location, but as I mentioned above keep a copy somewhere. The simplest way is to just rename the folder in the default location something like ---VintageStoryData-backup, or something similar. 

This will now leave you with two identical folders, one still called VintageStoryData and located in the G:\GameData\ folder, while the other is the backup (either stored elsewhere or in the same place but renamed).

Next we need a command prompt window, this can be opened in several ways, the easiest (imo) to press [Windows Key]+[R], a small box will appear at the bottom right, type in "CMD", then press [OK]. A classic DOS dialog window should open. 

The command you need to create the symlink is mklink, and the syntax is pretty simple, just tell it you want to create a directory symlink (/d) then provide the original location and the new location and it will create it. For me, this would be the syntax..

mklink /d C:\Users\broccoliclock\AppData\Roaming\VintagestoryData G:\GameData\VintagestoryData

NOTE: Obviously that syntax is for me, my username is broccoliclock, yours will differ, and my preferred location for the data is on my G:\ drive, again yours will differ, so you will need to change that a little to suit what you need. 

The link should be created, here is a screenshot of what you should expect your Roaming\AppData folder to look like..

Untitled-1.jpg.ca1c90d66f731a8d69b0e7e0447e1b9b.jpg

As you can see, my backup directory is just the same name but with a few dashes before it, while the mklink command has created a VintageStoryData folder that is shown with an arrow icon at the bottom right. If you were to double click that folder to open it, it would actually navigate you to the folder you symbolically linked (in my case G:\GameData\VintageStoryData).

Running the game you should notice no difference what so ever; the saves, the mods, your prefs, all as before. In fact if you play for a little time, then exit out you will notice the "date modified" for the default folder (in AppData) remains the same, while it shows your most recent changes in your new folder (in my case on the G:\ drive).

How to undo the changes? Really easy, open your file explorer, highlight the symbolic link, delete it, then copy the data from the new folder to the default one. You can delete the symlink folder using the command line, in the same way you created the symlink, but the way the command is designed it deletes the new location folder too, so I highly recommend you only delete the link from within the explorer.

This was way way way more complicated to explain than it is to implement, I'm probably doing the ocd trait of desperately trying to over explain something that in effect is far simpler and easier to implement than I am probably making it sound.

If anyone has questions, fire them at me.

Edited by Broccoli Clock
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.