Don't show Master Sword before obtaining it in MS Shuffle#3880
Don't show Master Sword before obtaining it in MS Shuffle#3880Patrick12115 wants to merge 14 commits intoHarbourMasters:developfrom
Conversation
soh/soh/Enhancements/mods.cpp
Outdated
| } | ||
|
|
||
| void RegisterPatchNoMSHandler() { | ||
| GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() { |
There was a problem hiding this comment.
Would it be possible to patch these less often e.g on scene init/file load? or does it need to be on update
There was a problem hiding this comment.
If you do it that way, when you get MS it doesn't update, so you would still not see it until you did a scene change
There was a problem hiding this comment.
there is no way to call the unpatching when you get the master sword?
There was a problem hiding this comment.
I mean, I'm sure there is. I just don't know it. I still barely understand hooks in general
There was a problem hiding this comment.
You should be able to register an OnItemReceive hook and check for ITEM_SWORD_MASTER to get that trigger.
There was a problem hiding this comment.
This works for the unpatching, but then doesn't work for the original patching out the MS.
|
I'll give this a test when the conflicts are fixed |
Pepe20129
left a comment
There was a problem hiding this comment.
This should probably be VBified + changed to not use OnGameFrameUpdate but I think it's a good idea to merge now and improve later as this has been open for a long time.
I made it to where it's only conditionally using OnGameFrameUpdate, whenever the B button is changed and added handling if you have fishing rod on B |
|
If this doesn't work with custom models, is there something setup to prevent attempting to patch when alt versions of the applicable assets are loaded? |
|
Yes, there is already previously added failsafes in ResourceMgr_PatchGfxByName that prevents any patching to Alt Assets because the DL's usually don't match up properly for Alt Assets for things like cosmetic editor. It was the failsafe put in to prevent the crashing when you would have a cosmetic changed and then try to load an Alt asset issue that we had for a bit a while back. However the custom equipment DL will be able to handle hiding the sword and sheath for future mods that use that system, just cannot work with existing mods. |
|
I want to get this in, but would like to have it behind shipinit and maybe hookify the code left in the vanilla code with a VB_Should or something. I've spoken to Pat and said I might take a look at this myself sometime soon. |
|
Closing in favour of #4989 |
As the title says, this uses gfx patching to hide the Master Sword and Sheath if you have not yet found a sword while playing with Master Sword shuffle on.
DOES NOT WORK WITH CUSTOM MODELS
Build Artifacts