Skip to content

Add option to start with bunny hood#1915

Closed
garrettjoecox wants to merge 2 commits intoHarbourMasters:developfrom
garrettjoecox:start-with-bunny-hood-option
Closed

Add option to start with bunny hood#1915
garrettjoecox wants to merge 2 commits intoHarbourMasters:developfrom
garrettjoecox:start-with-bunny-hood-option

Conversation

@garrettjoecox
Copy link
Contributor

@garrettjoecox garrettjoecox commented Nov 5, 2022

Summary of changes:

  • Rename some mask shop flags
  • Move all child trade item swapping logic to methods GetNextChildTradeItem and CanChangeChildTradeItem
  • Added randomizer_inf flags for tracking when player has obtained weird egg and when it's hatched
  • Regardless of gMaskSelect in rando you can now swap between child trade sequence items based on a number of flags.
    • Weird Egg
      • Added when obtained (either from pool or from malon)
      • Removed when hatched
    • Cucco
      • Added when weird egg hatches
      • Removed when waking talon
    • Zelda's Letter
      • Added when obtained from zelda
      • Removed when opening Kak gate
    • Bunny hood
      • Added if starting with bunny hood
      • Added when borrowed
    • Keaton/Skull/Spooky masks
      • Added when borrowed
    • Goron/Zora/Gerudo/Truth
      • Added after selling all masks

Build Artifacts

@aMannus
Copy link
Contributor

aMannus commented Nov 5, 2022

Overall I think this is a great change. Making it less binary makes it much more fluent in gameplay, and allows us to tweak things like starting with bunny hood with less restrictions, so that's awesome. I still have to try it out ingame, so I'll see if I can get some time to do that soon as well.

One question:

To prevent any sort of save bricks due to the order you received items in the "Mask select in inventory" option is always enabled in rando.

I imagine you mean that you can start with a mask now, so getting another trade item would overwrite the mask and thus making it impossible to go back to it without Mask Select. But as far as I can see you're not handling Weird Egg, so wouldn't this still happen when, for example, starting with Bunny Hood and then receiving Weird Egg from somewhere?

@garrettjoecox
Copy link
Contributor Author

I imagine you mean that you can start with a mask now, so getting another trade item would overwrite the mask and thus making it impossible to go back to it without Mask Select. But as far as I can see you're not handling Weird Egg, so wouldn't this still happen when, for example, starting with Bunny Hood and then receiving Weird Egg from somewhere?

I actually forgot about child weird egg + chicken :D

Weird egg was simple enough but there was no flag determining if the egg had hatched so I added one in sohStats. Tested and verified all is working as expected with swapping between other items and those

@garrettjoecox
Copy link
Contributor Author

Report from @RaelCappra

I have now shuffle weird egg on, skip stealth on and complete mask quest
even though I haven't found weird egg, I can select it in the child item cycle along with the masks

Also after talking with @aMannus

  • Non bunny hood masks should require masks shop to be open (talked with zelda and guard)
  • Remove chicken after Talon has been woken up

@aMannus
Copy link
Contributor

aMannus commented Nov 7, 2022

I just realised, I'm pretty sure this resolves #1686.

@garrettjoecox garrettjoecox force-pushed the start-with-bunny-hood-option branch from b01e7e8 to df8a975 Compare November 7, 2022 15:23
@garrettjoecox
Copy link
Contributor Author

Alright, this should be good now.

  • Weird egg and chicken are only available now if talon has not been woken up
  • Previously was using a flag labelled "obtained weird egg", which turns out to be more of a "talked with malon outside castle" flag, now using our own flag for this.
  • Masks are only available now if mask shop is open, or if complete mask quest is enabled (With the additional exception of the bunny hood if start with bunny hood option is enabled)

