Changing save game location

OreoCookieSP

Veteran
Veteran
Joined
Sep 24, 2015
Messages
44
Reaction score
12
First Language
English
Primarily Uses
N/A
Hello, everyone!  I'm getting close to releasing Einlanzer on Steam.  I have a couple issues I'm trying to surmount and any help you can give would be greatly appreciated.


I need to change the default location for save games from the base /Game/ folder to, say, /Game/Savegames


Shaz has a script that works great to change the save game file location to something else.  I'm no script-writer, but I'd assume I simply have to change one line of Shaz's script.  Help?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Can you please remove my script from your post and put a link to the thread instead?


It would actually be better to NOT use my script for this.  The simple solution will be to override any DataManager method that looks for Save* to look for Game/Save* instead.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.



Also I removed Shaz' script per terms of use of the script. Please only post links to scripts in the future, as most script writers do not allow posting of scripts directly.
 

OreoCookieSP

Veteran
Veteran
Joined
Sep 24, 2015
Messages
44
Reaction score
12
First Language
English
Primarily Uses
N/A
I tried several different ways to do what you said, @Shaz, but it's not working.  "Save*" only appears once in the data manager.  The line it appears in is 119 and looks like this:


    !Dir.glob('Save*.rvdata2').empty?


If I'm understanding this correctly, the global directory is Einlanzer, right?  So the file path is \Einlanzer\Savegames


What should I do to the above code?

Also I removed Shaz' script per terms of use of the script. Please only post links to scripts in the future, as most script writers do not allow posting of scripts directly.
-I didn't know that.  My apologies.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I assumed you were going to ask a scripter to make a script for you.  Save* wasn't literal - I meant anywhere that used Save (with something after it) needed to be changed.
 

OreoCookieSP

Veteran
Veteran
Joined
Sep 24, 2015
Messages
44
Reaction score
12
First Language
English
Primarily Uses
N/A
I'm not asking anyone to make a whole script for me, just a little help.  I'm spending hours trying to figure it out myself.  This seems like something that would be super fast and easy for someone who knows ruby.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I just told you how to do it.  Search for anywhere in DataManager that has Save (with something after it) as a text string, and add Savegames\ to the start of it.  There is definitely more than one place.
 

OreoCookieSP

Veteran
Veteran
Joined
Sep 24, 2015
Messages
44
Reaction score
12
First Language
English
Primarily Uses
N/A
Trying that now.  Thank you Shaz.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
In my RTP project, I find these on lines 119 and 132.  I thought there would have been more.


So your changes will be:


119: !Dir.glob('Savegames/Save*.rvdata2').empty?


132: sprintf("Savegames/Save%02d.rvdata2", index + 1)


And of course, make sure your Savegames folder exists, as this will not create it for you, and will error if it's not there.
 
Last edited by a moderator:

OreoCookieSP

Veteran
Veteran
Joined
Sep 24, 2015
Messages
44
Reaction score
12
First Language
English
Primarily Uses
N/A
Shaz, I can't thank you enough.  That is exactly what I needed.  I have been banging my head on the wall for days trying to figure this out.  I was just in the middle of contacting a buddy of mine from 15 years ago with a tech business to see if he could figure it out.

Thank you SO much!  If there's anything I can do to help you in return, let me know.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top