骑马与砍杀中文站论坛

 找回密码
 注册(Register!)

QQ登录

只需一步,快速开始

搜索
购买CDKEY 小黑盒加速器
查看: 12486|回复: 20

[mod展示] 左轮、狙击、自动步枪、加特林、榴弹枪(4.24更新钢铁侠盔甲套装)(持续更新至6.1)

[复制链接]

7

主题

24

回帖

14

积分

随仆

Rank: 1

UID
3146701
第纳尔
143
精华
0
互助
1
荣誉
0
贡献
0
魅力
20
注册时间
2020-3-14
鲜花(2) 鸡蛋(0)
发表于 2020-3-25 23:05:41 | 显示全部楼层 |阅读模式
本帖最后由 myccmj 于 2020-6-1 21:37 编辑

6.1更新:
(点击展开 / 收起)
4.24更新:
(点击展开 / 收起)




3.28更新:再次优化了一下代码,

mod演示:
https://www.bilibili.com/video/av752502519

mod试玩:
https://www.bilibili.com/video/BV1gp4y1C71q/


(点击展开 / 收起)

(点击展开 / 收起)








入坑一个月不到,感觉做mod比玩游戏本身有趣,花了两周多研究了一下之前大佬们的帖子,做了一些枪械mod出来。

是在战团1.174 Native原版的基础上改的,加了左轮、狙击、自动步枪(qbz97)、加特林、榴弹枪进去。具体代码等会再放。


想要体验可以到如下链接下载(之前发的好像有点问题,重新传了一下)

链接:https://pan.baidu.com/s/1irM5k_z9kddLBH8sTxhQUw
提取码:d780      

压缩文件里,MyNative1是mod,丢到modules里面即可,Module_system 1.171里面是源码。正常开始游戏即可,枪都放到背包里了,枪的面板显示的伤害不一定是真正的伤害,因为有的是用add_missile发射的子弹。枪的连发功能是参考了http://bbs.mountblade.com.cn/thread-262462-1-1.html这篇帖子,并做了一些优化。目前有的问题是我想给枪支添加枪口火焰,这对于不用连发系统的枪很简单,用ti_on_attack就可以了,但是对于用连发系统的枪,那个枪口的位置总是找不准,特别是用了模型之后。另外,还想再问一下position_move_x(y、z)函数里的local和global有什么区别,还是没太搞懂。

鲜花鸡蛋

wxj2057605650  在2020-4-26 11:25  送朵鲜花  并说:我想用在我的mod里,可以吗?

3

主题

181

回帖

120

积分

见习骑士

Rank: 3

UID
286084
第纳尔
1293
精华
0
互助
13
荣誉
0
贡献
0
魅力
26
注册时间
2010-7-23

骑砍中文站APP会员勋章霸主正版勋章

QQ
鲜花(33) 鸡蛋(0)
发表于 2020-3-26 12:04:22 | 显示全部楼层
加油啊,每棒
《繁荣帝国》:一个最大限度基于真实的剧本,属于程序类MOD,也是smart module的孵化基础,所以繁荣帝国是完全遵循smart module工具规范的剧本。
《smart module》:骑砍源码组织利器,一个py文件就是一个神奇的module,每一个module都是一个单独的功能,可以代表是一个庞大的功能模块,也可以是一些通用类代码的集合,且每一个module无论功能大小,代码多少,都可以在多个剧本之间达到极速移植!

7

主题

24

回帖

14

积分

随仆

Rank: 1

UID
3146701
第纳尔
143
精华
0
互助
1
荣誉
0
贡献
0
魅力
20
注册时间
2020-3-14
鲜花(2) 鸡蛋(0)
 楼主| 发表于 2020-3-26 13:07:43 | 显示全部楼层
