Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Super Metroid: Replace random module with world random in variaRandomizer #4429
base: main
Are you sure you want to change the base?
Super Metroid: Replace random module with world random in variaRandomizer #4429
Changes from 2 commits
21c56a9
f50e561
770b96d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think passing
self.multiworld.seed
might not be what we want.This is an issue I've run into in other games.
If there are 2 Super Metroid players in the same multiworld, with similar enough settings, they might find that they both have certain things randomized to the same result.
For example: 2 Super Metroid players both turn on area rando, and they both end up with the exact same area connections - which is not what they expect.
I haven't tested whether this is the case (if not with area rando, then it might be with something else).
It might be better to pass
self.multiworld.seed + self.player
, or maybe just something fromself.random.randrange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only use of the seed that I could find is in
APPostPatchRom
to callromPatcher.writeSeed(seed)
. The values written are used for the seed display (picks four enemy names to display at the top of the screen) after the save file selection screen.Set into
patcherSettings["seed"]
Archipelago/worlds/sm/variaRandomizer/randomizer.py
Line 749 in 051518e
romPatcher
is created andcustomPostPatchApply(romPatcher)
is called, callingSMWorld.APPostPatchRom(romPatcher)
Archipelago/worlds/sm/variaRandomizer/randomizer.py
Lines 759 to 773 in 051518e
romPatcher.writeSeed()
is called with the seed as its argumentArchipelago/worlds/sm/__init__.py
Lines 774 to 775 in 051518e
Writes seed values starting at
0xdfff00
Archipelago/worlds/sm/variaRandomizer/rom/rompatcher.py
Lines 498 to 503 in 051518e
https://github.com/theonlydude/RandomMetroidSolver/blob/master/patches/common/src/seed_display.asm uses that same
0xdfff00
address.@lordlou would know better if the seed controls anything else, and whether it should be the same for multiple SM players in the same multiworld (so use the multiworld's seed) or if it should be different, but still deterministic for each individual SM player in the same multiworld (so use each world's
.random
to create a seed). The PR is currently using the multiworld's seed.