Difference between revisions of "Recolouring an armour for Dragon Age 2"

From Nexus Mods Wiki
Jump to: navigation, search
Line 6: Line 6:
 
* Thought Process' [http://mod.gib.me/dragonage2/erfpack-rev21.zip erfpack-rev21.zip]
 
* Thought Process' [http://mod.gib.me/dragonage2/erfpack-rev21.zip erfpack-rev21.zip]
 
* [http://www.gimp.org/ GIMP]
 
* [http://www.gimp.org/ GIMP]
 
  
 
== Recolour an armour ==
 
== Recolour an armour ==
Line 46: Line 45:
 
[[File:RecolourTut_3.jpg|right|thumb|Noble outfit A *.mmh file]]
 
[[File:RecolourTut_3.jpg|right|thumb|Noble outfit A *.mmh file]]
  
Now that you know the name of the mesh files (or at least, have a short list of possible names), the next step is to examine the mmh and mao files of the armour.
+
Now that you know the name of the mesh files (or at least, have a short list of possible names), the next step is to examine the mmh file of the armour to find out the name of the corresponding mao file.
 
# Launch the ''editor.exe'' of the [http://social.bioware.com/project/1936/  pyGFF tool].
 
# Launch the ''editor.exe'' of the [http://social.bioware.com/project/1936/  pyGFF tool].
 
# Extract the contents of the ''artfp.erf'' file to a temporary folder. (see [[Extracting_files_from_erf_and_rim_files_for_Dragon_Age_2|Extracting files from erf and rim files for Dragon Age 2]] for more information on how to extract the game files).
 
# Extract the contents of the ''artfp.erf'' file to a temporary folder. (see [[Extracting_files_from_erf_and_rim_files_for_Dragon_Age_2|Extracting files from erf and rim files for Dragon Age 2]] for more information on how to extract the game files).
Line 54: Line 53:
 
# For recolouring we are only interested in the cth_noba.mmh file. Open it with [http://social.bioware.com/project/1936/  pyGFF tool] and examine its contents.
 
# For recolouring we are only interested in the cth_noba.mmh file. Open it with [http://social.bioware.com/project/1936/  pyGFF tool] and examine its contents.
 
#: '''''Note:''' In case you didn't know which noble outfit was the one you were looking for, you'll have to examine all the cth_nob files, i.e. cth_noba.mmh, cth_nobb.mmh, cth_nobc.mmh, cth_nobd.mmh and cth_nobe.mmh''  
 
#: '''''Note:''' In case you didn't know which noble outfit was the one you were looking for, you'll have to examine all the cth_nob files, i.e. cth_noba.mmh, cth_nobb.mmh, cth_nobc.mmh, cth_nobd.mmh and cth_nobe.mmh''  
# Expand the root node (0)
+
## Expand the root node (0)
# Expand the first MMH_CHILDREN node (6999)
+
## Expand the first MMH_CHILDREN node (6999)
# Expand the next root node (0)
+
## Expand the next root node (0)
# Expand the next MMH_CHILDREN node (6999)
+
## Expand the next MMH_CHILDREN node (6999)
# Expand the last node (6)
+
## Expand the last node (6)
# Look at the value of the MMH_MATERIAL_OBJECT node (600) as shown in picture ''Noble outfit A *.mmh file''. This is the path and name of the *.mao file used by the mesh where the texture files are defined. For the Noble outfit A, the *.mao file is ''art\characters\playercharacter\humanfemale\cth_noba'' + ''.mao''.
+
## Look at the value of the MMH_MATERIAL_OBJECT node (600) as shown in picture ''Noble outfit A *.mmh file''. This is the path and name of the *.mao file used by the mesh where the texture files are defined. For the Noble outfit A, the *.mao file is ''art\characters\playercharacter\humanfemale\cth_noba'' + ''.mao''.
#: '''''Note:''' In case you didn't know which noble outfit was the one you were looking for, you'll see that the corresponding *mao files follow the same naming convention, i.e. cth_noba.mao, cth_nobb.mao, cth_nobc.mao, cth_nobd.mao and cth_nobe.mao''  
+
#: '''''Note:''' In case you didn't know which noble outfit was the one you were looking for, you'll see that the corresponding *.mao files follow the same naming convention, i.e. cth_noba.mao, cth_nobb.mao, cth_nobc.mao, cth_nobd.mao and cth_nobe.mao''
 +
 
 +
==== Examine the *.mao file ====
 +
[[File:RecolourTut_4.jpg|right|thumb|Noble outfit A *.mao file]]
 +
[[File:RecolourTut_5.jpg|right|thumb|Noble outfit A texture files]]
 +
 
 +
Now let's examine the mao file for the armour.
 +
# Launch the ''editor.exe'' of the [http://social.bioware.com/project/1936/  pyGFF tool].
 +
# Extract the contents of the ''globalmao-core.rim'' file to a temporary folder. (see [[Extracting_files_from_erf_and_rim_files_for_Dragon_Age_2|Extracting files from erf and rim files for Dragon Age 2]] for more information on how to extract the game files).
 +
# Select the menu option ''File -> Open'', go to the temporary folder where you've extracted all the mao files and go down to the folder that was indicated in the *.mmh file. For the human female Noble outfit A the folder was ''art\characters\playercharacter\humanfemale'' and then open the mao file that was indicated there, ''cth_noba.mao'' in our case. Open it and examine its contents.
 +
## Expand the root node (0)
 +
## Expand the last node (33020). You'll see that it has 5 different subnodes as shown in picture ''Noble outfit A *.mao file''. Each subnode indicates one of the texture files used by the armour:
 +
### mml_tDiffuse: indicates the diffuse map
 +
### mml_tNormalMap: indicates the normal map
 +
### mml_tSpecularMask: indicates the specular map
 +
### mml_tTintMask: indicates the tint map
 +
## Expand each node and take down the paths and names of the texture files indicated in the mao file, as shown in picture ''Noble outfit A texture files''. For the Noble outfit A the texture files are stored in the folder ''art\characters\playercharacter\humanfemale\textures\'' and the file names are ''hf_cth_noba_0d.dds'' for the diffuse map, ''hf_cth_noba_0n.dds'' for the normal map, ''hf_cth_noba_0s.dds'' for the specular map and ''hf_cth_noba_0t.dds'' for the tint map.
 +
##: '''''Note:''' In case you didn't know which noble outfit was the one you were looking for, you'll see that the corresponding texture files indicated in their *.mao files are all stored in the same subfolder and follow the same naming convention, i.e. hf_cth_noba_0d.dds, hf_cth_nobb_0d.dds, hf_cth_nobc_0d.dds, and so on''
  
 
== Related Pages ==
 
== Related Pages ==

Revision as of 16:49, 30 October 2011

Overview

This tutorial shows how to recolour an armour or outfit for Dragon Age 2.

Required tools

Recolour an armour

Armour file structure in Dragon Age 2

Armours and outfits are defined in several files in Dragon Age 2. The more relevant ones are:

  • item_variations.gda: all equippable items in Dragon Age (armours, outfits, weapons, accesories) have an entry in this file. In this entry there are defined the unique code that identifies the item, its name, the path where the mesh and texture files for this item are stored, the type of item, the icons shown for the item, etc.
  • mesh files: Meshes in Dragon Age 2 are defined in four different type of files:
    • *.mmh: defines the path and name of the other 3 file types of the mesh and has global data of the mesh.
    • *.msh: contains the vertex data of the mesh
    • *.phy: contains the weight data of the mesh (rigging)
    • *.mao: defines the material properties of the mesh and defines the path and name of the texture files.
  • texture files: armour meshes use four different texture files:
    • *_0d.dds: diffuse map. It defines the colour of the different parts of armour.
    • *_0n.dds: normal map. It defines the volume (i.e. the relative heights) of the different parts of the armour.
    • *_0s.dds: specular map. It defines how the different part of the armour reflect light and what light colour they reflect.
    • *_0t.dds: tint map. It defines what parts of the armour can be tinted and how they react to tints.

Finding out the texture files to modify

Selecting a .gda file from the 2da.rim
item_variations.gda
Noble outfit A

This tutorial explains how to recolour an existing armour, so the first step is to find out which are the texture files that are applied to the armour we want to recolour. As Dragon Age 2 doesn't have a toolset, in most cases we have to examine several files until we get the texture files we want to work on. See Extracting files from erf and rim files for Dragon Age 2 for more information on how to extract the game files.

Examine the item_variations.gda file

  1. Launch the editor.exe of the pyGFF tool.
  2. Select the menu option File -> Open and select the 2da.rim file. A window will pop up like the one shown in picture Selecting a .gda file from the 2da.rim
  3. Go down until you see the item_variations.gda file, highlight it and press the OK button.
  4. Now examine the contents of item_variations.gda:
    1. Expand the G2DA_ROW_LIST by clinking on the + box at the left side and you'll see the row contents as shown in picture item_variations.gda
    2. Look at the Value column. Each row displays a number (the item code) and then a name (the item name). Browse down until you find the name of the armour you are looking for. In this tutorial we are going to recolour one of the noble outfits, Noble outfit A, so we browse down until we find it in row 234, as shown in picture Noble outfit A.
    3. Expand the row and look at its contents:
      1. GDA_COLUMN_6 indicates the path where the mesh and textures files are. In this case it is art\characters\playercharacter
      2. GDA_COLUMN_7 indicates the name of the mesh files. In this case it is cth_noba
    4. Take down this information and proceed to the next step.
      Note: It is possible that you don't know the exact name of the armour you want to recolour. For example, let's say that you want to recolour one of the noble outfits but you don't know if it is the Noble outfit A, B, C, D or E. It doesn't matter. By looking at the item_variations.gda you'll see that all noble outfits files are stored under the same folder and are named cth_nob + a letter (cth_noba, cth_nobb, and so on). This information will help you to narrow the search in the next steps.

Examine the *.mmh file

Noble outfit A *.mmh file

Now that you know the name of the mesh files (or at least, have a short list of possible names), the next step is to examine the mmh file of the armour to find out the name of the corresponding mao file.

  1. Launch the editor.exe of the pyGFF tool.
  2. Extract the contents of the artfp.erf file to a temporary folder. (see Extracting files from erf and rim files for Dragon Age 2 for more information on how to extract the game files).
  3. Select the menu option File -> Open, go to the temporary folder where you've extracted all the mesh and textures files and go down to the folder that was indicated in the item_variations.gda. For the Noble outfit A the folder was art\characters\playercharacter.
    1. You'll see there several subfolders: children, dwarfmale, elfmale, ... one for each race and gender. In this tutorial we are going to recolour the human female Noble outfit A, so the mesh files we are looking for are in the \humanfemale\ subfolder.
  4. Inside this subfolder there are lots of files: all the *.mmh, *.msh and *.phy files corresponding to almost all the armours and clothes of the game for human female characters. Look for the mesh files with the name that was indicated in the item_variations.gda file, in our case cth_noba.mmh, cth_noba.msh and cth_noba.phy.
  5. For recolouring we are only interested in the cth_noba.mmh file. Open it with pyGFF tool and examine its contents.
    Note: In case you didn't know which noble outfit was the one you were looking for, you'll have to examine all the cth_nob files, i.e. cth_noba.mmh, cth_nobb.mmh, cth_nobc.mmh, cth_nobd.mmh and cth_nobe.mmh
    1. Expand the root node (0)
    2. Expand the first MMH_CHILDREN node (6999)
    3. Expand the next root node (0)
    4. Expand the next MMH_CHILDREN node (6999)
    5. Expand the last node (6)
    6. Look at the value of the MMH_MATERIAL_OBJECT node (600) as shown in picture Noble outfit A *.mmh file. This is the path and name of the *.mao file used by the mesh where the texture files are defined. For the Noble outfit A, the *.mao file is art\characters\playercharacter\humanfemale\cth_noba + .mao.
    Note: In case you didn't know which noble outfit was the one you were looking for, you'll see that the corresponding *.mao files follow the same naming convention, i.e. cth_noba.mao, cth_nobb.mao, cth_nobc.mao, cth_nobd.mao and cth_nobe.mao

Examine the *.mao file

Noble outfit A *.mao file
Noble outfit A texture files

Now let's examine the mao file for the armour.

  1. Launch the editor.exe of the pyGFF tool.
  2. Extract the contents of the globalmao-core.rim file to a temporary folder. (see Extracting files from erf and rim files for Dragon Age 2 for more information on how to extract the game files).
  3. Select the menu option File -> Open, go to the temporary folder where you've extracted all the mao files and go down to the folder that was indicated in the *.mmh file. For the human female Noble outfit A the folder was art\characters\playercharacter\humanfemale and then open the mao file that was indicated there, cth_noba.mao in our case. Open it and examine its contents.
    1. Expand the root node (0)
    2. Expand the last node (33020). You'll see that it has 5 different subnodes as shown in picture Noble outfit A *.mao file. Each subnode indicates one of the texture files used by the armour:
      1. mml_tDiffuse: indicates the diffuse map
      2. mml_tNormalMap: indicates the normal map
      3. mml_tSpecularMask: indicates the specular map
      4. mml_tTintMask: indicates the tint map
    3. Expand each node and take down the paths and names of the texture files indicated in the mao file, as shown in picture Noble outfit A texture files. For the Noble outfit A the texture files are stored in the folder art\characters\playercharacter\humanfemale\textures\ and the file names are hf_cth_noba_0d.dds for the diffuse map, hf_cth_noba_0n.dds for the normal map, hf_cth_noba_0s.dds for the specular map and hf_cth_noba_0t.dds for the tint map.
      Note: In case you didn't know which noble outfit was the one you were looking for, you'll see that the corresponding texture files indicated in their *.mao files are all stored in the same subfolder and follow the same naming convention, i.e. hf_cth_noba_0d.dds, hf_cth_nobb_0d.dds, hf_cth_nobc_0d.dds, and so on

Related Pages