Several things to help to do that
To forbid to recruit an unit before an event
Code:
recruit_pool "Archer Militia" 1 0.7 4 0 requires factions { england, bourgogne, } and event_counter knights_appear 1
First you can control when events appear or no
To forbid to recruit an unit After an event
Code:
recruit_pool "Archer Militia" 1 0.7 4 0 requires factions { england, bourgogne, } and not event_counter knights_appear 1
code
event
For controlling what guild will be avalaible you can use the model of chapters
(in export_descr_guilds.txt)
Code:
Guild templars_chapter_house
building guild_templars_chapter_house
exclude st_johns_chapter_house
levels 100 250 500
For the faction recruitment ability well it is simply using what has been said here (I used that in the Orders mod)
the exemple here is:
Code:
st_johns_hq city requires factions { hungary, poland, papal_states, milan, sicily, venice, } and event_counter knights_appear 1
{
capability
{
recruit_pool "Knights Hospitaller" 1 0.7 6 0 requires factions { milan, venice, papal_states, sicily, poland, hungary, }
recruit_pool "Dismounted Knights Hospitaller" 1 0.7 6 0 requires factions { milan, venice, papal_states, sicily, poland, hungary, }
population_health_bonus bonus 3
}
faction_capability
{
recruit_pool "Knights Hospitaller" 1 0.5 4 0 requires factions { milan, venice, papal_states, sicily, poland, hungary, }
recruit_pool "Dismounted Knights Hospitaller" 1 0.5 4 0 requires factions { milan, venice, papal_states, sicily, poland, hungary, }
}
material stone
construction 1
cost 3000
settlement_min huge_city
upgrades
with all that, you can do what you wanted to do