OSP Kit QoL Dead roam the Earth

Users who are viewing this thread

It's pretty much done.  The only detail that's left is handling death sequences in a bit cooler way, but I don't suppose that matters for your purposes, so I'll upload it to the Repository shortly.
 
OK, here's the file version 1.1 and some code to make it all work.

First, get my update to Barf's Undead Army.

Now for some code:

module_skins, up at the top, with the rest of the facegen code:

Code:
skeleton_face_keys = [
(0,0,0,0, "Chin Size"),
(0,0,0,0, "Chin Shape"),
(0,0,0,0, "Chin Forward"),
(0,0,0,0, "Jaw Width"),
(0,0,0,0, "Jaw Position"),
(0,0,0,0, "Mouth-Nose Distance"),
(0,0,0,0, "Mouth Width"),
(0,0,0,0, "Cheeks"),

(0,0,0,0, "Nose Height"),
(0,0,0,0, "Nose Width"),
(0,0,0,0, "Nose Size"),
(0,0,0,0, "Nose Shape"),
(0,0,0,0, "Nose Bridge"),

(0,0,0,0, "Cheek Bones"),
(0,0,0,0, "Eye Width"),
(0,0,0,0, "Eye to Eye Dist"),
(0,0,0,0, "Eye Shape"),
(0,0,0,0, "Eye Depth"),
(0,0,0,0, "Eyelids"),

(0,0,0,0, "Eyebrow Position"),
(0,0,0,0, "Eyebrow Height"),
(0,0,0,0, "Eyebrow Depth"),
(0,0,0,0, "Eyebrow Shape"),
(0,0,0,0, "Temple Width"),

(0,0,0,0, "Face Depth"),
(0,0,0,0, "Face Ratio"),
(0,0,0,0, "Face Width"),

(0,0,0,0, "Post-Edit"),
]

Next, module_skins, below the woman skin definition:

Code:
  (
    "skeleton", 0,
    "barf_skeleton", "barf_skeleton_calf_l", "barf_skeleton_handL",
    "barf_skull", skeleton_face_keys,
    [], #man_hair_meshes ,"man_hair_y5","man_hair_y8",
    [], #beard meshes ,"beard_q"
    ["hair_blonde", "hair_red", "hair_brunette", "hair_black", "hair_white"], #hair textures
    ["beard_blonde","beard_red","beard_brunette","beard_black","beard_white"], #beard_materials
    [
		("barf_skull",0xffffffff,["hair_blonde"],[0xffffffff, 0xffffffff]),
     ], #man_face_textures,
    [], #voice sounds, put your own in here, following the template of the man / woman; I built custom sounds of moaning and stuff
    "skel_human", 1.0,
    psys_game_blood,psys_game_blood_2,
  ),
#P.S., you can use any particle effect you want for blood.  I built a "dusty" effect for mine.

Now, for a header_troops entry:

Code:
tf_skeleton         = 2
Note that that can be adjusted; you can have a fairly large number of custom races.

Module_troops, up at the top with the other facecodes:

Code:
skeleton_face1  = 0xffffffff00000000000000000000000000000000000000000000000000000000
skeleton_face2  = 0xffffffff00000000000000000000000000000000000000000000000000000000

