- 好友
- 0
- 在线时间
- 0 小时
- 最后登录
- 2024-10-17
随仆
- UID
- 3146701
- 第纳尔
- 143
- 精华
- 0
- 互助
- 1
- 荣誉
- 0
- 贡献
- 0
- 魅力
- 20
- 注册时间
- 2020-3-14
鲜花( 2) 鸡蛋( 0)
|
楼主 |
发表于 2020-3-26 13:17:19
|
显示全部楼层
本帖最后由 myccmj 于 2020-3-27 00:39 编辑
- #####################New Weapon######################
- ["awp", "AWP", [("qiang",0),("qiang",6291486)], itp_type_musket |itp_primary|itp_two_handed ,itcf_shoot_musket|itcf_reload_musket, 230 , weight(6)|difficulty(0)|spd_rtng(300) | shoot_speed(280) | thrust_damage(142 ,pierce)|max_ammo(10)|accuracy(999),imodbits_none,
- [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15)])]],
-
- ["new_pistol", "21st Pistol", [("zlmg",0)], itp_type_pistol |itp_merchandise|itp_primary ,itcf_shoot_pistol|itcf_reload_pistol, 450 , weight(2.5)|difficulty(0)|spd_rtng(360) | shoot_speed(160) | thrust_damage(35 ,pierce)|max_ammo(12)|accuracy(999),imodbits_none,
- [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(store_trigger_param_1,":attacker_agent"),
- (agent_get_wielded_item,":agent_cur_weapon",":attacker_agent"),
- (agent_get_look_position,pos24,":attacker_agent"),
- (item_get_weapon_length,":length",":agent_cur_weapon"),
- (position_move_y, pos24,":length"),
- (agent_get_horse,":attacker_agent_horse",":attacker_agent"),
- ##adjust pos for horse_mode&crouch_mode##
- (try_begin),
- (agent_get_crouch_mode,":crouch_mode",":attacker_agent"),
- (eq, ":crouch_mode", 1),
- (position_move_z,pos24,115,1),
- (else_try),
- (lt,":attacker_agent_horse",0),
- (position_move_z,pos24,170,1),
-
- (else_try),
- (position_move_z,pos24,270,1),
- (try_end),
- (try_begin),
- (neg|agent_is_non_player,":attacker_agent"),
- (neg|eq,"$is_first_vision",1),
- #(display_message,"@report:z add 100"),
- (position_move_z,pos24,38,1),
- (try_end),
- ##adjust pos for horse_mode&crouch_mode##
- (set_fixed_point_multiplier,1),
- (add_missile, ":attacker_agent", pos24, 160, ":agent_cur_weapon", imod_plain, "itm_new_bullet",imod_plain),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 5),
- #(add_missile, ":attacker_agent", pos24, 100, "itm_hunting_bow", imod_plain, "itm_explode_bullet",imod_plain),
- ])]],
- ["explode_pistol", "BooM Pistol", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary ,itcf_shoot_pistol|itcf_reload_pistol, 450 , weight(6.5)|difficulty(0)|spd_rtng(320) | shoot_speed(80) | thrust_damage(5 ,pierce)|max_ammo(12)|accuracy(999),imodbits_none,
- [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(store_trigger_param_1,":attacker_agent"),
- (agent_get_wielded_item,":agent_cur_weapon",":attacker_agent"),
- #get original position of weapon
- (agent_get_look_position,pos24,":attacker_agent"),
- (item_get_weapon_length,":length",":agent_cur_weapon"),
- (position_move_y, pos24,":length"),
- (agent_get_horse,":attacker_agent_horse",":attacker_agent"),
- ##adjust pos for horse_mode&crouch_mode##
- (try_begin),
- (agent_get_crouch_mode,":crouch_mode",":attacker_agent"),
- (eq, ":crouch_mode", 1),
- (position_move_z,pos24,115,1),
- (else_try),
- (lt,":attacker_agent_horse",0),
- (position_move_z,pos24,170,1),
-
- (else_try),
- (position_move_z,pos24,270,1),
- (try_end),
- (try_begin),
- (neg|agent_is_non_player,":attacker_agent"),
- (neg|eq,"$is_first_vision",1),
- #(display_message,"@report:z add 100"),
- (position_move_z,pos24,38,1),
- (try_end),
- ##adjust pos for horse_mode&crouch_mode##
- #(display_message,"@report:is_first_vision {$is_first_vision}"),
- (set_fixed_point_multiplier,1),
- #(add_missile, ":attacker_agent", pos24, 100, ":agent_cur_weapon", imod_plain, "itm_new_bullet",imod_plain),
- (add_missile, ":attacker_agent", pos24, 80, ":agent_cur_weapon", imod_plain, "itm_explode_bullet",imod_plain),
- ])]],
- ["test_rifle", "Gatling", [("gelin",0),("gelin",6291486)], itp_type_musket |itp_primary|itp_two_handed ,itcf_shoot_musket|itcf_reload_musket,
- 0 , weight(10)|difficulty(0)|spd_rtng(380)|weapon_length(150)| shoot_speed(200) | thrust_damage(38,pierce)|max_ammo(150)|accuracy(999),imodbits_none,
- [(ti_on_init_item, [(item_set_slot,"itm_test_rifle",slot_item_shot_sound,"snd_pistol_shot"),
- (item_set_slot,"itm_test_rifle",slot_item_pic_bit,-7),
- (item_set_slot,"itm_test_rifle",slot_item_shoot_freq,120),
- (item_set_slot,"itm_test_rifle",slot_item_start_time,1200),
- ]),
- (ti_on_weapon_attack,[
- (store_trigger_param_1,":attacker_agent"),
- (agent_get_wielded_item,":agent_cur_weapon",":attacker_agent"),
- (item_get_weapon_length,":item_length",":agent_cur_weapon"),
- (position_move_y,pos1,":item_length"),
- (position_move_z,pos1,-7,1),
- (item_get_slot,":shoot_sound",":agent_cur_weapon",slot_item_shot_sound),
- (play_sound_at_position, ":shoot_sound", pos1),
- (particle_system_burst, "psys_rifle_smoke", pos1, 10),
- #(particle_system_burst, "psys_gun_fire", pos1, 10),
- ]),]],
-
- ["qbz", "Qbz97", [("qbz97",0)], itp_type_musket |itp_primary|itp_two_handed ,itcf_shoot_musket|itcf_reload_musket,
- 0 , weight(5)|difficulty(0)|spd_rtng(420)|weapon_length(80)| shoot_speed(180) | thrust_damage(43,pierce)|max_ammo(35)|accuracy(999),imodbits_none,
- [(ti_on_init_item, [#(item_set_slot,"itm_test_rifle",slot_item_shot_sound,"snd_pistol_shot"),
- (item_set_slot,"itm_qbz",slot_item_pic_bit,-46),
- (item_set_slot,"itm_qbz",slot_item_shoot_freq,180),
- (item_set_slot,"itm_qbz",slot_item_start_time,120),
- ]),
- (ti_on_weapon_attack,[
- (store_trigger_param_1,":attacker_agent"),
- (agent_get_wielded_item,":agent_cur_weapon",":attacker_agent"),
- (item_get_weapon_length,":item_length",":agent_cur_weapon"),
- (position_move_y,pos1,":item_length"),
- #(position_move_z,pos1,-7,1),
- (item_get_slot,":shoot_sound",":agent_cur_weapon",slot_item_shot_sound),
- (play_sound_at_position, ":shoot_sound", pos1),
- (particle_system_burst, "psys_rifle_smoke", pos1, 10),
- #(particle_system_burst, "psys_gun_fire", pos1, 10),
- ]),]],
复制代码
上面awp是狙击枪,new_pistol是左轮,explode_pistol是榴弹枪,test_rifle是加特林,qbz是自动步枪
modules_item.py
下面这个是榴弹枪子弹的代码,主要借鉴了这篇帖子http://bbs.mountblade.com.cn/thread-370335-1-1.html
- ["explode_bullet","BooM Bullet", [("cartridge_a",0)], itp_type_bullets|itp_merchandise|itp_can_penetrate_shield|itp_default_ammo, 0,
- 41,weight(3.5)|abundance(90)|weapon_length(3)|thrust_damage(5,pierce)|max_ammo(250),imodbits_missile,[(ti_on_missile_hit, [
- (particle_system_burst,"psys_explosion_flash",pos1,10),
- (particle_system_burst,"psys_fire_sparks_1",pos1,100),
- (particle_system_burst,"psys_explosion_smoke",pos1,50),
- (particle_system_burst,"psys_explosion_particles",pos1,10),
- (particle_system_burst,"psys_arrow_fire",pos1,10),
- (store_trigger_param_1,":var_0"),
- (agent_get_wielded_item,":agent_cur_weapon",":var_0"),
- (agent_get_party_id,":var_3",":var_0"),
- (try_for_agents,":var_1"),
- (agent_get_position,pos2,":var_1"),
- (get_distance_between_positions,":var_2",pos1,pos2),
- (agent_get_party_id,":var_4",":var_1"),
- (try_begin),
- (neg|eq,":var_3",":var_4"),
- (try_begin),
- (le,":var_2",65),
- (agent_deliver_damage_to_agent,":var_0",":var_1",70,":agent_cur_weapon"),
- (else_try),
- (le,":var_2",125),
- (agent_deliver_damage_to_agent,":var_0",":var_1",54,":agent_cur_weapon"),
- (else_try),
- (le,":var_2",175),
- (agent_deliver_damage_to_agent,":var_0",":var_1",32,":agent_cur_weapon"),
- (try_end),
-
- (try_end),
- (try_end),
- ])]],
复制代码
particle_system.py 话说粒子效果我其实还不是很懂,都是看别人的然后改一改,有什么好的粒子效果的帖子可以推荐么
- ###New automatics begin
- ("rifle_smoke", psf_billboard_3d, "prtcl_dust_a",
- 60, 0.5, 30, -0.2, 45.0, 1.5, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
- (0.0, 0.75), (1, 0), #alpha keys
- (0.0, 0.7), (1, 0.4), #red keys
- (0.0, 0.7),(1, 0.4), #green keys
- (0.0, 0.7), (1, 0.4), #blue keys
- (0, 1.5), (0.5, 5.0), #scale keys
- (0.1, 0.1, 0.05), #emit box size
- (0, 40, 0), #emit velocity
- 0.2 #emit dir randomness
- ),
- ("bullet_hit_ground_smoke", psf_billboard_3d, "prtcl_dust_a",
- 300, 0.4, 20, 0.4, 60.0, 1.5, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
- (0.0, 0.75), (1, 0), #alpha keys
- (0.0, 0.7), (1, 0.4), #red keys
- (0.0, 0.7),(1, 0.4), #green keys
- (0.0, 0.7), (1, 0.4), #blue keys
- (0, 1.5), (0.5, 5.0), #scale keys
- (0.1, 0.1, 0.1), #emit box size
- (0, 0, 50), #emit velocity
- 0.2 #emit dir randomness
- ),
-
- ("gun_fire", psf_billboard_3d, "prt_mesh_fire_1",
- 300, 0.05, 30, 0, 10, 1, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
- (0, 0.7), (1, 0.3), #alpha keys
- (0, 0.8), (0.5, 1), #red keys
- (0, 0.8),(0.5, 0.5), #green keys
- (0, 0.5), (0.5, 0.1), #blue keys
- (0, 0.2), (0.1, 1), #scale keys
- (0.01, 0.01, 0.01), #emit box size
- (0, 10, 0), #emit velocity
- 0 #emit dir randomness
- ),
- ###New automatics end
- ("explosion_flash", psf_billboard_3d | psf_randomize_size , "prt_sparks_mesh_1",
- 3000, 0.8, 0.1, -0.00003, 50.0, 1.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
- (0.1, 0.8), (1, 0), #alpha keys
- (0.5, 1.0), (1, 0.9), #red keys
- (0.5, 0.6), (1, 0.1), #green keys
- (0.5, 0.2), (1, 0.0), #blue keys
- (0.1, 7.1), (1.0, 0.2), #scale keys
- (1, 1, 3.1), #emit box size
- (0.0, 0.0, 0.0), #emit velocity
- 0.05, #emit dir randomness
- 100.0, #rotation speed
- 0.5, #rotation damping
- ),
- ("explosion_smoke", psf_billboard_3d|psf_randomize_size, "prtcl_dust_a",
- 800, 13, 15, -0.04, 10.0, 0.2, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
- (0.1, 0.5), (1, 0), #alpha keys
- (0.1, 0.8), (1, 0.8), #red keys
- (0.1, 0.7),(1, 0.7), #green keys
- (0.1, 0.6), (1, 0.7), #blue keys
- (0.6, 13.2), (1, 10.0), #scale keys
- (0.5, 0.5, 5.5), #emit box size
- (-1.2, 0, 0.05), #emit velocity
- 0.8, #emit dir randomness
- 10, #rotation speed
- 0.1, #rotation damping
- ),
- ("explosion_smoke2", psf_billboard_3d|psf_randomize_size, "prtcl_dust_a",
- 1000, 11, 15, -0.04, 10.0, 0.2, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
- (0.1, 0.5), (1, 0), #alpha keys
- (0.1, 0.8), (1, 0.8), #red keys
- (0.1, 0.7),(1, 0.7), #green keys
- (0.1, 0.6), (1, 0.7), #blue keys
- (10.0, 12.2), (1, 10.0), #scale keys
- (1.7, 1.7, 1.4), #emit box size
- (-1.2, 0, 0.05), #emit velocity
- 1.8, #emit dir randomness
- 10, #rotation speed
- 0.1, #rotation damping
- ),
- ("explosion_particles", psf_randomize_size | psf_randomize_rotation, "prt_mesh_straw_1",
- 4000, 20, 2, 0.58, 10, 2, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
- (0.1, 1), (1, 1), #alpha keys
- (0.1, 0.6), (1, 0.6), #red keys
- (0.1, 0.5),(1, 0.5), #green keys
- (0.1, 0.4), (1, 0.4), #blue keys
- (0.0, 0.3), (1, 0.3), #scale keys
- (1.7, 1.7, 4.5), #emit box size
- (0, 0, 0), #emit velocity
- 2.3, #emit dir randomness
- 200, #rotation speed
- 0, #rotation damping
- ),
复制代码
|
|