One of my modding idea was to get rid of the territorial factions and instead stick with the dinastic factions as they are more realistic in a medieval contest. If any of you have ever played Crusader Kings you can catch the concept.
So I needed to give to the faction leaders and other named characters the noble titles linked to the regions they own or rule.
So I made a test with Traits and Triggers.
I wrote a new trait:
Trait DukeVenice
Characters family
Level DogeVenice
Description DogeVenice_desc
EffectsDescription DogeVenice_effects_desc
Threshold 1
Effect Trading 5
And 2 linked triggers (these are just the ones for venice faction, unfortunately in this case you need to make one set for every faction as we're messing with faction leaders. Plus we can have different traits based on the culture/religion... Sultan of Venice comes soon to mind)
;------------------------------------------
Trigger isdogevenice_venice
WhenToTest CharacterTurnStart
Condition CharFactionType venice
and IsFactionLeader
and I_SettlementOwner Venice = venice
and Trait DukeVenice <1
Affects DukeVenice 1 Chance 100
;------------------------------------------
Trigger isnodogevenice_venice
WhenToTest CharacterTurnStart
Condition CharFactionType venice
and IsFactionLeader
and not I_SettlementOwner Venice = venice
and Trait DukeVenice =1
Affects DukeVenice -1 Chance 100
This is the result (which I am very happy with )
I'm still wondering how many things can modders link to titles..