Since Bioware has announced that they will be pulling down their old game forums, I have decided to rescue an old thread that I started there, for posterity. This is about modifying character's appearance in the Windows edition of Dragon Age: Origins, after character creation is over. This is advanced stuff that requires hex editing your save file, but with a bit of motivation, it's possible to fix eyeshadow disasters, and other makeup problems (which are easy to make, due to somewhat muddy lighting in the character customization scene).

I have included the contents of only my posts from this thread, since I do not have consent from the other participants (or from Bioware) to share the other posts. The contents are exactly as they were originally posted, without editing (except adapting formatting for this site).

NOTE: The float-to-hex converter linked in the post is dead. This will probably work, if you need an alternative: http://www.h-schmidt.net/FloatConverter/IEEE754.html


HOWTO: Tweak Eyeshadow on Your Existing Character's Face

Posted 21 January 2010 - 04:16 AM

This is not posted in the Toolset area, since it doesn't actually involve the Toolset at all, and there are lots of people who want to know how to change their characters' appearance.

Due to the dim character-creation lighting, I had some serious eyeshadow issues, through my entire first play-through, and it was distracting during almost every cutscene where I could see my character's face. In light of this, I have gone hacking around in the savegame files, to figure out how to fix up eyeshadow, in case anyone else has this problem. This is a highly technical procedure, and it shouldn't be undertaken without lots of backups, and a willingness to crack open a hex editor and glare at lots of numbers.

The following will only work if your character actually had some eyeshadow, to begin with. If she didn't have any, you'll be missing a reference to the color name, and I haven't been able to figure out how to fix that.

1.) BACK UP ANY SAVE FILE YOU ARE GOING TO BE EDITING. I am not responsible if you blow up your save file. I harmed one or two during my R&D on this, so it is possible to blow it up. If you don't even know where your save files are, you probably aren't ready to embark on this quest.

2.) Open up your .das file in your favorite hex editor of choice. If you don't know what a hex editor is, you probably aren't ready for all this. If you're feeling bold, anyway, I used Frhed (http://frhed.sourceforge.net/) for editing my test files.

3.) To change the color of your eyeshadow, search for the string "_mue_" in your file. (It will be in unicode, so you may need to search in unicode mode. If your hex editor can't do that, you may be able to try "_.m.u.e._") The full string should look like "t.1._.m.u.e._.b.l.2." but the last three characters will vary depending on what your old eyeshadow color was. Those are the ones you will want to change. Go to http://social.bioware.com/wiki/datoolset/index.php/Morph#Eye_shadow to find the color you want, and change the tag to match it. (Be sure not to mess up the unicode. The interstitial 00s should be preserved.)

4.) To change the intensity of the eyeshadow, search for "TintMaskColours" (again, unicode). Shortly after that, there will be about 14 bytes of xFF. Followed by that immediately is 4 more bytes (it was 0A000000 in all my test files). Then, there are 4 bytes representing one of your sliders (cheek intensity or lip intensity?). The next four bytes are your eyeshadow intensity! I have not figured out how it is represented, exactly, but here are some example values:

CD CC CC 3D - If you slide the intensity slider one stop to the right of 0, I think this is what you get. This is mostly invisible, so you can try it out, if you want to just erase your eyeshadow.
00 00 80 3F - This is what you get if you move the eyeshadow slider all the way to the right.

You may need to experiment to get the exact intensity you want. Feel free to share your findings!

5.) Save your file. Unless you mangled your binary file, you should now be able to load it up like any other save file, with no other special work.

Finally: How on earth did I figure this out?

I'll share this info, since it may help people crack other bits of the morph DNA. I created two new characters from a known preset, and changed only the eyeshadow settings. Then, I opened them up in Beyond Compare, and did a hexidecimal diff of the two save files. The character head morph data begins at "GFF V4.0PC MORPV0.1" (NOT Unicode), and you do not need to concern yourself with any differences prior to that. There are a lot of "noise" differences in the morph data (probably from floating-point error), but they're easy to spot (it's usually a nice, regular pattern). The actual value you want to change should stand out like a sore thumb, once you rule those out.

Happy tweaking!


Posted 21 January 2010 - 08:26 AM

Of course, the moment my head hit the pillow, I realized that 00 00 80 3F is just the 32-bit floating point representation of 1.0 in little-endian. DUH. If I only had a brain...

CD CC CC 3D comes out to roughly 0.1, give or take, so the normal slider stops are probably at increments of 0.1.

Using a full 32-bit float might seem a bit extravagant for a slider with so few stops on it, at first blush, but they're probably passing these values straight into a shader, and if there's anything GPU shaders love, it's 32-bit floats.

If you know roughly what decimal value you want (between 0 and 1.0), you can just punch it in here: http://babbage.cs.qc.edu/IEEE-754/Decimal.html to see the hexadecimal equivalent. However, keep in mind that in Intel-land, we work in little endian, so you have to reverse the order of the bytes. For example, if you type in 0.37, it will output 3EBD70A3. Break that up into two-digit pairs (each representing one byte): 3E BD 70 A3. Then, reverse the order of the pairs: A3 70 BD 3E. That's the value you want to put into your file for 0.37. Welcome to Computer Science! Please enjoy your stay.

Now that I've got a pretty good handle on this, maybe I'll map out a little more of this pesky binary genome (feel free to pitch in)...