Skip to content

Commit

Permalink
Bunch of minor fixes and adjustments: Sea battles no longer possible …
Browse files Browse the repository at this point in the history
…after attacker faction is defeated; prevent supply train or delivery quests to Henneth Annun; disallow stabbing attack for Khand tulwars; slightly increase removal of high-level volunteers; quest helper trigger for guild master kill quest only works when near target center; quest helper trigger for eliminate parties quest only fires when within the active theater, scouts message chance scales with spotting and tracking, change party to spawn near the player instead of the target center (which isn't defined in the quest description).
  • Loading branch information
In-Vain committed Sep 18, 2020
1 parent 9dc08f1 commit e6bc762
Show file tree
Hide file tree
Showing 14 changed files with 70 additions and 37 deletions.
3 changes: 2 additions & 1 deletion ModuleSystem/module_dialogs.py
Expand Up @@ -11456,11 +11456,12 @@
(quest_get_slot, ":target_template", "qst_blank_quest_17", slot_quest_target_party_template),
(store_random_in_range, ":rand", 3, 7),
(try_for_range, ":unused", 1, ":rand"),
(store_random_in_range, ":rand_dist", 25, 51),
(store_random_in_range, ":rand_dist", 5, 20),
(set_spawn_radius, ":rand_dist"),
(spawn_around_party, "$g_encountered_party", ":target_template"),
(assign, ":spawned", reg0),
(party_add_members, ":spawned", ":quest_target_troop", ":rand"),
(party_set_faction, ":spawned", "fac_deserters"), #Kham: so they don't get into fights
(try_end),

]],
Expand Down
4 changes: 2 additions & 2 deletions ModuleSystem/module_items.py
Expand Up @@ -1109,8 +1109,8 @@ def heraldic(item_tableau):
["khand_throwing_axe","Khand_Throwing_Axe",[("Khand_Weapon_Throwing_Axe",0)],itp_type_thrown|itp_shop|itp_primary|itp_bonus_against_shield|itp_cant_use_on_horseback,itcf_throw_axe,300,weight(5)|difficulty(0)|shoot_speed(20)|spd_rtng(103)|weapon_length(53)|thrust_damage(70,cut)|accuracy(78)|max_ammo(2),imodbits_thrown,[] ],
["khand_rammace","Khand_Ram_Mace",[("Khand_Weapon_Mace_Ram",0)],itp_type_polearm|itp_primary|itp_wooden_parry|itp_wooden_attack|itp_crush_through|itp_can_knock_down,itc_bastardfalchion|itcf_carry_back,500,weight(6)|difficulty(0)|spd_rtng(84)|weapon_length(102)|swing_damage(33,blunt)|thrust_damage(0,pierce),imodbits_weapon_wood],
["khand_pitsword","Pit_Fighter_Sword",[("Khand_Weapon_Sword_Pit",0)],itp_type_one_handed_wpn|itp_primary|itp_shop,itc_longsword|itcf_carry_sword_left_hip,300,weight(1.25)|difficulty(0)|spd_rtng(96)|weapon_length(66)|swing_damage(29,cut)|thrust_damage(21,pierce),imodbits_weapon_bad],
["khand_tulwar","Khand_Tulwar",[("Khand_Weapon_Tulwar",0)],itp_type_one_handed_wpn|itp_primary|itp_shop,itc_longsword|itcf_carry_sword_left_hip,500,weight(1.25)|difficulty(0)|spd_rtng(91)|weapon_length(94)|swing_damage(29,cut)|thrust_damage(21,pierce),imodbits_weapon_bad],
["khand_2h_tulwar","Khand_Tulwar",[("Khand_Weapon_Tulwar_Long",0)],itp_type_two_handed_wpn|itp_primary|itp_two_handed|itp_shop,itc_greatsword|itcf_carry_sword_back,1123,weight(2.75)|difficulty(0)|spd_rtng(89)|weapon_length(116)|swing_damage(42,cut)|thrust_damage(28,pierce),imodbits_weapon_bad],
["khand_tulwar","Khand_Tulwar",[("Khand_Weapon_Tulwar",0)],itp_type_one_handed_wpn|itp_primary|itp_shop,itc_scimitar|itcf_carry_sword_left_hip,500,weight(1.25)|difficulty(0)|spd_rtng(91)|weapon_length(94)|swing_damage(29,cut)|thrust_damage(21,pierce),imodbits_weapon_bad],
["khand_2h_tulwar","Khand_Tulwar",[("Khand_Weapon_Tulwar_Long",0)],itp_type_two_handed_wpn|itp_primary|itp_two_handed|itp_shop,itc_nodachi|itcf_carry_sword_back,1123,weight(2.75)|difficulty(0)|spd_rtng(89)|weapon_length(116)|swing_damage(42,cut)|thrust_damage(28,pierce),imodbits_weapon_bad],
["khand_lance","Khand_Lance",[("khand_lance",0)],itp_type_polearm|itp_shop|itp_primary|itp_spear|itp_penalty_with_shield|itp_wooden_parry|itp_couchable,itc_spear,210,weight(2.5)|difficulty(0)|spd_rtng(88)|weapon_length(218)|thrust_damage(26,pierce),imodbits_weapon_bad],
####KHAND SHIELDS
["easterling_round_horseman","Easterling_Round_Shield",[("eastershield_c",0)],itp_type_shield|itp_wooden_parry|itp_shop,itcf_carry_round_shield,200,weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(40),imodbits_shield,],
Expand Down
21 changes: 20 additions & 1 deletion ModuleSystem/module_scripts.py
Expand Up @@ -2288,6 +2288,10 @@ def set_item_score():
(store_random_in_range, ":random", 0, 100),
(le, ":random", ":highest_level"),
(party_remove_members_wounded_first, ":volunteers", ":highest_level_troop", 1),
(try_begin),
(ge, ":highest_level_stack_size", 3),
(party_remove_members_wounded_first, ":volunteers", ":highest_level_troop", 1), #crude fix to high-level troops stacking over time
(try_end),
#(str_store_party_name, s1, ":town"),
#(str_store_troop_name, s2, ":highest_level_troop"),
#(display_message, "@{s1}: removed volunteer {s2}"),
Expand Down Expand Up @@ -6762,6 +6766,7 @@ def set_item_score():
(assign, ":quest_expiration_days", reg62),
(assign, ":quest_dont_give_again_period", reg63),
(assign, ":quest_target_party_template", reg64),
(assign, ":quest_target_center", ":giver_center_no"), #we need the giver center for the quest helper trigger #InVain

(assign, ":result", ":quest_no"),
(try_end),
Expand Down Expand Up @@ -7027,6 +7032,7 @@ def set_item_score():
(call_script, "script_cf_select_random_town_allied", ":giver_faction_no"),#Can fail
(assign, ":cur_target_dist", reg1),
(neq, ":giver_center_no", reg0),
(neq, reg0, "p_town_henneth_annun"),#Skip Henneth Annun
(assign, ":quest_target_center", reg0),
# (store_random_party_in_range, ":quest_target_center", centers_begin, centers_end),
# (store_distance_to_party_from_party, ":dist", ":giver_center_no",":quest_target_center"),
Expand All @@ -7047,6 +7053,7 @@ def set_item_score():
(is_between, ":giver_center_no", centers_begin, centers_end),
#(store_random_party_in_range, ":quest_target_center", centers_begin, centers_end),
(call_script, "script_cf_select_random_town_allied", ":giver_faction_no"),#Can fail
(neq, reg0, "p_town_henneth_annun"),#Skip Henneth Annun
(assign, ":quest_target_center", reg0),
(assign, ":cur_target_dist", reg1),
(neq, ":giver_center_no", ":quest_target_center"),
Expand Down Expand Up @@ -25008,16 +25015,25 @@ def set_item_score():
(try_begin),
(this_or_next|eq, "$g_talk_troop_faction", "fac_gondor"),
(eq, "$g_talk_troop_faction", "fac_umbar"),
(faction_get_slot,":strength","fac_gondor",slot_faction_strength), #hacky way to ensure that enemy faction is still alive.
(gt, ":strength", 500),
(faction_get_slot,":strength","fac_umbar",slot_faction_strength),
(gt, ":strength", 500),
(try_begin),
(ge, ":rand", 50),
(assign, ":cur_target_center", "p_town_dol_amroth"),
(try_end),
(else_try),
(this_or_next|eq, "$g_talk_troop_faction", "fac_dale"),
(eq, "$g_talk_troop_faction", "fac_rhun"),
(faction_get_slot,":strength","fac_dale",slot_faction_strength), #hacky way to ensure that enemy faction is still alive.
(gt, ":strength", 500),
(faction_get_slot,":strength","fac_rhun",slot_faction_strength),
(gt, ":strength", 500),
(assign, ":cur_target_center", "p_town_esgaroth"),
(try_end),
(try_begin),