@garrettjoecox garrettjoecox force-pushed the start-with-bunny-hood-option branch from 60dc44f to d7779b2 Compare November 14, 2022 20:04
@garrettjoecox garrettjoecox force-pushed the start-with-bunny-hood-option branch from 060b5ce to 3426fef Compare November 16, 2022 05:08
@garrettjoecox garrettjoecox added the do not merge Not ready or not valid changes label Nov 16, 2022
@garrettjoecox
Copy link
Contributor Author

Pushed up an iteration here that works, but going to think through this for a bit longer

@garrettjoecox garrettjoecox force-pushed the start-with-bunny-hood-option branch from 3426fef to f6f41f9 Compare November 22, 2022 16:11
@garrettjoecox garrettjoecox force-pushed the start-with-bunny-hood-option branch 2 times, most recently from bdfc2bf to 10d40a6 Compare December 5, 2022 16:14
@garrettjoecox garrettjoecox force-pushed the start-with-bunny-hood-option branch from 10d40a6 to 3544ff1 Compare December 9, 2022 15:37
@garrettjoecox garrettjoecox self-assigned this Dec 12, 2022
@lilacLunatic
Copy link
Contributor

Any particular reason why this still isn't ready for merge? I have been playing with this on for weeks and haven't run into any issues.

@dcvz
Copy link
Contributor

dcvz commented Jan 4, 2023

Any particular reason why this still isn't ready for merge? I have been playing with this on for weeks and haven't run into any issues.

Is this ready for review @garrettjoecox ? Last message was that you wanted to think it through a bit?

@garrettjoecox
Copy link
Contributor Author

Hmm, some one experienced an issue with it a few weeks back, I can’t remember the exact context or issue but I told myself I wanted to do another round of testing and cleanup on it.

@briaguya0
Copy link
Contributor

i know my issue was this PR always enabling mask select when rando'd, but it seems that has been changed

@briaguya0 briaguya0 force-pushed the develop branch 2 times, most recently from 05bd4a3 to ba13e6b Compare January 17, 2023 05:34
@garrettjoecox
Copy link
Contributor Author

i know my issue was this PR always enabling mask select when rando'd, but it seems that has been changed

Indeed it has. Had to jog my memory a bit, but it seems like the decision I came to was, you can now always cycle through child trade items in rando, but only your most recently obtained mask will be in that cycle unless mask select is on.

Additionally, when mask select is on, you can only cycle between masks that you have borrowed before. (When you have Complete Mask Quest on, all masks are considered borrowed at the beginning)

So for example:
when you start with bunny hood + mask select off + complete mask quest off, You will only be able to cycle to the bunny hood. Progress further to pick up the egg and you will be able to cycle between the egg and your bunny hood. Progress further, open up the mask shop and borrow the keaton mask, you will only be able to cycle between zelda's letter and the keaton mask. If you turn on mask cycle at this point, you will be able to cycle between the Zelda's letter, the keaton mask, and the bunny mask.

Another example:
When you start with bunny hood + mask select on + complete mask quest on + skip child zelda, you will be able to cycle between zelda's letter and all masks.

Kind of complex to explain with all the different combinations of options but I think gameplay wise this clears some stuff up and is more intuitive.

I will be getting this rebased and hopefully we can get it merged in soon 👍

@briaguya0
Copy link
Contributor

We don't have shuffle child trade though, so Keaton would replace letter right?

So basically the first mask shop slot in the menu cycle would be egg or chicken or letter or Keaton, then the rest of the slots would be different masks

@garrettjoecox garrettjoecox force-pushed the start-with-bunny-hood-option branch from 3544ff1 to e04db4c Compare May 24, 2023 18:54
@garrettjoecox
Copy link
Contributor Author

We don't have shuffle child trade though, so Keaton would replace letter right?

So basically the first mask shop slot in the menu cycle would be egg or chicken or letter or Keaton, then the rest of the slots would be different masks

Personally I kinda like the separation of logic between the egg/chicken/letter and the masks tracks, but I'm not hard set on that, would be a simple adjustment to make

@briaguya0
Copy link
Contributor

