User registration for cloud based version

Sorry if I posted something about this before, but I don't have an answer yet. It seems some people had this for MV but then it got abandoned.

I'm after a way to have my cloud based Rpg Maker MZ game require a username and login and then when Save Game happens, it is saved in a space for that particular user?

Has anyone done this or can anyone guide me?

I'm willing to pay to get this feature.

Thanks in advance for any help.
If there was an easy solution, I would be jobless.

If there are still projects for MV, it should be simple for them to upgrade for MZ as both engines are similar. But it's in their hand if they want to make the effort, of course.

First of all, you need a Backend and a Database. I think MongoDB should fit quite well here to store RPG Maker savegames. For the backend, it could be any language, probably NodeJS or maybe Python flask. Both are really easy to understand and are made for building a simple web server.

You need something to host your backend. I never dealt with that, so I can only give you some tips from what I heard. Googling for "backend as a service" might be a good start to finding something to start programming on. I heard that "Netlify" is popular but I never with that.

In the end: Why do you want to do that feature? RPG Maker automatically uses the local storage to save games which works really well. The only thing is when a user switches his device (maybe from mobile to PC?), but I don't know if this is worth the effort.
If different people are saving games played at the same web URL then I supposes they could write over eachother's games.

I have a Windows VPS.

MongoDB is very flexible at storing objects so yes.

Everything is easy once you know how. It just takes time to learn and I have to learn everything related to this project and more.

Can someone tell me what objects are needed to save the game state? Or where the code is that does this in the core?
DataManager.saveGame and DataManager.loadGame should be a good point to start.
A veeery simple approach:
  1. Create a web server with REST endpoints (register, login, save game, load game). If you want one within JavaScript, check out Oak (with Deno) or Express (with Node, tho I don't personally recommend express).
  2. When save game is hit, send a request to your REST API with the save data. You could go for a mongo/couchbase type approach or just go minimal with SQLite or PostgreSQL (cost-efficient if you have a VPS ready).
  3. When load game is hit, send a request to your REST API, which checks whether the user is logged in and sends stuff back.

You'll only need some minimal knowledge of HTTP and JavaScript for this.

I suppose I'll try to write a tutorial on it if I find time.
DataManager.saveGame and DataManager.loadGame should be a good point to start.
Looking at the code in rmmz_manager.js, it seems like

DataManager.makeSavename = function(savefileId) {
return "file%1".format(savefileId);
};

is what should be modified, either that or the part which forms the directory, probably by prefixing some kind of username before file, and similarly with loading files.

But for me, I can't really go back into learning how to code properly - life is too short to do all the things I would enjoy or even need to do.

Original thread: https://forums.rpgmakerweb.com/threads/user-registration-for-cloud-based-version.151489/