I am creating a “Shop-simulating” game.
I keep all the variables regarding the specific shop level in structs in a my game instance.
Since structs in an array which contains other arrays (like a storestruct contains each article created), can’t be properly modified with an “Set array element” node, how can i solve following problem.
Lets say i want to create an unspecified number of stores througout the city, and want each store opens the level designed for the store and uses the variables in the game instance. How do i keep the variables for the other stores intact, now that i only can have a single non-arrayed struct with this info.
I an currently considering creating a savegame file for each store, and just keeping a string array with each filename in it, which then will be loaded upon the opening af the level. This would then require a savegame file for each store, along with a main save game file, which would mean a lot of files, along with the possibility of the user deleting a store save game file, and then corrupting a part of their game.
Another possibility is duplicationg the single struct a lot of times, and use an integer to reference which struct to load, however this removes the possibility of an “infinite” amount of stores to create.
Am i constrained to these to options, or is there a magical solution i haven’t thought of