(try_begin),
(eq, "$g_talk_troop_faction", "fac_umbar"),
(assign, ":cur_object_center", "p_town_umbar_camp"), #If Umbar, Talk to Umbar Guild Master
(else_try),
Expand Down Expand Up @@ -25384,6 +25400,9 @@ def set_item_score():
(else_try),
(eq, ":party_type", spt_bandit),
(val_add, ":nf_enemy_party_type_sum", 10), #Bandits only get 10 points
(else_try),
(eq, ":party_type", spt_guardian),
(val_add, ":nf_enemy_party_type_sum", 300), #guard legion counts for two lords (actual victory point value is too big)
(else_try),
(val_add, ":nf_enemy_party_type_sum", ":party_victory_value_point"), #Add vp here for primary party encountered.
(try_end),
Expand Down
41 changes: 27 additions & 14 deletions ModuleSystem/module_simple_triggers.py
Expand Up @@ -3805,14 +3805,21 @@
(quest_get_slot, ":defeated", "qst_eliminate_patrols", slot_quest_current_state),
(lt, ":defeated", ":target_amount"), #Additional check. The above neg|check_quest_concluded doesn't seem to work, parties kept spawning.
(gt, ":center", 0),
(set_spawn_radius, 5),
(spawn_around_party, ":center", ":target"),
(call_script, "script_find_theater", ":center"), #only spawn armies if the player is in the theater
(assign, ":center_theater", reg0),
(call_script, "script_find_theater", "p_main_party"),
(eq, reg0, ":center_theater"),
(set_spawn_radius, 10),
(spawn_around_party, "p_main_party", ":target"),
(str_store_party_name, s2, reg0),
(str_store_party_name, s3, ":center"),
(store_random_in_range, ":random", 0, 100), #40% chance for the message to come up, just to make it less spammy.
(party_get_skill_level, ":spotting", "p_main_party", skl_spotting),
(party_get_skill_level, ":tracking", "p_main_party", skl_tracking),
(store_add, ":report_chance", ":tracking", ":spotting"),
(store_random_in_range, ":random", 1, 21), #10 spotting and 10 tracking = 100% spotting chance
(try_begin),
(le, ":random", 40),
(display_message, "@Your scouts have reported that there is a {s2} near {s3}."),
(le, ":random", ":report_chance"),
(display_message, "@Your scouts report signs of a {s2} nearby."),
(try_end),
(try_end),

Expand All @@ -3827,11 +3834,11 @@
(lt, ":defeated", ":target_amount"), #Additional check. The above neg|check_quest_concluded doesn't seem to work, parties kept spawning.
(gt, ":target_center", 0),
(store_distance_to_party_from_party, ":distance", "p_main_party", ":target_center"),
(le, ":distance", 20), #only spawn looters if the player is still in the area
(le, ":distance", 25), #only spawn looters if the player is still in the area
(set_spawn_radius, 7),
(spawn_around_party, ":target_center", ":party_template"),
(party_set_flags, reg0, pf_quest_party, 1),
(party_set_faction, reg0, "fac_neutral"), #Kham: so they don't get into fights
(party_set_faction, reg0, "fac_deserters"), #Kham: so they don't get into fights
#(display_message, "@DEBUG: Looter party spawned"),
(try_end),

