BF

BF is an Atlus format that contains BMD messages. Dialog in Persona 3 and Persona 4 is completely handled by BF scripts. Currently, it's possible to convert BF to an editable format and back, though many commands are still unknown. BF is not to be confused with PMX which handles the animation data of cutscenes.

Format Specs
// BF files contain arrays with different types of content // They most often contain BMD (message data) files // But they also seem to contain the message flowchart (hence the 'FLW' magic) // The file starts with the header struct BFHeader { 	u32 chunkID; // always 0 for bf files u32 chunkLength; u32 chunkTag; // FLW0 u32 unk1; // 0 u32 arrayCount; // padding to 16 bytes } // After the header, arrayCount number of array descriptors follow struct BFArrayDescriptor { 	u32 arrayType;	// Indicates the type of data this array represents, see BFArrayType u32 elementLength; // Indicates the length of each array element in bytes u32 elementCount; // Indicates the number of elements this array contains u32 dataPtr; // Pointer to the array data } enum BFArrayType { 	StringArray = 0, UnknownArray1 = 1, UnknownArray2 = 2, DataArray = 3, UnknownArray3 = 4, } struct UnknownArray2Element { 	u16 unkIndex1; u16 unkIndex2; } // BMD files contain the actual message/dialog/text data // Byte commands are used to indicate the markup for the text struct MSGHeader { 	u32 chunkID; // 9 for MSG1 u32 chunkLength; u32 chunkTag; // MSG1 u32 unk1; // 0 u32 unkTablePtr; // Pointer to an unknown table, presumably some kind of relocation table u32 unkTableLength; // Length of the unknown table in bytes u32 messageCount; u32 unk2; // constant 0x20000 MessageEntry[] messageEntries; // messageCount number of MessageEntry u32 unkTableOffset; // again, now relative to 0x20 (??) } struct MessageEntry { 	u32 unk1; // 0 u32 offset; // relative to 0x20 } struct Message { 	char[24] name; // name of this message, supposedly used for lookup purposes ushort numDialogs; // number of dialogs in this message ushort numUnknown2; // variable value.. effects unknown uint[] dialogOffsets; // numDialogs number of offsets to the start of the dialog data uint dialogDataLength; // length of all the data for all the dialogs in this message // dialog data starts here } // The documentation on the commands is heavily unfinished commands: { 	0xF1: { 		// serves to indicate the state of the message // still works fine without it?? byte state; states: { 			0x41 = StartMessage 0x21 = TerminateMessage } 	} 	0xF2: { 		byte subCommand; subCommands: { 			0x1: // used to place a variable { 				byte unk1; byte unk2; } 			// Usually placed before every message // still works fine without it??? 0x5: { 				byte unk1; // 0xFF byte unk2; // 0xFF } 			0x44: // used to place a variable { 				byte unk1; byte unk2; } 		} 	} 	0xF5: { 		// appears after the message has been started // also works fine without?? byte[9] unknown; } } F2 doesn't have to be present before F1->for a message to work

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 TXT 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.