Possible to save data across multiple games?

Is there currently any way to share data across multiple games? For example, if i wanted to keep track of a players score on every game within my group, or perhaps for a global ban list for exploiters across all games in a group.

Has anyone done this?

8 Likes

Yes, you could do a leaderboard for a group and put it across games. That’s all I could think of.

3 Likes

You can use trello where you put your banned players on and use the same code in every game.

1 Like

how would you achieve this? Leaderboards as I have done them used DataStores which are only per-game.

Trello isn’t really meant to be a database, though the use of an external web server is definitely on the right track.

I’ve actually looked into JsonStore since I don’t quite know how to set up my own web server or anything. Simple JSON storage on this site.

1 Like

You can use Google Spreadsheets as a database that can be accessed from multiple places.
There are a few tutorials on achieving this.

1 Like

For groups? Make a group leaderboard and just put them into diffrent games, the roles for each player would stay the same in each group.

If you need a group leaderboard script:

    game.Players.PlayerAdded:connect(function(Plr)
 local Stats = Instance.new("BoolValue", Plr)
 Stats.Name = "leaderstats"
 
 local Rank = Instance.new("StringValue", Stats)
 Rank.Name = "Rank"
 Rank.Value = Plr:GetRoleInGroup(your group)
2 Likes

Yes, but you will need a webhook (or you’ll be limited by using group roles) to do this. Using a webhook you could set up a system to synchronize currencies, cosmetics, and even load other games’ data stores (assuming a server of that game was running, or you keep a backup)

I plan on using Okwo’s cross-game functionalities alongside existing roblox features for this myself.

1 Like

I see that Okwo is a Discord bot, not really designed to save data across games. How are you planning to do that?

Okwo has cross-game functionality on the Roblox end (actually added at my request) where you can run functions on another game’s server(s) if you set it up properly. Since functions support return values, one could use it to return part of another game’s data store or save to another game’s data store.

1 Like

That’s actually not a good idea for large scale things. It has a rough limit of two million cells before the sheet essentially dies; http requests don’t go through and it crashes your browser when you open it.

I’d recommend an actual database system like MongoDB or Airtable; those are designed for millions of keys.

2 Likes

As @Xiousa suggested I highly reccomend using an actual database for this, in the long run you’ll be glad you did as it’s more scalable for larger games and your data won’t have the potential to be corrupted or lost due to limitations with spreadsheets.

I highly reccomend checking out this tutorial on REST API’s and hosting your own database, it’s very useful to help you get started and is just one of the many resources you can find online.

2 Likes

You could use an external database using something like MySQL. You would have to host your own server for this though

1 Like

This is another issue resolved by my service, RBXMod. You can read about it here.

Basically RBXMod allow you to run modules on the cloud. After a review process the module is granted some capabilities, one the possible capabilities being sharing data between games owned by a single developer. If the module would protect sensitive data, it could also be granted the capability to shared data between games regardless of ownership.

How it works

hen each RBXMod starts up, it waits for connections from game servers. Game servers can request an instance of that RBXMod which runs a copy of the module. Other game servers can request new instances (if the RBXMod has the capability to run multiple instances) or join an existing one. When joining an existing session there are different required capabilities for if all the games using the instance are from the same developer or not. When games join existing instances, all of the requests are handled by the same module instance using the same variables and tables, and thus sharing data.

Right now you can create your own module but cannot grant others permissions to use it. I’m on track to ship reviews, capabilities, and permissions this Friday night. In addition, the modules can only store data in RAM right now. It may be a week or two until I implement persistent data storage. It’s pretty high up on my priority list though because many applications require it.

RBXMod aside, I’ve rented a generic HTTP/database server and used it to store information for most of the games I’ve worked on. This is probably the best way to do it but requires lots of knowledge and time.

1 Like

this is interesting, but I need to be assured that whatever solutions i choose will be supported for the long-term and/or I have control in some way.

I hope to keep an eye on what you are doing, but would you plan on releasing the software as open-source so we can roll our own?

When I first presented this idea others asked me the same question. I’ve had some time to think about it and the answer is no. The reason why is evident in my original post that started it all:

On a more personal note, I’ve put months of work into this project and this summer instead of working I’m focusing on it. Already I’ve sunk a couple hundred for server/database upkeep, SSL certificates, business licenses, ext. Projects need developers and developers need to eat (among other things). Plowing ahead and giving it my all, I need some compensation and making it open source would lesson my ability to do so.

To sum it up: IP encourages innovation and rewards entrepreneurs. For the same reason that many people would want to use RBXMod (to keep their code safe), I’ve chosen not to release the RBXMod source code.

(To give you an idea of the amount of work that has gone into it so far, right now I’m looking at my other monitor and count 42 c source, c headers, and makefiles. Some of which need to be split and a couple are over a thousand lines. All were written 100% by me from scratch and use the Linux kernel calls, a standard mysql client dll, a custom OpenSSL compilation, and modified LuaJIT)

Edit: to address your original concern of needing long term support, I suspect that this will be true for almost every user. As such, this isn’t a service that can one day suddenly stop. If I ever did choose to move on, I’d give another capable individual the keys to the kingdom. (Assuming, that is, that I didn’t enjoy working for myself and setting my own hours. Who likes flexibility anyways?)

1 Like

I FULLY respect your decision to try and make a business out of this. If you were already up and running and had been in business for a couple years, I might consider using it. This is in no way a critique of your reliability or reputability

As a serial entrepreneur for the past 15 years, I have had several projects not pan out as well as I thought they would and had to abandon them to cut losses. This is just a reality in any business. With my current project, I dont want to have to come back in a year and redo something thats broken because the service it relied on no longer exists.

I might change my mind as thing develop :slight_smile: I will keep an eye on your project, thanks!

1 Like

You can do something like what I did here for one datastore (there are some external dependencies in the lua side but you can work around them)

Nodejs: https://pastebin.com/M1pyBGgq
Lua: https://pastebin.com/rdaB1exs

What sources I used when making this:
https://redis.io/commands
https://expressjs.com/en/api.html
https://javascript.info/js

This basically emulates the Roblox datastore and uses long polling for updateasync (so its efficient I think)

But I would recommend designing a custom solution because it is much more efficient
For example for my market (which is basically the Roblox limited economy), I have endpoints for buy,list,&unlist

10 Likes

This is what I was hoping wouldn’t be the case, but this does seem like the best solution. It’s just beyond my current skill and patience to learn the skills.

I do wish there was a more plug-and-play option out there for us. There’s some above in this thread, but I wish Roblox would implement something to at least be able to share some data within a group. That or I wish there was some open-sourced API and step-by-step instructions on how to do this.

1 Like

Okwo is open sourced and DevKurka is easy to reach; you may want to try that and use datastores and cross universe functions to do this, using each game’s datastores as backups if you don’t want to manually make your own.