Daggerfall Mod:BLOCKS.BSA

Mod / Daggerfall: Daggerfall Mod: File Formats: BSA file formats(Redirected from Daggerfall:BLOCKS.BSA)

BLOCKS.BSA is a Name Record (0x0100) BSA file containing 4 different record types. There are 1295 records. The types of records which are contained in this BSA file can be derived from the last three characters of their names.

This one record is not any real data but actually a DOS directory listing of someone's directory (with a hard drive named FireBall). It is not used by Daggerfall.
Map Block Records, a variable length record, are the most common type at 920 records. These define the exterior ("outside") of all navigable locations within Daggerfall.
Dungeon Block Records are also variably-sized. These define the interiors of all "Dungeons" within Daggerfall. There are 187 records.
These fixed length records of 512 bytes each appear to contain only 00's and 01's. There is one RDI record for each Dungeon Block Record.

FOO RecordEdit

This special record is named "FOO", and consists of the string output from the DOS (or NT Console) dir command. This record is not used at all by Daggerfall.

Map Block RecordEdit

Map Block Records describes the exterior block data for locations from MAPS.BSA. Each Map Block Record describes one exterior block, which fits into a two-dimensional grid with the other blocks for that location's exterior. The architecture, the doors, the automap, flats, etc are all here.

Each Map Block Record name must be one of the defined combinations found in Block Record Indexes and must end with the string ".RMB". Ex: "TVRNAL00.RMB".

The complete Map Block Records format is described here.

Working with Map Block RecordsEdit

Map Block Records are variably-sized, but each begins with a fixed-size header. This header identifies the count and sizes of the various elements the record contains, as well as the offsets/positions of said elements.

After reading the RmbHeader, one may then read the BlockList, ModelList, and FlatList sections.

The BlockList section contains the primary data for the record, such as all the buildings. The ModelList and FlatList contain additional data which must be displayed within the scene, but because Block elements are placed uniformly within the scene (aligning to a grid), the latter two lists are used to arbitrarily place elements within the scene.

Dungeon Block RecordEdit

Dungeon Block Records contain the block data for dungeons. Each Dungeon Block Record describes one dungeon block, which fits into a two-dimensional grid with the other blocks of the dungeon. There are two connecting passages in each of the four cardinal directions, so there are eight paths leading out of each block. The architecture of the block, the doors, various action scripts and light sources, etc are all described here.

Each Dungeon Block Record begins with a letter and is followed by a 7-digit decimal integer. The name of Dungeon Block Records all terminate with the string ".RDB". Ex: "N0000019.RDB". These files are referenced in the dungeon records of MAPS.BSA.

The complete Dungeon Block Record format is described here.

Working with Dungeon Block RecordsEdit

Dungeon Block Records are variably-sized, but each begins with a fixed-length header and model reference list. These elements provide the counts and sizes of the remaining sections.

It is important to remember that 0xff fills unused model reference list elements, and 0x00 fills the corresponding model data list elements.

Following this, one must decode a list of doubly-linked lists. The root node of each list is an element specified by the offsets of the ObjectRootList. To read the entire Dungeon Block Record, one navigates to the head of each list specified in the ObjectRootList, and then iterates using the Next and Previous fields of the Object. One must parse each element differently depending on their ObjectType field's value.

RDI RecordEdit

RDI Records (records whose name ends with the string ".RDI") each contain a fixed-length block of binary data, one for each Dungeon Block Record. Each record is exactly 512 bytes long.