Now, for a module_troops entry (please note; this is just an example, and does not have equipment; the skeletons can wear helmets and boots or use the custom skeleton armors as shown here:

Code:
["death_knight_skeleton_archer","Death Knight Skeleton Archer (?)","Death Knight Skeleton Archers (?)",tf_skeleton|tf_always_fall_dead|tf_mounted|tf_guarantee_helmet|tf_guarantee_shield|tf_guarantee_ranged|tf_no_capture_alive,0,0,fac_death_knights,[itm_arrows,itm_long_bow,itm_strong_bow,itm_short_bow,itm_spiked_club,itm_mace_1,itm_tab_shield_round_a,itm_nordic_helmet,itm_nordic_archer_helmet,itm_skeleton_armor01,itm_skeleton_armor02,itm_skeleton_armor03],regular_ranged_attrib|level(25),wp_melee(75)|wp_archery(150),0,skeleton_face1,skeleton_face2],

Now, for the custom armors to work, you need some module_items entries like this one (please note that in my mod, all these numbers make perfect sense for fairly weak armor- don't just copy-pasta this code into Warband balance and expect good things to happen, lol:

Code:
["skeleton_armor01","Skeleton Armor",[("barf_skeleton_armor",0)],itp_type_body_armor|itp_unique|itp_covers_legs,0,30000,weight(15)|abundance(0)|head_armor(0)|body_armor(125)|leg_armor(15)|difficulty(1),imodbits_none],

...that's pretty much it.

OK, so now I need to explain a few things I learned along the way:

1.  You don't need a half-face to fix facial problems with custom races.  You don't need a helmet.  You need to use the original Mount and Blade format, not Warband (flags set to 0).  It's that simple, and it only took hours to figure out (because it isn't documented anywhere).  Whether this means that this technique breaks in With Fire and Sword, I can't say, but probably not. 

2.  You have to have a material named whatever_your_base_material_name_is.LOD to fix the face rendering at a distance.  It can be the exact same shader, if that's what you want, it doesn't matter; the name is what matters.

3.  This technique will not give you facegen.  For facegen, you just need the facegen vertex frames, a half-face that has the center of the face's front uvs very precisely at the middle of a square face texture, set it for Warband and flag 30000.  There were other weird flag settings, but they don't seem to matter.

That's pretty much all there is to it.  Like I said before, when I finally worked it out, it's actually very simple... it's just the figuring it out that sucks, because there wasn't much to go on.  Setting the skin code the way it is in this example means that the engine won't be applying any per-vertex color changes, so you can do whatever you want in terms of color.  But you could very easily do elves with facegen- just export the human facegen frames, give them all pointy ears and adjust the nose-mouth ratio and slim the face a wee bit, and voila.  Orks wouldn't take much more work, but you'd have to be careful to keep the geometry fitting in helmets, otherwise you'd be forced to go the static-head route or use helmets-for-heads like Persistant World does.  Basically, though, it's all pretty easy, once you know why it doesn't work.

Lastly, I finally figured out what was causing the crashes.  It was so simple and elementary that I shouldn't admit it; worse yet, I encountered it months ago, and promptly forgot about it.  When you add new skins, you absolutely must start a fresh game.  Must. 

IOW, adding in new skins files is best done early in a project... or, if you have a long-established habit of cheerfully breaking people's savegames like I do, you just say, "if they want the features, they'll start a new game".  Which isn't perfect, but that's how it works for me- luckily, players are surprisingly forgiving about it if you give them shiny new toys :smile:
 
Skeleton army raises again!

Thanks for all the work, xenoargh.

I'll try to post some pics tomorrow :smile:

The link in your post doesn't work though, it points to:

http://www.mbrepository.com/submit.php?action=edit&eid=2820

and it should be:

http://www.mbrepository.com/file.php?id=2820

 
Aaah, there's a curse with skeletons, I tell you.

I see this in OpenBRF:

3336ba44473bceec8c336d20eba6c22ace0fc71819b0a8351d9b4243656509676g.jpg
 
Oh.  Yeah.  I should fix that.  It's the old skull texture.  Sorry, I was working on it in Blood and Steel's files, didn't bring that over.  Just a mo'.
 
Hey xeno, I tried it out but there are some serious bugs. First of all it doesn't work if I don't define their faces in module_troops.py. So I did copy the face keys of the undead and it worked. Secondly, in- game they look like this:


Face texture is distorted and they don't have feet or hands.
How can I fix this?
 
You used 1.2, correct?  That looks very odd; you're missing hands and feet there, amongst other things.  Did you copy the code exactly, including the facecode stuff I posted?  You can't skip any steps, basically.  And you need to make sure you're using the current version, I goofed up with 1.1 and left the old skull texture in.

Oh, and...

Code:
skeleton_face1  = 0xffffffff00000000000000000000000000000000000000000000000000000000
skeleton_face2  = 0xffffffff00000000000000000000000000000000000000000000000000000000
 
Sorry, my mistake.  :oops: It's fixed now.
Btw, can you please share the particle system code you used for your skeleton please? I really don't like seeing them bleed and get all red.
 
Glad it's fixed now- I guess the project's finally "un-cursed", heh.

As for the particle systems... it's really easy to make one yourself;  look at the particle system for the horse's hooves making mud / dust, change the vector used.
 
If I use that one will blood spots stop appearing on the body?
Btw, thanks I will add you to the credits of my mod.
 
If I use that one will blood spots stop appearing on the body?
No.  That's controlled by vertex colors-  hmm, I have that turned off- I take it that they turn red?  If yes, that's interesting, I thought model vertex colors overrode the blood code. 

But the particle stuff will only change the blood splashes that appear when you hit them, basically.
 
Can you totally disable blood on the skeletons?

Anyways, can you help me with something else please? I have a helmet who was originally designed for M&B but when I use it in Warband the face inside doesn't appear. Is there a solution for this? Like a flag I need to add or something?
 
theAthenian said:
Can you totally disable blood on the skeletons?

Anyways, can you help me with something else please? I have a helmet who was originally designed for M&B but when I use it in Warband the face inside doesn't appear. Is there a solution for this? Like a flag I need to add or something?

Erase the "itp_covers_head" (or something like that).
 
Working great, xeno. Thanks again.

My only grip is that LODS are way too extreme, but actually with the new OpenBRF that's not a problem.

Seems though that not everybody is as happy as me with the new undead raising, heh:

fbbf0bf0c6b124b36dd01a08c4696ae87d1ce162f43e8a553d95b43e3e48971a6g.jpg

May I suggest you Athenian to change the tittle's thread for something more descriptive?
 
Back
Top Bottom