Tes2Mod:Hacking Items

This document outlines how to hack Daggerfall files to give you items which are included in the game's data files, but aren't normally available. It is recommended that you be at somewhat familiar with hex editing binary files. Note: All changes are made to the  fall.exe  file in the  /dagger  directory. Make sure to make a backup prior to editing.

Item List
Using any standard hex editor, search for the item list. Do this by searching for the word "Ruby". This is the top of the list of items. In version 1.07.213, it's located at offset 0x1B682A, though previous versions vary. (The structure of the item data doesn't change, however.)

Once you've found the beginning of the list, scan down and you will find numerous items which aren't normally found in game, such as Large Sack, Wine Rack, etc. An example of a complete, editable item can be found below, however not all items are complete in the game's data. Many items, especially the furniture, don't seem to have any pictures associated with what would've been shop items. It may also be possible to do things that aren't normally possible, such as equipping items in the wrong slots. Make such edits at your own risk.

Also, wearable items (clothing/armor and also weapons) have a different structure than the examples listed below. The specifics need further research.

Structure
For those already familiar with binary data, this table describes the data structure succinctly. Those who are new to hex editing should read the sections below.


Changing an Item
# You can change the its name by simply typing over it with a new one, to a limit of 24 characters.
# The next byte after those 24 characters is the weight in 0.25 kg (in this case, 2, meaning it weighs 0.5 kg). In reality, this is a standard 32-bit value, however in practice, only the first byte is practical. Larger values than that are primarily for furniture and ships. The heaviest item in the game is a Large Galley at 25,000 kg.
# Next, 28 bytes from the start of the name, is the item's hit points. This seems to have no effect on game play, so there's no reason to edit it.
# The value 30-33 bytes from the start of the item is unknown, so leave that alone.
# The 32-bit value at offset 34-37 is the base item cost.
# The next value is a 16-bit value for the enchantment cost. If the cost was previously 0 and you raise it, the item will become enchantable and its name can be changed in the spellmaker. This can be helpful when decorating.
# The next four bytes are unknown.
# The two bytes at offset 40 control the picture displayed. Each time you change them, you'll get a different picture. You may find it easiest to change several in sequence, then check what you get in-game. Create a save in a town near ingredient shops. Before saving, enter a ship so that when you leave, the town reloads and generates new items. Then just go to the shop and buy/steal the new items. Take them back to my boat, drop them, and then set new bytes, since the Daggerfall save file saves each item with its picture. So, when you change the byte back, or to something else, the saved item will remain as you had it. It appears that you can make anything that appears in the game into an inventory icon. You can probably have buildings, monsters, people, etc. So far, in testing, there have been no problems using things like dead bodies as ingredients. If you've used an invalid value for the picture bytes, the game will complain, giving you error 113.

Item Picture Tables
The "Gray Pattern" is the marker that says "the pictures end here!". Increasing beyond that value gives the 113 error. This gray pattern has been found in two different spots, both of which crash the game if you put values higher than those listed. Furhter experimentation is necessary—there could be thousands of possible icons.

If you work with this, you'll notice a pattern to the item codes. What has been figured out so far is listed below. Some of these descriptions may be off or swapped due to the difficulties of swapping between the game, the game code, and the website. Skipped values mean the value not listed is either not an item or something already in the game. 


 


These last few are directly from the .exe, just not active in any version of Daggerfall. You can activate them by changing an item that does appear to match the values listed.

There are others as well. If you're comfortable, hack around. See what you find. Make many backups. (Any hex editing means anything can happen. Be careful, but have fun.)