本帖最后由 myccmj 于 2020-3-26 13:13 编辑
  1. modules_mission_template.py这个是在之前连发枪的代码基础上进行了一些小修改,主要是加入了判断第一人称、第三人称,因为这两个视角position需要调整的z不同。
  2. ###AUTO SHOOT####
  3. common_automatic = (0.05,0,0,[],[
  4.         (try_for_agents,":attacker_agent"),
  5.                 (agent_is_human,":attacker_agent"),
  6.                 (agent_is_alive,":attacker_agent"),
  7.                 (agent_get_wielded_item,":agent_cur_weapon",":attacker_agent"),
  8.         (neg|eq,":agent_cur_weapon","itm_awp"),
  9.                 (gt,":agent_cur_weapon",0),
  10.         (item_get_type, ":item_type", ":agent_cur_weapon"),
  11.         (eq,":item_type",itp_type_musket),
  12.                 (agent_get_attack_action, ":action_state", ":attacker_agent"),
  13. (try_begin),
  14.             (agent_is_non_player, ":attacker_agent"),
  15.             (try_begin),
  16.                 (gt,":action_state",0),#free
  17.                 (neq,":action_state",5),#reloading
  18.                 (neq,":action_state",7),#cancelling
  19.                 (agent_set_attack_action, ":attacker_agent", 0),
  20.             (try_end),
  21.         (else_try),#player simulate attack
  22.                         (eq,":action_state",1),#readying
  23.                         #ticker trigger
  24.                         (try_begin),
  25.                                 (le,"$g_automatic_ticker_time",0),
  26.                                 #ticker trigger
  27.                                 (item_get_speed_rating,"$g_automatic_ticker_time",":agent_cur_weapon"),
  28.                 (val_max,"$g_automatic_ticker_time",1),
  29.                 (item_get_slot,":shoot_freq",":agent_cur_weapon",slot_item_shoot_freq),
  30.                                 (store_div,"$g_automatic_ticker_time",":shoot_freq","$g_automatic_ticker_time"),
  31.                 (agent_get_item_cur_ammo, ":cur_ammo", ":attacker_agent"),
  32.                                 (gt,":cur_ammo",0),

  33.                 #match the right ammmo type
  34.                 (assign,":cur_ammo_id",-1),
  35.                 (assign,":item_slot_num",4),

  36.                 (try_for_range,":cur_item_slot",0,":item_slot_num"),
  37.                     (agent_get_item_slot, ":item_no", ":attacker_agent", ":cur_item_slot"),
  38.                     (ge,":item_no",0),
  39.                     (item_get_type, ":item_type", ":item_no"),
  40.                     (eq,":item_type",itp_type_bullets),
  41.                     (assign,":cur_ammo_id",":item_no"),
  42.                     (assign,":item_slot_num",0),#break
  43.                 (try_end),

  44.                 (try_begin),
  45.                     (lt,":cur_ammo_id",0),
  46.                     (assign,":cur_ammo_id","itm_void_bullet"),#as default
  47.                 (try_end),

  48.                                 #get original position of weapon
  49.                                 (agent_get_look_position,pos24,":attacker_agent"),
  50.                                 (item_get_weapon_length,":length",":agent_cur_weapon"),
  51.                                 (position_move_y, pos24,":length"),
  52.                                 (agent_get_horse,":attacker_agent_horse",":attacker_agent"),
  53.     ##adjust pos for horse_mode&crouch_mode##
  54.                 (try_begin),
  55.                     (agent_get_crouch_mode,":crouch_mode",":attacker_agent"),
  56.                     (eq, ":crouch_mode", 1),
  57.                     (position_move_z,pos24,115,1),
  58.                 (else_try),
  59.                                         (lt,":attacker_agent_horse",0),
  60.                                         (position_move_z,pos24,170,1),
  61.                                 (else_try),
  62.                                         (position_move_z,pos24,270,1),
  63.                 (try_end),
  64.                 (try_begin),
  65.                                         (neg|agent_is_non_player,":attacker_agent"),
  66.                                         (neg|eq,"$is_first_vision",1),
  67.                                         #(display_message,"@report:z add 100"),
  68.                                         (position_move_z,pos24,38,1),
  69.                                 (try_end),
  70.        ##adjust pos for horse_mode&crouch_mode##

  71.                                 ##get weapon position after calculating accuracy
  72.                                 (copy_position,pos25,pos24),
  73.                                 (item_get_accuracy,":accuracy",":agent_cur_weapon"),
  74.                 (val_max,":accuracy",1),
  75.                                 (store_div,":randomize_value",500,":accuracy"),
  76.                 (val_max,":randomize_value",1.5),
  77.                                 (store_random_in_range,":z",0,":randomize_value"),
  78.                                 (store_random_in_range,":x",0,":randomize_value"),
  79.                                 (position_rotate_z,pos25,":z"),
  80.                                 (position_rotate_x,pos25,":x"),

  81.                                 #create particle,animation and sound effect of weapon
  82.                                 (agent_set_animation, ":attacker_agent", "anim_release_musket", 1),
  83.                 (item_get_slot,":pic_bit",":agent_cur_weapon",slot_item_pic_bit),
  84.                                 (item_get_slot,":shoot_sound",":agent_cur_weapon",slot_item_shot_sound),
  85.             
  86.                
  87.                

  88.                 (position_move_z,pos24,":pic_bit"),
  89.                                 (play_sound_at_position, ":shoot_sound", pos24),
  90.                                 (particle_system_burst, "psys_rifle_smoke", pos24, 5),
  91.                                 (particle_system_burst, "psys_gun_fire", pos24, 5),

  92.                 (item_get_missile_speed,":missile_speed",":agent_cur_weapon"),
  93.                 (set_fixed_point_multiplier,1),
  94.                 (add_missile, ":attacker_agent", pos25, ":missile_speed", ":agent_cur_weapon", imod_plain, "itm_auto_bullet",imod_plain),

  95.                                 #reduce ammo
  96.                                 (val_sub,":cur_ammo",1),
  97.                                 (agent_set_ammo,":attacker_agent",":agent_cur_weapon",":cur_ammo"),
  98.                         (else_try),
  99.                                 (val_sub,"$g_automatic_ticker_time",1),
  100.                         (try_end),
  101.                 (else_try),
  102.             (item_get_slot,":start_time",":agent_cur_weapon",slot_item_start_time),
  103.             #(display_message,":start_time"),
  104.             (item_get_speed_rating,"$g_automatic_ticker_time",":agent_cur_weapon"),
  105.             (val_max,"$g_automatic_ticker_time",1),
  106.                         (store_div,"$g_automatic_ticker_time",":start_time","$g_automatic_ticker_time"),
  107.                 (try_end),
  108.         (try_end),
  109. ])
  110. ###AUTO SHOOT####
  111. ###CHECKING CAM TRIGGER#####
  112. check_is_first=(
  113. 0,0,0,[(game_key_clicked,gk_cam_toggle)],
  114. [
  115. #(display_message,"@report:is_first_vision {$is_first_vision}"),
  116. (try_begin),
  117. (eq,"$is_first_vision",1),
  118. (display_message,"@report:third_vision"),
  119. (assign,"$is_first_vision",0),
  120. (else_try),
  121. (display_message,"@report:first_vision"),
  122. (assign,"$is_first_vision",1),
  123. (end_try),
  124. ])
  125. ###CHECKING CAM TRIGGER#####
