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

Ocarina of Time 7.0 #1277

Merged
merged 63 commits into from
Dec 11, 2022
Merged

Ocarina of Time 7.0 #1277

merged 63 commits into from
Dec 11, 2022

Conversation

espeon65536
Copy link
Collaborator

What is this fixing or adding?

  • Adds the majority of OoTR 7.0 features:
    • Pot shuffle, Freestanding item shuffle, Crate shuffle, Beehive shuffle
    • Key rings mode
    • Dungeon shortcuts to speed up dungeons
    • "Regional" shuffle for dungeon items
    • New options for shop pricing in shopsanity
    • Expanded Ganon's Boss Key shuffle options
    • Pre-planted beans
    • Improved Chest Appearance Matches Contents mode
    • Blue Fire Arrows
    • Bonk self-damage
    • Finer control over MQ dungeons and spawn position randomization
  • Several bugfixes as a result of the update:
    • Items recognized by the server and valid starting items are now in a 1-to-1 correspondence. In particular, starting with keys is now supported.
    • Entrance randomization success rate improved. Hopefully it is now at 100%.

How was this tested?

Played part of a max-shuffle seed myself. 200 full ER generations with no failures.
Rivers' testing of various smaller options helped catch bugs with bean shuffle, triforce hunt, blue fire arrows, and shuffle child trade item.
Community playtest on 2022-12-03 (results pending).

it's probably broken but I'll just fix it later
it's not a real sendable item anyway, pretty sure
This change means that 0.3.6 clients won't work with the new format, but they wouldn't have registered some checks correctly anyway.
Also remove some never-used items from item_name_to_id so they can't be given as starting items.
This makes it so that every item in the datapackage can also be used as a starting item, finally resolving a long-standing annoyance (not being able to start with keys)
the method got deleted and I forgot to change this
@espeon65536 espeon65536 marked this pull request as draft December 4, 2022 20:00
@espeon65536 espeon65536 marked this pull request as ready for review December 8, 2022 01:35
@@ -72,7 +72,10 @@ def download_slot_file(room_id, player_id: int):
if name.endswith("info.json"):
fname = name.rsplit("/", 1)[0] + ".zip"
elif slot_data.game == "Ocarina of Time":
fname = f"AP_{app.jinja_env.filters['suuid'](room_id)}_P{slot_data.player_id}_{slot_data.player_name}.apz5"
with zipfile.ZipFile(io.BytesIO(slot_data.data)) as zf:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it will crash with a non-descript error on trying to upload an older patch?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zipfile.is_zipfile might help, assuming the old format is not a valid zip file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are not, so I will make that change.

fname = f"AP_{app.jinja_env.filters['suuid'](room_id)}_P{slot_data.player_id}_{slot_data.player_name}.apz5"
stream = io.BytesIO(slot_data.data)
if zipfile.is_zipfile(stream):
with zipfile.ZipFile(stream) as zf:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you test this? we currently file.seek(0) in upload.py line 128 as is_zipfile can leave the data stream partially read. I'd be surpised if that doesn't happen here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did test it and it seemed to work fine (the game patched and played properly)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting. well, let's see if it breaks for anyone.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I should just seek to 0 or make a new stream to be safe though

fname = f"AP_{app.jinja_env.filters['suuid'](room_id)}_P{slot_data.player_id}_{slot_data.player_name}.apz5"
stream = io.BytesIO(slot_data.data)
if zipfile.is_zipfile(stream):
with zipfile.ZipFile(stream) as zf:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting. well, let's see if it breaks for anyone.

@Berserker66 Berserker66 merged commit aee0df5 into ArchipelagoMW:main Dec 11, 2022
LiquidCat64 pushed a commit to LiquidCat64/LiquidCatipelago that referenced this pull request Dec 12, 2022
## What is this fixing or adding?
- Adds the majority of OoTR 7.0 features:
  - Pot shuffle, Freestanding item shuffle, Crate shuffle, Beehive shuffle
  - Key rings mode
  - Dungeon shortcuts to speed up dungeons
  - "Regional" shuffle for dungeon items
  - New options for shop pricing in shopsanity
  - Expanded Ganon's Boss Key shuffle options
  - Pre-planted beans
  - Improved Chest Appearance Matches Contents mode
  - Blue Fire Arrows
  - Bonk self-damage
  - Finer control over MQ dungeons and spawn position randomization
- Several bugfixes as a result of the update:
  - Items recognized by the server and valid starting items are now in a 1-to-1 correspondence. In particular, starting with keys is now supported.
  - Entrance randomization success rate improved. Hopefully it is now at 100%. 

Co-authored-by: Zach Parks <[email protected]>
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.

3 participants