My game has a map that is split in levels, and I want each level to have its own slot, can I do this with one save slot object? I tried using “make a new instance” but I the instance disapears when I leave the level, even when I save it in a variable.
By default, slot instance’s “Slot File Name” is empty.
If you change that to a valid file name (no folder paths), then that text will be used to save/load the file with that name - instead of using the name of slot class.
So at streaming level startup, you could just change that string to the name of the level.
Hey, can anyone help? I’m fairly new to the plugin and spent a fair amount of time trying to set it up. As far as I understand save game slot already contains info about the level that has been saved, right? How can I load a save game from another level? The function load game mode doesn’t open another level automatically. Please, have mercy on the outside devs who are trying to figure everything out.
If you want to have data independent of level instances, you should store your variables on the GameInstance blueprint then just use Save/Load Game Instance nodes.
But then state of actors in that level will not be automatically captured either.
I’m sorry, I’m not sure I understand. There’s no way to load save that was saved on another level? Do I need an additional function in my game instance that will be opening the needed level from the save meta-data and then loading game mode? Can you explain it a bit simpler, please? English is not my first language. How is it done in the demos that you provided? It seems to opening levels no problem.
The plugin has functions “Save/Load Game Mode” that captures states of classes member of the Game Mode group, regardless of the which level those classes are loaded in.
You can’t load data from another regular actor that is “living” inside other level and is not a member of the Game Mode group of classes or Game Instance.
If anyone is facing the same issue of not being able to load the particular saved level from a saved game, I’ve found a solution that works for me. I use my Game Instance (GI) as a data container for the game variables I want to save. In my Game Instance, I have created a struct that contains all the necessary data, including the current level’s name. And upon save I’m updating it with the desired values with custom event.
Additionally, I have implemented a custom event in my Game Instance that, upon loading, opens the level and loads the required data.
I needed a straightforward approach to get started with Bruno’s system because some aspects were too complex for me to grasp without proper tutorials. It’s possible that I’m using the system in an unconventional way, but it’s a practical solution for my needs, and it helps me avoid wasting money on the plugin. Cheers, everyone!
Although that works, if you are saving a “possessed” character with a properly setup SGUID property in place, all it’s really needed would be using ‘Save Game Mode’ and ‘Load Game Mode’ nodes then data on possessed character will be saved/loaded as long it’s a property marked with ‘Save Game’ flag.
Dear Bruno, I’ve got another instance where your help is needed. I’ve spent my time trying to get into ins and outs of the system, tinkered with the demos you provided, but still can’t figure out the way to load the states of the actors that I made myself. Let’s say I’ve got this cube with a collision sphere that upon overlapping with the player changes its material. I’ve placed it into the SV_demo-level level, the cube changes its material and I set it as a variable. Then I save the game in the 1 slot, not changing anything in the demo at all, and upon loading the same game, the cube is back to it’s default value. Am I missing something? The interfaces are implemented, SGUID generated and marked as savegame, as is my COLOR variable that handles the logic. Loading does… nothing?
You are creating a new material instance every time the cube overlaps and also every time a save data is loaded.
That doesn’t make much sense.
You can see cubes that save mesh + material states on sample level 2 of the demo project.
They simply keep the same material instance instead of replacing them every time like you’re doing.
I am having problems saving an loading across multiple levels. For example, I want to be able to open a door or a chest in level 1, then transition to level 2, open a door in level 2 and save the game. However, when I return back from level 2 to level 1, the door and chest are not opened anymore.
I am using USavior::SaveGameWorld which seems to overwrites the save game from level 1 when saving in level 2. I want it to just add the new saved actors to the existing save game. I am ensuring that SGUIDs are unique across all level. How can I achieve this?