I've done some memory research. I have discovered what unit.body.unk_4b8 does. It controls head/face appearance (eye closeness, head wideness, etc). I would like to put this information into the xml files, but I am uncertain of how to proceed.
If it were as simple as unk_4b8[0] controls eye closeness and unk_4b8[12] controls iris size, I would know what to do in dfhack/library/xml/df.units.xml. However, it is not that simple. In different species, different elements control different things. I have discovered the pattern, but I don't know how to encode it into the xml file.
Ideally, I'd like this information to be (somehow) available to lua, but even if that's not possible, I would like to put detailed documentation of it somewhere. I am not sure of the rules on where documentation files go. Is it ok if I put it in the xml folder?
It would be a shame to let this knowledge go unrecorded. It took quite a long time to find and thoroughly confirm the pattern.
Roughly, the pattern works like this: there is a constant set of facial traits that can exist, regardless of species. However, different species have a different number of eyes, heads, etc. The order of the traits listed is always the same (though some may have zero elements, for example if a species has no eyes). Eye wide-setness is first, followed by eye depth. If a creature has n eyes, the first n elements in the vector will determine eye wide-setness, but only the first will be used for in game descriptions. The next n elements control eye depth, and again, only the first is used for in-game descriptions.
A note on in-game descriptions: only the first is used, but sometimes it will specify this in game (and sometimes not). For example, it will never say that a dwarf's left eye has large irises. However, it might say that an ettin's left head is very broad. In this case, it will never make any comment about the ettin's right head.
I have the full list written down but it is too long for this margin.