One-Way, Multi-Game Data Migration [🔜]

THIS FEATURE IS COMING SOON!

This feature will be available in Version 7 and is not currently available in public version's.

This page is also a work in progress

THIS SETTING IS EXPERIMENTAL

What is this setting?

One-Way, Multi-Game Data Migration is a useful and rarely used idea that allow's for player data on a game from a diffrent game/place/universe ID to be retrieved when the player first plays. When a new player joins your game with this setting enabled and a valid API key with both games allowed data store access, the game will set the players data to what is retrieved from the other game.

Due to API limitation's, you CANNOT use this for 2 way data migration (shared data stored) and attempting to do so by manually adjusting the code will likely cause expected error's, data overlaps and data loss. To do that, refer to Custom Data Module and setting up a third party database to handle player data instead. For this reason, this should preferably be used for "new additions" of game's so players progress in the other version isn't exactly lost.

Also note that due to API endpoint limitations on the open cloud, only 300 new players are allowed to join per minute. In the event that data migration fails for this reason, the player will be kicked with the error message "Datastore system attempted to retrieve player data <PlayerDataKey> from universe ID <UniverseID> but failed due to API limits. Please rejoin in a few minutes to allow for limits to be reset". To help mitigate this issue, I would suggest having a countdown in-game before release to slowly entice players to join rather then every trying to join at the same time.

Note, when this documentation talks about "new player", this means a player that cannot be found to have a datastore save slot OR save slot returns nil (same meaning). When the new player joins the game and migration is successful, the data store save slot is created therefore classing them as a "recurring player". Can be reset if DataSlotPrefix is changed or DataStoreName.

How to set up

Here is a step-by-step tutorial showcasing how to set up this setting correctly for your game. Remember you'll need to use Roblox OpenCloud, API Key's and Roblox Game Secrets.

  1. Go to https://create.roblox.com/ and under view as make sure that if the other game is under your account ownership then view as your account and if not then go to the dropdown option and select the group it's owned by.

  2. Next, go to OpenCloud on the sidebar and in the dropdown, select API Keys and click "Create API Key"

  1. In general infomation, give the key a name that you will understand when you refer back to the dashboard if you need to go back and if you want then add a description preferably of what it does or what it's being used for. (I will showcase an image with everything completed once fully explained)

  2. In access permissions, select "universe-datastores". After that, it should show a new catagory with a search by which is where you need to search for the game you want to be accessed for data. After that, in "Select Operands to Add", use universe-datastores-object catagory version of "Read" (Once selected will be written as universe-datastores.versions:read

  3. In security, because the Roblox systems needs to access it, don't restrict it to an IP address and set experation to no expiration. Below is an example image of how it should look at this point

  1. If all infomation is correct, save and generate the API key and copy the API key and save it to a secure location (you can regenerate keys if needed)

  2. Next, go to the game page of the main game that will be recieving the data migration, click on the 3 dots in the top right corner (...) and click "Configure this Experience". Then on the sidebar, go to "Secrets"

  3. To ensure that the API key is completely hidden from hacker's, we're using Secrets which securely hides infomation and can only be executed in code without being allowed to be read. Follow these bullet points — Set the name to whatever you want (remember that it will need to be the spelt and captilised the same in the "SecretKeyName" within MultiGameDataMigration) — Paste your API key into "Secret". This is what will always be retrieved when the game executes code — Set "Domain" to apis.roblox.com

  1. Lastly, make sure that MultiGameDataMigration -> SecretKeyName is set to the correct name. If not then you will recieve the "Can't find secret with given key" studio error which will crash the data stores system. Now you're all set up and ready!

Can do and can't do's

This section is here to further re-evaluate what is possible and what isn't possible with this setting enabled.

CAN DO
CANT DO

Have pre-existing player data retrieved from other games (preferably former version or at best one that shares the same data layout)

Can't be used to share 2 games player datastores, Instead you'd need to use Custom Data Module with a third party database system

Set up the API key using Roblox's built-in "secret's" feature (more secure for API keys)

Can't use an API key that your game doesn't have read access to

You can modify what happens if this breaks due to API limitations (Kick player, disable saving, nothing. Kick player is default)

DO NOT share your API key with anyone. They will likely use up you API limits. Use Roblox secrets

Possible Errors and Meanings

These are both output errors and errors visible if and when a player is kicked due to the problem

Error Message
Meaning
Fix
Issue Result

Can't find secret with given key

  1. You haven't entered an secrets store key name into SecretKeyName

  2. Key entered into SecretKeyName doesn't match the one in Secrets Store

  3. You are NOT in the live game. You can only test this in Team Test or in production game.

Make sure that the name of the secret that contains the API key is the same what's written in game Secrets.

If it's all correct, you might be in in studio client test and you must use team test instead.

WILL cause the system to crash on start

Datastore system attempted to retrieve player data <PlayerDataKey> from universe ID <UniverseID> but failed due to API limits. Please rejoin in a few minutes to allow for limits to be reset

Roblox API limitation exceeded (300 new player's per 60 seconds)

Nothing can be done other then waiting 1-2 minutes for the limit to be refreshed and allowed again

This WILL kick all new players. A new player is defined as a player without a pre-existing datasaveslot

<Player> doesn't have a save slot from other game

Player didn't play the other game and so no data was available to be retrieved (This classes them as a recurring player now)

  1. Nothing, player didn't play the other game which is why nothing was retrieved

  2. The DataStoreName and DataSlotPrefix doesn't match what you are trying to find. Adjust them accordingly

System continues as normal, data will save and player will be classed as a recurring player and won't attempt again

Limitations and Warnings

BRIEF IMMEDIATE NOTICE: This feature uses ADVANCED techiques. Use this documentation as a guide but remember you may also need to do your own research

LIMITATIONS AND WARNINGS

Last updated