I'm just saying logically you shouldn't be able to have both a mask and a letter. I get that we're breaking that with early bunny hood, but once you get Keaton from the mask shop going back to letter doesn't make sense

@garrettjoecox
Copy link
Contributor Author

I'm just saying logically you shouldn't be able to have both a mask and a letter. I get that we're breaking that with early bunny hood, but once you get Keaton from the mask shop going back to letter doesn't make sense

yea that's fair. I'll make that adjustment

@garrettjoecox garrettjoecox force-pushed the start-with-bunny-hood-option branch 2 times, most recently from 8210d3a to 5923d24 Compare May 24, 2023 20:01
@garrettjoecox
Copy link
Contributor Author

Made that adjustment and replaced all the flag checks to use the macros/methods

This is ready for review again 👍

@garrettjoecox garrettjoecox removed the do not merge Not ready or not valid changes label May 24, 2023
Copy link
Member

@inspectredc inspectredc left a comment

Choose a reason for hiding this comment

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

Everything functionally looks good to me! Just wanted to clean up how the selection option looks on the randomizer window

@garrettjoecox garrettjoecox force-pushed the start-with-bunny-hood-option branch 2 times, most recently from 02fa7f1 to c09eb8e Compare June 5, 2023 01:23
@garrettjoecox garrettjoecox added this to the MacReady milestone Jun 13, 2023
@garrettjoecox garrettjoecox force-pushed the start-with-bunny-hood-option branch from c09eb8e to fdb879c Compare June 26, 2023 15:45
@garrettjoecox
Copy link
Contributor Author

Did another cleanup pass on this, now using randomizer_inf for the two flags and implemented CanChangeChildTradeItem() which makes it to where they can only toggle the swapping mechanism if they are in a scenario in which there are other items available to switch to.

cc @briaguya-ai

@garrettjoecox garrettjoecox force-pushed the start-with-bunny-hood-option branch from a593587 to 3644575 Compare June 27, 2023 16:18
Copy link
Contributor

@briaguya0 briaguya0 left a comment

Choose a reason for hiding this comment

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

one last question before i give this a ✔️, one other comment/question that won't stop me from saying :shipit:

return 0;
}

return INV_CONTENT(ITEM_TRADE_CHILD) != GetNextChildTradeItem(0);
Copy link
Contributor

@briaguya0 briaguya0 Jun 28, 2023

Choose a reason for hiding this comment

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

so we'll get here in rando without mask select, in the case that we've sold the mask would this return true since "SOLD OUT" isn't the same as the mask, or does activeMaskItemId change to reflect "SOLD OUT"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would behave similar to how zelda's letter would after you open the Kak gate, it will return true and if that was the only thing you had access to it just gets replaced with "ITEM_NONE"

