What's the best way to save/load information about levels which can be edited in future game updates?

Well, it looks like I’ve found the solution. Thanks to your line “if you’re going to do this with structures”, which made me thinking about Map variable.

Everything became relatively simple. To test this new approach I created a new “New Levels” struct var (to keep old options just in case) which is not included in game saves, so:

  1. Before adding items into it, I clear it just in case to be sure it’ doesn’t contain any redundant information.
  2. Loop the Levels info struct (which receives information from data asset, also, not included in saves).
  3. Find level names in new Levels Map variable. Not found == add new from Levels List and then add them to the Levels Map. Found == read from Levels Map.
  4. Level cards in the UI (another BP) fills out with info from the New Levels struct.

That’s all. I tried to reorder, remove, add new + reorder + remove levels in my Levels Info data asset and everything works perfectly. Can it be that simple?

The only thing my perfectionism can’t handle is that the Map keep storing information about deleted levels. Can’t say it’s bad since it’s just a few bites or can be a few kb in the worst case.

1 Like