Skip to content

Commit

Permalink
*Attempt to fix Save Game Corruption (new game required) + Extra Dial…
Browse files Browse the repository at this point in the history
…ogues for the hobbits

- Change refresh_volunteers script in order to stop making new volunteer parties and just fill up one.
- Create new Volunteer party template so that we don't use the fake one
- Create volunteer party troop so that it never gets depleted
- Make sure that volunteer party troop doesnt join garrison or sieges
- Add new dialogues for the hobbits
- Some changes to FormAI scripts
  • Loading branch information
khamukkamu committed Apr 19, 2017
1 parent eb1b435 commit 3d0153d
Show file tree
Hide file tree
Showing 35 changed files with 3,567 additions and 3,273 deletions.
1 change: 1 addition & 0 deletions ModuleSystem/ID/ID_party_templates.py
Expand Up @@ -253,3 +253,4 @@
pt_beorn_caravan = 252
pt_orc_horde = 253
pt_vet_archer = 254
pt_volunteers = 255
6 changes: 4 additions & 2 deletions ModuleSystem/ID/ID_quests.py
Expand Up @@ -40,7 +40,8 @@
qst_deliver_gift = 39
qst_ring_hunters = 40
qst_ring_hunters2 = 41
qst_quests_end = 42
qst_deliver_message_hobbit = 42
qst_quests_end = 43
qsttag_deliver_message = 504403158265495552
qsttag_deliver_message_to_enemy_lord = 504403158265495553
qsttag_raise_troops = 504403158265495554
Expand Down Expand Up @@ -83,6 +84,7 @@
qsttag_deliver_gift = 504403158265495591
qsttag_ring_hunters = 504403158265495592
qsttag_ring_hunters2 = 504403158265495593
qsttag_quests_end = 504403158265495594
qsttag_deliver_message_hobbit = 504403158265495594
qsttag_quests_end = 504403158265495595


17 changes: 9 additions & 8 deletions ModuleSystem/ID/ID_troops.py
Expand Up @@ -915,11 +915,12 @@
trp_dummy_troop_b = 914
trp_beorning_shield_bear = 915
trp_test_vet_archer = 916
trp_last = 917
trp_multiplayer_profile_troop_male = 918
trp_multiplayer_profile_troop_female = 919
trp_future_troop_6 = 920
trp_future_troop_7 = 921
trp_future_troop_8 = 922
trp_future_troop_9 = 923
trp_future_troop_10 = 924
trp_volunteers = 917
trp_last = 918
trp_multiplayer_profile_troop_male = 919
trp_multiplayer_profile_troop_female = 920
trp_future_troop_6 = 921
trp_future_troop_7 = 922
trp_future_troop_8 = 923
trp_future_troop_9 = 924
trp_future_troop_10 = 925
157 changes: 152 additions & 5 deletions ModuleSystem/module_dialogs.py
Expand Up @@ -344,22 +344,169 @@
[anyone|plyr, "hobbit_general_talk_1", [(troop_slot_eq, "trp_pippin_notmet", slot_troop_met_previously, 0),(troop_slot_eq, "trp_merry_notmet", slot_troop_met_previously, 0),],
"Say. I think I never seen one of your kind.","hobbit_general_talk_first_met",[(troop_set_slot, "$g_talk_troop", slot_troop_met_previously, 1),] ],

[anyone|plyr, "hobbit_general_talk_1", [(eq, "$g_talk_troop", "trp_pippin_notmet"), (troop_slot_eq, "trp_merry_notmet", slot_troop_met_previously, 1),], "Say. I think I've met another one like you, in Edoras.","hobbit_general_talk_second_met",[(troop_set_slot, "$g_talk_troop", slot_troop_met_previously, 1),] ],
#Kham Hobbit Changes Begin

