@Meneth or @blackninja9939: Can we maybe have some official info on that pre-trigger in (targeted) decisions thing? Because I am kinda confused now ^^
Is there a way to check all the previous rulers of a title?
Like if no other holder of a title has ever been female, and the current ruler is, you would get an event like "the first woman on the throne of x" or something.
Low-impact method: on_new_holder event, with a pre-trigger 'only_female = yes' & 'trigger = { FROM = { NOT = { any_previous_holder = { is_female = yes } } } }'.From the title scope, you can check it using
Code:any_previous_holder = { is_female = no }
However, to keep the event from triggering multiple times (as any_previous_holder won't include the current holder), it might be smarter to set a title flag once you get the first female ruler (and thus trigger the event) and check for
Code:NOT = { has_title_flag = first_female_holder }
Change the trigger:Thanks for your help! Is there also a way to check the number of previous rulers of a title?
It wouldn't make much sense to have "the first woman on the throne of x" event if she's only the second or third ruler of a title.
trigger = {
FROM = {
any_previous_holder = { count = 4 }
NOT = { any_previous_holder = { is_female = yes } }
}
}
Technically not modding, but I feel like it belongs here.
Since the game auto-generates missing title holders on game start, does it do the same if you load a savegame that's missing holders for certain titles?
trigger = {
FROM = {
any_previous_holder = { count = 4 }
NOT = { any_previous_holder = { is_female = yes } }
}
}
Does this code work if there have been more than 4 previous male rulers?Code:trigger = { FROM = { any_previous_holder = { count = 4 } NOT = { any_previous_holder = { is_female = yes } } } }
Or would count > 4 fix this?