Skip to content

Commit

Permalink
*Quest Fixes
Browse files Browse the repository at this point in the history
- Fixed Mission Templates for both Defend / Raid village quests and Ring Hunters
- Fixed Game menus for the above quests
- Fixed Dialogues for the above quests
- Hooked new meshes for Ring Hunters
  • Loading branch information
khamukkamu committed Jan 13, 2017
1 parent 833469a commit 1f90b22
Show file tree
Hide file tree
Showing 18 changed files with 1,974 additions and 1,813 deletions.
2 changes: 2 additions & 0 deletions ModuleSystem/ID/ID_meshes_mb.py
Expand Up @@ -367,5 +367,7 @@
mesh_inv_slot = 366
mesh_draw_lumberjack_orcs = 367
mesh_draw_mound_kneel = 368
mesh_draw_ring_hunters_army = 369
mesh_draw_ring_hunters_lair = 370


2 changes: 2 additions & 0 deletions ModuleSystem/ID/ID_meshes_wb.py
Expand Up @@ -374,5 +374,7 @@
mesh_inv_slot = 373
mesh_draw_lumberjack_orcs = 374
mesh_draw_mound_kneel = 375
mesh_draw_ring_hunters_army = 376
mesh_draw_ring_hunters_lair = 377


34 changes: 33 additions & 1 deletion ModuleSystem/module_dialogs.py
Expand Up @@ -2310,6 +2310,21 @@
(call_script, "script_finish_quest", "qst_defend_village", 100),
]],

[anyone,"lord_start", [
(check_quest_active, "qst_defend_village"),
(check_quest_failed, "qst_defend_village"),
(quest_slot_eq, "qst_defend_village", slot_quest_giver_troop,"$g_talk_troop"),
(quest_get_slot, ":quest_target_center", "qst_defend_village", slot_quest_object_center),
(str_store_party_name,12,":quest_target_center")],
"We have heard from our scouts near {s12} that you have failed to defend the village. The villagers were either slaughtered or made into slaves. These raiders are becoming bolder every day... ^^We sense that war is surely coming.", "defend_village_failed",[
(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -1),
(cancel_quest, "qst_defend_village"),
]],

[anyone|plyr, "defend_village_failed",[],
"I will do better next time.", "close_window",[],
],


[anyone,"lord_start", [
(check_quest_active, "qst_raid_village"),
Expand All @@ -2322,6 +2337,22 @@
(call_script, "script_finish_quest", "qst_raid_village", 100),
]],

[anyone,"lord_start", [
(check_quest_active, "qst_raid_village"),
(check_quest_failed, "qst_raid_village"),
(quest_get_slot, ":giver_troop", "qst_raid_village", slot_quest_giver_troop),
(eq, "$g_talk_troop", ":giver_troop"),
(quest_get_slot, ":quest_target_center", "qst_raid_village", slot_quest_object_center),
(str_store_party_name,12,":quest_target_center")],
"We saw some of your men running away from the village near {s12}. You dare come back here and show your face, {playername}?. ^^There will be war, but with failures like this, you may be its first casualty.", "raid_village_failed",[
(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -1),
(cancel_quest, "qst_raid_village"),
]],

[anyone|plyr, "raid_village_failed",[],
"I will do better next time.", "close_window",[],
],


#### Kham Defend / Raid Village Quests Completion End ####

Expand Down Expand Up @@ -3547,6 +3578,7 @@
(str_store_string, s2, "@You must return and report back that you have defeated the Ring Hunter party, but the leaders may have acquired what they were looking for."),
(call_script,"script_start_quest","qst_ring_hunters2","$qst_ring_hunter_lord"),
(quest_set_slot,"qst_ring_hunters2",slot_quest_current_state,10),
(disable_party,"p_ring_hunter_lair"),
(assign,"$g_leave_encounter",1),
(change_screen_map),
(remove_party,":beorn_m"),
Expand Down Expand Up @@ -4675,7 +4707,7 @@
#Active quests
##### TODO: QUESTS COMMENT OUT BEGIN

#### Kham Village Quests Start ########
#### Kham Defend / Raid Village Quests Start ########
#### Kham Defend Village - Good Start


Expand Down
39 changes: 28 additions & 11 deletions ModuleSystem/module_game_menus.py
Expand Up @@ -4115,7 +4115,7 @@
(set_background_mesh, "mesh_draw_wild_troll"),
(else_try),
(eq, "$g_encountered_party_template", "pt_ring_hunters"),
(set_background_mesh, "mesh_draw_victory_evilman"),
(set_background_mesh, "mesh_draw_ring_hunters_army"),
(try_end),


