Which is the best way to make save/load list in my situation?

Hello, I have a level where players can create simple puzzles, and I somehow need to create unlimited list of this levels. Level can contain up to 52 values. I need to use C++ to create/read txt files?

You could just use an array, and put it in the save game.

How? :slight_smile: If each level can have have string, boolean and 50 int.

Make a struct:

In the save game, have an array of this struct:

Use structs:

Pack a bunch of variables inside it and save it. You can keep all levels in a single array of structs. You can (and probably should) have nested structs. Or at least group variables logically - makes it easier to maintain.

Thanks :slight_smile: Ok, I made array of struct and load it to cobno box, but how I load level what I need? I need to add index in begin of name like “1)” and then use Split on “)”? But what if player deleate some levels?

Thanks :slight_smile: Ok, I made array of struct and load it to cobno box, but how I load level what I need? I need to add index in begin of name like “1)” and then use Split on “)”? But what if player deleate some levels?

And struct its a global value by default, or I need to add struct to game instance, to use in different levels?

And struct its a global value by default, or I need to add struct to game instance, to use in different levels?

And struct its a global value by
default

No, in BPs they’re normal variables; you can keep the array in the GameInstance and each level can add to that array when you’re done with it. When the player quits the game, you save the array to a game object.

But what if player deleate some
levels?

Then you remove that array element.

I mean problem like > Pleyer delete any “level”, so I need to clear Combo Box and fill it again to chenge ID’s in names of “levels” which were after this “level”. For now idk how to rename “x)LevelName” to “y)LevelName”, where x - ID of level after deleated level, and y - ID of deleated level. I know only Split and Append string nodes. I found Replace, but this node also replace all same numbers in “level” name.

Oh wait, I still can use Split+Append :slight_smile: