-
Notifications
You must be signed in to change notification settings - Fork 800
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
Stardew Valley: Replace current naive entrance rando with GER #4624
base: main
Are you sure you want to change the base?
Stardew Valley: Replace current naive entrance rando with GER #4624
Conversation
ConnectionData(DeepWoodsEntrance.deep_woods_house, DeepWoodsRegion.abandoned_home, | ||
flag=RandomizationFlag.NON_PROGRESSION), |
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 found out that this connection had the wrong flags with the new tests. It requires access to the secret woods, which is not accessible with an empty inventory. This could soft lock the seed if something important rolled in there.
connection_in_randomized = connection.name in randomized_connections | ||
reverse_in_randomized = connection.reverse in randomized_connections | ||
self.assertTrue(connection_in_randomized, f"Connection {connection.name} should be randomized but it is not in the output.") | ||
self.assertTrue(reverse_in_randomized, f"Connection {connection.reverse} should be randomized but it is not in the output.") |
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 completely remove this test, which was just validating that the output of ER for the mod gives swaps in both directions. (unless I'm missing something?) All functions used for our GER integration are now properly unit tested, so this test seems highly unnecessary.
|
||
for connection in vanilla_connections: | ||
if flag in connection.flag: | ||
if RandomizationFlag.GINGER_ISLAND in connection.flag: |
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.
Entrance randomization for ginger island now use the same mechanism used for mods (based on content packs), so testing it separately seems highly unnecessary.
What is this fixing or adding?
This replaces the current naive implementation of entrance randomization we did with the GER. This also splits the region module in multiple files. I'm submitting the refactor before adding the new features (everything entrance rando) to make is easier to review.
Ginger islands regions and connection have been split from the rest of vanilla/SVE regions. Now, they will not be created if ginger island is excluded, just like mods regions, no longer need to remove them.
The randomization flag mechanism has been modified so we can know if a connection is eligible with on single
in
between the flag of the connection and the flag calculated from the player options. Instead of adding a flag on connections that need to be excluded when masteries are not randomized, all connections have the flag enabled (meaning that they can be randomized when masteries are excluded). The flag is removed on connections that are excluded when masteries are excluded.I removed a lot of the tests that were generating worlds, since most of the code is now unit tested. Even tho there are new tests, since those do not generate worlds and only test the methods they aim tho, this should improve tests speed. I also moved the tests validating the mod regions with the rest of the region tests. This seemed like the right place to avoid changing multiple files from multiple modules when touching the region system.
How was this tested?
python ap-roller.py --limit 2 --slots 1 --spoiler 0 --repeat 1 --seeds "1-1000" "#4624"
with the following yamlsIf this makes graphical changes, please attach screenshots.
N/A