ProfileStore - Save your player data easy (DataStore Module)

I have this gift system that changes a bool value from the to gift player data, if that data is released from the server I call it, but if I call it and this player is in another server it breaks, Is there a work-around?

this can happen if the player
Choose to_Gift
Promted
to_Gift joined another server
Bought
– error since the profile is called on another server and I can’t change the data

Would love to get thoughts on this:

Currently my team and I are working on a game in which we want to store a ton of player data. We had some concerns regarding storing that much data to a single key, so we are thinking about implementing a system that uses multiple Profiles for the same player. Is this a necessary precaution in your opinion?

What would your data look like? I don’t think it’s necessary but if you think that much data is being stored it’s your choice.

Essentially it’s 5-6 different profiles, one for each general umbrella of data we want to store (i.e. “stats”, “general data”, “inventory”). We then call StartSessionAsync for each of those profiles and then compile the Profile.Data from each of those into a single larger table.

Yeah, it probably isn’t neccecary. You could probably just use different tables and subtables. Don’t really know how this would work in ProfileStore, but I think it’s possible since I did almost the same thing using profileservice.

return {
    Data = {
        Coins = 0
    }

    Stats = {
        Strength = 0
    }

    Inventory = {}
}

Just provide additional information
Datastore Data limit
Data (key value) 4,194,304 per key

a key can hold about 4mb worth of string data
unless your game is about building a lot of stuffs like minecraft voxels or serializing custom images, you should be able to hold player data in a single profile

2 Likes

Hey all, it’s been some time and it seems like the GitHub is relatively inactive, is this because ProfileStore is seemingly stable at this point? Currently in the process of doing a data migration and would will probably use ProfileStore. Is ProfileStore currently being used in very popular games and have they reported its reliability? From what I’ve read in this post, some people have had no issues with it but I’m unsure if there are popular games using it at this moment. Thank you!

1 Like

ProfileStore is being used in Dead Rails currently. Proof below:

2 Likes

he deleted his msg, idk why but, oh well

1 Like

is it normal for it to take a long time to get into the game from the studio?
roblox studio stops responding for a while and then comes back

Hi, I wanted to implement the dev product game into my game, but I also have gifting of dev product. is there any way you would make it works for gifting ?

Hello sorry for late reply, but cant you just add a getpropertychangedsignal to each value and when it changes change the profile.data and that way it keeps the autosaves?

like couldnt u do something like this?

function ProfileSetup(Player, Profile)
	
	local PlayerFolder = Instance.new'Folder';
	PlayerFolder.Name = 'Data';
	PlayerFolder.Parent = Player;
	
	UtilityModule.TableToObject(Profile.Data, PlayerFolder);
	
	for _, V in PlayerFolder:GetChildren() do
		if V:IsA'Folder' then
			for _, V2 in V:GetChildren() do
				V2:GetPropertyChangedSignal'Value':Connect(function()
					if Profile and Profile.Data and Profile.Data[V2.Name] then
						Profile.Data[V2.Name] = V2.Value; 
					end
				end)
			end
		 	continue
		end
		V:GetPropertyChangedSignal'Value':Connect(function()
			if Profile and Profile.Data and Profile.Data[V.Name] then
				Profile.Data[V.Name] = V.Value;
			end
		end)
	end
	
end

Yeah, I don’t see why not. Probably just a matter of preference at that point.

I believe you would need to use PlayerStore:MessageAsync and listen to the change on the profile using Profile:MessageHandler.

1 Like

UPDATE - MessagingService call blocking prevention

There have been some reports that lead me to believe that MessagingService methods may sometimes yield indefinitely or throw errors which was not mentioned in the official documentation for MessagingService as of writing this. As a precaution all MessagingService methods have been protected inside ProfileStore and can no longer block ProfileStore’s code.

This should also fix issues for people who have tried to use ProfileStore in Team Test ((TOPIC) :SubscribeAsync() yields silently and indefinetly on Team Test)

You may get the new version of ProfileStore from GitHub or Roblox library

Happy saving!

26 Likes

Thanks Man. You are Awesome. Please Continue to release Peak.

2 Likes

It seems that ProfileStore doesn’t accept buffers even though Roblox datastores does accept them.

Not sure what happened to the message but its true. Dead Rails is using both ProfileStore and Replica.

4 Likes

Nice :grin: Really glad to see my open source materials help get a game reach the top!

Also congrats on your success :+1:

Also donations are always appreciated, but not mandatory :eyes::rofl:

1 Like