Daggerfall Mod talk:BLOCKS.BSA

The UESPWiki – Your source for The Elder Scrolls since 1995
(Redirected from Daggerfall talk:BLOCKS.BSA)
Jump to: navigation, search

So I have MAPS.BSA cleaned up nice like ARCH3D.BSA...[edit]

... and by are my arms tired! *glares to his left* Hey, Ringo! That was the joke. Uniblab 07:05, 30 July 2009 (UTC)

It looks like it would be easier to delete the contents of BLOCKS.BSA and start from scratch, but as a glutton for punishment I'll be updating it in-place. I'll first re-order the sections into a more sensible order, then I'll clean up the individual sections. This process should take several hours even w/o distraction. I will try to correct factual errors during the section cleanup phase. Uniblab 07:05, 30 July 2009 (UTC)

Like MAPS.BSA, this file contains 4 different types of records, but fortunately only 3 are used by the game. RDI records are the simplest, followed by RMB in difficulty, followed by RDB. RDB records themselves contain several subformats, similar to how MapDItem is an extension of LocationRecordElement from MAPS.BSA. Uniblab 07:05, 30 July 2009 (UTC)

Changing the Flat-Image of any NPC in a Block-Element[edit]

by PLRDLF

First of all you need some basic knowledge of working with a hex-editor (working with values, nomenclature and so on) and of course a hex-editor. The byte-order of Daggerfall is Little endian.

All flats are stored in the games Texture-Files, that can be identified by a specific hex-value. Two consecutive Texture-Files use always the same hex-value, starting with 0x00 for the files TEXTURE.000 and TEXTURE.001. Next are 0x01 for TEXTURE.002 and TEXTURE.003. This value assignment goes on until the last file TEXTURE.511. Theoretically consecutive Texture-Files should follow suit. Take a look here, for the hex-values of all NPC relevant Texture-Files.

Every image in a Texture-File has an unique index, the very first image has the index 0 the second index 1 and so on. Take a look here, to see how these indices are processed by the game.

All NPCs that can be found inside a building or a specific dungeon module, are coded in the file, BLOCKS.BSA. It is the same for all versions of Daggerfall.

Approach[edit]

As an example how to manipulate these entries we want to change the Image for Lord K'avar in Palace Sentinel. The image which is currently used in the BLOCKS.BSA file is false, since it is associated with The Battlelords, TEXTURE.184, index 4. But the one which should be used for Lord K'avar is TEXTURE.182, index 25.

Open the file in a hex-editor, but make a backup before doing any changes to this file. Remember all entries are hexadecimal numbers and must be done as such.

  • Byte 0: Image Index
  • Byte 1: Hex-Value of Texture-File
  • Bytes 2-3: 0x1200 for male characters and 0x3200 for female characters (probably used in dialog mode to determine the reaction depending on you characters gender, because the appearance of the image itself won't change)
  • Bytes 4-5: Faction ID (crucial since this determines which person or faction it will be in the end)

In this example the entry we are looking for is:

04 5C 12 00 82 01 (found at offset 0x1B88D38)

Explanation:

  • 0x04 = 4 (Image Index)
  • 0x5C = Hex-Value of Texture File 184 (184/2 = 92 = 0x5C)
  • 0x1200 = Lord K'avar is a male
  • 0x8201 = 0182 (remember Little endian) and 0x182 = 386 which is the FactionID of Lord K'avar

To repair the wrong flat, all that must be done is to substitute 04 5C for 19 5B, the remaining four bytes are correct.

Explanation:

  • 0x19 = 25 (Image Index)
  • 0x5B = Hex-Value of Texture File 182 (0x5B = 91 = 182/2)

In this way you can change any NPC you like in a block element. The change will apply as soon as you enter the block element, eg. re-enter it if you are currently inside it. By changing the FactionID you can replace a NPC for an other. Take a further look into the BLOCK.BSA article to learn how to locate the various block elements and find people records inside them.