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

The Legend of Zelda: Make items obtained counter in save data 16 bits. #2117

Merged
merged 4 commits into from
Sep 15, 2023

Conversation

yoshiweegee
Copy link
Contributor

What is this fixing or adding?

Certain multiworld settings (bug observed with item link settings) can cause the total item count in TLoZ world to exceed 255. This causes an overflow in the loop to receive all pending items. This adds an additional byte to be used as a high byte for the items obtained counter.

This approach was taken due to the surrounding bytes being occupied, preventing a direct 16-bit number from being used without moving to a different location and leaving more empty bytes in the memory block for save data.

How was this tested?

When I encountered this problem in my own game, I made this as my fix for the problem. It worked without any noticeable side effects. Save persistence was checked with a reboot after ensuring data had been saved. Additionally, the variables table and connector script were checked for conflicts.

If this makes graphical changes, please attach screenshots.

N/A.

@zig-for
Copy link
Collaborator

zig-for commented Aug 21, 2023

This is the exact shit that happened to LADX. :D

@Berserker66
Copy link
Member

@Rosalie-A @t3hf1gm3nt

@t3hf1gm3nt
Copy link
Collaborator

I'm aware of this PR from the bug report that spawned it. Haven't had a chance to test it myself yet

Copy link
Collaborator

@t3hf1gm3nt t3hf1gm3nt left a comment

Choose a reason for hiding this comment

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

lgtm.

@Berserker66 Berserker66 merged commit f9120c6 into ArchipelagoMW:main Sep 15, 2023
@ThePhar ThePhar changed the title The Legend of Zelda Conntector: Make items obtained counter in save data 16 bits. The Legend of Zelda: Make items obtained counter in save data 16 bits. Oct 16, 2023
@ThePhar ThePhar added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Oct 16, 2023
FlySniper pushed a commit to FlySniper/Archipelago that referenced this pull request Nov 14, 2023
…ata 16 bits. (ArchipelagoMW#2117)

Certain multiworld settings (bug observed with item link settings) can cause the total item count in TLoZ world to exceed 255. This causes an overflow in the loop to receive all pending items. This adds an additional byte to be used as a high byte for the items obtained counter.

This approach was taken due to the surrounding bytes being occupied, preventing a direct 16-bit number from being used without moving to a different location and leaving more empty bytes in the memory block for save data.
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
…ata 16 bits. (ArchipelagoMW#2117)

Certain multiworld settings (bug observed with item link settings) can cause the total item count in TLoZ world to exceed 255. This causes an overflow in the loop to receive all pending items. This adds an additional byte to be used as a high byte for the items obtained counter.

This approach was taken due to the surrounding bytes being occupied, preventing a direct 16-bit number from being used without moving to a different location and leaving more empty bytes in the memory block for save data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants