- Joined
- Jun 15, 2017
- Messages
- 1,073
- Reaction score
- 2,561
- First Language
- Not English
- Primarily Uses
- RMMV
Hello ^^ I've been working on this online save backup system for quite some time now. It turned out pretty good and it's highly customizable since it is fully evented.
Want a demonstration?
Yes, I know proceed is spelled wrong here btw. The Account.txt file is auto generated for verification purposes. Without this file, if anyone enters a name and password that isn't contained in your dev's dropbox, they'll get the 'account exists' message (in the 'Yes, I have an account' choice) but files won't get uploaded or downloaded. That's why it was important for me to create this file. The event checks if this account.txt file exists or not in the dropbox folder and then goes on to say if account truly exists or not.
Before I get to the explanations, there's some things you should know:
What is this?
-->This is an evented system through which the players can backup their saves in the developer’s dropbox and retrieve them again when needed.
Why Dropbox?
-->Because I could actually wrap my head around their api. Google drive also has an api but I couldn't understand anything no matter how much I browsed the web for answers. And me being a non-programmer definitely doesn't help. But can you use google drive? Obviously. But honestly, I really hope someone would make a plugin for something like this. Eventing this was toughhh.
Who is this for?
-->People like me… who don’t understand codes and stuff and simply can’t use this plugin right here: https://forums.rpgmakerweb.com/inde...ger-simple-cloud-based-savegame-system.57750/ (If you can, please consider using this plugin. Because making this system work is tedious. Don't proceed if you don't want to go through a lot of trial and error. You have been warned.)
Why would you need to use this?
-->Well… because you can? XD Honestly, I don’t think it’s such a big requirement since it’s not cross platform (it’s only for desktop). But I spent quite some time on this (a lot actually… because I’m lifeless and I sort of enjoyed the process
) so I’m making a tutorial regardless ✧*。٩(ˊᗜˋ*)و✧*。
But seriously- If a player forgets to backup their saves and they lose the files for whatever reason, they can get them back. This also works if the game is on different computers.
And it doesn’t have to be saves. You can get any other information from the player like a survey. Or maybe a report to see how far they got in the game. As it reads text contents, you can make the game save Player’s info like level, play time, achievements, whatever you want to know about in to a txt file so it gets uploaded to you. I don’t know about other people but I will certainly find it amusing to know how my players are doing ^^
It might work for browser deployment too but I’m not that smart to figure it out. Maybe someone else can utilize this and make a plugin that offers that function.
Requirements:
A Dropbox account
-Setting up your Dropbox account-
If your existing dropbox account has decent amount of space, you don’t need a new account since we’re just going to store written content (.txt, .rpgsave, .json etc.) and they're fairly small in size. Consider making a separate dropbox account if you think your remaining space isn’t enough.
Go to https://www.dropbox.com/ and make an account if you want a new one. Or skip to the next step if you already have one.
Go to https://www.dropbox.com/developers/apps and click create an app.
Select the following options:
Hit create app
Next, you’ll be taken to a new page with a bunch of settings.
Under the permissions tab,
Tick files.content.read and files.content.write. These are the only ones we’ll need.
Remember to click submit!
Under the settings tab,
Click generate access token. You’ll be given a looong random string. You’ll need that so copy it somewhere or it will disappear and you’ll need to generate a new one.
Set Access Token expiration to No expiration.
We’re done with the dropbox part.
-Eventing-
Uploading files:
Make a section where you ask the player for their name and password. You can use the Name Input scene for this or any of these plugins here:
forums.rpgmakerweb.com
biud436.tistory.com
Here, I’m using name_password as the folder name. You might not even need a password but a name along with a password makes the combination stronger. This way players can’t access another player’s folder. If my name is HyouryuuNa and my password is iloveprocrastinating~, then my folder name is HyouryuuNa_ iloveprocrastinating~. Unique enough? Yes. What you do here is up to you. You can ask whether the player has a profile. If they do, you ask if they want to load saves. If they don’t have a profile, you can ask whether they’d like to make one. Basically, you can event this part in any way you like.
I’m making the game upload the save file every time the player saves. For this you’ll need Caethyril’s Save Load Switch plugin
(Thank you so much for taking my request Caethyril!)
Get the plugin here: https://forums.rpgmakerweb.com/index.php?threads/caethyrils-plugins.106255/ [under general]
Set the plugin parameters. I’ve set the save switch to 1 and the save Id variable to 4.
Now let’s create the save common event. Every time the player saves, the game will upload the save file to the dropbox account. We use the save switch defined in the plugin parameter (it's 1 in my case) and set the trigger to parallel.
I’ve used this script (Unfortunately I couldn’t find the original source(s) of this snippet. But anyways, thank you strangers. Because seriously, putting this together was really tough for someone with no coding experience like me. I had to browse through numerous threads because one answer didn’t have the whole thing. Oh and you guys will probably need to squish it so it fits the 12 line script space -_-):
Remember to turn the switch off or it will keep on running and you don’t want that.
Writing multiple files:
And I’ve made a ‘Save multiple’ common event too. This is useful when the player decides to upload all saves that has been made beforehand… when they didn’t have a profile. This doesn’t need a switch. Simply call it when the player chooses ‘backup saves’ or something like that.
Reading files:
I swear, this part had me banging my head against the pillow. I don’t want to get hurt ( ≧Д≦). I managed to make it work… but with the help of two variables. I wanted to do this without any game variables at all but for loop was not working and I had to step outside the little script call space.
I guess we’re done with all the basic stuff. The rest is up to your creativity. You can use the save and load script in combination to create any type of 'menu' you want.
Don't hesitate to ask me if you have any questions ^^ Though I don't have much coding knowledge, I'll try to help. Have fun eventing ^^
Want a demonstration?

Before I get to the explanations, there's some things you should know:
What is this?
-->This is an evented system through which the players can backup their saves in the developer’s dropbox and retrieve them again when needed.
Why Dropbox?
-->Because I could actually wrap my head around their api. Google drive also has an api but I couldn't understand anything no matter how much I browsed the web for answers. And me being a non-programmer definitely doesn't help. But can you use google drive? Obviously. But honestly, I really hope someone would make a plugin for something like this. Eventing this was toughhh.
Who is this for?
-->People like me… who don’t understand codes and stuff and simply can’t use this plugin right here: https://forums.rpgmakerweb.com/inde...ger-simple-cloud-based-savegame-system.57750/ (If you can, please consider using this plugin. Because making this system work is tedious. Don't proceed if you don't want to go through a lot of trial and error. You have been warned.)
Why would you need to use this?
-->Well… because you can? XD Honestly, I don’t think it’s such a big requirement since it’s not cross platform (it’s only for desktop). But I spent quite some time on this (a lot actually… because I’m lifeless and I sort of enjoyed the process
But seriously- If a player forgets to backup their saves and they lose the files for whatever reason, they can get them back. This also works if the game is on different computers.
And it doesn’t have to be saves. You can get any other information from the player like a survey. Or maybe a report to see how far they got in the game. As it reads text contents, you can make the game save Player’s info like level, play time, achievements, whatever you want to know about in to a txt file so it gets uploaded to you. I don’t know about other people but I will certainly find it amusing to know how my players are doing ^^
It might work for browser deployment too but I’m not that smart to figure it out. Maybe someone else can utilize this and make a plugin that offers that function.
-----------------------***------------------------
Well, now that you know if you should use this, let's get to the actual tutorial.Requirements:
A Dropbox account
-Setting up your Dropbox account-
If your existing dropbox account has decent amount of space, you don’t need a new account since we’re just going to store written content (.txt, .rpgsave, .json etc.) and they're fairly small in size. Consider making a separate dropbox account if you think your remaining space isn’t enough.
Go to https://www.dropbox.com/ and make an account if you want a new one. Or skip to the next step if you already have one.
Go to https://www.dropbox.com/developers/apps and click create an app.
Select the following options:
Hit create app
Next, you’ll be taken to a new page with a bunch of settings.
Under the permissions tab,
Tick files.content.read and files.content.write. These are the only ones we’ll need.
Remember to click submit!
Under the settings tab,
Click generate access token. You’ll be given a looong random string. You’ll need that so copy it somewhere or it will disappear and you’ll need to generate a new one.
Set Access Token expiration to No expiration.
We’re done with the dropbox part.
-Eventing-
Uploading files:
Make a section where you ask the player for their name and password. You can use the Name Input scene for this or any of these plugins here:
Text Input Window
I'm working on a script for making Input Scenes, it's mostly done here Terms of use: Free for Commercial and free use as long as I get some credit for the script. How to use: Screenshot Changelog: Download Bugs: ToDo: You can...

Keyboard Input Dialog - RPG Maker MV
Introduction This plugin is a Text Input System that allows you to enter various languages such as Korean, Chinese, Arabic, Japanese, and Russian. Screen shots Its result is returned with specif..
I’m making the game upload the save file every time the player saves. For this you’ll need Caethyril’s Save Load Switch plugin
(Thank you so much for taking my request Caethyril!)
Get the plugin here: https://forums.rpgmakerweb.com/index.php?threads/caethyrils-plugins.106255/ [under general]
Set the plugin parameters. I’ve set the save switch to 1 and the save Id variable to 4.
Now let’s create the save common event. Every time the player saves, the game will upload the save file to the dropbox account. We use the save switch defined in the plugin parameter (it's 1 in my case) and set the trigger to parallel.
I’ve used this script (Unfortunately I couldn’t find the original source(s) of this snippet. But anyways, thank you strangers. Because seriously, putting this together was really tough for someone with no coding experience like me. I had to browse through numerous threads because one answer didn’t have the whole thing. Oh and you guys will probably need to squish it so it fits the 12 line script space -_-):
JavaScript:
var xhr = new XMLHttpRequest();
xhr.open("GET", "save/file" + $gameVariables.value(4) + ".rpgsave", false); //Reads the save file's contents. Variable 4= Save ID. //You should change the path to www/save/... for after deployment.
xhr.send(null);
var fileContent = xhr.responseText;
var path = "/" + $gameVariables.value(1) + "_" + $gameVariables.value(2) + "/file" + $gameVariables.value(4) + ".rpgsave";
//Variable 1= name and variable 2= password. Here, the folder name is name_password. You can make it name+password, name*password, name&password or simply namepassword lmao
var accessToken = "<Your Access Token here, without the angle brackets>";
var uploadUrl = "https://content.dropboxapi.com/2/files/upload"; //Do not change this
var result;
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
result = xhr.responseText;
//console.log(result);
}
};
xhr.open("POST", uploadUrl, true);
xhr.setRequestHeader("Authorization", "Bearer " + accessToken);
xhr.setRequestHeader("Content-type", "application/octet-stream");
xhr.setRequestHeader('Dropbox-API-Arg', JSON.stringify({
path: path,
mode: 'overwrite',
autorename: true,
mute: false
}));
xhr.send(fileContent);
Writing multiple files:
And I’ve made a ‘Save multiple’ common event too. This is useful when the player decides to upload all saves that has been made beforehand… when they didn’t have a profile. This doesn’t need a switch. Simply call it when the player chooses ‘backup saves’ or something like that.
JavaScript:
for (checker = 1; checker <= 5; checker++) { //Replace 5 with your maximum save file number
var xhr = new XMLHttpRequest();
const fs = require("fs");
if (fs.existsSync("save/file" + checker + ".rpgsave")) {
xhr.open("GET", "save/file" + checker + ".rpgsave", false); //You should change the path to www/save/... for after deployment.
xhr.send(null);
var fileContent = xhr.responseText;
var path = "/" + $gameVariables.value(1) + "_" + $gameVariables.value(2) + "/file" + checker + ".rpgsave"; //Var 1=name, var 2=password
var accessToken = "<Your Access Token here, without the angle brackets>";
var uploadUrl = "https://content.dropboxapi.com/2/files/upload"; //Do not change this
var result;
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
result = xhr.responseText;
//console.log(result);
}
};
xhr.open("POST", uploadUrl, true);
xhr.setRequestHeader("Authorization", "Bearer " + accessToken);
xhr.setRequestHeader("Content-type", "application/octet-stream");
xhr.setRequestHeader('Dropbox-API-Arg', JSON.stringify({
path: path,
mode: 'overwrite',
autorename: true,
mute: false
}));
xhr.send(fileContent);
} else {}
}
Reading files:
I swear, this part had me banging my head against the pillow. I don’t want to get hurt ( ≧Д≦). I managed to make it work… but with the help of two variables. I wanted to do this without any game variables at all but for loop was not working and I had to step outside the little script call space.
JavaScript:
var path2 = "save/" + $gameVariables.value(11); //var 11= the ID of the save file. Saves in the 'save' folder. Change it to www/save/ for after deployment
var path = "/" + $gameVariables.value(1) + "_" + $gameVariables.value(2) + "/" + $gameVariables.value(11); //var 1= name, var 2 = password
var token = "<Your Access Token here, without the angle brackets>";
var url = "https://content.dropboxapi.com/2/files/download"; //as usual, don't change the url please
var result;
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status != 409) {
result = xhr.responseText;
var fs = require('fs');
fs.writeFile(path2, result, function(err) {
if (err) throw err;
console.log(result);
});
} else if (xhr.status == 409) {
$gameVariables.setValue(12, $gameVariables.value(12) + 1) //when save files are missing, simply ignore them and continue forward
}
};
xhr.open("GET", url, true);
xhr.setRequestHeader("Authorization", "Bearer " + token);
xhr.setRequestHeader('Dropbox-API-Arg', JSON.stringify({
path: path
}))
console.log(JSON.stringify({
path: path
}));
//console.log(path2 + " " + result);
xhr.send();
I guess we’re done with all the basic stuff. The rest is up to your creativity. You can use the save and load script in combination to create any type of 'menu' you want.
Don't hesitate to ask me if you have any questions ^^ Though I don't have much coding knowledge, I'll try to help. Have fun eventing ^^
Last edited: