Skip to content

Commit

Permalink
Add destructible spikes to a number of siege scenes; fix MB compile p…
Browse files Browse the repository at this point in the history
…roblems with scene prop slots; compile previous commit
  • Loading branch information
In-Vain committed Sep 29, 2022
1 parent d4e2327 commit 80bd41f
Show file tree
Hide file tree
Showing 21 changed files with 2,725 additions and 2,635 deletions.
38 changes: 20 additions & 18 deletions ModuleSystem/ID/ID_scene_props_mb.py
Expand Up @@ -2001,21 +2001,23 @@
spr_mordor_clouds_2 = 2000
spr_mordor_clouds_3 = 2001
spr_gate_destructible_retreat = 2002
spr_elf_treehouse_b = 2003
spr_save_compartibility4 = 2004
spr_save_compartibility5 = 2005
spr_save_compartibility6 = 2006
spr_save_compartibility7 = 2007
spr_save_compartibility8 = 2008
spr_save_compartibility9 = 2009
spr_save_compartibility10 = 2010
spr_save_compartibility11 = 2011
spr_save_compartibility12 = 2012
spr_save_compartibility13 = 2013
spr_save_compartibility14 = 2014
spr_save_compartibility15 = 2015
spr_save_compartibility16 = 2016
spr_save_compartibility17 = 2017
spr_save_compartibility18 = 2018
spr_save_compartibility19 = 2019
spr_save_compartibility20 = 2020
spr_spike_group_a_destructible = 2003
spr_orc_stakes_destructible = 2004
spr_elf_treehouse_b = 2005
spr_save_compartibility4 = 2006
spr_save_compartibility5 = 2007
spr_save_compartibility6 = 2008
spr_save_compartibility7 = 2009
spr_save_compartibility8 = 2010
spr_save_compartibility9 = 2011
spr_save_compartibility10 = 2012
spr_save_compartibility11 = 2013
spr_save_compartibility12 = 2014
spr_save_compartibility13 = 2015
spr_save_compartibility14 = 2016
spr_save_compartibility15 = 2017
spr_save_compartibility16 = 2018
spr_save_compartibility17 = 2019
spr_save_compartibility18 = 2020
spr_save_compartibility19 = 2021
spr_save_compartibility20 = 2022
15 changes: 9 additions & 6 deletions ModuleSystem/module_mission_templates.py
Expand Up @@ -4277,6 +4277,7 @@
]),


] + (is_a_wb_mt==1 and [
#find and open retreat gates
(1, 0, ti_once, [],[
(scene_prop_get_num_instances,":max_gates","spr_gate_destructible_retreat"),
Expand All @@ -4288,8 +4289,7 @@
(prop_instance_get_starting_position, pos1, ":gate_no"),
(position_rotate_z, pos1, 85),
(prop_instance_animate_to_position, ":gate_no", pos1, 200), #animate in 2 second

] + (is_a_wb_mt==1 and [

#find dependent barriers, move them underground
(scene_prop_get_num_instances,":max_barriers","spr_ai_limiter_gate_breached"),
(try_begin), # barriers start
Expand All @@ -4304,11 +4304,12 @@
(prop_instance_set_position,":barrier_no",pos1),
(try_end), # barriers loop
(try_end), # barriers end
] or []) + [
(try_end), # gates loop
(try_end), # gates end
]),

] or []) + [

## WB Only - When a horse archer spawns, we set them to Archers, instead of Cavalry.

] + (is_a_wb_mt==1 and [
Expand Down Expand Up @@ -4577,6 +4578,8 @@
(team_give_order, "$defender_team_3", grc_everyone, mordr_charge),
(set_show_messages, 1),
#(display_message,"@Defenders: everyone CHARGE!!"),

] + (is_a_wb_mt==1 and [
#find and open retreat gates
(scene_prop_get_num_instances,":max_gates","spr_gate_destructible_retreat"),
(try_begin), #gates start
Expand All @@ -4587,8 +4590,7 @@
(scene_prop_set_slot, ":gate_no", scene_prop_open_or_close_slot, 1),
(prop_instance_get_starting_position, pos1, ":gate_no"),
(position_rotate_z, pos1, 85),
(prop_instance_animate_to_position, ":gate_no", pos1, 200), #animate in 2 second
] + (is_a_wb_mt==1 and [
(prop_instance_animate_to_position, ":gate_no", pos1, 200), #animate in 2 second
#find dependent barriers, move them underground
(scene_prop_get_num_instances,":max_barriers","spr_ai_limiter_gate_breached"),
(try_begin), # barriers start
Expand All @@ -4603,12 +4605,13 @@
(prop_instance_set_position,":barrier_no",pos1),
(try_end), # barriers loop
(try_end), # barriers end
] or []) + [
(try_end), # gates loop
(try_end), # gates end
] or []) + [
(try_end), #desparate charge end
]),


#update player team
] + (is_a_wb_mt==1 and [
(15, 0, 0,[],
Expand Down
130 changes: 105 additions & 25 deletions ModuleSystem/module_scene_props.py
Expand Up @@ -1640,12 +1640,12 @@
(set_spawn_position, pos1),
(spawn_agent,"trp_gate_aggravator"),
(assign, ":gate_aggravator", reg0),
(scene_prop_set_slot, ":instance_no", slot_gate_aggravator, ":gate_aggravator"),
(agent_set_speed_limit, ":gate_aggravator", 0),
(agent_set_team, ":gate_aggravator", 2),
] + (is_a_wb_sceneprop==1 and [ # make aggravator a statue (WB Only)
(agent_set_no_dynamics, ":gate_aggravator",1),
(agent_set_no_death_knock_down_only, ":gate_aggravator", 1),
(scene_prop_set_slot, ":instance_no", slot_gate_aggravator, ":gate_aggravator"),
] or []) + [
#(team_give_order, 7, grc_everyone, mordr_stand_ground),
]),
Expand All @@ -1661,24 +1661,27 @@
(play_sound, "snd_dummy_destroyed"),
(display_message,"@Gate is breached!"),
#(assign, ":gate_aggravator_found", 0),


] + (is_a_wb_sceneprop==1 and [
(scene_prop_get_slot, ":gate_aggravator", ":gate_no", slot_gate_aggravator),
(call_script, "script_remove_agent", ":gate_aggravator"),

# (try_for_agents, ":agent_no"), #find and remove gate aggravator agent
# (eq, ":gate_aggravator_found", 0),
# (gt, ":agent_no", 0),
# (agent_is_alive, ":agent_no"),
# (agent_get_troop_id, ":troop_id", ":agent_no"),
# (eq, ":troop_id", "trp_gate_aggravator"),
# (agent_get_position, pos2, ":agent_no"),
# (set_fixed_point_multiplier, 100),
# (get_distance_between_positions, ":distance", pos1, pos2),
# (le, ":distance", 200),
# #(display_message, "@gate_aggravator found"),
# (call_script, "script_remove_agent", ":agent_no"),
# (assign, ":gate_aggravator_found", 1),
# (try_end),
] or [
(assign, ":gate_aggravator_found", 0),
(try_for_agents, ":agent_no"), #find and remove gate aggravator agent
(eq, ":gate_aggravator_found", 0),
(gt, ":agent_no", 0),
(agent_is_alive, ":agent_no"),
(agent_get_troop_id, ":troop_id", ":agent_no"),
(eq, ":troop_id", "trp_gate_aggravator"),
(agent_get_position, pos2, ":agent_no"),
(set_fixed_point_multiplier, 100),
(get_distance_between_positions, ":distance", pos1, pos2),
(le, ":distance", 200),
#(display_message, "@gate_aggravator found"),
(call_script, "script_remove_agent", ":agent_no"),
(assign, ":gate_aggravator_found", 1),
(try_end),
]) + [

(scene_prop_get_num_instances,":max_barriers","spr_ai_limiter_gate_breached"), #move away all dependent barriers
(try_begin),
Expand Down Expand Up @@ -1729,12 +1732,12 @@
(set_spawn_position, pos1),
(spawn_agent,"trp_gate_aggravator"),
(assign, ":gate_aggravator", reg0),
(scene_prop_set_slot, ":gate_no", slot_gate_aggravator, ":gate_aggravator"),
(agent_set_speed_limit, ":gate_aggravator", 0),
(agent_set_team, ":gate_aggravator", 2),
] + (is_a_wb_sceneprop==1 and [ # make aggravator a statue (WB Only)
(agent_set_no_dynamics, ":gate_aggravator",1),
(agent_set_no_death_knock_down_only, ":gate_aggravator", 1),
(scene_prop_set_slot, ":gate_no", slot_gate_aggravator, ":gate_aggravator"),
] or []) + [
#(team_give_order, 7, grc_everyone, mordr_stand_ground),
]),
Expand All @@ -1750,8 +1753,26 @@
(play_sound, "snd_dummy_destroyed"),
(display_message,"@Gate is breached!"),

] + (is_a_wb_sceneprop==1 and [
(scene_prop_get_slot, ":gate_aggravator", ":gate_no", slot_gate_aggravator),
(call_script, "script_remove_agent", ":gate_aggravator"),
] or [
(assign, ":gate_aggravator_found", 0),
(try_for_agents, ":agent_no"), #find and remove gate aggravator agent
(eq, ":gate_aggravator_found", 0),
(gt, ":agent_no", 0),
(agent_is_alive, ":agent_no"),
(agent_get_troop_id, ":troop_id", ":agent_no"),
(eq, ":troop_id", "trp_gate_aggravator"),
(agent_get_position, pos2, ":agent_no"),
(set_fixed_point_multiplier, 100),
(get_distance_between_positions, ":distance", pos1, pos2),
(le, ":distance", 200),
#(display_message, "@gate_aggravator found"),
(call_script, "script_remove_agent", ":agent_no"),
(assign, ":gate_aggravator_found", 1),
(try_end),
]) + [

(scene_prop_get_num_instances,":max_barriers","spr_ai_limiter_gate_breached"), #move away all dependent barriers
(try_begin),
Expand Down Expand Up @@ -2638,12 +2659,12 @@
(set_spawn_position, pos1),
(spawn_agent,"trp_gate_aggravator"),
(assign, ":gate_aggravator", reg0),
(scene_prop_set_slot, ":gate_no", slot_gate_aggravator, ":gate_aggravator"),
(agent_set_speed_limit, ":gate_aggravator", 0),
(agent_set_team, ":gate_aggravator", 2),
] + (is_a_wb_sceneprop==1 and [ # make aggravator a statue (WB Only)
(agent_set_no_dynamics, ":gate_aggravator",1),
(agent_set_no_death_knock_down_only, ":gate_aggravator", 1),
(scene_prop_set_slot, ":gate_no", slot_gate_aggravator, ":gate_aggravator"),
] or []) + [
#(team_give_order, 7, grc_everyone, mordr_stand_ground),
]),
Expand All @@ -2659,8 +2680,26 @@
(play_sound, "snd_dummy_destroyed"),
(display_message,"@Gate is breached!"),

] + (is_a_wb_sceneprop==1 and [
(scene_prop_get_slot, ":gate_aggravator", ":gate_no", slot_gate_aggravator),
(call_script, "script_remove_agent", ":gate_aggravator"),
(call_script, "script_remove_agent", ":gate_aggravator"),
] or [
(assign, ":gate_aggravator_found", 0),
(try_for_agents, ":agent_no"), #find and remove gate aggravator agent
(eq, ":gate_aggravator_found", 0),
(gt, ":agent_no", 0),
(agent_is_alive, ":agent_no"),
(agent_get_troop_id, ":troop_id", ":agent_no"),
(eq, ":troop_id", "trp_gate_aggravator"),
(agent_get_position, pos2, ":agent_no"),
(set_fixed_point_multiplier, 100),
(get_distance_between_positions, ":distance", pos1, pos2),
(le, ":distance", 200),
#(display_message, "@gate_aggravator found"),
(call_script, "script_remove_agent", ":agent_no"),
(assign, ":gate_aggravator_found", 1),
(try_end),
]) + [

(scene_prop_get_num_instances,":max_barriers","spr_ai_limiter_gate_breached"), #move away all dependent barriers
(try_begin),
Expand Down Expand Up @@ -3330,7 +3369,9 @@

(ti_on_scene_prop_destroy, [
(store_trigger_param_1, ":gate_no"),
] + (is_a_wb_sceneprop==1 and [
(scene_prop_set_slot, ":gate_no", scene_prop_open_or_close_slot, 2),
] or []) + [
(prop_instance_get_starting_position, pos1, ":gate_no"),
(particle_system_burst,"psys_village_fire_smoke_big",pos1,200),
(particle_system_burst,"psys_village_fire_smoke_big",pos1,200),
Expand All @@ -3339,11 +3380,13 @@
(prop_instance_animate_to_position, ":gate_no", pos1, 400), #animate in 4 second
(play_sound, "snd_dummy_destroyed"),
(display_message,"@Gate is breached!"),
(assign, ":gate_aggravator_found", 0),
#(assign, ":gate_aggravator_found", 0),

] + (is_a_wb_sceneprop==1 and [
(scene_prop_get_slot, ":gate_aggravator", ":gate_no", slot_gate_aggravator),
(call_script, "script_remove_agent", ":gate_aggravator"),

] or [
(assign, ":gate_aggravator_found", 0),
(try_for_agents, ":agent_no"), #find and remove gate aggravator agent
(eq, ":gate_aggravator_found", 0),
(gt, ":agent_no", 0),
Expand All @@ -3358,7 +3401,8 @@
(call_script, "script_remove_agent", ":agent_no"),
(assign, ":gate_aggravator_found", 1),
(try_end),

]) + [

(scene_prop_get_num_instances,":max_barriers","spr_ai_limiter_gate_breached"), #move away all dependent barriers
(try_begin),
(gt, ":max_barriers",0),
Expand Down Expand Up @@ -3398,12 +3442,12 @@
(set_spawn_position, pos1),
(spawn_agent,"trp_gate_aggravator"),
(assign, ":gate_aggravator", reg0),
(scene_prop_set_slot, ":instance_no", slot_gate_aggravator, ":gate_aggravator"),
(agent_set_speed_limit, ":gate_aggravator", 0),
(agent_set_team, ":gate_aggravator", 2),
] + (is_a_wb_sceneprop==1 and [ # make aggravator a statue (WB Only)
(agent_set_no_dynamics, ":gate_aggravator",1),
(agent_set_no_death_knock_down_only, ":gate_aggravator", 1),
(scene_prop_set_slot, ":instance_no", slot_gate_aggravator, ":gate_aggravator"),
] or []) + [
]),

Expand All @@ -3416,8 +3460,26 @@
(prop_instance_animate_to_position, ":gate_no", pos1, 400), #animate in 4 second
(play_sound, "snd_dummy_destroyed"),

] + (is_a_wb_sceneprop==1 and [
(scene_prop_get_slot, ":gate_aggravator", ":gate_no", slot_gate_aggravator),
(call_script, "script_remove_agent", ":gate_aggravator"),
] or [
(assign, ":gate_aggravator_found", 0),
(try_for_agents, ":agent_no"), #find and remove gate aggravator agent
(eq, ":gate_aggravator_found", 0),
(gt, ":agent_no", 0),
(agent_is_alive, ":agent_no"),
(agent_get_troop_id, ":troop_id", ":agent_no"),
(eq, ":troop_id", "trp_gate_aggravator"),
(agent_get_position, pos2, ":agent_no"),
(set_fixed_point_multiplier, 100),
(get_distance_between_positions, ":distance", pos1, pos2),
(le, ":distance", 200),
#(display_message, "@gate_aggravator found"),
(call_script, "script_remove_agent", ":agent_no"),
(assign, ":gate_aggravator_found", 1),
(try_end),
]) + [
]),

