Skip to content

Strings (*.dat, *.str)

Encoding

Strings are converted from Unicode to Bullfrog Multibyte format using two files: MBtoUNI.dat (converting from Multibyte to Unicode) and UNItoMB.dat (converting from Unicode to Multibyte). The contents of this file may differ depending on the language that is being used and depending on which characters are required. The offset of each of these characters is then specified within a BFST file.

File Format

Header

SizeDescription
4 bytesMagic number - “BFUM”
2 bytesLikely specifies the character encoding - usually 0x09
2 bytesCharacter count

For each character

SizeDescription
2 bytesThe character itself in either Unicode or multibyte form

Storage

The Bullfrog String file format (*.str) is used in order to store localized strings for in-game text. These don’t have any specific character encoding - they use the two aforementioned file formats to convert to and from ‘Bullfrog Multi-byte’ characters.

File Format

Header

SizeDescription
4 bytesMagic number - BFST
4 bytesUnknown
4 bytesString count

String Directory

SizeDescription
4 bytesString offset (from the end of the string count)

For each string (at offset)

SizeDescription
1 byteUnknown - always 01
3 bytesString length
n bytesCharacters in BFMU format
4 bytesPadding