Wrote this over the course of the hours I tested after getting back.
The log actually complained about the opposite hence the reason for changing it in the first place. It was saying monitor_event in conjunction with RemainingMPPercenatge was a parsing error but it doesn't with monitor_conditions. I assume this is because its a condition, not an event hence using it with an event is incorrect? Of course I am not very good at campaign scripting.
...which is wrong too, missing the FactionType condition. So this will instead execute on every faction's FactionTurnEnd, resetting the counter, thus allowing those three stance changes to happen again on each faction's turn end.
Also amusingly enough that's exactly what I would like.
AI LTGD is working I forgot to put this part in
[ai]
ltgd_logging = true
In any case, further test results in a couple of different ways (so as to circumvent the AI LTGD being loaded >before< FactionTurnStart according to the logs I've read), however you were right about CharacterTurnStart/CharacterTurnEnd being executed before the AI LTGD, the change in screenshots stemmed from the LTGD reading AtWar for the first (without the script) and Neutral for the second with the script. Not an active reevaluation- rather a simple evaluation based on a change beforehand.
What that means is that there isn't a way (yet) to get it working exactly how we want it. I am testing something further now based on the above information.
I tried a couple different scripts, doesn't really seem to be any form that gets exactly what we want.
It would seem the console_command for diplomatic changes won't cause a reevaluation unless it is before the LTGD evaluates the descr campaign ai db decisions, only a deliberate AI overture seems to make the AI re evaluate things. This might be some sort of safeguard or simply the way the LTGD was coded, to look for a very specific diplomatic interaction involving the exe, rather than console_commands.
Notwithstanding the fact that the stance will be interpreted by the LTGD regardless of whether it was a console command or game driven change. I have a feeling it's because of something I only just seem to have understood about the LTGD and how things are re-evaluated...
There is a "parent" LTGD evaluation and a "child" re-evaluation.
Note this
1 = Carthage
20 = Numidia
It was Carthages turn, they initiated a diplomatic interaction with Numidia, presumably trade rights.
Code:
01:04:17.785 [ai.ltgd] [info] <1> LTGD: invasions cancelled this turn.
01:04:17.785 [ai.ltgd] [info] <20> LTGD: decision parameters 'f_numidia' (ai_label:f_numidia) vs faction 'f_rome':
Compared to this (0 = rome)
Code:
01:04:18.402 [ai.ltgd] [info] <0> LTGD: invasions cancelled this turn.
01:04:18.403 [game.script] [always] f_rome: Faction turn start
01:04:18.684 [game.script] [always] f_rome: Faction turn end
01:04:18.685 [game.script] [always] f_epeiros: Faction turn pre-start
01:04:18.726 [ai.ltgd] [info] <3> LTGD: decision parameters 'f_epeiros' (ai_label:f_epeiros) vs faction 'f_rome':
Anyway, what this all means is that the LTGD doesn't 'actively' reevaluate the game state. It reevaluates the game state for the child during a parents own turn. The reevaluation is based on the diplomatic action initiated by the parent factions LTGD driven decisions then creates updated 'child' decisions. So yes, the LTGD for the 'child' is updated based on game state before it's own turn or even after but not in the sense we were hoping and further, I don't think we can get a 'parent' LTGD evaluation to update twice in a row.
In short it's a bit of a lost cause due to a misunderstanding of the exact workings of the LTGD.
Unless that is, somebody else can make better sense of how the LTGD works than I can.