(ti_on_scene_prop_hit,
Expand All @@ -3437,12 +3499,12 @@
(set_spawn_position, pos1),
(spawn_agent,"trp_gate_aggravator"),
(assign, ":gate_aggravator", reg0),
(scene_prop_set_slot, ":instance_no", slot_gate_aggravator, ":gate_aggravator"),
(agent_set_speed_limit, ":gate_aggravator", 0),
(agent_set_team, ":gate_aggravator", 2),
] + (is_a_wb_sceneprop==1 and [ # make aggravator a statue (WB Only)
(agent_set_no_dynamics, ":gate_aggravator",1),
(agent_set_no_death_knock_down_only, ":gate_aggravator", 1),
(scene_prop_set_slot, ":instance_no", slot_gate_aggravator, ":gate_aggravator"),
] or []) + [
]),

Expand All @@ -3455,8 +3517,26 @@
(prop_instance_animate_to_position, ":gate_no", pos1, 400), #animate in 4 second
(play_sound, "snd_dummy_destroyed"),

] + (is_a_wb_sceneprop==1 and [
(scene_prop_get_slot, ":gate_aggravator", ":gate_no", slot_gate_aggravator),
(call_script, "script_remove_agent", ":gate_aggravator"),
] or [
(assign, ":gate_aggravator_found", 0),
(try_for_agents, ":agent_no"), #find and remove gate aggravator agent
(eq, ":gate_aggravator_found", 0),
(gt, ":agent_no", 0),
(agent_is_alive, ":agent_no"),
(agent_get_troop_id, ":troop_id", ":agent_no"),
(eq, ":troop_id", "trp_gate_aggravator"),
(agent_get_position, pos2, ":agent_no"),
(set_fixed_point_multiplier, 100),
(get_distance_between_positions, ":distance", pos1, pos2),
(le, ":distance", 200),
#(display_message, "@gate_aggravator found"),
(call_script, "script_remove_agent", ":agent_no"),
(assign, ":gate_aggravator_found", 1),
(try_end),
]) + [
]),

(ti_on_scene_prop_hit,
Expand Down
Binary file modified SceneObj/scn_beorning_village_siege.sco
Binary file not shown.
Binary file modified SceneObj/scn_edhellond_siege.sco
Binary file not shown.
Binary file modified SceneObj/scn_khand_camp_siege.sco
Binary file not shown.
Binary file modified SceneObj/scn_north_rhun_camp_siege.sco
Binary file not shown.
Binary file modified SceneObj/scn_thranduils_halls_siege.sco
Binary file not shown.
Binary file modified SceneObj/scn_troll_cave_siege.sco
Binary file not shown.
Binary file modified SceneObj/scn_uruk_hai_h_camp_center_siege.sco
Binary file not shown.
Binary file modified SceneObj/scn_uruk_hai_outpost_center_siege.sco
Binary file not shown.
Binary file modified SceneObj/scn_uruk_hai_r_camp_center_siege.sco
Binary file not shown.

0 comments on commit 80bd41f

Please sign in to comment.