how to save to files in a sub folder?

Discussion and help for Easy Save 3
Post Reply
funtomata
Posts: 26
Joined: Tue Feb 23, 2021 4:25 pm

how to save to files in a sub folder?

Post by funtomata »

hi,
I'm trying to group all my save files inside a subfolder of the Persistent Data Path.

I tried to do the following

Code: Select all

var settings = new ES3SerializableSettings("MySaveFolder"+System.IO.Path.PathSeparator+"myfile.es3");
ES3.Save("mykey", value, settings);
but instead of writing to a "myfile.es3" file inside the "MySaveFolder" folder, it writes to a "MySaveFolder/myfile.es3" file at the persistent data path root.

I also have another problem when trying to get the auto save to write to a specific file.

I do the following:

Code: Select all

var autoSettings = new ES3SerializableSettings("MySaveFolder"+System.IO.Path.PathSeparator+"autofile.es3"
ES3AutoSaveMgr.Current.settings = autoSettings;
And it still saves into SaveFile.es3 instead of my new file.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: how to save to files in a sub folder?

Post by Joel »

Hi there,

You simply need to provide the filePath parameter of the Easy Save methods as described in the Getting Started guide (see the Relative Path example):

https://docs.moodkie.com/easy-save-3/ge ... me-or-path

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
funtomata
Posts: 26
Joined: Tue Feb 23, 2021 4:25 pm

Re: how to save to files in a sub folder?

Post by funtomata »

Ok I had hoped the settings would have proven more useful for this purpose, but I guess I'll just save the file path string instead of putting it in a settings.

What about the autosave issue though? I can't pass a file path parameter to the save method of autosave.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: how to save to files in a sub folder?

Post by Joel »

Hi there,

I answered this question in the thread you created earlier today:
https://moodkie.com/forum/viewtopic.php?p=8293#p8293

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
funtomata
Posts: 26
Joined: Tue Feb 23, 2021 4:25 pm

Re: how to save to files in a sub folder?

Post by funtomata »

Ok sorry about the confusion, been working hard all day and I'm a bit messed up.

Regarding the path problem, apparently the issue was in my use of System.IO.Path.pathSeparatorChar where I should have been using directorySeparatorChar instead
Post Reply