How do i go about saving a game like this?

In the game im trying to make there is going to be a bunch of characters (you’re gonna be able to create more characters) on the screen and each character has a set of their own variables (every character has the same variables but the value will be different for each) so i was wondering how i would go about saving a game like this?

The variables each character has includes: position, name, cost, etc

I’ve looked up a bit about saving games on gdevelop and i’ve made some code to generate an ID for each character but im not sure how I would save each character and their object variables

thank you for reading :slight_smile:

If you move all the variables into a structure variable, you can jsonify the structure and write it to storage. You can then read from storage, and save the read-in data into a new character.