Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I have a problem with getting custom weapon into MB:WB, any advice or tips is appreciated
"Plus i did everything in tutorial but i don't see it. :sad:
 
i complied the module_items after editing following that guide on warband modding wikia

http://mbmodwiki.ollclan.eu/Custom_Items_into_your_mod_using_Open_Brf
 
Yes, it involves checking how many times the agent was hit inside triggers (and probably a damage threshold) and storing them inside slots, then spawning them when it dies. Won't help with the actual body though.
 
How can I change "color" of my troop in scene. In a tavern name of troops are white and i can't kill them but my troop is like my soldier in battle
and i craete a new scene this is a part of code
Code:
	("town_baracks_pre",[
	(party_slot_eq,"$current_town",slot_party_type, spt_town),
	],
       "Go to the Barracks.",
       
       [
           (try_begin),
             (this_or_next|eq,"$all_doors_locked",1),
             (eq,"$town_nighttime",1),
             (display_message,"str_door_locked",0xFFFFAAAA),
           (else_try),
             (assign, "$g_mt_mode", abm_visit),
             (assign, "$town_entered", 1),
             (party_get_slot, ":baracks_scene", "$current_town", slot_town_baracks),
             (modify_visitors_at_site, ":baracks_scene"),
             (reset_visitors),
	 (store_faction_of_party, ":faction", "$current_town"), 
	  (eq, ":faction", "fac_kingdom_1"),
	  (add_troop_to_site, "trp_faction_1_trainer",":baracks_scene", 2),
	  (else_try),
	  (eq, ":faction", "fac_kingdom_2"),
	  (add_troop_to_site, "trp_faction_2_trainer",":baracks_scene", 2),
	  (else_try),
	  (eq, ":faction", "fac_kingdom_3"),
	  (add_troop_to_site, "trp_faction_3_trainer",":baracks_scene", 2),
	  (else_try),
	  (eq, ":faction", "fac_kingdom_4"),
	  (add_troop_to_site, "trp_faction_4_trainer",":baracks_scene", 2),
	  (else_try),
	  (eq, ":faction", "fac_kingdom_5"),
	  (add_troop_to_site, "trp_faction_5_trainer",":baracks_scene", 2),
	  (else_try),
	  (eq, ":faction", "fac_kingdom_6"),
	  (add_troop_to_site, "trp_faction_6_trainer",":baracks_scene", 2),
	  (else_try),
	  (eq, ":faction", "fac_kingdom_7"),
	  (add_troop_to_site, "trp_faction_7_trainer",":baracks_scene", 2),
	  (try_end),
             (set_jump_entry, 1),
             (jump_to_scene, ":baracks_scene"),
             (scene_set_slot, ":baracks_scene", slot_scene_visited, 1),
             (change_screen_mission),
           (try_end),
        ]),