复制代码
需要把这两个触发器加在有common_battle_order_panel_tick, 的地方
具体是搜索
common_battle_order_panel_tick,

每找到一个,就另起一行,添加

check_is_first (原理在这篇帖子:

然后再搜索tutorial_training_ground,

在其放触发器的位置(也就是第二个'['之后)也加一个check_is_first

这是为了在训练场也能生效


7

主题

24

回帖

14

积分

随仆

Rank: 1

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 编辑
  1. #####################New Weapon######################
  2. ["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,
  3. [(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)])]],

  4. ["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,
  5. [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(store_trigger_param_1,":attacker_agent"),

  6. (agent_get_wielded_item,":agent_cur_weapon",":attacker_agent"),

  7.                                 (agent_get_look_position,pos24,":attacker_agent"),
  8.                                 (item_get_weapon_length,":length",":agent_cur_weapon"),
  9.                                 (position_move_y, pos24,":length"),
  10.                                 (agent_get_horse,":attacker_agent_horse",":attacker_agent"),
  11.     ##adjust pos for horse_mode&crouch_mode##
  12.                         (try_begin),
  13.                     (agent_get_crouch_mode,":crouch_mode",":attacker_agent"),
  14.                     (eq, ":crouch_mode", 1),
  15.                     (position_move_z,pos24,115,1),
  16.                 (else_try),
  17.                                         (lt,":attacker_agent_horse",0),
  18.                                         (position_move_z,pos24,170,1),
  19.                         
  20.                                 (else_try),
  21.                                         (position_move_z,pos24,270,1),
  22.                                 (try_end),
  23.                                 (try_begin),
  24.                                         (neg|agent_is_non_player,":attacker_agent"),
  25.                                         (neg|eq,"$is_first_vision",1),
  26.                                         #(display_message,"@report:z add 100"),
  27.                                         (position_move_z,pos24,38,1),
  28.                                 (try_end),
  29.        ##adjust pos for horse_mode&crouch_mode##


  30. (set_fixed_point_multiplier,1),
  31. (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),
  32. #(add_missile, ":attacker_agent", pos24, 100, "itm_hunting_bow", imod_plain, "itm_explode_bullet",imod_plain),
  33. ])]],

  34. ["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,
  35. [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(store_trigger_param_1,":attacker_agent"),

  36. (agent_get_wielded_item,":agent_cur_weapon",":attacker_agent"),


  37. #get original position of weapon
  38.                                 (agent_get_look_position,pos24,":attacker_agent"),
  39.                                 (item_get_weapon_length,":length",":agent_cur_weapon"),
  40.                                 (position_move_y, pos24,":length"),
  41.                                 (agent_get_horse,":attacker_agent_horse",":attacker_agent"),
  42.     ##adjust pos for horse_mode&crouch_mode##
  43.                         (try_begin),
  44.                     (agent_get_crouch_mode,":crouch_mode",":attacker_agent"),
  45.                     (eq, ":crouch_mode", 1),
  46.                     (position_move_z,pos24,115,1),
  47.                 (else_try),
  48.                                         (lt,":attacker_agent_horse",0),
  49.                                         (position_move_z,pos24,170,1),
  50.                         
  51.                                 (else_try),
  52.                                         (position_move_z,pos24,270,1),
  53.                                 (try_end),
  54.                                 (try_begin),
  55.                                         (neg|agent_is_non_player,":attacker_agent"),
  56.                                         (neg|eq,"$is_first_vision",1),
  57.                                         #(display_message,"@report:z add 100"),
  58.                                         (position_move_z,pos24,38,1),
  59.                                 (try_end),
  60.        ##adjust pos for horse_mode&crouch_mode##

  61. #(display_message,"@report:is_first_vision {$is_first_vision}"),
  62. (set_fixed_point_multiplier,1),
  63. #(add_missile, ":attacker_agent", pos24, 100, ":agent_cur_weapon", imod_plain, "itm_new_bullet",imod_plain),
  64. (add_missile, ":attacker_agent", pos24, 80, ":agent_cur_weapon", imod_plain, "itm_explode_bullet",imod_plain),
  65. ])]],

  66. ["test_rifle", "Gatling", [("gelin",0),("gelin",6291486)], itp_type_musket |itp_primary|itp_two_handed ,itcf_shoot_musket|itcf_reload_musket,
  67. 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,
  68. [(ti_on_init_item, [(item_set_slot,"itm_test_rifle",slot_item_shot_sound,"snd_pistol_shot"),
  69.                      (item_set_slot,"itm_test_rifle",slot_item_pic_bit,-7),
  70.                      (item_set_slot,"itm_test_rifle",slot_item_shoot_freq,120),
  71.                      (item_set_slot,"itm_test_rifle",slot_item_start_time,1200),
  72. ]),
  73.   (ti_on_weapon_attack,[
  74.                         (store_trigger_param_1,":attacker_agent"),
  75.                         (agent_get_wielded_item,":agent_cur_weapon",":attacker_agent"),
  76.                         (item_get_weapon_length,":item_length",":agent_cur_weapon"),
  77.                         (position_move_y,pos1,":item_length"),
  78.                 (position_move_z,pos1,-7,1),
  79.                         (item_get_slot,":shoot_sound",":agent_cur_weapon",slot_item_shot_sound),
  80.                         (play_sound_at_position, ":shoot_sound", pos1),
  81.                         (particle_system_burst, "psys_rifle_smoke", pos1, 10),
  82.                         #(particle_system_burst, "psys_gun_fire", pos1, 10),

  83. ]),]],

  84. ["qbz", "Qbz97", [("qbz97",0)], itp_type_musket |itp_primary|itp_two_handed ,itcf_shoot_musket|itcf_reload_musket,
  85. 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,
  86. [(ti_on_init_item, [#(item_set_slot,"itm_test_rifle",slot_item_shot_sound,"snd_pistol_shot"),
  87.                      (item_set_slot,"itm_qbz",slot_item_pic_bit,-46),
  88.                      (item_set_slot,"itm_qbz",slot_item_shoot_freq,180),
  89.                      (item_set_slot,"itm_qbz",slot_item_start_time,120),
  90. ]),
  91.   (ti_on_weapon_attack,[
  92.                         (store_trigger_param_1,":attacker_agent"),
  93.                         (agent_get_wielded_item,":agent_cur_weapon",":attacker_agent"),
  94.                         (item_get_weapon_length,":item_length",":agent_cur_weapon"),
  95.                         (position_move_y,pos1,":item_length"),
  96.                 #(position_move_z,pos1,-7,1),
  97.                         (item_get_slot,":shoot_sound",":agent_cur_weapon",slot_item_shot_sound),
  98.                         (play_sound_at_position, ":shoot_sound", pos1),
  99.                         (particle_system_burst, "psys_rifle_smoke", pos1, 10),
  100.                         #(particle_system_burst, "psys_gun_fire", pos1, 10),

  101. ]),]],
