Add items to Napoleonics Wars

正在查看此主题的用户

Sir_Sergi

Sergeant at Arms
Can someone explain to me how you can add new items to Napoleonics Wars?

Because it doesn't uses the same code of the Native Module System, and I can't find the respective code in the module_scrips.py, as I think it would normally.

Help me, please.

Thanks.
 
Put your item in the item.py like usually. And then simply add the item to the troop you want it to be assigned to in the troops.py.
 
I've tried to do that, but had no effect. So I opened this post, in case I needed to add something more.
 
Add in correct place in items, (look for same type of weapons) then add it to the troop, save, compile twice, done.
 
Finally got to add it, but came a new problem. The gun was not in the unit.

I find it very strange error, as it only appears or bow and arrows, but never both at once appear.

Anyone know what I should do to solve this problem, thanks.
 
These are the codes I used:

Module_items:
["bow_h1",        "Bow", [("bow_h1",0),("bow_carry_h1",ixmesh_carry)], itp_type_bow |itp_merchandise|itp_primary|itp_next_item_as_melee|itp_two_handed ,itcf_shoot_bow|itcf_carry_bow_back,
238 , weight(1)|difficulty(1)|spd_rtng(75) | shoot_speed(45) | thrust_damage(30 ,  pierce  ),imodbits_bow ],
# [(ti_on_weapon_attack, [(store_trigger_param_1,":user_agent"),(call_script, "script_server_fire_musket", ":user_agent", firearm_type_rifle)])]],
["bow_h1_melee", "English Bow", [("bow_h1",0),("bow_carry_h1",ixmesh_carry)], itp_has_upper_stab|itp_type_polearm |itp_primary|itp_no_blur|itp_offset_musket,itc_musket_melee|itcf_carry_crossbow_back,
180 , weight(4.5)|difficulty(0)|spd_rtng(84) | weapon_length(85)|swing_damage(24 , blunt) | thrust_damage(20 ,  blunt),imodbits_none ],

and

["bodkin_arrows_h1","Bodkin Arrows", [("bodkin_arrows_h1",0),("bodkin_arrows_flying_h1",ixmesh_flying_ammo),("bodkin_arrows_quiver_h1", ixmesh_carry)], itp_type_arrows|itp_merchandise|itp_default_ammo, itcf_carry_quiver_back, 288,weight(4.5)|abundance(160)|weapon_length(95)|thrust_damage(20,pierce)|max_ammo(12),imodbits_missile],

and in the file Module_troops:
  ["british_infantry","33rd Regiment of Foot","Line Infantry",tf_guarantee_all,0,0,fac_britain,
  [itm_british_infantry_ranker,itm_french_voltigeur_officer_pants,itm_33_stovepipe,itm_bow_h1,itm_bodkin_arrows_h1],
  def_attrib_multiplayer|level(20),wpex(50,5,130,225,150,5),knows_common|knows_ironflesh_2|knows_power_draw_6|knows_athletics_5|knows_shield_5|knows_power_strike_2|knows_riding_1,swadian_face_middle_1, swadian_face_old_2],



Uploaded with ImageShack.us
Click and look the number of arrows, it's 0.

But I don' t understand why do not work properly.

Anyone know why or have a solution?

Thanks
 
插入代码块:
 ["short_bow_h1", "Short Bow", [("short_bow_h1",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed|itp_next_item_as_melee ,itcf_shoot_musket|itcf_carry_crossbow_back, 
 683 , weight(1.0)|difficulty(0)|spd_rtng(80) | shoot_speed(40) | thrust_damage(100 ,pierce)|accuracy(99),imodbits_none,[]],
# [(ti_on_weapon_attack, [(store_trigger_param_1,":user_agent"),(call_script, "script_server_fire_musket", ":user_agent", firearm_type_rifle)])]],

 ["short_bow_h1_melee", "Short Bow", [("short_bow_h1",0),("short_bow_carry_h1",ixmesh_carry)], itp_has_upper_stab|itp_type_polearm |itp_primary|itp_no_blur|itp_offset_musket,itc_musket_melee|itcf_carry_crossbow_back,
 180 , weight(1.0)|difficulty(0)|spd_rtng(84) | weapon_length(85)|swing_damage(14 , blunt) | thrust_damage(20 ,  blunt),imodbits_none ],

 ["arrows_h1","Arrows", [("arrows_h1",0),("arrows_flying_h1",ixmesh_flying_ammo),("arrows_quiver_h1",ixmesh_inventory)], itp_type_bolts|itp_merchandise|itp_default_ammo|itp_can_penetrate_shield, 0, 64,weight(2.0)|abundance(90)|weapon_length(1)|thrust_damage(1,pierce)|max_ammo(30),imodbits_missile,
 [(ti_on_missile_hit, [(copy_position,pos63,pos1),(store_trigger_param_2, ":collision_type"),(call_script, "script_mm_on_bullet_hit",":collision_type")])]],

If I use some other code, appears an error and does not work. Please, I want add a bow to NW and I need your help.

PS I: This is a new code. The code that I used in the past, does not work.

PS II: Sorry, I do not speak english. :S
 
后退
顶部 底部