Lionheart2
Veteran
I have designed a new simple trigger that checks the loyalty of a center. Basically, each week a random center is selected. This center is assigned a value (1 or 2), and if the value equals 2, it is either is reinforced if it belongs to its original faction, or returned to its original faction "without a fight", but the garrison is very small. Feel free to use in any mod.
Paste at the top of module_simple_triggers.py, after the "simple_triggers = [ "
I may add a Lord Loyalty Check to this in the future.
Paste at the top of module_simple_triggers.py, after the "simple_triggers = [ "
Code:
(240, #Every 10 days
[
# (assign, ":cur_party", -1),
# (assign, ":orig_faction", -1),
(store_random_in_range, ":cur_party", walled_centers_begin, walled_centers_end),
(try_begin),
(eq, ":cur_party", slot_last_choice),
(store_random_in_range, ":cur_party", walled_centers_begin, walled_centers_end),
(try_end),
(store_faction_of_party, ":cur_faction", ":cur_party"),
(party_get_slot, ":orig_faction", ":cur_party", slot_center_original_faction),
(store_random_in_range, ":chance",1,3), # Fifty-fifty chance I believe
#If test passes and original faction still is in control, recieve reinforcements
(try_begin),
(eq, ":chance", 2),
(eq, ":cur_faction", ":orig_faction"),
(call_script, "script_cf_reinforce_party", ":cur_party"), #Reinforce Twice
(call_script, "script_cf_reinforce_party", ":cur_party"),
(else_try),
(eq, ":chance", 2),
(neq, ":cur_faction", ":orig_faction"),
(neq, ":cur_faction", "fac_player_supporters_faction"),
(party_clear, ":cur_party"),
(call_script, "script_give_center_to_faction_aux", ":cur_party", ":orig_faction"),
(call_script, "script_cf_reinforce_party", ":cur_party"), #Add a miniscule garrison
(try_end),
(assign, ":cur_party", slot_last_choice),
# (party_set_faction,":cur_party", "orig_faction"),
]),
I may add a Lord Loyalty Check to this in the future.