复制代码





上面awp是狙击枪,new_pistol是左轮,explode_pistol是榴弹枪,test_rifle是加特林,qbz是自动步枪

modules_item.py


下面这个是榴弹枪子弹的代码,主要借鉴了这篇帖子http://bbs.mountblade.com.cn/thread-370335-1-1.html
  1. ["explode_bullet","BooM Bullet", [("cartridge_a",0)], itp_type_bullets|itp_merchandise|itp_can_penetrate_shield|itp_default_ammo, 0,
  2. 41,weight(3.5)|abundance(90)|weapon_length(3)|thrust_damage(5,pierce)|max_ammo(250),imodbits_missile,[(ti_on_missile_hit, [
  3. (particle_system_burst,"psys_explosion_flash",pos1,10),
  4. (particle_system_burst,"psys_fire_sparks_1",pos1,100),
  5. (particle_system_burst,"psys_explosion_smoke",pos1,50),
  6. (particle_system_burst,"psys_explosion_particles",pos1,10),
  7. (particle_system_burst,"psys_arrow_fire",pos1,10),
  8. (store_trigger_param_1,":var_0"),
  9. (agent_get_wielded_item,":agent_cur_weapon",":var_0"),
  10. (agent_get_party_id,":var_3",":var_0"),
  11. (try_for_agents,":var_1"),
  12.     (agent_get_position,pos2,":var_1"),
  13.     (get_distance_between_positions,":var_2",pos1,pos2),
  14.     (agent_get_party_id,":var_4",":var_1"),
  15.     (try_begin),
  16.         (neg|eq,":var_3",":var_4"),
  17.         (try_begin),
  18.             (le,":var_2",65),
  19.             (agent_deliver_damage_to_agent,":var_0",":var_1",70,":agent_cur_weapon"),
  20.         (else_try),
  21.             (le,":var_2",125),
  22.             (agent_deliver_damage_to_agent,":var_0",":var_1",54,":agent_cur_weapon"),
  23.         (else_try),
  24.             (le,":var_2",175),
  25.             (agent_deliver_damage_to_agent,":var_0",":var_1",32,":agent_cur_weapon"),
  26.         (try_end),
  27.         
  28.     (try_end),
  29. (try_end),
  30. ])]],