[anyone|plyr, "hobbit_general_talk_1", [(eq, "$g_talk_troop", "trp_merry_notmet"), (troop_slot_eq, "trp_pippin_notmet", slot_troop_met_previously, 1),], "Say. I think I've met another one like you, in Minas Tirith.","hobbit_general_talk_second_met",[(troop_set_slot, "$g_talk_troop", slot_troop_met_previously, 1),] ],
[anyone|plyr, "hobbit_general_talk_1", [
(eq, "$g_talk_troop", "trp_pippin_notmet"),
(troop_slot_eq, "trp_merry_notmet", slot_troop_met_previously, 1)],
"Say. I think I've met another one like you, in Edoras.","hobbit_general_talk_second_met",[
(troop_set_slot, "$g_talk_troop", slot_troop_met_previously, 1)]
],


[anyone|plyr, "hobbit_general_talk_1", [
(eq, "$g_talk_troop", "trp_merry_notmet"),
(troop_slot_eq, "trp_pippin_notmet", slot_troop_met_previously, 1)],
"Say. I think I've met another one like you, in Minas Tirith.","hobbit_general_talk_second_met",[
(troop_set_slot, "$g_talk_troop", slot_troop_met_previously, 1),]
],

[anyone, "hobbit_general_talk_first_met", [],
"I know. I came from afar! I'm a Hobbit, {sir/madam}, from the Shire.","hobbit_general_talk_3",[] ],

[trp_merry_notmet, "hobbit_general_talk_second_met", [],
"Oh, that must have been my dear cousin! Peregrin Took, or Pippin, how they call him. We are Hobbits, {sir/madam}, and we come from the Shire, both of us! Good old Pippin, I wonder how he is doing in Minas Tirith.","hobbit_general_talk_ask",[] ],

[trp_pippin_notmet, "hobbit_general_talk_second_met", [], "Oh, that must have been my dear cousin! Meriadoc Brandybuck, or Merry, how they call him. We are Hobbits, {sir/madam}, and we come from the Shire, both of us! Good old Merry, I wonder how he is doing back in Edoras.","hobbit_general_talk_ask",[] ],

##Kham - Hobbit request START

[anyone, "hobbit_general_talk_ask", [],
"May I ask a favour of you, {my lord/my lady}.","hobbit_general_talk_ask_1",[] ],

[anyone|plyr, "hobbit_general_talk_ask_1", [
(try_begin),
(eq, "$g_talk_troop", "trp_merry_notmet"),
(str_store_string, s1, "@Merry"),
(else_try),
(str_store_string, s1, "@Pippin"),
(try_end)],
"Of course, {s1}. What is it?","hobbit_general_talk_ask_2",[]
],

[anyone, "hobbit_general_talk_ask_2", [
(try_begin),
(eq, "$g_talk_troop", "trp_merry_notmet"),
(str_store_string, s1, "@Pippin"),
(str_store_string, s2, "@the Citadel"),
(str_store_string, s3, "@Minas Tirith"),
(str_store_string, s4, "@Steward Denethor"),
(else_try),
(str_store_string, s1, "@Merry"),
(str_store_string, s2, "@Golden Hall"),
(str_store_string, s3, "@Edoras"),
(str_store_string, s4, "@King Theoden"),
(try_end)],
"Could you deliver a message to my cousin, {s1}? He is at {s2}, in {s3}, in the service of {s4}.","hobbit_general_talk_ask_3",[]
],

[anyone|plyr, "hobbit_general_talk_ask_3", [
(try_begin),
(eq, "$g_talk_troop", "trp_merry_notmet"),
(str_store_string, s1, "@Minas Tirith"),
(else_try),
(str_store_string, s1, "@Edoras"),
(try_end)],
"I will be passing by {s1} and will be glad to pass on this message to your cousin.","hobbit_general_talk_ask_accept",[
(setup_quest_text, "qst_deliver_message_hobbit"),
(try_begin),
(eq, "$g_talk_troop", "trp_merry_notmet"),
(str_store_string, s2, "@Merry asked you to deliver a message to his cousin, Pippin, in Minas Tirith."),
(else_try),
(str_store_string, s2, "@Pippin asked you to deliver a message to his cousin, Merry, in Edoras."),
(try_end),
(call_script, "script_start_quest", "qst_deliver_message_hobbit", "$g_talk_troop")]
],

