Fix RSZ deserializer offset for shifted REType layouts#1780
Merged
Conversation
praydog
approved these changes
Jun 22, 2026
Owner
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since the REF merge in v2, there seems to have been an issue with the handling of
RETypeCLR, which prevents the v2 REF from correctly exporting RSZ structures from MHWS. I tested 01388 and 01375, and both have this issue. Version 01366, the last version before the v2 merge, can still exportil2cpp_dump.jsonfrom MHWS correctly.I think the problem is that
RETypeCLRdoes not correctly read the runtime-dispatch layouts. For PRAGMATA or MHST3, theRETypeCLRstructure is as follows:However, MHWS has an additional
0x0008offset, and its layout is as follows:Although
RETypecan already automatically read the layout for different games through runtime-dispatch layouts,RETypeCLRdoes not perform this kind of handling. Instead, it uses the defaultREType, which causes MHWS to use the default0x0060offset instead of the correct0x0068offset. As a result, the RSZ properties are missing entirely from the exportedil2cpp_dump.json, which then prevents the RSZ template from being generated correctly.In this PR, I made a simple change so that
RETypeCLRcan also read each game's own layout instead of loading the default layout. I tested this in MHWS, MHST3, and PRAGMATA. After this change, all of these games can correctly export the correspondingil2cpp_dump.json.