Fancy! It does indeed work. Did not know e_select_character works within if-statements. Assumed that it would lose track of the character the monitor fired on, good to know.
I tried AssassinationMission without any further conditions and did not fire. Maybe it only checks the assassin character record or it does not consider "killed_by_any_means", i.e. killed in battle, as a valid completion.
2 seconds are not too bad considering the animation times of the strat models and possible post battle decisions, might even risk going a bit lower with the wait duration. Could disable ui functionality during the small pause as well, just to make sure.
Regarding your linked thread, I gather that the only problem would occur if the mission target attacks a settlement with more than one governor and the defenders kill the mission target. At which point e_select_character would not select either of the garrisoned characters and nobody gets the reward trait... well sucks, but not the end of the world. Then the next selected general (who has fought a battle since the mission was active) would get the reward. Might be able to prevent that rare case with a reset of the event counter just after e_select_character.
This is what I got so far:
script:
Code:
monitor_event PreBattlePanelOpen
set_event_counter grudge_target_killed 0
end_monitor
monitor_event LeaderMissionSuccess MissionID dwarf_grudge
set_event_counter grudge_target_killed 1
end_monitor
monitor_event PostBattle FactionType poland
if I_PlayerHasMissionType GRUDGE_MISSION
campaign_wait 1.5
if I_EventCounter grudge_target_killed = 1
e_select_character
campaign_wait 0.1
set_event_counter grudge_target_killed 0
end_if
end_if
end_monitor
EDCT:
Code:
Trigger temp_grudge_settler_vnv_trigger
WhenToTest PostBattle
Condition FactionType poland
and I_PlayerHasMissionType GRUDGE_MISSION
and Trait TempGrudgeSettler < 1
Affects TempGrudgeSettler 1 Chance 100
Trigger successful_grudge_settler_vnv_trigger
WhenToTest CharacterSelected
Condition FactionType poland
and Trait TempGrudgeSettler > 0
and I_EventCounter grudge_target_killed = 1
Affects TempGrudgeSettler -1 Chance 100
Affects GoodGrudgeSettler 1 Chance 100
Trigger remove_temp_grudge_settler_vnv_trigger
WhenToTest CharacterSelected
Condition FactionType poland
and Trait TempGrudgeSettler > 0
Affects TempGrudgeSettler -1 Chance 100
Will need to test the system some more, but it seems to be doing its job, thank you very much for the help!