-
Notifications
You must be signed in to change notification settings - Fork 638
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
Shivers: Add events and fix require puzzle hints logic #4018
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # worlds/shivers/Items.py # worlds/shivers/Rules.py # worlds/shivers/__init__.py # worlds/shivers/data/locations.json # worlds/shivers/data/regions.json
# Conflicts: # worlds/shivers/__init__.py
To quote the docs regarding adding a world maintainer:
|
@Exempt-Medic thanks for pointing that out, added more info. |
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.
Some smaller comments, the changes overall look good to me though.
worlds/shivers/__init__.py
Outdated
for name, data in item_table.items(): | ||
if data.type == ItemType.GOAL: | ||
goal = self.create_item(name) | ||
self.get_location("Mystery Solved").place_locked_item(goal) |
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.
You should be doing this when you create the location/item. pre_fill
can run into problems with plando
worlds/shivers/__init__.py
Outdated
elif library_random == 2: | ||
librarylocation.place_locked_item(self.create_item("Key for Library Room")) | ||
# Lobby access: | ||
if self.options.lobby_access == 1: |
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.
These should use strings (or well, something that isn't just magic numbers)
if self.options.lobby_access == 1: | |
if self.options.lobby_access == "early": |
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.
Ideally yeah, I have refactors that I wanted to do I just didn't want to overload this PR more than I already have (I already did this with ItemTypes at least). A larger refactoring + all these changes I already made might be a bit much.
I will fix this though since we do use the string names elsewhere.
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 doing this for two lines is fine
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.
Oh yeah the strings for sure, I was just responding on the "something that isn't just magic numbers", because also just using strings like this isn't ideal though it is better, enumeration would make more sense for options to me.
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.
Overall, the changes LGTM. Some small comments above and some of the world-specific changes GodlFire would definitely need to look at, but it's waiting on their approval anyway. Did 100 solo generations, 100 10-player generations and 100 Shivers+DS3/Witness generations. No errors (or warnings) were encountered in these generations. Playthrough seems to still be fully intact, did not compare region graphs or anything like that before and after but presumably Kory Dondzila and GodlFire would know about those anyway. Did not test for client operations with these changes, but again, presumably they would/did.
This is out-of-scope, but I think it would make sense to eventually convert the item_table or at least create smaller tables for the item types so that something like: [self.create_item(name) for name, data in item_table.items() if data.type == ItemType.POT] Could be: [self.create_item(name) for name in pot_item_table] |
Yep |
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.
World Maintainer:
As already stated by Kory we have discussed all of these changes. Looking at the changes the region graphs do look correct Exempt-Medic, as does all of the rule changes.
I have also run a seed and it went fine.
I only see this one rule that could be changed to use the new events.
region_info = load_data_file("regions.json") | ||
years_since_sep_30_1980 = relativedelta(datetime.now(), datetime.fromisoformat("1980-09-30")).years |
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.
Is there a reason this uses relativedelta instead of something simple like:
years_since_sep_30_1980 = relativedelta(datetime.now(), datetime.fromisoformat("1980-09-30")).years | |
years_since_sep_30_1980 = datetime.now().year - 1980 |
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.
Or maybe something like:
datetime.now().year - 1980 + (datetime.now().month < 10)
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.
Sep 30 1980 is a very specific date in the game. It's the date that the mystery officially occurs, and the game takes place in 1995, sometime in October or November (The game was released in November) though not specified.
So the victory item is basically an in joke where you've finally solved the mystery... X years later from that date. Relative delta just for it's accuracy honestly. (Though sadly the item name won't change if the game starts before Sep 30th but ends after Sep 30th).
What is this fixing or adding?
Adds events to help clean up some logic and fixes require puzzle hints so that entrances are also accounted for and adds missing logic.
Also just some general cleanup.
How was this tested?
Ran multiple generations to make sure nothing failed and played a few games solo and with others, including GodlFire the existing world maintainer, to make sure the logic was correct.
New Maintainer
I have made a few small prior changes to Shivers AP code.
#2690
#2869
#3558
#3854
Though I have primarily been a maintainer for the Shivers client.
https://github.com/GodlFire/Shivers-Randomizer-CSharp/pulls?q=is%3Apr+author%3Akorydondzila+
I was asked by GodlFire to figure out how to get events working so that redundancy could be removed and logic improved. Also to remove the pot duplicates from the item pool so they don't show up in the advanced options. (these items are solely used to indicate where each pot goes when received but are important for progression)