Save files and Android deployment

jkweath

Goes Fast
Veteran
Joined
Sep 21, 2016
Messages
273
Reaction score
351
First Language
English
Primarily Uses
N/A
Alrighty, so first off, I apologize if I'm posting this on the wrong board. I initially thought about posting this to the deployment board, but it's not an issue with deployment specifically. I also thought about posting in the support board, but I don't expect anyone to have any information on this problem, so my goal is to get as much attention on the issue as I can. Still, please move the thread if necessary.

With that out of the way: I currently have 6 commercial games, all of which are available on Steam and the Google Play Store. The Play Store's been a good source of income for me despite the issues I've had to resolve, mainly with performance and UI.

That said, there's one major issue I have no solution for involving save files. I'll start off by linking screenshots to three users who reported the problem:

save1.png

save2.png

save3.png

The theme across these users is this: when I release an update for one game, the save files for all of my other games become seemingly unavailable.

The first idea to come to mind might be that updating one game overwrites the save files for my other games, but this doesn't seem to be the case. Updating a game whose save file was altered will seemingly restore the original save file (at the cost of all the others, of course). This shouldn't be possible if the save file was completely over-written or erased.

Two of my games (including Roguelite 2, my latest release) use Yanfly's Save Core, which grants the save files a different naming structure. Unfortunately this didn't solve the problem, as you can see with the 2nd screenshot above - after I released an update for Roguelite 2, that user lost their save data for all five of my other games.

I don't believe this happens on all devices. I happened to ask another user (different from the three pictured above) to check their save files after they downloaded an update. Their save files were thankfully unaffected. I would assume that, if every device had the same problem, I'd be flooded with email complaints and 1-star reviews, but I've only received three reports and a single 1-star review so far. (On an unrelated note: I am *very* thankful to the three above users, who were all much more understanding than I expected anyone to be after losing their save files. They all declined my offer to issue refunds.)

I spent an entire day trying to replicate the problem myself. I installed all of my games to one device and made save files for each one. After checking each game, the save files co-existed just fine. I then updated one of my games on the device. Each game was still unaffected. I tried a different device, trying different combinations of saving games to different slots, updating different games, etc. and had no luck replicating the issue.

This issue has been very frustrating for me--both because I have no idea how to solve it, and in a way, even if I did, I couldn't. This is because every update I release for a game (even one that could potentially fix that specific games' save files) runs the risk of altering the files for every other RPGMaker game installed on the same device.
And note that I said "any RPGMaker game" rather than just my games--because I assume that, unless every other RPGMaker game on Android uses a completely different save system, any update for those games could likely interfere with my games' save files, and vice versa.

I will add that, despite this long post, I'm not 100% sure that the problem is connected to game updates. Any number of things could alter a users' save files - uninstalling and reinstalling, backing up an older save to a different device, factory resets, who knows. The files for apps and programs on Android are completely hidden without rooting the device. I tried rooting four devices to find out exactly where the apps and saves are installed to, but was unsuccessful.

