Reskinning an item tutorial

From Dragon Age Toolset Wiki
Revision as of 10:16, 27 January 2010 by Eshme (Talk | contribs)

Jump to: navigation, search

This tutorial describes how to reskin, or change the default texture, of items that already exist in-game. As an example, the default textures of the human female mage's apprentice robes will be changed.

Tools needed are the Dragon Age Toolset, and a grafic editing Applications capable of Opening, Editing and Saving DDS Texture Files.

Note: The game utilizes Tints, which reuse the same Texture in colorized or tinted versions. Thus the texture in our example doesnt look quiet as it does in game. And vice versa, if you edit the Texture, it wont look quiet like that when back into the game. The difference is merely color differences. So this process is limited. However you can only change Tints, or both. See below for further tutorials.

Locating the Model Textures the Hard Way

At the beginning, you only know how the Model looks and what its called. A somewhat difficult task will be, finding out which files are tied to the model so that you can edit them.

Note: You may want to read it once, to understand alternative ways.

First and foremost, you are looking for DDS Files. How DDS Files are referenced by an Item you see in Game is a long list of database references.

A quick rundown on references we need to be aware of

  1. A DDS File is referenced by the Material Properties of a Model
  2. A Model is then referenced by the "ItemVariation" type of files. In our example, the sub "clothing_variation.gda"
  3. The different Clothing Variations are then referenced by the Item Type made via the Toolset
  4. The Item Type is lastly referenced by the Game, when choosing which gender and race this item is worn. And then displays the final version in your game.


To track back to the DDS File, you need to run up this list in reverse. Starting up our example, the mages apprentice robe, as it is worn by human females.

  1. Open up the Toolset and in the Resource Palette on the upperright click on "Items". Now comes guessing where this piece is to be found there. These Items are pretty well sorted thou, it is to be found under _global / Clothing / Mage Robes / Unique. In the following list you see the ResourceName followed by ItemName "gen_im_cth_mag_app (Apprentice Robes)". Any Item can be found in the "Item" Category. Doubleclick that entry to look inside.
  2. Base Item Type is Clothing, which is branching off into the Item Variation. The Robe has a Item Variation called "Robe, Apprentice". Variation in mind, onto the next step.
  3. Open up the "ItemVariations.xls" File located under "(dragon age install directory)/tools/Source/2da/rules". It has many pages, locate Page "clothing variation" since we know our Item is of Clothing Item Type. In there, locate the Row called whatever Item Variation your Item had. "Robe, Apprentice" has Namestrings followed by "rob" "app" "a".
  4. With these 3 Strings, and Dragon Age's Naming Scheme you can find the binary MMH Main Modelfile.
  5. In this File is a hidden reference to the MAO Material file.
  6. And inside the MAO File is the references to the Textures Filenames.

Step 4 requires some understanding in completing the Filename. Each Model File (and Art Resource too) has a prefix and a suffix. The Prefix sorts the Models into whole Categories, the Suffix into small Variations. The Category for Playerworn Armor by Human Females here is "HF". After the Prefix come the Namestrings noted in Step 3 ,separated by underscores "_" with the exception of the last one. The Suffix here as a variation is the LOD Versions of the same Model, which all have their own LOD texture.

The Models Filename here is then "hf_rob_appa_0.mmh" to "hf_rob_appa_3.mmh". However unless you can work with the MMH, the hidden reference of Step 6 wont be found. It is there in binary form, and u would need for example "tazpn's commandline tools" to convert them into FBX and then into MMH.XML which is a text format of the MMH. The reference here is called "pf_rob_appa.mao", "pf_rob_appa_l2.mao" and "pf_rob_appa_l3.mao" for their respective LOD Version.

See that effectivly hf got replaced by pf, which is simply another Prefix for only Female Gear. "hf" however was Female Human, but since the Textures get applied to all Female's versions, it is separated. This is arbitrary, but since the same applies to other armor ,it is sometimes "guessable"

The MAO Files reference these textures

pf_rob_appa_0d.dds
to
pf_rob_appa_0tl3.dds

Alternatives

However you can take shortcuts, by guessing which ItemVariation it is under which category, and start by opening the "Itemvariations.xls" file directly. Or by browsing texture files with a Picture Viewer. Since pf_rob*** are only Robes, and its not so many.

DATools also provides a quick way of browsing thru Models, and seeing their Texturenames. You may not catch all Models, but its a possibility.

Guessing examples for the Mage Robe:

  • It is female player gear. So prefix for textures is "pf_"
  • It is a Robe, so any Texture File containing "rob" may be our File.
  • Open the ItemVariations.xls, and by Clothing find Robe, Apprentice and its strings "rob" "app" "a" ,and you may find the filename.

Extracting the Texture from the Package

Model textures are located in two "texturepack.erf" ERF packages, corresponding to high resolution and medium resolution textures. These packages can be found in the (dragon age install directory)\packages\core\textures\ folder. For example, the packages might be:

C:\Program Files\Dragon Age\packages\core\textures\high\texturepack.erf
C:\Program Files\Dragon Age\packages\core\textures\medium\texturepack.erf

Drag and drop these ERF Files onto the Toolset to browse and extract their content. If you have the Name, finding the Files will be easy. The Files will be in both "high" and "medium" and the quality setting in the game will decide which to choose. To make it compatible enough, taking them all may be neccessary.

To prepare for extracting the textures, we must create a directory mimicking the structure of the Dragon Age packages folder. To do this, create a new folder named "textures" in a convenient location (for example, on your desktop). Inside this folder, create two new folders, named "high" and "medium". The "high" folder will be where the high-resolution textures are extracted to, and the "medium" folder will be where the medium-resolution textures are extracted to.

For this tutorial, we are interested in the mage's robes. To locate the textures of the mage's robes, scroll down to "pf_rob_appa_0d.dds" in one of the two texturepack ERFs. In each texturepack.erf, select all of the image files prefixed with "pf_rob_appa" (from "pf_rob_appa_0d.dds" to "pf_rob_appa_0tl3.dds"). For the high-resolution texturepack.erf, extract these images to the "textures\high\" folder just created. Extract the medium-resolution textures to the "textures\medium\" folder.

The Suffixes for Texturefiles are describing their Formats, which is described under Textureformats.

To extract one of the textures, right-click on it and select "Extract Resource."

Editing the Textures

At this stage, if we wanted to edit the existing robe textures, we could do so by changing these files. See Textureformats.

Once this has been done for all of the robe textures (in both the "High" and "Medium" folders), we'll be ready to override the default textures in Dragon Age.

Overriding the Existing Textures

The end result: reskinned default mage robes.

To override the existing textures, copy the "textures" folder containing the modified textures, and paste this folder into the Dragon Age override folder. The override folder is found in:

  • Documents\BioWare\Dragon Age\packages\core\override\

for Windows Vista and 7, and in a similar location on Windows XP.

So, after pasting in the modified textures, the structure of the override folder should look like this:

  • Documents\BioWare\Dragon Age\packages\core\override\
    • textures
      • high
        • pf_rob_appa_0d.dds
        • (...)
        • pf_rob_appa_0tl3.dds
      • medium
        • pf_rob_appa_0d.dds
        • (...)
        • pf_rob_appa_0tl3.dds

Further Tutorials

Tutorial: Creating recolors of existing items - A way to change the tint of the new texture

Related Links

Texture Formats - Texture formats in detail.

Art Resources - Broad topic of Art Resources, which textures are a part of.