Datastore Lite | An easy to use datastore for beginners

Datastore Lite

GitHub | Model


Introduction

Datastore Lite is a new datastore module worked on by Mystifine#4924. This datastore was private in testing, after testing with over thousands of players, we’ve ensured that there are no data-loss whatsoever with the provided features.


Features

Why should you use Datastore Lite? Here’s a list why:

  • Automatic Backup Data
  • Automatic Saving
  • Built In Restore / Remove / Backup Functions To Manage Data From Studio
  • Configuration Modules That Allow You To Toggle Certain Features (AutoSave, StudioSave)
  • StarterData Module To Easily Set Up Data!

    ** Replication options per category of stat with flexibility.
  • Low networking for client side replication
  • PlayerData Module (For Client Sided Replication) With Custom Events
    ** IndexAdded [Detects When A New Index Is Formed In A Table]
    ** IndexRemoved [Detects When An Existing Index Is Set To Nil In A Table]
    ** IndexChanged [Detects When A Value Changes In A Table]
  • Reuses Table For Updating Values On The Client (Table Memory Address Is Saved, any references will have updated values)
  • Session Locking


Documentation

More information can be located in the module itself.

Datastore Module:

    <> Refers To Required, [] Refers To Optional
	----------------------------------------------
	:Write(<PlayerObject>, <Path>, <NewValue>, [ArrayIndex])	| Writes Player Data (For Data Replication)
	:Get(<UserId>)												| Returns Player Data
	:Save(<UserId>, [SessionEnd])								| Saves player data (must be in game)
	:Backup(<UserId>)											| Saves Player Data to backup datastore (must be in game)
	:Remove(<UserId>)											| Removes a Player's Current Data
	:Restore(<UserId>, <Version History>)						| Overwrites Current Player Data With Backup Data (Version History Is Found Through Pointer Datastore)
	:Load(<UserId>)												| Loads Player Data;

PlayerData Module:

<> Refers To Required, [] Refers To Optional
----------------------------------------------
:WaitFor(<UserId>)                                              | Waits For The UserData to be loaded in
:IndexAdded(<Path>, <Callback>, [ArrayIndex])                   | Callback will be called when an index is added to the provided path. Provided Path must lead to a table. Callback will provide the Index Added and Value
:IndexRemoved(<Path>, <Callback>, [ArrayIndex])                 | Callback will be called when an index is removed or set to nil. Provided Path must lead to a table. Callback will provide the Index Removed and Value
:IndexChanged(<Path>, <Callback>, [ArrayIndex])                 | Callback will be called when the value of the path has been changed. Provided Path can be either Table Or Value. Callback will provide OldValue and NewValue.

Example Of Use: Datastore Lite Example.rbxl (259.0 KB)

4 Likes