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

Rando Enhancement: Mysterious Shuffled Items #3227

Merged
merged 16 commits into from
May 7, 2024

Conversation

Malkierian
Copy link
Contributor

@Malkierian Malkierian commented Sep 24, 2023

Adds a rando enhancement toggle which obfuscates shuffled freestanding/drawn-in-world items (PoH, tokens, shop items, keys, etc) with a custom question mark model so you never know what you're getting until you get it. Also utilizes GetMerchantMessage's mysterious option directly based on the setting, so is applied to all item names in purchasable situations.

Color is editable with cosmetics editor under the World & NPCs tab, and can be rainbow.

Also hides item names in shops for items with the Seen/Identified status when the enhancement is on.

Adds IsCheckShuffled to allow for the distinction between seed settings and visibility options, which is used to determine whether to feed the fake GetItemEntry for the mystery model to GetItemEntry_Draw, which then calls the custom draw function associated with it.

Credit to @PurpleHato for the model.

Build Artifacts

@Malkierian
Copy link
Contributor Author

soh_6a8a5Xhn1y.mp4

soh/soh/SohMenuBar.cpp Outdated Show resolved Hide resolved
@Malkierian Malkierian force-pushed the freestanding-mystery branch 2 times, most recently from 85e98a1 to 25dfcf2 Compare October 12, 2023 18:38
@Malkierian Malkierian changed the title Rando Enhancement: Freestanding Mystery Items Rando Enhancement: Mysterious Shuffled Items Oct 22, 2023
@Malkierian Malkierian marked this pull request as ready for review October 22, 2023 20:21
@Malkierian
Copy link
Contributor Author

Malkierian commented Oct 22, 2023

This is now ready for merge scrutiny.

I will mention, currently there's a bug in rando loading that holds onto merchantPrices across file/spoiler loading, so while this is setup to show/hide shuffled item names properly in the check tracker, that may not be displayed properly because you might have other saves with items shuffled that aren't shuffled on your current save that the check against merchantPrices would then find. This can be mitigated by deleting all other saves, generating a new seed, restarting SoH entirely, and then creating the new file without generating a different seed during the playthrough.

@Malkierian
Copy link
Contributor Author

OK, this is broken now because of the changes to OTRExporter and the model stuff I had going away. I don't think I can fix that until the SoH asset location PRs get merged, so in the meantime, if you want to test it, use the attached soh.otr to avoid crashes.
soh.zip

@Malkierian
Copy link
Contributor Author

OK, this should be back to normal now. 🤞

@Caladius Caladius mentioned this pull request Oct 26, 2023
…huffled freestanding/drawn-in-world items (PoH, tokens, shop items) with a custom question mark model (thanks Hato), and uses the "mysterious item" functionality of `GetMerchantMessage` for everything that supports it, regardless of hint status on generation.
@Malkierian Malkierian force-pushed the freestanding-mystery branch 2 times, most recently from 8b53490 to 98ed30b Compare December 7, 2023 05:51
@Malkierian
Copy link
Contributor Author

OK, now that I know the slowdown in main file select isn't my fault, this is fully ready to go.

…s Shuffle not being on for the gem rotation fix to apply.
@Malkierian
Copy link
Contributor Author

Guess I'm going to have to remake this for rando v3.

@Malkierian Malkierian closed this Feb 11, 2024
@Malkierian Malkierian reopened this Feb 16, 2024
@Malkierian Malkierian added the do not merge Not ready or not valid changes label Feb 16, 2024
Added `IsCheckShuffled` as preliminary function for checking *only* if a check is shuffled, not necessarily if it is just visible on the tracker. This accounts for the difference between tokensanity and "Always Show GS On Tracker", where you don't want to obfuscate the latter.
@Malkierian Malkierian removed the do not merge Not ready or not valid changes label Feb 17, 2024
@Malkierian
Copy link
Contributor Author

Hopefully ready to go for the last time XD.

soh/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c Outdated Show resolved Hide resolved
soh/soh/OTRGlobals.h Outdated Show resolved Hide resolved
soh/soh/OTRGlobals.cpp Outdated Show resolved Hide resolved
soh/src/code/z_en_item00.c Outdated Show resolved Hide resolved
soh/src/code/z_en_item00.c Outdated Show resolved Hide resolved
soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c Outdated Show resolved Hide resolved
soh/src/overlays/actors/ovl_En_Si/z_en_si.c Outdated Show resolved Hide resolved
soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c Outdated Show resolved Hide resolved
@Pepper0ni
Copy link
Contributor

