From 448e34e8787d3daeadab99d742e32c25366a7014 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 20 May 2021 13:44:06 -0700 Subject: [PATCH] Save showtargets to main game save files This fixes an oversight that could lead to confusion by the player. showtargets is the variable that shows all unexplored teleporters on the map as a question mark, so players know where to head to to make progress. However, it previously was not directly saved to the main game file. Instead, it would be set to true if flag 12 was turned on in the save file. How well does flag 12 correlate with showtargets? Well, the script that turns on showtargets (bigopenworld and bigopenworldskip) doesn't turn it on. Neither does completing Space Station 1. This flag is only turned on when the player activates Violet's activity zone for the first time. Therefore, it's entirely possible that a new player could complete Space Station 1, then save their game, and come back to resume playing later. When they do come back, the question marks that Violet told them about won't show up on the minimap, and they'll be confused. They may not know where to go. And it is completely unintuitive for them to know that in order to get the question marks to show up again, they have to not only talk to Violet, but then save the game again, and reload the save. Especially since the question marks only show up after you reload the save, and not when you talk to Violet (because flag 12 is only a proxy for showtargets, not the actual variable itself). So what's the solution? Just save showtargets to the save file directly. --- desktop_version/src/Game.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 2c00a7b3..f951fbdb 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -4971,6 +4971,10 @@ void Game::readmaingamesave(tinyxml2::XMLDocument& doc) music.play(song); } } + else if (SDL_strcmp(pKey, "showtargets") == 0) + { + map.showtargets = help.Int(pText); + } } @@ -5495,6 +5499,8 @@ std::string Game::writemaingamesave(tinyxml2::XMLDocument& doc) xml::update_tag(msgs, "currentsong", music.currentsong); } + xml::update_tag(msgs, "showtargets", (int) map.showtargets); + xml::update_tag(msgs, "teleportscript", teleportscript.c_str()); xml::update_tag(msgs, "companion", companion);