Thanks Somebody, now I know how to check for gender. What I ended up doing was adding a global to both scripts, activate drunk and activate strumpet without a specific gender check because it's already guaranteed according to which script is called. The dialog as such:
In other news: FFS! What is the problem with the operations in this dialog? Any variation that I've tried, including store_conversation_troop, will compile without error. This along with the current arrangement produce no script errors but will not work. Using agent_get_troop_id causes script error notifications within the game, though it was used by itself and in conjunction with store_conversation_troop within a try_begin. I'm assuming that store_conversation_troop stores the name rather than the troop ID, since it refuses to work? I'm trying for a small bank of multiple instances of the same offer, based on the individual madame - which then would zero out once the offer is received, yet keep the others intact. I can't see how this_or_next would work for this and somehow, it feels as if I'm missing some basic rule here. val_add was originally "assign" until the most recent round of failure.
Also to add the current progress for the dialog module, as it is in the tester game.
#Ye Olde Tavern Strumpets
#making use of the relationship system
#need to find the way to get these characters listed and described
#consider adding male strumpets - not sure if it fits the general era
#two copies of the same character sometimes spawn in the same place - ?
#probably need to change remainder store_conversation_troop to $g_talk_troop
[anyone, "start",
[
(is_between, "$g_talk_troop", tavern_madame_begin, "trp_tavern_minstrel_1"),
(store_conversation_troop,":tlk_madame"),
(str_store_troop_name,s69,":tlk_madame"),
(call_script, "script_troop_get_player_relation",":tlk_madame"),
(ge,reg0,10),
#(store_current_hours,":cur_hours"),
#(ge,":cur_hours","$buy_strumpets_last_time"),
(try_for_range,":cur_madame",tavern_madame_begin,"trp_tavern_minstrel_1"),
#(agent_get_troop_id,":cur_madame",":madame"),
(eq,":cur_madame","trp_madame_1"),
(eq,"$g_madame_privilege_1",0),
(else_try),
(eq,":cur_madame","trp_madame_2"),
(eq,"$g_madame_privilege_2",0),
(else_try),
(eq,":cur_madame","trp_madame_3"),
(eq,"$g_madame_privilege_3",0),
(else_try),
(eq,":cur_madame","trp_madame_4"),
(eq,"$g_madame_privilege_4",0),
(else_try),
(eq,":cur_madame","trp_madame_5"),
(eq,"$g_madame_privilege_5",0),
(else_try),
(eq,":cur_madame","trp_madame_6"),
(eq,"$g_madame_privilege_6",0),
(else_try),
(eq,":cur_madame","trp_madame_7"),
(eq,"$g_madame_privilege_7",0),
(try_end),
], "Mmm {playername}. As a preferred customer, there be privileges!","madame_privilege",[]],
[anyone|plyr, "madame_privilege",
[
#(store_conversation_troop,":cur_madame"),
#(str_store_troop_name,s69,":cur_madame"),
], "That sounds very fine, {s69}.^What have ye in mind?","madame_privilege_explained",[]],
[anyone, "madame_privilege_explained",
[
(party_get_num_companions,reg30,"p_main_party"),
(gt,reg30,1),
(store_mul,reg35,reg30,5),
(val_sub,reg35,-5),
(store_troop_gold,":gold","trp_player"),
(ge,":gold",reg35),
], "Thou may treat all of thine troops for half off!^As for ye and me, it's my treat, no cost!","madame_privilege_rspns",[]],
[anyone, "madame_privilege_explained",
[
(party_get_num_companions,reg30,"p_main_party"),
(eq,reg30,1),
], "Thou deserve a quickie {playername}. My treat!","madame_privilege_quickie",[]],
[anyone|plyr,"madame_privilege_quickie",[],"On to the bedroll!","close_window",
[
(finish_mission),
(rest_for_hours,2,5,0),
(assign,"$g_leave_town",1),
(add_xp_as_reward,10),
]
],
[anyone|plyr,"madame_privilege_quickie",[],"Not today I'm afraid, I must be on my way","close_window",
[
(store_conversation_troop,":cur_madame"),
(call_script,"script_change_player_relation_with_troop",":cur_madame",-1),
]
],
[anyone, "madame_privilege_explained",
[
(party_get_num_companions,reg30,"p_main_party"),
(gt,reg30,1),
(store_mul,reg35,reg30,5),
(val_sub,reg35,-5),
(store_troop_gold,":gold","trp_player"),
(lt,":gold",reg35),
], "Soon as ye can afford {reg35} denars, more or less, come find me^and ye shall see what {s69} has in store.","madame_privilege_broke",[]],
[anyone|plyr,"madame_privilege_broke",[],"I look forward to what ye may have in store","close_window",[]],
[anyone|plyr,"madame_privilege_broke",[],"I have yet an even better idea, strumpet...","madame_betrayed",[]],
[anyone|plyr,"madame_privilege_rspns",[], "{s69}, how can I refuse? I'm yers to use and abuse!","close_window",
[
(finish_mission),
(rest_for_hours,12,5,0),
(assign,"$g_leave_town",1),
(troop_remove_gold, "trp_player", reg35),
(call_script, "script_change_player_relation_with_faction_ex", "$g_talk_troop_faction", 5),
(call_script, "script_change_player_party_morale", 20),
(call_script, "script_change_player_honor", 5),
(call_script, "script_change_player_relation_with_center", "$current_town",5),
(add_xp_as_reward, 100),
(str_store_string,s68,"str_madame_group"),
(store_current_hours,":fut_hours"),
(val_add, ":fut_hours", 24),
(assign, "$buy_strumpets_last_time", ":fut_hours"),
(try_for_range,":cur_madame",tavern_madame_begin,"trp_tavern_minstrel_1"),
#(agent_get_troop_id,":cur_madame",":madame"),
(eq,":cur_madame", "trp_madame_1"),
(assign,"$g_madame_privilege_1",0),
(else_try),
(eq,":cur_madame", "trp_madame_2"),
(assign,"$g_madame_privilege_2",0),
(else_try),
(eq,":cur_madame", "trp_madame_3"),
(assign,"$g_madame_privilege_3",0),
(else_try),
(eq,":cur_madame", "trp_madame_4"),
(assign,"$g_madame_privilege_4",0),
(else_try),
(eq,":cur_madame", "trp_madame_5"),
(assign,"$g_madame_privilege_5",0),
(else_try),
(eq,":cur_madame", "trp_madame_6"),
(assign,"$g_madame_privilege_6",0),
(else_try),
(eq,":cur_madame", "trp_madame_7"),
(assign,"$g_madame_privilege_7",0),
(try_end),
]],
[anyone|plyr,"madame_privilege_rspns",[], "{s69}, I have no time, we are merely breaking from the fray.","madame_privilege_rspns_a",[]],
[anyone|plyr,"madame_privilege_rspns_a",[], "Shall I count on yer generosity another day?","madame_privilege_n",[]],
[anyone|plyr,"madame_privilege_rspns",[], "Strumpet, hear my offer, it's even better than yours...","madame_betrayed",[]],
[anyone,"madame_privilege_n",[],"Of course {playername}, I shall hold this offer for when we next speak.","close_window",
[
(try_for_range,":cur_madame",tavern_madame_begin,"trp_tavern_minstrel_1"),
#(agent_get_troop_id,":cur_madame",":madame"),
(eq,":cur_madame","trp_madame_1"),
(val_add,"$g_madame_privilege_1",1),
(else_try),
(eq,":cur_madame","trp_madame_2"),
(val_add,"$g_madame_privilege_2",1),
(else_try),
(eq,":cur_madame","trp_madame_3"),
(val_add,"$g_madame_privilege_3",1),
(else_try),
(eq,":cur_madame","trp_madame_4"),
(val_add,"$g_madame_privilege_4",1),
(else_try),
(eq,":cur_madame","trp_madame_5"),
(val_add,"$g_madame_privilege_5",1),
(else_try),
(eq,":cur_madame","trp_madame_6"),
(val_add,"$g_madame_privilege_6",1),
(else_try),
(eq,":cur_madame","trp_madame_7"),
(val_add,"$g_madame_privilege_7",1),
(try_end),
]],
[anyone,"start",
[
(try_begin),
(is_between, "$g_talk_troop", tavern_madame_begin, "trp_tavern_minstrel_1"),
(store_conversation_troop,":tlk_madame"),
(str_store_troop_name,s69,":tlk_madame"),
(call_script, "script_troop_get_player_relation",":tlk_madame"),
(ge,reg0,10),
(try_for_range,":cur_madame",tavern_madame_begin,"trp_tavern_minstrel_1"),
#(agent_get_troop_id,":cur_madame",":madame"),
(eq,":cur_madame", "trp_madame_1"),
(eq,"$g_madame_privilege_1",1),
(else_try),
(eq,":cur_madame", "trp_madame_2"),
(eq,"$g_madame_privilege_2",1),
(else_try),
(eq,":cur_madame", "trp_madame_3"),
(eq,"$g_madame_privilege_3",1),
(else_try),
(eq,":cur_madame", "trp_madame_4"),
(eq,"$g_madame_privilege_4",1),
(else_try),
(eq,":cur_madame", "trp_madame_5"),
(eq,"$g_madame_privilege_5",1),
(else_try),
(eq,":cur_madame", "trp_madame_6"),
(eq,"$g_madame_privilege_6",1),
(else_try),
(eq,":cur_madame", "trp_madame_7"),
(eq,"$g_madame_privilege_7",1),
(try_end),
(try_end),
], "{s69} never breaks a promise {playername}.","madame_privilege",
[
]
],
[anyone, "start",
[
(is_between, "$g_talk_troop", tavern_madame_begin, "trp_tavern_minstrel_1"),
(store_conversation_troop,":cur_madame"),
(call_script, "script_troop_get_player_relation",":cur_madame"),
(lt,reg0,10),
(ge,reg0,-5),
(store_current_hours,":cur_hours"),
(ge,":cur_hours","$buy_strumpets_last_time"),
], "{My lord/My lady}. What can I, a humble servant of the flesh do for ye?", "madame_talk",[(play_sound, "snd_mmm"),]],
[anyone,"start",
[
(is_between, "$g_talk_troop", tavern_madame_begin, "trp_tavern_minstrel_1"),
(store_conversation_troop,":cur_madame"),
(call_script, "script_troop_get_player_relation",":cur_madame"),
(lt,reg0,-5),
#(ge,reg0,-15),
(store_current_hours,":cur_hours"),
(ge,":cur_hours","$buy_strumpets_last_time"),
], "My sister professionals forgive ye much more easily than I.^I'll have nothing at all to do with ye until amends are made.","madame_amends",[]],
[anyone,"start",
[
(is_between, "$g_talk_troop", tavern_madame_begin, "trp_tavern_minstrel_1"),
(store_conversation_troop,":cur_madame"),
(call_script, "script_troop_get_player_relation",":cur_madame"),
(lt,reg0,-5),
(store_current_hours,":cur_hours"),
(lt,":cur_hours","$buy_strumpets_last_time"),
(str_store_troop_name,s69,":cur_madame"),
], "Guards!","madame_squeals",[]],
[anyone|plyr,"madame_squeals",[],"What are you doing?! {s69}?","madame_squeals_x",[]],
[anyone,"madame_squeals_x",[],"{playername}, ye best leave, now.","close_window",[(finish_mission),]],#thinking of adding strumpet guards and a fight with them here.
[anyone|plyr,"madame_amends",[],"What would ye that I do?","madame_amends_demands",[]],
[anyone|plyr,"madame_amends",[],"Then suffer ye losses!","close_window",[]],
[anyone,"madame_amends_demands",[],"Thou will pay me a sum of 2000 denars for my loss and humiliation.","madame_amends_demands_ans",[]],
[anyone|plyr,"madame_amends_demands_ans",
[
(store_troop_gold,":gold","trp_player"),
(ge,":gold",2000),
], "Very well, here be yer retribution","close_window",
[
(troop_remove_gold, "trp_player", 2000),
(store_conversation_troop,":cur_madame"),
(call_script,"script_change_player_relation_with_troop",":cur_madame",10),
(call_script, "script_change_player_honor", 1),]],
[anyone|plyr,"madame_amends_demands_ans",
[
(store_troop_gold,":gold","trp_player"),
(lt,":gold",2000),
], "Alas, I shant be able to pay right away. Perhaps another day.","close_window",[]],
[anyone|plyr,"madame_amends_demands_ans",
[
(store_troop_gold,":gold","trp_player"),
(ge,":gold",2000),
], "Sweet as ye be, yer simply not worth that to me.","close_window",[]],
[anyone|plyr,"madame_amends_demands_ans",[],"Humiliation is ye life strumpet, now live it!","madame_betrayed",[]],
[anyone,"start",
[
(is_between, "$g_talk_troop", tavern_madame_begin, "trp_tavern_minstrel_1"),
(store_conversation_troop,":cur_madame"),
(call_script, "script_troop_get_player_relation",":cur_madame"),
(ge,reg0,-5),
(store_current_hours,":cur_hours"),
(lt,":cur_hours", "$buy_strumpets_last_time"),
],"{s68}","close_window",[]],
[anyone, "madame_choose",[],"{playername}, I am at ye service anyway ye like.", "madame_talk",[]],
[anyone|plyr, "madame_talk",
[
(party_get_num_companions,reg30,"p_main_party"),
(gt,reg30,1),
(store_mul,reg35,reg30,10),
(store_troop_gold,":gold","trp_player"),
(ge,":gold",reg35),
],"We work hard, now we need play. On the to bedrolls, come what may this day!","madame_ans1",[]],
[anyone|plyr, "madame_talk",
[
(store_troop_gold,":gold","trp_player"),
(ge,":gold",15),
],"Just ye and me, queen strumpet.", "madame_ans2",[]],
[anyone|plyr,"madame_talk",[],"My men and I will take what we want from ye.","madame_betrayed",[]],
[anyone|plyr, "madame_talk",[],"Filthy whore, I love war!", "madame_angry",
[
(store_conversation_troop,":cur_madame"),
(call_script,"script_change_player_relation_with_troop",":cur_madame",-1),
(store_current_hours,":fut_hours"),
(val_add, ":fut_hours", 18),
(assign, "$buy_strumpets_last_time", ":fut_hours"),
]
],
[anyone|plyr, "madame_talk", [],"No thanks.", "close_window",[(play_sound, "snd_sigh"),]],
[anyone, "madame_ans1", [],
"To the gods and goddesses we shall dedicate our orgy!^{playername}, a fee of {reg35} denars should suffice for our trife.","madame_ans1a",[]],
# [anyone, "madame_ans2", [],"{playername} is selfish I see, 15 will suffice for ye and me.", "madame_ans2a",[]],
[anyone, "madame_ans2", [],"What a greedy {cock/****} ye be, 15 will suffice for ye and me.", "madame_ans2a",[]],
[anyone,"madame_betrayed",[],"We shant rest until we taste the fruits of revenge! Is that really what ye want?","madame_betray_ans",[]],
[anyone|plyr,"madame_betray_ans",[],"On second thought, we leave ye be.","close_window",
[
(str_store_string,s68,"str_madame_play"),
(store_current_hours,":fut_hours"),
(val_add, ":fut_hours", 36),
(assign, "$buy_strumpets_last_time", ":fut_hours"),
(store_conversation_troop,":x_madame"),
(call_script, "script_troop_change_relation_with_troop", "trp_player", ":x_madame", -1),
(str_store_troop_name,s69,":x_madame"),
]
],
[anyone|plyr,"madame_betray_ans",[],"Men! Defile these creatures as ye will! I'll have this one!","madame_betray_rsp",
[
(store_current_hours,":fut_hours"),
(val_add, ":fut_hours", 168),
(assign, "$buy_strumpets_last_time", ":fut_hours"),
]
],
[anyone|plyr,"madame_betray_ans",[],"Oops!","close_window",[]],
[anyone,"madame_betray_rsp",
[
(store_conversation_troop,":x_madame"),
(str_store_troop_name,s69,":x_madame"),
], "Thou vile, evil soul! Let it be known that^{s69} will stand for no such thing!","close_window",
[
(call_script, "script_activate_tavern_strumpet"),
(call_script, "script_neutral_behavior_in_fight"),
(set_spawn_radius,1),
(spawn_around_party,"p_main_party","pt_betrayed_strumpets"),
(call_script, "script_change_player_honor",-10),
(call_script, "script_change_player_relation_with_faction_ex", "$g_talk_troop_faction", -5),
(call_script, "script_change_player_party_morale", 5),
(call_script, "script_change_player_relation_with_center", "$current_town",-5),
(store_conversation_troop,":x_madame"),
(call_script, "script_change_player_relation_with_troop", ":x_madame", -10),
(str_store_string,s68,"str_madame_betrayed"),
]
],
[anyone|plyr, "madame_ans2a", [],"Then ye and me it shall be, here are your 15 coins.", "close_window",
[
(finish_mission),
(rest_for_hours,4,5,0),
(assign,"$g_leave_town",1),
(store_current_hours,":fut_hours"),
(val_add, ":fut_hours", 12),
(assign, "$buy_strumpets_last_time", ":fut_hours"),
(troop_remove_gold, "trp_player", 15),
(call_script, "script_change_player_party_morale", -10),
(call_script, "script_change_player_honor", -1),
(add_xp_as_reward, 10),
(str_store_string,s68,"str_madame_paid"),
(store_conversation_troop,":cur_madame"),
(call_script,"script_change_player_relation_with_troop",":cur_madame",1),
]
],
[anyone|plyr, "madame_ans2a", [],"Actually, I'm not feeling it.", "madame_choose",[]],
[anyone|plyr, "madame_ans1a", [],"To the higher powers! Here are yer {s30} coins.", "close_window",
[
(finish_mission),
(rest_for_hours,12,5,0),
(assign,"$g_leave_town",1),
(store_current_hours,":fut_hours"),
(val_add, ":fut_hours", 24),
(assign, "$buy_strumpets_last_time", ":fut_hours"),
(troop_remove_gold, "trp_player", reg35),
(call_script, "script_change_player_relation_with_faction_ex", "$g_talk_troop_faction",2),
(call_script, "script_change_player_party_morale", 20),
(call_script, "script_change_player_honor", 5),
(call_script, "script_change_player_relation_with_center", "$current_town",2),
(add_xp_as_reward, 100),
(str_store_string,s68,"str_madame_group"),
(store_conversation_troop,":cur_madame"),
(call_script,"script_change_player_relation_with_troop",":cur_madame",2),
]
],
[anyone|plyr, "madame_ans1a", [],"Actually, I'm not feeling it.", "madame_choose",[]],
[anyone, "madame_angry", [],
"Oh? Everyone! {playername} is an impotent flounder! And ye expect to rule when ye are not virile enough for me? The people will hear of this!", "close_window",
[
(store_conversation_troop,":cur_madame"),
(call_script, "script_change_player_relation_with_troop",":cur_madame",-1),
(call_script, "script_change_player_relation_with_faction_ex", "$g_talk_troop_faction",-1),
(call_script, "script_change_player_relation_with_center", "$current_town",-1),
(str_store_string,s68,"str_madame_offended"),]],
#/Ye Olde Tavern Strumpets
So, until any possible suggestions, I'm going to try using the global rather than the local variables for troop. Everything just looks sloppy, where usage is concerned, but this
a learning process.