P3RE
Table of contents
Introduction
Flowscripts are responsible for handling logic during gameplay in almost all Persona games and several other Atlus entries. For example, enemy AI, setting and checking flags for displaying dialog, starting scripted battles etc. They are stored in BF_*.uasset files. This section will cover decompiling these files so you can modify them.
Pre-requisites
There are a couple of options you can go with to decompile flowscripts but generally you should install FModel so you can find flowscripts in your game files if needed:
-
FModel is the go-to tool for viewing and extracting files from Persona 3 Reload. Select Unreal Engine 4.27 and make sure to enter the AES key / decryption key in Directory > AES: 0x92BADFE2921B376069D3DE8541696D230BA06B5E4320084DD34A26D117D2FFEE
-
Unreal Atlus Script is a mod you can install for the game which can dump all BMDs and BFs which are currently loaded ingame. It’s a great tool to use if you know how to trigger the flowscripts. It is also the best way to add modified flowscripts to the game but that will be covered in the Compilation section.
-
Atlus Script GUI is an alternative to Atlus Script Tools. Although it uses atlus script tools to decompile the scripts it has a user friendly GUI which you can use to decompile the scripts you find via Fmodel. This is the easiest way to decompile flowscripts.
-
Atlus Script Tools Cli is the tool you should use if you have experience working in command prompt/powershell and need to decompile BF files that you find via Fmodel.
After installing Atlus Script Tools it is recommended that you add the program to your systems PATH so it can be accessed from any folder.
Decompiling FlowScripts
Using the Unreal Atlus Script Mod
-
After installing the mod, open Reloaded-II and navigate to your mods list for P3RE.
-
Now select the Unreal Atlus Script mod and click on configure mod
-
Then set Dump BFs to decompile, Decompile BF Endianess to Both and click on save.
-
Close the configuration window and launch the game. The mod will now dump any loaded BFs to the dump folder inside the Unreal Atlus Script mod folder. To navigate to it’s mod folder select the mod and click on Open Folder.
Using Atlus Script GUI
Flowscripts can be decompiled using 2 different Outformats V4BE and V4. To figure out which one you need to try any one of them and if you get any errors during decompilation try the other outformat. Be sure to note down what format you used (V4/V4BE) to decompile the file as that will be required when you try to recompile it.
-
After installing Atlus Script GUI (Must be a newer version than v3.5). Launch the app and on the top right corner click on game and then select Persona 3 Reload from the list.
-
Now drag any BF_*.uasset file over the “Drag a .BF or .BMD to Decompile” box. It will now try to decompile the file using the V4 OutFormat if the Big Endian .FLOW Option isn’ enabled.
-
If decompilation fails then click on Options and then on Big Endian .FLOW (P3RE). There should now be a checkmark next to it. Now the app will try to decompile the file using the V4BE OutFormat.
Using Atlus Script Tools Cli
Flowscripts can be decompiled using 2 different Outformats V4BE and V4. To figure out which one you need to try any one of them and if you get any errors during decompilation try the other outformat. Be sure to note down what format you used (V4/V4BE) to decompile the file as that will be required when you try to recompile it.
Use the following command in Command Prompt or Windows Powershellto decompile a BF_*.uasset file.
V4 Outformat Command:
AtlusScriptCompiler -In <Path to BF_*.uasset> -InFormat FlowscriptBinary -Decompile -Library P3RE -Encoding UTF-8 -OutFormat V4
V4BE Outformat Command:
AtlusScriptCompiler -In <Path to BF_*.uasset> -InFormat FlowscriptBinary -Decompile -Library P3RE -Encoding UTF-8 -OutFormat V4BE