Also utilizes GetMerchantMessage's mysterious option directly based on the setting, so is applied to all item names in purchasable situations.

Does this apply to only shops or to Scrubs and Solo merchants too?

@Malkierian
Copy link
Contributor Author

Also utilizes GetMerchantMessage's mysterious option directly based on the setting, so is applied to all item names in purchasable situations.

Does this apply to only shops or to Scrubs and Solo merchants too?

I believe I made it apply to scrubs and merchants as well. And even the bean salesman, I think.

@Pepper0ni
Copy link
Contributor

I don't like the idea of having merchant and scrub "mysterious item" settings being both in seed generation and in an enhancement. It's redundant and will end in confusion when people set their seed to do 1 thing and the game does another because of an enhancement.

Shops Make sense to be tied to the visual so I don't especially mind those, but it does beg the question as to why 1 set of mysteriousness is in enhancements and 1 is in seed generation.

I don't consider this blocking as it's pointed at develop, but for v3 I would want something consistent, especially as scrub item names pose me problems I don't know how to properly deal with just yet.

@Malkierian
Copy link
Contributor Author

The only counter I could give to that is spoiler sharing, where a person might get a spoiler with merchant and scrub hints there, but still want to obfuscate them for their own run, but I don't know how often that would happen.

@Pepper0ni
Copy link
Contributor

If that is desirable, then all the mysterious settings should be in enhancements, which is reasonable as they don't affect seed generation in any way.

@Pepper0ni
Copy link
Contributor

image
colours for mystery items do not seem to be working.

@Pepper0ni
Copy link
Contributor

Pepper0ni commented May 2, 2024

Also, whenever I pick up a mysterious item, it's a heart piece, regardless of what the actual item is, unless it's from a shop

@Malkierian
Copy link
Contributor Author

Sigh How many times am I going to have to actually fix this before it finally gets merged...

@Malkierian
Copy link
Contributor Author

Alright, I fixed the colors and the heart piece freestanding item gives. From what I could tell, gold skulltulas, small keys, heart containers, and the OoT were still working. If you come across any specific source that isn't working, let me know.

@Pepper0ni
Copy link
Contributor

Is it intended for bombchu bowling to be unaffected?

@Malkierian
Copy link
Contributor Author

No, that is not intended. I'll look into it.

@Malkierian
Copy link
Contributor Author

Fixed.

@Pepper0ni
Copy link
Contributor

game crashes when loading 3rd round of bombchu bowling (first non-check round), going to set up a build now to get a call stack

@Malkierian
Copy link
Contributor Author

Couldn't replicate in debug mode. Might need more specific steps.

Copy link
Contributor

@Pepper0ni Pepper0ni left a comment

Choose a reason for hiding this comment

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

The other small issue I noticed is that having mysterious items on causes the check tracker to hide the prices of things in shops as well as the item identity, which is inconvenient, but that's a small thing I'm willing to kick to the v3 implementation given that large chunks of related code is being redone there anyway.

otherwise, LGTM.

@@ -322,6 +322,7 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
COSMETIC_OPTION("World.Moon", "Moon", COSMETICS_GROUP_WORLD, ImVec4(240, 255, 180, 255), false, true, true),
COSMETIC_OPTION("World.GossipStone", "Gossip Stone", COSMETICS_GROUP_WORLD, ImVec4(200, 200, 200, 255), false, true, true),
COSMETIC_OPTION("World.RedIce", "Red Ice", COSMETICS_GROUP_WORLD, ImVec4(255, 0, 0, 255), false, true, false),
COSMETIC_OPTION("World.MysteryItem", "Mystery Item", COSMETICS_GROUP_WORLD, ImVec4(0, 60, 100, 255), false, true, false),
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if world is the best category for this, as I looked all the way through items looking for this first, but there's no good section in items for it either and this is subjective so should get more feedback, so I will not consider this blocking.

Copy link
Contributor

@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.

LGTM! just a couple unimportant things in the draw section

soh/soh/Enhancements/randomizer/draw.cpp Show resolved Hide resolved
soh/soh/Enhancements/randomizer/draw.cpp Show resolved Hide resolved
@garrettjoecox garrettjoecox merged commit b3d5144 into HarbourMasters:develop May 7, 2024
6 checks passed
@Malkierian Malkierian deleted the freestanding-mystery branch May 7, 2024 00:19
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.

None yet

7 participants