Expand All @@ -3842,14 +3849,20 @@
(quest_get_slot, ":target_troop", "qst_blank_quest_17", slot_quest_target_troop),
(quest_get_slot, ":target_amount", "qst_blank_quest_17", slot_quest_target_amount),
(quest_get_slot, ":defeated", "qst_blank_quest_17", slot_quest_current_state),
(quest_get_slot, ":target_center", "qst_blank_quest_17", slot_quest_target_center),
(lt, ":defeated", ":target_amount"), #Additional check. The above neg|check_quest_concluded doesn't seem to work, parties kept spawning.
(set_spawn_radius, 7),
(spawn_around_party, "p_main_party", ":target_template"),
(assign, ":spawned", reg0),
(party_set_flags, ":spawned", pf_quest_party, 1),
(party_set_faction, ":spawned", "fac_neutral"), #Kham: so they don't get into fights
(store_random_in_range, ":rand", 8, 15),
(party_force_add_members, ":spawned", ":target_troop", ":rand"),
(store_distance_to_party_from_party, ":distance", "p_main_party", ":target_center"),
(le, ":distance", 25), #only spawn looters if the player is still in the area
(set_spawn_radius, 7),
(store_random_in_range, ":parties_to_spawn", 1, 3),
(try_for_range, ":unused", 0,":parties_to_spawn"),
(spawn_around_party, ":target_center", ":target_template"),
(assign, ":spawned", reg0),
(party_set_flags, ":spawned", pf_quest_party, 1),
(party_set_faction, ":spawned", "fac_deserters"), #Kham: so they don't get into fights
(store_random_in_range, ":rand", 8, 15),
(party_force_add_members, ":spawned", ":target_troop", ":rand"),
(try_end),
(try_end),

]),
Expand Down
2 changes: 1 addition & 1 deletion _wb/conversation.txt
Expand Up @@ -1080,7 +1080,7 @@ dlga_merchant_quest_brief_reinforce_center:merchant_quest_taken 69631 563 0 Alr
dlga_merchant_quest_brief_reinforce_center:merchant_quest_stall 69631 563 0 I_am_sorry,_you'll_need_to_find_someone_else_for_that. 560 0
dlga_merchant_quest_requested:merchant_quest_brief.3 4095 543 10 31 2 144115188075855945 59 526 3 1224979098644774912 59 2 526 3 72057594037927958 59 10 2323 2 6 1224979098644774912 4 0 542 3 144115188075855993 158 0 2320 2 5 1585267068834416369 5 0 2320 2 5 1585267068834416370 3 0 {s5} 555 0
dlga_merchant_quest_brief:mayor_mission_told_kill_quest_bandit 4095 555 10 31 2 144115188075855945 59 526 3 1224979098644774912 59 2 526 3 72057594037927958 59 10 2323 2 6 1224979098644774912 4 0 542 3 144115188075855993 158 0 2320 2 5 1585267068834416371 5 0 2320 2 5 1585267068834416372 3 0 {s5} 564 0
dlga_mayor_mission_told_kill_quest_bandit:merchant_quest_taken 69631 564 2 31 2 144115188075855945 59 2320 2 7 1585267068834416373 {s7} 562 17 526 3 1224979098644774912 59 2 526 3 72057594037927958 59 10 2323 2 6 1224979098644774912 2341 2 9 144115188075855891 2323 2 36 1224979098644774912 1290 1 59 2320 2 2 1585267068834416374 1 3 256 59 144115188075855891 526 3 1224979098644774913 59 9 2136 3 1224979098644774914 3 7 6 3 1224979098644774915 1 1224979098644774914 2136 3 1224979098644774916 25 51 1103 1 1224979098644774916 1100 2 144115188075855998 1224979098644774913 2133 2 1224979098644774917 72057594037927936 1610 3 1224979098644774917 1224979098644774912 1224979098644774914 3 0
dlga_mayor_mission_told_kill_quest_bandit:merchant_quest_taken 69631 564 2 31 2 144115188075855945 59 2320 2 7 1585267068834416373 {s7} 562 18 526 3 1224979098644774912 59 2 526 3 72057594037927958 59 10 2323 2 6 1224979098644774912 2341 2 9 144115188075855891 2323 2 36 1224979098644774912 1290 1 59 2320 2 2 1585267068834416374 1 3 256 59 144115188075855891 526 3 1224979098644774913 59 9 2136 3 1224979098644774914 3 7 6 3 1224979098644774915 1 1224979098644774914 2136 3 1224979098644774916 5 20 1103 1 1224979098644774916 1100 2 144115188075855998 1224979098644774913 2133 2 1224979098644774917 72057594037927936 1610 3 1224979098644774917 1224979098644774912 1224979098644774914 1620 2 1224979098644774917 30 3 0
dlga_mayor_mission_told_kill_quest_bandit:merchant_quest_stall 69631 564 1 31 2 144115188075855945 59 I_cannot_do_this_now. 560 0
dlga_merchant_quest_requested:merchant_quest_brief.4 4095 543 1 31 2 144115188075855945 34 Thanks_for_offering_to_help.Actually_I_was_looking_for_someone_to_supply_us_with_Food.Perhaps_you_can_do_that... 555 0
dlga_merchant_quest_brief:merchant_quest_brief_deliver_food 4095 555 1 31 2 144115188075855945 34 Our_food_supplies_are_dwindling_and_the_supply_trains_are_getting_waylaid_by_the_enemy.I_need_someone_to_bring_us_{reg5}_units_of_food_in_{reg6}_days,_or_we'll_begin_to_starve.Maybe_nearby_friendly_towns_have_enough_for_us_too._What_do_you_say? 565 7 526 3 72057594037927941 34 10 526 3 72057594037927942 34 23 2322 2 9 144115188075855891 2342 2 3 144115188075855998 2319 1 6 1290 1 34 2320 2 2 1585267068834416375
Expand Down
4 changes: 2 additions & 2 deletions _wb/item_kinds1.txt
Expand Up @@ -2002,10 +2002,10 @@ itemsfile version 2
itm_khand_pitsword Pit_Fighter_Sword Pit_Fighter_Sword 1 Khand_Weapon_Sword_Pit 0 4259842 9223388529822793743 300 286870 1.25 100 0 0 0 0 29696 96 0 66 0 277 29
0

