BF

BF is the script format used by games developed by Atlus. Dialog in Persona 3 and Persona 4 is completely handled by BF scripts containing BMD messages.

Header
Uses the common header structure used in other files.

Type Table Types
Describes a type of content in the BF file. In most BF files, there's 5 of these entries.

Label or Procedure Entry
Labels and procedures are essentially the same with the only difference being their usage semantics. Procedures, or functions can take in arguments or return values. These however are processed at runtime. Labels, or jump labels are equivalent to goto's in C-like languages. They directly jump to a location in the current procedure.

Instruction Entry
An instruction is made up out of an opcode and operand(s).

Opcodes
The opcode tells the game's interpreter what to do, and the operands are the data the interpreter processes on. Depending on the opcode either no operands are used, the reserved field is used as an operand or the next 4 bytes are used.

BFTool
Featured article: Amicitia (program) While TGE's all-in-one editor doesn't currently feature BF editing, one of the EXE files contained in the download, bftool.exe, can convert BF files to XML and back. Usage is easy, just drag the file you want to convert into the EXE and it'll generate the new one. You can get it here.