OSP Kit QoL Dead roam the Earth

Users who are viewing this thread

theAthenian

So I did add a new race to the game(barf's skeleton exactly) but for some reason when I encounter troops who are of that race Warband crashes upon contact.
Here's my codes:
module_troops said:
  ["looter","Skeleton Warrior","Skeleton Warriors",tf_barf_sklton|tf_allways_fall_dead,0,0,fac_undeads,
  [itm_steel_shield,itm_legion_sword_hoplite,itm_ancient_helmet],
  def_attrib|level(4),wp(20),knows_common,undead_face1, undead_face2],

module_skins said:
(
    "barf_sklton", 0,
    "skeleton_cut",  "skeleton_calf_L", "skeleton_hand_L",
    "skull", man_face_keys,
    [], #man_hair_meshes ,"man_hair_y5","man_hair_y8",
    [], #beard meshes ,"beard_q"
    [], #hair textures
    [],
    [("skull",0xffffffff,[]),
    ],#undead_face_textures
    [(voice_die,"snd_woman_die"),(voice_hit,"snd_woman_hit"),(voice_yell,"snd_woman_yell")], #voice sounds
    "skel_human", 1.0,
  ),

Now I do get an error upon start which is:
WARNING: Unable to find material of skull.lod (or something along those lines). Thing is there are no lods nor can I create any cause I don't know how.

So how do I fix those errors?

The solution on HOW TO ADD SKELETONS TO YOUR GAME:
xenoargh said:
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:
 
This should fix it, unless you've made mistakes in your brf references.

module_skins.py:
Code:
skeleton_face_keys = []
(
   "skeleton", 0,
   "skeleton_cut", "skeleton_calf_L", "skeleton_hand_L",
   "skull", skeleton_face_keys,
   [],
   [],
   [],
   [],
   [("skull",0xffffffff,[]),
    ],
   [],#voices
   "skel_human", 1.0,
 ),


In module_troops.py:
Code:
["skeleton_warrior","Skeleton Warrior","Skeleton Warriors",tf_skeleton|tf_allways_fall_dead,0,0,fac_undeads,
   [itm_steel_shield,itm_legion_sword_hoplite,itm_ancient_helmet],
   def_attrib|level(4),wp(20),knows_common,0,0],

In header_troops.py:

Code:
tf_skeleton = 3
 
I still get the same errors  :cry:
Btw,this line gives me an error:
skeleton_face_keys = []
 
Btw,this line gives me an error:
skeleton_face_keys = []
What does the error say?

As for the warning, post the brf up here, let's see whether you got the references right.  I don't *think* faces require LODs.
 
I found this thread. The guy had the same problem with me:
http://forums.taleworlds.com/index.php/topic,131423.msg3166813.html#msg3166813

Tried to do the same thing but it doesn't work for me.
Anyways I pmed you the brf file.
 
From another search apparently people get ctds when they add a new race to Warband. After they comment out tf_undead = 2 and add tf_myrace = 2 they seem to get it to work though. That's very strange that this doesn't fix it for me. :evil:  :mad: :mad: This is getting annoying! I tried everything till now but nothing seems to work. Maybe with the new patch new races aren't possible?
 
There's no problem with races, I have 12 working.

My header_troops.py

Code:
tf_male           = 0
tf_female         = 1
tf_undead         = 2
tf_skeleton       = 3

Do not uncomment or change the tf_undead = 2

Module_skins.py

Code:
skeleton_face_keys = [
(20,0, 0.7,-0.6, "Chin Size"),
(260,0, -0.6,1.4, "Chin Shape"),
(10,0,-0.5,0.9, "Chin Forward"),
(240,0,0.9,-0.8, "Jaw Width"),
(210,0,-0.5,1.0, "Jaw Position"),
(250,0,0.8,-1.0, "Mouth-Nose Distance"),
(200,0,-0.3,1.0, "Mouth Width"),
(50,0,-1.5,1.0, "Cheeks"),

(60,0,-0.4,1.35, "Nose Height"),
(70,0,-0.6,0.7, "Nose Width"),
(80,0,1.0,-0.1, "Nose Size"),
(270,0,-0.5,1.0, "Nose Shape"),
(90,0,-0.2,1.4, "Nose Bridge"),

(100,0,-0.3,1.5, "Cheek Bones"),
(150,0,-0.2,3.0, "Eye Width"),
(110,0,1.5,-0.9, "Eye to Eye Dist"),
(120,0,1.9,-1.0, "Eye Shape"),
(130,0,-0.5, 1.1, "Eye Depth"),
(140,0,1.0,-1.2, "Eyelids"),

(160,0,1.3,-0.2, "Eyebrow Position"),
(170,0,-0.1,1.9, "Eyebrow Height"),
(220,0,-0.1,0.9, "Eyebrow Depth"),
(180,0,-1.1,1.6, "Eyebrow Shape"),
(230,0,1.2,-0.7, "Temple Width"),

(30,0,-0.6,0.9, "Face Depth"),
(40,0,0.9,-0.6, "Face Ratio"),
(190,0,0.0,0.95, "Face Width"),

(280,0,0.0,1.0, "Post-Edit"),
]

And this:

Code:
  (
    "skeleton", 0,
    "skeleton_cut", "skeleton_calf_L", "skeleton_hand_L",
    "skull", skeleton_face_keys,
    ["man_hair_s","man_hair_m","man_hair_n","man_hair_o", "man_hair_y10", "man_hair_y12","man_hair_p","man_hair_r","man_hair_q","man_hair_v","man_hair_t","man_hair_y6","man_hair_y3","man_hair_y7","man_hair_y9","man_hair_y11","man_hair_u","man_hair_y","man_hair_y2","man_hair_y4"], #man_hair_meshes ,"man_hair_y5","man_hair_y8",
    ["beard_e","beard_d","beard_k","beard_l","beard_i","beard_j","beard_z","beard_m","beard_n","beard_y","beard_p","beard_o",   "beard_v", "beard_f", "beard_b", "beard_c","beard_t","beard_u","beard_r","beard_s","beard_a","beard_h","beard_g",], #beard meshes ,"beard_q"
    ["hair_blonde"], #hair textures
    ["beard_blonde"], #beard_materials
    [("skull",0xffffffff,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19, 0xff19100c]),
     ], #man_face_textures,
    [(voice_die,"snd_skeleton_die"),(voice_hit,"snd_skeleton_hit"),(voice_grunt,"snd_skeleton_grunt"),(voice_grunt_long,"snd_skeleton_grunt_long"),(voice_yell,"snd_skeleton_yell"),(voice_stun,"snd_skeleton_stun"),(voice_victory,"snd_skeleton_victory")], #voice sounds
    "skel_human", 1.0,
    0,0,
  ),

