Johnny Morphine
Knight at Arms

I searched around for a bit, and discovered that apparently no one was sure how to edit the face codes in troops.txt for later releases. Since I just started working on a massive expansion of the troop tree, I thought I'd try to figure it out. Actually it's quite simple.
I knew the code had to be in each troop entry somewhere, so I fooled around a little. Here's the way I ultimately got the answer.
Start a new game, leave the face on default, then export your character. At the bottom of the export file you get 2 face keys in hex:
face_key_1 = 180000001
face_key_2 = 36db6db6db6db6db
There are no hex numbers in troops.txt, so I tried converting these numbers to their decimal equivalents:
face_key_1 = 6442450945
face_key_2 = 3952873730080618203
The first entry in troops.txt is the basic player character. These two numbers show up precisely the same under that entry in the file (the very first one).
What threw me off at first was that the first key is a ten digit number, and most troops have an eleven digit number under their entries. But that's because when you convert lower values to decimal you might get less digits. Just imagine a zero in front of that and it all adds up.
Concerning what each individual number means, I couldn't speculate. Besides, unless someone really wants to design a face using code alone instead of copying the code produced by a detailed visual, I don't think anyone will care to find out.
Remember that basic troops have two face values between which the game will generate a number of possible faces. Just look for the eleven (or ten) and nineteen or so digit numbers at the end of the entry. Ex:
trp_swadian_sergeant Swadian_Sergeant Swadian_Sergeants 40895488 0 0 3 639 0
346 0 292 0 272 0 308 0 377 0 213 0 207 0 141 0 145 0 254 0 249 0 253 0 254 0 129 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0
7 5 4 4 25
144 139 150 0 0 0 0
274 131072 0 769 208896 0
34359738369 1315051091194281984 1835136 0 67645760199 7916447985573822463 2031036 0
(face codes)
I'm still working on what the values between these numbers actually mean, but I'm pretty sure that the smaller number is what's on the left side of the face creation screen and the larger one is what's on the right. To be totally honest, I haven't tested any of this in actual troop creation because I'm in the middle of the end of the spring semester. But I'm so damn sure of the logic behind this that, in the spirit of Da Vinci, I don't need to see it built to know that when I get back to my mod I'll be able to put this knowledge right to work. Regardless, I thought someone might find this info useful in the meantime. Maybe someone will want to explore this further before I get the time (thus saving me some work).
Cheers.
I knew the code had to be in each troop entry somewhere, so I fooled around a little. Here's the way I ultimately got the answer.
Start a new game, leave the face on default, then export your character. At the bottom of the export file you get 2 face keys in hex:
face_key_1 = 180000001
face_key_2 = 36db6db6db6db6db
There are no hex numbers in troops.txt, so I tried converting these numbers to their decimal equivalents:
face_key_1 = 6442450945
face_key_2 = 3952873730080618203
The first entry in troops.txt is the basic player character. These two numbers show up precisely the same under that entry in the file (the very first one).
What threw me off at first was that the first key is a ten digit number, and most troops have an eleven digit number under their entries. But that's because when you convert lower values to decimal you might get less digits. Just imagine a zero in front of that and it all adds up.
Concerning what each individual number means, I couldn't speculate. Besides, unless someone really wants to design a face using code alone instead of copying the code produced by a detailed visual, I don't think anyone will care to find out.
Remember that basic troops have two face values between which the game will generate a number of possible faces. Just look for the eleven (or ten) and nineteen or so digit numbers at the end of the entry. Ex:
trp_swadian_sergeant Swadian_Sergeant Swadian_Sergeants 40895488 0 0 3 639 0
346 0 292 0 272 0 308 0 377 0 213 0 207 0 141 0 145 0 254 0 249 0 253 0 254 0 129 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0
7 5 4 4 25
144 139 150 0 0 0 0
274 131072 0 769 208896 0
34359738369 1315051091194281984 1835136 0 67645760199 7916447985573822463 2031036 0
(face codes)
I'm still working on what the values between these numbers actually mean, but I'm pretty sure that the smaller number is what's on the left side of the face creation screen and the larger one is what's on the right. To be totally honest, I haven't tested any of this in actual troop creation because I'm in the middle of the end of the spring semester. But I'm so damn sure of the logic behind this that, in the spirit of Da Vinci, I don't need to see it built to know that when I get back to my mod I'll be able to put this knowledge right to work. Regardless, I thought someone might find this info useful in the meantime. Maybe someone will want to explore this further before I get the time (thus saving me some work).
Cheers.