复制代码



particle_system.py 话说粒子效果我其实还不是很懂,都是看别人的然后改一改,有什么好的粒子效果的帖子可以推荐么
  1. ###New automatics begin
  2.     ("rifle_smoke", psf_billboard_3d, "prtcl_dust_a",
  3.         60, 0.5, 30, -0.2, 45.0, 1.5,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
  4.         (0.0, 0.75), (1, 0),       #alpha keys
  5.         (0.0, 0.7), (1, 0.4),      #red keys
  6.         (0.0, 0.7),(1, 0.4),       #green keys
  7.         (0.0, 0.7), (1, 0.4),      #blue keys
  8.         (0, 1.5),   (0.5, 5.0),   #scale keys
  9.         (0.1, 0.1, 0.05),           #emit box size
  10.         (0, 40, 0),                 #emit velocity
  11.         0.2                        #emit dir randomness
  12.        ),
  13.        ("bullet_hit_ground_smoke", psf_billboard_3d, "prtcl_dust_a",
  14.         300, 0.4, 20, 0.4, 60.0, 1.5,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
  15.         (0.0, 0.75), (1, 0),       #alpha keys
  16.         (0.0, 0.7), (1, 0.4),      #red keys
  17.         (0.0, 0.7),(1, 0.4),       #green keys
  18.         (0.0, 0.7), (1, 0.4),      #blue keys
  19.         (0, 1.5),   (0.5, 5.0),   #scale keys
  20.         (0.1, 0.1, 0.1),           #emit box size
  21.         (0, 0, 50),                 #emit velocity
  22.         0.2                        #emit dir randomness
  23.        ),
  24.    
  25.        ("gun_fire", psf_billboard_3d, "prt_mesh_fire_1",
  26.         300, 0.05, 30, 0, 10, 1,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
  27.         (0, 0.7), (1, 0.3),        #alpha keys
  28.         (0, 0.8), (0.5, 1),      #red keys
  29.         (0, 0.8),(0.5, 0.5),       #green keys
  30.         (0, 0.5), (0.5, 0.1),      #blue keys
  31.         (0, 0.2),   (0.1, 1),   #scale keys
  32.         (0.01, 0.01, 0.01),      #emit box size
  33.         (0, 10, 0),               #emit velocity
  34.         0                       #emit dir randomness
  35.         ),
  36.         ###New automatics end
  37. ("explosion_flash", psf_billboard_3d | psf_randomize_size , "prt_sparks_mesh_1",
  38.      3000, 0.8, 0.1, -0.00003, 50.0, 1.0,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
  39.    (0.1, 0.8), (1, 0),        #alpha keys
  40.      (0.5, 1.0), (1, 0.9),      #red keys
  41.      (0.5, 0.6), (1, 0.1),      #green keys
  42.      (0.5, 0.2), (1, 0.0),      #blue keys
  43.      (0.1, 7.1),   (1.0, 0.2),   #scale keys
  44.      (1, 1, 3.1),           #emit box size
  45.      (0.0, 0.0, 0.0),                 #emit velocity
  46.      0.05,                       #emit dir randomness
  47.      100.0,                       #rotation speed
  48.      0.5,                        #rotation damping
  49.     ),
  50.     ("explosion_smoke", psf_billboard_3d|psf_randomize_size,  "prtcl_dust_a",
  51.      800, 13, 15, -0.04, 10.0, 0.2,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
  52.      (0.1, 0.5), (1, 0),        #alpha keys
  53.      (0.1, 0.8), (1, 0.8),      #red keys
  54.      (0.1, 0.7),(1, 0.7),       #green keys
  55.      (0.1, 0.6), (1, 0.7),      #blue keys
  56.      (0.6, 13.2),   (1, 10.0),    #scale keys
  57.      (0.5, 0.5, 5.5),           #emit box size
  58.      (-1.2, 0, 0.05),               #emit velocity
  59.      0.8,                         #emit dir randomness
  60.      10,                        #rotation speed
  61.      0.1,                       #rotation damping
  62.     ),
  63. ("explosion_smoke2", psf_billboard_3d|psf_randomize_size,  "prtcl_dust_a",
  64.      1000, 11, 15, -0.04, 10.0, 0.2,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
  65.      (0.1, 0.5), (1, 0),        #alpha keys
  66.      (0.1, 0.8), (1, 0.8),      #red keys
  67.      (0.1, 0.7),(1, 0.7),       #green keys
  68.      (0.1, 0.6), (1, 0.7),      #blue keys
  69.      (10.0, 12.2),   (1, 10.0),    #scale keys
  70.      (1.7, 1.7, 1.4),           #emit box size
  71.      (-1.2, 0, 0.05),               #emit velocity
  72.      1.8,                         #emit dir randomness
  73.      10,                        #rotation speed
  74.      0.1,                       #rotation damping
  75.     ),
  76.    ("explosion_particles", psf_randomize_size | psf_randomize_rotation,  "prt_mesh_straw_1",
  77.      4000, 20, 2, 0.58, 10, 2,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
  78.      (0.1, 1), (1, 1),          #alpha keys
  79.      (0.1, 0.6), (1, 0.6),      #red keys
  80.      (0.1, 0.5),(1, 0.5),       #green keys
  81.      (0.1, 0.4), (1, 0.4),      #blue keys
  82.      (0.0, 0.3),   (1, 0.3),    #scale keys
  83.      (1.7, 1.7, 4.5),           #emit box size
  84.      (0, 0, 0),                 #emit velocity
  85.      2.3,                       #emit dir randomness
  86.      200,                       #rotation speed
  87.      0,                       #rotation damping
  88.     ),
