本帖最后由 奥杜因阿卡托什 于 2024-1-31 10:14 编辑
mission template上能显示prsnt,这个是人尽皆知的功能。很早以前我就考虑过要不要把mt和prsnt结合起来做一个界面,不过之前一直没有很好的效果,就没放出来。最近有了点起色,效果如附图。
动态界面的好处是,第一,只需比一般prsnt多不了多少的功夫就能得到动态的效果,显得很牛。第二,可以实时换装、展示动作、粒子效果。第三、有些在静态兵种树上发现不了的问题,这里一眼就能看出来。我这两天就发现了至少四处模型凹凸和specular的问题。
我这个界面目前的使用方式是:在左侧选择兵种,点击即可切换显示。上面三个按钮可以调整范围。右侧的兵种描述是写在troop的复数那里的。如果有什么XXX_end,XXX_temp_array之类不希望出现的兵种,加上tf_hero的词条屏蔽掉即可。另外还需注意的是,这个界面本质上是mission template,所以需要从menu进入。推荐入口放在扎营里。
代码如下:
menus里的入口(一个选项):
- ("enemy_set",[],
- "enemy_set.",[
- (modify_visitors_at_site, "scn_character_window_dungon"),
- (reset_visitors),
- (set_visitor, 2, "trp_farmer"),
- (assign, "$troop_show_2", "trp_farmer"),
- (set_visitor, 4, "trp_player"),
- (set_jump_mission,"mt_troop_window"),
- (jump_to_scene,"scn_character_window_dungon"),
- (change_screen_mission),]),
复制代码 prnst:
- ("troop_window", 0, 0,[
- (ti_on_presentation_load,
- [(set_fixed_point_multiplier, 1000),
- (assign, "$troop_faction_choose", -1),#所属阵营选择
- (assign, "$troop_grade_choose", -1),#等级选择
- (assign, "$troop_class_choose", -1),#兵种选择
- (try_for_range, ":count_no", 0, 1000),
- (troop_set_slot, "trp_temp_array_a", ":count_no", -1),#清理数列信息
- (try_end),
- (create_button_overlay, "$g_presentation_obj_1", "@Back", tf_center_justify),
- (position_set_x, pos1, 840),
- (position_set_y, pos1, 30),
- (overlay_set_position, "$g_presentation_obj_1", pos1),
- (overlay_set_color, "$g_presentation_obj_1", 0xFFFFFF),
- (create_mesh_overlay, reg1, "mesh_black_panel"),
- (position_set_x, pos1, 25),
- (position_set_y, pos1, 80),
- (overlay_set_position, reg1, pos1),
- (position_set_x, pos1, 200),
- (position_set_y, pos1, 700),
- (overlay_set_size, reg1, pos1),
- (overlay_set_additional_render_height, reg1, -2),
- (create_text_overlay, "$g_presentation_container_1", "@ ", tf_scrollable),
- (position_set_x, pos1, 20),
- (position_set_y, pos1, 90),
- (overlay_set_position, "$g_presentation_container_1", pos1),
- (position_set_x, pos1, 180),
- (position_set_y, pos1, 400),
- (overlay_set_area_size, "$g_presentation_container_1", pos1),
- (set_container_overlay, "$g_presentation_container_1"),
- (assign, ":cur_y", 5),
- (try_for_range, ":troop_no", "trp_farmer", "trp_knight_master_1_1"),
- (neg|troop_is_hero, ":troop_no"),
- (val_add, ":cur_y", 20),
- (try_end),
- (try_for_range, ":troop_no", "trp_farmer", "trp_knight_master_1_1"),
- (neg|troop_is_hero, ":troop_no"),
- (str_store_troop_name, s1, ":troop_no"),
- (create_button_overlay, reg1 , s1),
- (val_sub, ":cur_y", 20),
- (position_set_x, pos1, 10),
- (position_set_y, pos1, ":cur_y"),
- (overlay_set_position, reg1, pos1),
- (position_set_x, pos1, 800),
- (position_set_y, pos1, 800),
- (overlay_set_size, reg1, pos1),
- (overlay_set_color, reg1, 0xFFFFFF),
- (troop_set_slot, "trp_temp_array_a", reg1, ":troop_no"),#store troop id
- (try_end),
- (set_container_overlay, -1),
- (str_store_string, s1, "@total"),
- (str_store_string, s2, "@troop_faction_choose"),
- (create_button_overlay, "$g_presentation_obj_2" , "@{s2}:_{s1}"),#阵营选择
- (position_set_x, pos1, 27),
- (position_set_y, pos1, 560),
- (overlay_set_position,"$g_presentation_obj_2", pos1),
- (position_set_x, pos1, 700),
- (position_set_y, pos1, 700),
- (overlay_set_size, "$g_presentation_obj_2", pos1),
- (overlay_set_color, "$g_presentation_obj_2", 0xFFFFFF),
- (str_store_string, s1, "@total"),
- (str_store_string, s2, "@troop_grade_choose"),
- (create_button_overlay, "$g_presentation_obj_3" , "@{s2}:_{s1}"),#等级选择
- (position_set_x, pos1, 27),
- (position_set_y, pos1, 535),
- (overlay_set_position,"$g_presentation_obj_3", pos1),
- (position_set_x, pos1, 700),
- (position_set_y, pos1, 700),
- (overlay_set_size, "$g_presentation_obj_3", pos1),
- (overlay_set_color, "$g_presentation_obj_3", 0xFFFFFF),
- (str_store_string, s1, "@total"),
- (str_store_string, s2, "@troop_class_choose"),
- (create_button_overlay, "$g_presentation_obj_4" , "@{s2}:_{s1}"),#兵种选择
- (position_set_x, pos1, 27),
- (position_set_y, pos1, 510),
- (overlay_set_position,"$g_presentation_obj_4", pos1),
- (position_set_x, pos1, 700),
- (position_set_y, pos1, 700),
- (overlay_set_size, "$g_presentation_obj_4", pos1),
- (overlay_set_color, "$g_presentation_obj_4", 0xFFFFFF),
- (create_mesh_overlay, reg1, "mesh_white_plane"),
- (position_set_x, pos1, 25),
- (position_set_y, pos1, 500),
- (overlay_set_position, reg1, pos1),
- (position_set_x, pos1, 9000),
- (position_set_y, pos1, 50),
- (overlay_set_size, reg1, pos1),
- #——————————————————————————————————右侧信息框——————————————————————————————————
- (create_text_overlay, "$g_presentation_text_1", "@_", tf_center_justify),#名字
- (position_set_x, pos1, 500),
- (position_set_y, pos1, 30),
- (overlay_set_position, "$g_presentation_text_1", pos1),
- (overlay_set_color, "$g_presentation_text_1", 0xFFFFFF),
- (create_text_overlay, "$g_presentation_text_2", "@_", tf_scrollable),#介绍
- (position_set_x, pos1, 630),
- (position_set_y, pos1, 600),
- (overlay_set_position, "$g_presentation_text_2", pos1),
- (position_set_x, pos1, 700),
- (position_set_y, pos1, 700),
- (overlay_set_size, "$g_presentation_text_2", pos1),
- (position_set_x, pos1, 320),
- (position_set_y, pos1, 115),
- (overlay_set_area_size, "$g_presentation_text_2", pos1),
- (overlay_set_color, "$g_presentation_text_2", 0xFFFFFF),
- (create_mesh_overlay, "$g_presentation_mesh_1", "mesh_white_plane"),
- (position_set_x, pos1, 630),
- (position_set_y, pos1, 590),
- (overlay_set_position, "$g_presentation_mesh_1", pos1),
- (position_set_x, pos1, 16000),
- (position_set_y, pos1, 50),
- (overlay_set_size, "$g_presentation_mesh_1", pos1),
- (assign, ":cur_x", 625),
- (try_for_range, ":count", 0, 4),
- (store_add, ":string_no", ":count", "str_strength"),
- (str_store_string, s1, ":string_no"),
- (store_add, ":attribute_no", ":count", ca_strength),
- (store_attribute_level, ":attribute_level", "$troop_show_2", ":attribute_no"),
- (assign, reg2, ":attribute_level"),
- (create_text_overlay, reg1, "@{s1}_{reg2}"),
- (position_set_x, pos1, ":cur_x"),
- (position_set_y, pos1, 560),
- (overlay_set_position, reg1, pos1),
- (position_set_x, pos1, 800),
- (position_set_y, pos1, 800),
- (overlay_set_size, reg1, pos1),
- (overlay_set_color, reg1, 0xFFFFFF),
- (val_add, ":cur_x", 70),
- (try_end),
- (try_for_range, ":count", 0, 7),
- (store_add, ":string_no", ":count", "str_wpt_one_handed"),
- (str_store_string, s1, ":string_no"),
- (store_add, ":weapon_no", wpt_one_handed_weapon, ":count"),
- (store_proficiency_level, ":weapon_level", "$troop_show_2", ":weapon_no"),
- (assign, reg2, ":weapon_level"),
- (create_button_overlay, reg1, "@{s1}_{reg2}"),
- (position_set_x, pos1, 625),
- (store_mul, ":high", ":count", -20),
- (val_add, ":high", 530),
- (position_set_y, pos1, ":high"),
- (overlay_set_position, reg1, pos1),
- (position_set_x, pos1, 800),
- (position_set_y, pos1, 800),
- (overlay_set_size, reg1, pos1),
- (overlay_set_color, reg1, 0xFFFFFF),
- (try_end),
- (try_for_range, ":count", 0, 42),
- (store_add, ":string_no", ":count", "str_reserved_18"),
- (str_store_string, s1, ":string_no"),
- (store_sub, ":skill_no", skl_reserved_18, ":count"),
- (store_skill_level, ":skill_level", ":skill_no", "$troop_show_2"),
- (assign, reg2, ":skill_level"),
- (create_button_overlay, reg1, "@{s1}_{reg2}"),
- (position_set_x, pos1, 765),
- (store_mul, ":high", ":count", -20),
- (val_add, ":high", 530),
- (position_set_y, pos1, ":high"),
- (overlay_set_position, reg1, pos1),
- (position_set_x, pos1, 800),
- (position_set_y, pos1, 800),
- (overlay_set_size, reg1, pos1),
- (overlay_set_color, reg1, 0xFFFFFF),
- (try_end),
- (create_text_overlay, "$g_presentation_text_3", "@_", tf_right_align),#阵营
- (position_set_x, pos1, 970),
- (position_set_y, pos1, 720),
- (overlay_set_position, "$g_presentation_text_3", pos1),
- (position_set_x, pos1, 900),
- (position_set_y, pos1, 900),
- (overlay_set_size, "$g_presentation_text_3", pos1),
- (overlay_set_color, "$g_presentation_text_3", 0xFFFFFF),
- (create_text_overlay, "$g_presentation_text_4", "@_", tf_left_align),#等级
- (position_set_x, pos1, 630),
- (position_set_y, pos1, 720),
- (overlay_set_position, "$g_presentation_text_4", pos1),
- (position_set_x, pos1, 900),
- (position_set_y, pos1, 900),
- (overlay_set_size, "$g_presentation_text_4", pos1),
- (overlay_set_color, "$g_presentation_text_4", 0xFFFFFF),
- (call_script, "script_troop_attribute_refresh", "$troop_show_2"),#刷新数据
- (create_mesh_overlay, reg1, "mesh_black_panel"),
- (position_set_x, pos1, 625),
- (position_set_y, pos1, 80),
- (overlay_set_position, reg1, pos1),
- (position_set_x, pos1, 350),
- (position_set_y, pos1, 853),
- (overlay_set_size, reg1, pos1),
- (overlay_set_additional_render_height, reg1, -2),
- (create_mesh_overlay, "$g_presentation_mesh_2", "mesh_white_plane"),
- (position_set_x, pos1, 630),
- (position_set_y, pos1, 400),
- (overlay_set_position, "$g_presentation_mesh_2", pos1),
- (position_set_x, pos1, 16000),
- (position_set_y, pos1, 50),
- (overlay_set_size, "$g_presentation_mesh_2", pos1),
- ####### mouse fix pos system #######
- (call_script, "script_mouse_fix_pos_load"),
- ####### mouse fix pos system #######
- (presentation_set_duration, 999999),
- ]),
- (ti_on_presentation_run,
- [
- ####### mouse fix pos system #######
- (call_script, "script_mouse_fix_pos_run"),
- ####### mouse fix pos system #######
- ]),
- (ti_on_presentation_event_state_change,
- [(store_trigger_param_1, ":object"),
- (try_begin),
- (eq, ":object", "$g_presentation_obj_1"),
- (presentation_set_duration, 0),
- (show_object_details_overlay, 1),
- (finish_mission, 0),
- (else_try),
- (is_between, ":object", "$g_presentation_obj_1", "$g_presentation_obj_2"),#选择兵种
- (troop_get_slot, ":troop_no", "trp_temp_array_a", ":object"),
- (call_script, "script_troop_attribute_refresh", ":troop_no"),#刷新数据
- (assign, "$troop_show_2", ":troop_no"),#用于记录当前troop
- (assign, "$troop_show", ":troop_no"),#用于刷新agent
- (else_try),
- (eq, ":object", "$g_presentation_obj_2"),#阵营筛选
- (try_begin),
- (eq, "$troop_faction_choose", -1),
- (assign, "$troop_faction_choose", "fac_commoners"),
- (str_store_faction_name, s1, "$troop_faction_choose"),
- (else_try),
- (is_between, "$troop_faction_choose", "fac_commoners", "fac_faction_end"),
- (val_add, "$troop_faction_choose", 1),
- (str_store_faction_name, s1, "$troop_faction_choose"),
- (else_try),
- (eq, "$troop_faction_choose", "fac_faction_end"),
- (assign, "$troop_faction_choose", -1),
- (str_store_string, s1, "@total"),
- (try_end),
- (str_store_string, s2, "@troop_faction_choose"),
- (overlay_set_text, "$g_presentation_obj_2", "@{s2}:_{s1}"),
- (call_script, "script_troop_retrieve_refresh"),
- (else_try),
- (eq, ":object", "$g_presentation_obj_3"),#等级筛选
- (try_begin),
- (ge, "$troop_grade_choose", 6),
- (assign, "$troop_grade_choose", -1),
- (str_store_string, s1, "@total"),
- (else_try),
- (val_add, "$troop_grade_choose", 1),
- (store_add, ":string_no", "$troop_grade_choose", "str_grade_blackiron"),
- (str_store_string, s1, ":string_no"),
- (try_end),
- (str_store_string, s2, "@troop_grade_choose"),
- (overlay_set_text, "$g_presentation_obj_3", "@{s2}:_{s1}"),
- (call_script, "script_troop_retrieve_refresh"),
- (else_try),
- (eq, ":object", "$g_presentation_obj_4"),#兵种筛选
- (try_begin),
- (ge, "$troop_class_choose", 3),
- (assign, "$troop_class_choose", -1),
- (str_store_string, s1, "@total"),
- (else_try),
- (val_add, "$troop_class_choose", 1),
- (store_add, ":string_no", "$troop_class_choose", "str_class_infantry"),
- (str_store_string, s1, ":string_no"),
- (try_end),
- (str_store_string, s2, "@troop_class_choose"),
- (overlay_set_text, "$g_presentation_obj_4", "@{s2}:_{s1}"),
- (call_script, "script_troop_retrieve_refresh"),
- (try_end),
- ]),
- ]),
复制代码 用到的脚本:
- #用于troop场景图鉴的属性刷新
- #输入显示的troop($troop_show_2)
- ("troop_attribute_refresh", [
- (store_script_param, ":troop_no", 1),
- (str_store_troop_name, s1, ":troop_no"),
- (overlay_set_text, "$g_presentation_text_1", s1),#名字
- (str_store_troop_name_plural, s1, ":troop_no"),
- (overlay_set_text, "$g_presentation_text_2", "@{s1}^_"),#介绍
- (store_faction_of_troop, ":faction_no", ":troop_no"),
- (str_store_faction_name, s1, ":faction_no"),
- (overlay_set_text, "$g_presentation_text_3", s1),#阵营
- (store_character_level, reg2, ":troop_no"),
- (overlay_set_text, "$g_presentation_text_4", "@level:{reg2}"),#等级
- (assign, ":count_no_3", 0),
- (try_for_range, ":count_no", 0, 53),
- (lt, ":count_no", 4),
- (store_add, ":overlay_no", ":count_no", "$g_presentation_mesh_1"),
- (val_add, ":overlay_no", 1), #获取overlay序号
- (store_add, ":string_no", ":count_no", "str_strength"),
- (str_store_string, s1, ":string_no"), #获取文本
- (store_add, ":attribute_no", ":count_no", ca_strength),
- (store_attribute_level, ":attribute_level", ":troop_no", ":attribute_no"),#获取属性
- (assign, reg2, ":attribute_level"),
- (overlay_set_text, ":overlay_no", "@{s1}_{reg2}"),
- (else_try),
- (lt, ":count_no", 11),
- (store_add, ":overlay_no", ":count_no", "$g_presentation_mesh_1"),
- (val_add, ":overlay_no", 1), #获取overlay序号
- (store_sub, ":count_no_2", ":count_no", 4),
- (store_add, ":string_no", ":count_no_2", "str_wpt_one_handed"),
- (str_store_string, s1, ":string_no"), #获取文本
- (store_add, ":weapon_no", wpt_one_handed_weapon, ":count_no_2"),
- (store_proficiency_level, ":weapon_level", ":troop_no", ":weapon_no"),#获取熟练
- (assign, reg2, ":weapon_level"),
- (overlay_set_text, ":overlay_no", "@{s1}_{reg2}"),
- (else_try),
- (lt, ":count_no", 54),
- (store_add, ":overlay_no", ":count_no", "$g_presentation_mesh_1"),
- (val_add, ":overlay_no", 1), #获取overlay序号
- (store_sub, ":count_no_2", ":count_no", 11),
- (store_sub, ":skill_no", skl_reserved_18, ":count_no_2"),
- (store_skill_level, ":skill_level", ":skill_no", ":troop_no"),
- (try_begin),
- (gt, ":skill_level", 0),
- (assign, reg2, ":skill_level"),
- (store_add, ":string_no", ":count_no_2", "str_reserved_18"),
- (str_store_string, s1, ":string_no"),
- (overlay_set_text, ":overlay_no", "@{s1}_{reg2}"),
- (overlay_set_display, ":overlay_no", 1),
- (store_mod, ":count_no_4", ":count_no_3", 2),
- (store_div, ":count_no_5", ":count_no_3", 2),
- (try_begin),
- (eq, ":count_no_4", 0),
- (position_set_x, pos1, 765),
- (else_try),
- (position_set_x, pos1, 835),
- (try_end),
- (store_mul, ":high", ":count_no_5", -20),
- (val_add, ":high", 530),
- (position_set_y, pos1, ":high"),
- (overlay_set_position, ":overlay_no", pos1),
- (val_add, ":count_no_3", 1),
- (else_try),
- (overlay_set_display, ":overlay_no", 0),
- (try_end),
- (try_end),
- ]),
- #用于troop场景图鉴的检索刷新
- ("troop_retrieve_refresh", [
- (store_add, ":troop_begin", "$g_presentation_container_1", 1),
- (try_for_range, ":overlay_no", ":troop_begin", "$g_presentation_obj_2"),
- (overlay_set_display, ":overlay_no", 0),
- (position_set_x, pos1, 10),
- (position_set_y, pos1, 10),
- (overlay_set_position, ":overlay_no", pos1),#全部隐藏
- (try_end),
- (assign, ":cur_y", 5),
- (try_for_range, ":overlay_no", ":troop_begin", "$g_presentation_obj_2"),
- (troop_get_slot, ":troop_no", "trp_temp_array_a", ":overlay_no"),
- (store_troop_faction, ":faction_no", ":troop_no"),
- (this_or_next|eq, ":faction_no", "$troop_faction_choose"),
- (eq, "$troop_faction_choose", -1),#阵营
- (store_character_level, ":level_no", ":troop_no"),
- (val_div, ":level_no", 10),
- (this_or_next|eq, ":level_no", "$troop_grade_choose"),
- (eq, "$troop_grade_choose", -1),#等级
- (assign, ":continue_no", -1),
- (try_begin),
- (eq, "$troop_class_choose", -1),
- (assign, ":continue_no", 1),
- (else_try),
- (eq, "$troop_class_choose", 0),#步兵
- (neg|troop_is_guarantee_ranged, ":troop_no"),
- (neg|troop_is_guarantee_horse, ":troop_no"),
- (assign, ":continue_no", 1),
- (else_try),
- (eq, "$troop_class_choose", 1),#投射手
- (troop_is_guarantee_ranged, ":troop_no"),
- (neg|troop_is_guarantee_horse, ":troop_no"),
- (assign, ":continue_no", 1),
- (else_try),
- (eq, "$troop_class_choose", 2),#骑手
- (neg|troop_is_guarantee_ranged, ":troop_no"),
- (troop_is_guarantee_horse, ":troop_no"),
- (assign, ":continue_no", 1),
- (else_try),
- (eq, "$troop_class_choose", 3),#游骑
- (troop_is_guarantee_ranged, ":troop_no"),
- (troop_is_guarantee_horse, ":troop_no"),
- (assign, ":continue_no", 1),
- (try_end),
- (eq, ":continue_no", 1),
- (overlay_set_display, ":overlay_no", 1),
- (val_add, ":cur_y", 20),#统计高度
- (try_end),
- (try_for_range, ":overlay_no", ":troop_begin", "$g_presentation_obj_2"),
- (troop_get_slot, ":troop_no", "trp_temp_array_a", ":overlay_no"),
- (store_troop_faction, ":faction_no", ":troop_no"),
- (this_or_next|eq, ":faction_no", "$troop_faction_choose"),
- (eq, "$troop_faction_choose", -1),#阵营
- (store_character_level, ":level_no", ":troop_no"),
- (val_div, ":level_no", 10),
- (this_or_next|eq, ":level_no", "$troop_grade_choose"),
- (eq, "$troop_grade_choose", -1),#等级
- (assign, ":continue_no", -1),
- (try_begin),
- (eq, "$troop_class_choose", -1),
- (assign, ":continue_no", 1),
- (else_try),
- (eq, "$troop_class_choose", 0),#步兵
- (neg|troop_is_guarantee_ranged, ":troop_no"),
- (neg|troop_is_guarantee_horse, ":troop_no"),
- (assign, ":continue_no", 1),
- (else_try),
- (eq, "$troop_class_choose", 1),#投射手
- (troop_is_guarantee_ranged, ":troop_no"),
- (neg|troop_is_guarantee_horse, ":troop_no"),
- (assign, ":continue_no", 1),
- (else_try),
- (eq, "$troop_class_choose", 2),#骑手
- (neg|troop_is_guarantee_ranged, ":troop_no"),
- (troop_is_guarantee_horse, ":troop_no"),
- (assign, ":continue_no", 1),
- (else_try),
- (eq, "$troop_class_choose", 3),#游骑
- (troop_is_guarantee_ranged, ":troop_no"),
- (troop_is_guarantee_horse, ":troop_no"),
- (assign, ":continue_no", 1),
- (try_end),
- (eq, ":continue_no", 1),
- (val_sub, ":cur_y", 20),
- (position_set_x, pos1, 10),
- (position_set_y, pos1, ":cur_y"),
- (overlay_set_position, ":overlay_no", pos1),
- (try_end),
- ]),
- ##____________________________________________________film related___________________________________________________________________________
- #set a substitude for player in film mode. Output two weapon no in game variables.
- ("set_player_substitute", [
- (troop_get_type, ":return_value", "trp_player"),
- (troop_set_type, "trp_temp_substitute", ":return_value"),
- (str_store_troop_face_keys, s1, "trp_player"),
- (troop_set_face_keys, "trp_temp_substitute", s1),
- (troop_clear_inventory, "trp_temp_substitute"),
- (try_for_range, ":count_no", 2, 9),#ammo and armour
- (call_script, "script_player_get_new_inventory_slot", ":count_no"),
- (gt, reg0, 0),
- (troop_set_inventory_slot, "trp_temp_substitute", ":count_no", reg0),
- (try_end),
- (assign, ":end_cond", 13),
- (try_for_range, ":count_no", 10, ":end_cond"),#right hand
- (call_script, "script_player_get_new_inventory_slot", ":count_no"),
- (gt, reg0, 0),
- (troop_set_inventory_slot, "trp_temp_substitute", 0, reg0),
- (assign, ":end_cond", 10),
- (try_end),
- (assign, ":end_cond", 16),
- (try_for_range, ":count_no", 13, ":end_cond"),#left hand
- (call_script, "script_player_get_new_inventory_slot", ":count_no"),
- (gt, reg0, 0),
- (troop_set_inventory_slot, "trp_temp_substitute", 1, reg0),
- (assign, ":end_cond", 13),
- (try_end),
- ]),
复制代码 mission template:
- (
- "troop_window",0,-1,
- "character window background.",
- [
- (0, mtef_visitor_source, af_override_horse, 0, 1, []),
- (1, mtef_visitor_source, af_override_horse, 0, 1, []),
- (2, mtef_visitor_source, af_override_horse, 0, 1, []),
- (3, mtef_visitor_source, af_override_horse, 0, 1, []),
- (4, mtef_visitor_source, af_override_horse, 0, 1, []),
- ],
- [
- # common_battle_init_banner,
- (ti_before_mission_start, 0, 0, [],
- [
- # (show_object_details_overlay, 0),
- (assign, "$mission_show_horse", -1),
- (start_presentation, "prsnt_troop_window"),
- ]),
- (ti_on_agent_spawn, 0, 0, [],#人物
- [
- (store_trigger_param_1, ":agent_no"),
- (agent_set_no_dynamics, ":agent_no", 1),
- (agent_is_human, ":agent_no"),
- (agent_get_troop_id, ":troop_no", ":agent_no"),
- (neq, ":troop_no", "trp_player"),
- (assign, "$mission_show_agent", ":agent_no"),
- (assign, ":proficiency_count", 0),
- (try_for_range, ":count_no", 0, 4),
- (agent_get_item_slot, ":itm_no", ":agent_no", ":count_no"),
- (gt, ":itm_no", 0),
- (item_get_type, ":type_no",":itm_no"),
- (try_begin),
- (eq, ":type_no", itp_type_shield),
- (agent_set_wielded_item, ":agent_no", ":itm_no"),
- (else_try),
- (try_begin),
- (eq, ":type_no", itp_type_one_handed_wpn),
- (store_proficiency_level, ":proficiency_count_2", ":troop_no", wpt_one_handed_weapon),
- (else_try),
- (eq, ":type_no", itp_type_two_handed_wpn),
- (store_proficiency_level, ":proficiency_count_2", ":troop_no", wpt_two_handed_weapon),
- (else_try),
- (eq, ":type_no", itp_type_polearm),
- (store_proficiency_level, ":proficiency_count_2", ":troop_no", wpt_polearm),
- (else_try),
- (eq, ":type_no", itp_type_bow),
- (store_proficiency_level, ":proficiency_count_2", ":troop_no", wpt_archery),
- (else_try),
- (eq, ":type_no", itp_type_crossbow),
- (store_proficiency_level, ":proficiency_count_2", ":troop_no", wpt_crossbow),
- (else_try),
- (eq, ":type_no", itp_type_thrown),
- (store_proficiency_level, ":proficiency_count_2", ":troop_no", wpt_throwing),
- (else_try),
- (this_or_next|eq, ":type_no", itp_type_pistol),
- (eq, ":type_no", itp_type_musket),
- (store_proficiency_level, ":proficiency_count_2", ":troop_no", wpt_firearm),
- (try_end),
- (try_begin),
- (gt, ":proficiency_count_2", ":proficiency_count"),
- (agent_set_wielded_item, ":agent_no", ":itm_no"),
- (else_try),
- (assign, ":proficiency_count", ":proficiency_count_2"),
- (try_end),
- (try_end),
- (try_end),
- (try_begin),
- (this_or_next|troop_is_mounted, ":troop_no"),
- (this_or_next|troop_is_guarantee_horse, ":troop_no"),
- (troop_is_hero, ":troop_no"),
- (troop_get_inventory_capacity, ":inventory_capacity", ":troop_no"),
- (try_for_range, ":count_no", 0, ":inventory_capacity"),
- (troop_get_inventory_slot, ":item_no", ":troop_no", ":count_no"),
- (gt, ":item_no", 0),
- (item_get_type, ":item_type_no", ":item_no"),
- (eq, ":item_type_no", itp_type_horse),#坐骑
- (entry_point_get_position, pos1, 5),
- (set_spawn_position, pos1),
- (spawn_horse, ":item_no"),
- (assign, ":inventory_capacity", 0),#break
- (try_end),
- (try_end),
- ]),
- (ti_on_agent_spawn, 0, 0, [],#坐骑
- [
- (store_trigger_param_1, ":agent_no"),
- (agent_set_no_dynamics, ":agent_no", 1),
- (neg|agent_is_human, ":agent_no"),
- (assign, "$mission_show_horse", ":agent_no"),
- ]),
- (ti_after_mission_start, 0, 0, [], #cam
- [
- (assign, "$troop_show", -1),
- (entry_point_get_position, pos3, 3),
- (mission_cam_set_mode, 1),
- (mission_cam_set_position, pos3),
- ]),
- #pos3 is this mission's normal camera position
- (0,0,0,[(gt, "$troop_show", 0),],
- [
- (agent_set_visibility, "$mission_show_agent", 0),
- (agent_fade_out, "$mission_show_agent"),
- (try_begin),
- (ge, "$mission_show_horse", 0),
- (agent_set_visibility, "$mission_show_horse", 0),
- (agent_fade_out, "$mission_show_horse"),
- (assign, "$mission_show_horse", -1),
- (try_end),
- (add_visitors_to_current_scene, 2, "$troop_show", 1),
- (assign, "$troop_show", -1),
- ]),
- (ti_inventory_key_pressed, 0, 0,
- [
- (set_trigger_result, 0),
- ], []),
- (ti_tab_pressed, 0, 0,
- [],
- [
- (show_object_details_overlay, 1),
- (finish_mission),
- ]),
- ],
- ),
复制代码 最后还有几个string:
- ("total", "total"),
- ("grade_blackiron", "blackiron"),
- ("grade_barecopper", "barecopper"),
- ("grade_whitesilver", "whitesilver"),
- ("grade_gold", "gold"),
- ("grade_blackgold", "blackgold"),
- ("grade_redgold", "redgold"),
- ("grade_whitegold", "whitegold"),
- ("class_infantry", "infantry"),
- ("class_marksman", "marksman"),
- ("class_rider", "rider"),
- ("class_ranger", "ranger"),
复制代码 汉化之类的,那是小事,就自己去填吧。
最后,我这里还有许多兵种要填数值、要出装的,一个人实在搞不过来的。诚邀想做mod的人一起来琢磨,只会魔球都可以。群号344394142。
|