Note i'm using here custom sounds, replace them with the man sounds and you're ok.

I'm using barf skeleton too btw.

This great tutorial by NaglFaar helped me a lot:

http://forums.taleworlds.com/index.php/topic,62094.0.html
 
I still get ctds. How can this be???
No errors detected when I compile my module though.
Totally weird and annoying.  :mad:
 
It's pretty much the same.


module_skins said:
(
    "skeleton", 0,
    "skeleton_cut",  "skeleton_calf_L", "skeleton_hand_L",
    "skull", skeleton_face_keys,
    ["man_hair_s","man_hair_m","man_hair_n","man_hair_o", "man_hair_y10", "man_hair_y12","man_hair_p","man_hair_r","man_hair_q","man_hair_v","man_hair_t","man_hair_y6","man_hair_y3","man_hair_y7","man_hair_y9","man_hair_y11","man_hair_u","man_hair_y","man_hair_y2","man_hair_y4"], #man_hair_meshes ,"man_hair_y5","man_hair_y8",
    ["beard_e","beard_d","beard_k","beard_l","beard_i","beard_j","beard_z","beard_m","beard_n","beard_y","beard_p","beard_o",  "beard_v", "beard_f", "beard_b", "beard_c","beard_t","beard_u","beard_r","beard_s","beard_a","beard_h","beard_g",], #beard meshes ,"beard_q"
    ["hair_blonde"], #hair textures
    ["beard_blonde"], #beard_materials
    [("skull",0xffffffff,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19, 0xff19100c]),
    ], #man_face_textures,
    [(voice_die,"snd_woman_die"),(voice_hit,"snd_woman_hit"),(voice_yell,"snd_woman_yell")], #voice sounds
    "skel_human", 1.0,
    0,0,
  ),

module_skins said:
skeleton_face_keys = [
(20,0, 0.7,-0.6, "Chin Size"),
(260,0, -0.6,1.4, "Chin Shape"),
(10,0,-0.5,0.9, "Chin Forward"),
(240,0,0.9,-0.8, "Jaw Width"),
(210,0,-0.5,1.0, "Jaw Position"),
(250,0,0.8,-1.0, "Mouth-Nose Distance"),
(200,0,-0.3,1.0, "Mouth Width"),
(50,0,-1.5,1.0, "Cheeks"),
(60,0,-0.4,1.35, "Nose Height"),
(70,0,-0.6,0.7, "Nose Width"),
(80,0,1.0,-0.1, "Nose Size"),
(270,0,-0.5,1.0, "Nose Shape"),
(90,0,-0.2,1.4, "Nose Bridge"),
(100,0,-0.3,1.5, "Cheek Bones"),
(150,0,-0.2,3.0, "Eye Width"),
(110,0,1.5,-0.9, "Eye to Eye Dist"),
(120,0,1.9,-1.0, "Eye Shape"),
(130,0,-0.5, 1.1, "Eye Depth"),
(140,0,1.0,-1.2, "Eyelids"),
(160,0,1.3,-0.2, "Eyebrow Position"),
(170,0,-0.1,1.9, "Eyebrow Height"),
(220,0,-0.1,0.9, "Eyebrow Depth"),
(180,0,-1.1,1.6, "Eyebrow Shape")
,(230,0,1.2,-0.7, "Temple Width"),
(30,0,-0.6,0.9, "Face Depth"),
(40,0,0.9,-0.6, "Face Ratio"),
(190,0,0.0,0.95, "Face Width"),
(280,0,0.0,1.0, "Post-Edit"),
]

