Racial types and face codes in M&B

正在查看此主题的用户

I've searched the forums for some kind of primer or outline regarding the racial types and face codes in M&B with no results, which I find troubling because either I'm the only one who doesn't get it, or there's some reluctance to venture into this area because its...well...a cluster**** proportionate to modeling and texturing..

All you experienced modders are familiar with the beginning of troops.py and those codes:

插入代码块:
khergit_face_younger_1 = 0x0000000009003109207000000000000000000000001c80470000000000000000
khergit_face_young_1   = 0x00000003c9003109207000000000000000000000001c80470000000000000000
khergit_face_middle_1  = 0x00000007c9003109207000000000000000000000001c80470000000000000000
khergit_face_old_1     = 0x0000000b89003109207000000000000000000000001c80470000000000000000
khergit_face_older_1   = 0x0000000fc9003109207000000000000000000000001c80470000000000000000

So, from what I can tell, what we have are 4 white boy types (ranging from white to whiter and blond to blonder), which encompass the Swadians, Nords, Vaegirs and Rhodoks.

Then there's a florid-faced, high-arching-eyebrow Khergit, and a rather swarthy east asian looking Khergit.

Finally there is an African race, which is only represented in the game by several NPCs (our friends Nizer and Rolf, guildemaster of Sargoth etc. )But doesn't seem to appear much anywhere else.

Now, I have seen some mods effectively isolate a "racial type" and put them into their mods, but when I have attempted it myself its usually a hilarious disaster.

One example is a Khergit troop type where I have given two khergit face codes (and I'm using the "default" codes in troops.py) to a new troop type. This is something like a range between khergit_face_young_1 to khergit_face_older_2 (or any other predefined khergit variety) and the result is that I usually get a dozen or so look-alikes of the first code, and then a bunch of blond guys who looked like they just stepped off the boat from Nordland.

Now, I have noticed some Vaegir looking types amongst the Khergits in some M&B native troops, but not to the extent that I experience in my own created troops, fiddling around with different face codes.

I've tried out an African only troop type (none of which are predefined in any way in troops.py) so I try to get the "range" between Nizer's face code and Rolf's face code, I end up with similar results.

So, does anyone know how this crap is suppose to work? When I get the "range" from one black face to another black face in my troop, why is it interspersed with billybobs? Do you guys just plop down one code, dupe it, and let the clones have at it?

In the mod I'm working on, it's kind of essential that the racial types conform to their real-world counterparts and variants. Am I the only one who has difficulty with this? Should I stick with the the predefined "ranges" for existing troops found in the native game?

(Please don't mention the orcs, elves and undeads. If I can't move beyond this, why would I venture thataway?  :wink:)
 
I'm not entirely sure how to solve it, but by using the face editor in game (press ctrl+e in edit mode while you are editing your face to have the face code pop-up, click that, then alt+tab to the troops.py)  you can make things like what you quoted but for, for example, black faces.

example_face_younger_1 = 0x0000000009003109207000000000000000000000001c80470000000000000000
example_face_young_1  = 0x00000003c9003109207000000000000000000000001c80470000000000000000
example_face_middle_1  = 0x00000007c9003109207000000000000000000000001c80470000000000000000
example_face_old_1    = 0x0000000b89003109207000000000000000000000001c80470000000000000000
example_face_older_1  = 0x0000000fc9003109207000000000000000000000001c80470000000000000000

and such. (Those are the native khergit codes, btw.) You just use the age-slider, and change things like hair and beard styles and maybe general shape of the face to change that. Then you have some more of those codes to make ranges between, but you might want to restrict the range a bit, I think. I haven't had your problem, I believe. You could for example give a low-level khergit troop khergit_face_younger_1 and khergit_face_young_2, but I wouldn't use younger_1 and older_2 in one and the same troop, because that seems to make the range a bit too wide. :???:
 
FrisianDude 说:
You could for example give a low-level khergit troop khergit_face_younger_1 and khergit_face_young_2, but I wouldn't use younger_1 and older_2 in one and the same troop, because that seems to make the range a bit too wide. :???:

That's kind of obvious now that I think about it.  :lol:

I was looking at my Swadians and they are all the same code. Is that the way it is in original files or did I inadvertently dupe them? I'll try out your homeboy codes...
 
FrisianDude 说:
I didn't post any codes. :razz:

Hmm. My mistake. I put a mental colon at the end of "for example, black faces."

example_face_younger_1 = 0x0000000009003109207000000000000000000000001c80470000000000000000

...and then there's that damned "example" word again....

 
Speaking of this topic, is there any info about unpacking these face codes?

I'm operating under the assumption that these are basically bitfields.  The numbers are basically hexadecimal constants, but the hex number would be composed of a series of smaller "numbers", aligned to powers of 2, each of which corresponds to one of the values in the face creation process.  Is this accurate?

Further, is there any info about unpacking these numbers?  I mean, I can think of some ways to do this experimentally with ctrl+e, but I'd rather not reinvent the wheel. 
 
后退
顶部 底部