A question regarding episodic games...

Hello everyone!

It's been a while!
I'm currently involved in the preproduction of a new project and we're currently looking into which software to use...

We basicly want to build a game, that's made up of different episodes/chapters,
where each episode/chapter is a standalone game BUT
we'd like to check and load save files from the games/episodes/chapters that came before,
to see what decisions were made/which ending was archived (and maybe which items are still in the inventory).

So I'd basicly need to be able to grab savefiles/data (from another game) and check for certain variables/switches.
Does anyone know if that is possible?
And if so, how?
And if not, if it would be a lot of work for a programmer to write a script that makes it possible?

Like I stated above we're currently looking into different engines to see which one will do the best job for us~

Thank you!
I believe people made something like that for Ace and I THINK someone either already did that for MV or can make it. From what I've read, it's not terribly difficult to make and work with, so it's possible and can work the way you need it to.
As long as your database is consistent between episodes (items and such are saved with their numbers), it should work.
So, basically, each new instalment has to include its predecessors values at their right places.
Thank you @djDarkX and @cabfe!
Good to know that it should be possible! <3
Now I just need to figure out how to properly do it! Haha.
You're very welcome. Glad to be of some assistance. 😀
Just looking up some pieces of information from a savefile might be easier than making the savefiles from all episodes transferable.

Apparently, a savefile is just compressed json data. The StorageManager.load function reads the savefile and returns a json string, which you can turn into a json object with JsonEx.parse and then easily handle in javascript. Variables and Switches are saved as Arrays in variables._data and switches._data, respectively.

I'm just not sure how to look for a savefile from another game. The easiest way might be to ask the player to copy their savefile from an earlier episode into a specific folder in the current episode. I played around a bit and came up with this mini plugin base:
Code:
Game_Interpreter.prototype.loadOldSave = function() {
    var path = require('path');
    var base = path.dirname(process.mainModule.filename);
    var filePath = path.join(base, 'old_saves/') + 'ep01.rpgsave';
    
    var data = null;
    var fs = require('fs');
    if (fs.existsSync(filePath)) {
        data = fs.readFileSync(filePath, { encoding: 'utf8' });
    }
    var json = JsonEx.parse(LZString.decompressFromBase64(data));
    console.log(json);
    return json;
};

In a script call, you can call the function this.loadOldSave()
It looks for a file named "ep01.rpgsave" in a folder "old_saves", loads and returns the json object from it (and also prints it to the console, so that you can get a look at it). Maybe that gives you something to start with?
Try Himeworks Sync Save Data it helps with sync vatiables and swotches to savefiles and you can use those switches & variables to tell you're game what ending you get. Each ending can get a switch that would be turn on at the end.
Version your save files.
Make sure the save files contains which game made it.
Could be something as simple as a top-layer json wrapper
  • game: some_id_string
  • version: 1
  • payload: normal save data
Separate the method for importing a save from a previous game from the normal load method. This will give you a lot of flexibility with not having to care too much about the structure of your new games. Cherry picking what you want from the previous stand-alone will be easier to implement as well.
Maybe the version will only ever be 1. That's fine. But if you ever end up in a state where you need it, you will be very happy to have added it. (Yes, I regretted not versioning my save files)

P.s. I have assumed in your case a game will only ever be able to import a save from one previous game (except the first)
More complex imports is possible.

Oh yeah, do be mindful of the increased game design difficulty. You have to handle both people coming with previous saves and new players just getting that stand-alone game.

*hugs*
- Zeriab

Original thread: https://forums.rpgmakerweb.com/threads/a-question-regarding-episodic-games.79048/