Daggerfall Mod:Hacking Items

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

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[edit]

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[edit]

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.

Hex Offset Data Type/Size Description
00-17 char[24] Name[verification needed — Null-terminated?]
18-1B int32 Weight in ¼kg.
1C-1D int16 Hit points
1E-21 int32 Unknown
22-25 int32 Value
26-27 int16 Enchantment points
28 int8 Unknown
29 int8 Unknown
2A int8 Unknown
2B int8 Unknown
2C, 2D int8[2] Picture (exact format unclear)
2E int8 Unknown
2F int8 Unknown

Changing an Item[edit]

  1. You can change the its name by simply typing over it with a new one, to a limit of 24 characters.
  2. 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.
  3. Next, 28 bytes from the start of the name, is the item's hit points. This seems to have no effect on gameplay, so there's no reason to edit it.
  4. The value 30-33 bytes from the start of the item is unknown, so leave that alone.
  5. The 32-bit value at offset 34-37 is the base item cost.
  6. 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.
  7. The next four bytes are unknown.
  8. 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[edit]

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.[verification needed — Some values had notes attached to them indicating they may have simply been missed.]

Hex
Values
Item Description
00 BE Spurting blood
02 BE Magic Explosion
03 BE Magic Explosion #2
04 BE Pile Of Bones
05 BE Magic Item 'Swirl'
06 BE 'For Sale' Shop Coins
07 BE Gray Pattern (End)
00 6A Well
01 6A Haystack
02 6A Fountain #1
03 6A Fountain #2
04 6A Town "Picture" Sign
05 6A Town "Blank" Sign
06 6A Town "Rooster" Sign
07 6A Coal Pile
08 6A Water pump #1
09 6A Water pump #2
0A 6A Sundial
0B 6A Wood Pile #1
0C 6A Wood Pile #2
0D 6A Wooden Post #1
0E 6A Wooden Post #2
0F 6A - Large Trellis
10 6A Small Trellis
11 6A Rock/Tombstone? #1
12 6A Rock/Tomestone? #2
13 6A Gray Pattern (End)

[verification needed — This next set may have been started in mid-sequence. There may be values below 80.]

Hex
Values
Item Description
80 66 Barrel
81 66 Filled Regular Jug
82 66 Jug W/Pickle
84 66 Orange Jug
85 66 Sm. Orange Jug
86 66 Purple Jug
88 66 Small Basket
8A 66 Lg. Filled Basket
8B 66 Regular Potion Bottle
8C 66 Half Full Orange Potion Bottle
8D 66 Full Orange Potion Bottle
8E 66 Empty Green Potion Bottle
8F 66 Half Full Orange Potion Bottle (Green Bottle)
89 66 Large Basket
90 66 Orange Potion
91 66 Small Bag #1
92 66 Mini Bag
93 66 Lg. Bag
94 66 Small Bag #2
95 66 Chest #1
96 66 Chest #2
Note: The next 4 are still under investigation. Going
higher or lower than the values listed should provide
some additional pictures, though crashing occurs
when using numbers higher than 27 so.
1E 67 Arm Bone
1F 67 Misc. Bones
20 67 Cow Skull
23 67 Dead Animal

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.

Hex
Values
Item Description
0A 67 Skeleton
00 68 Globe
03 68 Scales
04 68 Telescope
05 69 Candelabra
B5 69 Altar
B7 69 Mantella
8F 6A "Shrubbery"
00 6D Clay Jar
28 7F Quaesto Vil
01 BE Dead Body

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.)