-
Notifications
You must be signed in to change notification settings - Fork 177
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
[BUG - Experiemental] RegisterHook generally not working in Grounded #626
Comments
@Aidanamite can you possibly explain your steps a bit more in-depth for how you confirmed the function were still being called even though the registered hook was never triggering? I'm trying to figure out if I'm running into the same issue when trying to mod Echo Point Nova which is unreal engine version 4.27.2.0. I'm on the 3.0.1 release so slightly different from the experimental branch but I checked 2.5.2 and nothing was different. |
i used cheat engine to manually locate the function's native code and used breakpoints to check if the code worked how i thought it did |
as a side note to that: i've been "modding" the game using cheat engine for a while now, making fairly complex scripts to add in various behaviours. i was hoping to be able to use ue4ss to remake the same sort of tweaks in a more dynamic and maintainable way |
Make a UE4SS C++ mod then. It has more freedom, Lua implementation is still very limited. |
can the c++ mods hook functions that lua can't? as far as i can tell, the issue is that it's failing to hook the functions, therefore wouldn't it have the same issue regardless of if i'm using lua or c++ or does it use a completely different hooking system for c++ mods? |
Lua is just basically an API to call C++ functions, but it's not just a simple 1:1 call, it's more complicated and depends on the implementation. |
so do you think the issue of the lua hook not working is caused by the hook just failing to call the lua callback and not because the hook isn't attaching to the function correctly? |
No, it's definitely not it. I just say that in a C++ mod you have much more options. After reading the first post once again, I think that the problem is that the game never calls the function over ProcessEvent, but calls it over it's native function. |
i assumed the hooks were detour hooks by default. because that's the more reliable way to ensure the hook gets called. |
Branch or Release
Experimental 3.0.1-151
Game and Engine Version
Grounded
UE 4.27
Describe the bug
Most of the functions in Grounded do not seem to be able to be hooked. Some can, but most not. Calling the RegisterHook function says that it was successful in the log, but when the function is supposed to occur, the function provided to the hook is simply not run.
I have attempted to fix the issue by both configuring the engine version override to the game's engine version and delaying registering the hooks even as late as after I've loaded into a world.
Based on what I can tell from using the zDev tools for UE4SS, the functions that are not hookable are any function that is both
Final
andBlueprintCallable
Using the UE4SS header dumps, I was able to use Cheat Engine to find the function and add a breakpoint to verify that the function is being called and it is, just that the hook itself isn't
To Reproduce
In my case, the main function I've been trying to hook is the
/Script/Maine.Item:RemoveDurability
functionExpected behavior
I expected the hook function to be run.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: