Textures

Daggerfall stores textures inside archives which contains multiple images. These are either opaque textures shared by meshes (building and a few props) or sprites with transparency, which are used for vegetation, npcs and enemies. Additionally there are other texture files with different formats for UI, weapons and other images.

Daggerfall Unity organize modding support for textures around asset bundles (StreamingAssets/Mods) and loose files (StreamingAssets/Textures), not so differently from modern Bethesda games. Bundles contains materials (for meshes) or individual textures (sprites, ui images). Images in png format are imported from loose files and used to create materials at run time. Xml files can be used for further customization.

Prerequisites


Materials


Materials can be injected with dfmods. Name the material assets archive_record-frame.mat and pack them with the mod builder. An example is 009_1-0. If you aren’t familiar with daggerfall naming, the first number is the name of the package where textures are stored (ARCHIVE.XXX, ARCHIVE.009 in our example), the second number indicates this is the n texture of the archive (1 means is the second one), and the third number is the frame, used only for animated billboards. Textures for static models always have frame -0.

See unity docs for textures and materials for all options. Note that only textures maps listed below are enabled in game for the standard shader.

Alternatively, individual textures can be imported as loose files, from the StreamingAssets/Textures folder. Nomenclature is archive_record-frame.png for albedo and archive_record-frame_MapTag.png for others (for example 009_1-0_Normal.png). Xml files can also be used to edit Metallic and Smoothness parameters.

archive_record-0.xml

<?xml version="1.0"?>
<properties>
    <metallic>0.5</metallic>
    <smoothness>0.5</smoothness>
</properties>

Supported texture uniforms

  • Albedo (no map tag)
  • Normal
  • Emission (white, actual color is set for daytime)
  • MetallicGloss

Terrain

Stone Terrain with albedo and normal map.

It is possible to import albedo, normal and metallicgloss maps for terrain, provided the texture array system is supported on the local platform and enabled (you can check it from the advanced settings window). Terrain textures are imported individually rather than as unity materials.

It’s important to note that all textures from an archive must be present and they must have the same resolution. For example, you can use 512×512 for albedo and 128×128 for normal, but all the albedo must be 512×512 and so on. MetallicGloss is an exception as a default map for all the missing textures will be created automatically.

 

Billboards


Billboard textures can be imported via dfmods or loose files (StreamingAssets/Textures). In both cases textures must be named archive_record-frame.png and, when required, archive_record-frame_Emission.png. When you pack a dfmod remember to set alpha transparency on textures.

For a simple texture swap, only texture files are needed. They will have the same size as vanilla, regardless of resolution. The downside is that they need to have the same proportions as the original textures or they’ll look stretched.
But if you want to follow the power of two rule, you can do so if you take care of telling the game how the texture should be displayed on the billboard mesh. Specifically, you need to provide an xml file with the position of the lower-left vertex on the uv map. All frames share the same file.

Archive_Record-0.xml

<?xml version="1.0"?>
<info>
    <uvX>0.3</uvX>
    <uvY>0.1</uvY>
</info>

Typically, you want to avoid wasting texture space, so you only need to write the x or y value and the other will be set to the default value of zero.

Outdoors billboards does not needs this because they make use of optimization techniques based on altlases. Specifically all textures from an archive are placed on a 4096×4096 atlas, so the total size of your textures must not exceed this value or they will be silently resized. If you don’t provide the entire archive, imported textures are used together with vanilla without issues.

If you want to customize the size of the mesh you can do so with the xml file. All frames share the same file. (1:1) means the same size as vanilla, (1:2) has a double height, (0.5:1) is half as wide. If you want to customize only one of the values, you can omit the other one.

<?xml version="1.0"?>
<info>
    <scaleX>1</scaleX>
    <scaleY>1</scaleY>
</info>

 

 

Images


Images can also packed in a single .dfmod bundle or injected from loose files. Remember to set import options: a good choice for ui images is Texture Type: GUI with mipmaps disabled and Alpha is Transparency if required.

Loose files paths

  • .IMG: filename.png (ex: MAP100I0.IMG.png) in StreamingAssets\Textures\Img
  • .CIF, .RCI: filename_record-frame.png (ex: INVE16I0.CIF_3-0.png) in StreamingAssets\Textures\CifRci

First Person Weapons

Weapons used by the player have several variations for different kinds of metal. Vanilla textures use a color tint to achieve this; when importing custom textures, we use entirely different images.

WEAPON**.CIF-Record-Frame_metalTag.png

  • metalTag, original color
  1. Iron, Grey
  2. Steel, Light grey
  3. Chain, Silver
  4. Silver, Silver
  5. Elven,
  6. Dwarven, Yellow
  7. Mithril, Blue
  8. Adamantium, Dark grey
  9. Ebony, Black
  10. Orcish, Green
  11. Daedric, Red

Ex: WEAPON04.CIF_0-0.Png for Iron –> WEAPON04.CIF_0-0_Iron.Png

Some weapons (like hands and feet) don’t have metal type variations, so they use the usual WEAPON**.CIF_Record-Frame.png

Look here for the complete list of weapons.

HUD and UI elements

Certain UI images need additional informations. These are provided using .xml files, each one with the same name as the texture file it refers to and placed in the same folder. width and height parameters affect the size on screen. Here are provided the defaults values, but it’s possible to customize them.

  • HUD Compass
    COMPASS.IMG.xml
<?xml version="1.0"?>
<info>
    <width>322</width>
    <height>14</height>
</info>
  • COMPBOX.IMG.xml
<?xml version="1.0"?>
<info>
    <width>69</width>
    <height>17</height>
</info>
  • Crosshair
    Crosshair.png and Crosshair.xml in StreamingAssets\Textures
<?xml version="1.0"?>
<info>
    <width>22</width>
    <height>22</height>
</info>

 

 

Daggerfall Unity UI


Save Manager (experimental)

It is possible to customize the window interface used to load saves, placing custom textures inside StreamingAssets\Textures.

While it is not required for swapping texture images, it is possible to use xml files to customize the labes of buttons.

  • Change text color
<?xml version="1.0"?>
<info>
    <customtext>true</customtext>
    <r>0.8</r>
    <g>0.1</g>
    <b>0.1</b>
    <a>1.0</a>
</info>
  • Remove text (to draw text on texture)
<?xml version="1.0"?>
<info>
    <customtext>notext</customtext>
</info>