Ellendar / Z2Randomizer

Fork of the main Zelda 2 Randomizer by Digshake
9 stars 6 forks source link

State leakage in palace generation. (4.3 B3) #164

Closed MiR4i closed 9 months ago

MiR4i commented 9 months ago

EDIT: Thread title changed.

More research is needed here (and will be done), but I'm opening a ticket to document my current issue.

I played a seed on stream and forgot to change the Beep Frequency to my usual Quarter Speed, but when I started with only one heart container, the excessive beeping became a bit much after playing for about 30 minutes, and I decided to just re-generate the seed with the Beep Frequency changed because it shouldn't affect anything related to seed generation. However, upon restarting the seed, the hash matched, but it was mostly different, and while I don't yet know why this happened, I'm including some screenshots to document what I'm referring to.

File Select Hash: image

Starting Loadout: image

North Palace Location: image

How many heart containers and which spells I started with, along with how many gems were required stayed the same, but here's a list of what I know that did change:

I doubt that there's much of a surprise that all of these things ended up changing after just one of them changed, but what's odd is that the hash didn't change.

Flagset: hEAAjqAFestUV3StMVeRfxUcumv@tNiyAAWA Seed: 4545

Now that this is all said and done, for me, simply changing the Beep Frequency in an attempt to reproduce the issue doesn't work anymore and the seeds are the same (as you would expect), but I have another test to run to see if I can replicate this. That test is more involved and will have to wait until later, but I will report back whether my test is successful or not.

MiR4i commented 9 months ago

I'm onto something...

image

MiR4i commented 9 months ago

So, I've been combing over this for hours and I'm not sure how I got the Life/Thunder loadout, but I can reproduce the Spell/Shield discrepancy. Hopefully whatever's causing the different spells to be given is also caused by this same issue.

Follow the directions exactly as they are written to see the results that I got in the first post, but also see the notes at the bottom of this post for additional information. I'm also changing the title of this thread, as Beep Frequency is not the culprit.

  1. Restart App (may not be necessary, but let's start with a clean slate)
  2. Flagset: hEAAjqAFestUV3StMVeRfxUcumv@tNiyAAWA | Seed: 9954
  3. Generate ROM - Seed will never generate; cancel out.
  4. Restart App - Do not skip this step!
  5. Seed: 4545
  6. Generate ROM - Wait for seed to generate
  7. Rename file to something else (e.g. PostFail)
  8. Generate ROM - Wait for seed to generate
  9. Rename file to something else (e.g. PostSuccess)

Now, compare the files...

image

image

Additional Notes:

image

Ellendar commented 9 months ago

Just an update, I already know the kind of issue that causes this (some kind of state leakage in the palace generation). It doesn't have anything to do with any of the settings. You can start the rando, generate a seed, change nothing, generate the seed again, and it still happens. I spent a bunch of time last night trying to build a tool to make it easier to fix these kind of issues and failed. Maybe insight will strike today at work.

Ellendar commented 9 months ago

Fixed a couple cases related to linked rooms where the results weren't properly cloned.