Custom races are... Female?

Users who are viewing this thread

Hey! Let's celebrate my first post on Taleworlds Forums. :party:

I've added new races into my Warband mod - Morrowind House wars.
They work as intended except for ONE THING. The game thinks they're women when they're supposed to be male.
During further character creating you can't select to be a squire (an option for males) and even though the text mentions you being a girl you don't get the option to select 'lady in waiting' either. Also Lords treat you as a lady, etc etc

I've tried to solve this myself in a number of ways but just can't figure it out.
If someone would be kind enough to tell me what I'm missing I'd really appreciate it.

Also kind of a sub question, whats a good way to hook up the menu, to have the player select their gender first, AND THEN pick their race?

Here's my header_troops
Code:
#Troop flags male
tf_male           = 0
tf_female         = 1
#men
tf_nord	       = 2

Module_skins
Code:
(
    "nord", 0,
    "nord_body", "nord_calf_l", "nord_handL",
    "male_head", man_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_red", "hair_brunette", "hair_black", "hair_white"], #hair textures
    ["beard_blonde","beard_red","beard_brunette","beard_black","beard_white"], #beard_materials
    [("nordface1",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),
     ("nordface2",0xffdfefe1,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),
     ("nordface3",0xffd0e0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),
     ("nordface4",0xffd0e0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]), 
     ], #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.07,
    psys_game_blood,psys_game_blood_2,
    [[1.7, comp_greater_than, (1.0,face_width), (1.0,temple_width)], #constraints: ex: 1.7 > (face_width + temple_width)
     [0.3, comp_less_than, (1.0,face_width), (1.0,temple_width)],
     [1.7, comp_greater_than, (1.0,face_width), (1.0,face_depth)],
     [0.3, comp_less_than, (1.0,eyebrow_height), (1.0,eyebrow_position)],
     [1.7, comp_greater_than, (1.0,eyebrow_height), (1.0,eyebrow_position)],
     [-0.7, comp_less_than, (1.0,nose_size), (-1.0,nose_shape)],
     [0.7, comp_greater_than, (1.0,nose_size), (-1.0,nose_shape)],
     [2.7, comp_greater_than, (1.0,chin_size), (1.0,mouth_nose_distance), (1.0,nose_height), (-1.0,face_width)],
     ]
  ),

and module_game_menus
Code:
#race select
  ("start_game_1",menu_text_color(0xFF000000)|mnf_disable_all_keys,
    "How could they even imprison such a fine...",
    "none",
    [],
    [
#	  ("start_male",[],"Male",
#       [
#           (troop_set_type,"trp_player",0),
#           (assign,"$character_gender",tf_nord),
#           (jump_to_menu,"mnu_start_character_1")
#        ]
#       ),
	   
#	  ("start_female",[],"Female",
#       [
#           (troop_set_type,"trp_player",1),
#           (assign,"$character_gender",tf_dunmer),
#           (jump_to_menu,"mnu_start_character_1")
#        ]
#       ),

	("start_nord",[],"Nord",
       [
           (troop_set_type,"trp_player",2),
           (assign,"$character_gender",tf_nord),
           (jump_to_menu,"mnu_start_character_1")
        ]
       ),

Cheers!
 
Well, the game checks if the gender is equal to 0 (male) or greater than 0 (normally only female, but in this case your custom race counts as well). You'd have to look into module_game_menus to change this check.
 
Arch3r said:
Well, the game checks if the gender is equal to 0 (male) or greater than 0 (normally only female, but in this case your custom race counts as well). You'd have to look into module_game_menus to change this check.

  It's fairly complicated but the problem boils do to you need to make a scripted test for gender, and not let Warband do it for you.  Then EVERY dialog that has implicit gender needs to have the result of your test given to it.  I have a fully working test for gender that is multi race aware and dialogs with multi-racial gender aware dialogs in Rigale 12.40 source, which is at
    http://forums.taleworlds.com/index.php/topic,329046.0.html

  Diplomacy has a good example of extending the dialogs to be gender aware but you have to extend their routines further to be aware of genders across multiple races.  You can either do a modulus of the skin an agent, troop, or hero is using or else test explicitly and return the gender in a reg, so that subsequently that reg controls the gender case used in dialog.

    It's fairly elementary once you realize you can't trust Warband to do it for you -- you end up hand changing 800 or so dialogs in Diplomacy to make your mod multi racial without seeming, well, queer.  It's easy if you don't mind a little work  :wink:

  - GS
 
Thanks you very much, it's a new thing for me but its sinking in.
Can you please tell me approx where I need to look for the test gender script in your source?
 
ormirofskyrim said:
Thanks you very much, it's a new thing for me but its sinking in.
Can you please tell me approx where I need to look for the test gender script in your source?

You need to examine the following places to see how they flow together:

  module_scripts.py
    dplmc_store_troop_is_female_reg    line 59735
      calls
      cf_dplmc_troop_is_female      line 59617
        calls
        gender_fix    line 72202

  But that is only how the gender is found.

  Next you actually have to USE it.

  module_dialogs.py
      lines 186
            490
          1056
          1511

  and so on for many hundreds of repetitions - perhaps THOUSANDS of lines get edited now.
  Its all very easy, but you have to stop waiting for Taleworlds to do it for you.

  This was my first MONTH's work at Perisno to understand this and make it work.  There is no single line
that makes it all better; you just have to get dirty.

  if the number of races is very large you might used a modulus 2  check instead of explicitly naming the cases;
it's elegant but either gets the job done.

  - GS
 
Back
Top Bottom