itm_khand_tulwar Khand_Tulwar Khand_Tulwar 1 Khand_Weapon_Tulwar 0 4259842 9223388529822793743 500 286870 1.25 100 0 0 0 0 29696 91 0 94 0 277 29
itm_khand_tulwar Khand_Tulwar Khand_Tulwar 1 Khand_Weapon_Tulwar 0 4259842 9223388529822793742 500 286870 1.25 100 0 0 0 0 29696 91 0 94 0 277 29
0

itm_khand_2h_tulwar Khand_Tulwar Khand_Tulwar 1 Khand_Weapon_Tulwar_Long 0 6356995 9223635924301119728 1123 286870 2.75 100 0 0 0 0 43008 89 0 116 0 284 42
itm_khand_2h_tulwar Khand_Tulwar Khand_Tulwar 1 Khand_Weapon_Tulwar_Long 0 6356995 9223635924234010848 1123 286870 2.75 100 0 0 0 0 43008 89 0 116 0 284 42
0

itm_khand_lance Khand_Lance Khand_Lance 1 khand_lance 0 2286256132 4222124851986688 210 286870 2.5 100 0 0 0 0 0 88 0 218 0 282 0
Expand Down
4 changes: 2 additions & 2 deletions _wb/quick_strings.txt
Expand Up @@ -84,7 +84,7 @@ qstr_a_MAN^_subjugated_by a_MAN,^_subjugated_by_Sauron
qstr_an_ORC^_serving_the_W an_ORC,^_serving_the_White_Hand
qstr_an_URUK_HAI^_bred_in an_URUK-HAI,^_bred_in_Isengard
qstr_a_MAN_of_Dunland^_th a_MAN_of_Dunland,^_the_Western_Plains
qstr__rev_84_wb__dev_^_Bu _rev_84_wb_|_dev_^_Built_2020-09-16_18:24___
qstr__rev_85_wb__dev_^_Bu _rev_85_wb_|_dev_^_Built_2020-09-18_20:44___
qstr_Click_the_center_but Click_the_center_button_to_toggle_faction^Click_the_avatars_to_view_details_of_them
qstr_Level:_{reg3}^Health Level:_{reg3}^Health:_{reg4}
qstr_Attributes Attributes
Expand Down Expand Up @@ -1300,7 +1300,7 @@ qstr_{s5}_has_stopped_fol {s5}_has_stopped_following_you.
qstr_You_have_{reg69}_all You_have_{reg69}_ally_party_following_you
qstr_You_have_{reg69}_ally You_have_{reg69}_ally_parties_following_you
qstr_The_forces_of_{s2}_h The_forces_of_{s2}_have_regrouped_and_march_on_to_{s15}!
qstr_Your_scouts_have_rep Your_scouts_have_reported_that_there_is_a_{s2}_near_{s3}.
qstr_Your_scouts_report_s Your_scouts_report_signs_of_a_{s2}_nearby.
qstr_{s1}_from_{s2} {s1}_from_{s2}
qstr_When_dealing_with_lo When_dealing_with_locals_in_{s11},_remember_that_they_do_not_know_you_and_they_don't_necessarily_acknowledge_the_merits_you've_earned_in_{s10}.^^(the_Resource_Points_which_you_can_dispose_of_among_people_from_{s11}_are_not_the_ones_you_earned_in_{s10},_but_the_ones_you_will_earn_in_{s11}_--_see_also_the_Report_screen)
qstr_Info Info
Expand Down
8 changes: 4 additions & 4 deletions _wb/scripts.txt

Large diffs are not rendered by default.

0 comments on commit e6bc762

Please sign in to comment.