"How do I..." call save file from prequel to sequel

Anthro7

Villager
Member
Joined
Feb 12, 2018
Messages
15
Reaction score
3
First Language
English
Primarily Uses
RMVXA
Shaz said:
The way we did it with the Aveyond games (Mel series), and the way I plan to do it with my game, is to simply let the player load a save file from completed game 1 into new game 2 and continue from there. It does require programming/plugins and some design decisions about how/whether you will 'reset' certain things or carry them forward.
/\ This. How is it accomplished, please? =(

The best I can find is a video on youtube where the fellow tries to teach you how to write an external text file for MV, but as I'm using VX Ace, it's a lot of guess work for my non-coder-self to translate his java to ruby. Simply setting up some kind of way to take the save file from game 1 into game 2 would be a lot simpler. Is there some kind of in-game method to have it check an older folder for the data, and copy it? Or does it have to be written into a global access folder by the first game so the second game can access it, too? Or...? @~@

To be clear, if this can be done without a script, I'd be happy. It seems like it ought to be easy enough, but I don't know how, nor the proper wording to find precisely what I want. (I've been trying to search answers since this morning and it's night now. So it's not for lack of trying.)

If it has to have a script, is it just to write the save file to a folder where multiple games could access it? How is that done? I guess special-save at the completion of game A, so that when game B is downloaded, it can have a separate thing call back to the previous folder to run a check for save data and copy it?

I don't want to do the whole "write a text file" thing if I can avoid it because (in addition to figuring out the ruby instead of java), I've got 8 playable characters and ... too many options of weapons, armors, items, and switches that I would have to line-by-line run conditional checks for and that seems REALLY extraneous. I'm happy enough using a previous save file, if someone knows how.

Or unless there's been an easier way to do it made and I just haven't been able to find it. (Sorry!)
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
12,607
Reaction score
12,928
First Language
English
Primarily Uses
RMVXA
There is no easy way. You would have to write a program yourself which would take the save data from game 1 and convert it into the format needed for save 2.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
12,607
Reaction score
12,928
First Language
English
Primarily Uses
RMVXA
No clue. Sorry. I think it was only ever attempted once in XP and that is it. I'd start by dissecting how the save data is saved and go from there.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,492
Reaction score
12,035
First Language
English
Primarily Uses
RMMV
The text file method would still have all the issues you'd run into by using the save file itself, and then you'd have to convert from the save file format to a text format to save, and then convert from a text format to a save file format to load. So the tutorial you saw is actually more difficult than just using the save files.

You will need a script. Can't be done without it. And no script exists (AFAIK) that will be suitable for everyone. Each one must be written specifically for that game.

The first obstacle you have to overcome is knowing where to look for the previous game's save file. Because the player can install the game anywhere they like, into a folder with whatever name they like, just searching for the game name in the default install folder (Program Files?) is only going to work a fraction of the time. To get around this (and to stop the save file being clobbered if you ever released patches/updates to the game, and to avoid the stupid permissions issues when you try to create a save file in a "windows-owned" folder), we made the games save in the %appdata% folder rather than the game's folder. We had total control over the names of the folders and files, so in the next game we knew exactly where to look. It also meant if two people shared the same computer with their own logins, they couldn't overwrite each other's save files.

The next obstacle is, when you know where the save files are, how do you know that the game was finished and can be used for the sequel? If they'd only started a game and saved it, you wouldn't want to be able to carry from that save file over to a new one. Our solution was to treat in-progress saves and end-game saves differently. We slightly changed the name of the save file when the game was finished, so it wouldn't be detected in the Continue menu of the current game, but it could be picked up easily by the next game. You could also have a "Finished" folder under your save folders and put them in there instead.

The third obstacle is planning for a game series where your save file gets used through two or more games. Will you carry over ALL the items, stats, etc from one game to the next or will you just start over with a lot of stuff and rely on certain switches or variables to tell you what happened in previous games? You could simply start your game 2 database with the game 1 database, not removing or changing anything that's there, and only adding new entries. Or you could start over with the new game 2 database without any of the unnecessary stuff from the game 1 database, but you would need to include logic in your script to dispose of the unnecessary stuff that carried over and convert stuff that stays but might have a different id in the database.

And of course the other thing you're going to need is the script to handle it all - one script for the first game, to save the end-game save files in the correct location and/or correct name, and one script for each subsequent game (as they will all have different requirements) to detect save files from the previous game, load them correctly, put the player in the correct map to begin, and again to save the end-game save files in the correct location and/or name, ready for use by game 3.


I cannot give you any more specific details than that, as that will be for you and your scripter to work out, based on how you want to handle it, and what you want to port from one game to the next.

I will tell you the easiest version of all of the above is to simply save the end-game save files to a specific location so in the next game you know where they're going to be, and keep the database - actors, items, switches, variables, etc - intact and just add new entries with each new game. This means your database is probably going to blow out in size, but the only scripts you'll need are those that modify the save and load functions to provide the ability to save/load the current game, and to save the current end game and to load the previous end game. I say "simply" because it's more straightforward. But it's not simple at all.

We may have also used a dll in order to retrieve the correct path to the %appdata% folder. Too long ago now to remember.
 
Last edited:

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
2,287
Reaction score
3,608
First Language
English
Primarily Uses
RMMV
Like others said, you will need a script, and I'm not aware of any publicly available script for that.
 

Anthro7

Villager
Member
Joined
Feb 12, 2018
Messages
15
Reaction score
3
First Language
English
Primarily Uses
RMVXA
*scritches nose* So all those old console games didn't have problems because they were all writing to memory cards that were only in one place, the way you guys were writing to the appdata folder. Okay. I see.

In that case, before I spend hours trying to change this method to ruby (*wince*), give up a number of variables and stick with levels-reached-by-characters only, besides the writing to a specific folder problem, do any of you guys foresee specific hurdles? (To summarize the video, it sets an event to write the text file at the end of the game, perhaps post-credits in game 1. Another event in game 2's beginning checks if the text file exists, then runs conditionals per line of it to set and adjust variables in game 2. In this case, I would have it check each of the 8 characters' levels and set them to match.) But surely it won't go that easily...

*sigh* My book is 15 episodes/chapters. If I actually get through coding 2 games (at 1 chapter per game) it will be a miracle, but work progresses slowly and steadily. (75% and counting) I would have LIKED to have carried over levels like in ye olde PS2 games, but if it's not doable, because 15 games worth of database entries are fail, what is the acceptable alternative? I've capped game 1 at "max level 10", (and there's a section that forces them all to be at least level 7), so do I just automatically start all characters at level 10 when game 2 begins? I feel like that's not fair to the people who only raised their main team and not all characters evenly, but for now the window is small, so maybe it doesn't matter? I don't know. Again, what's the acceptable method?

Tangentally, @Shaz, gracias for Simple Diagonal Movement and Remember Event Position.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,344
Reaction score
566
First Language
Italian
Primarily Uses
RMVXA
what is the acceptable alternative?
An acceptable alternative might be adding extra chapters as DLCs. That way it is much easier to transfer everything since the database will be more or less the same.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,230
Reaction score
6,775
First Language
German
Primarily Uses
RMMV
the key is how much data conversion you need. The less need for data conversion the better for the transfer - but that is extremely limiting to your story.

Theoretically you could even do this without scripts, but that would be extremely limiting.

1) if your database is identical or only adds entry, no conversion is needed here.
So if your follow-up games always contain all entries of the older games with exactly the same data, that helps data transfer a lot.
Unfortunately that also means that quest-dependent items needs to be carried over and will fill up your database despite never being used again.

2) scripts are extremely critical here. Any change in scripts that affects savefiles (50% of all scripts, and guaranteed for a 100% of the more complex scripts) will invalidate any savefile transfer.
That means that you need to develop your engine for the first game, never changing it later.
If you change the scripts for a later part of the series, you'll need a completely new save/load function to transfer over that change.

3) map positions
this is what you usually need a script for - to transfer the player to a new starting map when loading the older save.
However, this might be solved by having a transfer map planned from the very first game. If the player is transferred to a specific map before saving and that map exists on all games, then you might be able to replace the requirement for script use with a very complex way of eventing.
I don't know of anyone who tried this or succeeded, but theoretically it should be possible.
It's probably less work/pay to get the script from a scripter
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Who loves the Final Fantasy series?~
Weather and time system twin release. Now with weather icons and possibility to add them in your custom clock!
Kingdom Under Fire: The Crusaders is finally being ported to PC. I loved playing that game on the original Xbox.
A friend told me to stop making nomnom or gulping noise when eating or drinking. Plot twist of my life. I thought people can't hear that!

Forum statistics

Threads
94,411
Messages
920,758
Members
124,207
Latest member
AshleyBrowney
Top