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

Use relocation table #82

Merged
merged 1 commit into from
Nov 25, 2024
Merged

Conversation

austinleroy
Copy link
Contributor

I was helping someone in the forum try and decompile the P3Remake script "P3R/Content/Xrd777/Battle/Support/BMD_BtlSupportFuka.uasset" and needed these changes for the decompilation to be successful. This didn't break any of the existing tests, and some other BMD files I spot-checked still decompile correctly, so I thought I'd make a PR with the updates.

…x unknown endianness issue with message text sizes
@tge-was-taken
Copy link
Owner

tge-was-taken commented Jul 26, 2024

This is really weird.. The relocation table simply contains where pointers/offsets exist in the file, and would not work this way (as a base offset). Are you sure the relocation table patch is needed for the file to work, and not the TextBufferSize one?

@austinleroy
Copy link
Contributor Author

Yep, both were needed. I was debugging the file and the offsets in the header definitely were not lining up with the dialogs. I'll admit I don't know much about the binary format, so I can't for sure say this is a good general approach, but it definitely worked for this specific case. I just assumed using the RelocationTable would help since this is the only example I had that had the "IsRelocated" bit set in the header.

This is the raw file for reference (in case you need it)
BMD_BtlSupportFuka.uasset.zip

@tge-was-taken tge-was-taken merged commit c332fbd into tge-was-taken:master Nov 25, 2024
1 check passed
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