ok, I need some help with module_dialogs.py.... I added a bunch of town_walkers to my tavern scenes by modifying the bottom of the town_tavern game_menu.
my problem is the $talk_content flag.... If I set it to tc_town_talk then the town_walker dialog works fine but the merc dialog doesn't. If I set it to tc_tavern_talk then everybody's dialog is a merc....
so I left it as tc_tavern_talk and tried modifying all the town_dweller talk in module_dialogs.py, some random examples....
However, town walkers still act as mercs with the hire dialog.... So I tried adding an is_between but that is not working either. Actually, looking at this now my logic is probably wrong since I'm checking a party id is between a troop id? But regardless, I think there is a bigger issue with the concept of what I am trying to do..... Should I just make up a completely new set of tavern dialog for the tavern walkers and don't try re-using the town walker dialog ? If so, what is the best way to add new dialog so the merc dialog worked and non-mercs just had some random drunken text....
edit:
maybe I should just make a new cantina_patron dialog similar to how they do the do it more like the tavern_keeper dialog? I'll test this concept later...
edit2: ok, creating a new dialog for the cantina walkers worked the best using the concept similar to the tavernkeeper. problem solved.
Code:
###### CANTINA WALKER TESTING START ########################################################
#(assign, "$talk_context", tc_town_talk), #DON'T USE THIS OR THE MERC DIALOG BREAKS, BUT IF YOUTURN IT OFF THEN THE WALKERS BREAK.....
(store_random_in_range, ":walker_troop_id", cantina_walkers_begin, cantina_walkers_end),
(set_visitor,32,":walker_troop_id"),
(store_random_in_range, ":walker_troop_id", cantina_walkers_begin, cantina_walkers_end),
(set_visitor,33,":walker_troop_id"),
.............
###### CANTINA WALKER TESTING END ########################################################
my problem is the $talk_content flag.... If I set it to tc_town_talk then the town_walker dialog works fine but the merc dialog doesn't. If I set it to tc_tavern_talk then everybody's dialog is a merc....
so I left it as tc_tavern_talk and tried modifying all the town_dweller talk in module_dialogs.py, some random examples....
[anyone,"start", [
#SW - added tc_town_talk and tc_tavern_talk so town_walker dialog would work in tavern
(this_or_next|eq, "$talk_context", tc_town_talk),
(eq, "$talk_context", tc_tavern_talk),
#(eq, "$talk_context", 0),
(is_between,"$g_talk_troop",walkers_begin, walkers_end),
], "Good day, {sir/madam}.", "town_dweller_talk",[(assign, "$welfare_inquired", 0),(assign, "$rumors_inquired",0),(assign, "$info_inquired",0)]],
[anyone|plyr,"town_dweller_talk", [
#SW - added tc_town_talk and tc_tavern_talk so town_walker dialog would work in tavern
(this_or_next|eq, "$talk_context", tc_town_talk),
(eq, "$talk_context", tc_tavern_talk),
.......
However, town walkers still act as mercs with the hire dialog.... So I tried adding an is_between but that is not working either. Actually, looking at this now my logic is probably wrong since I'm checking a party id is between a troop id? But regardless, I think there is a bigger issue with the concept of what I am trying to do..... Should I just make up a completely new set of tavern dialog for the tavern walkers and don't try re-using the town walker dialog ? If so, what is the best way to add new dialog so the merc dialog worked and non-mercs just had some random drunken text....
[anyone, "start", [
(eq, "$talk_context", tc_tavern_talk),
#SW - added so town_walker dialogs would work in cantina
(try_begin),
(is_between, "$g_encountered_party", mercenary_troops_begin, mercenary_troops_end),
(party_get_slot, ":mercenary_troop", "$g_encountered_party", slot_center_mercenary_troop_type),
(party_get_slot, ":mercenary_amount", "$g_encountered_party", slot_center_mercenary_troop_amount),
(gt, ":mercenary_amount", 0),
(store_sub, reg3, ":mercenary_amount", 1),
(store_sub, reg4, reg3, 1),
(call_script, "script_game_get_join_cost", ":mercenary_troop"),
(assign, ":join_cost", reg0),
(store_mul, reg5, ":mercenary_amount", reg0),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(val_min, ":mercenary_amount", ":free_capacity"),
(store_troop_gold, ":cur_gold", "trp_player"),
(try_begin),
(gt, ":join_cost", 0),
(val_div, ":cur_gold", ":join_cost"),
(val_min, ":mercenary_amount", ":cur_gold"),
(try_end),
(assign, "$temp", ":mercenary_amount"),
(try_end),
],
"Do you have a need for mercenaries, {sir/madam}?\
{reg3?Me and {reg4?{reg3} of my matesne of my mates} are:I am} looking for a master.\
We'll join you for {reg5} credits.", "mercenary_tavern_talk", []],
edit:
maybe I should just make a new cantina_patron dialog similar to how they do the do it more like the tavern_keeper dialog? I'll test this concept later...
Code:
[anyone ,"start", [
(store_conversation_troop,reg(1)),
(ge,reg(1),tavernkeepers_begin),
(lt,reg(1),tavernkeepers_end)
],
"Good day dear {sir/madam}. How can I help you?", "tavernkeeper_talk",
edit2: ok, creating a new dialog for the cantina walkers worked the best using the concept similar to the tavernkeeper. problem solved.