Example of code for military buildings, which require a governor to be present:
Code:
stables castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter governor_present 1
knights_stables castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter governor_present 1
barons_stables castle requires factions { scotland, denmark, hre, france, england, middle_eastern, eastern_european, greek, southern_european, } and event_counter governor_present 1
earls_stables castle requires factions { scotland, denmark, hre, france, england, middle_eastern, eastern_european, greek, southern_european, } and event_counter governor_present 1
Example for various "royal" military buildings, which require FL to be resident governor:
Code:
kings_stables castle requires factions { hre, france, middle_eastern, eastern_european, greek, venice, } and event_counter monarch_resident 1
Example of code which prevents recruitment of priests if faction is excommunicated. This applies to AI as well.
Code:
small_church city requires factions { normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, }
{
convert_to 0
capability
{
agent priest 0 requires factions { normans, denmark, scotland, hre, france, england, } and not event_counter interdict 1
agent priest 0 requires factions { hungary, poland, } and not event_counter interdict 1
agent priest 0 requires factions { papal_states, portugal, spain, sicily, milan, venice, } and not event_counter interdict 1
happiness_bonus bonus 1
religion_level bonus 1
; pope_disapproval 1
agent_limit priest 1
}
material wooden
construction 1
cost 800
settlement_min town
upgrades
{
church
}
}