[anyone, "hobbit_general_talk_first_met", [], "I know. I came from afar! I'm a Hobbit, {sir/madam}, from the Shire.","hobbit_general_talk_3",[] ],
[anyone|plyr, "hobbit_general_talk_ask_3", [
(try_begin),
(eq, "$g_talk_troop", "trp_merry_notmet"),
(str_store_string, s1, "@Merry"),
(else_try),
(str_store_string, s1, "@Pippin"),
(try_end)],
"I'm sorry, {s1}, but I do not have the time.","hobbit_general_talk_ask_reject",[]

[trp_merry_notmet, "hobbit_general_talk_second_met", [], "Oh, that must have been my dear cousin! Peregrin Took, or Pippin, how they call him. We are Hobbits, {sir/madam}, and we come from the Shire, both of us! Good old Pippin, I wonder how he is doing in Minas Tirith.","hobbit_general_talk_3",[] ],
],

[trp_pippin_notmet, "hobbit_general_talk_second_met", [], "Oh, that must have been my dear cousin! Meriadoc Brandybuck, or Merry, how they call him. We are Hobbits, {sir/madam}, and we come from the Shire, both of us! Good old Merry, I wonder how he is doing back in Edoras.","hobbit_general_talk_3",[] ],

[anyone, "hobbit_general_talk_ask_accept", [
(store_random_in_range, ":random", 0, 3),
(try_begin),
(eq, "$g_talk_troop", "trp_merry_notmet"),
(try_begin),
(eq, ":random", 0),
(str_store_string, s1, "@Tell him I've grown another inch!"),
(else_try),
(eq, ":random", 1),
(str_store_string, s1, "@Tell Pip he smokes too much!"),
(else_try),
(str_store_string, s1, "@Tell him I can ride a grown horse now!"),
(try_end),
(else_try),
(try_begin),
(eq, ":random", 0),
(str_store_string, s1, "@Ask him if he has any pipe-weed left!"),
(else_try),
(eq, ":random", 1),
(str_store_string, s1, "@Tell him I'll be the tall one when we see each other again!"),
(else_try),
(eq, ":random", 2),
(str_store_string, s1, "@Ask if he's seen Gandalf!"),
(try_end),
(try_end)],
"Thanks! {s1}","close_window",[(call_script, "script_stand_back")]
],


[anyone, "hobbit_general_talk_ask_reject", [
(try_begin),
(eq, "$g_talk_troop", "trp_merry_notmet"),
(str_store_string, s1, "@Minas Tirith"),
(else_try),
(str_store_string, s1, "@Edoras"),
(try_end)],
"I understand. I'll send it to the next caravan to {s1} then.","hobbit_general_talk_3",[]

],

## Kham - Hobbit Request END

[anyone|plyr, "hobbit_general_talk_3", [], "Well, goodbye now.","close_window",[ (call_script,"script_stand_back"), ] ],

# phase 2: any other time
[trp_merry, "start", [], "Welcome back, {playername}!","hobbit_merry_talk_met",[] ],
[trp_pippin, "start", [], "Welcome back, {playername}!","hobbit_pippin_talk_met",[] ],

##Kham - Hobbit Deliver Start

[anyone|plyr, "hobbit_merry_talk_met", [
(check_quest_active, "qst_deliver_message_hobbit")],
"Hello, messer Merry. I have a message here from your cousin, Pippin, in Minas Tirith.","hobbit_deliver_message",[]
],

[anyone|plyr, "hobbit_pippin_talk_met", [
(check_quest_active, "qst_deliver_message_hobbit")],
"Hello, messer Pippin. I have a message here from your cousin, Merry, in Edoras.","hobbit_deliver_message",[]
],

[anyone, "hobbit_deliver_message", [],
"Thank you, {playername}. It was good of you to bring this to me.","close_window",[
(agent_set_animation, "$current_player_agent", "anim_cancel_ani_stand"),
(call_script, "script_finish_quest", "qst_deliver_message_hobbit", 100),
(add_xp_as_reward, 250),
(display_message, "@You gained 250 experience.", color_good_news),
(try_begin),
(eq, "$g_talk_troop", "trp_merry"),
(call_script, "script_add_faction_rps", "fac_rohan", 250),
(else_try),
(call_script, "script_add_faction_rps", "fac_gondor", 250),
(try_end)],
],

