Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Rando settings not being initialized in time #2461

Merged

Conversation

Archez
Copy link
Contributor

@Archez Archez commented Feb 13, 2023

It was reported that the entrance tracker would not populate if you had no spoiler log loaded, or the spoiler log is for a different seed without entrance randomizer enabled. Similarly it was reported that save warping in a randomized boss room would place you in the un-randomized dungeon.

These two issues both stem from the same problem: the entrance init and tracker init were happening before a proper call to Randomizer_LoadSettings(""). In this case the entrance methods were in Sram_OpenSave() which happens before Randomizer_LoadSettings(""). This PR just moves the entrance methods to be later in FileChoose_LoadGame() to have the proper rando settings loaded.

While fixing this, I noticed there is also one other RSK_ check happening in Sram_OpenSave() to prevent spoiling adult trade items when adult trade is enabled. Not having the right spoiler log loaded means that you could have the incorrect adult trade item in your inventory (e.g. mushroom gets replaced with Cojiro). Digging into it I found that originally in the LoadRandomizerVersion1() method, we were calling randomizer->LoadRandomizerSettings(""), but in the newer loadRandomizerVersion2() this line was missing and is a regression. I've added this line to the V2 load call to prevent the spoiling.

Build Artifacts

@briaguya-ai briaguya-ai merged commit 6742117 into HarbourMasters:develop-gibbs Feb 13, 2023
@Archez Archez deleted the fix-rando-setting-init branch February 13, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants