Thanks for the ideas\input. It would seem that the larger problem remains how to define a reliable trigger mechanism for the actual recruitment stop.
I am actually thinking of revisiting the unit point system (originally used in DLV I believe), that appears to be the most accurate so far. It's points granted by settlements (the higher the level the more points) versus units trained\disbanded. There was a provision for non-scriptable events like bribing, I'll have to go through the various (38) parts.
Edit: I have run into a bit of a messy situation. I want to test the loss of a settlement and make it IF compliant because of all the factions and the multiple levels of settlements. Now the capture of a settlement is straight forward as I can simply test whose faction's round (faction_turn counter) it was:
Code:
; --- Settlement captured level 5 ---
monitor_event GeneralCaptureSettlement TrueCondition
and SettlementBuildingExists == huge_stone_wall_stone_wall
if I_Compare_Counter [faction]_turn > 0
inc_counter factionsize_[faction] 30
end_if
end_monitor
It get's messy when I want to test for the loss as it appears I will have to use the TargetFactionType condition without possible use of IF to reduce the number of monitors:
Code:
; --- Settlement lost level 2 ---
monitor_event GeneralCaptureSettlement TargetFactionType [faction]
and SettlementBuildingExists == wooden_wall
inc_counter factionsize_[faction] -15
end_monitor
I was thinking of resetting the factionsize counter at slave turn end or PreFactionTurnStart and then using SettlementTurnStart to build up that number again - but somehow I think that will not work if I want to disable the recruiting, certainly not in the present round. It just isn't feasible to have 5 monitors (wall level check) per faction instead of just 5 monitors.
This won't work either (unless I have the turn counters for factions 2-31 listed in one IF loop and then in 29 combinations - I rather shoot myself).
Code:
; --- Settlement lost level 1 ---
monitor_event GeneralCaptureSettlement TrueCondition
and SettlementBuildingExists == wooden_pallisade
if I_Compare_Counter [faction1]_turn < 1 ; possible defender (not the faction's turn)
and I_Compare_Counter [faction2]_turn > 0 ; attacker (it's this faction's turn)
inc_counter factionsize_[faction1] -10
end_if
if I_Compare_Counter [faction1]_turn < 1
and I_Compare_Counter [faction3]_turn > 0
inc_counter factionsize_[faction1] -10
end_if
...
...
...
end_monitor
What would happen if I use the 'smaller' token for faction 1 and the 'bigger\equal' token for all others? (I can live with scripting that - it's actually extremely easy in two steps)
Code:
; --- Settlement lost level 1 ---
monitor_event GeneralCaptureSettlement TrueCondition
and SettlementBuildingExists == wooden_pallisade
if I_Compare_Counter [faction1]_turn < 1
and I_Compare_Counter [faction2]_turn >= 0
and I_Compare_Counter [faction3]_turn >= 0
and I_Compare_Counter [faction4]_turn >= 0
...
...
inc_counter factionsize_[faction1] -10
end_monitor
end_if
if I_Compare_Counter [faction2]_turn < 1
and I_Compare_Counter [faction1]_turn >= 0
and I_Compare_Counter [faction3]_turn >= 0
and I_Compare_Counter [faction4]_turn >= 0
...
...
inc_counter factionsize_[faction2] -10
end_monitor
end_if
end_monitor