If you only care about settlement-related conditions:
Code:
monitor_event SettlementTurnStart SettlementName Rome
and I_SettlementOwner Rome = romans_julii
and SettlementBuildingExists >= small_temple_of_war
console_command create_unit Rome "roman hastati" 2
end_monitor
If you want to check both settlement- and character-related conditions, you need to monitor an event that exports both settlement and character records. For example, CharacterTurnEnd...
Code:
monitor_event CharacterTurnEnd GovernorLoyaltyLevel >= loyalty_rioting
;if there is more than one character present and you don't care which one of them is the governer, use SettlementLoyaltyLevel instead
and SettlementName Rome
and I_SettlementOwner Rome = romans_julii
and SettlementBuildingExists >= small_temple_of_war
and Trait Inspiring > 2
console_command create_unit Rome "roman hastati" 2
end_monitor
You can't check settlement population size directly, but you might be able to get a rought estimate based on the level of bulding(s) present.