Yanfly Save Core does not work HTML5

TheUnsaid

Villager
Member
Joined
Sep 22, 2019
Messages
10
Reaction score
2
First Language
English
Primarily Uses
RMMV
Here's my game as proof.

https://titananteus.itch.io/kaien



It always says that the save is from a different game.
 
Last edited:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,608
Reaction score
14,331
First Language
English
Primarily Uses
RMVXA
That's because when you add a plug-in you *MUST* start a new game. Old saves will not work. This is because they add variables which the old saves will not recognize. So yes, to the engine, when you add that plug-in it thinks it is from a different game as it is from a different game, one without the plug-in.
 

TheUnsaid

Villager
Member
Joined
Sep 22, 2019
Messages
10
Reaction score
2
First Language
English
Primarily Uses
RMMV
That's because when you add a plug-in you *MUST* start a new game. Old saves will not work. This is because they add variables which the old saves will not recognize. So yes, to the engine, when you add that plug-in it thinks it is from a different game as it is from a different game, one without the plug-in.

I did start a new game. My game isn't that long, so I usually start a new game to test.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,608
Reaction score
14,331
First Language
English
Primarily Uses
RMVXA
But did you delete the old saves or move them to a new directory? If they are still there it will throw off the system. As it is, it looks like it is finding an old save that doesn't match what it wants so it is marking it as for another game based on that screenshot.
 

TheUnsaid

Villager
Member
Joined
Sep 22, 2019
Messages
10
Reaction score
2
First Language
English
Primarily Uses
RMMV
But did you delete the old saves or move them to a new directory? If they are still there it will throw off the system. As it is, it looks like it is finding an old save that doesn't match what it wants so it is marking it as for another game based on that screenshot.
Please try for yourself as you're a completely new user. It's very accessible and won't take your time.
I swear even fresh runs cause that error.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,608
Reaction score
14,331
First Language
English
Primarily Uses
RMVXA
The thing is, I use that plug-in and it works for me. So it is something else causing it.
 

TheUnsaid

Villager
Member
Joined
Sep 22, 2019
Messages
10
Reaction score
2
First Language
English
Primarily Uses
RMMV
The thing is, I use that plug-in and it works for me. So it is something else causing it.
For HTML5 as well?
I have no problems on Desktop mind you.
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
857
First Language
English
Primarily Uses
RMMV
@TheUnsaid There appears to be a check against the title of the save and the title of the game during the save game verification code. I am not sure if that was added in recently or not, but once I removed the check everything worked as normal. The code that follows is a quick-fix and has the title check removed. Copy and paste the code into a '.js' file, plop it into the plugins folder, and add it as a plugin. That should fix the issue. Probably.

Code:
DataManager.isThisGameFile = function(savefileId) {
    var globalInfo = this.loadGlobalInfo();
    if (globalInfo && globalInfo[savefileId]) {
        if (StorageManager.isLocalMode()) {
            return true;
        } else {
            var savefile = globalInfo[savefileId];
            return (savefile.globalId === this._globalId);
        }
    } else {
        return false;
    }
};



EDIT: Or if you don't want to add the above as a plugin, you can edit line 273 and 274 of '/js/rpg_managers.js' :

Code:
DataManager.isThisGameFile = function(savefileId) {
    var globalInfo = this.loadGlobalInfo();
    if (globalInfo && globalInfo[savefileId]) {
        if (StorageManager.isLocalMode()) {
            return true;
        } else {
            var savefile = globalInfo[savefileId];
            return (savefile.globalId === this._globalId &&
                    savefile.title === $dataSystem.gameTitle);
            // Remove the '&& savefile.title === $dataSystem.gameTitle'
            // The line should appear as 'return (savefile.globalId === this._globalId);'
        }
    } else {
        return false;
    }
};
 

TheUnsaid

Villager
Member
Joined
Sep 22, 2019
Messages
10
Reaction score
2
First Language
English
Primarily Uses
RMMV
@Ossra
Can I hug you?

So it wasn't a save core problem. It was a basic RPG Maker problem.
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
857
First Language
English
Primarily Uses
RMMV
@TheUnsaid Well, there is an issue going on somewhere, since that check has been around since at least MV version 1.2. But, for a quick-fix you can at least use the code above.
 

SeaPhoenix

Veteran
Veteran
Joined
May 14, 2015
Messages
255
Reaction score
235
First Language
English
Primarily Uses
RMMV

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,119
First Language
English
Primarily Uses
RMMV
The save files for MV web browser games are stored in localStorage. This data storage is segregated for each domain, so if you only host one MV game on your domain then you're fine to remove that check as described above. However if you have more than one MV game on your domain then you need that check.
 

TheUnsaid

Villager
Member
Joined
Sep 22, 2019
Messages
10
Reaction score
2
First Language
English
Primarily Uses
RMMV
The save files for MV web browser games are stored in localStorage. This data storage is segregated for each domain, so if you only host one MV game on your domain then you're fine to remove that check as described above. However if you have more than one MV game on your domain then you need that check.
Don't games have a unique identifier though?
"
savefile.globalId === this._globalId
"
What's wrong with just relying on that?
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
857
First Language
English
Primarily Uses
RMMV
@TheUnsaid The 'globalId' is always -- for now at least -- set to 'RPGMV'. So there is no built-in, unique identifier for each game. YEP Save Core adds in a unique identifier, though.
 

Latest Threads

Latest Posts

Latest Profile Posts

Ami
--- Remake ---

Hero: Hey,look! Some Artist will Remake us to 3D!
M.Knight: Really? Then i hope they make me so Cool & Handsome
Heroine: I hope they make me Cute & Sexy,too
(6 Months Later,The 3D Model Are Revealed With Unexpected Yet Horrible Model)
Hero: (Spit The Water)
M.Knight: What the Hell?!
Heroine: I'm Dissapointed...
my battle system is REALLY coming together. I can already see strategies between 2 of my party members forming lol. helps that battles are 2 at a time. but the combo of these two is really fun.
@taarna23's status just made me realise I haven't had any scam calls since that guy who hung up on me before he even began reading his script. How quiet it's been ... they were pretty much the only people who ever called!

Forum statistics

Threads
107,777
Messages
1,032,103
Members
139,922
Latest member
thabetfun
Top