The problem with ai_X factors is that it isn't targeted, so it will be more like global peace and not a targeted peace between 2 people.
What you COULD do is add a trait to each person and put the trait into the CB requirements. So the CB could not be used as long as they have the traits. Then just add a timer to remove the traits after X amount of time.
It will require editing each CB in the game, I want to avoid modding too much the vanilla files.
This way my mod will be more compatible and cause less trouble when new versions or DLCs will arrive.
Didn't notice "between two characters" part.
In that case you could make custom CB with long enough truce to cover character's lifespan and no prestige or wealth gains when white-peacing, declare war using this CB or and white-peace the war. Although it won't look too pretty - there will be some pop-ups and possibly stopped feast tournament.
EDIT: I tested it and it works, but only for one character, if you try to give truce the same way to other character the first char's truce will be lost.
My costume CBs are already set and well timed, But the problem is with the vanilla CBs, I don't wanna touch them, for the same reason I mentioned above.
Look I will more or less try to explain the situation I got:
There are two major wars:
- The Norse Invasion of England - Leaders: Jorvik vs. Mercia (Includes Wessex and other Anglo-Saxons defending)
- The Saxon Reconquest of England - Leaders: Wessex vs. Jorvik (And many other Norse guys defending)
Well as you see,
Wessex participated in the first war (A really intensive war) but the war was targeted at
Mercia (because of strategic, tactical and historical reasons) So
Wessex won't get truce with
Jorvik, what will later allow for both of them declare wars on each other in the peace period (Three years, when Athelred dies and Alfred the Great gains the Wessexian throne, only then he declares his counter attack against Jorvik).
It's a bit complicated yeah, but I really have to get Wessex and Jorvik calm down for just THREE years between these two critical wars. Just until Alfred reigns on Wessex.
This war will mete out the fate of England, and any interruption will ruin the entire scene.
So far, They declare sometimes lesser Holy Wars on each other to conquer some counties or a duchy, this really kills the timed war by Athelred's death and Alfred's reign.