Expand Down Expand Up @@ -7789,7 +7789,7 @@
("ring_hunter_lair",0,
"^^^^You have followed the trail of the Ring Hunters through Mirkwood Forest and have arrived at the {s1}. You see them getting ready to leave with a chest.",
"none",
[(set_background_mesh, "mesh_town_evilcamp"),
[(set_background_mesh, "mesh_draw_ring_hunters_lair"),
(str_store_party_name, s1, "$g_encountered_party")],
[("attack_lair",[],"Attack them now",
[(set_jump_mission, "mt_bandit_lair"),
Expand Down Expand Up @@ -8330,6 +8330,8 @@
("village_quest",0,
"{s9}.",
"none",[

#Check which quest (Evil / Good)
(try_begin),
(check_quest_active,"qst_defend_village"),
(set_background_mesh, "mesh_town_goodcamp"),
Expand All @@ -8338,9 +8340,13 @@
(set_background_mesh,"mesh_town_evilcamp"),
(str_store_string,s9,"@You see the village you were tasked to raid. You get ready to attack them."),
(try_end)],

#If Good (Defend Village)
[("defend_villagers",[(check_quest_active,"qst_defend_village")], "Defend the Villagers!",
[
(quest_get_slot, ":quest_object_faction","qst_defend_village", slot_quest_object_faction),

#Randomize Raiders
(store_random_in_range, ":random_no", 0, 2),
(try_begin),
(eq, ":quest_object_faction","fac_gondor"),
Expand All @@ -8362,13 +8368,17 @@
(assign, ":bandit_troop_1", "trp_orc_of_mordor"),
(assign, ":bandit_troop_2", "trp_warg_rider_of_gorgoroth"),
(try_end),

#Randomize Scene
(store_random_in_range, ":random_scene", 1, 3),
(try_begin),
(eq, ":random_scene",1),
(modify_visitors_at_site, "scn_village_1"), ## Need new scene - Kham
(else_try),
(modify_visitors_at_site, "scn_village_3"),
(try_end),

#Set Entry and Number of Enemies / Villagers
(reset_visitors),
(store_character_level, ":level", "trp_player"),
(val_div, ":level", 2),
Expand All @@ -8393,15 +8403,20 @@
(jump_to_scene, "scn_village_1"),
(else_try),
(jump_to_scene,"scn_village_3"),
(end_try),
(assign, "$g_next_menu", "mnu_village_quest_result"),
(jump_to_menu, "mnu_battle_debrief"),
(assign, "$g_mt_mode", vba_normal),
(try_end),
#(assign, "$g_next_menu", "mnu_village_quest_result"),
#(jump_to_menu, "mnu_battle_debrief"),
#(assign, "$g_mt_mode", vba_normal),
(change_screen_mission),
]),

#If Evil (Raid Village)

("raid_villagers",[(check_quest_active,"qst_raid_village")], "Raid the Village!",
[
(quest_get_slot, ":raid_village_faction", "qst_raid_village", slot_quest_target_faction),

#Set Village Defender Faction
(try_begin), ## Elves are not likely to be guarding villages. Make an exception
(this_or_next|eq,":raid_village_faction", "fac_imladris"),
(this_or_next|eq,":raid_village_faction", "fac_lorien"),
Expand All @@ -8419,6 +8434,8 @@
(else_try),
(modify_visitors_at_site, "scn_village_3"),
(try_end),

#Set Entry and Number of Defenders
(reset_visitors),
(store_character_level, ":level", "trp_player"),
(val_div, ":level", 2),
Expand All @@ -8440,9 +8457,9 @@
(else_try),
(jump_to_scene,"scn_village_3"),
(end_try),
(assign, "$g_next_menu", "mnu_village_quest_result"),
(jump_to_menu, "mnu_battle_debrief"),
(assign, "$g_mt_mode", vba_normal),
# (assign, "$g_next_menu", "mnu_village_quest_result"),
# (jump_to_menu, "mnu_battle_debrief"),
# (assign, "$g_mt_mode", vba_normal),
(change_screen_mission),
]),
("go_away",[],"Leave them alone",[(change_screen_map)]),
Expand All @@ -8462,7 +8479,7 @@
(remove_party,"$qst_defend_village_party"),
(else_try),
(check_quest_active,"qst_defend_village"),
(eq, "$g_battle_result", -1),
(neq, "$g_battle_result", 1),
(call_script, "script_fail_quest", "qst_defend_village"),
(str_store_string, s9, "@Try as you might, you could not defeat the raiders. They raze the village to the ground and enslave the remaining peasants."),
# (set_background_mesh, "mesh_draw_victory_orc"),
Expand All @@ -8478,7 +8495,7 @@
(remove_party,"$qst_raid_village_party"),
(else_try),
(check_quest_active,"qst_raid_village"),
(eq, "$g_battle_result", -1),
(neq, "$g_battle_result", 1),
(call_script, "script_fail_quest", "qst_raid_village"),
(str_store_string, s9, "@You failed to raid the village and you were sent scurrying with your men. You hear the victors cheering as you feel the disapproving gaze of the Eye."),
# (set_background_mesh, "mesh_draw_victory_gondor"),
Expand Down
3 changes: 3 additions & 0 deletions ModuleSystem/module_meshes.py
Expand Up @@ -496,4 +496,7 @@

("draw_lumberjack_orcs", 0, "draw_lumberjack_orcs", 0, 0, 0, 0, 0, 0, 1, 1, 1),
("draw_mound_kneel", 0, "draw_mound_kneel", 0, 0, 0, 0, 0, 0, 1, 1, 1),

("draw_ring_hunters_army", 0, "draw_ring_hunters_army", 0, 0, 0, 0, 0, 0, 1, 1, 1),
("draw_ring_hunters_lair", 0, "draw_ring_hunters_lair", 0, 0, 0, 0, 0, 0, 1, 1, 1),
]

0 comments on commit 1f90b22

Please sign in to comment.