Loading save game variables after quitting and reloading the game

So I seem to be having an issue with loading up certain variables that control my level select feature after quitting and reloading the game that’s been deployed. So here is the part of my Game Mode that executes shortly after starting the game.

Checking the stored state of the boolean variables associated with my level select menu. Then in each level I set the appropriate level bool to true when they begin that level, as shown here

But users are reporting that the last updated build I deployed had erased their level progress even though I hadn’t messed with the save game structure in a long while. So my question is this, does anyone know what may be happening that is causing the level reached variables to come back false even though my players have already beaten them?

Your pictures are way to small to see anything, but I can tell you the most common mistake people make with the save game.

When you want to update variable X, you have to load the save game, cast it and update then variable and write the whole thing back.

If you don’t load the whole thing first, it would have exactly this effect, making booeans negative again.

Not sure how they are too small. Must be your viewing screen cause I’m seeing them just fine. A little blurry but they can still be made out with no problem.

That being said in the first image (my game mode) it does this,

Checks if there is a save game, if so it loads the save game, casts to my save game object promotes it to a variable called Our Save Game, grabs a couple variables from it then I do Save Game to Slot.

The second image happens in my menu widget. All it does is check if the save game exists and if so I grab the GM(GameMode) get my “Our Saved Game” variable from it and then check whether Level 1, 2, 3 and 4 are true or false one right after the other.

The last image happens at the beginning of every level. I grab my GM, get my “Our Save Game” variable from it, check if its valid and if so set the current level number boolean to true and then save game to slot.

Everything works as intended. The issue comes in when releasing another build (update) to the game. Whatever happens it resets the progress the players had prior to the update.

Hope this clarifies the problem and the images for anyone who can’t see them.

Ah, sorry my first answer was so simplistic.

From what you’re saying here I see two possible areas the problem could come from:

  1. The save game variable isn’t ready ( problem with using variables for the SG ). But if it normally works, probably not that.

  2. Maybe you’re putting a patch together with an empty save game in it? That might be a bit of wild idea, but…

EDIT: Reference to this actually happening:

EDIT2: Come to think of it, I’ve actually done this also, but only with people who are helping me test. Did you test run after packaging?..

Yes! Every time we make a new build it gets sent to our testers. They also experience this issue.

Just double checking, that’s an incremental patch, right? ( made with the launcher )

Bumping because this is still an issue. To clarify, the save game variables work fine within a deployed build. The only time they seem to be getting reset is when deploying a new build for an update to the game?

If I understand correctly, your players experienced loss of progress over game update.
Here are some questions.

  1. Can you replicate the bug? You state in the Question, that players report it to you.

  2. If they lost the progress over an update, can they still use save functionality in the new update (starting from zero progress)? Is it still working as intended in the new update, not considering loss from the update itself?

  3. Did you update Engine version between the updates for your game?

So it turns out that the one who made the build made it in a development build instead of a shipping build which is what broke everyone’s game progress.

1 Like