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

Hooking a Hooked File Breaks The Original Hooks #65

Open
Primogenitor33 opened this issue Sep 2, 2023 · 0 comments
Open

Hooking a Hooked File Breaks The Original Hooks #65

Primogenitor33 opened this issue Sep 2, 2023 · 0 comments

Comments

@Primogenitor33
Copy link

Primogenitor33 commented Sep 2, 2023

After attempting to make my QT+ and Fuuka's Expanded BGM mods compatible with Aemulus' Flowscript merging, I discovered an issue with the compiler. If you try adding hooks to a BF file that already contains hooks, the original hooks break. For example, in QT+, I hook field_order_party. If I compile that, it works great. With Fuuka's, I hook order_for_huka and order_to_change_bgm. Again, if I compile that on it's own, it also works fine. If I compile the QT+ hook first, then follow it with compiling the Fuuka's hooks onto that newly compiled QT+ bf file, then the QT+ goes out of wack, however the code for Fuuka's works perfectly. This is also true in the reverse. The way QT+ works is that it hooks the main field script function, checks your current location with a Switch statement, then displays the appropriate Quick Travel menu for that area. After compiling Fuuka's on top of it, it always shows the menu for the last location in the Switch. If I add both mods hooks to one file and compile them all at once, both mods work together perfectly, but this makes them incompatible with Aemulus' flow script merging and therefore incompatible with other mods that modify the field script. I and a few others talked about this, and we believe the cause is if you're adding a goto where another goto is, the address is probably changing and breaking it and the compiler isn't updating the original go to.

I have attached the files for the mods for testing. The procedure would be compiling FIELD.flow from Quick Travel Plus TEST, taking that BF file to Fuuka's Expanded BGM TEST and compiling it's FIELD.flow

https://cdn.discordapp.com/attachments/1147062856144138372/1147070081529032704/Mods.zip

@Primogenitor33 Primogenitor33 changed the title Hooking a Hooked File Breaks Hooking a Hooked File Breaks The Original Hooks Sep 2, 2023
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

No branches or pull requests

1 participant