复制代码



57

主题

953

回帖

543

积分

子爵[版主]

Rank: 7Rank: 7Rank: 7

UID
81513
第纳尔
5138
精华
1
互助
18
荣誉
5
贡献
100
魅力
123
注册时间
2008-6-26
QQ
鲜花(103) 鸡蛋(0)
发表于 2020-3-26 17:56:03 来自手机 | 显示全部楼层
挺好的 不过话说 有几把枪代码大同小异嘛 你可以再做做手雷或者散弹枪之类的 研究研究粒子系统还能做魔法

7

主题

24

回帖

14

积分

随仆

Rank: 1

UID
3146701
第纳尔
143
精华
0
互助
1
荣誉
0
贡献
0
魅力
20
注册时间
2020-3-14
鲜花(2) 鸡蛋(0)
 楼主| 发表于 2020-3-27 12:44:10 | 显示全部楼层
想做一个钢铁侠的mod,但是没找到开源的模型,不知道有没有人有

22

主题

789

回帖

383

积分

见习骑士

民间工匠

Rank: 3

UID
1115705
第纳尔
4018
精华
0
互助
24
荣誉
2
贡献
0
魅力
30
注册时间
2012-12-13
鲜花(233) 鸡蛋(10)
发表于 2020-4-7 23:30:07 | 显示全部楼层
很不错,就是相对有些乱,position_move_x(y、z)函数里的local和global的区别很简单
local的意思就是局部的,也就是根据你pos里的数据来决定基准位置,假设你用agent_get_position这个操作来获取pos,那么再用position_move_x(y、z),就是根据当前agent的位置挪动pos的位置
global就是全局的,只谈场景内的话,就是根据场景内的全局坐标来移动
如果在场景内打开编辑模式,随便选中一个场景物品,在场景编辑器就会显示当前场景道具的全局坐标和当前尺寸
粒子系统也不难,只是各个参数没有翻译过,实际上你把粒子系统当做可以实现简易动画的对象就行了

