You can simply dragAtlusScriptCompiler.exe and then field.bf.flowonto the command prompt window.
This will automatically wrap each paths in quotes, which keeps arguments separate in case your paths contain spaces.
2. Specify that you are Compiling
Now, let's tell the program what to do with that file.
Add -Compile, separated by a space.
A Flowscript Library instructs the compiler on function names and parameters.
In order to work with the input file, you have to tell the compiler which Library to use with -Library.
Not all games have libraries available. Knowledge of reverse engineering game executables is required to generate a library, as you'll have to find the offsets of function signatures yourself. A sample script for P3/P4 (PS2) can be seen here.
3. Specifying Output Format
You should also choose an Output Type with -OutFormat.
This determine the version and endianness of the generated BF or BMD.
Output Types
Output Type
Usage
Persona 5
BF
-OutFormatV3BE
Persona 5 (PS3)
BMD
-OutFormatV1BE
Persona 5 (PS4) &
Persona 3/4 (PS2)
BF/BMD
-OutFormatV1
4. Specifying Encoding
An Encoding can be specified using -Encoding.
It lets the compiler know what set of characters to use.
Encodings
Game Name
Usage
Persona 5
-EncodingP5
Persona 4
-EncodingP4
Persona 3 (FES)
-EncodingP3
PersonaQ(2)
orany game using
Shift-JIS/CP932
-EncodingSJ
5. Specifying the Output File
Finally, you can name the Output File using -Out.
If -Out is not specified, it will default to the input filename and folder, but with the output filetype appended. In this case, that would be C:\Path\To\field.bf.flow.bf.
At this point, you can press Enterto begin compiling.
But, there are a few optional commands which might be useful to you.
6. Hooking
Hooking can be handy when you're compiling a .FLOW and only want to replace specific proceduresin an imported.BF.
AtlusScriptCompiler is not perfect, so it doesn't hurt to be proactive.
With hooks, we can avoid potential compiler issues when recompiling an entire .BF script.
Enable Hookingby adding the-Hook argument.
When compiling your .FLOW into .BF, this redirects existing procedures in an imported.BF file to replacement procedures with a matching names that end in _hook_().
The original procedure still exists and can be called by name in your .FLOW script, since the original data is not overwritten when hooking a function.
References to the original procedure in the original .BF are simply redirected to your replacement.
Setup
Decompile the .BF that you're referencing in the .FLOW you're compiling.
Open the .FLOW and copy the procedure you want to edit.
Paste it into your .FLOW that references the .BF, and add _hookto the procedure name.
Now that you know how to (de)compile with AtlusScriptCompiler, you're ready to read, edit, and create scripts. If you haven't already, read on to see how to use the GUI to make (de)compiling even easier: