Dragon Age 2
0 of 0

File information

Last updated

Original upload

Created by

sarchiapozzo

Uploaded by

sarchiapozzo

Virus scan

Safe to use

About this mod

modding facial structure using the PYGFF Editor

Permissions and credits
Advanced Tutorial: Mop Modding using the PYGFF Editor

I was wondering why marquiseondore never released an advanced guide to mop modding. Now, after I took a look inside mop files, I know: she's a perfectionist and wouldn't release something incomplete or doubtful. Modding without code or proper tools is like "visual reverse engineering", you change some value and observe the results: very doubtful.
I'm not such a perfectionist so I'll share what I found so far.

Tools needed:

Mephales's PYGFF Editor
Thought Process's Erf Packer
Mop Modding using the PYGFF Editor by lastofthecouslands
Mop files and PDF reference tables attached

First things first: read the whole guide marquiseondore made, it's a must.

I'll be using the same hf_cgn_001.mop as in marquiseondore tutorial, extracted from the FACE.erf located in the Dragon Age 2\packages\core\data\

We are looking for the index 23018: MORPH_MODEL_PARAMS.

Soo full of strings is it, uh? Don't worry, first some rules:

The order of the branches in index 23018 doesn't matter.
mt_cbt_**** are facial shapes. (e.g. mt_cbt_hf01)
mt_aet_**** are eyes shapes. (e.g. mt_aet_hf01)
mt_ant_**** are nose shapes. (e.g. mt_ant_hf01)
mt_amt_****** are all parameters of the facial structure. (e.g. mt_amt_hed01a)
mt_bas_uh is the base facial structure for humans.

The algebraic sum of the values in all mt_amt**** parameters minus mt_bas_uh must be zero. (golden rule)
Zeroed strings don't affect the morph.
Almost every mt_amt_****** parameter ending with "a" has its opposite in the same parameter ending with "b". (e.g. mt_amt_chk01a and mt_amt_chk01b)
Negative values in mt_amt_****** parameters produce similar effects to positive values in their opposite.
Values between 0 and 1 produce still acceptable results without compromising anatomic realism.
All mt_***_**** and mt_***_****** parameters are .mmh files. They are in Dragon Age 2\packages\core\data\artfp.erf file inside art\characters\playercharacter folder and subdirectories.
There must be only one branch with the same content. e.g. 'art\\characters\\playercharacter\\shared\\heads\\mt_amt_eye09b', 0.5 + 'art\\characters\\playercharacter\\shared\\heads\\mt_amt_eye09b', 0.5 isn't equal to 'art\\characters\\playercharacter\\shared\\heads\\mt_amt_eye09b', 1.0, it's error.

Inside 23018 index, let's begin decreasing to one only all parameters affecting the same facial part (i.e. mt_amt_eye11a and mt_amt_eye05b, delete mt_amt_eye11a), then we zero them and we sort them by anatomical order. To make thing easy we can cut and paste or copy paste, here the result:

Let's say we want to narrow her cheeks: the slider "cheek width" doesn't help us because it's all the way right; taking a look at the PDF reference table, under "mt_amt_chk" cheeks we find the parameter "mt_amt_chk04b" narrow cheeks.

Holy s**t! It's all messed up! I forgot the golden rule: The algebraic sum of the values in all mt_amt**** parameters minus mt_bas_uh must be zero, all we must do is change mt_bas_uh parameter according to the rule so let's do it.

Let's change the mouth, the iris and the nose tip, then let her have a shape of the eyes we can't obtain with sliders. We need: mt_amt_lip01b small lips, mt_amt_eye02a small iris, mt_amt_nos14a Tip up and mt_aet_hf05 up arc eyes.

We want her look more like Bethany, have slanted eyes and a twisted nose: mt_cbt_beth Bethany shape, mt_amt_eye11a slanted centre down and mt_amt_nos09b right.

Like marquiseondore says, she won't win any beauty contests but she's quite unique.
Using parameters in mop files allows us to go further the limits imposed by sliders and to add some new features like the iris' size or the mouth size. All red parameters in the reference tables are not reproduced by sliders in the Character Creator, all yellow highlighted ones are very useful, like mt_amt_hed01a and mt_amt_hed01b that allow to change the size of the face, not only the chin, the jaw or the cheeks like the sliders do but all together leaving unchanged their proportions.

Try mt_amt_eye07b for squinted eyes, mt_amt_ear06a for vampiric ears and mt_amt_eye09b for very long lashes.
Do you remember the sliders in the last tab of DAO Toolset? They allowed us to mix up the facial model of Morrrigan, Anora, Wynne and Leliana: mt_cbt_**** parameters have the same purpose, we can mix them up to obtain a new model, setting them to 1 give us the model Bioware uses in-game.
mt_amt_tet****** parameters change the position of the teeth, we need them only when the meshes overlap because of changes we made to jaw and mouth. Open wide the mouth using mt_amt_tet03a, then align the teeth to the oral cavity.
My advice is to use a mop file containing all kind of parameters zeroed (for easy future copy-paste), rename it something like hf_cgn_morphbase.mop and put it in the override directory (better inside an erf pack). Then add a key in chargenmorphcfg.xml: <resource name="hf_cgn_morphbase.mop"></resource> at 1st place right under <resource name="hf_iconicfemale.mop"></resource> and use only this every time you create a character. So if you plan to change it, the character in your save file will maintain its CC's informations associated to the mop file even if you add others keys to chargenmorphcfg.xml later.
Obviously, you should save a hf_cgn_morphbase.mop for every character you made, better in the same folder of the save file.
If you launch the game in window-mode, low graphical detail, all effects disabled, then go to the Black Emporium and use the mirror, you can change your mop opened in pyGFF editor in real-time. Move the "preset" slider forward and back again to update the model, check it and repeat. To reset your changes use "reset".
Save when you are in front of the mirror to resume your work later. The only thing that needs restarting the game to change it is chargenmorphcfg.xml (for our purpose, not in general obviously)
This guide covers human female and male characters, I have found nothing about elf or qunari creation. Changing the first key in index 23000 to mt_bas_ef or mt_bas_em doesn't produce any morph, although such files exist in FACE.erf. I think the base files for creating elves and other races are missing, it should need something like mt_bas_ue.mmh for elves, mt_bas_ud.mmh for dwarves and so on, but I'm only guessing.

Credits:
credits and thanks go to marquiseondore for her guide, gibbed and Mephales for their tools.

I'm not a native English speaker so if someone more skilled (either at writing in English or at modding) wants to correct this guide, feel free to do it and to reup it, just ask me so I'll put mine offline, no credits needed.