itm_horse_meat Horse_Meat Horse_Meat 1 raw_meat 0 34078731 0 12 0 40.000000 100 30 0 0 0 0 0 0 0 40 0 0
Exin said:
# script_dmod_cycle_forwards
# Output: New $dmod_current_agent
# Used to cycle forwards through valid agents
("dmod_cycle_forwards",[
(assign, ":agent_moved", 0),
(assign, ":first_agent", -1),
(get_player_agent_no, ":player_agent"),
(agent_get_team, ":player_team", ":player_agent"),
(try_for_agents, ":agent_no"),
(neq, ":agent_moved", 1),
(neq, ":agent_no", ":player_agent"),
(agent_is_human, ":agent_no"),
(agent_is_alive, ":agent_no"),
(agent_get_team, ":cur_team", ":agent_no"),
(eq, ":cur_team", ":player_team"),
# (agent_get_troop_id, ":agent_troop", ":agent_no"),
(try_begin),
(lt, ":first_agent", 0),
(assign, ":first_agent", ":agent_no"),
(try_end),
(gt, ":agent_no", "$dmod_current_agent"),
(assign, "$dmod_current_agent", ":agent_no"),
(assign, ":agent_moved", 1),
(try_end),
(try_begin),
(eq, ":agent_moved", 0),
(neq, ":first_agent", -1),
(assign, "$dmod_current_agent", ":first_agent"),
(assign, ":agent_moved", 1),
(else_try),
(eq, ":agent_moved", 0),
(eq, ":first_agent", -1),
(display_message, "@No Troops Left."),
(try_end),
(try_begin),
(eq, ":agent_moved", 1),
(str_store_agent_name, 1, "$dmod_current_agent"),
(display_message, "@Selected Troop: {s1}"),
(try_end),
(assign, "$dmod_move_camera", 1),
]),
# script_dmod_cycle_backwards
# Output: New $dmod_current_agent
# Used to cycle backwards through valid agents
("dmod_cycle_backwards",[
(assign, ":new_agent", -1),
(assign, ":last_agent", -1),
(get_player_agent_no, ":player_agent"),
(agent_get_team, ":player_team", ":player_agent"),
(try_for_agents, ":agent_no"),
(neq, ":agent_no", ":player_agent"),
(agent_is_human, ":agent_no"),
(agent_is_alive, ":agent_no"),
(agent_get_team, ":cur_team", ":agent_no"),
(eq, ":cur_team", ":player_team"),
# (agent_get_troop_id, ":agent_troop", ":agent_no"),
(assign, ":last_agent", ":agent_no"),
(lt, ":agent_no", "$dmod_current_agent"),
(assign, ":new_agent", ":agent_no"),
(try_end),
(try_begin),
(eq, ":new_agent", -1),
(neq, ":last_agent", -1),
(assign, ":new_agent", ":last_agent"),
(else_try),
(eq, ":new_agent", -1),
(eq, ":last_agent", -1),
(display_message, "@No Troops Left."),
(try_end),
(try_begin),
(neq, ":new_agent", -1),
(assign, "$dmod_current_agent", ":new_agent"),
(str_store_agent_name, 1, "$dmod_current_agent"),
(display_message, "@Selected Troop: {s1}"),
(try_end),
(assign, "$dmod_move_camera", 1),
]),
sw_deathcam_follow_troop = (0, 0, 0,[(eq, "$dmod_move_camera", 2),
(agent_get_position, 1, "$dmod_current_agent"),
(get_player_agent_no, ":player_agent"),
(agent_set_position, ":player_agent", 1)
],[])
sw_deathcam_valkyrie_move_camera = (0, 1, 2.1,[(eq, "$dmod_move_camera", 1),
(agent_get_position, 2, "$dmod_current_agent"),
(position_move_z, 2, 300),
(mission_cam_set_mode,1),
(mission_cam_set_position, 2),
(position_move_z, 2, 600),
(mission_cam_animate_to_position, 2, 1000),
],[
(mission_cam_set_mode, 0, 1000, 1),
(assign, "$dmod_move_camera", 2),
])
sw_deathcam_cycle_fowards = (0, 0, 0,[(key_clicked, key_m), (main_hero_fallen),
(call_script, "script_dmod_cycle_forwards"),
], [])
sw_deathcam_cycle_backwards = (0, 0, 0,[(key_clicked, key_n), (main_hero_fallen),
(call_script, "script_dmod_cycle_backwards"),
], [])
common_siege_check_defeat_condition = (
1, 4, ti_once,
[
(main_hero_fallen)
],
[
(assign, "$pin_player_fallen", 1),
(display_message, "@You have been knocked out by the enemy. Watch your men continue the fight without you or press Tab to retreat."),
(display_message, "@If you choose to watch the fight you can use the M and N keys to change your camera view."),
# (get_player_agent_no, ":player_agent"),
# (agent_get_team, ":agent_team", ":player_agent"),
# (try_begin),
# (neq, "$attacker_team", ":agent_team"),
# (neq, "$attacker_team_2", ":agent_team"),
# (str_store_string, s5, "str_siege_continues"),
# (call_script, "script_simulate_retreat", 8, 15),
# (else_try),
# (str_store_string, s5, "str_retreat"),
# (call_script, "script_simulate_retreat", 5, 20),
# (try_end),
# (assign, "$g_battle_result", -1),
# (set_mission_result,-1),
# (call_script, "script_count_mission_casualties_from_agents"),
# (finish_mission,0),
])
(0, 0, ti_once, [], [(assign,"$battle_won",0),
(assign,"$defender_reinforcement_stage",0),
(assign,"$attacker_reinforcement_stage",0),
(assign,"$g_presentation_battle_active", 0),
(call_script, "script_place_player_banner_near_inventory"),
(call_script, "script_combat_music_set_situation_with_culture"),
#SW Deathcam
(assign, "$dmod_current_agent", -1),
(assign, "$dmod_move_camera", -1),
]),
(1, 4, ti_once, [(main_hero_fallen)],
[
(assign, "$pin_player_fallen", 1),
(display_message, "@You have been knocked out by the enemy. Watch your men continue the fight without you or press Tab to retreat."),
(display_message, "@If you choose to watch the fight you can use the M and N keys to change your camera view."),
# (str_store_string, s5, "str_retreat"),
# (call_script, "script_simulate_retreat", 10, 20),
# (assign, "$g_battle_result", -1),
# (set_mission_result,-1),
# (call_script, "script_count_mission_casualties_from_agents"),
# (finish_mission,0)
]),
common_battle_tab_press = (
ti_tab_pressed, 0, 0, [],
[
(try_begin),
(eq, "$battle_won", 1),
(call_script, "script_count_mission_casualties_from_agents"),
(finish_mission,0),
(else_try),
(eq, "$pin_player_fallen", 1),
(call_script, "script_simulate_retreat", 5, 20),
(str_store_string, s5, "str_retreat"),
(call_script, "script_count_mission_casualties_from_agents"),
(set_mission_result, -1),
(finish_mission,0),
(else_try),
(call_script, "script_cf_check_enemies_nearby"),
(question_box,"str_do_you_want_to_retreat"),
(else_try),
(display_message,"str_can_not_retreat"),
(try_end),
])