Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Somebody said:
Yeah, just put them in the list of animation reference entries. If the animation has multiple parts and you have variations, they might not sync up during the transitions properly.

It's that easy, huh? :grin:

Thank you.

EDIT: Tested it out. Works like a charm. Thanks again.
 
Hi modding community,

I'm trying to add in unique gun sounds for new firearms via de module system. I've already searched how to do this. Here's my Module_items.py code:
Code:
 ["ak47", "Ak47", [("ak47",0)], itp_type_polearm|itp_primary|itp_wooden_parry , itc_staff|itcf_carry_spear, 
300, weight(3.0)|difficulty(0)|spd_rtng(85) |swing_damage(20, blunt)| thrust_damage(18,  blunt)|weapon_length(126),imodbits_none ],  
 [(ti_on_weapon_attack,[(play_sound,"ak47")] ],

And here's my Module_sounds.py code:
("ak47",sf_2d|sf_priority_10|sf_vol_4|
["ak47.wav"]),
]

I need to test it in MP mode, since it's a MP mod only. I don't hear the new sounds. Is there anything I'm missing on this?

Cheers,

MrExpendable.
 
You might want to try this:

Code:
[(ti_on_weapon_attack,[(store_trigger_param_1,":agent"),(agent_play_sound,":agent","snd_ak47_shot"),(position_move_x,pos1,27),(position_move_y,pos1,36),(particle_system_burst,"psys_pistol_smoke",pos1,15)])] ],

Use the Flintlock pistol as your base code, then attach correctly the one above.
 
I'm getting this error here:
7hoj9h5wp56p.jpg


Due to the explanation for the error

Error:
TypeError: int argument required
Meaning:
Missing an integer such as a mission-template flag. You can find out which calls are integers by looking at Armagan's documentation at the beginning of each module file, (int) calls being integers.

It must have something to do with my troop flags.

These are the troops I edited:
Code:
["looter","Looter","Looters",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield,0,0,0,fac_outlaws,
[itm_fattiglinenskjortir,itm_linen_tunic_a,itm_linen_tunic_b,itm_linen_tunic_c,itm_sarranid_boots_b,itm_ankle_boots,itm_woolen_hose,itm_blue_hose,itm_helmet_6,itm_helmet_14,itm_helmet_16,itm_helmet_18,itm_einhendi_hedmarkrox,itm_fjadraspjot,itm_spjotkesja,itm_fjadraspjot,itm_bb_serbian_knobbed_mace_3,itm_spjot,itm_atgeirr1,itm_saxon_seax,itm_woodenshield_small,itm_woodenshield_small_d],def_attrib|level(5),wp(50),knows_common,bandit_face1, bandit_face2],

Code:
  
["brigand","Brigand","Brigands",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_outlaws,
[itm_fattiglinenskjortir,itm_linen_tunic_a,itm_linen_tunic_b,itm_linen_tunic_c,itm_sarranid_boots_b,itm_ankle_boots,itm_woolen_hose,itm_blue_hose,itm_helmet_6,itm_helmet_14itm_helmet_16,itm_helmet_18,itm_einhendi_hedmarkrox,itm_fjadraspjot,itm_spjotkesja,itm_fjadraspjot,itm_bb_serbian_knobbed_mace_3,itm_spjot,itm_atgeirr1,itm_woodenshield_small,
itm_woodenshield_small_d,itm_saddle_horse,itm_2hunting_bow,itm_arrows],def_attrib|level(16),wp(90),knows_common|knows_power_draw_3,bandit_face1, bandit_face2],

Code:
  
["mercenary_horseman","Mercenary Horseman","Mercenary
Horsemen",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,no_scene,reserved,fac_commoners,
[itm_mailruss,itm_armor_6,itm_armor_7,itm_armor_15,itm_armor_16,itm_armor_36,itm_armor_37,itm_armor_38,itm_armor_39,itm_armor_40,itm_armor_41,itm_sarranid_boots_b,itm_helmet_22,itm_helmet_23,itm_plainhelm,itm_pointyhelm,itm_plain_conical_helmet,itm_norman_kite_shield_a1,itm_norman_kite_shield_a2,itm_norman_kite_shield_a3,itm_norman_kite_shield_b1,
itm_norman_kite_shield_b2,itm_norman_kite_shield_b3,itm_norman_kite_shield_c1,itm_norman_kite_shield_c2,itm_norman_kite_shield_c3,itm_norman_kite_shield_c3,
itm_norman_kite_shield_d1,itm_norman_kite_shield_d2,itm_norman_kite_shield_d3,itm_norman_kite_shield_e1,itm_norman_kite_shield_e2,itm_norman_kite_shield_e3,
itm_norman_kite_shield_f1,itm_norman_kite_shield_f2,itm_norman_kite_shield_f3,itm_einhendi_danox,itm_langr_bryntvari,itm_spjotkesja,itm_langr_svia,itm_bb_serbian_knobbed_mace_3,
itm_hunter,itm_saddle_horse],def_attrib|level(20),wp(100),knows_common|knows_riding_4|knows_ironflesh_3|knows_shield_2|knows_power_strike_3,mercenary_face_1, mercenary_face_2],

Code:
  
