Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Module skins
Code:
skins = [
  (
    "man", 0,
    "man_body", "man_calf_l", "m_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
    [("manface_young_2",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),
     ("manface_midage",0xffdfefe1,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),
     ("manface_young",0xffd0e0e0,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]),     
#     ("manface_old",0xffd0d0d0,["hair_white","hair_brunette","hair_red","hair_blonde"],[0xffffcded, 0xffbbcded, 0xff99eebb]),
     ("manface_young_3",0xffdceded,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),
     ("manface_7",0xffc0c8c8,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("manface_midage_2",0xfde4c8d8,["hair_blonde"],[0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("manface_rugged",0xffb0aab5,["hair_blonde"],[0xff171313, 0xff007080c]),
#     ("manface_young_4",0xffe0e8e8,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),
     ("manface_african",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),     
#     ("manface_old_2",0xffd5d5c5,["hair_white"],[0xffffcded, 0xffbbcded, 0xff99eebb]),
     ], #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.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)],
     ]
  ),
  
  (
    "woman", skf_use_morph_key_10,
    "woman_body",  "woman_calf_l", "f_handL",
    "female_head", woman_face_keys,
    ["woman_hair_p","woman_hair_n","woman_hair_o","woman_hair_q","woman_hair_r","woman_hair_t","woman_hair_s"], #woman_hair_meshes
#    ["woman_hair_a","woman_hair_b","woman_hair_c","woman_hair_d","woman_hair_e","woman_hair_f","woman_hair_g"], #woman_hair_meshes
    [],
    ["hair_blonde", "hair_red", "hair_brunette", "hair_black", "hair_white"], #hair textures
    [],
    [("womanface_young",0xffe3e8ef,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19, 0xff19100c]),
     ("womanface_b",0xffdfdfdf,["hair_blonde"],[0xffa5481f, 0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("womanface_a",0xffe8dfe5,["hair_blonde"],[0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("womanface_brown",0xffaf9f7e,["hair_blonde"],[0xff19100c, 0xff0c0d19, 0xff007080c]),
     ("womanface_african",0xff808080,["hair_blonde"],[0xff120808, 0xff007080c]),
#     ("womanface_midage",0xffe5eaf0,["hair_black","hair_brunette","hair_red","hair_white"],[0xffffcded, 0xffbbcded, 0xff99eebb]),
     ],#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,
  ),
  
##  (
##    "undead", 0,
##    "undead_body", "undead_calf_l", "undead_handL",
##    "undead_head", undead_face_keys,
##    [],
##    [],
##    [],
##    [],
##    [("undeadface_a",0xffffffff,[]),
##     ("undeadface_b",0xffcaffc0,[]),
##     ], #undead_face_textures
##    [], #voice sounds
##    "skel_human", 1.0,
##  ),

  (
    "wolf", skf_use_morph_key_10,
    "woman_body",  "woman_calf_l", "f_handL",
    "female_head", woman_face_keys,
    ["woman_hair_p","woman_hair_n","woman_hair_o","woman_hair_q","woman_hair_r","woman_hair_t","woman_hair_s"], #woman_hair_meshes
#    ["woman_hair_a","woman_hair_b","woman_hair_c","woman_hair_d","woman_hair_e","woman_hair_f","woman_hair_g"], #woman_hair_meshes
    [],
    ["hair_blonde", "hair_red", "hair_brunette", "hair_black", "hair_white"], #hair textures
    [],
    [("womanface_young",0xffe3e8ef,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19, 0xff19100c]),
     ("womanface_b",0xffdfdfdf,["hair_blonde"],[0xffa5481f, 0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("womanface_a",0xffe8dfe5,["hair_blonde"],[0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("womanface_brown",0xffaf9f7e,["hair_blonde"],[0xff19100c, 0xff0c0d19, 0xff007080c]),
     ("womanface_african",0xff808080,["hair_blonde"],[0xff120808, 0xff007080c]),
#     ("womanface_midage",0xffe5eaf0,["hair_black","hair_brunette","hair_red","hair_white"],[0xffffcded, 0xffbbcded, 0xff99eebb]),
     ],#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,
  ),
]
Module troops
Code:
 ["watchman","Watchman","Watchmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield,no_scene,reserved,fac_commoners,
   [itm_bolts,itm_spiked_club,itm_fighting_pick,itm_sword_medieval_a,itm_boar_spear,itm_hunting_crossbow,itm_light_crossbow,itm_tab_shield_round_a,itm_tab_shield_round_b,itm_padded_cloth,itm_leather_jerkin,itm_leather_cap,itm_padded_coif,itm_footman_helmet,itm_nomad_boots,itm_wrapping_boots],
   def_attrib|level(9),wp(75),knows_common|knows_shield_1,mercenary_face_1, mercenary_face_2],
  ["mercy_wolf","Mercy Wolf ","Mercy Wolves",tf_wolf|tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,no_scene,reserved,fac_commoners,
   [itm_heavy_lance,itm_bastard_sword_a,itm_sword_medieval_b,itm_tab_shield_heater_c,itm_cuir_bouilli,itm_banded_armor,itm_wrapping_boots,itm_kettle_hat,itm_mail_coif,itm_flat_topped_helmet,itm_helmet_with_neckguard,itm_warhorse,itm_hunter],
   def_attrib|level(19),wp(100),knows_common|knows_riding_5|knows_ironflesh_4|knows_shield_5|knows_power_strike_4,refugee_face1,refugee_face2],
  ["caravan_guard","Caravan Guard","Caravan Guards",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse|tf_guarantee_shield,no_scene,0,fac_commoners,
   [itm_spear,itm_fighting_pick,itm_sword_medieval_a,itm_voulge,itm_tab_shield_round_b,itm_tab_shield_round_c,itm_leather_jerkin,itm_leather_vest,itm_hide_boots,itm_padded_coif,itm_nasal_helmet,itm_footman_helmet,itm_saddle_horse],
   def_attrib|level(14),wp(85),knows_common|knows_riding_2|knows_ironflesh_1|knows_shield_3,mercenary_face_1, mercenary_face_2],

Header troops
Code:
#Troop flags
tf_male           = 0
tf_female         = 1
tf_undead         = 2
tf_wolf        = 3
troop_type_mask   = 0x0000000f
tf_hero              = 0x00000010
tf_inactive          = 0x00000020
tf_unkillable        = 0x00000040
tf_allways_fall_dead = 0x00000080
tf_no_capture_alive  = 0x00000100
tf_mounted           = 0x00000400 #Troop's movement speed on map is determined by riding skill.
tf_is_merchant       = 0x00001000 #When set, troop does not equip stuff he owns
tf_randomize_face    = 0x00008000 #randomize face at the beginning of the game.

Heres my test race its supposed to be the same as a woman(for now will add new sounds later), It crashes when I enter some taverns assumingly because my new race troop is in it. Whats wrong with my code?
 
Highlander said:
undead doesn't exist (its commented out), so your skin is actually index 2. Change it in header_troops to tf_wolf = 2.
Ahh that makes sence! will try.
Edit: I changed it to two and my race worked. Hmm I bet thats what crashes my mission template. The template used new race troops with a 3 instead of a 2 I will try it now.
Edit Again: GUESS WHAT! I got wolves!!!! It was the race messing it up! But unfortanitly the wolf and the rider do not both die at the same time, There are wolves without riders walking around which is not good because in real life a wolf wouldnt randomly stop attacking you for no reason and you dont really win the battle if there are still wolves running around.
ADD:  I added new sound to my race I put the sounds in the sound folder then went in module sounds and added my sounds to it then I changed my races sounds to the new ones but they dont play, my sounds are ogg format and my scan module sounds is set to one why dont my new sounds play?
 
Ritter Dummbatz said:
You need to make the riders invincible. The script removes invisible riders if the wolf is dead.
You mean make the rider really stroung so the player wont kill it? Or is there another way? like tf_unkillable?
 
Yeah, I assume the riders where armor with no mesh. To raise the armor value incredibly high should suffice. If you still have problems give 'em iron_flesh at max. Just don't make them too strong or you might experience an invisible fist hitting your nose and knocking you out.

I am not aware of a more decent way to make them unkillable.
 
I get this error in battle 
script warning on OPCODE 1775: bad agent id: -1; line number 15;
at mission template mst_wolf_den no: trigger 6 consequences

I also get blue or orange shapes show that up on the screen as i move.
 
ilovemyhedgehog said:
I get this error in battle 
script warning on OPCODE 1775: bad agent id: -1; line number 15;
at mission template mst_wolf_den no: trigger 6 consequences

I also get blue or orange shapes show that up on the screen as i move.
1755 maybe?
It because dead agents (wolfs) don't have riders.
You should find another way to clean former riders. E.g. you may track every second if they have mounts.

ilovemyhedgehog said:
Edit Again: GUESS WHAT! I got wolves!!!!
Unbelievable. Share a screenshot?
 
Picture of the shapes that show up at the wolf den
j9c4z7.jpg

Wolf screenshot
wmht8z.jpg

Whats cool is the wolves run along the side of the right cliff wall before they come down to get you!
 
So im getting this
http://imageshack.us/photo/my-images/580/erroropenbrf.png/
it was working before but when i implement the specular map that happens. Does anyone know how to fix it?
 
I was thinking of changing the speed at which you can get in blocking position for polearms, or increase the time between different blocks. However there are several animations that have to do with parry/defend. I've no idea what does what, I've tried modifying some times of the animation, but it didn't seem to make a whole lot of difference.
There are two animations after the attack animations: "blocked_......" and "parried_.....". Those are played after your attack gets blocked/parried. This is not what I'm looking for. Now there are also more further down.
"defend_..._staff" doesn't seem to do anything or ever play, it just plays: "defend_..._staff_keep" I tried modifying these but it doesn't seem to help.
Now there are also: "defend_...._staff_parry_1", "defend_...._staff_parry_2", "defend_...._staff_parry_3" I've got no idea what these do :/

I know the blocking speed (or at least it seems like it) is affected by the weapon speed. So a possible workaround would be to lower the speed on the weapons and shorten the attack animation's duration. However that would be an ugly solution. I much rather change the defend/parry animation's duration somehow.

Anyone who can help me or point me in the right direction at least?
 
Heres some screen shots of whats wrong with my wolf battle the shapes that show up.
dqhmc7.jpg
140kkmg.jpg
zn61px.jpg
2vtwdio.jpg
Im guessing it has to do with the wolf troops wearing invalid meshed armor to make them invisible. Does anyone have any idea what is wrong? Or how to fix this?
 
I am trying to dive into the field of cutscenes. Now i am stucked with the following problem:

After the cutscene is finished i want to instantly load a new scene with a new mission_template.
I have a workaround doing it in the Menu-setup but this shows the menu for some seconds after the cutscene is finished and this looks quite ugly.

Is there a way to directly jump from one scene to another? (same like portals, but i want it in a passive/script way).
I already tried setting a new scene and call it in the mission template of the cutscene but this didnt seem to work.
 
Status
Not open for further replies.
Back
Top Bottom