A downloadable asset pack

Download NowName your own price

This is a very basic, easy to use script that allows a developer to implement data persistence easily, and efficiently.


I recommend using a "Custom User Dir Name"; you can just make it whatever your game name is. It simply makes it a bit easier to find in my opinion, as it places the directory directly within the user directory, instead within Godot's user directory. If you do not choose to do this, you can refer to the Godot docs to find your directory.

Put the script in your project folder, I recommend autoloading the script, it makes it cleaner to reference and use. You can attach it to a Node within the scene, and it can work, but I do not guarantee %100 stability, and the referencing is a bit funnier in my opinion.

Afterward that, you simply migrate any data you wish to save into the UserData dictionary. I recommend utilize this dictionary from now on to interact with these variables, as they'll be global to the application being that it's autoloaded.

You can use the Store_Value(Key, Value) to save data anywhere in the project: `UserData.Store_Value("Health", 50)`

If you have any question, feel free to leave a comment, or come onto the discord: https://discord.gg/XK5cbQeA

Download

Download NowName your own price

Click download now to get access to the following files:

UserData.gd 2.8 kB

Leave a comment

Log in with itch.io to leave a comment.