7

主题

24

回帖

14

积分

随仆

Rank: 1

UID
3146701
第纳尔
143
精华
0
互助
1
荣誉
0
贡献
0
魅力
20
注册时间
2020-3-14
鲜花(2) 鸡蛋(0)
 楼主| 发表于 2020-4-24 17:58:29 | 显示全部楼层
a1550887802 发表于 2020-4-7 23:30
很不错,就是相对有些乱,position_move_x(y、z)函数里的local和global的区别很简单
local的意思就是局部 ...

嗯嗯,谢谢

4

主题

15

回帖

6

积分

平民

Rank: 1

UID
3141854
第纳尔
128
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2020-2-28

霸主正版勋章

鲜花(0) 鸡蛋(0)
发表于 2020-5-3 19:43:39 | 显示全部楼层
楼主加油  感谢分享  期待有更好的作品

1

主题

6

回帖

2

积分

平民

Rank: 1

UID
3060514
第纳尔
62
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2019-3-2
鲜花(0) 鸡蛋(0)
发表于 2020-5-16 14:42:14 | 显示全部楼层
怎么把狙击枪导入领军者mod里啊,纯小白,只会改改魔球

7

主题

24

回帖

14

积分

随仆

Rank: 1

UID
3146701
第纳尔
143
精华
0
互助
1
荣誉
0
贡献
0
魅力
20
注册时间
2020-3-14
鲜花(2) 鸡蛋(0)
 楼主| 发表于 2020-5-17 20:34:30 | 显示全部楼层
多喝开水 发表于 2020-5-16 14:42
怎么把狙击枪导入领军者mod里啊,纯小白,只会改改魔球

额,这个的话可能要先得到领军者mod的module system源码比较好办,我看站里好像有个贴放出了好多mod的源码

7

主题

24

回帖

14

积分

随仆

Rank: 1

UID
3146701
第纳尔
143
精华
0
互助
1
荣誉
0
贡献
0
魅力
20
注册时间
2020-3-14
鲜花(2) 鸡蛋(0)
 楼主| 发表于 2020-5-17 20:40:26 | 显示全部楼层
