Books

Classic Daggerfall books are located in the arena2\books folder. They can be edited with a tool named DFBOOEDT, available as a component of DFTools package, which can be found at Uesp. These tools are created and mantained by groups aiming to localize Daggerfall.

Import books data

Daggerfall Unity imports books from the original game local installation, but overrides can be provided as loose files or bundled in a mod to benefit of load order and simple un/install, without permanently affect core files.

  • StreamingAssets/Books/BOK*.TXT
    ex: StreamingAssets/Books/BOK00000.TXT
  • BOK*.TXT.bytes inside a mod as a byte asset.
    ex: BOK00000.TXT.bytes

Declare new books

It’s possible to inject new books, found inside random loots with classic books or available as individual items. New books must be declared from json files containing an array of objects, one for each book that is to be announced to the game, with the format explained below.

[{
   "Name": "ExampleBook.TXT",
   "Title": "An Example Book"
   "ID": 1531909675
}]

Name is the filename without extension.
Title is a readable name for the book, shown in game. The reason to have it here is to access it without loading the entire book resource.
ID An unique ID for the book between 1 and 2147483647 (generate with google).
IsUnique If true this book is not found inside random loots or bookshelves and must be made available directly by mods.
WhenVarSet Book is available only when this global variable is set.

Loose files

  • Place a new book file with .TXT extension inside StreamingAssets/Books. Example: StreamingAssets/Books/ExampleBook.TXT.
  • Create a json file inside StreamingAssets/Books/Mapping. Example: StreamingAssets/Books/Mapping/ExampleBooksPack.json.

Mods

Custom books can be provided from mods (.dfmod) simulating loose files structure. Specifically, place mapping json files inside a directory that ends with Books/Mapping.
For example, you should have something like this:

./ReadMe.txt
./ExampleMod.dfmod.json
./modsettings.json
./Books/ExampleBook.TXT.bytes
./Books/Mapping/ExampleBooksPack.json

Book items can be created and added to inventory via API:

GameManager.Instance.PlayerEntity.Items.AddItem(ItemBuilder.CreateBook("ExampleBook"));