You might have noticed the submod was based on 3.0? (credits says it all)Tuco 说:
But you cannot take fiefs back from a lord. So that's no help here.Articulo34 说:
But why a local variable can't be used within the same ([conditions],"text",[consequences]) (like in a simple menu) is unclear to me, where's the logic? Why either having a global variable if you don't use it global or have to put almost all the same stuff from the conditions into the consequences if it's based on the same thing (like my example with spouse/betrothed dialog)?Dusk Voyager 说:
("spouse_dialog",
[
(try_begin),
(troop_get_slot, "$spouse_betrothed", "trp_player", slot_troop_spouse),
(ge, "$spouse_betrothed", 1),
(try_begin),
##diplomacy start+ Test gender with script
#(troop_get_type, ":is_female", "trp_player"),#<- replaced
(call_script, "script_cf_dplmc_troop_is_female", "trp_player"),
#(eq, ":is_female", 1),#<- replaced
##diplomacy end+
(str_store_string, s8, "str_husband"),
(else_try),
(str_store_string, s8, "str_wife"),
(try_end),
(else_try),
(le, "$spouse_betrothed", 0),
(troop_get_slot, "$spouse_betrothed", "trp_player", slot_troop_betrothed),
(ge, "$spouse_betrothed", 1),
(str_store_string, s8, "str_betrothed"),
(try_end),
(ge, "$spouse_betrothed", 1),
(str_store_troop_name, s4, "$spouse_betrothed"),
], "Talk to your {s8}, {s4}.",
[
(store_troop_faction, "$g_encountered_party_faction", "$spouse_betrothed"),
(store_relation, "$g_encountered_party_relation", "$g_encountered_party_faction", "fac_player_faction"),
(call_script, "script_setup_troop_meeting", "$spouse_betrothed", -1),
]
),
# CHECKS IF PLAYER WON THE REVOLT
(1.0, 0, 0, [
(eq, "$freelancer_state", 0),
(gt, "$enlisted_party", 0),
(neg|party_is_active, "$enlisted_party"),
(store_troop_faction, ":commander_faction", "$enlisted_lord"),
(store_relation, ":relation", "fac_player_supporters_faction", ":commander_faction"),
(lt, ":relation", 0),
(party_get_attached_party_with_rank, ":attached_party", "p_main_party", 0),
(eq, "p_temp_party_2", ":attached_party"),
],
[
(assign, "$enlisted_party", -1),
(party_detach, "p_temp_party_2"),
(store_skill_level, ":cur_leadership", "skl_leadership", "trp_player"),
(store_skill_level, ":cur_persuasion", "skl_persuasion", "trp_player"),
(store_add, ":chance", ":cur_persuasion", ":cur_leadership"),
(val_add, ":chance", 10),
(store_random_in_range, ":prisoner_state", 0, ":chance"),
(try_begin),
(is_between, ":prisoner_state", 0, 5),
(call_script, "script_party_calculate_strength", "p_main_party", 0),
(assign, ":main_strength", reg0),
(call_script, "script_party_calculate_strength", "p_temp_party_2", 0),
(assign, ":temp_strength", reg0),
(ge, ":temp_strength", ":main_strength"),
(party_get_num_prisoner_stacks, ":num_stacks", "p_temp_party_2"),
(try_for_range, ":cur_stack", 0, ":num_stacks"),
(party_prisoner_stack_get_troop_id, ":cur_troops", "p_temp_party_2", ":cur_stack"),
(party_prisoner_stack_get_size, ":cur_size", "p_temp_party_2", ":cur_stack"),
(party_remove_prisoners, "p_temp_party_2", ":cur_troops", ":cur_size"),
(try_end),
(tutorial_box, "@The released prisoners were not be trusted and they are preparing to attack you!", "@Warning!"),
(start_encounter, "p_temp_party_2"),
(change_screen_map),
(else_try),
(is_between, ":prisoner_state", 5, 10),
(tutorial_box, "@The released prisoners scattered as soon as the battle finished. You will not be seeing them again.", "@Notice!"),
(party_clear, "p_temp_party_2"),
(else_try),
(tutorial_box, "@The released prisoners have remained loyal and will join your party", "@Notice!"),
(party_get_num_companion_stacks, ":num_stacks", "p_temp_party_2"),
(try_for_range, ":cur_stack", 0, ":num_stacks"),
(party_stack_get_troop_id, ":cur_troops", "p_temp_party_2", ":cur_stack"),
(party_stack_get_size, ":cur_size", "p_temp_party_2", ":cur_stack"),
(party_add_members, "p_main_party", ":cur_troops", ":cur_size"),
(try_end),
(party_clear, "p_temp_party_2"),
(try_end),
]),
SCRIPT ERROR ON OPCODE 2173: Invalid Troop ID: 13229; LINE NO: 3:
At Game Triggers trigger no: 32 conditions.
At Game Triggers trigger no: 32 conditions.