Verse Persistence Best Practices
Persistable data allows you to track and save data per player between play sessions. Persistable data works by storing data for each individual player, such as their profile or stats, in Verse. This data can then be updated as many times as the data's value changes. Because this data is persistable, it will persist across game sessions and be available any time the player is online in the game. For more information, see Using Persistable Data in Verse.
This page covers some best practices when working with persistable data in Verse.
Use Classes to Add New Fields Later
Currently the only type of persistable data that you can change after you publish your island is the class type, as long as new fields have default values. This means that loading saved data from a previous version will then include the new fields and their default values.
Let's look at an example of publishing a project with the following persistable data.
| | |
| --- | --- |
| | player_profile_data := class<final><persistable>: |
| | Class:player_class = player_class.Villager |
| | XP:int = 0 |
| | Rank:int = 0 |
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.