Bah now the whole thing isn't working...
I guess I start again... this scripting stuff is kinda fun, like lego but not so obvious
edit:
Code:
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge = 2
and ProbabilitySuccess =< 95
and ProbabilitySuccess > 5
and I_EventCounter research_accepted = 1
inc_counter england_points 4
end_monitor
Lots of those will do the job. I can't see another way to do it. I haven't found an 'if' statement that can work yet. In the example above there needs to be no irrelevant interuption between everything until 'inc_counter england_points 4'. I can't vary them on an eventcounter because an event does not provide the info the next line needs.... apparently...
edit:
I had a nice extra idea when I saw this condition: GeneralWithAncKilled
We could have AI only ancillaries that have names like 'important documents', which gives them a big bonus to personal security but gives you a large reward of research points should you manage to kill him in battle. Just an idea...
Conditions like InEnemyLands and IsBesieging could be good for a trait or anc that affects personal security too...
edit:
Unfortunately 'lots of those' is a massive understatement. I'd need 420 of those to do what I want with spying missions. And that's totally ignoring the object of the spying beyond it's faction and difficulty. Bonus for spying on a settlement which has X building and so many of Y units... there is so much to add to this, thinking about subtracting from it at this stage is ing annoying.
420 monitors might impact performance (yep I'm clueless) so I might need to scrap the whole section and think of a different way to approach it.
edit:
So far I'm at this point:
Code:
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge > 3
and Attribute Subterfuge < 6
and ProbabilitySuccess < 41
and ProbabilitySuccess > 20
inc_counter england_points 1
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge > 3
and Attribute Subterfuge < 6
and ProbabilitySuccess < 21
inc_counter england_points 2
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge > 5
and Attribute Subterfuge < 8
and ProbabilitySuccess < 41
and ProbabilitySuccess > 20
inc_counter england_points 1
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge > 5
and Attribute Subterfuge < 8
and ProbabilitySuccess < 21
and ProbabilitySuccess > 10
inc_counter england_points 2
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge > 5
and Attribute Subterfuge < 8
and ProbabilitySuccess < 11
inc_counter england_points 3
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge > 7
and Attribute Subterfuge < 10
and ProbabilitySuccess < 41
and ProbabilitySuccess > 25
inc_counter england_points 1
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge > 7
and Attribute Subterfuge < 10
and ProbabilitySuccess < 26
and ProbabilitySuccess > 10
inc_counter england_points 2
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge > 7
and Attribute Subterfuge < 10
and ProbabilitySuccess =< 21
and ProbabilitySuccess > 15
inc_counter england_points 3
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge > 7
and Attribute Subterfuge < 10
and ProbabilitySuccess < 6
inc_counter england_points 4
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge = 10
and ProbabilitySuccess < 41
and ProbabilitySuccess > 30
inc_counter england_points 1
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge = 10
and ProbabilitySuccess < 31
and ProbabilitySuccess > 20
inc_counter england_points 2
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge = 10
and ProbabilitySuccess < 21
and ProbabilitySuccess > 10
inc_counter england_points 3
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge = 10
and ProbabilitySuccess < 11
and ProbabilitySuccess > 5
inc_counter england_points 4
end_monitor
monitor_event SpyMission FactionIsLocal
and TargetFactionType england
and MissionSucceeded
and Attribute Subterfuge = 10
and ProbabilitySuccess < 6
inc_counter england_points 5
end_monitor
And just waiting to hear whether 420 event monitors will cause performance problems before moving on to the next bits. However correct it turns out to be, it would be foolish to assume performance problems (like I have been doing) or test for them if someone can tell me.
edit:
I've just worked out that I've hit 690 event_monitors, not 420
Well that sucks, if this scripting stuff can't achieve exactly what I want then I will change what I want as required...