- 好友
- 2
- 在线时间
- 0 小时
- 最后登录
- 2025-2-9
扈从
 
- UID
- 3133967
- 第纳尔
- 604
- 精华
- 0
- 互助
- 5
- 荣誉
- 0
- 贡献
- 0
- 魅力
- 23
- 注册时间
- 2020-2-5
 鲜花( 13)  鸡蛋( 0)
|
本帖最后由 wxj2057605650 于 2020-4-10 11:29 编辑
声明一下,以前做的那个村庄招兵功能漏洞太多
http://bbs.mountblade.com.cn/thread-2051722-1-1.html
首先,感谢一下模型区版主SIX大佬的战国器具模型:http://bbs.mountblade.com.cn/thread-535326-1-1.html
首先,感谢一下模型区版主SIX大佬的战国器具模型:http://bbs.mountblade.com.cn/thread-535326-1-1.html
首先,感谢一下模型区版主SIX大佬的战国器具模型:http://bbs.mountblade.com.cn/thread-535326-1-1.html
重要的事说三遍
现在说一下新做的这个功能,当玩家拥有募兵令时,可以在村庄进行强征士兵,然后15个该阵营的最低兵种加入玩家队伍,然后会进入与村民战斗场景,胜利后,你与该村关系降低,与该村领主关系也降低。。。。
募兵令可以在城镇和村庄的商店买到,也可以在战斗后得到
每个募兵令只可以强征一次兵
第一步
首先打开 module_game_menu.py,然后搜索
village_center
找到这一段,然后添加在 #村庄招兵 开始到 #村庄结束之间的部分- ("village_center",[(neg|party_slot_eq, "$current_town", slot_village_state, svs_looted),
- (neg|party_slot_eq, "$current_town", slot_village_state, svs_being_raided),
- (neg|party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1),]
- ,"Go to the village center.",
- [
- (try_begin),
- (call_script, "script_cf_enter_center_location_bandit_check"),
- (else_try),
- (party_get_slot, ":village_scene", "$current_town", slot_castle_exterior),
- (modify_visitors_at_site,":village_scene"),
- (reset_visitors),
- (party_get_slot, ":village_elder_troop", "$current_town",slot_town_elder),
- (set_visitor, 11, ":village_elder_troop"),
- (call_script, "script_init_town_walkers"),
- (try_begin),
- (check_quest_active, "qst_hunt_down_fugitive"),
- (neg|is_currently_night),
- (quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_target_center, "$current_town"),
- (neg|check_quest_succeeded, "qst_hunt_down_fugitive"),
- (neg|check_quest_failed, "qst_hunt_down_fugitive"),
- (set_visitor, 45, "trp_fugitive"),
- (try_end),
- (set_jump_mission,"mt_village_center"),
- (jump_to_scene,":village_scene"),
- (change_screen_mission),
- (try_end),
- ],"Door to the village center."),
-
-
-
-
- #村庄招兵开始
-
- ("cunzhuangzhengbing", [
- (party_get_slot,":wenhua","$g_encountered_party",slot_center_culture),#获取当前村庄的国家文化
- (faction_get_slot,reg51,":wenhua",slot_faction_tier_1_troop),#将该阵营文化第一级兵种存入reg51
- (str_store_troop_name,s30,reg51),#获取兵种名字
- (player_has_item,"itm_mubingling"),#判断玩家是否拥有募兵令
- (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),#获取部队空余位置
- (ge,":free_capacity",15)
- ],
- "qiangmaishibingshibing",
-
- [
- (party_add_members,"p_main_party",reg51,15),#reg51加入部队
- (party_slot_ge, "$current_town"),
- (call_script, "script_change_player_relation_with_center", "$g_encountered_party", -5),#调用降低村庄关系脚本
-
- (try_begin),
- (party_get_slot, ":town_lord", "$current_town", slot_town_lord),#获取当前村庄领主
- (gt, ":town_lord", 0),
- (call_script, "script_change_player_relation_with_troop", ":town_lord", -5),#调用降低领主关系脚本
- (try_end),
-
- (call_script, "script_calculate_battle_advantage"),#计算战斗优势脚本
- (set_battle_advantage, reg0),#战斗优势存入reg0
- (set_party_battle_mode),#进入战斗状态
- (assign, "$g_battle_result", 0),
- (assign, "$g_village_raid_evil", 1),
- (set_jump_mission,"mt_village_raid"),#设置跳转触发器
- (party_get_slot, ":scene_to_use", "$current_town", slot_castle_exterior),
- (jump_to_scene, ":scene_to_use"),
- (assign, "$g_next_menu", "mnu_village_start_attack"),
- (call_script, "script_diplomacy_party_attacks_neutral", "p_main_party", "$g_encountered_party"),#设置国家开战
- (call_script, "script_objectionable_action", tmt_humanitarian, "str_loot_village"),
- (jump_to_menu, "mnu_battle_debrief"),
- (change_screen_mission),#切换至开战界面
- (troop_remove_item,"trp_player","itm_mubingling"),#失去募兵令
- ],
- "Door to the village center."),
-
- #村庄招兵结束
-
复制代码
第二步
打开module_item.py
添加
- ["mubingling","Pottery", [("zhanguomingqi_m",0)], itp_merchandise|itp_type_goods|itp_always_loot, 0, 500,weight(10)|abundance(230),imodbits_none],#募兵令
复制代码
第三步
进行编译
第四步
把募兵令模型导入mod(SIX大佬做的)
先把模型包里的brf文件放在mod的Resource文件夹
然后把模型包的DDS文件放入mod的Texture文件夹
在mod的module.txt文件最下方添加
load_module_resource = zhanguomingqi
第五步
汉化
打开mod的languages,然后打开cns
用记事本打开game_menus
搜索 mno_village_buy_food|向 村 民 购 买 给 养 。
然后在这个下面添加 mno_cunzhuangzhengbing|强 征 士 兵 。
然后保存
再用记事本打开item_kinds
在最下面
itm_items_end|Items End
itm_items_end_pl|Items End
的上方添加
itm_mubingling|募 兵 令
itm_mubingling_pl|募 兵 令
保存
完成
|
评分
-
查看全部评分
鲜花鸡蛋乌木护手骑士团 在2020-4-18 13:05 送朵鲜花 并说:支持一下我非常同意你的观点,送朵鲜花鼓励一下
|