Here is what I have in mind. I would like the game to replenish a general's units whenever he ends his turn in a settlement. Here is what I have so far. I can't get it to work. I only tried with one general, but of course it would be preferable if the script checked all generals for all factions.

Code:
script
	declare_counter loop
	set_counter loop 0
	
		monitor_event FactionTurnStart FactionIsLocal TrueCondition
			
			monitor_conditions EndedInSettlement Quintus
			replenish_units Quintus
			end_monitor
		
		end_monitor
				
	while I_CompareCounter loop = 0
	end_while

end_script
I checked the the overall script works. If I just ask it to reposition quintus, for example, without checking EndedInSettlement, it works.