Нет. Скомпелировалос нормально. И в игре во всех фракциях присоединяются соответствующие люди.
Я вот тут попробовал заменить troop_join на add_companion_party и у меня после диалога ничего не происходит. Я один в отряде.
Ну что же, миссию я создал, но вот проблема, я не могу ни с кем поговорить и могу всех убивать. В прочем с местными жителями говорить не обязательно, потому что я решил отменить друзей. Но с главным другом поговорить надою. И почему-то их два в одной точке.
Вот коды.
(
"prepare_leaving_town",
[
(store_faction_of_party, ":faction_no", "$current_town"),
(faction_get_slot, ":tier_2_troop", ":faction_no", slot_faction_tier_3_troop),
(faction_get_slot, ":tier_3_troop", ":faction_no", slot_faction_tier_3_troop),
(faction_get_slot, ":tier_4_troop", ":faction_no", slot_faction_tier_4_troop),
(party_get_slot, ":town_scene", "$current_town", slot_town_center),
(modify_visitors_at_site, ":town_scene"),
(reset_visitors),
(set_visitor, 0, "trp_player"),
(try_begin),
#(eq, "$town_nighttime", 0),
(try_for_range, ":walker_no", 0, num_town_walkers),
(store_add, ":troop_slot", slot_center_walker_0_troop, ":walker_no"),
(party_get_slot, ":walker_troop_id", "$current_town", ":troop_slot"),
(gt, ":walker_troop_id", 0),
(store_add, ":entry_no", town_walker_entries_start, ":walker_no"),
(set_visitor, ":entry_no", ":walker_troop_id"),
(try_end),
(try_end),
#guards will be spawned at #25, #26 and #27
(set_visitors, 25, ":tier_2_troop", 1),
(set_visitors, 26, ":tier_3_troop", 1),
(set_visitors, 27, ":tier_4_troop", 1),
#(set_visitor, 3, ":bandit_troop"),
(store_faction_of_party, ":starting_town_faction", "$g_starting_town"),
(try_begin),
(eq, ":starting_town_faction", "fac_kingdom_1"),
(assign, ":troop_of_merchant", "trp_swadian_merchant"),
#(assign, ":troop_of_bandit", "trp_forest_bandit"),
(else_try),
(eq, ":starting_town_faction", "fac_kingdom_2"),
(assign, ":troop_of_merchant", "trp_vaegir_merchant"),
#(assign, ":troop_of_bandit", "trp_mountain_bandit"),
(else_try),
(eq, ":starting_town_faction", "fac_kingdom_3"),
(assign, ":troop_of_merchant", "trp_khergit_merchant"),
#(assign, ":troop_of_bandit", "trp_steppe_bandit"),
(else_try),
(eq, ":starting_town_faction", "fac_kingdom_4"),
(assign, ":troop_of_merchant", "trp_nord_merchant"),
#(assign, ":troop_of_bandit", "trp_sea_raider"),
(else_try),
(eq, ":starting_town_faction", "fac_kingdom_5"),
(assign, ":troop_of_merchant", "trp_rhodok_merchant"),
#(assign, ":troop_of_bandit", "trp_mountain_bandit"),
(else_try),
(eq, ":starting_town_faction", "fac_kingdom_6"),
(assign, ":troop_of_merchant", "trp_sarranid_merchant"),
#(assign, ":troop_of_bandit", "trp_desert_bandit"),
(try_end),
(str_store_troop_name, s10, ":troop_of_merchant"),
(set_visitor, 3, ":troop_of_merchant"),
(assign, "$talked_with_merchant", 0),
(set_jump_mission, "mt_leaving_town"),
(jump_to_scene, ":town_scene"),
(change_screen_mission),
]),
(
"leaving_town", mtf_battle_mode,charge,
"Leaving Town",
[
(0,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),
(1,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),
(2,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),
(3,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),
(4,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),
(5,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),
(6,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),
(7,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),
(8,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),
(9,mtef_visitor_source,af_override_horse,0,1,[]),
(10,mtef_visitor_source,af_override_horse,0,1,[]),
(11,mtef_visitor_source|mtef_team_1,af_override_horse,0,1,[]),
(12,mtef_visitor_source|mtef_team_1,af_override_horse,0,1,[]),
(13,mtef_visitor_source|mtef_team_1,af_override_horse,0,1,[]),
(14,mtef_visitor_source,af_override_horse,0,1,[]),
(15,mtef_visitor_source,af_override_horse,0,1,[]),
(16,mtef_visitor_source,af_override_horse,0,1,[]),
(17,mtef_visitor_source,af_override_horse,0,1,[]),
(18,mtef_visitor_source,af_override_horse,0,1,[]),
(19,mtef_visitor_source,af_override_horse,0,1,[]),
(20,mtef_visitor_source,af_override_horse,0,1,[]),
(21,mtef_visitor_source|mtef_team_1,af_override_horse,0,1,[]),
(22,mtef_visitor_source|mtef_team_1,af_override_horse,0,1,[]),
(23,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #guard
(24,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #guard
(25,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #guard
(26,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #guard
(27,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #guard
(28,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #guard
(29,mtef_visitor_source,af_override_horse,0,1,[]),
(30,mtef_visitor_source,af_override_horse,0,1,[]),
(31,mtef_visitor_source,af_override_horse,0,1,[]),
(32,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #town walker point
(33,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #town walker point
(34,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #town walker point
(35,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #town walker point
(36,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #town walker point
(37,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #town walker point
(38,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #town walker point
(39,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), #town walker point
(40,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), #in towns, can be used for guard reinforcements
(41,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), #in towns, can be used for guard reinforcements
(42,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), #in towns, can be used for guard reinforcements
(43,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), #in towns, can be used for guard reinforcements
(44,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),
(45,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),
(46,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),
(47,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),
],
[(ti_on_agent_spawn, 0, 0, [],
[
(store_trigger_param_1, ":agent_no"),
(call_script, "script_init_town_agent", ":agent_no"),
(try_begin),
(this_or_next|eq, "$talk_context", tc_escape),
(eq, "$talk_context", tc_prison_break),
(agent_get_troop_id, ":troop_no", ":agent_no"),
(troop_slot_eq, ":troop_no", slot_troop_will_join_prison_break, 1),
(agent_set_team, ":agent_no", 0),
(agent_ai_set_aggressiveness, ":agent_no", 5),
(troop_set_slot, ":troop_no", slot_troop_will_join_prison_break, 0),
(try_begin),
(troop_slot_eq, ":troop_no", slot_troop_mission_participation, mp_prison_break_stand_back),
(agent_get_position, pos1, ":agent_no"),
(agent_set_scripted_destination, ":agent_no", pos1),
(try_end),
(try_end),
]),
(ti_before_mission_start, 0, 0, [],
[
(assign, "$g_main_attacker_agent", 0),
]),
(1, 0, ti_once,
[],
[
(try_begin),
(eq, "$g_mt_mode", tcm_default),
(store_current_scene, ":cur_scene"),
(scene_set_slot, ":cur_scene", slot_scene_visited, 1),
(try_end),
(call_script, "script_init_town_walker_agents"),
(try_begin),
(eq, "$sneaked_into_town", 1),
(call_script, "script_music_set_situation_with_culture", mtf_sit_town_infiltrate),
(else_try),
(call_script, "script_music_set_situation_with_culture", mtf_sit_town),
(try_end),
]),
(ti_before_mission_start, 0, 0,
[],
[
(call_script, "script_change_banners_and_chest")
]),
(ti_inventory_key_pressed, 0, 0,
[
(try_begin),
(eq, "$g_mt_mode", tcm_default),
(set_trigger_result,1),
(else_try),
(eq, "$g_mt_mode", tcm_disguised),
(display_message,"str_cant_use_inventory_disguised"),
(else_try),
(display_message, "str_cant_use_inventory_now"),
(try_end),
],
[]),
(ti_tab_pressed, 0, 0,
[
(try_begin),
(this_or_next|eq, "$talk_context", tc_escape),
(eq, "$talk_context", tc_prison_break),
(display_message, "str_cannot_leave_now"),
(else_try),
(this_or_next|eq, "$g_mt_mode", tcm_default),
(eq, "$g_mt_mode", tcm_disguised),
(mission_enable_talk),
(set_trigger_result,1),
(else_try),
(display_message, "str_cannot_leave_now"),
(try_end),
],
[]),
(ti_on_leave_area, 0, 0,
[
(try_begin),
(eq, "$g_defending_against_siege", 0),
(assign,"$g_leave_town",1),
(try_end),
],
[
(try_begin),
(eq, "$talk_context", tc_escape),
(call_script, "script_deduct_casualties_from_garrison"),
(jump_to_menu,"mnu_sneak_into_town_caught_dispersed_guards"),
(try_end),
(mission_enable_talk),
]),
(0, 0, ti_once,
[],
[
(party_slot_eq, "$current_town", slot_party_type, spt_town),
(call_script, "script_town_init_doors", 0),
(try_begin),
(eq, "$town_nighttime", 0),
(play_sound, "snd_town_ambiance", sf_looping),
(try_end),
]),
(3, 0, 0,
[
(call_script, "script_tick_town_walkers")
],
[]),
(2, 0, 0,
[
(call_script, "script_center_ambiance_sounds")
],
[]),
#JAILBREAK TRIGGERS
#Civilians get out of the way
(1, 0, 0,
[
(this_or_next|eq, "$talk_context", tc_prison_break),
(eq, "$talk_context", tc_escape),
],
[
#(agent_get_team, ":prisoner_agent", 0),
(call_script, "script_neutral_behavior_in_fight"),
(mission_disable_talk),
]),
#The game begins with the town alerted
(1, 0, ti_once,
[
#If I set this to 1, 0, ti_once, then the prisoner spawns twice
(eq, "$talk_context", tc_escape),
],
[
(get_player_agent_no, ":player_agent"),
(assign, reg6, ":player_agent"),
(call_script, "script_activate_town_guard"),
(get_player_agent_no, ":player_agent"),
(agent_get_position, pos4, ":player_agent"),
(try_for_range, ":prisoner", active_npcs_begin, kingdom_ladies_end),
(troop_slot_ge, ":prisoner", slot_troop_mission_participation, mp_prison_break_fight),
(str_store_troop_name, s4, ":prisoner"),
(display_message, "str_s4_joins_prison_break"),
(store_current_scene, ":cur_scene"), #this might be a better option?
(modify_visitors_at_site, ":cur_scene"),
#<entry_no>,<troop_id>,<number_of_troops>, <team_no>, <group_no>),
#team no and group no are used in multiplayer mode only. default team in entry is used in single player mode
(store_current_scene, ":cur_scene"),
(modify_visitors_at_site, ":cur_scene"),
(add_visitors_to_current_scene, 24, ":prisoner", 1, 0, 0),
(troop_set_slot, ":prisoner", slot_troop_will_join_prison_break, 1),
(try_end),
]),
(3, 0, 0,
[
(main_hero_fallen, 0),
],
[
(try_begin),
(this_or_next|eq, "$talk_context", tc_prison_break),
(eq, "$talk_context", tc_escape),
(call_script, "script_deduct_casualties_from_garrison"),
(jump_to_menu,"mnu_captivity_start_castle_defeat"),
(assign, ":end_cond", kingdom_ladies_end),
(try_for_range, ":prisoner", active_npcs_begin, ":end_cond"),
(troop_set_slot, ":prisoner", slot_troop_mission_participation, 0), #new
(try_end),
(mission_enable_talk),
(finish_mission, 0),
(else_try),
(set_trigger_result,1),
(try_end),
]),
(3, 0, 0,
[
(eq, "$talk_context", tc_escape),
(neg|main_hero_fallen,0),
(store_mission_timer_a, ":time"),
(ge, ":time", 10),
(all_enemies_defeated), #1 is default enemy team for in-town battles
],
[
(call_script, "script_deduct_casualties_from_garrison"),
(try_for_agents, ":agent"),
(agent_get_troop_id, ":troop", ":agent"),
(troop_slot_ge, ":troop", slot_troop_mission_participation, mp_prison_break_fight),
(try_begin),
(agent_is_alive, ":agent"),
(troop_set_slot, ":troop", slot_troop_mission_participation, mp_prison_break_escaped),
(else_try),
(troop_set_slot, ":troop", slot_troop_mission_participation, mp_prison_break_caught),
(try_end),
(try_end),
(jump_to_menu,"mnu_sneak_into_town_caught_ran_away"),
(mission_enable_talk),
(finish_mission,0)
]),
(ti_on_agent_killed_or_wounded, 0, 0, [],
[
(store_trigger_param_1, ":dead_agent_no"),
(store_trigger_param_2, ":killer_agent_no"),
#(store_trigger_param_3, ":is_wounded"),
(agent_get_troop_id, ":dead_agent_troop_no", ":dead_agent_no"),
(agent_get_troop_id, ":killer_agent_troop_no", ":killer_agent_no"),
(try_begin),
(this_or_next|eq, ":dead_agent_troop_no", "trp_swadian_prison_guard"),
(this_or_next|eq, ":dead_agent_troop_no", "trp_vaegir_prison_guard"),
(this_or_next|eq, ":dead_agent_troop_no", "trp_khergit_prison_guard"),
(this_or_next|eq, ":dead_agent_troop_no", "trp_nord_prison_guard"),
(this_or_next|eq, ":dead_agent_troop_no", "trp_rhodok_prison_guard"),
(eq, ":dead_agent_troop_no", "trp_sarranid_prison_guard"),
(eq, ":killer_agent_troop_no", "trp_player"),
(display_message, "@You got keys of dungeon."),
(try_end),
]),
(0, 0, ti_once,
[
(neg|main_hero_fallen),
(num_active_teams_le, 1),
],
[
(store_faction_of_party, ":starting_town_faction", "$g_starting_town"),
(try_begin),
(eq, ":starting_town_faction", "fac_kingdom_1"),
(assign, ":troop_of_merchant", "trp_swadian_merchant"),
(else_try),
(eq, ":starting_town_faction", "fac_kingdom_2"),
(assign, ":troop_of_merchant", "trp_vaegir_merchant"),
(else_try),
(eq, ":starting_town_faction", "fac_kingdom_3"),
(assign, ":troop_of_merchant", "trp_khergit_merchant"),
(else_try),
(eq, ":starting_town_faction", "fac_kingdom_4"),
(assign, ":troop_of_merchant", "trp_nord_merchant"),
(else_try),
(eq, ":starting_town_faction", "fac_kingdom_5"),
(assign, ":troop_of_merchant", "trp_rhodok_merchant"),
(else_try),
(eq, ":starting_town_faction", "fac_kingdom_6"),
(assign, ":troop_of_merchant", "trp_sarranid_merchant"),
(try_end),
(add_visitors_to_current_scene, 3, ":troop_of_merchant", 1, 0),
]),
]),