-
Notifications
You must be signed in to change notification settings - Fork 521
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
Pause Warp Enhancement #3212
Pause Warp Enhancement #3212
Conversation
This commit introduces the PauseWarp mod, a feature that allows players to warp to different locations in the game directly from the pause menu. - Add PauseWarpState structure to manage flags and cooldowns for the pause warp feature. - Implement IsStateValid function for state validation. - Implement ResetStateFlags function to reset all state flags to default values. - Add InitiateWarp function to handle the initiation of warp sequences. - Implement HandleWarpConfirmation function to confirm and execute warp actions. - Implement HandleCooldowns function to manage various cooldown timers. - Add PauseWarp_Main function as the main logic, called every frame to handle pause warp functionality. - Map warp song messages to in-game text messages.
-Now if you do not have a warp song you won't be able to select the empty slot and still teleport.
-When selecting a warp song the audio for the applicable warp song will now play for a extra vanilla feel. -Changed the stateFlag1 because previously it just disabled input allowing enemies to harm you. Now that won't happen because the game is put into a cutscene state.
I'm still not a big fan of having this block of code being called every frame like that. The idea to have it optionally override the behavior directly in |
I do like that you put everything to handle it out in its own file, though. Makes it easier to maintain and differentiate between original code and enhancements. |
My suggestion is to use the hook system. You can keep this code structure more or less intact with all your code being in its own functions in the mods.cpp file (instead of in a new file), but instead of calling the function in graph.c, you'd register a hook at the right place in the kaleido code (which I know you didn't want to touch) or just use the existing game frame update hook (which would not be my first choice since it would be ideal to only have this code run when on the relevant kaleido screen like Malk mentioned). There are plenty of existing PRs you can look at for how to implement a new hook. You also should retarget this to the main branch instead of the sulu release since I don't believe we're releasing anything else out of sulu. |
Do you think an entire hook is really necessary for something like this, where it will almost certainly be a single-use?
LMAO, nice catch. Not only are we not releasing anything on the Sulu channel, the |
I mean, we've got hooks for when a sale is complete or when the ocarina is played, so I'm not too worried about niche uses! In fact, if the hook just runs on the pause menu in general instead of just on the quest status screen, that would certainly be a useful hook for mods that want to do stuff with custom items (#3190 for a convenient example). There'd just need to be a check for which page they're on. Either way, moving this code out of the randomizer folder is the right thing to do since this isn't functionality that's specific to the randomizer. |
True, it could probably reside just in the Enhancements folder directly. Also, I like the idea of a pause menu hook in general, it's just unfortunate that changes in the future, like ocarina button shuffle, will have to go here to add conditions instead of being able to change how it gets called locally, but I suppose maybe that's the path we need to start taking from now on. |
Keep the suggestions coming! I'll be back later on today and I'll start working on the changes. We can even discuss it in the dev chat before I start to make sure we all agree on the best approach to this. |
-A new hook was created 'OnPauseMenu' so now PauseWarp_Main is only called when the pause menu is open -Moved pauswarp.c to the Enhancements folder -Removed from graph.c PR Change: Changing to the main branch instead of sulu
Moved to PR #3223 |
Summary
This introduces the Pause Warp Enhancement feature, allowing players to easily teleport to different locations by selecting warp songs from the pause menu.
Changes
Motivation
Teleporting between locations can be cumbersome in the current game. The Pause Warp Enhancement simplifies this process by allowing players to teleport directly from the pause menu, making for a more seamless gameplay experience.
Testing
Manual testing in Windows only has been conducted to ensure the feature works as expected, but could use some further testing.
Build Artifacts