From 533dcb358980d9230c3d86d3f12b77c77811574e Mon Sep 17 00:00:00 2001 From: GIR GIR Date: Thu, 23 Jun 2022 01:18:54 -0700 Subject: [PATCH] Additional Solution for Portals Puzzle: -adding check for moving entire Portal folder into BigPortal as a possible solution to the portals puzzle, since so many people do this and get stuck here -also fixing a somewhat obscure bug where, if you save while the solstice trio are in your party and reload the game, weird things happen when trying to remove followers. This was mainly due to the actor equality check being based on reference instead of id, but reworked how the whole thing works anyways since now followers will walk to fill in the gaps instead of being teleported to fill them in, in the follower chain. --- scripts/Game_Party.rb | 18 ++++++++++-------- scripts/Script.rb | 8 +++++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/scripts/Game_Party.rb b/scripts/Game_Party.rb index fc38a83..9d30b63 100644 --- a/scripts/Game_Party.rb +++ b/scripts/Game_Party.rb @@ -131,15 +131,17 @@ class Game_Party actor = $game_actors[actor_id] # Delete follower unless $game_followers.empty? - follower = $game_followers.pop - $scene.remove_follower(follower) - new_actor = follower.actor - if new_actor != actor - $game_followers.reverse_each do |follower| - new_actor, follower.actor = follower.actor, new_actor - break if new_actor == actor + for i in 0...$game_followers.size + follower = $game_followers[i] + if follower.actor.id == actor.id + if $game_followers.size > i + 1 + $game_followers[i + 1].leader = follower.leader + end + $game_followers.delete_at(i) + $scene.remove_follower(follower) + break end - end + end end # Delete actor @actors.delete(actor) diff --git a/scripts/Script.rb b/scripts/Script.rb index 38b3ce6..119312a 100644 --- a/scripts/Script.rb +++ b/scripts/Script.rb @@ -565,12 +565,14 @@ module Script portal_path = Oneshot::GAME_PATH + "/Oneshot/BigPortal" case numb when 1 - return File.exists?(portal_path + "/keyB.txt") + return (File.exists?(portal_path + "/keyB.txt") or File.exists?(portal_path + "/Portal1/keyB.txt")) when 2 - return File.exists?(portal_path + "/keyG.txt") + return (File.exists?(portal_path + "/keyG.txt") or File.exists?(portal_path + "/Portal2/keyG.txt")) when 3 - return File.exists?(portal_path + "/keyR.txt") + return (File.exists?(portal_path + "/keyR.txt") or File.exists?(portal_path + "/Portal3/keyR.txt")) end + + return false end