To make some use of that thread (others than shameless advertising):
The easyest way to make regional titles is by using the EndedInSettlement condition for a simple reason that only the owner of a settlement can stay in it. That way you are avoiding endless triggers for each faction, checking whether or not it is legal owner of the settlement.
Example
Code:
Trigger Acquire_Lantgravius_Alsatie
WhenToTest CharacterTurnEnd
Condition EndedInSettlement
and SettlementName Strassburg
and not FactionwideAncillaryExists Lantgravius_Alsatie
AcquireAncillary Lantgravius_Alsatie chance 100
This would make this title to available to a character of any faction holding the respective settlement - that way the respective province, provided no one else in this faction would hold it. Of course, in the final design you would add further requirements.
You see that I am using ancillaries, what is the easyest way to ensure only one character at a time holds this title per faction.
Another variation:
Code:
Trigger Acquire_Episcopus_Metensis_Family_Papal
WhenToTest CharacterTurnEnd
Condition CharFactionType papal_states
and not I_WorldwideAncillaryExists Episcopus_Metensis
and IsRegionOneOf 77
and not IsFactionHeir
and not IsFactionLeader
and not IsMarried
and Trait clerical_title = 0
Affects clerical_title 1 Chance 100
AcquireAncillary Episcopus_Metensis chance 100
In this example the character must not be the owner of the settlement but must only end his turn within the respective province. And I am using not I_WorldwideAncillaryExists instead of not FactionwideAncillaryExists. The difference is that now the respective title may not be held by any character on the map. This piece allows the Pope to appoint a Bishop of Metz if the owning faction had failed to do so.
Both codes would work for the AI as well as for the player.
Something else (this time by Dimitri_Harkov):
Code:
Trigger get_antipope_anc1
WhenToTest CharacterSelected
Condition FactionExcommunicated
and FactionLeaderTrait Emperor = 1
and not IsFactionAIControlled
and not FactionwideAncillaryExists antipope
and Trait PriestLevel >= 2
and I_EventCounter PickAntiPope = 1
AcquireAncillary antipope chance 100
This is for the player only because it requires him to actively selecet a character on the map. It is more comfortable because it avoids from characters acquiring a title accidently. Nevertheless it acquires an additional script (the part and I_EventCounter PickAntiPope = 1) to tell the player that the next guy he is clicking on will become Anti-Pope. You would also need a second trigger for the AI.
I think these would be the most common ways to start scripting a titles' system.