["mercenary_cavalry","Mercenary Cavalry","Mercenary
Cavalry",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,no_scene,reserved,fac_commoners,
[itm_sarranid_boots_b,itm_mail_boots,itm_norman_short_hauberk,itm_norman_short_hauberk_blue,itm_norman_short_hauberk_yellow,itm_maill,itm_mailrusss,itm_norman_mail,
itm_mailnormans,itm_armor_30,itm_coifedpointyhelm,itm_conicalnorm,itm_conical,itm_segmented_helmet_redwhite,itm_segmented_helmet_redyellow,
itm_segmented_helmet_bluewhite,itm_segmented_helmet,itm_norman_kite_shield_a1,itm_norman_kite_shield_a2,itm_norman_kite_shield_a3,itm_norman_kite_shield_b1,
itm_norman_kite_shield_b2,itm_norman_kite_shield_b3,itm_norman_kite_shield_c1,itm_norman_kite_shield_c2,itm_norman_kite_shield_c3,
itm_norman_kite_shield_c3,itm_norman_kite_shield_d1,itm_norman_kite_shield_d2,itm_norman_kite_shield_d3,itm_norman_kite_shield_e1,itm_norman_kite_shield_e2,
itm_norman_kite_shield_e3,itm_norman_kite_shield_f1,itm_norman_kite_shield_f2,itm_norman_kite_shield_f3,itm_langr_bryntvari,itm_spjotkesja,itm_langr_svia,
itm_bb_serbian_knobbed_mace_3,itm_bb_serbian_knobbed_mace_3,itm_bb_serbian_knobbed_mace_3,itm_bb_serbian_knobbed_mace_3,itm_disk_sword_a,itm_disk_sword_b,
itm_disk_sword_c,itm_disk_sword_d,itm_brazilnut_sword_a,itm_brazilnut_sword_b,itm_brazilnut_sword_c,itm_hunter],
def_attrib|level(25),wp(130),knows_common|knows_riding_5|knows_ironflesh_4|knows_shield_5|knows_power_strike_4,mercenary_face_1, mercenary_face_2],


Even though it is only the first line, that is relevant, I don't find the error.

Has anybody an idea?
 
The Bowman said:
You might want to try this:

Code:
[(ti_on_weapon_attack,[(store_trigger_param_1,":agent"),(agent_play_sound,":agent","snd_ak47_shot"),(position_move_x,pos1,27),(position_move_y,pos1,36),(particle_system_burst,"psys_pistol_smoke",pos1,15)])] ],

Use the Flintlock pistol as your base code, then attach correctly the one above.
Hey,

I've tried that, though sadly it doesn't work. I still can't hear any sounds.

I've also tried using .wav and .ogg formats for the audio to play, none of them work.

Could it have anything to do with MP? I'm testing this via a personally hosted server.
 
I treid creating a map using this tutorial and my map end out like this, could someone please help me to fix it by taking away the jagged edges at the end of the map. I really need this to work properly but I only used a default black colour for the height map, any solutions here.

http://forums.taleworlds.com/index.php/topic,162501.0.html



 
My personal (and extremely unhelpful advice) would be to do most of the pre-map-editor stage in Blender. By using a 3d modelling package you get much finer control and can make those edges much more exact.
 
Hey everyone, quick question...I created a one-handed sword using Morgh's editor, copying the mesh from the claymore ("kleymore_a") and whenever I use it in-game, it is "invisible".

Some Details:
- Using With Fire and Sword.
- Used the add item function with an existing 1H sword for a template.
- Have reached 929 items. ("itm_items_end" being 929.)
- The sword only appears when other swords are equipped.
- All the previous items I've made function correctly.

Currently I'm assuming I've reached some sort of limit, or is it just in need of a minor fix?
 
Question. How do I program a party, spawned from a template, that has the auto_remove_in_town flag, to do something upon reaching its destination? (I need this for resource-carrying caravans that have to deliver goods to towns. Values of resources are managed by slots.) Please don't tell me I'll need to make a trigger....
 
Lumos said:
Question. How do I program a party, spawned from a template, that has the auto_remove_in_town flag, to do something upon reaching its destination? (I need this for resource-carrying caravans that have to deliver goods to towns. Values of resources are managed by slots.) Please don't tell me I'll need to make a trigger....
The engine doesn't fire anything when they arrive...so you'll need a trigger.
You could tap into a pre-existing simple trigger, of course. Search module_simple_triggers for uses of try_for_parties and pick one to piggy-back-onto. Likely the merchant one could work.
 
Caba`drin said:
Lumos said:
Question. How do I program a party, spawned from a template, that has the auto_remove_in_town flag, to do something upon reaching its destination? (I need this for resource-carrying caravans that have to deliver goods to towns. Values of resources are managed by slots.) Please don't tell me I'll need to make a trigger....
The engine doesn't fire anything when they arrive...so you'll need a trigger.
You could tap into a pre-existing simple trigger, of course. Search module_simple_triggers for uses of try_for_parties and pick one to piggy-back-onto. Likely the merchant one could work.
Yeah, piggy-back on the regular caravans trigger code, everybody does that all the time, and it's not rocket science.
 
Thanks a lot, thought I'd have to do that. I already do it for scripts that think it's awesome looping through villages twenty times in order to set a slot or spawn a looter party. That tactic might be good for Native, but on a map with ~1200 villages, that ain't a good idea.
Thanks again.  I will hook my blood-sucking codes into the existing healthy structures. :smile:
 
MadVader said:
CTCCoco said:
Somebody knows if it´s possible to pass a local variable to a string without a reg?
No, and there's no reason why you can't put it in a string by using a reg. Or is there?

Yes, it is.

Imagine on Multiplayer 30 players sending  some URL requests at the same time, using 64 registers or so. The more people, the more possibilities to the register to get confused, since they are globally isn´t it?

That´s my problem.
 
Status
Not open for further replies.
Back
Top Bottom