modified arena
EDIT: troops code
Code:
  ["town_1_trainer", "Infantry Trainer  11","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
  ["town_2_trainer", "Infantry Trainer  22","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
  ["town_3_trainer", "Infantry Trainer  33","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
  ["town_4_trainer", "Infantry Trainer  44","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
  ["town_5_trainer", "Infantry Trainer  55","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
  ["town_6_trainer", "Infantry Trainer  66","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
  ["town_7_trainer", "Infantry Trainer  77","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
Only test troops
 
Shredzorz said:
Is there a way of translating where a person clicks on the screen to a position in a scene? I want players to be able to click spots on the terrain.
Doing it the other way around seems to be relatively easy, but I'm a bit uncertain what you should do in this exact situation. Perhaps thinking up of something along the lines of the F1-held-down flag might work?
 
Lumos said:
Shredzorz said:
Is there a way of translating where a person clicks on the screen to a position in a scene? I want players to be able to click spots on the terrain.
Doing it the other way around seems to be relatively easy, but I'm a bit uncertain what you should do in this exact situation. Perhaps thinking up of something along the lines of the F1-held-down flag might work?
That wouldn't quite work because that just goes to the center of the camera. I need to be able to click anywhere within the camera's view.
 
Does position_get_screen_projection take into position visibility? If not, position_has_line_of_sight_to_position might help if you find the camera/agent position. What kind objects are you interacting with, terrain/scene props/other agents? If you're playing around with terrain, using a grid of invisible scene props might help.
 
Is it possible to make a castle not belong to any faction? Not even belonging to commoners.
 
Somebody said:
Does position_get_screen_projection take into position visibility? If not, position_has_line_of_sight_to_position might help if you find the camera/agent position. What kind objects are you interacting with, terrain/scene props/other agents? If you're playing around with terrain, using a grid of invisible scene props might help.
I basically just need to be able to click any place I want to on a completely flat piece of terrain.
 
I was wondering, is it possible to make a NPC party on the map that behaves exactly like the player? By that, I mean he recruits troops from villages, upgrades them and upgrades equipment. Also he should be able set his own relations with other factions and randomize which factions he's friendly/hostile with.

He also gains renown, honor, and relations with the kingdom lords/kings as time progresses. He can also become mercenary and start his own kingdom, exactly like the player. So, is this possible? And if so, could someone point me to the right direction and I'll start on it immediately.
 
I post one more time because I Don't have answer .
Matix522 said:
How can I change "color" of my troop in scene. In a tavern name of troops are white and i can't kill them but my troop is like my soldier in battle
and i craete a new scene this is a part of code
Code:
	("town_baracks_pre",[
	(party_slot_eq,"$current_town",slot_party_type, spt_town),
	],
       "Go to the Barracks.",
       
       [
           (try_begin),
             (this_or_next|eq,"$all_doors_locked",1),
             (eq,"$town_nighttime",1),
             (display_message,"str_door_locked",0xFFFFAAAA),
           (else_try),
             (assign, "$g_mt_mode", abm_visit),
             (assign, "$town_entered", 1),
             (party_get_slot, ":baracks_scene", "$current_town", slot_town_baracks),
             (modify_visitors_at_site, ":baracks_scene"),
             (reset_visitors),
	 (store_faction_of_party, ":faction", "$current_town"), 
	  (eq, ":faction", "fac_kingdom_1"),
	  (add_troop_to_site, "trp_faction_1_trainer",":baracks_scene", 2),
	  (else_try),
	  (eq, ":faction", "fac_kingdom_2"),
	  (add_troop_to_site, "trp_faction_2_trainer",":baracks_scene", 2),
	  (else_try),
	  (eq, ":faction", "fac_kingdom_3"),
	  (add_troop_to_site, "trp_faction_3_trainer",":baracks_scene", 2),
	  (else_try),
	  (eq, ":faction", "fac_kingdom_4"),
	  (add_troop_to_site, "trp_faction_4_trainer",":baracks_scene", 2),
	  (else_try),
	  (eq, ":faction", "fac_kingdom_5"),
	  (add_troop_to_site, "trp_faction_5_trainer",":baracks_scene", 2),
	  (else_try),
	  (eq, ":faction", "fac_kingdom_6"),
	  (add_troop_to_site, "trp_faction_6_trainer",":baracks_scene", 2),
	  (else_try),
	  (eq, ":faction", "fac_kingdom_7"),
	  (add_troop_to_site, "trp_faction_7_trainer",":baracks_scene", 2),
	  (try_end),
             (set_jump_entry, 1),
             (jump_to_scene, ":baracks_scene"),
             (scene_set_slot, ":baracks_scene", slot_scene_visited, 1),
             (change_screen_mission),
           (try_end),
        ]),
modified arena
EDIT: troops code
Code:
  ["town_1_trainer", "Infantry Trainer  11","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
  ["town_2_trainer", "Infantry Trainer  22","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
  ["town_3_trainer", "Infantry Trainer  33","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
  ["town_4_trainer", "Infantry Trainer  44","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
  ["town_5_trainer", "Infantry Trainer  55","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
  ["town_6_trainer", "Infantry Trainer  66","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
  ["town_7_trainer", "Infantry Trainer  77","Infantry Trainer",tf_hero|tf_randomize_face|tf_is_merchant, 0,reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
Only test troops
 
Matix522 said:
I post one more time because I Don't have answer .
Don't use add_troop_to_site, use set_visitor with your own mission template (set the team for the NPC from the entry point in the template).
Something unusual said:
I was wondering, is it possible to make a NPC party on the map that behaves exactly like the player? By that, I mean he recruits troops from villages, upgrades them and upgrades equipment. Also he should be able set his own relations with other factions and randomize which factions he's friendly/hostile with.

He also gains renown, honor, and relations with the kingdom lords/kings as time progresses. He can also become mercenary and start his own kingdom, exactly like the player. So, is this possible? And if so, could someone point me to the right direction and I'll start on it immediately.
Honestly that's a major project and I'd start with a bit of planning for a state machine and then a list of priorities for the new "hero" AI on the world map (pathfinding, spotting enemy parties and making decisions based on distance). You'd also need a ton of slots to track relationship between them and the lords (could try to shoehorn it into the existing matrix), and I'd recommend just tracking the faction's relationship. Recruiting and upgrading equipment is the easy part - there's already scripts for NPC heroes to recruit from villages, and it's trivial to expand that to include mercs and upgrade inventory items.
Shredzorz said:
I basically just need to be able to click any place I want to on a completely flat piece of terrain.
You should be able to get where the agent is looking, but projecting that with the mouse's position isn't very trivial. From what I can understand, position_get_screen_projection gets the point on screen where it might be shown. I'm assuming this is from the context of a presentation that lets the mouse free roam. Making a grid would allow you to track the nearest scene prop that corresponds to wherever the cursor might land. Doing a distance check would prevent positions that are further away from the camera to be selected instead of the closest local position. Generating this grid might be possible by hand (if complex terrain geometry is involved) or spawning them when the scene starts with a loop using position_set_z_to_ground_level.
 
Somebody said:
Something unusual said:
I was wondering, is it possible to make a NPC party on the map that behaves exactly like the player? By that, I mean he recruits troops from villages, upgrades them and upgrades equipment. Also he should be able set his own relations with other factions and randomize which factions he's friendly/hostile with.

He also gains renown, honor, and relations with the kingdom lords/kings as time progresses. He can also become mercenary and start his own kingdom, exactly like the player. So, is this possible? And if so, could someone point me to the right direction and I'll start on it immediately.
Honestly that's a major project and I'd start with a bit of planning for a state machine and then a list of priorities for the new "hero" AI on the world map (pathfinding, spotting enemy parties and making decisions based on distance). You'd also need a ton of slots to track relationship between them and the lords (could try to shoehorn it into the existing matrix), and I'd recommend just tracking the faction's relationship. Recruiting and upgrading equipment is the easy part - there's already scripts for NPC heroes to recruit from villages, and it's trivial to expand that to include mercs and upgrade inventory items.
A major project was what I had in mind :smile:
I wanted to hear the advice and of what more experienced modders thought about it before I started. Also thanks for the help! 
 
Been trying to add a couple new height troops to the game, just to have certain dwarf quest givers.

So did this:

Code:
skins = [
  (
    "man", 0,
    "fac_man_body", "fac_man_calf_l", "fac_man_handL",
    "fac_male_head", man_face_keys, #Bald: Swadian 16, Rolf, Yaroglek
    ["fac_man_hair_a" #  1 a Swadia 6, Marnid
	,"fac_man_hair_b" #  2 b Swadia
	,"fac_man_hair_c" # 14 n Swadia, Jeremus
	,"fac_man_hair_d" # 21 u Swadia
	,"fac_man_hair_e" # 18 r Vaegir 9, Swadia 4, Graveth
	,"fac_man_hair_f" # 17 q Vaegir, Lezalit
	,"fac_man_hair_g" # 13 m Vaegir
	,"fac_man_hair_h" # 22 v Vaegir 11
	,"fac_man_hair_i" # 16 p Khergit 14, Vaegir 13
	,"fac_man_hair_j" # 19 s Vaegir 8, Khergit 17
	,"fac_man_hair_k" # 12 l Khergit 18, Sanjar
	,"fac_man_hair_l" # 11 k Khergit, Baheshtur, Dustum
	,"fac_man_hair_m" #  7 g Khergit 10
	,"fac_man_hair_n" # 10 j Khergit, Nord, Ragnar
	,"fac_man_hair_o" #  3 c Nord 2, Borcha, Firentis
	,"fac_man_hair_p" #  9 i Nord
	,"fac_man_hair_q" #  4 d Nord 1, Sajjad, Ghazwan, Edwyn, Lethwyn
	,"fac_man_hair_r" # 15 o Rhodok 15, Nord 12, Alayen, Floris
	,"fac_man_hair_s" # 20 t Rhodok 3, Hakim, Valdym
	,"fac_man_hair_t" #  8 h Rhodok, Nizar
	,"fac_man_hair_u" #  6 f Rhodok 5, Sarranid 19, 20, Bunduk, Artimenner, Harlaus
	,"fac_man_hair_v" #  5 e Swadia 7, Sarranid 21, 22, Kastor
	], #man_hair_meshes
    ["fac_beard_a","fac_beard_b","fac_beard_c","fac_beard_d","fac_beard_e","fac_beard_f","fac_beard_g","fac_beard_h","fac_beard_i","fac_beard_j","fac_beard_k","fac_beard_l","fac_beard_m","fac_beard_n","fac_beard_o","fac_beard_p","fac_beard_q","fac_beard_r","fac_beard_s","fac_beard_t","fac_beard_u","fac_beard_v","fac_beard_w",], #beard meshes ,"fac_beard_x"
    ["hair_blonde", "hair_red", "hair_brunette", "hair_black", "hair_white"], #hair textures
    ["beard_blonde","beard_red","beard_brunette","beard_black","beard_white"], #beard_materials
    [("fac_manface_white01",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),
     ("fac_manface_white02",0xffdfefe1,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),
	 ("fac_manface_white03",0xffd0e0e0,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]),     
     ("fac_manface_white04",0xffdceded,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),
     ("fac_manface_white05",0xffc0c8c8,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_white06",0xfde4c8d8,["hair_blonde"],[0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("fac_manface_white07",0xffb0aab5,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_white08",0xffe0e8e8,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),
     ("fac_manface_white09",0xffe0e8e8,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("fac_manface_white10",0xffe0e8e8,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("fac_manface_white11",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),
     ("fac_manface_white12",0xffc0c8c8,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_asian1",0xffe3e8e1,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_asian2",0xffe3e8e1,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_asian3",0xffbbb6ae,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_mideast1",0xffaeb0a6,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_mideast2",0xffd0c8c1,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_mideast3",0xffe0e8e8,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_black01",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]), 
     ("fac_manface_black02",0xff87655c,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_black03",0xff5a342d,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_black04",0xff634d3e,["hair_blonde"],[0xff171313, 0xff007080c]),  
     ("fac_manface_black05",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),   
     ], #man_face_textures,
    [(voice_die,"snd_man_die"),(voice_hit,"snd_man_hit"),(voice_grunt,"snd_man_grunt"),(voice_grunt_long,"snd_man_grunt_long"),(voice_yell,"snd_man_yell"),(voice_stun,"snd_man_stun"),(voice_victory,"snd_man_victory")], #voice sounds
    "skel_human", 1.0,
    psys_game_blood,psys_game_blood_2,
    [[1.6, comp_greater_than, (1.0,eye_to_eye_dist), (1.0,temple_width)], #constraints: ex: 1.7 > (face_width + temple_width)
     [0.6, comp_less_than, (1.0,eye_to_eye_dist), (1.0,temple_width)],
     [1.5, comp_greater_than, (1.0,face_ratio), (1.0,mouth_width)],
     [0.6, comp_greater_than, (-1.0,nose_width), (1.0,mouth_width)],
     [-1.0, comp_less_than, (-1.0,nose_width), (1.0,mouth_width)],
     ]
  ),

  (
    "woman", skf_use_morph_key_10,
    "fac_woman_body",  "fac_woman_calf_l", "fac_woman_handL",
    "fac_female_head", woman_face_keys,
    ["fac_woman_hair_a" #  2 b Swadia, Isolla
	,"fac_woman_hair_b" #  3 c Swadia, Katrin
	,"fac_woman_hair_c" # 20 t Swadia
	,"fac_woman_hair_d" #  7 g Vaegir, Klethi
	,"fac_woman_hair_e" # 10 j Vaegir
	,"fac_woman_hair_f" # 12 l Vaegir
	,"fac_woman_hair_g" #  5 e Khergit, Deshavi, Nadia, Odval
	,"fac_woman_hair_h" # 11 k Khergit
	,"fac_woman_hair_i" # 17 q Khergit
	,"fac_woman_hair_j" #  6 f Nord, Matheld
	,"fac_woman_hair_k" #  8 h Nord
	,"fac_woman_hair_l" # 18 r Nord
	,"fac_woman_hair_m" #  1 a Rhodok, Ymira
	,"fac_woman_hair_n" # 14 n Rhodok
	,"fac_woman_hair_o" # 15 o Rhodok
	,"fac_woman_hair_p" #  4 d Sarranid, Arwa
	,"fac_woman_hair_q" #  9 i Sarranid
	,"fac_woman_hair_r" # 16 p Sarranid
	,"fac_woman_hair_s" # 19 s Sarranid
	], #woman_hair_meshes
    ["fac_jewellery_a","fac_jewellery_b","fac_jewellery_c","fac_jewellery_d","fac_jewellery_e","fac_jewellery_f","fac_jewellery_g","fac_jewellery_h","fac_jewellery_i","fac_jewellery_j"],
    ["hair_blonde", "hair_red", "hair_brunette", "hair_black", "hair_white"], #hair textures
    ["fac_jewellery","fac_jewellery","fac_jewellery","fac_jewellery","fac_jewellery"],
    [("fac_womanface_white01",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),										#blond
     ("fac_womanface_white02",0xffdfefe1,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),				#blond
	 ("fac_womanface_white03",0xffd0e0e0,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]),							#orange
     ("fac_womanface_white04",0xffe0e8e8,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]),	#blond
     ("fac_womanface_white05",0xffe0e8e8,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]),							#orange
     ("fac_womanface_white06",0xffc0c8c8,["hair_blonde"],[0xff171313, 0xff007080c]),												#black
     ("fac_womanface_white07",0xffe0e8e8,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),				#blond
     ("fac_womanface_white08",0xffb0aab5,["hair_blonde"],[0xff171313, 0xff007080c]),												#black
     ("fac_womanface_white09",0xffc0c8c8,["hair_blonde"],[0xff171313, 0xff007080c]),												#black
     ("fac_womanface_white10",0xffdceded,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),									#brown
     ("fac_womanface_white11",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),										#blond
     ("fac_womanface_white12",0xfde4c8d8,["hair_blonde"],[0xff502a19, 0xff19100c, 0xff0c0d19]),										#brown
     ("fac_womanface_asian01",0xffaf9f7e,["hair_blonde"],[0xff19100c, 0xff0c0d19, 0xff007080c]),
     ("fac_womanface_asian02",0xffe3e8e1,["hair_blonde"],[0xff19100c, 0xff0c0d19, 0xff007080c]),
     ("fac_womanface_asian03",0xffbbb6ae,["hair_blonde"],[0xff19100c, 0xff0c0d19, 0xff007080c]),
     ("fac_womanface_mideast01",0xffaeb0a6,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_womanface_mideast02",0xffd0c8c1,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_womanface_mideast03",0xffe0e8e8,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_womanface_black01",0xff808080,["hair_blonde"],[0xff120808, 0xff007080c]),
     ("fac_womanface_black02",0xff634d3e,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_womanface_black03",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),
     ],#woman_face_textures
    [(voice_die,"snd_woman_die"),(voice_hit,"snd_woman_hit"),(voice_yell,"snd_woman_yell")], #voice sounds
    "skel_human", 1.0,
    psys_game_blood,psys_game_blood_2,
  ),

  (
    "tyrion", 0,
    "fac_man_body", "fac_man_calf_l", "fac_man_handL",
    "fac_male_head", man_face_keys, #Bald: Swadian 16, Rolf, Yaroglek
    ["fac_man_hair_a" #  1 a Swadia 6, Marnid
	,"fac_man_hair_b" #  2 b Swadia
	,"fac_man_hair_c" # 14 n Swadia, Jeremus
	,"fac_man_hair_d" # 21 u Swadia
	,"fac_man_hair_e" # 18 r Vaegir 9, Swadia 4, Graveth
	,"fac_man_hair_f" # 17 q Vaegir, Lezalit
	,"fac_man_hair_g" # 13 m Vaegir
	,"fac_man_hair_h" # 22 v Vaegir 11
	,"fac_man_hair_i" # 16 p Khergit 14, Vaegir 13
	,"fac_man_hair_j" # 19 s Vaegir 8, Khergit 17
	,"fac_man_hair_k" # 12 l Khergit 18, Sanjar
	,"fac_man_hair_l" # 11 k Khergit, Baheshtur, Dustum
	,"fac_man_hair_m" #  7 g Khergit 10
	,"fac_man_hair_n" # 10 j Khergit, Nord, Ragnar
	,"fac_man_hair_o" #  3 c Nord 2, Borcha, Firentis
	,"fac_man_hair_p" #  9 i Nord
	,"fac_man_hair_q" #  4 d Nord 1, Sajjad, Ghazwan, Edwyn, Lethwyn
	,"fac_man_hair_r" # 15 o Rhodok 15, Nord 12, Alayen, Floris
	,"fac_man_hair_s" # 20 t Rhodok 3, Hakim, Valdym
	,"fac_man_hair_t" #  8 h Rhodok, Nizar
	,"fac_man_hair_u" #  6 f Rhodok 5, Sarranid 19, 20, Bunduk, Artimenner, Harlaus
	,"fac_man_hair_v" #  5 e Swadia 7, Sarranid 21, 22, Kastor
	], #man_hair_meshes
    ["fac_beard_a","fac_beard_b","fac_beard_c","fac_beard_d","fac_beard_e","fac_beard_f","fac_beard_g","fac_beard_h","fac_beard_i","fac_beard_j","fac_beard_k","fac_beard_l","fac_beard_m","fac_beard_n","fac_beard_o","fac_beard_p","fac_beard_q","fac_beard_r","fac_beard_s","fac_beard_t","fac_beard_u","fac_beard_v","fac_beard_w",], #beard meshes ,"fac_beard_x"
    ["hair_blonde", "hair_red", "hair_brunette", "hair_black", "hair_white"], #hair textures
    ["beard_blonde","beard_red","beard_brunette","beard_black","beard_white"], #beard_materials
    [("fac_manface_white01",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),
     ("fac_manface_white02",0xffdfefe1,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),
	 ("fac_manface_white03",0xffd0e0e0,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]),     
     ("fac_manface_white04",0xffdceded,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),
     ("fac_manface_white05",0xffc0c8c8,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_white06",0xfde4c8d8,["hair_blonde"],[0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("fac_manface_white07",0xffb0aab5,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_white08",0xffe0e8e8,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),
     ("fac_manface_white09",0xffe0e8e8,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("fac_manface_white10",0xffe0e8e8,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("fac_manface_white11",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),
     ("fac_manface_white12",0xffc0c8c8,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_asian1",0xffe3e8e1,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_asian2",0xffe3e8e1,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_asian3",0xffbbb6ae,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_mideast1",0xffaeb0a6,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_mideast2",0xffd0c8c1,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_mideast3",0xffe0e8e8,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_black01",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]), 
     ("fac_manface_black02",0xff87655c,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_black03",0xff5a342d,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("fac_manface_black04",0xff634d3e,["hair_blonde"],[0xff171313, 0xff007080c]),  
     ("fac_manface_black05",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),   
     ], #man_face_textures,
    [(voice_die,"snd_man_die"),(voice_hit,"snd_man_hit"),(voice_grunt,"snd_man_grunt"),(voice_grunt_long,"snd_man_grunt_long"),(voice_yell,"snd_man_yell"),(voice_stun,"snd_man_stun"),(voice_victory,"snd_man_victory")], #voice sounds
    "skel_human", 0.4,
    psys_game_blood,psys_game_blood_2,
    [[1.6, comp_greater_than, (1.0,eye_to_eye_dist), (1.0,temple_width)], #constraints: ex: 1.7 > (face_width + temple_width)
     [0.6, comp_less_than, (1.0,eye_to_eye_dist), (1.0,temple_width)],
     [1.5, comp_greater_than, (1.0,face_ratio), (1.0,mouth_width)],
     [0.6, comp_greater_than, (-1.0,nose_width), (1.0,mouth_width)],
     [-1.0, comp_less_than, (-1.0,nose_width), (1.0,mouth_width)],
     ]
  ),

Code:
#Troop flags
tf_male           = 0
tf_female        = 1
tf_tyrion        = 2

And tried making a hero troop a tyrion.

However, that particular troop is now using female animations, which looks a bit weird. Looks very dandy when standing.

Any thoughts?

 
Status
Not open for further replies.
Back
Top Bottom