module documentation

Read and write soundset files.

Note that the index in the SSF always has a special meaning (soundset.2da), and cannot be reordered.

Class Entry A single entry in a SSF file including the resref and strref.
Function read Read a SSF file and return a list of entries.
Function write Writes a list of entries to a binary file in the SSF V1.0 format.
def read(file: BinaryIO, max_entries=255) -> list[Entry]: (source)

Read a SSF file and return a list of entries.

Parameters
file:BinaryIOA binary file object containing the SSF file.
max_entriesThe maximum number of entries to read.
Returns
list[Entry]A list of tuples containing the resref and strref of each entry.
Raises
ValueErrorIf the file does not contain valid SSF data.
def write(file: BinaryIO, entries: list[Entry]): (source)

Writes a list of entries to a binary file in the SSF V1.0 format.

Parameters
file:BinaryIOThe binary file to write to.
entries:list[Entry]A list of Entry objects to be written to the file.