-
Notifications
You must be signed in to change notification settings - Fork 227
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
Potsanity 3.0 #2069
base: Dev
Are you sure you want to change the base?
Potsanity 3.0 #2069
Conversation
The changes to override keys will require changes to the co-op context. |
Here's a funny logic thing I thought of just now that I should probably post in case I forget about it later. I assume you have to collect the item in the pot before the fairy will spawn from it on the next load? This causes a problem with the logic of the fairy pot in the bk chest room of MQ Fire, which previously expected you could obtain the fairy without having physical access to the pot. So you'll actually have to check whether that pot is shuffled, and if so, hard require the hookshot to obtain the fairy. In addition to needing to check whether dungeon pots are shuffled, because of the way pots revert to vanilla behaviour when disabled, this means the logic will need to be able to check whether the shuffled pot location is disabled, which I'm not sure is currently possible. [I think the actual logic file fix is something like, "... and (hookshot or not dungeonpots or disabled)"] |
Reminder for maintainers to heavily test encryption with this once it has been merged 🙂 Great job! |
So I'm assuming that on the game's side, all that needs to happen is incrementing the COOP_VERSION and increasing the size of OUTGOING_KEY? Something will need to happen on the multiworld client side too, right? |
I would also recommend moving
Yes, each individual multiworld client will have to add support for the new co-op context version. In the past, the maintainers have required sending a corresponding PR to bizhawk-co-op to add minimal support for the new co-op context version, not sure if that's still the case. |
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 changes to the co-op context need to be documented in Notes/coop-ctx.md
, and the changes to the save data in Notes/extra-save-data.md
(might be a good opportunity to start documenting the contents of the extended save context).
break; | ||
} | ||
if (z64_file.scene_flags[key_scene].unk_00_ == override.key.all) { | ||
// Prevent duplicate entries | ||
if (extended_savectx.incoming_queue[i].key.all == override.key.all) { |
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.
Keep the comment.
315a9f1
to
78c6df2
Compare
I have some reservations about which crates are shuffled in which times of day. I think also some changes are probably needed regarding under what conditions the shield pot is shuffled, and what item it adds to the item pool. None of that really relates to the logic though. I have a couple of ideas for tricks but they're a bit weird b/c of how the drops tend move a bit randomly, so I'll just jot them down and maybe handle them another time. Logic Review:
|
@@ -142,6 +140,8 @@ TRIFORCE_ICON_TEXTURE: | |||
|
|||
.align 0x10 | |||
|
|||
.skip 0x200 ; Temporary address bump to avoid audio issues |
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.
new scene flags.txt
Outdated
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.
This should go in the Notes directory.
"GF Crate 4": "can_break_crate", | ||
"GF Crate 5": "can_break_crate", | ||
"GF Crate 6": "can_break_crate", | ||
"GF HBA Crate 1": "((is_adult and Gerudo_Membership_Card) or is_child) and can_break_crate", |
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.
Maybe the archery range should be a separate region?
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.
There are maybe a couple other cases along these lines but I figured, it wasn't broke. If these kinds of things are still there next time I go through it all, I'll clean up some things with extra regions at that time, whenever that happens to be.
Now that wonderitems is merged I've rebased this and will start incorporating the changes identified here |
Co-authored-by: Fenhl <fenhl@fenhl.net>
Co-authored-by: Fenhl <fenhl@fenhl.net>
The freeze does not occur on Dev-Rob. |
So the last commit here isn't up on my branch, and likely what caused the crash. I'll test tonight and depending on what's going on, might just revert that last commit. |
Can confirm the freeze does not happen on commit 17ae3a5. |
Another bug on commit 17ae3a5: A shuffled item in the pots in Dodongos Cavern Lower Lizalfos Pot 1 can't be picked up. Attempting to save the game after attempting to pick up the item breaks things to a point where soft/hard reset no longer work, and BizHawk crashes on core reboot. This bug also doesn't occur on Dev-Rob. |
Next thing you know you'll pick up the item from the pot and get teleported to ganon 🤔 |
That should hopefully fix it |
Looks good! Maybe we could add a CI check to make sure this array is large enough? |
Haha I have a check in the patcher, but it was checking the wrong size (which is currently hard-coded into patches.py, and I probably copied that block over from my branch). Perhaps that could be made to dynamically determine the size of the array from get_items.c or from asm_symbols.txt and included in CI |
Doing some more testing and found that the alt overrides are still a bit broken. The table itself is fine but some scenes aren't using it correctly. Looking into a fix. Example. The child kak crates will drop their item at night but not during the day. This should be fixed now. |
Done. I updated the format of data/generated/symbols.json to include the size of data symbols which seems to work well. I updated the runtime tests to compare against these sizes, and added a check in CI.py as well. |
Another bug report: If crate shuffle is disabled, all crates drop green rupees. Tested in the Kakariko backyard where 3 of the crates are supposed to drop nothing and the 4th is supposed to drop a red rupee: {
"settings": {
"logic_rules": "none",
"starting_age": "adult",
"spawn_positions": ["adult"]
},
"entrances": {
"Adult Spawn -> Temple of Time": "Kak Backyard"
}
} This bug also doesn't occur on Dev-Rob. |
Should be fixed now. |
default = False, | ||
gui_tooltip = '''\ | ||
Enabling this will include empty crates into the location | ||
pool based on the Shuffle Pots setting chosen. |
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.
pool based on the Shuffle Pots setting chosen. | |
pool based on the Shuffle Crates setting chosen. |
I didn't realize the shuffle empty pots setting would put the items into the dmc pots as child... |
Yes |
HintList.py
Outdated
@@ -524,6 +524,8 @@ def tokens_required_by_settings(world: World) -> int: | |||
'Ocarina C down Button': (["a low note"], "the Ocarina C down Button", 'item'), | |||
'Ocarina C left Button': (["a somewhat high note"], "the Ocarina C left Button", 'item'), | |||
'Ocarina C right Button': (["a middle note"], "the Ocarina C right Button", 'item'), | |||
'Fairy Drop': (["an annoying companion"], "a Stray Fairy", 'item'), |
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.
We should make sure the cryptic hints make sense between bottled and stray fairies. I think “Navi's cousin” sounds more like a stray fairy than a bottled one, so I suggest adding it here and removing it from the Bottle with Fairy
hints.
'Fairy Drop': (["an annoying companion"], "a Stray Fairy", 'item'), | |
'Fairy Drop': (["an annoying companion", "Navi's cousin"], "a Stray Fairy", 'item'), |
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.
Remember to also remove this hint from the bottled fairy item.
Co-authored-by: Fenhl <fenhl@fenhl.net>
I just merged with the (almost) latest main Dev. Probably just needs a bit of testing to make sure I didn't overlook anything during the merge. Main conflicts were just gi_draw IDs |
This is still a WIP and needs more testing but wanted to put it on people's radar.
Stuff the player will notice:
This PR adds previously unshuffled pots and crates to the location pool. These are pots that are either empty or contain a fairy. Empty pots/crates have a "Nothing" item shuffled into the item pool, which, as the name suggests, does literally nothing. Fairy pots introduce a "stray fairy" item to the pool, which gives a full heal when collected.
When collecting a shuffled major item from freestanding/pot/crate/etc. checks, it used to turn invisible upon collecting it. Now, the item will display above links head until the message box is closed.
THE.LEGEND.OF.ZELDA.-.Project64.3.0.1.5664-2df3434.2023-08-11.23-41-54.mp4
The under the hood stuff:
This PR completely reworks the custom actor flag system that was introduced with potsanity.
The old system worked by storing unique flags for each actor into sort-of unused home rotation variables within the actor instance. This new system adds a hack that effectively increases the base Actor structure in order to store this flag information. While only being used for a handful of actors currently, this hack in an enabler for pretty much any other shuffle setting imaginable.
Flags were previously a unique 16 bit identifier which consisted of the scene setup, room, and actor index for each actor. This PR extends the flag to 32 bits in order to include the scene index, and more importantly a "sub-flag". This is used by certain actors which spawn multiple shuffled items (goron pot, rupee towers, etc.). Those items previously had to be handled as special cases within the patcher. Now they are treated the same as any other shuffled item utilizing the new flags.
This PR also changes how these flags are stored in SRAM to be significantly more compact. Previously, a large amount of the SRAM used by these new flags were unused bits which represented actors within a room that weren't shuffled. This new system ensures that there are no wasted bits stored in SRAM (at the expense of storing some more data in tables within the code payload).