如果你是想用在别的mod里,要先搞到这个mod的module system源码,然后自己再去照着我发的代码去改

1

主题

13

回帖

4

积分

平民

Rank: 1

UID
2831064
第纳尔
221
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2017-5-2

战团正版勋章维京征服正版勋章

鲜花(0) 鸡蛋(0)
发表于 2020-6-14 20:22:26 | 显示全部楼层
为什么无法连射

43

主题

1159

回帖

441

积分

骑士

Rank: 4Rank: 4

UID
3065189
第纳尔
685
精华
0
互助
16
荣誉
0
贡献
2
魅力
11
注册时间
2019-3-28

骑士美德之英勇勋章[杰出会员活跃勋章]

QQ
鲜花(108) 鸡蛋(0)
发表于 2020-6-15 22:49:03 来自手机 | 显示全部楼层
熊皮狂战士 发表于 2020-6-14 20:22
为什么无法连射

编译那些有没有错误,连发触发器放进了场景触发器里了没。例如野战攻城那些

0

主题

6

回帖

2

积分

平民

Rank: 1

UID
3200936
第纳尔
18
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2020-9-16
鲜花(0) 鸡蛋(0)
发表于 2020-9-17 06:49:11 | 显示全部楼层
有详细的   设置 连射步骤 吗  有些东西不知道在哪  

65

主题

2703

回帖

1060

积分

骑士

圣殿骑士团[KT]
联机ID:KT_Xiaoqi

Rank: 4Rank: 4

UID
2507135
第纳尔
11063
精华
0
互助
30
荣誉
8
贡献
0
魅力
164
注册时间
2015-4-29

骑砍中文站APP会员勋章骑砍中文百科会员勋章战团正版勋章拿破仑正版勋章汉匈决战正版勋章骑士美德之慷慨勋章骑士美德之英勇勋章[杰出会员活跃勋章]骑士美德之谦恭勋章[杰出会员财富勋章]元老骑士勋章

鲜花(522) 鸡蛋(30)
发表于 2020-9-17 12:43:15 来自手机 | 显示全部楼层
好帅,6666

71

主题

2222

回帖

743

积分

骑士

自由骑士
战团ID:乱神

Rank: 4Rank: 4

UID
1473552
第纳尔
8194
精华
0
互助
3
荣誉
4
贡献
0
魅力
86
注册时间
2013-8-5

骑士美德之忠诚勋章[杰出会员精华勋章]战团正版勋章骑士美德之英勇勋章[杰出会员活跃勋章]汉匈决战正版勋章元老骑士勋章

鲜花(156) 鸡蛋(10)
发表于 2021-10-7 22:56:50 | 显示全部楼层
牛逼,降维打击

1

主题

14

回帖

5

积分

平民

Rank: 1

UID
3195951
第纳尔
51
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2020-8-5
鲜花(0) 鸡蛋(0)
发表于 2022-2-1 10:31:44 | 显示全部楼层
大哥,加特林在自定义战斗里无法连发。。。

1

主题

4

回帖

7

积分

平民

Rank: 1

UID
3349993
第纳尔
60
精华
0
互助
1
荣誉
0
贡献
0
魅力
0
注册时间
2022-4-16
鲜花(0) 鸡蛋(0)
发表于 2022-5-2 09:33:42 | 显示全部楼层
这串代码只有在native才有效吗

0

主题

10

回帖

3

积分

平民

Rank: 1

UID
3388863
第纳尔
54
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2022-7-24
鲜花(0) 鸡蛋(0)
发表于 2022-8-30 19:43:03 | 显示全部楼层
66666666666666

0

主题

1

回帖

0

积分

平民

Rank: 1

UID
2724247
第纳尔
11
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2016-2-12
鲜花(0) 鸡蛋(0)
发表于 2023-4-25 17:15:12 | 显示全部楼层
大佬,这个MOD是下载好覆盖就可以了么?
您需要登录后才可以回帖 登录 | 注册(Register!)

本版积分规则

Archiver|手机版|小黑屋|骑马与砍杀中文站

GMT+8, 2024-4-25 22:49 , Processed in 0.172696 second(s), 46 queries , Gzip On, MemCached On.

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表