NW > Sound File Overview

This page describes some general data structures seen in a BFSAR file and its subfiles. Each sound file is divided into one or more blocks, which are all aligned to 32 bytes.

File Header

The header is padded with null bytes until it contains a multiple of 32 bytes.

OffsetSizeDescription
0x04Magic number
0x42Endianness (0xFEFF=Big, 0xFFFE=Little)
0x62Header size, including block references
0x84Version number
0xC4Filesize
0x102Number of blocks
0x122Padding
0x14Block references

Block Reference

Blocks are looked up by id, so their order doesn't matter.

OffsetSizeDescription
0x02Type id
0x22Padding
0x44Offset, relative to start of file
0x84Size

Section Reference

If a section is not present, the type id is set to 0 and the offset is set to -1.

OffsetSizeDescription
0x02Type id
0x22Padding
0x44Offset, relative to start of section or block

Item ID

Files are often referenced by 'item id'. An item id consists of both file type and file index. The file index is an index into the reference table of the corresponding file type in the INFO block of the BFSAR file.

OffsetSizeDescription
0x01File type
0x13File index

File typeDescription
1Sound (SE/WSD/STRM)
2Sound group (WSDSET/SEQSET)
3Bank (BANK)
4Player (PLAYER)
5Wave archive (WAR)
6Group (GROUP)

Wave ID Table

This table contains references to individual wave files.

OffsetSizeDescription
0x04Number of entries
0x4Wave file ids

Wave File ID

OffsetSizeDescription
0x04Item id of wave archive
0x44Wave file index

ADSHR Curve

OffsetSizeDescription
0x01Attack
0x11Decay
0x21Sustain
0x31Hold
0x41Release