DataStore Editor V3

yeah i wish too, sleitneck can u please make it free?

Hey sleitnick.
I was wondering if you could make an updated tutorial that shows how to use the global data store service, if you ever find the time.

Hey sleitnick! love the plugin.
One problem, the export feature is broken for me, I get this error message

  14:51:42.596  Unable to assign property Source. ProtectedString expected, got string  -  Edit
  14:51:42.596  Stack Begin  -  Studio
  14:51:42.596  Script 'cloud_701506235.DataStoreEditorPlugin.Code.Plugin.FileIO', Line 21 - function PromptSaveFile  -  Studio
  14:51:42.596  Script 'cloud_701506235.DataStoreEditorPlugin.Code.UI.DataContainer', Line 54 - function OnActivated  -  Studio
  14:51:42.596  Script 'cloud_701506235.DataStoreEditorPlugin.Code.UI.Button', Line 19  -  Studio
  14:51:42.596  Script 'cloud_701506235.DataStoreEditorPlugin.Packages._Index.roblox_roact@1.4.4.roact.SingleEventManager', Line 80  -  Studio
  14:51:42.597  Stack End  -  Studio

I think because this is you are in game?

image
Anyone know how to remove useless key prefixes for GlobalDataStores?

(The actual keys within the key prefix is actually removed but I want to remove the actual prefix)

I tried to add a table using [] and I got “table: 0x5e5a39aa186a6b4f”. For it to work you need to open the extended editor he motions then, [] will give you the expected outcome

Ran into an issue exporting a larger player profile earlier today. Apparently the string limit for assigning the Source property is 200,000, so I modified the PromptSaveFile function to split larger strings into strings of size 200,000. Leaving the snippet here in case this helps someone.

function FileIO:PromptSaveFile(filename, contents)
	local STR_LIM = 200000
	local contentsTable = {}
	
	-- Do pre-processing for larger strings (Source limit of 200,000 chars)
	if string.len(contents) > STR_LIM then
		local iterations = math.ceil(string.len(contents) / STR_LIM)
		
		for i = 1, iterations do
			local slow = (i - 1) * STR_LIM + 1
			local fast = STR_LIM * i
			
			local slice
			
			if i == iterations then
				slice = string.sub(contents, slow, string.len(contents))
			else
				slice = string.sub(contents, slow, fast)
			end
			
			table.insert(contentsTable, slice)
		end
	else
		contentsTable[1] = contents
	end
	
	local ms = Instance.new("ModuleScript")
	ms.Name = "export_" .. filename
	ms.Archivable = false
	
	for _, sliceStr in ipairs(contentsTable) do
		ScriptEditorService:UpdateSourceAsync(ms, function(oldContent)
			return oldContent .. sliceStr
		end)
	end

	ms.Parent = ServerStorage

	game:GetService("Selection"):Set({ ms })

	if RunService:IsRunning() then
		warn("Cannot prompt to save while game is running")
		return false
	end

	local saved = self.Plugin:PromptSaveSelection(filename)

	if saved then
		ms:Destroy()
	end

	return saved
end
1 Like