Comment on lines +1828 to +1831
// Special case for bunny hood, if we want to start with it we don't care about happy mask shop status
} else if (Randomizer_GetSettingValue(RSK_STARTING_BUNNY_HOOD)) {
possibleItems.push_back(ITEM_MASK_BUNNY);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe out of scope for this PR, but since start with bunny hood requires mask select to work we should probably either force it on (did we ever figure out a good pattern for forcing cvar options on based on rando settings?) or update the current cvar checks to use a macro or something that checks both the cvar and the RSK

Copy link
Contributor Author

@garrettjoecox garrettjoecox Jun 28, 2023

Choose a reason for hiding this comment

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

Starting with bunny hood doesn't require mask select, you could think of it like it just pretends you borrowed the bunny hood first.

If you borrow another mask, it will replace the bunny hood

@briaguya0
Copy link
Contributor

did a little playtesting:

start with bunny hood on, mask select off, complete mask quest off, skip child zelda off, gate closed

  • went to castle courtyard to get letter, could select between letter and bunny
  • showed letter to guard, could switch to bunny, couldn't switch back to letter
  • went to mask shop, got keaton mask
  • couldn't switch back to bunny hood
  • enabled mask select, could switch to bunny hood

it feels a little odd to start with the ability to enter mask select, and then lose it (effectively along with the bunny hood) after borrowing the first mask from the shop

start with bunny hood off, mask select off, complete mask quest off, skip child zelda off, gate closed

  • went to castle courtyard to get letter, couldn't enter mask select
  • showed letter to guard, could enter mask select, went from having the letter to empty
  • went to mask shop, got keaton mask, couldn't enter mask select
  • gave keaton mask to guard, got SOLD OUT
  • selected sold out, entered mask select, could switch to keaton mask, could not switch back

this feels broken, we really shouldn't allow entering mask select at all if we don't start with bunny hood and have mask select turned off

@briaguya0
Copy link
Contributor

briaguya0 commented Jun 28, 2023

i think it's probably worth it to define expected behavior a bit (this is all for rando)

child trade quest progress start with bunny hood mask select can enter mask select? available selections additional info
none off off no n/a blank inventory
none off on no n/a blank inventory
none on off no n/a bunny only
none on on no n/a bunny only
got egg off off no n/a egg only
got egg off on no n/a egg only
got egg on off yes egg, bunny
got egg on on yes egg, bunny
hatched egg off off no n/a chicken only
hatched egg off on no n/a chicken only
hatched egg on off yes bunny,chicken
hatched egg on on yes bunny,chicken
woke talon off off no n/a chicken only
woke talon off on no n/a chicken only
woke talon on off yes bunny,chicken
woke talon on on yes bunny,chicken
got letter off off no n/a letter only
got letter off on no n/a letter only
got letter on off yes bunny,letter
got letter on on yes bunny,letter
showed letter to guard off off no n/a letter only
showed letter to guard off on no n/a letter only
showed letter to guard on off yes letter,bunny
showed letter to guard on on yes letter,bunny
got keaton off off no n/a keaton only
got keaton off on no n/a keaton only
got keaton on off yes keaton,bunny
got keaton on on yes keaton,bunny
sold keaton off off no n/a SOLD OUT only
sold keaton off on no n/a SOLD OUT only
sold keaton on off ??? ??? not sure what to do here, just have SOLD OUT? allow swapping between SOLD OUT and bunny? just have bunny?
sold keaton on on yes bunny,keaton

i know that this is different than what is described in the top level PR comment. i'm assuming that's to have the items consumed upon trade for a future shuffle child trade impementation, but i think it makes sense to only do that in the case of shuffle child trade, not always in rando.

edit: for how to handle sold a mask with start with bunny, i think i'm leaning "swap between SOLD OUT and bunny hood" to stay consistent with the behavior of pre-mask child trade items when starting with bunny hood

@garrettjoecox
Copy link
Contributor Author

garrettjoecox commented Jun 28, 2023

it feels a little odd to start with the ability to enter mask select, and then lose it (effectively along with the bunny hood) after borrowing the first mask from the shop

this feels broken, we really shouldn't allow entering mask select at all if we don't start with bunny hood and have mask select turned off

While I agree that the second point is a bit worse, and can probably be fixed, it's worth pointing out that there are two features here. Mask select != swapping child trade sequence items

Mask select is "If you have a mask, you can swap between the other masks you have access to"

Swapping child trade sequence is "You can swap between the trade sequence items you might still need to use"

@briaguya0
Copy link
Contributor

briaguya0 commented Jun 28, 2023

it seems the only complex situation is mask select off when starting with bunny hood, i think in that scenario we should

  • always allow entering child trade select between the current trade item and bunny hood
  • treat the bunny hood as already sold/reborrowed (so Goron/Zora/Gerudo/Truth are available at the shop as soon as you've sold Keaton/Skull/Spooky)

that way, by not treating the started with bunny hood as a child trade item, we can always have the current child trade item available as well as the bunny hood, meaning we won't need to lose it once entering the mask part of the child trade sequence

edit: this is because if people are choosing to start with the bunny hood they'll be pissed if they lose it

@garrettjoecox
Copy link
Contributor Author

Going to redo this on rando v3

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.

6 participants