Though I hope anyone here with more knowledge than me knows about this issue and knows how to solve it, I've made this post more as a PSA to anyone deploying their games to the Google Play Store, specifically if you have more than one: releasing an update for one game *might* interfere with the save files for the other.
If you deploy your games before this issue is resolved, then it's likely too late to fix it, as I believe the case is for myself and my six games. I've been forced to discontinue updates for my games, and for my next release, will likely have to do extensive bug-testing on its Steam version before releasing it as-is, with no future updates ever, on the Play Store.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
2,617
Reaction score
3,791
First Language
English
Primarily Uses
RMMV
This is a very difficult problem. The issue could be in the way Android works and how MV games are deployed for Android (unfortunately I never exported to Android so I don't know much about it), it could be an issue with the way MV handles saves on Android (path problem, saving everything in the same place), or a Google Play issue, etc. I don't have the solution, but I'll be closely following this thread.
 

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
1,076
Reaction score
447
First Language
Portuguese - Br
Primarily Uses
RMMV
As a developer for Android too, with Mv, I will follow this thread close too.
I have a lot of issues publishing for android, fortunately I manage to solve, but it was hard.
I hope that Mv makes thing easier for us that develop to android.
I will see how mv handle saves later, to create some ideas of how can this happens.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,825
Reaction score
12,235
First Language
English
Primarily Uses
RMMV
1. You have SIX commercial games in MV? That is awesome!

2. What plugins do you have? Are they the same plugins, and the same versions, on each game?

3. Have any of the released updates involved updating the core js files or any plugins due to a newer version of MV being available?

4.Have the people who reported the issues all been playing the same games, and taken the same updates, and lost the same games' saves? Is there any commonality in what these people have done and reported?

I don't have answers. I don't have experience deploying to mobile. But I do like to troubleshoot problems like this. Would you be prepared to give me the unencrypted project folder for each of your games to investigate?
 

jkweath

Goes Fast
Veteran
Joined
Sep 21, 2016
Messages
273
Reaction score
351
First Language
English
Primarily Uses
N/A
@Shaz thanks for taking interest in this weird problem. I'll try to answer your questions as best I can.

1. You have SIX commercial games in MV? That is awesome!
Thanks! It's a fun hobby that helps pay the bills :)

2. What plugins do you have? Are they the same plugins, and the same versions, on each game?
3. Have any of the released updates involved updating the core js files or any plugins due to a newer version of MV being available?
So each game uses a *lot* of common plugins with a few different ones here and there. I won't bother listing off the plugin variations between the six games, so I'll try to list the common plugins between them:

  1. A large collection of Yanfly plugins, between 30-40 for each game. I assume most of Yanfly's plugins wouldn't be relevant to save files, but it's worth noting only *two* of my games, The Black Dungeon and Roguelite 2, use Yanfly's Save Core. It doesn't seem to have any impact on the issue at hand.
  2. BlackMorning's Shop Core
  3. Olivia's Anti Player Stress
  4. Kodera's Mobile Optimization plugin
  5. Aloe Guvner's Mobile UI
  6. Each game also includes a plugin of my own making that just contains various minor code edits, mostly for menu customization. They vary widely for each game.
As far as versions go, most of my games *should* have the latest versions of each Yanfly plugin. As for the core files themselves, Knight Bewitched (my first game released on Android) is at version 1.5.2 while all the others are at 1.6.1. I haven't updated the core JS files for any game post-release or updated plugin versions.

May also be worth noting each game uses Xilefian's Android Client.

4.Have the people who reported the issues all been playing the same games, and taken the same updates, and lost the same games' saves? Is there any commonality in what these people have done and reported?
I believe so. There actually has been some commonality with the reports.

The first reports of lost save files actually came after an update to my fourth release, Knight Eternal. No changes were made to the game itself with the update - all I did was update the game's app store icon. The first screenshot I posted is what resulted from this update--that person's save data for Knight Bewitched reverted back to a much earlier save, and they apparently regained their save data for Black Dungeon (though they never reported losing their save data for that). The user in the third screenshot completely lost their 10-minute save file for Knight Eternal itself, as well as another user who simply left me a 1-star review and left.

I later made a minor bugfix update to The Black Dungeon and asked the first user pictured if anything happened after they updated. Oddly enough, all of their save files remained the same, though they still didn't have their original Knight Bewitched save file.

The second time it happened came with another minor bugfix update (I fixed an incorrect Player Transfer event) for Knight Eternal, pictured in the third screenshot. This person had restarted their save after losing it originally. After the update, their save file reverted back to the 10-minute save file they had previously.

Sometime after that I released Roguelite and periodically released bugfixes for it. I didn't receive any reports of lost save files, though this might be because this game has much fewer players than my other games. Still, I asked one user to check their saves for my other games after an update, and everything appeared to look good.

My latest report came with Roguelite 2, pictured in the 2nd screenshot. I assume this person downloaded an update for Roguelite 2 before completely losing every save file for all of my other games in their collection. This was a relatively minor update that added in a couple new skills and a single event alongside some balance changes.

So after typing all this out, I've realized that the specific updates the save file loss occurred on were with two updates to Knight Eternal and one update to Roguelite 2. The problem is that none of the updates seemed to have anything in common as far as the content of the updates themselves. The two games are also radically different in terms of content and plugin selection (aside from the common plugins listed above).

It's possible that other updates to other games caused save file loss, but I have no way to know as no one's reported it. This could be partly because most users were either done with my previous games already and/or had uninstalled them.

After looking into plugins, however, I just realized Knight Eternal and Roguelite 2 have a common plugin my other games don't: Orange Greenworks. This is a plugin used for setting up achievements with the Steam versions. I *assumed* this plugin wouldn't have any impact on the Android versions of these games, so I kept it in. The supporting script for this plugin, Greenworks.js, has some code for copying save files to the Steam cloud. This might be something worth looking into.

I don't have answers. I don't have experience deploying to mobile. But I do like to troubleshoot problems like this. Would you be prepared to give me the unencrypted project folder for each of your games to investigate?
Sure, I'm open to handing over my project files depending on what exactly you think you'll need. The fastest way would be for me to send you the 'www' folder without the Image and Audio folders, and to just copy the remaining files into a blank project. Actually sending the entire projects would take awhile as I'd have to upload all the audio and image files for each project to a cloud service.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,825
Reaction score
12,235
First Language
English
Primarily Uses
RMMV
The fact that the save files disappeared and then came back is very interesting, and I have a hunch on that, based on something someone else said a few days ago in a completely unrelated topic.

Do these people use multiple save slots? Did ALL of their save slots disappear, or only one/some of them? And when that one came back again, was it in the same save slot that it was in before?

Were you the person who posted a little while ago asking about the location of the save files on Android? This will be my opportunity to dig in and find that out.

Your www folders without audio/graphics will be fine, as long as you're not using any custom audio/graphics (including character generated graphics). I need to be able to play the games and make saves. I will also need your Saves folder and the js folder so I can look at the core scripts and plugins.
 

jkweath

Goes Fast
Veteran
Joined
Sep 21, 2016
Messages
273
Reaction score
351
First Language
English
Primarily Uses
N/A
The fact that the save files disappeared and then came back is very interesting, and I have a hunch on that, based on something someone else said a few days ago in a completely unrelated topic.

Do these people use multiple save slots? Did ALL of their save slots disappear, or only one/some of them? And when that one came back again, was it in the same save slot that it was in before?
Nobody mentioned using multiple save slots, so I'm not sure. Judging by the emails, I'd assume every save slot disappeared, or at the very least the most important one, save slot 1. I believe their saves re-appeared in the same slot.

Were you the person who posted a little while ago asking about the location of the save files on Android? This will be my opportunity to dig in and find that out.
I didn't post it, though I think I did comment in it. I said it once already, but It's impossible to actually view the files for apps on Android phones without rooting the devices. If I could root one of my phones (I tried four of them with no luck), this issue would be much easier to look into.

I'll send you a PM with my project folders in a moment.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,825
Reaction score
12,235
First Language
English
Primarily Uses
RMMV
So I've had a very quick look and it seems your Yanfly plugins are all over the place, in all of the projects. They need to be in exactly the right order, or strange things will happen.

In one project you have BattleEngineCore in there twice - once disabled and once enabled. I think in that project you also have SaveCore in the plugin folder but it's not listed in the plugins.js file.

I suggest you start by going through all your projects and getting those plugins in the correct order (as listed on Yanfly's "all plugins" page) and make sure you don't have any duplicates in there. I don't know if that'll solve the issue or not, but it will rule out one possibility, which is what it's all about at this point.

I'd also disable/remove the Greenworks plugins for the Android builds, just in case it is impacting anything.
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

My sister is a saint. Specifically Saint Peter. Because shes my best friend until other ppl are around then shes all "nope, dont know him, dont like him."
Making it a rule that I don't do any world building for my new game before the actual gameplay is concrete and working. I have 16 years of lore to work with anyway.
Cheesy power metal makes everything better. No matter what you do, you'll feel heroic doing it.
Starting to really like the first of my madness areas. I think the eyes looking at them really helps to sell the place. :LZSexcite:

Forum statistics

Threads
95,699
Messages
931,121
Members
126,045
Latest member
Lpfer
Top