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

Added ZArray_PushBack hook, exposed FlushLoggers to mods #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

piepieonline
Copy link
Contributor

@piepieonline piepieonline commented Jan 26, 2025

Needed a new hook for my crash helper mod. https://github.com/piepieonline/H3-Crash-Debug-Helper

It's a weird function to hook, but the crashing method is slightly monolithic and hard to break down.
A super long hook pattern because I struggled to avoid a very similar earlier method...

(This is also why I'd love private hooks 😅)

@OrfeasZ
Copy link
Owner

OrfeasZ commented Feb 15, 2025

This mod would probably make sense to be integrated into the SDK itself, probably in a slightly different way as now, since any other mod that wants to use these hooks won't be able to (when you call the original function from a hook, it breaks the execution chain so nobody else gets the callback).

@piepieonline
Copy link
Contributor Author

I think you'd only use this mod when you are actually are trying to debug crashes, as it could introduce stability issues in real gameplay - and generally just isn't needed.

The scene debugging code also has to run as an exception handler, as calling 'GetResourceInfo' during the loading process will actually make the game crash - so I can't run that code unless I know we are already crashing.

I could try and find where "resInfo.status" is set to "EResourceStatus::RESOURCE_STATUS_FAILED", but I didn't have any luck with that when I was looking before.

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.

2 participants