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

[Enhancement] Add Gibdo Trade Sequence Options #917

Merged

Conversation

zodiac-ill
Copy link
Contributor

@zodiac-ill zodiac-ill commented Jan 2, 2025

Add options to the Gibdo trade sequence beneath the well in Ikana.

  • Vanilla: Gibdo trade sequence works normally
  • MM3D: Gibdos will only require (and take) one of the item they request, as in MM3D. Additionally, the Gibdo that requests a blue potion will also accept a red potion.
  • No Trade: Gibdos will not require or take any items. They will disappear without requiring a trade.

Build Artifacts

@zodiac-ill zodiac-ill force-pushed the gibdo-trade-sequence-options branch 2 times, most recently from b18ba05 to 80cd83c Compare January 9, 2025 16:44
@zodiac-ill zodiac-ill force-pushed the gibdo-trade-sequence-options branch 5 times, most recently from 283faf5 to 3503f46 Compare January 18, 2025 17:35
@zodiac-ill zodiac-ill force-pushed the gibdo-trade-sequence-options branch 2 times, most recently from fd531ba to b85f7a7 Compare January 24, 2025 21:12
@zodiac-ill zodiac-ill force-pushed the gibdo-trade-sequence-options branch from b85f7a7 to 64d4960 Compare January 25, 2025 18:24
Copy link
Contributor

@garrettjoecox garrettjoecox left a comment

Choose a reason for hiding this comment

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

Solid job! Sorry it's taken a minute to get you some feedback.

So for the most part you nailed it with using GameInteractor_Should in places to branch into custom behavior, with the main exception that you should introduce that behavior outside of the original source.

So instead of

if (GameInteractor_Should(VB_..., true)) {
    // Original Stuff
} else {
    // Custom Stuff
}

In your file, where you set *should = false; is where the custom stuff should belong.

The other part is I'd like to not add new values to the EnTalkGibudRequestedItemIndex enum and sRequestedItemTable. Let me know if you run into trouble with this and I can try and figure something out.

@zodiac-ill
Copy link
Contributor Author

When you get the chance, please review revised commit

Copy link
Contributor

@garrettjoecox garrettjoecox left a comment

Choose a reason for hiding this comment

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

Some small things, and I'd like someone to thoroughly QA this, then we can get it in

PlayerItemAction requestedItemAction = va_arg(args, PlayerItemAction);
PlayerItemAction presentedItemAction = va_arg(args, PlayerItemAction);

EnTalkGibudRequestedItem** requestedItem = va_arg(args, EnTalkGibudRequestedItem**);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be a nested pointer? I think you can get away with just the top level pointer and changing it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The top-level pointer requestedItem points to the sRequestedItemTable entry that contains the blue potion. If I passed requestedItem by copy to the hook, that would leave with the ability to alter the vanilla table, which I definitely want to avoid. If I had altered the table, and the player switched back to Vanilla behavior, the gibdo would only take a red potion, and not a blue one. So I definitely don't want to change what's already there, I found that the cleanest solution is to just pass a pointer to that pointer and change what it is pointing to, which would be our own entry.

Copy link
Contributor

@Eblo Eblo left a comment

Choose a reason for hiding this comment

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

One additional thought, which I don't consider a blocker for merging, is that the Gibdos' vanilla dialog does not reflect this setting. e.g. "at least five", "something blue which bestows health". Since the tooltip details the exact changes, I think that's acceptable.

@zodiac-ill
Copy link
Contributor Author

One additional thought, which I don't consider a blocker for merging, is that the Gibdos' vanilla dialog does not reflect this setting. e.g. "at least five", "something blue which bestows health". Since the tooltip details the exact changes, I think that's acceptable.

I had also thought that the vanilla dialogue could possibly create confusion. However I wanted to avoid implementing a message that matches/resembles the MM3D dialogue, as that could be seen as including an asset from that game. Ultimately as you said I think the tooltip serves well enough.

@Patrick12115
Copy link
Contributor

Ran through it a few times in game and everything seemed to work as intended

Copy link
Contributor

@garrettjoecox garrettjoecox left a comment

Choose a reason for hiding this comment

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

Final change, let's move this outside of cheats, maybe gameplay or difficulty options

@Patrick12115
Copy link
Contributor

I believe this is under difficulty options in the actual menu.

@garrettjoecox
Copy link
Contributor

I believe this is under difficulty options in the actual menu.

ah, so it is, I guess all of the difficulty options have the incorrect cvar path. We can adjust that later then

@garrettjoecox garrettjoecox merged commit 111ade8 into HarbourMasters:develop Jan 31, 2025
5 checks passed
@zodiac-ill zodiac-ill deleted the gibdo-trade-sequence-options branch January 31, 2025 17:02
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.

4 participants