Hooking FunctionsAtlusScriptCompiler is not perfect, and sometimes decompiled data is imprecise (usually float values). This can lead to glitches (weird camera/player positioning and movement) and even crashes in-game when a recompiled script is modded back in.
To get around this, AtlusScriptCompiler has a feature that preserves the original .BF's data, appending only new data to the end from your compiled .FLOW.
You can use this to replace the contents of a specific method or function without screwing up the rest of the file.
Creating the .FLOWIn this example, let's say we wanted to replace ONLY the contents of fld_square_menu, a method in field.bf.
We would have to create a new text document ending with the .FLOW extension, named anything we want. In this example, fieldhook.flow.
Referencing the .BFIn that blank document, let's import the bf. Make sure the .flow is in the same directory as the .bf and follow the instructions from the importing guide, like so:
Creating the HookNext, let's copy the method we want to replace from the decompiled .bf, changing whatever we want. You can even reference external methods you add to your .flow like so:
Note that the replacement method has "_hook" appended to the name. This is important.
Compiling the .FLOWFollow the same steps as the Compiling guide, except add one extra commandline argument: "-Hook".
This should generate fieldhook.bf, an identical copy of field.bf except with the ModMenuDisplay() method replacing the contents of fld_square_menu_hook.
We are not affiliated, associated, authorized, endorsed by, or in any way
officially connected with ATLUS, SEGA, or any of its subsidiaries or its affiliates.
The official ATLUS website can be found at https://atlus.com. "Persona", as well
as all characters referenced on this page are registered trademarks of ATLUS.