##Kham - Hobbit Deliver End
##Kham - Hobbit Changes END

[anyone|plyr, "hobbit_merry_talk_met", [], "Hello, messer Merry.","close_window",[(agent_set_animation, "$current_player_agent", "anim_cancel_ani_stand")] ],
[anyone|plyr, "hobbit_pippin_talk_met", [], "Hello, messer Pippin.","close_window",[(agent_set_animation, "$current_player_agent", "anim_cancel_ani_stand")] ],

Expand Down
3 changes: 2 additions & 1 deletion ModuleSystem/module_mission_templates_TLD.py
Expand Up @@ -492,7 +492,8 @@
[
(try_for_agents, ":cur_agent"),
(agent_get_troop_id,":troop", ":cur_agent"),
(eq, ":troop", "trp_lorien_lord"),
(this_or_next|eq, ":troop", "trp_lorien_lord"),
( eq, ":troop", "trp_volunteers"), #Kham - remove 'volunteer' agent
(call_script, "script_remove_agent", ":cur_agent"),
(try_end),
])
Expand Down
13 changes: 11 additions & 2 deletions ModuleSystem/module_mission_templates_TLD_wb.py
Expand Up @@ -626,12 +626,20 @@
kham_archer_hold_fire = (1, 0, ti_once, [],
[
(assign, ":counter", 0),
(get_player_agent_no, ":player"),
(agent_get_team, ":team", ":player"),

(try_for_agents, ":agent1"),

(agent_is_active,":agent1"),
(agent_is_alive,":agent1"),
(agent_is_non_player, ":agent1"),

(agent_get_wielded_item, ":weapon", ":agent1", 0),
(ge, ":weapon", 0),
(this_or_next|item_has_property, ":weapon", itp_type_bow),
(item_has_property, ":weapon", itp_type_crossbow),

#TLD Check
(agent_get_troop_id, ":troop1", ":agent1"),
(store_proficiency_level, ":prof", ":troop1", wpt_archery),
Expand All @@ -645,7 +653,7 @@
(agent_get_position, pos3, ":agent1"),
(get_distance_between_positions, ":distance", pos3, pos2),

(agent_get_team , ":team", ":agent1"),
(agent_get_team, ":agent_team", ":agent1"),

(try_begin),
(eq, "$cheat_mode",1),
Expand All @@ -660,9 +668,10 @@
(eq, ":counter", 0),
(set_show_messages, 0),
(team_give_order, ":team", grc_archers, mordr_hold_fire),
(assign, ":counter", 1),
(eq, ":agent_team", ":team"),
(set_show_messages, 1),
(display_message, "@Your high-level archers determines that the enemy is too far away. They are holding their fire to conserve arrows until ordered otherwise.", color_good_news),
(assign, ":counter", 1),
(try_end),
(try_end),
])
Expand Down
3 changes: 3 additions & 0 deletions ModuleSystem/module_party_templates.py
Expand Up @@ -402,4 +402,7 @@

("vet_archer" ,"Veteran Archer",icon_mirkwood_elf |carries_goods(1)|pf_show_faction,0,fac_woodelf ,scout_personality,[(trp_test_vet_archer,1,1)]),

##Kham - Replacement Volunteer party template
("volunteers","Reserves",icon_generic_knight|pf_is_static,0,fac_commoners,merchant_personality,[(trp_volunteers, 1, 1)]),

]
4 changes: 4 additions & 0 deletions ModuleSystem/module_quests.py
Expand Up @@ -259,6 +259,10 @@
"{!}None"
),

("deliver_message_hobbit", "Concerning Hobbits", 0,
"{!}None"
),

# ### TLD traits
# ( "trait_elf_friend", "*TRAIT*_-Elf_Friend", 0,
# "You_have_become_highly_esteemed_by_the_Elves_and_they_now_regard_you_as_a_trusted_ally._The_influence_cost_to_recruit_elves_has_been_reduced_and_you_may_now_attempt_to_give_orders_to_elven_armies."
Expand Down

0 comments on commit 3d0153d

Please sign in to comment.