header_troops said:
#Troop flags
tf_male          = 0
tf_female        = 1
tf_undead        = 2
tf_skeleton        = 3

module_troops said:
  ["looter","Skeleton Warrior","Skeleton Warriors",tf_skeleton|tf_allways_fall_dead,0,0,fac_outlaws,
  [itm_steel_shield,itm_legion_sword_hoplite,itm_ancient_helmet],
  def_attrib|level(4),wp(20),knows_common,skeleton_face1, skeleton_face2],

Oh and:
module_troops said:
skeleton_face1 = 0x000000000000000000c00db6db6db6db00000000001c00000000000000000000
skeleton_face2 = 0x00000000000000007effedb6db6db6db00000000001fffff0000000000000000
 
I don't see anything wrong.

Have you defined skeleton_face1 and skeleton_face2 at the top of module_troops?

EDIT:

Haha, totally ninjaed.

Try with these ones:

Code:
skeleton_face1  = 0xffffffff00000000000000000000000000000000000000000000000000000000
skeleton_face2  = 0xffffffff00000000000000000000000000000000000000000000000000000000
 
EDIT: Mistake. Other party encounters and battles actually work.
WTF did I do wrong? Did I ruin my module or something!?
 
What exactly doesn't work? Does it crash to desktop? Does it throw any message? Anything in rgl_log.txt?

If there's no error message whatsoever, recheck your files. My most weird errors always come from leaving some comment uncommented.

With no more info I cannot help much, sorry.

Oh, yes: About the skull.lod error, open barf_skeleton.brf and copy & paste the skull material. Rename the copy skull.LOD

No more error message, although that should not crash your game (I think).
 
Sir Lacy said:
Oh, yes: About the skull.lod error, open barf_skeleton.brf and copy & paste the skull material. Rename the copy skull.LOD
Tried this, it doesn't work.

Does it crash to desktop?
Yes

Does it throw any message?
No


Btw,found this in rgl_log.txt
rgl_log.txt said:
rgl_post_warning_line: WARNING: Unable to find material skull.LOD WARNING: UNABLE TO MAP GAME PRESENTATION CODE:  prsnt_game_start
WARNING: UNABLE TO MAP GAME PRESENTATION CODE:  prsnt_game_escape
WARNING: UNABLE TO MAP GAME SCRIPT CODE:  game_check_party_sees_party
WARNING: UNABLE TO MAP GAME SCRIPT CODE:  game_get_party_speed_multiplier
Loading Module...
Loading item kinds...
Loading dialogs...
Loading mission templates...
Loading party templates...
loading time:  24551
Finished All...
Loading tracks
load_map_data complete.
Init_map complete.
init_meta_mission complete.
map mesh built.
get_ideal_sun_color.
get_ideal_fog_color.
432 parties added.
launch complete.
Entry points for scene 116 : 24 23 22 21 20 19 18 17 16 9 0
Total entry points for scene 116 : 11

Saving Game... Creating new savegame file... Saving header... Saving game state... Closing new save game file... Starting checksum control... Performing checksum control... Savegame checksum control succeeded...
Backing up old file name... Removing old backup file. Renaming old savegame to backup file. Renaming new savegame file. Savegame succeded...
Entry points for scene 116 : 24 23 22 21 20 19 18 17 16 9 0
Total entry points for scene 116 : 11
Quest log has been updated...

Saving Game... Creating new savegame file... Saving header... Saving game state... Closing new save game file... Starting checksum control... Performing checksum control... Savegame checksum control succeeded...
Backing up old file name... Removing old backup file. Renaming old savegame to backup file. Renaming new savegame file. Savegame succeded...
Entry points for scene 535 : 0 1 2 4 6 8 10 3 5 7 9 11 15 13 12 14 16 17 19 21 23 25 18 20 22 24 26 27 28 29 30 31
Total entry points for scene 535 : 32
Renown value for this battle is 0.
Battle Advantage = 2.
Entry points for scene 8 :
Total entry points for scene 8 : 0


Apparently, this is an error report (which I do not understand). Anybody knows how to fix it now and what is actually wrong with my codes?
 
Back
Top Bottom