;This file is generated from a spreadsheet
;Please do not modify by hand


hidden_resources sparta rome italy america atlantic explorers_guild swordsmiths_guild woodsmens_guild teutonic_knights_chapter_house knights_of_santiago_chapter_house crusade jihad arguin horde_target no_pirates no_brigands metropolis desert rlondon1 rjerusalem2 rconstantinople3 rbaghdad4 rmekka5 rvenecia6 rparis7 rcordoba8 rfrankfurt9 rmoscow10

building core_building
{
    convert_to core_castle_building
    levels wooden_pallisade wooden_wall stone_wall large_stone_wall huge_stone_wall 
    {
        wooden_pallisade city requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }   
        {
            convert_to 1
            capability
            {
                wall_level 0
                tower_level 1
                free_upkeep bonus 2
		happiness_bonus bonus 2
		law_bonus bonus 2
		happiness_bonus bonus -4 requires event_counter is_the_ai 0
		law_bonus bonus -4 requires event_counter is_the_ai 0
		population_loyalty_bonus bonus -4 requires event_counter is_the_ai 0
		recruits_exp_bonus bonus 1 requires event_counter is_the_ai 1
		recruits_morale_bonus bonus 1 requires event_counter is_the_ai 1
		happiness_bonus bonus 8  requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
		law_bonus bonus 8  requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
		population_loyalty_bonus bonus 8  requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
                recruitment_slots 1
            }
            material wooden
            construction  1 
            cost  2400 
            settlement_min village
            upgrades
            {
                wooden_wall
            }
        }
        wooden_wall city requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }  and building_present_min_level market corn_exchange 
        {
            convert_to 2
            capability
            {
                wall_level 1
                gate_strength 1
                tower_level 1
                free_upkeep bonus 3
		happiness_bonus bonus 4
		law_bonus bonus 4
		happiness_bonus bonus -2 requires event_counter is_the_ai 0
		law_bonus bonus -2 requires event_counter is_the_ai 0
		population_loyalty_bonus bonus -2 requires event_counter is_the_ai 0
		recruits_exp_bonus bonus 2 requires event_counter is_the_ai 1
		recruits_morale_bonus bonus 1 requires event_counter is_the_ai 1
		happiness_bonus bonus 8  requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
		law_bonus bonus 8  requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
		population_loyalty_bonus bonus 8  requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
                recruitment_slots 2
            }
            material wooden
            construction  2 
            cost  3600 
            settlement_min town
            upgrades
            {
                stone_wall
            }
        }
        stone_wall city requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }  and building_present_min_level market market 
        {
            convert_to 3
            capability
            {
                recruit_pool "Papal Guard"  1   0.4   3  0  requires factions { papal_states, }  and region_religion catholic 80  
;		recruit_pool "Desert Archers"  1   1   4  0  requires factions { hedjaz, }  and region_religion islam 60  
                wall_level 2
                tower_level 1
                gate_strength 1
                gate_defences 2
                free_upkeep bonus 4
		happiness_bonus bonus 6
		law_bonus bonus 6
		population_growth_bonus bonus -1
                recruitment_slots 3
		happiness_bonus bonus -2 requires event_counter is_the_ai 0
		law_bonus bonus -2 requires event_counter is_the_ai 0
		population_loyalty_bonus bonus -2 requires event_counter is_the_ai 0
		recruits_exp_bonus bonus 2 requires event_counter is_the_ai 1
		recruits_morale_bonus bonus 2 requires event_counter is_the_ai 1
		trade_base_income_bonus bonus -6
		happiness_bonus bonus 8  requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
		law_bonus bonus 8  requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
		population_loyalty_bonus bonus 8  requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
            }
            material stone
            construction  4 
            cost  7200 
            settlement_min large_town
            upgrades
            {
                large_stone_wall
            }
        }
        large_stone_wall city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and building_present_min_level market fairground 
        {
            capability
            {
                recruit_pool "Conquistadores"  1   0.4   3  1  requires factions { spain, portugal, }  and hidden_resource america  and region_religion catholic 60  
                recruit_pool "Papal Guard"  1   0.4   3  0  requires factions { papal_states, }  and region_religion catholic 80   
                recruit_pool "Dismounted Conquistadores"  1   0.4   3  1  requires factions { spain, portugal, }  and hidden_resource america  and region_religion catholic 60  
                wall_level 3
                tower_level 1
                gate_strength 2
                gate_defences 2
                free_upkeep bonus 5
		happiness_bonus bonus 8
		law_bonus bonus 8
		population_growth_bonus bonus -1
                recruitment_slots 4
		happiness_bonus bonus -4 requires event_counter is_the_ai 0
		law_bonus bonus -2 requires event_counter is_the_ai 0
		population_loyalty_bonus bonus -2 requires event_counter is_the_ai 0
		recruits_exp_bonus bonus 3 requires event_counter is_the_ai 1
		recruits_morale_bonus bonus 2 requires event_counter is_the_ai 1
		trade_base_income_bonus bonus -7
		happiness_bonus bonus 8  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
		law_bonus bonus 8  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
		population_loyalty_bonus bonus 8  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
            }
            material stone
            construction  6 
            cost  14400 
            settlement_min city
            upgrades
            {
                huge_stone_wall
            }
        }
        huge_stone_wall city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and hidden_resource metropolis and building_present_min_level market great_market  
        {
            capability
            {
                recruit_pool "Conquistadores"  1   0.5   4  1  requires factions { spain, portugal, }  and hidden_resource america  and region_religion catholic 60  
                recruit_pool "Swiss Guard"  1   0.5   4  0  requires factions { papal_states, }  and region_religion catholic 80   
		recruit_pool "Papal Guard"  1   0.4   3  0  requires factions { papal_states, }  and region_religion catholic 80     
                recruit_pool "Dismounted Conquistadores"  1   0.5   4  1  requires factions { spain, portugal, }  and hidden_resource america  and region_religion catholic 60  
		wall_level 4
                tower_level 1
                gate_strength 2
                gate_defences 2
                free_upkeep bonus 6
		happiness_bonus bonus 10
		law_bonus bonus 10
		population_growth_bonus bonus -2
                recruitment_slots 5
		happiness_bonus bonus -4 requires event_counter is_the_ai 0
		law_bonus bonus -2 requires event_counter is_the_ai 0
		population_loyalty_bonus bonus -2 requires event_counter is_the_ai 0
		recruits_exp_bonus bonus 3 requires event_counter is_the_ai 1
		recruits_morale_bonus bonus 3 requires event_counter is_the_ai 1
		trade_base_income_bonus bonus -8
		happiness_bonus bonus 8  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
		law_bonus bonus 8  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
		population_loyalty_bonus bonus 8  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and hidden_resource america
            }
            material stone
            construction  8 
            cost  19200 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building core_castle_building
{
    convert_to core_building
    levels motte_and_bailey wooden_castle castle fortress citadel 
    {
        motte_and_bailey castle requires factions { northern_european, middle_eastern, mesoamerican, eastern_european, greek, southern_european, }
        {
            capability
            {
                wall_level 0
                tower_level 1
		trade_base_income_bonus bonus -4 
		happiness_bonus bonus 1
		law_bonus bonus 1
		recruits_exp_bonus bonus 1 requires event_counter is_the_ai 1
		recruits_morale_bonus bonus 1 requires event_counter is_the_ai 1
                recruitment_slots 2
            }
            material wooden
            construction  1 
            cost  2400 
            settlement_min village
            upgrades
            {
                wooden_castle
            }
        }
        wooden_castle castle requires factions { northern_european, middle_eastern, mesoamerican, eastern_european, greek, southern_european, }  and building_present_min_level castle_barracks mustering_hall 
        {
            convert_to 1
            capability
            {
                wall_level 1
                gate_strength 1
                tower_level 1
                free_upkeep bonus 1
		trade_base_income_bonus bonus -5 
		happiness_bonus bonus 2
		law_bonus bonus 2
		population_loyalty_bonus bonus 1
		recruits_exp_bonus bonus 1 requires event_counter is_the_ai 1
		recruits_morale_bonus bonus 2 requires event_counter is_the_ai 1
                recruitment_slots 3
            }
            material wooden
            construction  2 
            cost  4800 
            settlement_min village
            upgrades
            {
                castle
            }
        }
        castle castle requires factions { northern_european, middle_eastern, eastern_european, mesoamerican, greek, southern_european, }  and building_present_min_level castle_barracks garrison_quarters 
        {
            convert_to 0
            capability
            {
                wall_level 2
                tower_level 1
		free_upkeep bonus 1
                gate_strength 1
                gate_defences 2
		trade_base_income_bonus bonus -6
		happiness_bonus bonus 3
		law_bonus bonus 3
		population_loyalty_bonus bonus 2
		recruits_exp_bonus bonus 2 requires event_counter is_the_ai 1
		recruits_morale_bonus bonus 2 requires event_counter is_the_ai 1
                recruitment_slots 4
            }
            material stone
            construction  4 
            cost  9600 
            settlement_min town
            upgrades
            {
                fortress
            }
        }
        fortress castle requires factions { northern_european, middle_eastern, mesoamerican, eastern_european, greek, southern_european, }  and building_present_min_level castle_barracks drill_square
        {
            convert_to 1
            capability
            {
                wall_level 3
                tower_level 1
                free_upkeep bonus 2
                gate_strength 2
                gate_defences 2
		trade_base_income_bonus bonus -7
		population_growth_bonus bonus -1
		happiness_bonus bonus 3
		law_bonus bonus 3
		population_loyalty_bonus bonus 2
		recruits_exp_bonus bonus 2 requires event_counter is_the_ai 1
		recruits_morale_bonus bonus 3 requires event_counter is_the_ai 1
                recruitment_slots 5
            }
            material stone
            construction  6 
            cost  14400 
            settlement_min large_town
            upgrades
            {
                citadel
            }
        }
        citadel castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }   and hidden_resource metropolis and building_present_min_level castle_barracks barracks  
        {
            convert_to 2
            capability
            {
                wall_level 4
                tower_level 1
		free_upkeep bonus 3
                gate_strength 2
                gate_defences 2
		trade_base_income_bonus bonus -8 
		population_growth_bonus bonus -2
		happiness_bonus bonus 3
		law_bonus bonus 3
		population_loyalty_bonus bonus 2
		recruits_exp_bonus bonus 3 requires event_counter is_the_ai 1
		recruits_morale_bonus bonus 3 requires event_counter is_the_ai 1
                recruitment_slots 6
            }
            material stone
            construction  8 
            cost  19200 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building tower
{
    convert_to castle_tower
    levels ballista_towers cannon_towers 
    {
        ballista_towers city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 0
            capability
            {
                tower_level 2
            }
            material stone
            construction  6 
            cost  3200 
            settlement_min large_city
            upgrades
            {
                cannon_towers
            }
        }
        cannon_towers city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 1
            capability
            {
                tower_level 3
            }
            material stone
            construction  8 
            cost  6400 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building castle_tower
{
    convert_to tower
    levels c_ballista_towers c_cannon_towers 
    {
        c_ballista_towers castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 0
            capability
            {
                tower_level 2
            }
            material stone
            construction  6 
            cost  3200 
            settlement_min large_city
            upgrades
            {
                c_cannon_towers
            }
        }
        c_cannon_towers castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 1
            capability
            {
                tower_level 3
            }
            material stone
            construction  8 
            cost  6400 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}

building equestrian
{
    levels stables knights_stables barons_stables earls_stables kings_stables 
    {
        stables castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1
        {
            capability
            {
                recruit_pool "Hobilars"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 60 
                recruit_pool "Border Horse"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Mounted Sergeants"  1   0.5   4  0  requires factions { france, hre, teutons, milan, venice, papal_states, sicily, elo, }  and region_religion catholic 60  
                recruit_pool "Aspatak Sergeants"  1   0.5   4  0  requires factions { armenia, }  and region_religion orthodox 60
                recruit_pool "Scouts"  1   0.5   4  0  requires factions { denmark, }  and region_religion catholic 60  
                recruit_pool "Jinetes"  1   0.5   4  0  requires factions { spain, portugal, }  and region_religion catholic 60  
                recruit_pool "Polish Shooters"  1   0.5   4  0  requires factions { poland, }  and region_religion catholic 60
                recruit_pool "Lithuanian Cavalry"  1   0.5   4  0  requires factions { lit, }  and region_religion pagan 60 
                recruit_pool "Kazaks"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Magyar Cavalry"  1   0.5   4  0  requires factions { hungary, }  and region_religion catholic 60  
                recruit_pool "Mounted Acritae"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Desert Cavalry"  1   0.5   4  0  requires factions { moors, egypt, }  and region_religion islam 60 
                recruit_pool "Turkish Horse Archers"  1   0.5   4  0  requires factions { turks, }  and region_religion islam 60 
                recruit_pool "Mongol Horse Archers"  1   0.5   4  0  requires factions { mongols, }  and region_religion pagan 60 
		recruit_pool "Mounted Sergeants"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Irish Scouts"  1   0.5   4  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Cavalry"  1   0.5   4  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Svenner"  1   0.5   4  0  requires factions { norway, }  and region_religion catholic 60
                recruit_pool "Aznaurs"  1   0.4   3  0  requires factions { timurids, }  and region_religion orthodox 60 
                recruit_pool "Afarrr Camel Spearmens"  1   0.5   2  0  requires factions { hedjaz, }  and hidden_resource desert  and region_religion islam 60  
            }
            material wooden
            construction  4 
            cost  1200 
            settlement_min town
            upgrades
            {
                knights_stables
            }
        }
        knights_stables castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1
        {
            capability
            {
                recruit_pool "Mailed Knights"  1   0.5   4  0  requires factions { england, scotland, france, elo, hre, teutons, spain, portugal, milan, venice, papal_states, sicily, flanders, }  and region_religion catholic 60  and event_counter knight_present 1   
                recruit_pool "Huscarls"  1   0.5   4  0  requires factions { denmark, norway, }  and region_religion catholic 60  and event_counter knight_present 1   
                recruit_pool "Polish Nobles"  1   0.5   4  0  requires factions { poland, }  and region_religion catholic 60  and event_counter knight_present 1  
                recruit_pool "Ducal Cavalry"  1   0.5   4  1  requires factions { lit, }  and region_religion pagan 60  and event_counter knight_present 1    
                recruit_pool "Boyar Sons"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60  and event_counter knight_present 1   
                recruit_pool "Hungarian Nobles"  1   0.5   4  0  requires factions { hungary, }  and region_religion catholic 60  and event_counter knight_present 1   
                recruit_pool "Cavalarii"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter knight_present 1    
                recruit_pool "Turkomans"  1   0.5   4  0  requires factions { turks, }  and region_religion islam 60  and event_counter knight_present 1    
                recruit_pool "Mongol Light Lancers"  1   0.5   4  0  requires factions { mongols, }  and region_religion pagan 60  and event_counter knight_present 1    
                recruit_pool "Hobilars"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60 
                recruit_pool "Border Horse"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60 
                recruit_pool "Mounted Sergeants"  1   0.7   6  0  requires factions { france, elo, hre, teutons, milan, venice, papal_states, sicily, }  and region_religion catholic 60 
                recruit_pool "Aspatak Sergeants"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60 
                recruit_pool "Scouts"  1   0.7   6  0  requires factions { denmark, }  and region_religion catholic 60 
                recruit_pool "Jinetes"  1   0.7   6  0  requires factions { spain, portugal, }  and region_religion catholic 60 
                recruit_pool "Polish Shooters"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60
                recruit_pool "Lithuanian Cavalry"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Kazaks"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Magyar Cavalry"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60 
                recruit_pool "Mounted Acritae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Desert Cavalry"  1   0.7   6  0  requires factions { moors, egypt, }  and region_religion islam 60  
                recruit_pool "Turkish Horse Archers"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60  
                recruit_pool "Mongol Horse Archers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60  
		recruit_pool "Mounted Sergeants"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Irish Scouts"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Irish Cavalry"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Svenner"  1   0.7   6  0  requires factions { norway, }  and region_religion catholic 60 
                recruit_pool "Ghulams"  1   0.5   4  0  requires factions { egypt, }  and region_religion islam 60  and event_counter knight_present 1    
                recruit_pool "Hasham"  1   0.5   4  0  requires factions { turks, }  and region_religion islam 60  and event_counter knight_present 1  
                recruit_pool "Aznaurs"  1   0.5   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Kypchaks"  1   0.4   3  0  requires factions { timurids, }  and region_religion orthodox 60  and event_counter knight_present 1  
                recruit_pool "Afarrr Camel Spearmens"  1   0.7   2  0  requires factions { hedjaz, }  and region_religion islam 60  
		recruit_pool "Bedouin Camel Riders"  1   0.5   2  0  requires factions { hedjaz, }  and region_religion islam 60 
            }
            material wooden
            construction  6 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                barons_stables
            }
        }
        barons_stables castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Teutonic Knights"  1   0.5   4  0  requires factions { teutons, }  and region_religion catholic 60  and event_counter banneret_present 1 
                recruit_pool "Feudal Knights"  1   0.5   4  0  requires factions { england, scotland, france, elo, hre, denmark, spain, portugal, milan, venice, papal_states, hungary, norway, }  and region_religion catholic 60  and event_counter banneret_present 1  
                recruit_pool "Norman Knights"  1   0.5   4  0  requires factions { sicily, }  and region_religion catholic 60  and event_counter banneret_present 1  
                recruit_pool "Druzhina"  1   0.5   4  0  requires factions { russia, kiev, poland, }  and region_religion orthodox 60  and event_counter banneret_present 1   
                recruit_pool "Stratiotae"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter banneret_present 1   
		recruit_pool "Skythikoi"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter banneret_present 1
                recruit_pool "Nakharars Lancers"  1   0.5   4  0  requires factions { armenia, }  and region_religion orthodox 60  and event_counter banneret_present 1  
                recruit_pool "Granadine Jinetes"  1   0.5   4  0  requires factions { moors, }  and region_religion islam 60  and event_counter banneret_present 1   
                recruit_pool "Mamluk Archers"  1   0.5   4  0  requires factions { egypt, }  and region_religion islam 60  and event_counter banneret_present 1   
                recruit_pool "Sipahis"  1   0.5   4  0  requires factions { turks, }  and region_religion islam 60  and event_counter banneret_present 1   
                recruit_pool "Mongol Heavy Archers"  1   0.5   4  0  requires factions { mongols,  }  and region_religion pagan 60  and event_counter banneret_present 1   
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { england, scotland, france, elo, hre, teutons, spain, portugal, milan, venice, papal_states, sicily, flanders, }  and region_religion catholic 60  and event_counter knight_present 1  
                recruit_pool "Armenian Cavalry"  1   0.5   4  0  requires factions { armenia, }  and region_religion orthodox 60  and event_counter banneret_present 1 
                recruit_pool "Huscarls"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60  and event_counter knight_present 1  
                recruit_pool "Polish Nobles"  1   0.7   6  1  requires factions { poland, }  and region_religion catholic 60  and event_counter knight_present 1
                recruit_pool "Noble Sons Cavalry"  1   0.5   4  1  requires factions { lit, }  and region_religion pagan 60  and event_counter banneret_present 1   
                recruit_pool "Boyar Sons"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60  and event_counter knight_present 1  
                recruit_pool "Hungarian Nobles"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60  and event_counter knight_present 1  
                recruit_pool "Cavalarii"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter knight_present 1  
                recruit_pool "Arab Cavalry"  1   0.7   6  0  requires factions { moors, egypt, }  and region_religion islam 60  and event_counter banneret_present 1 
                recruit_pool "Turkish Cavalry"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60  and event_counter banneret_present 1 
                recruit_pool "Turkomans"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60  and event_counter knight_present 1 
                recruit_pool "Mongol Light Lancers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60  and event_counter knight_present 1 
                recruit_pool "Hobilars"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 60  
                recruit_pool "Border Horse"  1   0.7   6  1  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Mounted Sergeants"  1   0.7   6  0  requires factions { france, elo, hre, teutons, milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "Aspatak Sergeants"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60 
                recruit_pool "Scouts"  1   0.7   6  1  requires factions { denmark, }  and region_religion catholic 60  
                recruit_pool "Jinetes"  1   0.7   6  0  requires factions { spain, portugal, }  and region_religion catholic 60  
                recruit_pool "Polish Shooters"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60
                recruit_pool "Lithuanian Cavalry"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Ducal Cavalry"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  and event_counter knight_present 1   
                recruit_pool "Kazaks"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Magyar Cavalry"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60  
                recruit_pool "Mounted Acritae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Desert Cavalry"  1   0.7   6  0  requires factions { moors, egypt, }  and region_religion islam 60 
                recruit_pool "Turkish Horse Archers"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60 
                recruit_pool "Mongol Horse Archers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60
		recruit_pool "Mounted Sergeants"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Irish Scouts"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Cavalry"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Missile Cavalry"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  and event_counter banneret_present 1   
                recruit_pool "Irish Heavy Cavalry"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  and event_counter banneret_present 1  
                recruit_pool "Svenner"  1   0.7   6  0  requires factions { norway, }  and region_religion catholic 60  
                recruit_pool "Ghulams"  1   0.7   6  0  requires factions { egypt, }  and region_religion islam 60  and event_counter knight_present 1  
                recruit_pool "Hasham"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60  and event_counter knight_present 1 
		recruit_pool "NE Bodyguard"  1   0.15   1  0  requires factions { england, scotland, france, hre, teutons, denmark, poland, hungary,  flanders, ireland, norway, }  and region_religion catholic 80  and event_counter banneret_present 1  		
		recruit_pool "Lit Bodyguard"  1   0.15   1  0  requires factions { lit, }  and region_religion pagan 80  and event_counter banneret_present 1 
                recruit_pool "SE Bodyguard"  1   0.15   1  0  requires factions { spain, portugal, milan, venice, papal_states, sicily, elo, }  and region_religion catholic 80  and event_counter banneret_present 1 
                recruit_pool "SE Bodyguard"  1   0.15   1  0  requires factions { armenia, }  and region_religion orthodox 80  and event_counter banneret_present 1 
                recruit_pool "EE Bodyguard"  1   0.15   1  0  requires factions { russia, kiev, }  and region_religion orthodox 80  and event_counter banneret_present 1
                recruit_pool "Greek Bodyguard"  1   0.15   1  0  requires factions { byzantium, }  and region_religion orthodox 80  and event_counter banneret_present 1
                recruit_pool "ME Bodyguard"  1   0.15   1  0  requires factions { moors, egypt, turks, hedjaz, }  and region_religion islam 80  and event_counter banneret_present 1
                recruit_pool "Aznaurs"  1   0.6   3  0  requires factions { timurids, }  and region_religion orthodox 60 
                recruit_pool "Eristavs"  1   0.6   2  0  requires factions { timurids, }  and region_religion orthodox 60  and event_counter banneret_present 1
                recruit_pool "Kypchaks"  1   0.5   3  0  requires factions { timurids, }  and region_religion orthodox 60  and event_counter knight_present 1 
                recruit_pool "Afarrr Camel Spearmens"  1   0.5   2  0  requires factions { hedjaz, }  and region_religion islam 60  
		recruit_pool "Bedouin Camel Riders"  1   0.5   2  0  requires factions { hedjaz, }  and region_religion islam 60 
		recruit_pool "Bhevyhr"  1   0.5   2  0  requires factions { hedjaz, }  and region_religion islam 60  
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min city
            upgrades
            {
                earls_stables
            }
        }
        earls_stables castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Lithuanian Cavalry"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Halbbruder"  1   0.7   6  0  requires factions { teutons, }  and region_religion catholic 60  and event_counter commander_present 1
                recruit_pool "Teutonic Knights"  1   0.7   6  0  requires factions { teutons, }  and region_religion catholic 60  and event_counter banneret_present 1 
                recruit_pool "Hussars"  1   0.4   3  0  requires factions { poland, hungary, }  and region_religion catholic 60  and event_counter commander_present 1   
                recruit_pool "Lithuanian Regular Cavalry"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  and event_counter commander_present 1  
                recruit_pool "Dvor Cavalry"  1   0.4   3  0  requires factions { russia, kiev, }  and region_religion orthodox 60  and event_counter commander_present 1    
                recruit_pool "English Knights"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 60  and event_counter commander_present 1    
                recruit_pool "Chivalric Knights"  1   0.5   4  0  requires factions { france, denmark, spain, sicily, norway, }  and region_religion catholic 60  and event_counter commander_present 1    
                recruit_pool "Imperial Knights"  1   0.5   4  0  requires factions { hre, teutons, }  and region_religion catholic 60  and event_counter commander_present 1    
                recruit_pool "Portuguese Knights"  1   0.5   4  0  requires factions { portugal, }  and region_religion catholic 60  and event_counter commander_present 1    
                recruit_pool "Italian MAA"  1   0.5   4  0  requires factions { milan, venice, papal_states, }  and region_religion catholic 60  and event_counter commander_present 1    
                recruit_pool "Polish Knights"  1   0.5   4  0  requires factions { poland, }  and region_religion catholic 60  and event_counter commander_present 1    
                recruit_pool "Cossack Cavalry"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60  and event_counter commander_present 1    
                recruit_pool "E Chivalric Knights"  1   0.5   4  0  requires factions { hungary, }  and region_religion catholic 60  and event_counter commander_present 1    
                recruit_pool "Latinikon"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter commander_present 1   
		recruit_pool "Pronoiarii"  1   0.2   2  0  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter commander_present 1     
                recruit_pool "Granadine Lancers"  1   0.5   4  0  requires factions { moors, }  and region_religion islam 60  and event_counter commander_present 1   
                recruit_pool "Mamluks"  1   0.5   4  0  requires factions { egypt, }  and region_religion islam 60  and event_counter commander_present 1   
                recruit_pool "Sipahi Lancers"  1   0.5   4  0  requires factions { turks, }  and region_religion islam 60  and event_counter commander_present 1   
                recruit_pool "Mongol Heavy Lancers"  1   0.5   4  0  requires factions { mongols, }  and region_religion pagan 60  and event_counter commander_present 1   
                recruit_pool "Feudal Knights"  1   0.7   6  0  requires factions { england, france, elo, hre, denmark, spain, portugal, milan, venice, papal_states, hungary, norway, }  and region_religion catholic 60  and event_counter banneret_present 1   
                recruit_pool "Feudal Knights"  1   0.7   6  1  requires factions { scotland, }  and region_religion catholic 60  and event_counter banneret_present 1   
                recruit_pool "Norman Knights"  1   0.7   6  0  requires factions { sicily, }  and region_religion catholic 60  and event_counter banneret_present 1   
                recruit_pool "Druzhina"  1   0.7   6  0  requires factions { russia, kiev, poland, }  and region_religion orthodox 60  and event_counter banneret_present 1   
                recruit_pool "Stratiotae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter banneret_present 1   
		recruit_pool "Skythikoi"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter banneret_present 1
                recruit_pool "Nakharars Lancers"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60  and event_counter banneret_present 1  
                recruit_pool "Granadine Jinetes"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60  and event_counter banneret_present 1  
                recruit_pool "Mamluk Archers"  1   0.7   6  0  requires factions { egypt, }  and region_religion islam 60  and event_counter banneret_present 1  
                recruit_pool "Sipahis"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60  and event_counter banneret_present 1  
                recruit_pool "Mongol Heavy Archers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60  and event_counter banneret_present 1   
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60  and event_counter knight_present 1  
                recruit_pool "Boyar Sons"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60  and event_counter knight_present 1  
                recruit_pool "Cavalarii"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter knight_present 1  
                recruit_pool "Arab Cavalry"  1   0.7   6  0  requires factions { moors, egypt, }  and region_religion islam 60  and event_counter banneret_present 1 
                recruit_pool "Turkish Cavalry"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60  and event_counter banneret_present 1 
                recruit_pool "Turkomans"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60  and event_counter knight_present 1 
                recruit_pool "Mongol Light Lancers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60  and event_counter knight_present 1 
                recruit_pool "Hobilars"  1   0.7   6  2  requires factions { england, }  and region_religion catholic 60  
                recruit_pool "Border Horse"  1   0.7   6  2  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Mounted Sergeants"  1   0.7   6  1  requires factions { france, elo, hre, teutons, milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "Aspatak Sergeants"  1   0.7   6  1  requires factions { armenia, }  and region_religion orthodox 60 
                recruit_pool "Scouts"  1   0.7   6  2  requires factions { denmark, }  and region_religion catholic 60  
                recruit_pool "Jinetes"  1   0.7   6  0  requires factions { spain, portugal, }  and region_religion catholic 60  
                recruit_pool "Polish Shooters"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60
                recruit_pool "Ducal Cavalry"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  and event_counter knight_present 1   
                recruit_pool "Polish Retainers"  1   0.5   4  0  requires factions { poland, }  and region_religion catholic 60  and event_counter commander_present 1 
                recruit_pool "Kazaks"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Magyar Cavalry"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60  
                recruit_pool "Mounted Acritae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Desert Cavalry"  1   0.7   6  0  requires factions { moors, egypt, }  and region_religion islam 60 
                recruit_pool "Turkish Horse Archers"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60 
                recruit_pool "Mongol Horse Archers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60 
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { england, france, elo, hre, teutons, spain, portugal, milan, venice, papal_states, sicily, flanders, }  and region_religion catholic 60  and event_counter knight_present 1  
                recruit_pool "Armenian Cavalry"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60  and event_counter banneret_present 1 
                recruit_pool "Huscarls"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60  and event_counter knight_present 1  
                recruit_pool "Polish Nobles"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60  and event_counter knight_present 1
                recruit_pool "Noble Sons Cavalry"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60  and event_counter banneret_present 1   
                recruit_pool "Hungarian Nobles"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60  and event_counter knight_present 1  
                recruit_pool "Mounted Sergeants"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Irish Scouts"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60   
                recruit_pool "Irish Cavalry"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60   
                recruit_pool "Irish Missile Cavalry"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  and event_counter banneret_present 1   
                recruit_pool "Irish Heavy Cavalry"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60   
                recruit_pool "Mounted Calivermen"  1   0.4   3  0  requires factions { ireland, }    and region_religion catholic 60  and event_counter gunpowder_discovered 1  and event_counter commander_present 1 
                recruit_pool "Svenner"  1   0.7   6  0  requires factions { norway, }  and region_religion catholic 60  
                recruit_pool "Ghulams"  1   0.7   6  0  requires factions { egypt, }  and region_religion islam 60  and event_counter knight_present 1   
                recruit_pool "Hasham"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60  and event_counter knight_present 1   
		recruit_pool "NE Bodyguard"  1   0.15   1  0  requires factions { england, scotland, france, hre, teutons, denmark, poland, hungary,  flanders, ireland, norway, }  and region_religion catholic 80  and event_counter banneret_present 1		
		recruit_pool "Lit Bodyguard"  1   0.15   1  0  requires factions { lit, }  and region_religion pagan 80  and event_counter banneret_present 1  
                recruit_pool "SE Bodyguard"  1   0.15   1  0  requires factions { spain, portugal, milan, venice, papal_states, sicily, elo, }  and region_religion catholic 80  and event_counter banneret_present 1
                recruit_pool "SE Bodyguard"  1   0.15   1  0  requires factions { armenia, }  and region_religion orthodox 80  and event_counter banneret_present 1 
                recruit_pool "EE Bodyguard"  1   0.15   1  0  requires factions { russia, kiev, }  and region_religion orthodox 80  and event_counter banneret_present 1 
                recruit_pool "Greek Bodyguard"  1   0.15   1  0  requires factions { byzantium, }  and region_religion orthodox 80  and event_counter banneret_present 1 
                recruit_pool "ME Bodyguard"  1   0.15   1  0  requires factions { moors, egypt, turks, hedjaz, }  and region_religion islam 80  and event_counter banneret_present 1
                recruit_pool "Mongol Bodyguard"  1   0.1   1  0  requires factions { mongols, }  and region_religion pagan 80  and event_counter commander_present 1  
                recruit_pool "Irish Mounted Bodyguard"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 80  and event_counter commander_present 1 
                recruit_pool "Aznaurs"  1   0.5   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Kypchaks"  1   0.7   3  0  requires factions { timurids, }  and region_religion orthodox 60  and event_counter knight_present 1 
                recruit_pool "Eristavs"  1   0.6   2  0  requires factions { timurids, }  and region_religion orthodox 60  and event_counter banneret_present 1
                recruit_pool "Aghlumi"  1   0.2   1  0  requires factions { timurids, }  and region_religion orthodox 80  and event_counter commander_present 1 
                recruit_pool "Afarrr Camel Spearmens"  1   0.7   2  0  requires factions { hedjaz, }  and region_religion islam 60  
		recruit_pool "Bedouin Camel Riders"  1   0.7   2  0  requires factions { hedjaz, }  and region_religion islam 60 
		recruit_pool "Bhevyhr"  1   0.7   2  0  requires factions { hedjaz, }  and region_religion islam 60  
                }
            material wooden
            construction  10 
            cost  9600 
            settlement_min large_city
            upgrades
            {
                kings_stables
            }
        }
        kings_stables castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Lithuanian Cavalry"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Halbbruder"  1   0.7   6  0  requires factions { teutons, }  and region_religion catholic 60  and event_counter commander_present 1
                recruit_pool "Teutonic Knights"  1   0.7   6  0  requires factions { teutons, }  and region_religion catholic 60  and event_counter banneret_present 1 
                recruit_pool "Lancers"  1   0.5   4  0  requires factions { france, }  and region_religion catholic 60  and event_counter grandcross_present 1    
                recruit_pool "Gothic Knights"  1   0.5   4  0  requires factions { hre, }  and region_religion catholic 60  and event_counter grandcross_present 1    
                recruit_pool "Stradiots"  1   0.5   4  0  requires factions { venice, }  and region_religion catholic 60  and event_counter grandcross_present 1    
                recruit_pool "Polish Guard"  1   0.5   4  0  requires factions { poland, }  and region_religion catholic 60  and event_counter grandcross_present 1    
                recruit_pool "Lithuanian Regular Cavalry"  1   1.0   8  0  requires factions { lit, }  and region_religion pagan 60  and event_counter commander_present 1   
                recruit_pool "Tsars Guard"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60  and event_counter grandcross_present 1    
                recruit_pool "Royal Banderium"  1   0.5   4  0  requires factions { hungary, }  and region_religion catholic 60  and event_counter grandcross_present 1    
                recruit_pool "Scholarii"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter grandcross_present 1    
                recruit_pool "Sepuhhractoi"  1   0.5   4  0  requires factions { armenia, }  and region_religion orthodox 60  and event_counter grandcross_present 1   
                recruit_pool "Christian Guard"  1   0.5   4  0  requires factions { moors, elo, }  and region_religion catholic 60  and event_counter grandcross_present 1    
                recruit_pool "Royal Mamluks"  1   0.5   4  0  requires factions { egypt, }  and region_religion islam 60  and event_counter grandcross_present 1    
                recruit_pool "Quapukulu"  1   0.5   4  0  requires factions { turks, }  and region_religion islam 60  and event_counter grandcross_present 1   
                recruit_pool "Khan's Guard"  1   0.5   4  0  requires factions { mongols, }  and region_religion pagan 60  and event_counter grandcross_present 1  and event_counter grandcross_present 1      
                recruit_pool "Reiters"  1   0.5   4  0  requires factions { hre, teutons, }  and region_religion catholic 60  and event_counter gunpowder_discovered 1  and event_counter grandcross_present 1  
                recruit_pool "English Knights"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 60  and event_counter commander_present 1   
                recruit_pool "Chivalric Knights"  1   0.7   6  1  requires factions { france, denmark, spain, sicily, norway, }  and region_religion catholic 60  and event_counter commander_present 1   
                recruit_pool "Imperial Knights"  1   0.7   6  1  requires factions { hre, teutons, }  and region_religion catholic 60  and event_counter commander_present 1  
                recruit_pool "Portuguese Knights"  1   0.7   6  1  requires factions { portugal, }  and region_religion catholic 60  and event_counter commander_present 1   
                recruit_pool "Italian MAA"  1   0.7   6  1  requires factions { milan, venice, papal_states, }  and region_religion catholic 60  and event_counter commander_present 1   
                recruit_pool "Polish Knights"  1   0.7   6  1  requires factions { poland, }  and region_religion catholic 60  and event_counter commander_present 1   
                recruit_pool "Dvor Cavalry"  1   0.7   6  1  requires factions { russia, kiev, }  and region_religion orthodox 60  and event_counter commander_present 1   
                recruit_pool "E Chivalric Knights"  1   0.7   6  1  requires factions { hungary, }  and region_religion catholic 60  and event_counter commander_present 1   
                recruit_pool "Latinikon"  1   0.7   6  1  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter commander_present 1  
		recruit_pool "Pronoiarii"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter commander_present 1    
                recruit_pool "Granadine Lancers"  1   0.7   6  1  requires factions { moors, }  and region_religion islam 60  and event_counter commander_present 1   
                recruit_pool "Mamluks"  1   0.7   6  1  requires factions { egypt, }  and region_religion islam 60  and event_counter commander_present 1   
                recruit_pool "Sipahi Lancers"  1   0.7   6  1  requires factions { turks, }  and region_religion islam 60  and event_counter commander_present 1    
                recruit_pool "Mongol Heavy Lancers"  1   0.7   6  1  requires factions { mongols, }  and region_religion pagan 60  and event_counter commander_present 1   
                recruit_pool "Feudal Knights"  1   0.7   6  2  requires factions { scotland, }  and region_religion catholic 60  and event_counter banneret_present 1  
                recruit_pool "Druzhina"  1   0.7   6  0  requires factions { russia, kiev, poland, }  and region_religion catholic 60  and event_counter banneret_present 1  
                recruit_pool "Stratiotae"  1   0.7   6  1  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter banneret_present 1  
                recruit_pool "Nakharars Lancers"  1   0.7   6  1  requires factions { armenia, }  and region_religion orthodox 60  and event_counter banneret_present 1 
                recruit_pool "Granadine Jinetes"  1   0.7   6  1  requires factions { moors, }  and region_religion islam 60  and event_counter banneret_present 1  
                recruit_pool "Mongol Heavy Archers"  1   0.7   6  1  requires factions { mongols, }  and region_religion pagan 60  and event_counter banneret_present 1  
                recruit_pool "Mamluk Archers"  1   0.7   6  1  requires factions { egypt, }  and region_religion islam 60  and event_counter banneret_present 1  
                recruit_pool "Sipahis"  1   0.7   6  1  requires factions { turks, }  and region_religion islam 60  and event_counter banneret_present 1  
                recruit_pool "Mailed Knights"  1   0.7   6  1  requires factions { scotland, }  and region_religion catholic 60  and event_counter knight_present 1    
                recruit_pool "Boyar Sons"  1   0.7   6  1  requires factions { russia, kiev, }  and region_religion orthodox 60  and event_counter knight_present 1    
                recruit_pool "Cavalarii"  1   0.7   6  1  requires factions { byzantium, }  and region_religion orthodox 60  and event_counter knight_present 1    
                recruit_pool "Arab Cavalry"  1   0.7   6  1  requires factions { moors, egypt, }  and region_religion islam 60  and event_counter banneret_present 1    
                recruit_pool "Turkish Cavalry"  1   0.7   6  1  requires factions { turks, }  and region_religion islam 60  and event_counter banneret_present 1    
                recruit_pool "Turkomans"  1   0.7   6  1  requires factions { turks, }  and region_religion islam 60  and event_counter knight_present 1    
                recruit_pool "Mongol Light Lancers"  1   0.7   6  1  requires factions { mongols, }  and region_religion pagan 60  and event_counter knight_present 1    
                recruit_pool "Hobilars"  1   0.7   6  3  requires factions { england, }  and region_religion catholic 60  
                recruit_pool "Border Horse"  1   0.7   6  3  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Mounted Sergeants"  1   0.7   6  1  requires factions { france, elo, milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "Aspatak Sergeants"  1   0.7   6  1  requires factions { armenia, }  and region_religion orthodox 60 
                recruit_pool "Scouts"  1   0.7   6  3  requires factions { denmark, }  and region_religion catholic 60  
                recruit_pool "Jinetes"  1   0.7   6  1  requires factions { spain, portugal, }  and region_religion catholic 60  
                recruit_pool "Polish Shooters"  1   0.7   6  1  requires factions { poland, }  and region_religion catholic 60
                recruit_pool "Ducal Cavalry"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  and event_counter knight_present 1   
                recruit_pool "Polish Retainers"  1   0.7   6  1  requires factions { poland, }  and region_religion catholic 60  and event_counter commander_present 1 
                recruit_pool "Kazaks"  1   0.7   6  1  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Magyar Cavalry"  1   0.7   6  1  requires factions { hungary, }  and region_religion catholic 60  
                recruit_pool "Mounted Acritae"  1   0.7   6  1  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Desert Cavalry"  1   0.7   6  1  requires factions { moors, egypt, }  and region_religion islam 60  
                recruit_pool "Turkish Horse Archers"  1   0.7   6  1  requires factions { turks, }  and region_religion islam 60  
                recruit_pool "Mongol Horse Archers"  1   0.7   6  1  requires factions { mongols, }  and region_religion pagan 60  
                recruit_pool "Hussars"  1   0.7   6  1  requires factions { poland, hungary, }  and region_religion catholic 60  and event_counter commander_present 1   
                recruit_pool "Cossack Cavalry"  1   0.7   6  1  requires factions { russia, kiev, }  and region_religion orthodox 60   
                recruit_pool "Norman Knights"  1   0.7   6  1  requires factions { sicily, }  and region_religion catholic 60  and event_counter banneret_present 1   
                recruit_pool "Mailed Knights"  1   0.7   6  1  requires factions { england, france, elo, hre, teutons, spain, portugal, milan, venice, papal_states, sicily, flanders, }  and region_religion catholic 60  and event_counter knight_present 1 
                recruit_pool "Armenian Cavalry"  1   0.7   6  1  requires factions { armenia, }  and region_religion orthodox 60  and event_counter banneret_present 1   
		recruit_pool "Mounted Sergeants"  1   0.7   6  1  requires factions { flanders, }  and region_religion catholic 60  and event_counter knight_present 1   
                recruit_pool "Huscarls"  1   0.7   6  1  requires factions { denmark, norway, }  and region_religion catholic 60  and event_counter banneret_present 1   
                recruit_pool "Polish Nobles"  1   0.7   6  1  requires factions { poland, }  and region_religion catholic 60  and event_counter knight_present 1 
		recruit_pool "Noble Sons Cavalry"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60  and event_counter knight_present 1    
                recruit_pool "Hungarian Nobles"  1   0.7   6  1  requires factions { hungary, }  and region_religion catholic 60  and event_counter knight_present 1   
                recruit_pool "Mounted Sergeants"  1   0.7   6  1  requires factions { hre, teutons, }  and region_religion catholic 60 
                recruit_pool "Famiglia Ducale"  1   0.2   2  1  requires factions { milan, }  and region_religion catholic 60  and event_counter grandcross_present 1    
                recruit_pool "Broken Lances"  1   0.5   4  0  requires factions { milan, venice, papal_states, }  and region_religion catholic 60  and event_counter grandcross_present 1  
                recruit_pool "Irish Scouts"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Irish Cavalry"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Irish Missile Cavalry"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60  and event_counter banneret_present 1    
                recruit_pool "Irish Heavy Cavalry"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60  and event_counter knight_present 1   
                recruit_pool "Mounted Calivermen"  1   0.4   3  0  requires factions { ireland, }    and region_religion catholic 60  and event_counter gunpowder_discovered 1  and event_counter commander_present 1 
                recruit_pool "Svenner"  1   0.7   6  1  requires factions { norway, }  and region_religion catholic 60
                recruit_pool "Ritterbruder"  1   0.7   6  1  requires factions { teutons, }  and region_religion catholic 80  and event_counter grandcross_present 1   
                recruit_pool "Ghulams"  1   0.7   6  1  requires factions { egypt, }  and region_religion islam 60  and event_counter knight_present 1    
                recruit_pool "Hasham"  1   0.7   6  1  requires factions { turks, }  and region_religion islam 60  and event_counter knight_present 1    
                recruit_pool "NE Bodyguard"  1   0.15   1  0  requires factions { ireland, }  and region_religion catholic 80  and event_counter banneret_present 1
		recruit_pool "NE Late Bodyguard"  1   0.15   1  0  requires factions { england, scotland, france, hre, teutons, denmark, poland, hungary, flanders, norway, }  and region_religion catholic 80  and event_counter grandcross_present 1    
                recruit_pool "Lit Bodyguard"  1   0.15   1  0  requires factions { lit, }  and region_religion pagan 80  and event_counter banneret_present 1   
                recruit_pool "SE Late Bodyguard"  1   0.15   1  0  requires factions { spain, portugal, milan, venice, papal_states, sicily, elo, }  and region_religion catholic 60  and event_counter grandcross_present 1   
                recruit_pool "SE Late Bodyguard"  1   0.15   1  0  requires factions { armenia, }  and region_religion orthodox 80  and event_counter grandcross_present 1   
                recruit_pool "EE Late Bodyguard"  1   0.15   1  0  requires factions { russia, kiev, }  and region_religion orthodox 80  and event_counter grandcross_present 1   
                recruit_pool "Greek Bodyguard"  1   0.15   1  0  requires factions { byzantium, }  and region_religion orthodox 80  and event_counter banneret_present 1  
                recruit_pool "ME Late Bodyguard"  1   0.15   1  0  requires factions { moors, egypt, turks, hedjaz, }  and region_religion islam 80  and event_counter grandcross_present 1    
                recruit_pool "Mongol Bodyguard"  1   0.1   1  0  requires factions { mongols, }  and region_religion pagan 80  and event_counter banneret_present 1   
		recruit_pool "Irish Mounted Bodyguard"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 80  and event_counter commander_present 1 
                recruit_pool "Aznaurs"  1   0.8   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Kypchaks"  1   0.7   3  0  requires factions { timurids, }  and region_religion orthodox 60  and event_counter knight_present 1 
                recruit_pool "Eristavs"  1   0.6   2  0  requires factions { timurids, }  and region_religion orthodox 60  and event_counter banneret_present 1
                recruit_pool "Aghlumi"  1   0.3   1  0  requires factions { timurids, }  and region_religion orthodox 80  and event_counter commander_present 1 
                recruit_pool "Monaspa Lancers"  1   0.4   3  0  requires factions { timurids, }  and region_religion orthodox 60  and event_counter grandcross_present 1    
                recruit_pool "Afarrr Camel Spearmens"  1   0.7   6  1  requires factions { hedjaz, }  and region_religion islam 60  
		recruit_pool "Bedouin Camel Riders"  1   0.7   6  1  requires factions { hedjaz, }  and region_religion islam 60 
		recruit_pool "Bhevyhr"  1   0.7   6  1  requires factions { hedjaz, }  and region_religion islam 60  
            }
            material wooden
            construction  12 
            cost  14400 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building barracks
{
    convert_to castle_barracks
    levels town_watch town_guard city_watch militia_drill_square militia_barracks army_barracks royal_armoury 
    {
        town_watch city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 1
            capability
            {
                recruit_pool "Lithuanian Skirmishers"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "Town Militia"  1   0.5   4  0  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, norway, }  and region_religion catholic 60  
		recruit_pool "Town Militia"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Italian Militia"  1   0.5   4  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "EE Town Militia"  1   0.5   4  0  requires factions { poland, hungary, }  and region_religion catholic 60 
                recruit_pool "Acontistae"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Shinakan Zork"  1   0.5   4  0  requires factions { armenia, }  and region_religion orthodox 60   
                recruit_pool "ME Town Militia"  1   0.5   4  0  requires factions { moors, turks, }  and region_religion islam 60   
                recruit_pool "ME Town Militia"  1   0.5   4  0  requires factions { mongols, }  and region_religion pagan 60   
                recruit_pool "Irish Kerns"  1   0.5   4  0  requires factions { ireland, }  and region_religion catholic 60
                recruit_pool "Abid Al Javelinmenn"  1   0.5   4  0  requires factions { hedjaz, }  and region_religion islam 60 
                law_bonus bonus 1
            }
            material wooden
            construction  4 
            cost  1600 
            settlement_min town
            upgrades
            {
                town_guard
            }
        }
        town_guard city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "Irish Swordsmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60
                recruit_pool "Lithuanian Skirmishers"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "Spear Militia"  1   0.5   4  0  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, }  and region_religion catholic 60  
		recruit_pool "Spear Militia"  0   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Italian Spear Militia"  1   0.5   4  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "EE Spear Militia"  1   0.5   4  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "EE Spear Militia"  1   0.5   4  0  requires factions { hungary, poland, }  and region_religion catholic 60 
                recruit_pool "Contaratoi"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "ME Spear Militia"  1   0.5   4  0  requires factions { moors, egypt, turks, }  and region_religion islam 60    
                recruit_pool "ME Spear Militia"  1   0.5   4  0  requires factions { mongols, }  and region_religion pagan 60   
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, norway, }  and region_religion catholic 60 
		recruit_pool "Town Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60
                recruit_pool "Italian Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60 
                recruit_pool "EE Town Militia"  1   0.7   6  0  requires factions { poland, hungary, }  and region_religion catholic 60 
                recruit_pool "EE Archer Militia"  1   0.7   6  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60    
                recruit_pool "Acontistae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60    
                recruit_pool "Shinakan Zork"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60   
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { moors, turks, }  and region_religion islam 60    
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60    
                recruit_pool "ME Archer Militia"  1   0.7   6  0  requires factions { egypt, }  and region_religion islam 60    
                recruit_pool "Irish Kerns"  1   0.5   4  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Peasant Spearmen"  1   0.6   5  0  requires factions { norway, }  and region_religion catholic 60
                recruit_pool "Abid Al Javelinmenn"  1   0.7   6  0  requires factions { hedjaz, }  and region_religion islam 60 
                recruit_pool "Ahdath Militiaa"  1   0.5   4  0  requires factions { hedjaz, }  and region_religion islam 60        
                law_bonus bonus 2
            }
            material wooden
            construction  6 
            cost  2800
            settlement_min large_town
            upgrades
            {
                city_watch
            }
        }
        city_watch city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "Archer Militia"  1   0.5   4  0  requires factions { england, flanders, }  and region_religion catholic 60 
                recruit_pool "Scots Pike Militia"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 60
                recruit_pool "Crossbow Militia"  1   0.5   4  0  requires factions { france, elo, hre, denmark, spain, portugal, norway, }  and region_religion catholic 60 
                recruit_pool "Genoese Crossbow Militia"  1   0.5   4  0  requires factions { milan, }  and region_religion catholic 60 
                recruit_pool "Pavise Crossbow Militia"  1   0.5   4  0  requires factions { venice, papal_states, sicily, hungary, }  and region_religion catholic 60 
                recruit_pool "EE Crossbow Militia"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "EE Crossbow Militia"  1   0.5   4  0  requires factions { poland, }  and region_religion catholic 60 
                recruit_pool "Letts Crossbowmen"  1   0.5   4  0  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "S Archer Militia"  1   0.5   4  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60   
                recruit_pool "ME Crossbow Militia"  1   0.5   4  0  requires factions { moors, }  and region_religion islam 60   
                recruit_pool "Saracen Militia"  1   0.5   4  0  requires factions { egypt, turks, }  and region_religion islam 60   
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, }  and region_religion catholic 60 
		recruit_pool "Spear Militia"  0   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Italian Spear Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60 
                recruit_pool "EE Spear Militia"  1   0.7   6  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "EE Spear Militia"  1   0.7   6  0  requires factions { poland, hungary, }  and region_religion catholic 60 
                recruit_pool "Lithuanian Axemen"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "Contaratoi"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "ME Spear Militia"  1   0.7   6  0  requires factions { moors, egypt, turks, }  and region_religion islam 60   
                recruit_pool "ME Spear Militia"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60   
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, norway, }  and region_religion catholic 60 
		recruit_pool "Town Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60
                recruit_pool "Armenian Militia"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "Italian Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60 
                recruit_pool "EE Town Militia"  1   0.7   6  0  requires factions { poland, hungary, }  and region_religion catholic 60 
                recruit_pool "Lithuanian Skirmishers"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "EE Archer Militia"  1   0.7   6  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "Acontistae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Shinakan Zork"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { moors, turks, }  and region_religion islam 60   
                recruit_pool "ME Archer Militia"  1   0.7   6  0  requires factions { egypt, }  and region_religion islam 60   
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { mongols, }  and region_religion islam 60   
                recruit_pool "Irish Kerns"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60 
		recruit_pool "Axemen"  1   0.5   2  0  requires factions { denmark, }  and region_religion catholic 60
                recruit_pool "Irish Bowmen"  1   0.4   6  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Irish Swordsmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60
                recruit_pool "Peasant Spearmen"  1   0.8   6  0  requires factions { norway, }  and region_religion catholic 60
                recruit_pool "Eri Militia"  1   0.4   2  0  requires factions { timurids, } and region_religion orthodox 60
                recruit_pool "Abid Al Javelinmenn"  1   1   6  0  requires factions { hedjaz, }  and region_religion islam 60 
                recruit_pool "Ahdath Militiaa"  1   1   6  0  requires factions { hedjaz, }  and region_religion islam 60                  		
		recruit_pool "Bedouinspearmen"  1   1   6  0  requires factions { hedjaz, }  and region_religion islam 60  
                law_bonus bonus 3
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min city
            upgrades
            {
                militia_drill_square
            }
        }
        militia_drill_square city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 4
            capability
            {
		recruit_pool "Baltic Spearmen"  1   0.5   4  0  requires factions { lit, }  and region_religion pagan 60 
               	recruit_pool "Bill Militia"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 60 
		recruit_pool "Goedendag Militia"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Heavy Pike Militia"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 60 
		recruit_pool "Flemish Pikemen"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60
                recruit_pool "Partisan Militia"  1   0.5   4  0  requires factions { france, }  and region_religion catholic 60 
                recruit_pool "Halberd Militia"  1   0.5   4  0  requires factions { hre, teutons, papal_states, sicily, poland, hungary, }  and region_religion catholic 60 
                recruit_pool "Swordstaff Militia"  1   0.5   4  0  requires factions { denmark, norway, }  and region_religion catholic 60 
                recruit_pool "Swordsmen Militia"  1   0.5   4  0  requires factions { spain, portugal, }  and region_religion catholic 60  
                recruit_pool "Italian Cavalry Militia"  1   0.5   4  0  requires factions { milan, venice, }  and region_religion catholic 60 
                recruit_pool "EE Cavalry Militia"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60 
                recruit_pool "Castrophilakae"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60 
                recruit_pool "Armenianh Infantry"  1   0.5   4  0  requires factions { armenia, }  and region_religion orthodox 60
                recruit_pool "Urban Militia"  1   0.5   4  0  requires factions { moors, }  and region_religion islam 60    
                recruit_pool "ME Halberd Militia"  1   0.5   4  0  requires factions { egypt, turks, }  and region_religion islam 60     
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { england, flanders, }  and region_religion catholic 60 
                recruit_pool "Scots Pike Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60 
                recruit_pool "Crossbow Militia"  1   0.7   6  0  requires factions { france, elo, hre, denmark, spain, portugal, norway, }  and region_religion catholic 60 
                recruit_pool "Genoese Crossbow Militia"  1   0.7   6  0  requires factions { milan, }  and region_religion catholic 60 
                recruit_pool "Pavise Crossbow Militia"  1   0.7   6  0  requires factions { venice, papal_states, sicily, hungary, }  and region_religion catholic 60 
                recruit_pool "Latinn Crossbow Militia"  0   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60 
                recruit_pool "EE Crossbow Militia"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "EE Crossbow Militia"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60 
                recruit_pool "Letts Crossbowmen"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "S Archer Militia"  1   0.7   6  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60 
                recruit_pool "ME Crossbow Militia"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60    
                recruit_pool "Saracen Militia"  1   0.7   6  0  requires factions { egypt, turks, }  and region_religion islam 60     
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, }  and region_religion catholic 60  
		recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Italian Spear Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "EE Spear Militia"  1   0.7   6  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "EE Spear Militia"  1   0.7   6  0  requires factions { poland, hungary, }  and region_religion catholic 60 
                recruit_pool "Lithuanian Axemen"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "Contaratoi"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60 
                recruit_pool "Armenian Militia"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60                
		recruit_pool "ME Spear Militia"  1   0.7   6  0  requires factions { moors, egypt, turks, }  and region_religion islam 60    
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, norway, }  and region_religion catholic 60  
		recruit_pool "Town Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Italian Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "EE Town Militia"  1   0.7   6  0  requires factions { poland, hungary, }  and region_religion catholic 60 
                recruit_pool "Lithuanian Skirmishers"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "EE Archer Militia"  1   0.7   6  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60 
                recruit_pool "Acontistae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60 
                recruit_pool "Shinakan Zork"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { moors, turks, }  and region_religion islam 60 
                recruit_pool "ME Archer Militia"  1   0.7   6  0  requires factions { egypt, }  and region_religion islam 60 
                recruit_pool "ME Spear Militia"  1   0.7   6  1  requires factions { mongols, }  and region_religion pagan 60 
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60  
                recruit_pool "Dismounted Light Lancers"  1   0.7   3  0  requires factions { mongols, }  and region_religion pagan 60  
                recruit_pool "Halberd Militia"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Irish Kerns"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Bowmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Swordsmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Peasant Spearmen"  1   0.8   6  1  requires factions { norway, }  and region_religion catholic 60 
                recruit_pool "Theigns"  1   0.2   2  0  requires factions { norway, }  and region_religion catholic 60
                recruit_pool "Georgian Heavy Militia"  1   0.5   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Eri Militia"  1   0.5   2  0  requires factions { timurids, } and region_religion orthodox 60
                recruit_pool "Abid Al Javelinmenn"  1   1   6  1  requires factions { hedjaz, }  and region_religion islam 60 
                recruit_pool "Ahdath Militiaa"  1   1   6  1  requires factions { hedjaz, }  and region_religion islam 60                  		
		recruit_pool "Bedouinspearmen"  1   1   6  1  requires factions { hedjaz, }  and region_religion islam 60  
		law_bonus bonus 3
            }
            material wooden
            construction  10 
            cost  9600 
            settlement_min large_city
            upgrades
            {
                militia_barracks
            }
        }
        militia_barracks city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 4
            capability
            {
		recruit_pool "Dismounted Feudal Knights"  1   0.4   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Lithuanian Regular Crossbowmans"  1   0.5   4  1  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Lithuanian Regular Spearmans"  1   0.5   4  1  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Latin Handgunners"  1   0.5   4  0  requires factions { byzantium, }  and event_counter gunpowder_discovered 1  and region_religion orthodox 60  
                recruit_pool "Heavy Bill Militia"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 60  
		recruit_pool "Armored Goedendag Militia"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Pike Militia"  1   0.5   4  0  requires factions { france, hre, teutons, spain, portugal, milan, venice, papal_states, sicily, }  and region_religion catholic 60  
		recruit_pool "Flemish Pikemen"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Hand Gunners"  1   0.5   4  0  requires factions { denmark, poland, lit, norway, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60  
                recruit_pool "Berdiche Axemen"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Varangian Guard"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60
                recruit_pool "ME Hand Gunners"  1   0.5   4  0  requires factions { moors, turks, }  and event_counter gunpowder_discovered 1  and region_religion islam 60  
                recruit_pool "Armen Gunners"  1   0.5   4  0  requires factions { armenia, }  and event_counter gunpowder_discovered 1  and region_religion orthodox 60  
                recruit_pool "Tabardariyya"  1   0.5   4  0  requires factions { egypt, }  and region_religion islam 60  
                recruit_pool "Hand Gunners"  1   0.5   4  0  requires factions { hre, teutons, spain, portugal, milan, venice, papal_states, sicily, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60  
                recruit_pool "Bill Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60  
		recruit_pool "Goedendag Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Heavy Pike Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Partisan Militia"  1   0.7   6  0  requires factions { france, }  and region_religion catholic 60  
                recruit_pool "Halberd Militia"  1   0.7   6  0  requires factions { hre, teutons, papal_states, sicily, poland, hungary, }  and region_religion catholic 60  
                recruit_pool "Baltic Spearmen"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Swordstaff Militia"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60  
                recruit_pool "Swordsmen Militia"  1   0.7   6  0  requires factions { spain, portugal, }  and region_religion catholic 60   
                recruit_pool "Italian Cavalry Militia"  1   0.7   6  0  requires factions { milan, venice, }  and region_religion catholic 60  
                recruit_pool "EE Cavalry Militia"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Castrophilakae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Archontopoulai"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Armenianh Infantry"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60 
                recruit_pool "Urban Militia"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60 
                recruit_pool "ME Halberd Militia"  1   0.7   6  0  requires factions { egypt, turks, }  and region_religion islam 60  
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { england, flanders, }  and region_religion catholic 60  
                recruit_pool "Scots Pike Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Crossbow Militia"  1   0.7   6  0  requires factions { france, elo, hre, denmark, spain, portugal, norway, }  and region_religion catholic 60  
                recruit_pool "Genoese Crossbow Militia"  1   0.7   6  0  requires factions { milan, }  and region_religion catholic 60  
                recruit_pool "Pavise Crossbow Militia"  1   0.7   6  0  requires factions { venice, papal_states, sicily, hungary, }  and region_religion catholic 60  
                recruit_pool "Latinn Crossbow Militia"  0   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60  
		recruit_pool "Pavise Crossbow Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "EE Crossbow Militia"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "EE Crossbow Militia"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60 
                recruit_pool "Letts Crossbowmen"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "S Archer Militia"  1   0.7   6  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60  
                recruit_pool "ME Crossbow Militia"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60  
                recruit_pool "Saracen Militia"  1   0.7   6  0  requires factions { egypt, turks, }  and region_religion islam 60  
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, }  and region_religion catholic 60  
		recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Italian Spear Militia"  1   0.7   6  1  requires factions { milan, venice, papal_states, sicily, }   and region_religion catholic 60 
                recruit_pool "EE Spear Militia"  1   0.7   6  1  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "EE Spear Militia"  1   0.7   6  1  requires factions { poland, hungary, }  and region_religion catholic 60 
                recruit_pool "Baltic Raiders"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Contaratoi"  1   0.7   6  1  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Armenian Militia"  1   0.7   6  1  requires factions { armenia, }  and region_religion orthodox 60 
                recruit_pool "ME Spear Militia"  1   0.7   6  1  requires factions { moors, egypt, turks, }  and region_religion islam 60  
                recruit_pool "Town Militia"  1   0.7   6  1  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, norway, }  and region_religion catholic 60  
		recruit_pool "Town Militia"  1   0.7   6  1  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Italian Militia"  1   0.7   6  1  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "EE Town Militia"  1   0.7   6  1  requires factions { poland, hungary, }  and region_religion catholic 60 
                recruit_pool "Lithuanian Skirmishers"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "EE Archer Militia"  1   0.7   6  1  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60  
                recruit_pool "Acontistae"  1   0.7   6  1  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Shinakan Zork"  1   0.7   6  1  requires factions { armenia, }  and region_religion orthodox 60 
                recruit_pool "ME Town Militia"  1   0.7   6  1  requires factions { moors, turks, }  and region_religion islam 60  
                recruit_pool "ME Archer Militia"  1   0.7   6  1  requires factions { egypt, }  and region_religion islam 60  
                recruit_pool "ME Spear Militia"  1   0.7   6  2  requires factions { mongols, }  and region_religion pagan 60  
                recruit_pool "ME Town Militia"  1   0.7   6  1  requires factions { mongols, }  and region_religion pagan 60  
                recruit_pool "Dismounted Light Lancers"  1   0.7   3  0  requires factions { mongols, }  and region_religion pagan 60  
                recruit_pool "Halberd Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Irish Kerns"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Bowmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Swordsmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Pikemen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Spearmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Peasant Spearmen"  1   0.8   6  1  requires factions { norway, }  and region_religion catholic 60 
                recruit_pool "Theigns"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 60
                recruit_pool "Georgian Heavy Militia"  1   0.6   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Khevsur Warriors"  1   0.5   2  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Eri Militia"  1   0.6   2  0  requires factions { timurids, } and region_religion orthodox 60 
                recruit_pool "Abid Al Javelinmenn"  1   1   6  1  requires factions { hedjaz, }  and region_religion islam 60 
                recruit_pool "Ahdath Militiaa"  1   1   6  1  requires factions { hedjaz, }  and region_religion islam 60                  		
		recruit_pool "Bedouinspearmen"  1   1   6  1  requires factions { hedjaz, }  and region_religion islam 60  
                law_bonus bonus 3
            }
            material wooden
            construction  12 
            cost  14400 
            settlement_min large_city
            upgrades
            {
                army_barracks
            }
        }
        army_barracks city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 4
            capability
            {
                recruit_pool "Lithuanian Regular Crossbowmans"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Lithuanian Regular Spearmans"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Latin Handgunners"  1   0.7   6  0  requires factions { byzantium, }  and event_counter gunpowder_discovered 1  and region_religion orthodox 60  
                recruit_pool "Arquebusiers"  1   0.5   4  0  requires factions { england, france, hre, teutons, denmark, spain, milan, venice, papal_states, sicily, poland, flanders, norway, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60  
		recruit_pool "Lithuanian Gunmans"  1   0.7   6  0  requires factions { lit, }  and event_counter gunpowder_discovered 1  and region_religion pagan 60  
		recruit_pool "Arquebusiers"  1   0.5   4  0  requires factions { russia, kiev, timurids, }  and event_counter gunpowder_discovered 1  and region_religion orthodox 60  
                recruit_pool "Portuguese Arquebusiers"  1   0.5   4  0  requires factions { portugal, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60  
                recruit_pool "Sudanese Gunners"  1   0.5   4  0  requires factions { moors, egypt, }  and event_counter gunpowder_discovered 1  and region_religion islam 60   
                recruit_pool "Janissary Archers"  1   0.5   4  0  requires factions { turks, }  and region_religion islam 60
                recruit_pool "Pikemen"  1   0.5   4  0  requires factions { france, }  and region_religion catholic 60  
		recruit_pool "Menaulatoi"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60
                recruit_pool "Heavy Bill Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60  
		recruit_pool "Armored Goedendag Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Pike Militia"  1   0.7   6  0  requires factions { france, hre, teutons, spain, portugal, milan, venice, papal_states, sicily, }  and region_religion catholic 60  
		recruit_pool "Flemish Pikemen"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Hand Gunners"  1   0.7   6  0  requires factions { denmark, poland, norway, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60  
                recruit_pool "Berdiche Axemen"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60 
                recruit_pool "Arquebusiers"  1   0.7   6  0  requires factions { hungary, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60  
                recruit_pool "Varangian Guard"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60 
                recruit_pool "ME Hand Gunners"  1   0.7   6  0  requires factions { moors, turks, }  and event_counter gunpowder_discovered 1  and region_religion islam 60    
                recruit_pool "Armen Gunners"  1   0.7   6  0  requires factions { armenia, }  and event_counter gunpowder_discovered 1  and region_religion orthodox 60 
                recruit_pool "Tabardariyya"  1   0.7   6  0  requires factions { egypt, }  and region_religion islam 60    
                recruit_pool "Hand Gunners"  1   0.7   6  0  requires factions { hre, teutons, spain, portugal, milan, venice, papal_states, sicily, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60  
                recruit_pool "Bill Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60  
		recruit_pool "Goedendag Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Heavy Pike Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Partisan Militia"  1   0.7   6  0  requires factions { france, }  and region_religion catholic 60  
                recruit_pool "Halberd Militia"  1   0.7   6  0  requires factions { hre, teutons, papal_states, sicily, poland, hungary, }  and region_religion catholic 60  
                recruit_pool "Baltic Spearmen"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Swordstaff Militia"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60   
                recruit_pool "Swordsmen Militia"  1   0.7   6  0  requires factions { spain, portugal, }  and region_religion catholic 60    
                recruit_pool "Italian Cavalry Militia"  1   0.7   6  0  requires factions { milan, venice, }  and region_religion catholic 60   
                recruit_pool "EE Cavalry Militia"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Castrophilakae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Archontopoulai"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Armenianh Infantry"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60 
                recruit_pool "Urban Militia"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60    
                recruit_pool "ME Halberd Militia"  1   0.7   6  0  requires factions { egypt, turks, }  and region_religion islam 60    
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { england, flanders, }  and region_religion catholic 60   
                recruit_pool "Scots Pike Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60   
                recruit_pool "Crossbow Militia"  1   0.7   6  0  requires factions { france, elo, hre, denmark, spain, portugal, norway, }  and region_religion catholic 60   
                recruit_pool "Genoese Crossbow Militia"  1   0.7   6  0  requires factions { milan, }  and region_religion catholic 60   
                recruit_pool "Pavise Crossbow Militia"  1   0.7   6  0  requires factions { venice, papal_states, sicily, hungary, }  and region_religion catholic 60  
                recruit_pool "Latinn Crossbow Militia"  0   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60  
		recruit_pool "Pavise Crossbow Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60   
                recruit_pool "EE Crossbow Militia"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60   
                recruit_pool "EE Crossbow Militia"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60  
                recruit_pool "Letts Crossbowmen"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "S Archer Militia"  1   0.7   6  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60   
                recruit_pool "ME Crossbow Militia"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60     
                recruit_pool "Saracen Militia"  1   0.7   6  0  requires factions { egypt, turks, }  and region_religion islam 60      
                recruit_pool "Spear Militia"  1   0.7   6  2  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, }  and region_religion catholic 60   
		recruit_pool "Spear Militia"  1   0.7   6  2  requires factions { flanders, }  and region_religion catholic 60   
                recruit_pool "Italian Spear Militia"  1   0.7   6  2  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60   
                recruit_pool "EE Spear Militia"  1   0.7   6  2  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "EE Spear Militia"  1   0.7   6  2  requires factions { poland, hungary, }  and region_religion catholic 60    
                recruit_pool "Lithuanian Axemen"  1   0.7   6  2  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "Contaratoi"  1   0.7   6  2  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Armenian Militia"  1   0.7   6  1  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "ME Spear Militia"  1   0.7   6  2  requires factions { moors, egypt, turks, } 
                recruit_pool "Town Militia"  1   0.7   6  2  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, norway, }  and region_religion catholic 60    
		recruit_pool "Town Militia"  1   0.7   6  2  requires factions { flanders, }  and region_religion catholic 60   
                recruit_pool "Italian Militia"  1   0.7   6  2  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60    
                recruit_pool "EE Town Militia"  1   0.7   6  2  requires factions { poland, hungary, }  and region_religion catholic 60   
                recruit_pool "Lithuanian Skirmishers"  1   0.7   6  2  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "EE Archer Militia"  1   0.7   6  2  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "Acontistae"  1   0.7   6  2  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Shinakan Zork"  1   0.7   6  2  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "ME Town Militia"  1   0.7   6  2  requires factions { moors, turks, }  and region_religion islam 60      
                recruit_pool "ME Archer Militia"  1   0.7   6  2  requires factions { egypt, }  and region_religion islam 60     
                recruit_pool "ME Spear Militia"  1   0.7   6  3  requires factions { mongols, }  and region_religion pagan 60   
                recruit_pool "ME Town Militia"  1   0.7   6  2  requires factions { mongols, }  and region_religion pagan 60   
                recruit_pool "Dismounted Light Lancers"  1   0.7   3  0  requires factions { mongols, }  and region_religion pagan 60   
		recruit_pool "Dismounted Feudal Knights"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Halberd Militia"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Irish Kerns"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60   
                recruit_pool "Irish Bowmen"  0   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60   
                recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60   
                recruit_pool "Irish Swordsmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60   
                recruit_pool "Irish Pikemen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60   
                recruit_pool "Irish Spearmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60     
                recruit_pool "Javelinmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60   
                recruit_pool "Calivermen"  1   0.5   4  0  requires factions { ireland, } and event_counter gunpowder_discovered 1  and region_religion catholic 60  
                recruit_pool "Peasant Spearmen"  1   0.8   6  2  requires factions { norway, }  and region_religion catholic 60  
                recruit_pool "Theigns"  1   0.6   4  0  requires factions { norway, }  and region_religion catholic 60
                recruit_pool "Georgian Heavy Militia"  1   0.7   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Khevsur Warriors"  1   0.6   2  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Metsikhovne"  1   0.5   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Eri Militia"  1   0.7   2  0  requires factions { timurids, } and region_religion orthodox 60
                recruit_pool "Abid Al Javelinmenn"  1   1   6  2  requires factions { hedjaz, }  and region_religion islam 60 
                recruit_pool "Ahdath Militiaa"  1   1   6  2  requires factions { hedjaz, }  and region_religion islam 60                  		
		recruit_pool "Bedouinspearmen"  1   1   6  2  requires factions { hedjaz, }  and region_religion islam 60      
                law_bonus bonus 3
            }
            material wooden
            construction  14 
            cost  19200 
            settlement_min large_city
            upgrades
            {
                royal_armoury
            }
        }
        royal_armoury city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 4
            capability
            {
                recruit_pool "Cossack Musketeers"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60  and event_counter gunpowder_discovered 1    
                recruit_pool "Lithuanian Regular Crossbowmans"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Lithuanian Regular Spearmans"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Latin Handgunners"  1   0.7   6  0  requires factions { byzantium, }  and event_counter gunpowder_discovered 1  and region_religion orthodox 60  
                recruit_pool "Musketeers"  1   0.5   4  0  requires factions { spain, portugal, milan, venice, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60   
                recruit_pool "Janissary Musketeers"  1   0.5   4  0  requires factions { turks, }  and event_counter gunpowder_discovered 1  and region_religion islam 60    
                recruit_pool "Arquebusiers"  1   0.7   6  1  requires factions { england, france, hre, teutons, denmark, spain, milan, venice, papal_states, sicily, poland, flanders, norway, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60  
		recruit_pool "Lithuanian Gunmans"  1   0.7   6  1  requires factions { lit, }  and event_counter gunpowder_discovered 1  and region_religion pagan 60  
		recruit_pool "Arquebusiers"  1   0.7   6  1  requires factions { russia, kiev, timurids, }  and event_counter gunpowder_discovered 1  and region_religion orthodox 60  
                recruit_pool "Portuguese Arquebusiers"  1   0.7   6  1  requires factions { portugal, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60
                recruit_pool "Sudanese Gunners"  1   0.7   6  1  requires factions { moors, egypt, }  and event_counter gunpowder_discovered 1  and region_religion islam 60      
                recruit_pool "Janissary Archers"  1   0.7   6  1  requires factions { turks, }  and region_religion islam 60      
                recruit_pool "Pikemen"  1   0.7   6  1  requires factions { france, }  and region_religion catholic 60   
		recruit_pool "Menaulatoi"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Heavy Bill Militia"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 60   
		recruit_pool "Armored Goedendag Militia"  1   0.7   6  1  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Pike Militia"  1   0.7   6  1  requires factions { france, hre, teutons, spain, portugal, milan, venice, papal_states, sicily, }  and region_religion catholic 60   
		recruit_pool "Flemish Pikemen"  1   0.7   6  1  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Hand Gunners"  1   0.7   6  1  requires factions { denmark, poland, norway, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60  
                recruit_pool "Berdiche Axemen"  1   0.7   6  1  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Arquebusiers"  1   0.7   6  1  requires factions { hungary, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60     
                recruit_pool "Varangian Guard"  1   0.7   6  1  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "ME Hand Gunners"  1   0.7   6  1  requires factions { moors, turks, }  and event_counter gunpowder_discovered 1  and region_religion islam 60     
                recruit_pool "Armen Gunners"  1   0.7   6  1  requires factions { armenia, }  and event_counter gunpowder_discovered 1  and region_religion orthodox 60  
                recruit_pool "Tabardariyya"  1   0.7   6  1  requires factions { egypt, }  and region_religion islam 60      
                recruit_pool "Hand Gunners"  1   0.7   6  1  requires factions { hre, teutons, spain, portugal, milan, venice, papal_states, sicily, }  and event_counter gunpowder_discovered 1  and region_religion catholic 60    
                recruit_pool "Bill Militia"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 60    
		recruit_pool "Goedendag Militia"  1   0.7   6  1  requires factions { flanders, }  and region_religion catholic 60    
                recruit_pool "Heavy Pike Militia"  1   0.7   6  1  requires factions { scotland, }  and region_religion catholic 60    
                recruit_pool "Partisan Militia"  1   0.7   6  1  requires factions { france, }  and region_religion catholic 60    
                recruit_pool "Halberd Militia"  1   0.7   6  1  requires factions { hre, teutons, papal_states, sicily, poland, hungary, }  and region_religion catholic 60  
                recruit_pool "Baltic Spearmen"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Swordstaff Militia"  1   0.7   6  1  requires factions { denmark, norway, }  and region_religion catholic 60     
                recruit_pool "Swordsmen Militia"  1   0.7   6  1  requires factions { spain, portugal, }  and region_religion catholic 60      
                recruit_pool "Italian Cavalry Militia"  1   0.7   6  1  requires factions { milan, venice, }  and region_religion catholic 60     
                recruit_pool "EE Cavalry Militia"  1   0.7   6  1  requires factions { russia, kiev, }  and region_religion orthodox 60   
                recruit_pool "Castrophilakae"  1   0.7   6  1  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Archontopoulai"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Armenianh Infantry"  1   0.7   6  1  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "Urban Militia"  1   0.7   6  1  requires factions { moors, }  and region_religion islam 60      
                recruit_pool "ME Halberd Militia"  1   0.7   6  1  requires factions { egypt, turks, }  and region_religion islam 60     
                recruit_pool "Archer Militia"  1   0.7   6  1  requires factions { england, flanders, }  and region_religion catholic 60     
                recruit_pool "Scots Pike Militia"  1   0.7   6  1  requires factions { scotland, }  and region_religion catholic 60     
                recruit_pool "Crossbow Militia"  1   0.7   6  1  requires factions { france, elo, hre, denmark, spain, portugal, norway, }  and region_religion catholic 60     
                recruit_pool "Genoese Crossbow Militia"  1   0.7   6  1  requires factions { milan, }  and region_religion catholic 60     
                recruit_pool "Pavise Crossbow Militia"  1   0.7   6  1  requires factions { venice, papal_states, sicily, hungary, }  and region_religion catholic 60     
                recruit_pool "Latinn Crossbow Militia"  0   0.7   6  1  requires factions { armenia, }  and region_religion orthodox 60   
		recruit_pool "Pavise Crossbow Militia"  1   0.7   6  1  requires factions { flanders, }  and region_religion catholic 60     
                recruit_pool "EE Crossbow Militia"  1   0.7   6  1  requires factions { russia, kiev, }  and region_religion orthodox 60   
                recruit_pool "EE Crossbow Militia"  1   0.7   6  1  requires factions { poland, }  and region_religion catholic 60  
                recruit_pool "Letts Crossbowmen"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "S Archer Militia"  1   0.7   6  1  requires factions { byzantium, armenia, }  and region_religion orthodox 60   
                recruit_pool "ME Crossbow Militia"  1   0.7   6  1  requires factions { moors, }  and region_religion islam 60      
                recruit_pool "Saracen Militia"  1   0.7   6  1  requires factions { egypt, turks, }  and region_religion islam 60     
                recruit_pool "Spear Militia"  1   0.7   6  3  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, }  and region_religion catholic 60     
		recruit_pool "Spear Militia"  1   0.7   6  3  requires factions { flanders, }  and region_religion catholic 60    
                recruit_pool "Italian Spear Militia"  1   0.7   6  3  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60     
                recruit_pool "EE Spear Militia"  1   0.7   6  3  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "EE Spear Militia"  1   0.7   6  3  requires factions { poland, hungary, }  and region_religion catholic 60    
                recruit_pool "Lithuanian Axemen"  1   0.7   6  3  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "Contaratoi"  1   0.7   6  3  requires factions { byzantium, }  and region_religion orthodox 60   
        	recruit_pool "Armenian Militia"  1   0.7   6  1  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "ME Spear Militia"  1   0.7   6  3  requires factions { moors, egypt, turks, }  and region_religion islam 60    
                recruit_pool "Town Militia"  1   0.7   6  3  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, norway, }  and region_religion catholic 60     
		recruit_pool "Town Militia"  1   0.7   6  3  requires factions { flanders, }  and region_religion catholic 60    
                recruit_pool "Italian Militia"  1   0.7   6  3  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60     
                recruit_pool "EE Town Militia"  1   0.7   6  3  requires factions { poland, hungary, }  and region_religion catholic 60   
                recruit_pool "Lithuanian Skirmishers"  1   0.7   6  3  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "EE Archer Militia"  1   0.7   6  3  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "Acontistae"  1   0.7   6  3  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Shinakan Zork"  1   0.7   6  3  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "ME Town Militia"  1   0.7   6  3  requires factions { moors, turks, }   and region_religion islam 60   
                recruit_pool "ME Archer Militia"  1   0.7   6  3  requires factions { egypt, }  and region_religion islam 60    
                recruit_pool "ME Spear Militia"  1   0.7   6  4  requires factions { mongols, }  and region_religion pagan 60    
                recruit_pool "ME Town Militia"  1   0.7   6  3  requires factions { mongols, }  and region_religion pagan 60    
                recruit_pool "Dismounted Light Lancers"  1   0.7   3  1  requires factions { mongols, }  and region_religion islam 60    
                recruit_pool "Halberd Militia"  1   0.5   4  1  requires factions { flanders, }  and region_religion catholic 60     
		recruit_pool "Dismounted Feudal Knights"  1   0.5   4  1  requires factions { flanders, }  and region_religion catholic 60       
                recruit_pool "Irish Kerns"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60     
                recruit_pool "Irish Bowmen"  0   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60     
                recruit_pool "Peasant Crossbowmen"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60     
                recruit_pool "Viking Raiders"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60     
                recruit_pool "Irish Swordsmen"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60     
                recruit_pool "Irish Pikemen"  1   0.7   6  1  requires factions { ireland, }   and region_religion catholic 60    
                recruit_pool "Irish Spearmen"  1   0.7   6  1  requires factions { ireland, }   and region_religion catholic 60        
                recruit_pool "Javelinmen"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60     
                recruit_pool "Calivermen"  1   0.7   6  0  requires factions { ireland, } and event_counter gunpowder_discovered 1  and region_religion catholic 60    
                recruit_pool "Peasant Spearmen"  1   0.8   6  3  requires factions { norway, }  and region_religion catholic 60    
                recruit_pool "Theigns"  1   0.6   4  1  requires factions { norway, }  and region_religion catholic 60
                recruit_pool "Georgian Heavy Militia"  1   0.8   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Khevsur Warriors"  1   0.7   2  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Metsikhovne"  1   0.6   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Eri Militia"  1   0.8   2  0  requires factions { timurids, } and region_religion orthodox 60      
                recruit_pool "Abid Al Javelinmenn"  1   1   6  3  requires factions { hedjaz, }  and region_religion islam 60 
                recruit_pool "Ahdath Militiaa"  1   1   6  3  requires factions { hedjaz, }  and region_religion islam 60                  		
		recruit_pool "Bedouinspearmen"  1   1   6  3  requires factions { hedjaz, }  and region_religion islam 60  
                law_bonus bonus 7
            }
            material wooden
            construction  16 
            cost  24000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building castle_barracks
{
    convert_to barracks
    levels mustering_hall garrison_quarters drill_square barracks armoury 
    {
        mustering_hall castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Peasants"  1   1   4  0  requires factions { england, france, elo, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, flanders, norway, }  and region_religion catholic 60  
                recruit_pool "Highland Rabble"  1   1   4  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Southern Peasants"  1   1   4  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60  
		recruit_pool "Southern Peasants"  1   1   4  0  requires factions { sicily, }  and region_religion catholic 60 
                recruit_pool "EE Peasants"  1   1   4  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60  
                recruit_pool "EE Peasants"  1   1   4  0  requires factions { poland, hungary, }  and region_religion catholic 60  
                recruit_pool "Lithuanian Skirmishers"  1   0.4   4  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "ME Peasants"  1   1   4  0  requires factions { moors, egypt, turks, }  and region_religion islam 60 
                recruit_pool "ME Peasants"  1   1   4  0  requires factions { mongols, }  and region_religion pagan 60  
                recruit_pool "Irish Kerns"  1   1   4  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Yemani Javelinmen"  1   1   4  0  requires factions { hedjaz, }  and region_religion islam 60  
                }
            material wooden
            construction  2 
            cost  1200 
            settlement_min village
            upgrades
            {
                garrison_quarters
            }
        }
        garrison_quarters castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter mil_level_1 1 
        {
            convert_to 0
            capability
            {
                recruit_pool "Levy Spearmen"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 60  
                recruit_pool "Highlanders"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Sergeant Spearmen"  1   0.5   4  0  requires factions { france, elo, hre, teutons, milan, venice, papal_states, sicily, flanders, }  and region_religion catholic 60  
                recruit_pool "Viking Raiders"  1   0.5   4  0  requires factions { denmark, norway, }  and region_religion catholic 60  
                recruit_pool "Baltic Raiders"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Javelinmen"  1   0.5   4  0  requires factions { spain, }  and region_religion catholic 60  
                recruit_pool "Lusitanian Javelinmen"  1   0.5   4  0  requires factions { portugal, }  and region_religion catholic 60  
                recruit_pool "Woodsmen"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Woodsmen"  1   0.5   4  0  requires factions { poland, }  and region_religion catholic 60  
                recruit_pool "Slav Levies"  1   0.5   4  0  requires factions { hungary, }  and region_religion catholic 60  
                recruit_pool "Scoutatoi"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Berber Spearmen"  1   0.5   4  0  requires factions { moors, }  and region_religion islam 60 
                recruit_pool "Muslim Swordsmen"  1   0.5   4  0  requires factions { moors, turks, egypt, }  and region_religion islam 60   
                recruit_pool "Kurdish Javelinmen"  1   0.5   4  0  requires factions { egypt, }  and region_religion islam 60  
                recruit_pool "Turkish Javelinmen"  1   0.5   4  0  requires factions { turks, }  and region_religion islam 60  
                recruit_pool "ME Levy Spearmen"  1   0.5   4  0  requires factions { mongols, }  and region_religion pagan 60  
                recruit_pool "Armenian Militia"  1   0.5   4  0  requires factions { armenia, }  and region_religion orthodox 60 
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { england, france, elo, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, flanders, norway, }  and region_religion catholic 60  
                recruit_pool "Highland Rabble"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Southern Peasants"  1   0.7   6  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60   
                recruit_pool "Southern Peasants"  1   0.7   6  0  requires factions { sicily, }  and region_religion catholic 60   
                recruit_pool "EE Peasants"  1   0.7   6  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "EE Peasants"  1   0.7   6  0  requires factions { poland, hungary, }  and region_religion catholic 60   
                recruit_pool "Lithuanian Skirmishers"  1   0.6   4  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "ME Peasants"  1   0.7   6  0  requires factions { moors, egypt, turks, }  and region_religion islam 60  
                recruit_pool "ME Peasants"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60  
                recruit_pool "Irish Kerns"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60   
                recruit_pool "Yemani Javelinmen"  1   0.7   6  0  requires factions { hedjaz, }  and region_religion islam 60  
                recruit_pool "Abbysini Tribesmen"  1   0.5   2  0  requires factions { hedjaz, }  and region_religion islam 60  
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min town
            upgrades
            {
                drill_square
            }
        }
        drill_square castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter mil_level_2 1 
        {
            convert_to 1
            capability
            {
                recruit_pool "Acritae"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Dismounted Teutonic Knights"  1   0.5   4  0  requires factions { teutons, }  and region_religion catholic 60 
                recruit_pool "Ducal Sword Infantry"  1   0.4   3  1  requires factions { lit, }  and region_religion pagan 60
                recruit_pool "Billmen"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 60   
		recruit_pool "Goedendag Militia"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Highland Nobles"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 60   
                recruit_pool "Armored Sergeants"  1   0.5   4  0  requires factions { france, elo, hre, england, milan, venice, papal_states, sicily,  }  and region_religion catholic 60   
                recruit_pool "Norse Swordsmen_2"  1   0.5   2  0  requires factions { russia, kiev, }  and region_religion catholic 60 or region_religion orthodox 60  
                recruit_pool "Norse Swordsmen"  1   0.5   4  0  requires factions { denmark, norway, }  and region_religion catholic 60 or region_religion orthodox 60  
		recruit_pool "Flemish Badelaar Militia"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60   
                recruit_pool "Almughavars"  1   0.5   4  0  requires factions { spain, portugal, }  and region_religion catholic 60    
                recruit_pool "EE Spearmen"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60   
                recruit_pool "EE Spearmen"  1   0.5   4  0  requires factions { poland, }  and region_religion catholic 60  
                recruit_pool "Baltic Spearmen"  1   0.5   4  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Croat Axemen"  1   0.5   4  0  requires factions { hungary, }  and region_religion catholic 60  
                recruit_pool "Nubian Spearmen"  1   0.5   4  0  requires factions { moors, egypt, }  and region_religion islam 60  
                recruit_pool "Azabs"  1   0.5   4  0  requires factions { turks, }  and region_religion islam 60   
                recruit_pool "Shinakan Zork"  1   0.5   4  0  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "Mongol Infantry"  1   0.5   4  0  requires factions { mongols, }  and region_religion pagan 60  
                recruit_pool "Dismounted Huscarls"  1   0.5   4  0  requires factions { denmark, norway, }  and region_religion catholic 60  
                recruit_pool "Levy Spearmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60  
                recruit_pool "Highlanders"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Sergeant Spearmen"  1   0.7   6  0  requires factions { france, elo, hre, teutons, milan, venice, papal_states, sicily, flanders, }  and region_religion catholic 60  
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60  
                recruit_pool "Baltic Raiders"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Javelinmen"  1   0.7   6  0  requires factions { spain, }  and region_religion catholic 60  
                recruit_pool "Lusitanian Javelinmen"  1   0.7   6  0  requires factions { portugal, }  and region_religion catholic 60  
                recruit_pool "Woodsmen"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Woodsmen"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60  
                recruit_pool "Slav Levies"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60  
                recruit_pool "Scoutatoi"  1   0.7   6  1  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Scoutatoi Swordsmen"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Berber Spearmen"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60 
                recruit_pool "Muslim Swordsmen"  1   0.7   6  0  requires factions { moors, turks, egypt, }  and region_religion islam 60    
                recruit_pool "Kurdish Javelinmen"  1   0.7   6  0  requires factions { egypt, }  and region_religion islam 60  
                recruit_pool "Turkish Javelinmen"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60  
                recruit_pool "ME Levy Spearmen"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60  
                recruit_pool "Armenian Militia"  1   0.5   4  0  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { england, france, elo, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, flanders, norway, }  and region_religion catholic 60  
                recruit_pool "Highland Rabble"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Southern Peasants"  1   0.7   6  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60   
                recruit_pool "Southern Peasants"  1   0.7   6  0  requires factions { sicily, }  and region_religion catholic 60   
                recruit_pool "EE Peasants"  1   0.7   6  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "EE Peasants"  1   0.7   6  0  requires factions { poland, hungary, }  and region_religion catholic 60   
                recruit_pool "Lithuanian Skirmishers"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "ME Peasants"  1   0.7   6  0  requires factions { moors, egypt, turks, }  and region_religion islam 60  
                recruit_pool "ME Peasants"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60  
		recruit_pool "Flemish Pikemen"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Dismounted Mailed Knights"  1   0.4   3  0  requires factions { england, scotland, france, hre, teutons, spain, portugal, milan, venice, papal_states, sicily, elo, }  and region_religion catholic 60   
		recruit_pool "Sergeant Swordsmen"  1   0.5   4  0  requires factions { england, france, milan, venice, papal_states, sicily, }  and region_religion catholic 60 
		recruit_pool "Andalusian Infantry"  1   0.5   4  0  requires factions { moors, }  and region_religion islam 60 
		recruit_pool "Axemen"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
		recruit_pool "Axemen"  1   0.5   4  0  requires factions { denmark, }  and region_religion catholic 60  
		recruit_pool "Swabian Swordsmen"  1   0.5   4  0  requires factions { hre, }  and region_religion catholic 60 
                recruit_pool "Irish Kerns"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60     
                recruit_pool "Irish Swordsmen"  1   0.5   4  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Spearmen"  1   0.5   4  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Theigns"  1   0.5   3  0  requires factions { norway, }  and region_religion catholic 60 
                recruit_pool "Edessan Squires"  1   0.7   6  0  requires factions { elo, }  and region_religion catholic 60  
                recruit_pool "Dismounted Ghulams"  1   0.5   4  0  requires factions { egypt, }  and region_religion islam 60  
                recruit_pool "Georgian Mercenaries"  1   0.4   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Yemani Javelinmen"  1   0.7   6  0  requires factions { hedjaz, }  and region_religion islam 60  
                recruit_pool "Abbysini Tribesmen"  1   0.7   6  0  requires factions { hedjaz, }  and region_religion islam 60  
                recruit_pool "Jihadawwi'a"  1   0.5   4  0  requires factions { hedjaz, }  and region_religion islam 60  
            }
            material wooden
            construction  6 
            cost  4800 
            settlement_min large_town
            upgrades
            {
                barracks
            }
        }
        barracks castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter mil_level_3 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "Acritae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  
		recruit_pool "Alamanoi"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60
                recruit_pool "Dismounted Teutonic Knights"  1   0.7   6  0  requires factions { teutons, }  and region_religion catholic 60 
                recruit_pool "Ducal Sword Infantry"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60
                recruit_pool "Lithuanian Noble Sons"  1   0.5   4  1  requires factions { lit, }  and region_religion pagan 60
                recruit_pool "Ducal Axe"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60
                recruit_pool "Baltic Raiders"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60 
                recruit_pool "Dismounted Huscarls"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60  
                recruit_pool "Armored Swordsmen"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 60  
                recruit_pool "Highland Pikemen"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Voulgier"  1   0.5   4  0  requires factions { france, }  and region_religion catholic 60  
                recruit_pool "Norse Axemen"  1   0.5   4  0  requires factions { denmark, }  and region_religion catholic 60  
                recruit_pool "Venetian Heavy Infantry"  1   0.5   4  0  requires factions { venice, }  and region_religion catholic 60  
                recruit_pool "Dismounted Druchima"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60   
                recruit_pool "Pavise Spearmen"  1   0.5   4  0  requires factions { hungary, }  and region_religion catholic 60  
                recruit_pool "Arcity Spearmen"  1   0.5   4  0  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "Lamtuna Spearmen"  1   0.5   4  0  requires factions { moors, }  and region_religion islam 60   
                recruit_pool "Naffatun"  1   0.5   4  0  requires factions { egypt, turks, mongols, }  and region_religion islam 60   
                recruit_pool "Billmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60  
		recruit_pool "Goedendag Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Highland Nobles"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Armored Sergeants"  1   0.7   6  1  requires factions { france, elo, hre, england, milan, venice, papal_states, sicily, flanders, }  and region_religion catholic 60  
                recruit_pool "Norse Swordsmen"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60 or region_religion orthodox 60 
                recruit_pool "Norse Swordsmen_2"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion catholic 60 or region_religion orthodox 60  
		recruit_pool "Flemish Badelaar Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Almughavars"  1   0.7   6  1  requires factions { spain, portugal, }  and region_religion catholic 60   
                recruit_pool "EE Spearmen"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60   
                recruit_pool "EE Spearmen"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60  
                recruit_pool "Baltic Spearmen"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Croat Axemen"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60 
                recruit_pool "Scoutatoi Swordsmen"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Dismounted Nakharars Lancers"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60   
                recruit_pool "Nubian Spearmen"  1   0.7   6  0  requires factions { moors, egypt, }  and region_religion islam 60   
                recruit_pool "Azabs"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60   
                recruit_pool "Shinakan Zork"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "Mongol Infantry"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60   
                recruit_pool "Levy Spearmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60 
                recruit_pool "Highlanders"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60 
                recruit_pool "Sergeant Spearmen"  1   0.7   6  1  requires factions { france, elo, hre, teutons, milan, papal_states, sicily, flanders, }  and region_religion catholic 60 
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60 
                recruit_pool "Javelinmen"  1   0.7   6  1  requires factions { spain, }  and region_religion catholic 60 
                recruit_pool "Lusitanian Javelinmen"  1   0.7   6  1  requires factions { portugal, }  and region_religion catholic 60 
                recruit_pool "Sergeant Spearmen"  1   0.7   6  0  requires factions { venice,  }  and region_religion catholic 60 
                recruit_pool "Woodsmen"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Woodsmen"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60    
                recruit_pool "Slav Levies"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60   
                recruit_pool "Scoutatoi"  1   0.7   6  2  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Berber Spearmen"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60  
                recruit_pool "Muslim Swordsmen"  1   0.7   6  0  requires factions { moors, turks, egypt, }  and region_religion islam 60     
                recruit_pool "Kurdish Javelinmen"  1   0.7   6  0  requires factions { egypt, }  and region_religion islam 60   
                recruit_pool "Turkish Javelinmen"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60   
                recruit_pool "ME Levy Spearmen"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60   
                recruit_pool "Peasants"  1   0.1   4  0  requires factions { england, france, elo, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, flanders, norway, }  and region_religion catholic 60 
                recruit_pool "Highland Rabble"  1   0.1   4  0  requires factions { scotland, }  and region_religion catholic 60 
                recruit_pool "Southern Peasants"  1   0.1   4  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60   
                recruit_pool "Southern Peasants"  1   0.1   4  0  requires factions { sicily, }  and region_religion catholic 60   
                recruit_pool "EE Peasants"  1   0.1   4  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "EE Peasants"  1   0.1   4  0  requires factions { poland, hungary, }  and region_religion catholic 60   
                recruit_pool "Lithuanian Skirmishers"  1   0.1   4  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "ME Peasants"  1   0.1   4  0  requires factions { moors, egypt, turks, }  and region_religion islam 60  
                recruit_pool "ME Peasants"  1   0.1   4  0  requires factions { mongols, }  and region_religion pagan 60  
		recruit_pool "Flemish Pikemen"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60     
                recruit_pool "Dismounted Heavy Lancers"  1   0.4   3  0  requires factions { mongols, }   and region_religion pagan 60  
                recruit_pool "Dismounted Mailed Knights"  1   0.5   4  0  requires factions { england, scotland, france, hre, teutons, spain, portugal, milan, venice, papal_states, sicily, elo, }  and region_religion catholic 60
                recruit_pool "Dismounted Feudal Knights"  1   0.4   3  0  requires factions { scotland, france, hre, denmark, spain, milan, venice, papal_states, hungary, norway, }  and region_religion catholic 60 
                recruit_pool "Dismounted Norman Knights"  1   0.4   3  0  requires factions { sicily, }  and region_religion catholic 60 
                recruit_pool "Dismounted Boyar Sons"  1   0.4   3  0  requires factions { russia, kiev, }  and region_religion orthodox 60   
                recruit_pool "Dismounted Arab Cavalry"  1   0.4   3  0  requires factions { moors, egypt, }  and region_religion islam 60   
                recruit_pool "Dismounted Sipahi Lancers"  1   0.4   3  0  requires factions { turks, }  and region_religion islam 60   
                recruit_pool "Dismounted Heavy Archers"  1   0.4   3  0  requires factions { mongols, }  and region_religion pagan 60   
                recruit_pool "Dismounted Feudal Knights"  1   0.5   4  0  requires factions { england, portugal, elo, }  and region_religion catholic 60                 
		recruit_pool "Sergeant Swordsmen"  1   0.7   6  1  requires factions { england, france, milan, venice, papal_states, sicily, }  and region_religion catholic 60
		recruit_pool "Andalusian Infantry"  1   0.7   6  1  requires factions { moors, }  and region_religion islam 60  
		recruit_pool "Axemen"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60 
		recruit_pool "Axemen"  1   0.5   4  0  requires factions { denmark, }  and region_religion catholic 60   
		recruit_pool "Swabian Swordsmen"  1   0.7   6  0  requires factions { hre, }  and region_religion catholic 60
                recruit_pool "Dismounted Feudal Knights"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Halberd Militia"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60
                recruit_pool "Irish Kerns"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Irish Swordsmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Irish Spearmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Javelinmen"  1   0.5   4  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Galloglaich"  1   0.5   4  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Highland Nobles"  1   0.5   4  0  requires factions { ireland, }  and region_religion catholic 60
                recruit_pool "Sami Axemen"  1   0.5   4  0  requires factions { norway, }  and region_religion catholic 60
                recruit_pool "Gotland Footmen"  1   0.5   4  0  requires factions { norway, }  and region_religion catholic 60
                recruit_pool "Theigns"  1   0.6   4  0  requires factions { norway, }  and region_religion catholic 60
                recruit_pool "Edessan Squires"  1   0.1   4  0  requires factions { elo, }  and region_religion catholic 60
                recruit_pool "Edessan Guard"  1   0.5   4  0  requires factions { elo, }  and region_religion catholic 60 
                recruit_pool "Dismounted Ghulams"  1   0.7   6  0  requires factions { egypt, }  and region_religion islam 60   
                recruit_pool "Dismounted Hasham"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60
                recruit_pool "Georgian Mercenaries"  1   0.5   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Kartlian Spearmen"  1   0.4   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Aznauri Infantry"  1   0.34   3  0  requires factions { timurids, }  and region_religion orthodox 60   
                recruit_pool "Yemani Javelinmen"  1   0.7   6  0  requires factions { hedjaz, }  and region_religion islam 60  
                recruit_pool "Abbysini Tribesmen"  1   0.7   6  0  requires factions { hedjaz, }  and region_religion islam 60  
                recruit_pool "Jihadawwi'a"  1   0.7   6  0  requires factions { hedjaz, }  and region_religion islam 60  
                recruit_pool "Arabguard"  1   0.3   2  0  requires factions { hedjaz, }  and region_religion islam 60  
            }
            material wooden
            construction  8 
            cost  9600 
            settlement_min city
            upgrades
            {
                armoury
            }
        }
        armoury castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter mil_level_4 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "Lithuania Regular swordsmans"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60
                recruit_pool "Dismounted Halbbruder"  1   0.7   6  0  requires factions { teutons, }  and region_religion catholic 60   
                recruit_pool "Acritae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  
		recruit_pool "Alamanoi"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60
		recruit_pool "Varangian Guard"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60
                recruit_pool "Dismounted Teutonic Knights"  1   0.7   6  0  requires factions { teutons, }  and region_religion catholic 60 
                recruit_pool "Noble Inf"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60
                recruit_pool "Ducal Sword Infantry"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60
                recruit_pool "Lithuanian Noble Sons"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60
                recruit_pool "Ducal Axe"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60
                recruit_pool "Baltic Raiders"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Noble Swordsmen"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60 
                recruit_pool "Pikemen"  1   0.7   6  0  requires factions { france, }  and region_religion catholic 60 
                recruit_pool "Dismounted Broken Lances"  1   0.7   6  0  requires factions { sicily, }  and region_religion catholic 60 
                recruit_pool "Dismounted Christian Guard"  1   0.7   6  0  requires factions { moors, elo, }  and region_religion catholic 60 
                recruit_pool "Heavy Billmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60 
		recruit_pool "Armored Goedendag Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Noble Pikemen"  1   0.7   6  0  requires factions { scotland, teutons, }  and region_religion catholic 60 
                recruit_pool "Obudshaer"  1   0.7   6  0  requires factions { denmark, }  and region_religion catholic 60 
                recruit_pool "Armored Swordsmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60 
                recruit_pool "Highland Pikemen"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60 
                recruit_pool "Voulgier"  1   0.7   6  0  requires factions { france, }  and region_religion catholic 60 
                recruit_pool "Zweihander"  1   0.7   6  0  requires factions { hre, }  and region_religion catholic 60
                recruit_pool "Dismounted Gothic Knights" 1   0.7   6  1 requires factions { hre, }  and region_religion catholic 60 
                recruit_pool "Norse Axemen"  1   0.7   6  0  requires factions { denmark, }  and region_religion catholic 60 
                recruit_pool "Sword and Buckler Men"  1   0.7   6  0  requires factions { spain, sicily, }  and region_religion catholic 60 
                recruit_pool "Aventuros"  1   0.7   6  0  requires factions { portugal, }  and region_religion catholic 60 
                recruit_pool "Venetian Heavy Infantry"  1   0.7   6  1  requires factions { venice, }  and region_religion catholic 60 
                recruit_pool "Dismounted Druchima"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60   
                recruit_pool "Pavise Spearmen"  1   0.7   6  1  requires factions { hungary, }  and region_religion catholic 60 
                recruit_pool "Arcity Spearmen"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "Spartharii tou Vasileos"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Lamtuna Spearmen"  1   0.7   6  1  requires factions { moors, }  and region_religion islam 60   
                recruit_pool "Naffatun"  1   0.7   6  1  requires factions { egypt, turks, }  and region_religion islam 60   
                recruit_pool "Naffatun"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60   
                recruit_pool "Dismounted Huscarls"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60 
                recruit_pool "Billmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60 
		recruit_pool "Goedendag Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Highland Nobles"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60 
                recruit_pool "Armored Sergeants"  1   0.7   6  1  requires factions { france, elo, hre, england, milan, venice, papal_states, sicily, flanders, }  and region_religion catholic 60 
                recruit_pool "Norse Swordsmen"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60 or region_religion orthodox 60
                recruit_pool "Norse Swordsmen_2"  1   0.5   6  0  requires factions { russia, kiev, }  and region_religion catholic 60 or region_religion orthodox 60  
		recruit_pool "Flemish Badelaar Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Almughavars"  1   0.7   6  1  requires factions { spain, portugal, }  and region_religion catholic 60  
                recruit_pool "EE Spearmen"  1   0.7   6  1  requires factions { russia, kiev, }  and region_religion orthodox 60   
                recruit_pool "EE Spearmen"  1   0.7   6  1  requires factions { poland, }  and region_religion catholic 60  
                recruit_pool "Baltic Spearmen"  1   0.7   6  1  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Croat Axemen"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60   
                recruit_pool "Scoutatoi Swordsmen"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Dismounted Nakharars Lancers"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60   
                recruit_pool "Nubian Spearmen"  1   0.7   6  1  requires factions { moors, egypt, }  and region_religion islam 60   
                recruit_pool "Azabs"  1   0.7   6  1  requires factions { turks, }  and region_religion islam 60   
                recruit_pool "Shinakan Zork"  1   0.7   6  1  requires factions { armenia, }  and region_religion orthodox 60   
                recruit_pool "Mongol Infantry"  1   0.7   6  1  requires factions { mongols, }  and region_religion pagan 60   
                recruit_pool "Levy Spearmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60   
                recruit_pool "Highlanders"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60   
                recruit_pool "Sergeant Spearmen"  1   0.7   6  1  requires factions { france, elo, hre, teutons, milan, venice, papal_states, sicily, flanders, }  and region_religion catholic 60   
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60   
                recruit_pool "Javelinmen"  1   0.7   6  1  requires factions { spain, }  and region_religion catholic 60   
                recruit_pool "Lusitanian Javelinmen"  1   0.7   6  1  requires factions { portugal, }  and region_religion catholic 60   
                recruit_pool "Woodsmen"  1   0.7   6  1  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Woodsmen"  1   0.7   6  1  requires factions { poland, }  and region_religion catholic 60    
                recruit_pool "Slav Levies"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60   
                recruit_pool "Scoutatoi"  1   0.7   6  3  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Berber Spearmen"  1   0.7   6  1  requires factions { moors, }  and region_religion islam 60  
                recruit_pool "Muslim Swordsmen"  1   0.7   6  1  requires factions { moors, turks, egypt, }  and region_religion islam 60     
                recruit_pool "Kurdish Javelinmen"  1   0.7   6  1  requires factions { egypt, }  and region_religion islam 60   
                recruit_pool "Turkish Javelinmen"  1   0.7   6  1  requires factions { turks, }  and region_religion islam 60   
                recruit_pool "ME Levy Spearmen"  1   0.7   6  1  requires factions { mongols, }  and region_religion pagan 60   
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { england, france, elo, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, flanders, norway, }  and region_religion catholic 60   
                recruit_pool "Highland Rabble"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60   
                recruit_pool "Southern Peasants"  1   0.1   4  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60   
                recruit_pool "Southern Peasants"  1   0.1   4  0  requires factions { sicily, }  and region_religion catholic 60   
                recruit_pool "EE Peasants"  1   0.1   4  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60   
                recruit_pool "EE Peasants"  1   0.1   4  0  requires factions { poland, hungary, }  and region_religion catholic 60   
                recruit_pool "Lithuanian Skirmishers"  1   0.1   4  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "ME Peasants"  1   0.1   4  0  requires factions { moors, egypt, turks, }  and region_religion islam 60  
                recruit_pool "ME Peasants"  1   0.1   4  0  requires factions { mongols, }  and region_religion pagan 60  
		recruit_pool "Flemish Pikemen"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60    
                recruit_pool "Dismounted Heavy Lancers"  1   0.4   3  0  requires factions { mongols, }   and region_religion pagan 60  
                recruit_pool "Dismounted Feudal Knights"  1   0.4   3  0  requires factions { scotland, denmark, elo, norway, }  and region_religion catholic 60  
                recruit_pool "Dismounted Noble Knights"  1   0.4   3  0  requires factions { france, elo, }  and region_religion catholic 60  
                recruit_pool "Dismounted Imperial Knights"  1   0.4   3  0  requires factions { hre, teutons, }  and region_religion catholic 60  
                recruit_pool "Dismounted Chivalric Knights"  1   0.4   3  0  requires factions { france, denmark, spain, norway, }  and region_religion catholic 60  
                recruit_pool "Dismounted Italian MAA"  1   0.4   3  0  requires factions { milan, venice, papal_states, }  and region_religion catholic 60 
                recruit_pool "Dismounted Norman Knights"  1   0.4   3  0  requires factions { sicily, }  and region_religion catholic 60  
                recruit_pool "Dismounted Boyar Sons"  1   0.4   3  0  requires factions { russia, kiev, }  and region_religion orthodox 60    
                recruit_pool "Dismounted E Chivalric Knights"  1   0.4   3  0  requires factions { hungary, }  and region_religion catholic 60  
                recruit_pool "Dismounted Arab Cavalry"  1   0.4   3  0  requires factions { moors, egypt, }  and region_religion islam 60   
                recruit_pool "Dismounted Sipahi Lancers"  1   0.4   3  0  requires factions { turks, }  and region_religion islam 60   
                recruit_pool "Dismounted Heavy Archers"  1   0.4   3  0  requires factions { mongols, }   and region_religion pagan 60  
                recruit_pool "Dismounted English Knights"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 60  
                recruit_pool "Dismounted Portuguese Knights"  1   0.5   4  0  requires factions { portugal, }  and region_religion catholic 60   
                recruit_pool "Dismounted Feudal Knights"  1   0.7   6  0  requires factions { england, france, hre, spain, portugal, milan, venice, papal_states, hungary, }  and region_religion catholic 60  
		recruit_pool "Dismounted Mailed Knights"  1   0.5   4  0  requires factions { england, scotland, france, hre, teutons, spain, portugal, milan, venice, papal_states, sicily, elo, }  and region_religion catholic 60   
                recruit_pool "Dismounted Polish Knights"  1   0.4   3  0  requires factions { poland, }  and region_religion catholic 60 
                recruit_pool "Dismounted Polish Nobles"  1   0.4   3  0  requires factions { poland, }  and region_religion catholic 60	           
                recruit_pool "Dismounted Polish Knights"  1   0.4   3  0  requires factions { poland, }  and region_religion catholic 60 
		recruit_pool "Sergeant Swordsmen"  1   0.6   6  1  requires factions { england, france, milan, venice, papal_states, sicily, }
		recruit_pool "Andalusian Infantry"  1   0.7   6  1  requires factions { moors, }  and region_religion islam 60  
		recruit_pool "Axemen"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 60 
		recruit_pool "Axemen"  1   0.5   4  0  requires factions { denmark, }  and region_religion catholic 60   
		recruit_pool "Swabian Swordsmen"  1   0.7   6  0  requires factions { hre, }  and region_religion catholic 60 
                recruit_pool "Scots Guard"  1   0.4   3  0  requires factions { france, }  and region_religion catholic 60  
                recruit_pool "Dismounted Feudal Knights"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Flemish Merchant Macemen"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Dismounted Noble Knights"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Halberd Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60 
                recruit_pool "Irish Kerns"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Swordsmen"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Spearmen"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Javelinmen"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Galloglaich"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Highland Nobles"  1   0.7   6  1  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Hammermen"  1   0.5   4  1  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Sami Axemen"  1   0.7   6  0  requires factions { norway, }  and region_religion catholic 60 
                recruit_pool "Gotland Footmen"  1   0.5   4  1  requires factions { norway, }  and region_religion catholic 60 
                recruit_pool "Theigns"  1   0.7   4  1  requires factions { norway, }  and region_religion catholic 60 
                recruit_pool "Order Spearmen"  1   0.7   6  0  requires factions { teutons, }  and region_religion catholic 60 
                recruit_pool "Edessan Squires"  1   0.7   6  0  requires factions { elo, }  and region_religion catholic 60 
                recruit_pool "Edessan Guard"  1   0.7   6  0  requires factions { elo, }  and region_religion catholic 60 
                recruit_pool "Dismounted Ritterbruder"  1   0.5   4  0  requires factions { teutons, }  and region_religion catholic 60
                recruit_pool "Dismounted Ghulams"  1   0.7   6  1  requires factions { egypt, }  and region_religion islam 60   
                recruit_pool "Dismounted Hasham"  1   0.7   6  1  requires factions { turks, }  and region_religion islam 60
                recruit_pool "Georgian Mercenaries"  1   0.6   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Kartlian Spearmen"  1   0.5   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Aznauri Infantry"  1   0.4   3  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Monaspa Infantry"  1   0.34   3  0  requires factions { timurids, }  and region_religion orthodox 60   
                recruit_pool "Yemani Javelinmen"  1   0.7   6  1  requires factions { hedjaz, }  and region_religion islam 60  
                recruit_pool "Abbysini Tribesmen"  1   0.7   6  1  requires factions { hedjaz, }  and region_religion islam 60  
                recruit_pool "Jihadawwi'a"  1   0.7   6  1  requires factions { hedjaz, }  and region_religion islam 60  
                recruit_pool "Arabguard"  1   0.5   4  1  requires factions { hedjaz, }  and region_religion islam 60  
            }
            material wooden
            construction  12 
            cost  14400 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building professional_military
{
    levels military_academy officers_academy 
    {
        military_academy city requires factions { france , england, spain, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Demi Lancers"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 70
                recruit_pool "French Mounted Archers"  1   0.5   4  0  requires factions { france, }  and region_religion catholic 70 
                recruit_pool "Tercio Pikemen"  1   0.5   4  0  requires factions { spain, }  and region_religion catholic 70  
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min huge_city
            upgrades
            {
                officers_academy
            }
        }
        officers_academy city requires factions { france , england, spain, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Gendarmes"  1   0.7   6  0  requires factions { france, spain, }  and region_religion catholic 80 
                recruit_pool "Demi Lancers"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 80
                recruit_pool "French Mounted Archers"  1   0.7   6  1  requires factions { france, }  and region_religion catholic 80 
                recruit_pool "Tercio Pikemen"  1   0.7   6  1  requires factions { spain, }  and region_religion catholic 80 
            }
            material wooden
            construction  12 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building missiles
{
    levels bowyer practice_range archery_range marksmans_range 
    {
        bowyer castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, norway, }  and region_religion catholic 60  
		recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "S Peasant Archers"  1   0.7   6  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60   
                recruit_pool "S Peasant Archers"  1   0.7   6  0  requires factions { sicily, hungary, }  and region_religion catholic 60  
                recruit_pool "EE Peasant Archers"  1   0.7   6  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60  
                recruit_pool "EE Peasant Archers"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60  
                recruit_pool "Baltic Hunters"  1   0.5   4  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Sudanese Javelinmen"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60    
                recruit_pool "ME Peasant Archers"  1   0.7   6  0  requires factions { egypt, turks, }  and region_religion islam 60  
                recruit_pool "ME Peasant Archers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60    
                recruit_pool "Irish Bowmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60
                }
            material wooden
            construction  4 
            cost  1200 
            settlement_min town
            upgrades
            {
                practice_range
            }
        }
        practice_range castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Genoese Crossbowmen"  1   0.7   6  0  requires factions { milan, }  and region_religion catholic 60  
;               recruit_pool "Dismounted Lithuanian Cavalry"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60  
                recruit_pool "Longbowmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60    
                recruit_pool "Highland Archers"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60    
                recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { france, elo, hre, spain, portugal, milan, venice, papal_states, }  and region_religion catholic 60   
		recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60   
                recruit_pool "Norse Archers"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60   
                recruit_pool "Sicilian Muslim Archers"  1   0.7   6  0  requires factions { sicily, }  and region_religion catholic 60   
                recruit_pool "Baltic Hunters"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "Bosnian Archers"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60   
                recruit_pool "Toxotae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Armenian Archers"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "Desert Archers"  1   0.7   6  0  requires factions { moors, egypt, }  and region_religion islam 60    
                recruit_pool "Turkish Archers"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60   
                recruit_pool "Mongol Foot Archers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60    
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, milan, venice, papal_states,  norway, }  and region_religion catholic 60   
		recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60   
                recruit_pool "S Peasant Archers"  1   0.7   6  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60   
                recruit_pool "S Peasant Archers"  1   0.7   6  0  requires factions { sicily, hungary, }  and region_religion catholic 60  
                recruit_pool "EE Peasant Archers"  1   0.7   6  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60  
                recruit_pool "EE Peasant Archers"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60  
                recruit_pool "Sudanese Javelinmen"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60    
                recruit_pool "ME Peasant Archers"  1   0.7   6  0  requires factions { egypt, turks, }  and region_religion islam 60  
                recruit_pool "ME Peasant Archers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60    
                recruit_pool "Irish Bowmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Prussian Archers"  1   0.7   6  0  requires factions { teutons, }  and region_religion catholic 60
                recruit_pool "Caucasian Mountaineers"  1   0.5   4  0  requires factions { timurids, }  and region_religion orthodox 65
                recruit_pool "Ruthenian Archers"  1   0.5   4  0  requires factions { lit, }  and region_religion pagan 60   
            }
            material wooden
            construction  6 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                archery_range
            }
        }
        archery_range castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Ruthenian Archers"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
;               recruit_pool "Dismounted Lithuanian Cavalry"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60 
                recruit_pool "Yeoman Archers"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60  
                recruit_pool "Noble Highland Archers"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Crossbowmen"  1   0.7   6  0  requires factions { france, elo, denmark, hungary, norway, }  and region_religion catholic 60  
                recruit_pool "Pavise Crossbowmen"  1   0.7   6  0  requires factions { hre, teutons, spain, portugal, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "Genoese Crossbowmen"  1   0.7   6  0  requires factions { milan, }  and region_religion catholic 60  
		recruit_pool "Latinn Crossbow Militia"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "Venetian Archers"  1   0.7   6  0  requires factions { venice, }  and region_religion catholic 60  
                recruit_pool "Lithuanian Archers"  1   0.5   4  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Dismounted Dvor"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60  
                recruit_pool "Mourtatoi"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "ME Peasant Crossbowmen"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60    
                recruit_pool "Nubian Archers"  1   0.7   6  0  requires factions { egypt, }  and region_religion islam 60    
                recruit_pool "Ottoman Infantry"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60    
                recruit_pool "Longbowmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60   
                recruit_pool "Highland Archers"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60  
                recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { france, elo, hre, spain, portugal, milan, venice, papal_states, }  and region_religion catholic 60    
                recruit_pool "Norse Archers"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60  
		recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Sicilian Muslim Archers"  1   0.7   6  0  requires factions { sicily, }  and region_religion catholic 60  
                recruit_pool "Baltic Hunters"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
                recruit_pool "Bosnian Archers"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60  
                recruit_pool "Armenian Archers"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60 
                recruit_pool "Armount Archers"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60 
                recruit_pool "Toxotae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60  
                recruit_pool "Desert Archers"  1   0.7   6  0  requires factions { moors, egypt, }  and region_religion islam 60    
                recruit_pool "Turkish Archers"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60    
                recruit_pool "Mongol Foot Archers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60    
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, milan, venice, papal_states,  norway, }  and region_religion catholic 60  
		recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "S Peasant Archers"  1   0.7   6  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60   
                recruit_pool "S Peasant Archers"  1   0.7   6  0  requires factions { sicily, hungary, }  and region_religion catholic 60  
                recruit_pool "EE Peasant Archers"  1   0.7   6  1  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60  
                recruit_pool "EE Peasant Archers"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60  
                recruit_pool "Sudanese Javelinmen"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60    
                recruit_pool "ME Peasant Archers"  1   0.7   6  0  requires factions { egypt, turks, }  and region_religion islam 60  
                recruit_pool "ME Peasant Archers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60   
		recruit_pool "Pavise Crossbow Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60  
                recruit_pool "Dismounted Archers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60  
                recruit_pool "Irish Bowmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Irish Archers"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60 
                recruit_pool "Prussian Archers"  1   0.7   6  0  requires factions { teutons, }  and region_religion catholic 60
                recruit_pool "Svanian Archers"  1   0.4   4  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Caucasian Mountaineers"  1   0.5   4  0  requires factions { timurids, }  and region_religion orthodox 60
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min city
            upgrades
            {
                marksmans_range
            }
        }
        marksmans_range castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Ruthenian Archers"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
;               recruit_pool "Dismounted Lithuanian Cavalry"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60 
                recruit_pool "Dismounted French Archers"  1   0.7   6  0  requires factions { france, }  and region_religion catholic 60   
		recruit_pool "Dismounted Longbowmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60   
                recruit_pool "Aventurier"  1   0.7   6  0  requires factions { france, }  and region_religion catholic 60   
                recruit_pool "Mounted Crossbowmen"  1   0.7   6  0  requires factions { hre, denmark, spain, portugal, milan, venice, papal_states, sicily, norway, }  and region_religion catholic 60   
                recruit_pool "Granadine CB Cav"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60    
                recruit_pool "Yeoman Archers"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60   
                recruit_pool "Noble Highland Archers"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60   
                recruit_pool "Crossbowmen"  1   0.7   6  0  requires factions { france, elo, denmark, hungary, norway, }  and region_religion catholic 60   
                recruit_pool "Pavise Crossbowmen"  1   0.7   6  0  requires factions { hre, teutons, spain, portugal, papal_states, sicily, }  and region_religion catholic 60   
                recruit_pool "Genoese Crossbowmen"  1   0.7   6  0  requires factions { milan, }  and region_religion catholic 60   
		recruit_pool "Latinn Crossbow Militia"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60   
                recruit_pool "Venetian Archers"  1   0.7   6  0  requires factions { venice, }  and region_religion catholic 60   
                recruit_pool "Lithuanian Archers"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60  
		recruit_pool "Dismounted Dvor"  1   0.7   6  0  requires factions { russia, kiev, }  and region_religion orthodox 60   
                recruit_pool "Mourtatoi"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "ME Peasant Crossbowmen"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60    
                recruit_pool "Nubian Archers"  1   0.7   6  1  requires factions { egypt, }  and region_religion islam 60    
                recruit_pool "Ottoman Infantry"  1   0.7   6  1  requires factions { turks, }  and region_religion islam 60    
                recruit_pool "Longbowmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 60    
                recruit_pool "Highland Archers"  1   0.7   6  0  requires factions { scotland, }  and region_religion catholic 60   
                recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { france, elo, hre, spain, portugal, milan, venice, papal_states, }  and region_religion catholic 60   
                recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60   
                recruit_pool "Norse Archers"  1   0.7   6  0  requires factions { denmark, norway, }  and region_religion catholic 60   
                recruit_pool "Sicilian Muslim Archers"  1   0.7   6  0  requires factions { sicily, }  and region_religion catholic 60  
                recruit_pool "Baltic Hunters"  1   0.7   6  0  requires factions { lit, }  and region_religion pagan 60   
                recruit_pool "Bosnian Archers"  1   0.7   6  0  requires factions { hungary, }  and region_religion catholic 60   
                recruit_pool "Toxotae"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Gasmuli"  1   0.7   6  0  requires factions { byzantium, }  and region_religion orthodox 60   
                recruit_pool "Armenian Archers"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "Armount Archers"  1   0.7   6  0  requires factions { armenia, }  and region_religion orthodox 60  
                recruit_pool "Desert Archers"  1   0.7   6  0  requires factions { moors, egypt, }  and region_religion islam 60   
                recruit_pool "Turkish Archers"  1   0.7   6  0  requires factions { turks, }  and region_religion islam 60    
                recruit_pool "Mongol Foot Archers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60    
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, milan, venice, papal_states,  norway, }  and region_religion catholic 60   
		recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60   
                recruit_pool "S Peasant Archers"  1   0.7   6  0  requires factions { byzantium, armenia, }  and region_religion orthodox 60   
                recruit_pool "S Peasant Archers"  1   0.7   6  0  requires factions { sicily, hungary, }  and region_religion catholic 60  
                recruit_pool "EE Peasant Archers"  1   0.7   6  1  requires factions { russia, kiev, timurids, }  and region_religion orthodox 60  
                recruit_pool "EE Peasant Archers"  1   0.7   6  0  requires factions { poland, }  and region_religion catholic 60  
                recruit_pool "Sudanese Javelinmen"  1   0.7   6  0  requires factions { moors, }  and region_religion islam 60    
                recruit_pool "ME Peasant Archers"  1   0.7   6  0  requires factions { egypt, turks, }  and region_religion islam 60  
                recruit_pool "ME Peasant Archers"  1   0.7   6  0  requires factions { mongols, }  and region_religion pagan 60   
		recruit_pool "Pavise Crossbow Militia"  1   0.7   6  0  requires factions { flanders, }  and region_religion catholic 60    
                recruit_pool "Dismounted Archers"  1   0.7   6  0  requires factions { mongols,}  and region_religion pagan 60    
                recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60   
                recruit_pool "Irish Bowmen"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60   
                recruit_pool "Irish Archers"  1   0.7   6  0  requires factions { ireland, }  and region_religion catholic 60  
                recruit_pool "Prussian Archers"  1   0.7   6  1  requires factions { teutons, }  and region_religion catholic 60  
                recruit_pool "Siphonatores"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 60
                recruit_pool "Svanian Archers"  1   0.5   4  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Caucasian Mountaineers"  1   0.6   4  0  requires factions { timurids, }  and region_religion orthodox 60
                recruit_pool "Monaspa Archers"  1   0.4   5  0  requires factions { timurids, }  and region_religion orthodox 60 
                }
            material wooden
            construction  10 
            cost  9600 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building siege
{
    convert_to castle_siege
    levels ballista_range catapult_range siege_works 
    {
        ballista_range city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1
        {
            convert_to 0
            capability
            {
                recruit_pool "NE Ballista"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily,  flanders, ireland, norway, } 
                recruit_pool "EE Ballista"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Ballista"  1   0.2   2  0  requires factions { byzantium, armenia, elo, } 
                recruit_pool "ME Ballista"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Ballista"  1   0.2   2  0  requires factions { mongols, } 
            }
            material wooden
            construction  6 
            cost  1600 
            settlement_min large_town
            upgrades
            {
                catapult_range
            }
        }
        catapult_range city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource timber or building_present_min_level port port
        {
            convert_to 1
            capability
            {
                recruit_pool "NE Catapult"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily,  flanders, ireland, norway, } 
                recruit_pool "EE Catapult"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Catapult"  1   0.2   2  0  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Catapult"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Catapult"  1   0.2   2  0  requires factions { mongols, } 
                recruit_pool "NE Ballista"  1   0.2   2  1  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily,  flanders, ireland, norway, } 
                recruit_pool "EE Ballista"  1   0.2   2  1  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Ballista"  1   0.2   2  1  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Ballista"  1   0.2   2  1  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Ballista"  1   0.2   2  1  requires factions { mongols, } 
            }
            material wooden
            construction  8 
            cost  3200 
            settlement_min large_town
            upgrades
            {
                siege_works
            }
        }
        siege_works city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource timber or building_present_min_level port shipwright
        {
            convert_to 2
            capability
            {
                recruit_pool "NE Trebuchet"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily, flanders, ireland, norway, }
                recruit_pool "EE Trebuchet"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Trebuchet"  1   0.2   2  0  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Trebuchet"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Trebuchet"  1   0.2   2  0  requires factions { mongols, } 
                recruit_pool "NE Catapult"  1   0.2   2  1  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily,  flanders, ireland, norway, } 
                recruit_pool "EE Catapult"  1   0.2   2  1  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Catapult"  1   0.2   2  1  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Catapult"  1   0.2   2  1  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Catapult"  1   0.2   2  1  requires factions { mongols, } 
                recruit_pool "NE Ballista"  1   0.2   2  2  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily,  flanders, ireland, norway, } 
                recruit_pool "EE Ballista"  1   0.2   2  2  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Ballista"  1   0.2   2  2  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Ballista"  1   0.2   2  2  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Ballista"  1   0.2   2  2  requires factions { mongols, } 
		recruit_pool "NE Mangonel"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily,  flanders, ireland, norway, } 
		recruit_pool "GR Mangonel"  1   0.2   2  0  requires factions { byzantium, elo, armenia, } 
		recruit_pool "EE Mangonel"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
		recruit_pool "ME Mangonel"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
            }
            material wooden
            construction  10 
            cost  6400 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building castle_siege
{
    convert_to siege
    levels c_ballista_range c_catapult_range c_siege_works 
    {
        c_ballista_range castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 0
            capability
            {
                recruit_pool "NE Ballista"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily,  flanders, ireland, norway, } 
                recruit_pool "EE Ballista"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Ballista"  1   0.2   2  0  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Ballista"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Ballista"  1   0.2   2  0  requires factions { mongols, } 
            }
            material wooden
            construction  6 
            cost  1600 
            settlement_min large_town
            upgrades
            {
                c_catapult_range
            }
        }
        c_catapult_range castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource timber or building_present_min_level castle_port c_port
        {
            convert_to 1
            capability
            {
                recruit_pool "NE Catapult"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily,  flanders, ireland, norway, } 
                recruit_pool "EE Catapult"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Catapult"  1   0.2   2  0  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Catapult"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Catapult"  1   0.2   2  0  requires factions { mongols, } 
                recruit_pool "NE Ballista"  1   0.2   2  1  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily,  flanders, ireland, norway, } 
                recruit_pool "EE Ballista"  1   0.2   2  1  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Ballista"  1   0.2   2  1  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Ballista"  1   0.2   2  1  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Ballista"  1   0.2   2  1  requires factions { mongols, } 
            }
            material wooden
            construction  8 
            cost  3200 
            settlement_min large_town
            upgrades
            {
                c_siege_works
            }
        }
        c_siege_works castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource timber or building_present_min_level castle_port c_shipwright
        {
            convert_to 2
            capability
            {
                recruit_pool "NE Trebuchet"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily, flanders, ireland, norway, }
                recruit_pool "EE Trebuchet"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Trebuchet"  1   0.2   2  0  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Trebuchet"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Trebuchet"  1   0.2   2  0  requires factions { mongols, } 
                recruit_pool "NE Catapult"  1   0.2   2  1  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily,  flanders, ireland, norway, } 
                recruit_pool "EE Catapult"  1   0.2   2  1  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Catapult"  1   0.2   2  1  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Catapult"  1   0.2   2  1  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Catapult"  1   0.2   2  1  requires factions { mongols, } 
                recruit_pool "NE Ballista"  1   0.2   2  2  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily,  flanders, ireland, norway, } 
                recruit_pool "EE Ballista"  1   0.2   2  2  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Ballista"  1   0.2   2  2  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Ballista"  1   0.2   2  2  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Ballista"  1   0.2   2  2  requires factions { mongols, } 
		recruit_pool "NE Mangonel"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily,  flanders, ireland, norway, } 
		recruit_pool "GR Mangonel"  1   0.2   2  0  requires factions { byzantium, elo, armenia, } 
		recruit_pool "EE Mangonel"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
		recruit_pool "ME Mangonel"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
            }
            material wooden
            construction  10 
            cost  6400 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building cannon
{
    convert_to castle_cannon
    levels gunsmith cannon_maker cannon_foundry royal_arsenal 
    {
        gunsmith city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1 and resource sulfur or building_present_min_level market fairground   
        {
            convert_to 0
            capability
            {
                recruit_pool "NE Bombard"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "EE Bombard"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Bombard"  1   0.2   2  0  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Bombard"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.2   2  0  requires factions { mongols, } 
                }
            material wooden
            construction  6 
            cost  1600 
            settlement_min city
            upgrades
            {
                cannon_maker
            }
        }
        cannon_maker city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1 and resource sulfur or building_present_min_level port shipwright or building_present_min_level market great_market 
        {
            convert_to 1
            capability
            {
                recruit_pool "NE Mortar"  1   0.2   2  0  requires factions { england, scotland, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "NE Grand Bombard"  1   0.2   2  0  requires factions { france, hre, teutons, spain, portugal, milan, } 
                recruit_pool "NE Ribault"  1   0.2   2  0  requires factions { denmark, norway, } 
                recruit_pool "EE Ribault"  1   0.2   2  0  requires factions { poland, hungary, lit, } 
                recruit_pool "EE Grand Bombard"  1   0.2   2  0  requires factions { russia, kiev, timurids, } 
                recruit_pool "ME Grand Bombard"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "NE Ribault"  1   0.2   2  0  requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "NE Bombard"  1   0.2   2  1  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "EE Bombard"  1   0.2   2  1  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Bombard"  1   0.2   2  1  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Bombard"  1   0.2   2  1  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.2   2  1  requires factions { mongols, } 
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  8 
            cost  3200 
            settlement_min large_city
            upgrades
            {
                cannon_foundry
            }
        }
        cannon_foundry city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1 and resource sulfur or building_present_min_level port dockyard or building_present_min_level sea_trade merchants_wharf 
        {
            convert_to 2
            capability
            {
                recruit_pool "NE Culverin"  1   0.2   2  0  requires factions { england, scotland, france, spain, portugal, milan, venice, papal_states, flanders, ireland, } 
                recruit_pool "NE Cannon"  1   0.2   2  0  requires factions { hre, teutons, sicily, } 
                recruit_pool "NE Serpentine"  1   0.2   2  0  requires factions { denmark, norway, } 
                recruit_pool "EE Serpentine"  1   0.2   2  0  requires factions { poland, hungary, lit, } 
                recruit_pool "EE Cannon"  1   0.2   2  0  requires factions { russia, kiev, timurids, } 
                recruit_pool "ME Cannon"  1   0.2   2  0  requires factions { moors, egypt, turks, armenia, } 
                recruit_pool "NE Serpentine"  1   0.2   2  0  requires factions { france, hre, teutons, } 
                recruit_pool "NE Cannon"  1   0.2   2  0  requires factions { denmark, norway, } 
                recruit_pool "EE Cannon"  1   0.2   2  0  requires factions { poland, lit, } 
                recruit_pool "NE Mortar"  1   0.2   2  1  requires factions { england, scotland, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "NE Grand Bombard"  1   0.2   2  1  requires factions { france, hre, teutons, spain, portugal, milan, } 
                recruit_pool "NE Ribault"  1   0.2   2  1  requires factions { denmark, norway, } 
                recruit_pool "EE Ribault"  1   0.2   2  1  requires factions { poland, hungary, lit, } 
                recruit_pool "EE Grand Bombard"  1   0.2   2  1  requires factions { russia, kiev, timurids, } 
                recruit_pool "ME Grand Bombard"  1   0.2   2  1  requires factions { moors, egypt, turks, } 
                recruit_pool "NE Ribault"  1   0.2   2  1  requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "NE Bombard"  1   0.2   2  2  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "EE Bombard"  1   0.2   2  2  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Bombard"  1   0.2   2  2  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Bombard"  1   0.2   2  2  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.2   2  2  requires factions { mongols, } 
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  10 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                royal_arsenal
            }
        }
        royal_arsenal city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1 and resource sulfur or building_present_min_level market merchants_quarter or building_present_min_level sea_trade warehouse  
        {
            convert_to 3
            capability
            {
                recruit_pool "NE Basilisk"  1   0.2   2  0  requires factions { france, hre, teutons, spain, portugal, } 
                recruit_pool "NE Monster Ribault"  1   0.2   2  0  requires factions { milan, venice, } 
                recruit_pool "EE Basilisk"  1   0.2   2  0  requires factions { russia, kiev, hungary, timurids, } 
                recruit_pool "ME Monster Bombard"  1   0.2   2  0  requires factions { turks, } 
                recruit_pool "NE Culverin"  1   0.2   2  1  requires factions { england, scotland, france, spain, portugal, milan, venice, papal_states, flanders, ireland, } 
                recruit_pool "NE Cannon"  1   0.2   2  1  requires factions { hre, teutons, sicily, } 
                recruit_pool "NE Serpentine"  1   0.2   2  1  requires factions { denmark, norway, } 
                recruit_pool "EE Serpentine"  1   0.2   2  1  requires factions { poland, hungary, lit, } 
                recruit_pool "EE Cannon"  1   0.2   2  1  requires factions { russia, kiev, lit, timurids, } 
                recruit_pool "ME Cannon"  1   0.2   2  1  requires factions { moors, egypt, turks, armenia, } 
                recruit_pool "NE Serpentine"  1   0.2   2  1  requires factions { france, hre, teutons, } 
                recruit_pool "NE Cannon"  1   0.2   2  1  requires factions { denmark, norway, } 
                recruit_pool "EE Cannon"  1   0.2   2  1  requires factions { poland, } 
                recruit_pool "NE Mortar"  1   0.2   2  2  requires factions { england, scotland, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "NE Grand Bombard"  1   0.2   2  2  requires factions { france, hre, teutons, spain, portugal, milan, } 
                recruit_pool "NE Ribault"  1   0.2   2  2  requires factions { denmark, norway, } 
                recruit_pool "EE Ribault"  1   0.2   2  2  requires factions { poland, hungary, lit, } 
                recruit_pool "EE Grand Bombard"  1   0.2   2  2  requires factions { russia, kiev, timurids, } 
                recruit_pool "ME Grand Bombard"  1   0.2   2  2  requires factions { moors, egypt, turks, } 
                recruit_pool "NE Ribault"  1   0.2   2  2  requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "NE Bombard"  1   0.2   2  2  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "EE Bombard"  1   0.2   2  2  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Bombard"  1   0.2   2  2  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Bombard"  1   0.2   2  2  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.2   2  2  requires factions { mongols, } 
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  12 
            cost  12800 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building castle_cannon
{
    convert_to cannon
    levels c_gunsmith c_cannon_maker c_cannon_foundry c_royal_arsenal 
    {
        c_gunsmith castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1 and resource sulfur or building_present_min_level castle_port c_port 
        {
            convert_to 0
            capability
            {
                recruit_pool "NE Bombard"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "EE Bombard"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Bombard"  1   0.2   2  0  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Bombard"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.2   2  0  requires factions { mongols, } 
                }
            material wooden
            construction  6 
            cost  1600 
            settlement_min city
            upgrades
            {
                c_cannon_maker
            }
        }
        c_cannon_maker castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1 and resource sulfur or building_present_min_level castle_port c_shipwright 
        {
            convert_to 1
            capability
            {
                recruit_pool "NE Mortar"  1   0.2   2  0  requires factions { england, scotland, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "NE Grand Bombard"  1   0.2   2  0  requires factions { france, hre, teutons, spain, portugal, milan, } 
                recruit_pool "NE Ribault"  1   0.2   2  0  requires factions { denmark, norway, } 
                recruit_pool "EE Ribault"  1   0.2   2  0  requires factions { poland, hungary, lit, } 
                recruit_pool "EE Grand Bombard"  1   0.2   2  0  requires factions { russia, kiev, timurids, } 
                recruit_pool "ME Grand Bombard"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "NE Ribault"  1   0.2   2  0  requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "NE Bombard"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "EE Bombard"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Bombard"  1   0.2   2  0  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Bombard"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.2   2  0  requires factions { mongols, } 
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  8 
            cost  3200
            settlement_min large_city
            upgrades
            {
                c_cannon_foundry
            }
        }
        c_cannon_foundry castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1 and resource sulfur or building_present_min_level castle_port c_dockyard 
        {
            convert_to 2
            capability
            {
                recruit_pool "NE Culverin"  1   0.2   2  0  requires factions { england, scotland, france, spain, portugal, milan, venice, papal_states, flanders, ireland, } 
                recruit_pool "NE Cannon"  1   0.2   2  0  requires factions { hre, teutons, sicily, } 
                recruit_pool "NE Serpentine"  1   0.2   2  0  requires factions { denmark, norway, } 
                recruit_pool "EE Serpentine"  1   0.2   2  0  requires factions { poland, hungary, lit, } 
                recruit_pool "EE Cannon"  1   0.2   2  0  requires factions { russia, kiev, timurids, } 
                recruit_pool "ME Cannon"  1   0.2   2  0  requires factions { moors, egypt, turks, armenia, } 
                recruit_pool "NE Serpentine"  1   0.2   2  0  requires factions { france, hre, teutons, } 
                recruit_pool "NE Cannon"  1   0.2   2  0  requires factions { denmark, norway, } 
                recruit_pool "EE Cannon"  1   0.2   2  0  requires factions { poland, lit, } 
                recruit_pool "NE Mortar"  1   0.2   2  0  requires factions { england, scotland, venice, papal_states, sicily, flanders, norway, } 
                recruit_pool "NE Grand Bombard"  1   0.2   2  0  requires factions { france, hre, teutons, spain, portugal, milan, } 
                recruit_pool "NE Ribault"  1   0.2   2  0  requires factions { denmark, norway, } 
                recruit_pool "EE Ribault"  1   0.2   2  0  requires factions { poland, hungary, lit, } 
                recruit_pool "EE Grand Bombard"  1   0.2   2  0  requires factions { russia, kiev, timurids, } 
                recruit_pool "ME Grand Bombard"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "NE Ribault"  1   0.2   2  0  requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "NE Bombard"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "EE Bombard"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Bombard"  1   0.2   2  0  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Bombard"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.2   2  0  requires factions { mongols, } 
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  10 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                c_royal_arsenal
            }
        }
        c_royal_arsenal castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1 and resource sulfur or building_present_min_level castle_port c_naval_drydock 
        {
            convert_to 3
            capability
            {
                recruit_pool "NE Basilisk"  1   0.2   2  0  requires factions { france, hre, teutons, spain, portugal, } 
                recruit_pool "NE Monster Ribault"  1   0.2   2  0  requires factions { milan, venice, } 
                recruit_pool "EE Basilisk"  1   0.2   2  0  requires factions { russia, kiev, hungary, timurids, } 
                recruit_pool "ME Monster Bombard"  1   0.2   2  0  requires factions { turks, } 
                recruit_pool "NE Culverin"  1   0.2   2  0  requires factions { england, scotland, france, spain, portugal, milan, venice, papal_states, flanders, ireland, } 
                recruit_pool "NE Cannon"  1   0.2   2  0  requires factions { hre, teutons, sicily, } 
                recruit_pool "NE Serpentine"  1   0.2   2  0  requires factions { denmark, norway, } 
                recruit_pool "EE Serpentine"  1   0.2   2  0  requires factions { poland, hungary, lit, } 
                recruit_pool "EE Cannon"  1   0.2   2  0  requires factions { russia, kiev, lit, timurids, } 
                recruit_pool "ME Cannon"  1   0.2   2  0  requires factions { moors, egypt, turks, armenia, } 
                recruit_pool "NE Serpentine"  1   0.2   2  0  requires factions { france, hre, teutons, } 
                recruit_pool "NE Cannon"  1   0.2   2  0  requires factions { denmark, norway, } 
                recruit_pool "EE Cannon"  1   0.2   2  0  requires factions { poland, } 
                recruit_pool "NE Mortar"  1   0.2   2  0  requires factions { england, scotland, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "NE Grand Bombard"  1   0.2   2  0  requires factions { france, hre, teutons, spain, portugal, milan, } 
                recruit_pool "NE Ribault"  1   0.2   2  0  requires factions { denmark, norway, } 
                recruit_pool "EE Ribault"  1   0.2   2  0  requires factions { poland, hungary, lit, } 
                recruit_pool "EE Grand Bombard"  1   0.2   2  0  requires factions { russia, kiev, timurids, } 
                recruit_pool "ME Grand Bombard"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "NE Ribault"  1   0.2   2  0  requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "NE Bombard"  1   0.2   2  0  requires factions { england, scotland, france, hre, teutons, denmark, spain, portugal, milan, venice, papal_states, sicily, flanders, ireland, norway, } 
                recruit_pool "EE Bombard"  1   0.2   2  0  requires factions { poland, russia, kiev, hungary, lit, timurids, } 
                recruit_pool "GR Bombard"  1   0.2   2  0  requires factions { byzantium, elo, armenia, } 
                recruit_pool "ME Bombard"  1   0.2   2  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.2   2  0  requires factions { mongols, } 
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  12 
            cost  12800 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building urban_equestrian
{
    levels racing_track sultans_racing_track 
    {
        racing_track castle requires factions { middle_eastern, }  and event_counter governor_present 1  and building_present_min_level equestrian knights_stables
        {
            capability
            {
                recruit_pool "Arab Cavalry"  1   0.5   4  0  requires factions { moors, egypt, }  and region_religion islam 70   
                recruit_pool "Turkomans"  1   0.5   4  0  requires factions { turks, }  and region_religion islam 70   
                recruit_pool "Mongol Light Lancers"  1   0.5   4  0  requires factions { mongols, }  and region_religion pagan 70  
                heavy_cavalry_bonus bonus 1  
                happiness_bonus bonus 1
                stage_races 1
            }
            material wooden
            construction  8 
            cost  1200 
            settlement_min city
            upgrades
            {
                sultans_racing_track
            }
        }
        sultans_racing_track castle requires factions { middle_eastern, }  and event_counter governor_present 1  and building_present_min_level equestrian barons_stables 
        {
            capability
            {
                recruit_pool "Arab Cavalry"  1   0.5   4  1  requires factions { moors, egypt, }  and region_religion islam 80  
                recruit_pool "Turkomans"  1   0.5   4  1  requires factions { turks, }  and region_religion islam 80  
                recruit_pool "Mongol Light Lancers"  1   0.5   4  1  requires factions { mongols, }  and region_religion pagan 80  
                recruit_pool "Granadine Jinetes"  1   0.4   3  0  requires factions { moors, }  and region_religion islam 80  
                recruit_pool "Mamluk Archers"  1   0.4   3  0  requires factions { egypt, }  and region_religion islam 80  
                recruit_pool "Sipahis"  1   0.4   3  0  requires factions { turks, }  and region_religion islam 80  
                recruit_pool "Mongol Heavy Archers"  1   0.4   3  0  requires factions { mongols, }  and region_religion pagan 80  
                heavy_cavalry_bonus bonus 1 
                happiness_bonus bonus 2
                stage_races 2
            }
            material wooden
            construction  10 
            cost  2400 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building smith
{
    convert_to castle_smith
    levels leather_tanner blacksmith armourer heavy_armourer plate_armourer gothic_armourer 
    {
        leather_tanner city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level barracks town_guard
        {
            convert_to 0
            capability
            {
                armour 1
            }
            material wooden
            construction  4 
            cost  1200 
            settlement_min town
            upgrades
            {
                blacksmith
            }
        }
        blacksmith city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level market market or resource iron or hidden_resource metropolis
        {
            convert_to 1
            capability
            {
                armour 2
            }
            material wooden
            construction  6 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                armourer
            }
        }
        armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level market market or resource iron or hidden_resource metropolis
        {
            convert_to 2
            capability
            {
                armour 3
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min city
            upgrades
            {
                heavy_armourer
            }
        }
        heavy_armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource iron or hidden_resource metropolis
        {
            convert_to 3
            capability
            {
                armour 4
            }
            material wooden
            construction  10 
            cost  9600 
            settlement_min large_city
            upgrades
            {
                plate_armourer
            }
        }
        plate_armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource iron or hidden_resource metropolis
        {
            convert_to 4
            capability
            {
                armour 5
            }
            material wooden
            construction  12 
            cost  14400 
            settlement_min large_city
            upgrades
            {
                gothic_armourer
            }
        }
        gothic_armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource iron or hidden_resource metropolis
        {
            convert_to 5
            capability
            {
                armour 6
            }
            material wooden
            construction  14 
            cost  19200 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building castle_smith
{
    convert_to smith
    levels c_leather_tanner c_blacksmith c_armourer c_heavy_armourer c_plate_armourer c_gothic_armourer 
    {
        c_leather_tanner castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level castle_barracks mustering_hall
        {
            convert_to 0
            capability
            {
                armour 1
            }
            material wooden
            construction  4 
            cost  1200 
            settlement_min town
            upgrades
            {
                c_blacksmith
            }
        }
        c_blacksmith castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource iron or hidden_resource metropolis
        {
            convert_to 1
            capability
            {
                armour 2
            }
            material wooden
            construction  6 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                c_armourer
            }
        }
        c_armourer castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource iron or hidden_resource metropolis
        {
            convert_to 2
            capability
            {
                armour 3
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min city
            upgrades
            {
                c_heavy_armourer
            }
        }
        c_heavy_armourer castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource iron or hidden_resource metropolis
        {
            convert_to 3
            capability
            {
                armour 4
            }
            material wooden
            construction  10 
            cost  9600 
            settlement_min large_city
            upgrades
            {
                c_plate_armourer
            }
        }
        c_plate_armourer castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource iron or hidden_resource metropolis
        {
            convert_to 4
            capability
            {
                armour 5
            }
            material wooden
            construction  12 
            cost  14400 
            settlement_min large_city
            upgrades
            {
                c_gothic_armourer
            }
        }
        c_gothic_armourer castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource iron or hidden_resource metropolis
        {
            convert_to 5
            capability
            {
                armour 6
            }
            material wooden
            construction  14 
            cost  19200 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building port
{
    convert_to castle_port
    levels port shipwright dockyard naval_drydock 
    {
        port city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level market market
        {
            convert_to 0
            capability
            {
                recruit_pool "Pisan and Geonese sailors"  1   0.5   4  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "cog"  1   0.1   1  0  requires factions { hre, teutons, france, elo, scotland, england, flanders, } 
                recruit_pool "longboat"  1   0.1   1  0  requires factions { denmark, ireland, norway, } 
                recruit_pool "dhow"  1   0.1   1  0  requires factions { middle_eastern, } 
                recruit_pool "cog"  1   0.1   1  0  requires factions { hungary, poland, lit, } 
                recruit_pool "ladya"  1   0.1   1  0  requires factions { russia, kiev, timurids, } 
                recruit_pool "dromon"  1   0.1   1  0  requires factions { greek, armenia, } 
                recruit_pool "galley"  1   0.1   1  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   0.1   1  0  requires factions { portugal, spain, } 
		trade_base_income_bonus bonus 3
		trade_base_income_bonus bonus -3 requires event_counter tokus_negative_event_harbour 1
		trade_base_income_bonus bonus 2 requires event_counter tokus_positive_event_harbour 1
		trade_fleet 1
            }
            material wooden
            construction  4 
            cost  1600 
            settlement_min large_town
            upgrades
            {
                shipwright
            }
        }
        shipwright city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level market fairground
        {
            convert_to 1
            capability
            {
                recruit_pool "Pisan and Geonese sailors"  1   0.5   4  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "cog"  1   0.2   1  0  requires factions { hre, teutons, france, elo, scotland, england, flanders, } 
                recruit_pool "longboat"  1   0.2   1  0  requires factions { denmark, ireland, norway, } 
                recruit_pool "dhow"  1   0.2   1  0  requires factions { middle_eastern, } 
                recruit_pool "cog"  1   0.2   1  0  requires factions { hungary, poland, lit, } 
                recruit_pool "ladya"  1   0.2   1  0  requires factions { russia, kiev, timurids, } 
                recruit_pool "dromon"  1   0.2   1  0  requires factions { greek, armenia, } 
                recruit_pool "galley"  1   0.2   1  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   0.2   1  0  requires factions { portugal, spain, } 
		trade_base_income_bonus bonus 4
		trade_base_income_bonus bonus -4 requires event_counter tokus_negative_event_harbour 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_harbour 1
		trade_fleet 1
            }
            material wooden
            construction  6 
            cost  3200 
            settlement_min city
            upgrades
            {
                dockyard
            }
        }
        dockyard city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "Pisan and Geonese sailors"  1   0.5   4  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "cog"  1   0.2   1  0  requires factions { hre, teutons, france, elo, scotland, england, flanders, } 
                recruit_pool "longboat"  1   0.2   1  0  requires factions { denmark, ireland, norway, } 
                recruit_pool "dhow"  1   0.2   1  0  requires factions { middle_eastern, } 
                recruit_pool "cog"  1   0.2   1  0  requires factions { hungary, poland, lit, } 
                recruit_pool "ladya"  1   0.2   1  0  requires factions { russia, kiev, timurids, } 
                recruit_pool "dromon"  1   0.2   1  0  requires factions { greek, armenia, } 
                recruit_pool "galley"  1   0.2   1  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   0.2   1  0  requires factions { portugal, spain, } 
		trade_base_income_bonus bonus 6
		trade_base_income_bonus bonus -6 requires event_counter tokus_negative_event_harbour 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_harbour 1
		trade_fleet 1
            }
            material wooden
            construction  10 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                naval_drydock
            }
        }
        naval_drydock city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter world_is_round 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "Pisan and Geonese sailors"  1   0.5   4  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "cog"  1   0.2   1  0  requires factions { hre, teutons, france, elo, scotland, england, flanders, } 
                recruit_pool "longboat"  1   0.2   1  0  requires factions { denmark, ireland, norway, } 
                recruit_pool "dhow"  1   0.2   1  0  requires factions { middle_eastern, } 
                recruit_pool "cog"  1   0.2   1  0  requires factions { hungary, poland, lit, } 
                recruit_pool "ladya"  1   0.2   1  0  requires factions { russia, kiev, timurids, } 
                recruit_pool "dromon"  1   0.2   1  0  requires factions { greek, armenia, } 
                recruit_pool "galley"  1   0.2   1  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   0.2   1  0  requires factions { portugal, spain, } 
		trade_base_income_bonus bonus 8
		trade_base_income_bonus bonus -8 requires event_counter tokus_negative_event_harbour 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_harbour 1
		trade_fleet 1
            }
            material wooden
            construction  12 
            cost  12800 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building castle_port
{
    convert_to port
    levels c_port c_shipwright c_dockyard c_naval_drydock 
    {
        c_port castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1
        {
            convert_to 0
            capability
            {
                recruit_pool "Pisan and Geonese sailors"  1   0.5   4  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "cog"  1   0.2   1  0  requires factions { hre, teutons, france, elo, scotland, england, flanders, } 
                recruit_pool "longboat"  1   0.2   1  0  requires factions { denmark, ireland, norway, } 
                recruit_pool "dhow"  1   0.2   1  0  requires factions { middle_eastern, } 
                recruit_pool "cog"  1   0.2   1  0  requires factions { hungary, poland, lit, } 
                recruit_pool "ladya"  1   0.2   1  0  requires factions { russia, kiev, timurids, } 
                recruit_pool "dromon"  1   0.2   1  0  requires factions { greek, armenia, } 
                recruit_pool "galley"  1   0.2   1  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   0.2   1  0  requires factions { portugal, spain, } 
            }
            material wooden
            construction  4 
            cost  1600 
            settlement_min large_town
            upgrades
            {
                c_shipwright
            }
        }
        c_shipwright castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1
        {
            convert_to 1
            capability
            {
                recruit_pool "Pisan and Geonese sailors"  1   0.5   4  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "cog"  1   0.3   1  1  requires factions { hre, teutons, france, elo, scotland, england, flanders, } 
                recruit_pool "longboat"  1   0.3   1  1  requires factions { denmark, ireland, norway, } 
                recruit_pool "holk"  1   0.3   1  0  requires factions { hre, teutons, scotland, france, elo, england, flanders, } 
                recruit_pool "dragon boat"  1   0.3   1  0  requires factions { denmark, ireland, norway, } 
                recruit_pool "dhow"  1   0.3   1  1  requires factions { middle_eastern, } 
                recruit_pool "war galley"  1   0.3   1  0  requires factions { egypt, moors, turks, } 
                recruit_pool "cog"  1   0.3   1  1  requires factions { hungary, poland, lit, } 
                recruit_pool "ladya"  1   0.3   1  1  requires factions { russia, kiev, timurids, } 
                recruit_pool "war galley"  1   0.3   1  0  requires factions { hungary, } 
                recruit_pool "holk"  1   0.3   1  0  requires factions { russia, kiev, poland, lit, timurids, } 
                recruit_pool "dromon"  1   0.3   1  1  requires factions { greek, armenia, } 
                recruit_pool "fire ship"  1   0.3   1  0  requires factions { greek, armenia, } 
                recruit_pool "galley"  1   0.3   1  1  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   0.3   1  1  requires factions { portugal, spain, } 
                recruit_pool "war galley"  1   0.3   1  0  requires factions { southern_european, } 
            }
            material wooden
            construction  6 
            cost  3200 
            settlement_min city
            upgrades
            {
                c_dockyard
            }
        }
        c_dockyard castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "Pisan and Geonese sailors"  1   0.5   4  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "cog"  1   0.3   1  2  requires factions { hre, teutons, france, elo, scotland, england, flanders, } 
                recruit_pool "longboat"  1   0.3   1  2  requires factions { denmark, ireland, norway, } 
                recruit_pool "holk"  1   0.3   1  1  requires factions { hre, teutons, scotland, france, elo, england, flanders, } 
                recruit_pool "dragon boat"  1   0.3   1  1  requires factions { denmark, ireland, norway, } 
                recruit_pool "gun holk"  1   0.3   1  0  requires factions { northern_european, } 
                recruit_pool "dhow"  1   0.3   1  2  requires factions { middle_eastern, } 
                recruit_pool "war galley"  1   0.3   1  1  requires factions { egypt, moors, turks, } 
                recruit_pool "lanternas"  1   0.3   1  0  requires factions { egypt, moors, turks, } 
                recruit_pool "cog"  1   0.3   1  2  requires factions { hungary, poland, lit, } 
                recruit_pool "ladya"  1   0.3   1  2  requires factions { russia, kiev, timurids, } 
                recruit_pool "war galley"  1   0.3   1  1  requires factions { hungary, } 
                recruit_pool "holk"  1   0.3   1  1  requires factions { russia, kiev, poland, timurids, } 
                recruit_pool "gun holk"  1   0.3   1  0  requires factions { russia, kiev, poland, lit, timurids, } 
                recruit_pool "lanternas"  1   0.3   1  0  requires factions { hungary, } 
                recruit_pool "dromon"  1   0.3   1  2  requires factions { greek, armenia, } 
                recruit_pool "fire ship"  1   0.3   1  1  requires factions { greek, armenia, } 
                recruit_pool "lanternas"  1   0.3   1  0  requires factions { greek, armenia, } 
                recruit_pool "galley"  1   0.3   1  2  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   0.3   1  2  requires factions { portugal, spain, } 
                recruit_pool "war galley"  1   0.3   1  1  requires factions { southern_european, } 
                recruit_pool "lanternas"  1   0.3   1  0  requires factions { portugal, spain, papal_states, milan, sicily, } 
                recruit_pool "caravel"  1   0.3   1  0  requires factions { portugal, spain, }  and event_counter world_is_round 1 
                recruit_pool "galleass"  1   0.3   1  0  requires factions { venice, } 
            }
            material wooden
            construction  10 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                c_naval_drydock
            }
        }
        c_naval_drydock castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "Pisan and Geonese sailors"  1   0.5   4  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                recruit_pool "cog"  1   0.3   1  2  requires factions { hre, teutons, france, elo, scotland, england, flanders, } 
                recruit_pool "longboat"  1   0.3   1  2  requires factions { denmark, ireland, norway, } 
                recruit_pool "holk"  1   0.3   1  0  requires factions { hre, teutons, scotland, france, elo, england, flanders, } 
                recruit_pool "dragon boat"  1   0.3   1  2  requires factions { denmark, ireland, norway, } 
                recruit_pool "gun holk"  1   0.3   1  2  requires factions { northern_european, } 
                recruit_pool "carrack"  1   0.3   1  0  requires factions { northern_european, } 
                recruit_pool "dhow"  1   0.3   1  2  requires factions { middle_eastern, } 
                recruit_pool "war galley"  1   0.3   1  2  requires factions { egypt, moors, turks, } 
                recruit_pool "lanternas"  1   0.3   1  2  requires factions { egypt, moors, turks, } 
                recruit_pool "baghlah"  1   0.3   1  2  requires factions { egypt, moors, turks, } 
                recruit_pool "cog"  1   0.3   1  2  requires factions { hungary, poland, lit, } 
                recruit_pool "ladya"  1   0.3   1  2  requires factions { russia, kiev, timurids, } 
                recruit_pool "war galley"  1   0.3   1  2  requires factions { hungary, } 
                recruit_pool "holk"  1   0.3   1  2  requires factions { russia, kiev, poland, lit, timurids, } 
                recruit_pool "gun holk"  1   0.3   1  2  requires factions { russia, kiev, poland, lit, timurids, } 
                recruit_pool "lanternas"  1   0.3   1  2  requires factions { hungary, } 
                recruit_pool "carrack"  1   0.3   1  0  requires factions { eastern_european, } 
                recruit_pool "dromon"  1   0.3   1  2  requires factions { greek, armenia, } 
                recruit_pool "fire ship"  1   0.3   1  2  requires factions { greek, armenia, } 
                recruit_pool "lanternas"  1   0.3   1  2  requires factions { greek, armenia, } 
                recruit_pool "carrack"  1   0.3   1  0  requires factions { greek, armenia, } 
                recruit_pool "galley"  1   0.3   1  2  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   0.3   1  2  requires factions { portugal, spain, } 
                recruit_pool "war galley"  1   0.3   1  2  requires factions { southern_european, } 
                recruit_pool "lanternas"  1   0.3   1  2  requires factions { portugal, spain, papal_states, milan, sicily, } 
                recruit_pool "caravel"  1   0.3   1  2  requires factions { portugal, spain, } 
                recruit_pool "galleass"  1   0.3   1  2  requires factions { venice, } 
                recruit_pool "carrack"  1   0.3   1  0  requires factions { papal_states, sicily, milan, venice, } 
                recruit_pool "grande carrack"  1   0.3   1  0  requires factions { portugal, spain, } 
            }
            material wooden
            construction  12 
            cost  12800 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building sea_trade
{
    levels merchants_wharf warehouse docklands 
    {
        merchants_wharf city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level port shipwright
        {
            capability
            {
                recruit_pool "Pisan and Geonese sailors"  1   0.25   2  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                trade_fleet 1
 		trade_base_income_bonus bonus 4
		trade_base_income_bonus bonus -3 requires event_counter tokus_negative_event_harbour 1
		trade_base_income_bonus bonus 2 requires event_counter tokus_positive_event_harbour 1
            }
            material wooden
            construction  6 
            cost  3200 
            settlement_min city
            upgrades
            {
                warehouse
            }
        }
        warehouse city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level port dockyard
        {
            capability
            {
                recruit_pool "Pisan and Geonese sailors"  1   0.25   2  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                trade_fleet 2
 		trade_base_income_bonus bonus 6
		trade_base_income_bonus bonus -4 requires event_counter tokus_negative_event_harbour 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_harbour 1
            }
            material wooden
            construction  10 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                docklands
            }
        }
        docklands city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level port naval_drydock
        {
            capability
            {
                recruit_pool "Pisan and Geonese sailors"  1   0.25   2  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 60  
                trade_fleet 3
 		trade_base_income_bonus bonus 8
		trade_base_income_bonus bonus -5 requires event_counter tokus_negative_event_harbour 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_harbour 1
            }
            material wooden
            construction  12 
            cost  12800 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building admiralty
{
    levels naval_academy admiralty 
    {
        naval_academy castle requires factions { denmark, england, portugal, }  and event_counter governor_present 1   and building_present_min_level castle_port c_port
        {
            capability
            {
                recruitment_cost_bonus_naval bonus 1
                navy_bonus 1
            }
            material wooden
            construction  6 
            cost  4800 
            settlement_min city
            upgrades
            {
                admiralty
            }
        }
        admiralty castle requires factions { denmark, england, portugal, }  and event_counter governor_present 1  
        {
            capability
            {
                recruitment_cost_bonus_naval bonus 2
                navy_bonus 1
            }
            material wooden
            construction  10 
            cost  9600 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building market
{
    levels corn_exchange market fairground great_market merchants_quarter 
    {
        corn_exchange city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gov_level_1 1 
        {
            capability
            {
		agent merchant  0  requires factions { byzantium, }  and region_religion judaism 3  and event_counter introduction_byzantium 1
		agent merchant  0  requires factions { denmark, }  and region_religion judaism 3  and event_counter introduction_denmark 1
		agent merchant  0  requires factions { egypt, }  and region_religion judaism 3  and event_counter introduction_egypt 1
		agent merchant  0  requires factions { england, }  and region_religion judaism 3  and event_counter introduction_england 1
		agent merchant  0  requires factions { france, }  and region_religion judaism 3  and event_counter introduction_france 1
		agent merchant  0  requires factions { hre, }  and region_religion judaism 3  and event_counter introduction_hre 1
		agent merchant  0  requires factions { hungary, }  and region_religion judaism 3  and event_counter introduction_hungary 1
		agent merchant  0  requires factions { milan, }  and region_religion judaism 3  and event_counter introduction_milan 1
		agent merchant  0  requires factions { mongols, }  and region_religion judaism 3  and event_counter introduction_mongols 1
		agent merchant  0  requires factions { moors, }  and region_religion judaism 3  and event_counter introduction_moors 1
		agent merchant  0  requires factions { papal_states, }  and region_religion judaism 3  and event_counter introduction_papal_states 1
		agent merchant  0  requires factions { poland, }  and region_religion judaism 3  and event_counter introduction_poland 1
		agent merchant  0  requires factions { portugal, }  and region_religion judaism 3  and event_counter introduction_portugal 1
		agent merchant  0  requires factions { russia, }  and region_religion judaism 3  and event_counter introduction_russia 1
		agent merchant  0  requires factions { kiev, }  and region_religion judaism 3  and event_counter introduction_kiev 1
		agent merchant  0  requires factions { scotland, }  and region_religion judaism 3  and event_counter introduction_scotland 1
		agent merchant  0  requires factions { sicily, }  and region_religion judaism 3  and event_counter introduction_sicily 1
		agent merchant  0  requires factions { venice, }  and region_religion judaism 3  and event_counter introduction_venice 1
		agent merchant  0  requires factions { spain, }  and region_religion judaism 3  and event_counter introduction_spain 1
		agent merchant  0  requires factions { turks, }  and region_religion judaism 3  and event_counter introduction_turks 1
		agent merchant  0  requires factions { flanders, }  and region_religion judaism 3  and event_counter introduction_flanders 1
		agent merchant  0  requires factions { ireland, }  and region_religion judaism 3  and event_counter introduction_ireland 1
		agent merchant  0  requires factions { lit, }  and region_religion judaism 3  and event_counter introduction_lit 1
		agent merchant  0  requires factions { teutons, }  and region_religion judaism 3  and event_counter introduction_teutons 1
		agent merchant  0  requires factions { elo, }  and region_religion judaism 3  and event_counter introduction_elo 1
		agent merchant  0  requires factions { armenia, }  and region_religion judaism 3  and event_counter introduction_armenia 1
		agent merchant  0  requires factions { norway, }  and region_religion judaism 3  and event_counter introduction_norway 1
		agent merchant  0  requires factions { timurids, }  and region_religion judaism 3  and event_counter introduction_georgia 1
		agent merchant  0  requires factions { hedjaz, }  and region_religion judaism 3  and event_counter introduction_hedjaz 1
		agent merchant  0  requires factions { byzantium, }  and not event_counter introduction_byzantium 1
		agent merchant  0  requires factions { denmark, }  and not event_counter introduction_denmark 1
		agent merchant  0  requires factions { egypt, }  and not event_counter introduction_egypt 1
		agent merchant  0  requires factions { england, }  and not event_counter introduction_england 1
		agent merchant  0  requires factions { france, }  and not event_counter introduction_france 1
		agent merchant  0  requires factions { hre, }  and not event_counter introduction_hre 1
		agent merchant  0  requires factions { hungary, }  and not event_counter introduction_hungary 1
		agent merchant  0  requires factions { milan, }  and not event_counter introduction_milan 1
		agent merchant  0  requires factions { mongols, }  and not event_counter introduction_mongols 1
		agent merchant  0  requires factions { moors, }  and not event_counter introduction_moors 1
		agent merchant  0  requires factions { papal_states, }  and not event_counter introduction_papal_states 1
		agent merchant  0  requires factions { poland, }  and not event_counter introduction_poland 1
		agent merchant  0  requires factions { portugal, }  and not event_counter introduction_portugal 1
		agent merchant  0  requires factions { russia, }  and not event_counter introduction_russia 1
		agent merchant  0  requires factions { kiev, }  and not event_counter introduction_kiev 1
		agent merchant  0  requires factions { scotland, }  and not event_counter introduction_scotland 1
		agent merchant  0  requires factions { sicily, }  and not event_counter introduction_sicily 1
		agent merchant  0  requires factions { venice, }  and not event_counter introduction_venice 1
		agent merchant  0  requires factions { spain, }  and not event_counter introduction_spain 1
		agent merchant  0  requires factions { turks, }  and not event_counter introduction_turks 1
		agent merchant  0  requires factions { flanders, }  and not event_counter introduction_flanders 1
		agent merchant  0  requires factions { ireland, }  and not event_counter introduction_ireland 1
		agent merchant  0  requires factions { lit, }  and not event_counter introduction_lit 1
		agent merchant  0  requires factions { teutons, }  and not event_counter introduction_teutons 1
		agent merchant  0  requires factions { elo, }  and not event_counter introduction_elo 1
		agent merchant  0  requires factions { armenia, }  and not event_counter introduction_armenia 1
		agent merchant  0  requires factions { norway, }  and not event_counter introduction_norway 1
		agent merchant  0  requires factions { timurids, }  and not event_counter introduction_georgia 1
		agent merchant  0  requires factions { hedjaz, }  and not event_counter introduction_hedjaz 1
                trade_base_income_bonus bonus 3
		trade_base_income_bonus bonus -3 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 2 requires event_counter tokus_positive_event_market 1
                agent_limit merchant 1
            }
            material wooden
            construction  4 
            cost  1200
            settlement_min town
            upgrades
            {
                market
            }
        }
        market city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gov_level_2 1  
        {
            capability
            {
		agent merchant  1  requires factions { byzantium, }  and region_religion judaism 5  and event_counter introduction_byzantium 1
		agent merchant  1  requires factions { denmark, }  and region_religion judaism 5  and event_counter introduction_denmark 1
		agent merchant  1  requires factions { egypt, }  and region_religion judaism 5  and event_counter introduction_egypt 1
		agent merchant  1  requires factions { england, }  and region_religion judaism 5  and event_counter introduction_england 1
		agent merchant  1  requires factions { france, }  and region_religion judaism 5  and event_counter introduction_france 1
		agent merchant  1  requires factions { hre, }  and region_religion judaism 5  and event_counter introduction_hre 1
		agent merchant  1  requires factions { hungary, }  and region_religion judaism 5  and event_counter introduction_hungary 1
		agent merchant  1  requires factions { milan, }  and region_religion judaism 5  and event_counter introduction_milan 1
		agent merchant  1  requires factions { mongols, }  and region_religion judaism 5  and event_counter introduction_mongols 1
		agent merchant  1  requires factions { moors, }  and region_religion judaism 5  and event_counter introduction_moors 1
		agent merchant  1  requires factions { papal_states, }  and region_religion judaism 5  and event_counter introduction_papal_states 1
		agent merchant  1  requires factions { poland, }  and region_religion judaism 5  and event_counter introduction_poland 1
		agent merchant  1  requires factions { portugal, }  and region_religion judaism 5  and event_counter introduction_portugal 1
		agent merchant  1  requires factions { russia, }  and region_religion judaism 5  and event_counter introduction_russia 1
		agent merchant  1  requires factions { kiev, }  and region_religion judaism 5  and event_counter introduction_kiev 1
		agent merchant  1  requires factions { scotland, }  and region_religion judaism 5  and event_counter introduction_scotland 1
		agent merchant  1  requires factions { sicily, }  and region_religion judaism 5  and event_counter introduction_sicily 1
		agent merchant  1  requires factions { venice, }  and region_religion judaism 5  and event_counter introduction_venice 1
		agent merchant  1  requires factions { spain, }  and region_religion judaism 5  and event_counter introduction_spain 1
		agent merchant  1  requires factions { turks, }  and region_religion judaism 5  and event_counter introduction_turks 1
		agent merchant  1  requires factions { flanders, }  and region_religion judaism 5  and event_counter introduction_flanders 1
		agent merchant  1  requires factions { ireland, }  and region_religion judaism 5  and event_counter introduction_ireland 1
		agent merchant  1  requires factions { lit, }  and region_religion judaism 5  and event_counter introduction_lit 1
		agent merchant  1  requires factions { teutons, }  and region_religion judaism 5  and event_counter introduction_teutons 1
		agent merchant  1  requires factions { elo, }  and region_religion judaism 5  and event_counter introduction_elo 1
		agent merchant  1  requires factions { armenia, }  and region_religion judaism 5  and event_counter introduction_armenia 1
		agent merchant  1  requires factions { norway, }  and region_religion judaism 5  and event_counter introduction_norway 1
		agent merchant  1  requires factions { timurids, }  and region_religion judaism 5  and event_counter introduction_georgia 1
		agent merchant  1  requires factions { hedjaz, }  and region_religion judaism 5  and event_counter introduction_hedjaz 1
		agent merchant  1  requires factions { byzantium, }  and not event_counter introduction_byzantium 1
		agent merchant  1  requires factions { denmark, }  and not event_counter introduction_denmark 1
		agent merchant  1  requires factions { egypt, }  and not event_counter introduction_egypt 1
		agent merchant  1  requires factions { england, }  and not event_counter introduction_england 1
		agent merchant  1  requires factions { france, }  and not event_counter introduction_france 1
		agent merchant  1  requires factions { hre, }  and not event_counter introduction_hre 1
		agent merchant  1  requires factions { hungary, }  and not event_counter introduction_hungary 1
		agent merchant  1  requires factions { milan, }  and not event_counter introduction_milan 1
		agent merchant  1  requires factions { mongols, }  and not event_counter introduction_mongols 1
		agent merchant  1  requires factions { moors, }  and not event_counter introduction_moors 1
		agent merchant  1  requires factions { papal_states, }  and not event_counter introduction_papal_states 1
		agent merchant  1  requires factions { poland, }  and not event_counter introduction_poland 1
		agent merchant  1  requires factions { portugal, }  and not event_counter introduction_portugal 1
		agent merchant  1  requires factions { russia, }  and not event_counter introduction_russia 1
		agent merchant  1  requires factions { kiev, }  and not event_counter introduction_kiev 1
		agent merchant  1  requires factions { scotland, }  and not event_counter introduction_scotland 1
		agent merchant  1  requires factions { sicily, }  and not event_counter introduction_sicily 1
		agent merchant  1  requires factions { venice, }  and not event_counter introduction_venice 1
		agent merchant  1  requires factions { spain, }  and not event_counter introduction_spain 1
		agent merchant  1  requires factions { turks, }  and not event_counter introduction_turks 1
		agent merchant  1  requires factions { flanders, }  and not event_counter introduction_flanders 1
		agent merchant  1  requires factions { ireland, }  and not event_counter introduction_ireland 1
		agent merchant  1  requires factions { lit, }  and not event_counter introduction_lit 1
		agent merchant  1  requires factions { teutons, }  and not event_counter introduction_teutons 1
		agent merchant  1  requires factions { elo, }  and not event_counter introduction_elo 1
		agent merchant  1  requires factions { armenia, }  and not event_counter introduction_armenia 1
		agent merchant  1  requires factions { norway, }  and not event_counter introduction_norway 1
		agent merchant  1  requires factions { timurids, }  and not event_counter introduction_georgia 1
		agent merchant  1  requires factions { hedjaz, }  and not event_counter introduction_hedjaz 1
                trade_base_income_bonus bonus 4
		trade_base_income_bonus bonus -4 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_market 1
                agent_limit merchant 1
            }
            material wooden
            construction  6 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                fairground
            }
        }
        fairground city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level hinterland_roads paved_roads  and event_counter gov_level_3 1 
        {
            capability
            {
		agent merchant  2  requires factions { byzantium, }  and region_religion judaism 10  and event_counter introduction_byzantium 1
		agent merchant  2  requires factions { denmark, }  and region_religion judaism 10  and event_counter introduction_denmark 1
		agent merchant  2  requires factions { egypt, }  and region_religion judaism 10  and event_counter introduction_egypt 1
		agent merchant  2  requires factions { england, }  and region_religion judaism 10  and event_counter introduction_england 1
		agent merchant  2  requires factions { france, }  and region_religion judaism 10  and event_counter introduction_france 1
		agent merchant  2  requires factions { hre, }  and region_religion judaism 10  and event_counter introduction_hre 1
		agent merchant  2  requires factions { hungary, }  and region_religion judaism 10  and event_counter introduction_hungary 1
		agent merchant  2  requires factions { milan, }  and region_religion judaism 10  and event_counter introduction_milan 1
		agent merchant  2  requires factions { mongols, }  and region_religion judaism 10  and event_counter introduction_mongols 1
		agent merchant  2  requires factions { moors, }  and region_religion judaism 10  and event_counter introduction_moors 1
		agent merchant  2  requires factions { papal_states, }  and region_religion judaism 10  and event_counter introduction_papal_states 1
		agent merchant  2  requires factions { poland, }  and region_religion judaism 10  and event_counter introduction_poland 1
		agent merchant  2  requires factions { portugal, }  and region_religion judaism 10  and event_counter introduction_portugal 1
		agent merchant  2  requires factions { russia, }  and region_religion judaism 10  and event_counter introduction_russia 1
		agent merchant  2  requires factions { kiev, }  and region_religion judaism 10  and event_counter introduction_kiev 1
		agent merchant  2  requires factions { scotland, }  and region_religion judaism 10  and event_counter introduction_scotland 1
		agent merchant  2  requires factions { sicily, }  and region_religion judaism 10  and event_counter introduction_sicily 1
		agent merchant  2  requires factions { venice, }  and region_religion judaism 10  and event_counter introduction_venice 1
		agent merchant  2  requires factions { spain, }  and region_religion judaism 10  and event_counter introduction_spain 1
		agent merchant  2  requires factions { turks, }  and region_religion judaism 10  and event_counter introduction_turks 1
		agent merchant  2  requires factions { flanders, }  and region_religion judaism 10  and event_counter introduction_flanders 1
		agent merchant  2  requires factions { ireland, }  and region_religion judaism 10  and event_counter introduction_ireland 1
		agent merchant  2  requires factions { lit, }  and region_religion judaism 10  and event_counter introduction_lit 1
		agent merchant  2  requires factions { teutons, }  and region_religion judaism 10  and event_counter introduction_teutons 1
		agent merchant  2  requires factions { elo, }  and region_religion judaism 10  and event_counter introduction_elo 1
		agent merchant  2  requires factions { armenia, }  and region_religion judaism 10  and event_counter introduction_armenia 1
		agent merchant  2  requires factions { norway, }  and region_religion judaism 10  and event_counter introduction_norway 1
		agent merchant  2  requires factions { timurids, }  and region_religion judaism 10  and event_counter introduction_georgia 1
		agent merchant  2  requires factions { hedjaz, }  and region_religion judaism 10  and event_counter introduction_hedjaz 1
		agent merchant  2  requires factions { byzantium, }  and not event_counter introduction_byzantium 1
		agent merchant  2  requires factions { denmark, }  and not event_counter introduction_denmark 1
		agent merchant  2  requires factions { egypt, }  and not event_counter introduction_egypt 1
		agent merchant  2  requires factions { england, }  and not event_counter introduction_england 1
		agent merchant  2  requires factions { france, }  and not event_counter introduction_france 1
		agent merchant  2  requires factions { hre, }  and not event_counter introduction_hre 1
		agent merchant  2  requires factions { hungary, }  and not event_counter introduction_hungary 1
		agent merchant  2  requires factions { milan, }  and not event_counter introduction_milan 1
		agent merchant  2  requires factions { mongols, }  and not event_counter introduction_mongols 1
		agent merchant  2  requires factions { moors, }  and not event_counter introduction_moors 1
		agent merchant  2  requires factions { papal_states, }  and not event_counter introduction_papal_states 1
		agent merchant  2  requires factions { poland, }  and not event_counter introduction_poland 1
		agent merchant  2  requires factions { portugal, }  and not event_counter introduction_portugal 1
		agent merchant  2  requires factions { russia, }  and not event_counter introduction_russia 1
		agent merchant  2  requires factions { kiev, }  and not event_counter introduction_kiev 1
		agent merchant  2  requires factions { scotland, }  and not event_counter introduction_scotland 1
		agent merchant  2  requires factions { sicily, }  and not event_counter introduction_sicily 1
		agent merchant  2  requires factions { venice, }  and not event_counter introduction_venice 1
		agent merchant  2  requires factions { spain, }  and not event_counter introduction_spain 1
		agent merchant  2  requires factions { turks, }  and not event_counter introduction_turks 1
		agent merchant  2  requires factions { flanders, }  and not event_counter introduction_flanders 1
		agent merchant  2  requires factions { ireland, }  and not event_counter introduction_ireland 1
		agent merchant  2  requires factions { lit, }  and not event_counter introduction_lit 1
		agent merchant  2  requires factions { teutons, }  and not event_counter introduction_teutons 1
		agent merchant  2  requires factions { elo, }  and not event_counter introduction_elo 1
		agent merchant  2  requires factions { armenia, }  and not event_counter introduction_armenia 1
		agent merchant  2  requires factions { norway, }  and not event_counter introduction_norway 1
		agent merchant  2  requires factions { timurids, }  and not event_counter introduction_georgia 1
		agent merchant  2  requires factions { hedjaz, }  and not event_counter introduction_hedjaz 1
		trade_base_income_bonus bonus 6
 		trade_base_income_bonus bonus -6 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_market 1
                agent_limit merchant 1
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min city
            upgrades
            {
                great_market
            }
        }
        great_market city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level hinterland_roads paved_roads  and event_counter gov_level_4 1  
        {
            capability
            {
		agent merchant  3  requires factions { byzantium, }  and region_religion judaism 15  and event_counter introduction_byzantium 1
		agent merchant  3  requires factions { denmark, }  and region_religion judaism 15  and event_counter introduction_denmark 1
		agent merchant  3  requires factions { egypt, }  and region_religion judaism 15  and event_counter introduction_egypt 1
		agent merchant  3  requires factions { england, }  and region_religion judaism 15  and event_counter introduction_england 1
		agent merchant  3  requires factions { france, }  and region_religion judaism 15  and event_counter introduction_france 1
		agent merchant  3  requires factions { hre, }  and region_religion judaism 15  and event_counter introduction_hre 1
		agent merchant  3  requires factions { hungary, }  and region_religion judaism 15  and event_counter introduction_hungary 1
		agent merchant  3  requires factions { milan, }  and region_religion judaism 15  and event_counter introduction_milan 1
		agent merchant  3  requires factions { mongols, }  and region_religion judaism 15  and event_counter introduction_mongols 1
		agent merchant  3  requires factions { moors, }  and region_religion judaism 15  and event_counter introduction_moors 1
		agent merchant  3  requires factions { papal_states, }  and region_religion judaism 15  and event_counter introduction_papal_states 1
		agent merchant  3  requires factions { poland, }  and region_religion judaism 15  and event_counter introduction_poland 1
		agent merchant  3  requires factions { portugal, }  and region_religion judaism 15  and event_counter introduction_portugal 1
		agent merchant  3  requires factions { russia, }  and region_religion judaism 15  and event_counter introduction_russia 1
		agent merchant  3  requires factions { kiev, }  and region_religion judaism 15  and event_counter introduction_kiev 1
		agent merchant  3  requires factions { scotland, }  and region_religion judaism 15  and event_counter introduction_scotland 1
		agent merchant  3  requires factions { sicily, }  and region_religion judaism 15  and event_counter introduction_sicily 1
		agent merchant  3  requires factions { venice, }  and region_religion judaism 15  and event_counter introduction_venice 1
		agent merchant  3  requires factions { spain, }  and region_religion judaism 15  and event_counter introduction_spain 1
		agent merchant  3  requires factions { turks, }  and region_religion judaism 15  and event_counter introduction_turks 1
		agent merchant  3  requires factions { flanders, }  and region_religion judaism 15  and event_counter introduction_flanders 1
		agent merchant  3  requires factions { ireland, }  and region_religion judaism 15  and event_counter introduction_ireland 1
		agent merchant  3  requires factions { lit, }  and region_religion judaism 15  and event_counter introduction_lit 1
		agent merchant  3  requires factions { teutons, }  and region_religion judaism 15  and event_counter introduction_teutons 1
		agent merchant  3  requires factions { elo, }  and region_religion judaism 15  and event_counter introduction_elo 1
		agent merchant  3  requires factions { armenia, }  and region_religion judaism 15  and event_counter introduction_armenia 1
		agent merchant  3  requires factions { norway, }  and region_religion judaism 15  and event_counter introduction_norway 1
		agent merchant  3  requires factions { timurids, }  and region_religion judaism 15  and event_counter introduction_georgia 1
		agent merchant  3  requires factions { hedjaz, }  and region_religion judaism 15  and event_counter introduction_hedjaz 1
		agent merchant  3  requires factions { byzantium, }  and not event_counter introduction_byzantium 1
		agent merchant  3  requires factions { denmark, }  and not event_counter introduction_denmark 1
		agent merchant  3  requires factions { egypt, }  and not event_counter introduction_egypt 1
		agent merchant  3  requires factions { england, }  and not event_counter introduction_england 1
		agent merchant  3  requires factions { france, }  and not event_counter introduction_france 1
		agent merchant  3  requires factions { hre, }  and not event_counter introduction_hre 1
		agent merchant  3  requires factions { hungary, }  and not event_counter introduction_hungary 1
		agent merchant  3  requires factions { milan, }  and not event_counter introduction_milan 1
		agent merchant  3  requires factions { mongols, }  and not event_counter introduction_mongols 1
		agent merchant  3  requires factions { moors, }  and not event_counter introduction_moors 1
		agent merchant  3  requires factions { papal_states, }  and not event_counter introduction_papal_states 1
		agent merchant  3  requires factions { poland, }  and not event_counter introduction_poland 1
		agent merchant  3  requires factions { portugal, }  and not event_counter introduction_portugal 1
		agent merchant  3  requires factions { russia, }  and not event_counter introduction_russia 1
		agent merchant  3  requires factions { kiev, }  and not event_counter introduction_kiev 1
		agent merchant  3  requires factions { scotland, }  and not event_counter introduction_scotland 1
		agent merchant  3  requires factions { sicily, }  and not event_counter introduction_sicily 1
		agent merchant  3  requires factions { venice, }  and not event_counter introduction_venice 1
		agent merchant  3  requires factions { spain, }  and not event_counter introduction_spain 1
		agent merchant  3  requires factions { turks, }  and not event_counter introduction_turks 1
		agent merchant  3  requires factions { flanders, }  and not event_counter introduction_flanders 1
		agent merchant  3  requires factions { ireland, }  and not event_counter introduction_ireland 1
		agent merchant  3  requires factions { lit, }  and not event_counter introduction_lit 1
		agent merchant  3  requires factions { teutons, }  and not event_counter introduction_teutons 1
		agent merchant  3  requires factions { elo, }  and not event_counter introduction_elo 1
		agent merchant  3  requires factions { armenia, }  and not event_counter introduction_armenia 1
		agent merchant  3  requires factions { norway, }  and not event_counter introduction_norway 1
		agent merchant  3  requires factions { timurids, }  and not event_counter introduction_georgia 1
		agent merchant  3  requires factions { hedjaz, }  and not event_counter introduction_hedjaz 1
		trade_base_income_bonus bonus 8
		trade_base_income_bonus bonus -8 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_market 1
                agent_limit merchant 1
            }
            material wooden
            construction  12 
            cost  9600 
            settlement_min large_city
            upgrades
            {
                merchants_quarter
            }
        }
        merchants_quarter city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level hinterland_roads paved_roads  and event_counter gov_level_4 1  
        {
            capability
            {
		agent merchant  4  requires factions { byzantium, }  and region_religion judaism 15  and event_counter introduction_byzantium 1
		agent merchant  4  requires factions { denmark, }  and region_religion judaism 15  and event_counter introduction_denmark 1
		agent merchant  4  requires factions { egypt, }  and region_religion judaism 15  and event_counter introduction_egypt 1
		agent merchant  4  requires factions { england, }  and region_religion judaism 15  and event_counter introduction_england 1
		agent merchant  4  requires factions { france, }  and region_religion judaism 15  and event_counter introduction_france 1
		agent merchant  4  requires factions { hre, }  and region_religion judaism 15  and event_counter introduction_hre 1
		agent merchant  4  requires factions { hungary, }  and region_religion judaism 15  and event_counter introduction_hungary 1
		agent merchant  4  requires factions { milan, }  and region_religion judaism 15  and event_counter introduction_milan 1
		agent merchant  4  requires factions { mongols, }  and region_religion judaism 15  and event_counter introduction_mongols 1
		agent merchant  4  requires factions { moors, }  and region_religion judaism 15  and event_counter introduction_moors 1
		agent merchant  4  requires factions { papal_states, }  and region_religion judaism 15  and event_counter introduction_papal_states 1
		agent merchant  4  requires factions { poland, }  and region_religion judaism 15  and event_counter introduction_poland 1
		agent merchant  4  requires factions { portugal, }  and region_religion judaism 15  and event_counter introduction_portugal 1
		agent merchant  4  requires factions { russia, }  and region_religion judaism 15  and event_counter introduction_russia 1
		agent merchant  4  requires factions { kiev, }  and region_religion judaism 15  and event_counter introduction_kiev 1
		agent merchant  4  requires factions { scotland, }  and region_religion judaism 15  and event_counter introduction_scotland 1
		agent merchant  4  requires factions { sicily, }  and region_religion judaism 15  and event_counter introduction_sicily 1
		agent merchant  4  requires factions { venice, }  and region_religion judaism 15  and event_counter introduction_venice 1
		agent merchant  4  requires factions { spain, }  and region_religion judaism 15  and event_counter introduction_spain 1
		agent merchant  4  requires factions { turks, }  and region_religion judaism 15  and event_counter introduction_turks 1
		agent merchant  4  requires factions { flanders, }  and region_religion judaism 15  and event_counter introduction_flanders 1
		agent merchant  4  requires factions { ireland, }  and region_religion judaism 15  and event_counter introduction_ireland 1
		agent merchant  4  requires factions { lit, }  and region_religion judaism 15  and event_counter introduction_lit 1
		agent merchant  4  requires factions { teutons, }  and region_religion judaism 15  and event_counter introduction_teutons 1
		agent merchant  4  requires factions { elo, }  and region_religion judaism 15  and event_counter introduction_elo 1
		agent merchant  4  requires factions { armenia, }  and region_religion judaism 15  and event_counter introduction_armenia 1
		agent merchant  4  requires factions { norway, }  and region_religion judaism 15  and event_counter introduction_norway 1
		agent merchant  4  requires factions { timurids, }  and region_religion judaism 15  and event_counter introduction_georgia 1
		agent merchant  4  requires factions { hedjaz, }  and region_religion judaism 15  and event_counter introduction_hedjaz 1
		agent merchant  4  requires factions { byzantium, }  and not event_counter introduction_byzantium 1
		agent merchant  4  requires factions { denmark, }  and not event_counter introduction_denmark 1
		agent merchant  4  requires factions { egypt, }  and not event_counter introduction_egypt 1
		agent merchant  4  requires factions { england, }  and not event_counter introduction_england 1
		agent merchant  4  requires factions { france, }  and not event_counter introduction_france 1
		agent merchant  4  requires factions { hre, }  and not event_counter introduction_hre 1
		agent merchant  4  requires factions { hungary, }  and not event_counter introduction_hungary 1
		agent merchant  4  requires factions { milan, }  and not event_counter introduction_milan 1
		agent merchant  4  requires factions { mongols, }  and not event_counter introduction_mongols 1
		agent merchant  4  requires factions { moors, }  and not event_counter introduction_moors 1
		agent merchant  4  requires factions { papal_states, }  and not event_counter introduction_papal_states 1
		agent merchant  4  requires factions { poland, }  and not event_counter introduction_poland 1
		agent merchant  4  requires factions { portugal, }  and not event_counter introduction_portugal 1
		agent merchant  4  requires factions { russia, }  and not event_counter introduction_russia 1
		agent merchant  4  requires factions { kiev, }  and not event_counter introduction_kiev 1
		agent merchant  4  requires factions { scotland, }  and not event_counter introduction_scotland 1
		agent merchant  4  requires factions { sicily, }  and not event_counter introduction_sicily 1
		agent merchant  4  requires factions { venice, }  and not event_counter introduction_venice 1
		agent merchant  4  requires factions { spain, }  and not event_counter introduction_spain 1
		agent merchant  4  requires factions { turks, }  and not event_counter introduction_turks 1
		agent merchant  4  requires factions { flanders, }  and not event_counter introduction_flanders 1
		agent merchant  4  requires factions { ireland, }  and not event_counter introduction_ireland 1
		agent merchant  4  requires factions { lit, }  and not event_counter introduction_lit 1
		agent merchant  4  requires factions { teutons, }  and not event_counter introduction_teutons 1
		agent merchant  4  requires factions { elo, }  and not event_counter introduction_elo 1
		agent merchant  4  requires factions { armenia, }  and not event_counter introduction_armenia 1
		agent merchant  4  requires factions { norway, }  and not event_counter introduction_norway 1
		agent merchant  4  requires factions { timurids, }  and not event_counter introduction_georgia 1
		agent merchant  4  requires factions { hedjaz, }  and not event_counter introduction_hedjaz 1
                trade_base_income_bonus bonus 10
		trade_base_income_bonus bonus -10 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_market 1
                agent_limit merchant 1
            }
            material wooden
            construction  14 
            cost  14400 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building hinterland_roads
{
    convert_to hinterland_castle_roads
    levels roads paved_roads highways
    {
        roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 0
            capability
            {
                road_level 0  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and not event_counter tokus_negative_event_roads 1
		trade_level_bonus bonus 1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and not event_counter tokus_negative_event_roads 1
		road_level 0 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter tokus_negative_event_roads 1
		trade_level_bonus bonus 0 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter tokus_negative_event_roads 1
            }
            material wooden
            construction  3 
            cost  1200 
            settlement_min town
            upgrades
            {
                paved_roads
            }
        }
        paved_roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 1
            capability
            {
                road_level 1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and not event_counter tokus_negative_event_roads 1
		trade_level_bonus bonus 2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and not event_counter tokus_negative_event_roads 1
		road_level 0 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter tokus_negative_event_roads 1
		trade_level_bonus bonus 0 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter tokus_negative_event_roads 1
            }
            material wooden
            construction  6 
            cost  3600
            settlement_min city
            upgrades
            {
		highways
            }
        }
	highways city requires factions { byzantium, }  and event_counter governor_present 1  
        {
            convert_to 2
            capability
            {
                road_level 2  requires factions { byzantium, } and not event_counter tokus_negative_event_roads 1
		trade_level_bonus bonus 2  requires factions { byzantium, } and not event_counter tokus_negative_event_roads 1
		road_level 0 requires factions { byzantium, } and event_counter tokus_negative_event_roads 1
		trade_level_bonus bonus 0 requires factions { byzantium, } and event_counter tokus_negative_event_roads 1
            }
            material wooden
            construction  9 
            cost  5000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building hinterland_castle_roads
{
    convert_to hinterland_roads
    levels c_roads c_paved_roads c_highways
    {
        c_roads castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 0
            capability
            {
                road_level 0
		law_bonus bonus 1
            }
            material wooden
            construction  3 
            cost  1200 
            settlement_min town
            upgrades
            {
                c_paved_roads
            }
        }
        c_paved_roads castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 1
            capability
            {
                road_level 1
		law_bonus bonus 2
            }
            material wooden
            construction  6 
            cost  3600
            settlement_min city
            upgrades
            {
		c_highways
            }
        }
        c_highways castle requires factions { byzantium, }  and event_counter governor_present 1  
        {
            convert_to 2
            capability
            {
                road_level 2
		law_bonus bonus 3
                trade_base_income_bonus bonus 1
            }
            material wooden
            construction  9 
            cost  5000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building hinterland_farms
{
    convert_to hinterland_farms
    levels farms farms+1 farms+2 farms+3 
    {
        farms  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  
        {
            convert_to 0
            capability
            {
                farming_level 1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter kivals_summer 1 and not event_counter tokus_negative_event_agriculture 1 and not event_counter tokus_positive_event_agriculture 1
                farming_level 0  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter kivals_summer 1 and event_counter tokus_negative_event_agriculture 1
                farming_level 2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter kivals_summer 1 and event_counter tokus_positive_event_agriculture 1
            }
            material wooden
            construction  4 
            cost  1200 
            settlement_min village
            upgrades
            {
                farms+1
            }
        }
        farms+1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  
        {
            convert_to 1
            capability
            {
                farming_level 2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter kivals_summer 1 and not event_counter tokus_negative_event_agriculture 1 and not event_counter tokus_positive_event_agriculture 1
                farming_level 0  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter kivals_summer 1 and event_counter tokus_negative_event_agriculture 1
                farming_level 3  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter kivals_summer 1 and event_counter tokus_positive_event_agriculture 1
            }
            material wooden
            construction  6 
            cost  2400 
            settlement_min town
            upgrades
            {
                farms+2
            }
        }
        farms+2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  
        {
            convert_to 2
            capability
            {
                farming_level 3  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter kivals_summer 1 and not event_counter tokus_negative_event_agriculture 1 and not event_counter tokus_positive_event_agriculture 1
                farming_level 0  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter kivals_summer 1 and event_counter tokus_negative_event_agriculture 1
                farming_level 4  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter kivals_summer 1 and event_counter tokus_positive_event_agriculture 1
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min large_town
            upgrades
            {
                farms+3
            }
        }
        farms+3  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and resource grain  or hidden_resource metropolis 
        {
            convert_to 3
            capability
            {
                farming_level 4  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter kivals_summer 1 and not event_counter tokus_negative_event_agriculture 1 and not event_counter tokus_positive_event_agriculture 1
                farming_level 0  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter kivals_summer 1 and event_counter tokus_negative_event_agriculture 1
            }
            material wooden
            construction  12 
            cost  9600
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building hinterland_mines
{
    convert_to hinterland_castle_mines
    levels mines mines+1 
    {
        mines city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource silver or resource gold or resource tin or resource iron or resource sulfur or resource marble or resource coal
        {
            convert_to 0
            capability
            {
                mine_resource 4  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and not event_counter tokus_negative_event_mines 1 and not event_counter tokus_positive_event_mines 1
		mine_resource 0 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter tokus_negative_event_mines 1
		mine_resource 6 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter tokus_positive_event_mines 1
            }
            material wooden
            construction  4 
            cost  3000 
            settlement_min large_town
            upgrades
            {
                mines+1
            }
        }
        mines+1 city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource silver or resource gold or resource tin or resource iron or resource sulfur or resource marble or resource coal
        {
            convert_to 1
            capability
            {
                mine_resource 7 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and not event_counter tokus_negative_event_mines 1 and not event_counter tokus_positive_event_mines 1
		mine_resource 0 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter tokus_negative_event_mines 1
		mine_resource 12 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter tokus_positive_event_mines 1
            }
            material wooden
            construction  6 
            cost  6000
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building hinterland_castle_mines
{
    convert_to hinterland_mines
    levels c_mines c_mines+1 
    {
        c_mines castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource silver or resource gold or resource tin or resource iron or resource sulfur or resource marble or resource coal
        {
            convert_to 0
            capability
            {
                mine_resource 2 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and not event_counter tokus_negative_event_mines 1 and not event_counter tokus_positive_event_mines 1
		mine_resource 0 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter tokus_negative_event_mines 1
		mine_resource 4 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter tokus_positive_event_mines 1
            }
            material wooden
            construction  4 
            cost  3000 
            settlement_min large_town
            upgrades
            {
                c_mines+1
            }
        }
        c_mines+1 castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and resource silver or resource gold or resource tin or resource iron or resource sulfur or resource marble or resource coal
        {
            convert_to 1
            capability
            {
                mine_resource 4 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and not event_counter tokus_negative_event_mines 1 and not event_counter tokus_positive_event_mines 1
		mine_resource 0 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter tokus_negative_event_mines 1
		mine_resource 6 requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter tokus_positive_event_mines 1
            }
            material wooden
            construction  6 
            cost  6000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building routes
{
    levels amber_route 
    {
        amber_route requires factions { northern_european, eastern_european, }  and event_counter governor_present 1  and resource amber
        {
            capability
            {
                happiness_bonus bonus 1
                trade_base_income_bonus bonus 4
            }
            construction  6 
            cost  3800 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building health
{
    levels well sewers public_baths aqueduct city_plumbing
    {
        well city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1
        {
            capability
            {
                population_health_bonus bonus 1
            }
            material wooden
            construction  2 
            cost  1600 
            settlement_min town
            upgrades
            {
                sewers
            }
        }
        sewers city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1
        {
            capability
            {
                population_health_bonus bonus 1
                population_growth_bonus bonus 1
            }
            material wooden
            construction  4 
            cost  3200 
            settlement_min large_town
            upgrades
            {
                public_baths
            }
        }
        public_baths city requires factions { greek, }  and event_counter governor_present 1
        {
            capability
            {
                population_health_bonus bonus 2
                population_growth_bonus bonus 2
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min city
            upgrades
            {
                aqueduct
            }
        }
        aqueduct city requires factions { greek, }  and event_counter governor_present 1
        {
            capability
            {
                population_health_bonus bonus 2
                population_growth_bonus bonus 2
		happiness_bonus bonus 2
            }
            material wooden
            construction  10 
            cost  6400 
            settlement_min large_city
            upgrades
            {
	    city_plumbing
            }
        }
        city_plumbing city requires factions { greek, }  and event_counter governor_present 1
        {
            capability
            {
                population_health_bonus bonus 3
                population_growth_bonus bonus 3
		happiness_bonus bonus 3
            }
            material wooden
            construction  12 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building hospital
{
    levels bimaristan great_bimaristan 
    {
        bimaristan city requires factions { middle_eastern, }  and event_counter governor_present 1  
        {
            capability
            {
                retrain_cost_bonus bonus 1
                population_health_bonus bonus 2
		population_growth_bonus bonus 1
            }
            material wooden
            construction  10 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                great_bimaristan
            }
        }
        great_bimaristan city requires factions { middle_eastern, }  and event_counter governor_present 1  
        {
            capability
            {
                retrain_cost_bonus bonus 2
                population_health_bonus bonus 4
		population_growth_bonus bonus 2
            }
            material wooden
            construction  14 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building academic
{
    levels alchemists_lab alchemy_school
    {
        alchemists_lab city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1  and building_present_min_level market great_market
        {
            capability
            {
                weapon_missile_gunpowder 1
		recruits_exp_bonus bonus 1
            }
            material wooden
            construction  6 
            cost  3200 
            settlement_min large_city
            upgrades
            {
                alchemy_school
            }
        }
        alchemy_school city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and event_counter gunpowder_discovered 1  and building_present_min_level market merchants_quarter
        {
            capability
            {
                weapon_missile_gunpowder 1
                weapon_artillery_gunpowder 1
		recruits_exp_bonus bonus 2
            }
            material wooden
            construction  10 
            cost  6400 
            settlement_min huge_city
            upgrades
            {
            }
    	}
    }
    plugins 
    {
    }
}
building temple_catholic
{
    convert_to temple_catholic_castle
    religion catholic
    levels small_church church abbey cathedral huge_cathedral 
    {
        small_church city requires factions {  denmark, hre, teutons, scotland, france, elo, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, flanders, ireland, norway, }  and event_counter governor_present 1  
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions {  denmark, scotland, hre, teutons, france, elo, england, flanders, ireland, norway, } 
                agent priest  0  requires factions { hungary, poland, } 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, } 
                happiness_bonus bonus 1
                religion_level bonus 1
                pope_disapproval 1
                agent_limit priest 1
            }
            material wooden
            construction  2 
            cost  1600 
            settlement_min town
            upgrades
            {
                church
            }
        }
        church city requires factions {  denmark, hre, teutons, scotland, france, elo, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, flanders, ireland, norway, }  and event_counter governor_present 1  
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions {  denmark, scotland, hre, teutons, france, elo, england, flanders, ireland, norway, } 
                agent priest  0  requires factions { hungary, poland, } 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, } 
                happiness_bonus bonus 1
                religion_level bonus 2
                agent_limit priest 1
                pope_disapproval 1
            }
            material wooden
            construction  4 
            cost  3200 
            settlement_min large_town
            upgrades
            {
                abbey
            }
        }
        abbey city requires factions {  denmark, hre, teutons, scotland, france, elo, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, flanders, ireland, norway, }  and event_counter governor_present 1  
        {
            capability
            {
                agent priest  0  requires factions {  denmark, scotland, hre, teutons, france, elo, england, flanders, ireland, norway, } 
                agent priest  0  requires factions { hungary, poland, } 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, } 
                recruit_pool "Armored Clergy"  1   0.2   2  0  requires factions { denmark, }  and region_religion catholic 80 
                happiness_bonus bonus 2
                religion_level bonus 3
                agent_limit priest 1
                pope_disapproval 1
            }
            material wooden
            construction  6 
            cost  6400 
            settlement_min city
            upgrades
            {
                cathedral
            }
        }
        cathedral city requires factions {  denmark, hre, teutons, scotland, france, elo, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, venice, flanders, ireland, norway, }  and event_counter governor_present 1  
        {
            capability
            {
                agent priest  0  requires factions {  denmark, scotland, hre, teutons, france, elo, england, flanders, ireland, norway, } 
                agent priest  0  requires factions { hungary, poland, } 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, } 
                recruit_pool "Armored Clergy"  1   0.4   3  0  requires factions { denmark, }  and region_religion catholic 80 
                happiness_bonus bonus 2
                religion_level bonus 4
                agent_limit priest 1
                pope_disapproval 1
                pope_approval 1
                population_health_bonus bonus 1
            }
            material wooden
            construction  8 
            cost  12800 
            settlement_min large_city
            upgrades
            {
                huge_cathedral
            }
        }
        huge_cathedral city requires factions {  denmark, hre, teutons, scotland, france, elo, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, flanders, ireland, norway, }  and event_counter governor_present 1  
        {
            capability
            {
                agent priest  0  requires factions {  denmark, scotland, hre, teutons, france, elo, england, flanders, ireland, norway, } 
                agent priest  0  requires factions { hungary, poland, } 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, } 
                recruit_pool "Armored Clergy"  1   0.4   3  1  requires factions { denmark, }  and region_religion catholic 80 
                happiness_bonus bonus 3
                religion_level bonus 5
                agent_limit priest 1
                pope_disapproval 1
                pope_approval 1
                population_health_bonus bonus 3
            }
            material wooden
            construction  12 
            cost  14400
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_catholic_castle
{
    convert_to temple_catholic
    religion catholic
    levels small_chapel chapel 
    {
        small_chapel castle requires factions {  denmark, hre, teutons, scotland, france, elo, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, flanders, ireland, norway, }  and event_counter governor_present 1  
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions {  denmark, scotland, hre, teutons, france, elo, england, flanders, ireland, norway, } 
                agent priest  0  requires factions { hungary, poland, } 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, }
		recruit_pool "Armored Clergy"  1   0.2   2  0  requires factions { norway, }  and region_religion catholic 80
                happiness_bonus bonus 1
                religion_level bonus 2
                pope_disapproval 1
                agent_limit priest 1
		population_health_bonus bonus 1
            }
            material wooden
            construction  2 
            cost  1600 
            settlement_min town
            upgrades
            {
                chapel
            }
        }
        chapel castle requires factions {  denmark, hre, teutons, scotland, france, elo, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, flanders, ireland, norway, }  and event_counter governor_present 1  
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions {  denmark, scotland, hre, teutons, france, elo, england, flanders, ireland, norway, } 
                agent priest  0  requires factions { hungary, poland, } 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, }
		recruit_pool "Armored Clergy"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 80
                happiness_bonus bonus 1
                religion_level bonus 3
                agent_limit priest 1
                pope_disapproval 1
		population_health_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  3200 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_heretic
{
    religion heretic
    levels h_church 
    {
        h_church city requires factions { slave, }  and event_counter governor_present 1  
        {
            capability
            {
                happiness_bonus bonus -2
                religion_level bonus 30
                law_bonus bonus -4
            }
            material wooden
            construction  2 
            cost  1500
            settlement_min town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_orthodox
{
    convert_to temple_orthodox_castle
    religion orthodox
    levels small_church_o church_o abbey_o cathedral_o huge_cathedral_o 
    {
        small_church_o city requires factions { russia, kiev, byzantium, armenia, timurids, }  and event_counter governor_present 1  
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions { russia, kiev, timurids, } 
                agent priest  0  requires factions { byzantium, armenia, } 
                happiness_bonus bonus 1
                religion_level bonus 2
                agent_limit priest 1
            }
            material wooden
            construction  2 
            cost  1600 
            settlement_min town
            upgrades
            {
                church_o
            }
        }
        church_o city requires factions { russia, kiev, byzantium, armenia, timurids, }  and event_counter governor_present 1  
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions { russia, kiev, timurids, } 
                agent priest  0  requires factions { byzantium, armenia, } 
                happiness_bonus bonus 1
                religion_level bonus 4
                agent_limit priest 1
            }
            material wooden
            construction  4 
            cost  3200 
            settlement_min large_town
            upgrades
            {
                abbey_o
            }
        }
        abbey_o city requires factions { russia, kiev, byzantium, armenia, timurids, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Tadzreuli"  1   0.4   3  0  requires factions { timurids, }  and region_religion orthodox 80
                agent priest  0  requires factions { russia, kiev, timurids, } 
                agent priest  0  requires factions { byzantium, armenia, } 
                happiness_bonus bonus 2
                religion_level bonus 6
                agent_limit priest 1
            }
            material wooden
            construction  6 
            cost  6400
            settlement_min city
            upgrades
            {
                cathedral_o
            }
        }
        cathedral_o city requires factions { russia, kiev, byzantium, armenia, timurids, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Tadzreuli"  1   0.5   3  0  requires factions { timurids, }  and region_religion orthodox 80
                agent priest  0  requires factions { russia, kiev, timurids, } 
                agent priest  0  requires factions { byzantium, armenia, } 
                happiness_bonus bonus 2
                religion_level bonus 8
                agent_limit priest 1
		population_health_bonus bonus 1
            }
            material wooden
            construction  8 
            cost  12800 
            settlement_min large_city
            upgrades
            {
                huge_cathedral_o
            }
        }
        huge_cathedral_o city requires factions { russia, kiev, byzantium, armenia, timurids, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Tadzreuli"  1   0.6   3  0  requires factions { timurids, }  and region_religion orthodox 80
                agent priest  0  requires factions { russia, kiev, timurids, } 
                agent priest  0  requires factions { byzantium, armenia, } 
                happiness_bonus bonus 3
                religion_level bonus 10
                agent_limit priest 1
		population_health_bonus bonus 3
            }
            material wooden
            construction  12 
            cost  14400 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_orthodox_castle
{
    convert_to temple_orthodox
    religion orthodox
    levels small_chapel_o chapel_o 
    {
        small_chapel_o castle requires factions { russia, kiev, byzantium, armenia, timurids, }  and event_counter governor_present 1  
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions { russia, kiev, timurids, } 
                agent priest  0  requires factions { byzantium, armenia, } 
                happiness_bonus bonus 1
                religion_level bonus 4
                agent_limit priest 1
		population_health_bonus bonus 1
            }
            material wooden
            construction  2 
            cost  1600 
            settlement_min town
            upgrades
            {
                chapel_o
            }
        }
        chapel_o castle requires factions { russia, kiev, byzantium, armenia, timurids, }  and event_counter governor_present 1  
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions { russia, kiev, timurids, } 
                agent priest  0  requires factions { byzantium, armenia, } 
                happiness_bonus bonus 1
                religion_level bonus 6
                agent_limit priest 1
		population_health_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  3200 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_muslim
{
    convert_to temple_muslim_castle
    religion islam
    levels small_masjid masjid minareted_masjid jama great_jama 
    {
        small_masjid city requires factions { egypt, moors, turks, hedjaz, }  and event_counter governor_present 1  
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, hedjaz, } 
                happiness_bonus bonus 1
                religion_level bonus 2
                agent_limit priest 1
            }
            material wooden
            construction  2 
            cost  1600
            settlement_min town
            upgrades
            {
                masjid
            }
        }
        masjid city requires factions { egypt, moors, turks, hedjaz, }  and event_counter governor_present 1  
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, hedjaz, } 
                happiness_bonus bonus 1
                religion_level bonus 4
                agent_limit priest 1
            }
            material wooden
            construction  4 
            cost  3200 
            settlement_min large_town
            upgrades
            {
                minareted_masjid
            }
        }
        minareted_masjid city requires factions { egypt, moors, turks, hedjaz, }  and event_counter governor_present 1  
        {
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks,  hedjaz, } 
                happiness_bonus bonus 2
                religion_level bonus 6
                agent_limit priest 1
            }
            material wooden
            construction  6 
            cost  6400 
            settlement_min city
            upgrades
            {
                jama
            }
        }
        jama city requires factions { egypt, moors, turks, hedjaz, }  and event_counter governor_present 1  
        {
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, hedjaz, } 
                happiness_bonus bonus 2
                religion_level bonus 8
                agent_limit priest 1
		population_health_bonus bonus 1
            }
            material wooden
            construction  8 
            cost  12800 
            settlement_min large_city
            upgrades
            {
                great_jama
            }
        }
        great_jama city requires factions { egypt, moors, turks, hedjaz, }  and event_counter governor_present 1  
        {
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, hedjaz, } 
                happiness_bonus bonus 3
                religion_level bonus 10
                agent_limit priest 1
		population_health_bonus bonus 3
            }
            material wooden
            construction  12 
            cost  14400 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_muslim_castle
{
    convert_to temple_muslim
    religion islam
    levels c_small_masjid c_masjid 
    {
        c_small_masjid castle requires factions { egypt, moors, turks, hedjaz, }  and event_counter governor_present 1  
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, hedjaz, } 
                happiness_bonus bonus 1
                religion_level bonus 4
                agent_limit priest 1
		population_health_bonus bonus 1
            }
            material wooden
            construction  2 
            cost  1600 
            settlement_min town
            upgrades
            {
                c_masjid
            }
        }
        c_masjid castle requires factions { egypt, moors, turks, hedjaz, }  and event_counter governor_present 1  
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, hedjaz, } 
                happiness_bonus bonus 1
                religion_level bonus 6
                agent_limit priest 1
		population_health_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  3200 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building taverns
{
    levels brothel inn tavern coaching_house pleasure_palace 
    {
        brothel city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level market corn_exchange
        {
            capability
            {
                agent spy  0  requires factions { northern_european, } 
                agent spy  0  requires factions { middle_eastern, } 
                agent spy  0  requires factions { eastern_european, } 
                agent spy  0  requires factions { greek, } 
                agent spy  0  requires factions { southern_european, } 
		happiness_bonus bonus 1 requires not factions { southern_european, }
                happiness_bonus bonus 1  requires factions { southern_european, } and not event_counter tokus_decameron 1
                happiness_bonus bonus 2  requires factions { southern_european, } and event_counter tokus_decameron 1
                agent_limit spy 1
            }
            material wooden
            construction  4 
            cost  1600 
            settlement_min town
            upgrades
            {
                inn
            }
        }
        inn city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level market market
        {
            capability
            {
                agent spy  0  requires factions { northern_european, } 
                agent assassin  0  requires factions { northern_european, } 
                agent spy  0  requires factions { middle_eastern, } 
                agent assassin  0  requires factions { middle_eastern, } 
                agent spy  0  requires factions { eastern_european, } 
                agent assassin  0  requires factions { eastern_european, } 
                agent spy  0  requires factions { greek, } 
                agent assassin  0  requires factions { greek, } 
                agent spy  0  requires factions { southern_european, } 
                agent assassin  0  requires factions { southern_european, } 
                happiness_bonus bonus 2 requires not factions { southern_european, }
                happiness_bonus bonus 2  requires factions { southern_european, } and not event_counter tokus_decameron 1
                happiness_bonus bonus 3  requires factions { southern_european, } and event_counter tokus_decameron 1
                agent_limit spy 1
                agent_limit assassin 1
            }
            material wooden
            construction  6 
            cost  3200 
            settlement_min large_town
            upgrades
            {
                tavern
            }
        }
        tavern city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level market fairground
        {
            capability
            {
                agent spy  1  requires factions { northern_european, } 
                agent assassin  1  requires factions { northern_european, } 
                agent spy  1  requires factions { middle_eastern, } 
                agent assassin  1  requires factions { middle_eastern, } 
                agent spy  1  requires factions { eastern_european, } 
                agent assassin  1  requires factions { eastern_european, } 
                agent spy  1  requires factions { greek, } 
                agent assassin  1  requires factions { greek, } 
                agent spy  1  requires factions { southern_european, } 
                agent assassin  1  requires factions { southern_european, } 
                recruit_pool "Transilvanian Peasants"  1   0.4   3  0  requires factions { hungary, } 
                recruit_pool "Cruitearan Gorm"  1   0.4   3  0  requires factions { ireland, } 
                happiness_bonus bonus 3 requires not factions { southern_european, }
                happiness_bonus bonus 3  requires factions { southern_european, } and not event_counter tokus_decameron 1
                happiness_bonus bonus 5  requires factions { southern_european, } and event_counter tokus_decameron 1
                agent_limit spy 2
                agent_limit assassin 2
            }
            material wooden
            construction  8 
            cost  6400 
            settlement_min city
            upgrades
            {
                coaching_house
            }
        }
        coaching_house city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level market great_market
        {
            capability
            {
                agent spy  2  requires factions { northern_european, } 
                agent assassin  2  requires factions { northern_european, } 
                agent spy  2  requires factions { middle_eastern, } 
                agent assassin  2  requires factions { middle_eastern, } 
                agent spy  2  requires factions { eastern_european, } 
                agent assassin  2  requires factions { eastern_european, } 
                agent spy  2  requires factions { greek, } 
                agent assassin  2  requires factions { greek, } 
                agent spy  2  requires factions { southern_european, } 
                agent assassin  2  requires factions { southern_european, } 
                recruit_pool "Transilvanian Peasants"  1   0.5   4  0  requires factions { hungary, } 
                recruit_pool "Cruitearan Gorm"  1   0.5   4  0  requires factions { ireland, } 
                happiness_bonus bonus 4 requires not factions { southern_european, }
                happiness_bonus bonus 4  requires factions { southern_european, } and not event_counter tokus_decameron 1
                happiness_bonus bonus 6  requires factions { southern_european, } and event_counter tokus_decameron 1
                agent_limit spy 3
                agent_limit assassin 3
            }
            material wooden
            construction  10 
            cost  12800 
            settlement_min large_city
            upgrades
            {
                pleasure_palace
            }
        }
        pleasure_palace city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and building_present_min_level market merchants_quarter 
        {
            capability
            {
                agent spy  3  requires factions { northern_european, } 
                agent assassin  3  requires factions { northern_european, } 
                agent spy  3  requires factions { middle_eastern, } 
                agent assassin  3  requires factions { middle_eastern, } 
                agent spy  3  requires factions { eastern_european, } 
                agent assassin  3  requires factions { eastern_european, } 
                agent spy  3  requires factions { greek, } 
                agent assassin  3  requires factions { greek, } 
                agent spy  3  requires factions { southern_european, } 
                agent assassin  3  requires factions { southern_european, } 
                recruit_pool "Transilvanian Peasants"  1   0.5   4  0  requires factions { hungary, } 
                recruit_pool "Cruitearan Gorm"  1   0.5   4  0  requires factions { ireland, } 
                happiness_bonus bonus 5 requires not factions { southern_european, }
                happiness_bonus bonus 5  requires factions { southern_european, } and not event_counter tokus_decameron 1
                happiness_bonus bonus 7  requires factions { southern_european, } and event_counter tokus_decameron 1
                agent_limit spy 3
                agent_limit assassin 3
            }
            material wooden
            construction  12 
            cost  14400
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building city_hall
{
    levels town_hall council_chambers city_hall mayors_palace 
    {
        town_hall city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                agent diplomat  0  requires factions { northern_european, } 
                agent diplomat  0  requires factions { middle_eastern, } 
                agent diplomat  0  requires factions { eastern_european, } 
                agent diplomat  0  requires factions { greek, } 
                agent diplomat  0  requires factions { southern_european, } 
                law_bonus bonus 1 requires not factions { england, }
		law_bonus bonus 1 requires factions { england, } and not event_counter tokus_magna_carta 1
		law_bonus bonus 2 requires factions { england, } and event_counter tokus_magna_carta 1
                population_health_bonus bonus 1
                agent_limit diplomat 1
             }
            material wooden
            construction  4 
            cost  1200
            settlement_min large_town
            upgrades
            {
                council_chambers
            }
        }
        council_chambers city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                agent diplomat  1  requires factions { northern_european, } 
                agent diplomat  1  requires factions { middle_eastern, } 
                agent diplomat  1  requires factions { eastern_european, } 
                agent diplomat  1  requires factions { greek, } 
                agent diplomat  1  requires factions { southern_european, } 
                recruit_pool "Carroccio Standard M"  1   0.2   2  0  requires factions { milan, }  and region_religion catholic 80  
                recruit_pool "Carroccio Standard V"  1   0.2   2  0  requires factions { venice, }  and region_religion catholic 80  
                law_bonus bonus 2 requires not factions { england, }
		law_bonus bonus 2 requires factions { england, } and not event_counter tokus_magna_carta 1
		law_bonus bonus 3 requires factions { england, } and event_counter tokus_magna_carta 1
                population_health_bonus bonus 2
                agent_limit diplomat 2
            }
            material wooden
            construction  6 
            cost  2400
            settlement_min city
            upgrades
            {
                city_hall
            }
        }
        city_hall city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                agent diplomat  2  requires factions { northern_european, } 
                agent diplomat  2  requires factions { middle_eastern, } 
                agent diplomat  2  requires factions { eastern_european, } 
                agent diplomat  2  requires factions { greek, } 
                agent diplomat  2  requires factions { southern_european, } 
                recruit_pool "Carroccio Standard M"  1   0.2   2  0  requires factions { milan, }  and region_religion catholic 80  
                recruit_pool "Carroccio Standard V"  1   0.2   2  0  requires factions { venice, }  and region_religion catholic 80  
                recruit_pool "Janissary Heavy Inf"  1   0.4   3  0  requires factions { turks, }  and region_religion islam 80  
                law_bonus bonus 3 requires not factions { england, }
		law_bonus bonus 3 requires factions { england, } and not event_counter tokus_magna_carta 1
		law_bonus bonus 5 requires factions { england, } and event_counter tokus_magna_carta 1
                population_health_bonus bonus 4
                agent_limit diplomat 3
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                mayors_palace
            }
        }
        mayors_palace city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                agent diplomat  3  requires factions { northern_european, } 
                agent diplomat  3  requires factions { middle_eastern, } 
                agent diplomat  3  requires factions { eastern_european, } 
                agent diplomat  3  requires factions { greek, } 
                agent diplomat  3  requires factions { southern_european, } 
                recruit_pool "Forlorn Hope"  1   0.4   3  0  requires factions { hre, } 
                recruit_pool "Carroccio Standard M"  1   0.4   3  0  requires factions { milan, }  and region_religion catholic 80  
                recruit_pool "Carroccio Standard V"  1   0.4   3  0  requires factions { venice, }  and region_religion catholic 80  
                recruit_pool "Famiglia Ducale"  1   0.5   4  0  requires factions { milan, }  and region_religion catholic 80  
                recruit_pool "Janissary Heavy Inf"  1   0.5   4  0  requires factions { turks, }  and region_religion islam 80  
                law_bonus bonus 4 requires not factions { england, }
		law_bonus bonus 4 requires factions { england, } and not event_counter tokus_magna_carta 1
		law_bonus bonus 6 requires factions { england, } and event_counter tokus_magna_carta 1
                population_health_bonus bonus 5
                agent_limit diplomat 3
            }
            material wooden
            construction  10 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building art
{
    levels artist_studio artist_gallery 
    {
        artist_studio city requires factions { milan, venice, sicily, }  and event_counter governor_present 1  
        {
            capability
            {
                happiness_bonus bonus 1  requires not event_counter tokus_the_divine_comedy 1
                happiness_bonus bonus 2  requires event_counter tokus_the_divine_comedy 1
            }
            material wooden
            construction  6 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                artist_gallery
            }
        }
        artist_gallery city requires factions { milan, venice, sicily, }  and event_counter governor_present 1  
        {
            capability
            {
                happiness_bonus bonus 2  requires not event_counter tokus_the_divine_comedy 1
                happiness_bonus bonus 4  requires event_counter tokus_the_divine_comedy 1
                population_health_bonus bonus 1
            }
            material wooden
            construction  12 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building bullring
{
    levels plaza_del_toro 
    {
        plaza_del_toro city requires factions { portugal, spain, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Jinetes"  1   0.5   4  0  requires factions { spain, portugal, } 
                happiness_bonus bonus 1
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building bank
{
    levels merchant_bank merchant_vault 
    {
        merchant_bank city requires factions { hre, venice, milan, }  and event_counter governor_present 1  
        {
            capability
            {
                trade_base_income_bonus bonus 2
                agent_limit merchant 1
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                merchant_vault
            }
        }
        merchant_vault city requires factions { hre, venice, milan, }  and event_counter governor_present 1  
        {
            capability
            {
                trade_base_income_bonus bonus 3
                agent_limit merchant 2
            }
            material wooden
            construction  12 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building paper
{
    levels printing_press printing_house 
    {
        printing_press city requires factions { hre, poland, lit, }  and event_counter governor_present 1  and event_counter first_printing_press 1
        {
            capability
            {
                happiness_bonus bonus 1
                trade_base_income_bonus bonus 2
		law_bonus bonus -1
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                printing_house
            }
        }
        printing_house city requires factions { hre, poland, lit, }  and event_counter governor_present 1  and event_counter first_printing_press 1 
        {
            capability
            {
                happiness_bonus bonus 2
                trade_base_income_bonus bonus 4
		law_bonus bonus -2
            }
            material wooden
            construction  12 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building icon_art
{
    levels ikoner_studio master_ikoner_studio 
    {
        ikoner_studio city requires factions { russia, kiev, greek, armenia, timurids, }  and event_counter governor_present 1  
        {
            capability
            {
                population_health_bonus bonus 1
                amplify_religion_level 1
            }
            material wooden
            construction  6 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                master_ikoner_studio
            }
        }
        master_ikoner_studio city requires factions { russia, kiev, greek, armenia, timurids, }  and event_counter governor_present 1  
        {
            capability
            {
                population_health_bonus bonus 2
                amplify_religion_level 2
            }
            material wooden
            construction  12 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building music
{
    levels theatre conservatorium 
    {
        theatre city requires factions { france, }  and event_counter governor_present 1  
        {
            capability
            {
                happiness_bonus bonus 1
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                conservatorium
            }
        }
        conservatorium city requires factions { france, }  and event_counter governor_present 1  
        {
            capability
            {
                happiness_bonus bonus 2
            }
            material wooden
            construction  12 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building tourney
{
    levels jousting_lists tourney_fields 
    {
        jousting_lists castle requires factions { hre, france, england, portugal, spain, flanders, teutons, elo, }  and event_counter governor_present 1  
        {
            capability
            {
                heavy_cavalry_bonus bonus 1
            }
            material wooden
            construction  4 
            cost  3200 
            settlement_min city
            upgrades
            {
                tourney_fields
            }
        }
        tourney_fields castle requires factions { hre, france, england, portugal, spain, flanders, teutons, elo, }  and event_counter governor_present 1  
        {
            capability
            {
                happiness_bonus bonus 1
                free_upkeep bonus 1
                heavy_cavalry_bonus bonus 2
            }
            material wooden
            construction  8 
            cost  6400
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building castle_academic
{
    levels library academy 
    {
        library castle requires factions { denmark, scotland, hungary, poland, flanders, lit, }  and event_counter governor_present 1  
        {
            capability
            {
                agent spy  0  requires factions { northern_european, } 
                agent diplomat  0  requires factions { northern_european, } 
                agent spy  0  requires factions { eastern_european, } 
                agent diplomat  0  requires factions { eastern_european, } 
                agent_limit diplomat 1
                agent_limit spy 1
            }
            material wooden
            construction  6 
            cost  1600 
            settlement_min large_city
            upgrades
            {
                academy
            }
        }
        academy castle requires factions { denmark, scotland, hungary, poland, flanders, lit, }  and event_counter governor_present 1  
        {
            capability
            {
                agent spy  1  requires factions { northern_european, } 
                agent diplomat  1  requires factions { northern_european, } 
                agent assassin  0  requires factions { northern_european, } 
                agent spy  1  requires factions { eastern_european, } 
                agent diplomat  1  requires factions { eastern_european, } 
                agent assassin  0  requires factions { eastern_european, } 
                agent_limit diplomat 1
                agent_limit spy 1
                agent_limit assassin 1

            }
            material wooden
            construction  12 
            cost  3200 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building caravan
{
    levels caravan_stop caravanersary 
    {
        caravan_stop castle requires factions { moors, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Tuareg Camel Spearmens"  1   0.5   4  0  requires factions { moors, }  and region_religion islam 80 
		recruit_pool "Bedouin Camel Riders"  1   0.4   4  0  requires factions { egypt, }  and region_religion islam 80 
                trade_level_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                caravanersary
            }
        }
        caravanersary castle requires factions { moors, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Tuareg Camel Spearmens"  1   0.5   4  1  requires factions { moors, }  and region_religion islam 80  
                recruit_pool "Camel Gunners"  1   0.4   3  0  requires factions { moors, }  and event_counter gunpowder_discovered 1  and region_religion islam 80  
                recruit_pool "Bedouin Camel Riders"  1   0.5   4  1  requires factions { egypt, }  and region_religion islam 80 
                trade_level_bonus bonus 4
            }
            material wooden
            construction  8 
            cost  3600 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_assassins_guild
{
    levels assassins_guild m_assassins_guild gm_assassins_guild 
    {
        assassins_guild city requires factions { northern_european, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                law_bonus bonus 1
            }
            material wooden
            construction  2 
            cost 2000 
            settlement_min city
            upgrades
            {
                m_assassins_guild
            }
        }
        m_assassins_guild city requires factions { northern_european, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Battlefield Assassins"  1   0.4   3  0  requires factions { hungary, }  and region_religion catholic 80  
                law_bonus bonus 1
            }
            material wooden
            construction  3 
            cost  4000 
            settlement_min large_city
            upgrades
            {
                gm_assassins_guild
            }
        }
        gm_assassins_guild city requires factions { northern_european, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Battlefield Assassins"  1   0.4   3  1  requires factions { hungary, }  and region_religion catholic 80  
                law_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  6000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_assassins_muslim_guild
{
    levels eastern_assassins_guild m_eastern_assassins_guild gm_eastern_assassins_guild 
    {
        eastern_assassins_guild city requires factions { middle_eastern, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Hashishim"  1   0.4   3  0  requires factions { moors, egypt, turks, }  and region_religion islam 80  
            }
            material wooden
            construction  2 
            cost  2000 
            settlement_min city
            upgrades
            {
                m_eastern_assassins_guild
            }
        }
        m_eastern_assassins_guild city requires factions { middle_eastern, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Hashishim"  1   0.4   3  1  requires factions { moors, egypt, turks, }  and region_religion islam 80   
            }
            material wooden
            construction  3 
            cost  4000 
            settlement_min large_city
            upgrades
            {
                gm_eastern_assassins_guild
            }
        }
        gm_eastern_assassins_guild city requires factions { middle_eastern, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Hashishim"  1   0.4   3  2  requires factions { moors, egypt, turks, }  and region_religion islam 80   
            }
            material wooden
            construction  4 
            cost  6000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_masons_guild
{
    levels masons_guild m_masons_guild gm_masons_guild 
    {
        masons_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Spear Militia"  1   0.4   3  0  requires factions { england, scotland, france, hre, denmark, spain, portugal, }  and region_religion catholic 80  
                recruit_pool "Italian Spear Militia"  1   0.4   3  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 80  
                recruit_pool "EE Spear Militia"  1   0.4   3  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 80   
                recruit_pool "EE Spear Militia"  1   0.4   3  0  requires factions { poland, hungary, }  and region_religion catholic 80   
                recruit_pool "EE Spear Militia"  1   0.4   3  0  requires factions { lit, }  and region_religion pagan 80   
                recruit_pool "Arcity Spearmen"  0   0.4   3  0  requires factions { armenia, }  and region_religion orthodox 80  
                recruit_pool "Contaratoi"  1   0.4   3  0  requires factions { byzantium, }  and region_religion orthodox 80  
                recruit_pool "ME Spear Militia"  1   0.4   3  0  requires factions { moors, egypt, turks, }  and region_religion islam 80 
                recruit_pool "ME Spear Militia"  1   0.4   3  0  requires factions { mongols, }  and region_religion pagan 80 
		recruit_pool "Spear Militia"  1   0.4   3  0  requires factions { flanders, }  and region_religion catholic 80 
                recruit_pool "Peasant Spearmen"  1   0.5   4  0  requires factions { norway, }  and region_religion catholic 80 
                recruit_pool "Calivermen"  1   0.5   4  0  requires factions { ireland, }  and event_counter gunpowder_discovered 1  and region_religion catholic 80  
                construction_cost_bonus_stone bonus 20
                happiness_bonus bonus 1
            }
            material stone
            construction  2 
            cost  2000 
            settlement_min city
            upgrades
            {
                m_masons_guild
            }
        }
        m_masons_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Bill Militia"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 80   
		recruit_pool "Goedendag Militia"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 80   
                recruit_pool "Heavy Pike Militia"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 80   
                recruit_pool "Partisan Militia"  1   0.5   4  0  requires factions { france, }  and region_religion catholic 80   
                recruit_pool "Halberd Militia"  1   0.5   4  0  requires factions { hre, teutons, papal_states, sicily, poland, hungary, }  and region_religion catholic 80    
                recruit_pool "Halberd Militia"  1   0.5   4  0  requires factions { lit, }  and region_religion pagan 80    
                recruit_pool "Swordstaff Militia"  1   0.5   4  0  requires factions { denmark, norway, }  and region_religion catholic 80    
                recruit_pool "Swordsmen Militia"  1   0.5   4  0  requires factions { spain, portugal, }  and region_religion catholic 80    
                recruit_pool "Italian Spear Militia"  1   0.5   4  0  requires factions { milan, venice, }  and region_religion catholic 80    
                recruit_pool "EE Spear Militia"  1   0.5   4  0  requires factions { russia, kiev, timurids, }  and region_religion orthodox 80  
                recruit_pool "Armenianh Infantry"  1   0.5   4  0  requires factions { armenia, }  and region_religion orthodox 80 
                recruit_pool "Scoutatoi Swordsmen"  1   0.5   4  0  requires factions { byzantium, }  and region_religion orthodox 80  
                recruit_pool "Urban Militia"  1   0.5   4  0  requires factions { moors, }  and region_religion islam 80  
                recruit_pool "ME Halberd Militia"  1   0.5   4  0  requires factions { egypt, turks, }  and region_religion islam 80  
                recruit_pool "ME Spear Militia"  1   0.5   4  0  requires factions { mongols, }  and region_religion pagan 80  
		recruit_pool "Spear Militia"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 80    
                construction_cost_bonus_stone bonus 30
                happiness_bonus bonus 1
            }
            faction_capability
            {
                construction_cost_bonus_stone bonus 20
            }
            material stone
            construction  3 
            cost  4000 
            settlement_min large_city
            upgrades
            {
                gm_masons_guild
            }
        }
        gm_masons_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Heavy Bill Militia"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 80  
		recruit_pool "Armored Goedendag Militia"  1   0.5   4  0  requires factions { flanders, }  and region_religion catholic 80  
                recruit_pool "Heavy Pike Militia"  1   0.5   4  1  requires factions { scotland, } 
                recruit_pool "Pike Militia"  1   0.5   4  0  requires factions { france, hre, teutons, spain, portugal, milan, venice, papal_states, sicily, }  and region_religion catholic 80  
                recruit_pool "Swordstaff Militia"  1   0.5   4  1  requires factions { denmark, norway, }  and region_religion catholic 80  
                recruit_pool "Halberd Militia"  1   0.5   4  1  requires factions { hre, teutons, papal_states, sicily, poland, hungary, }  and region_religion catholic 80    
                recruit_pool "Halberd Militia"  1   0.5   4  1  requires factions { lit, }  and region_religion pagan 80    
                recruit_pool "Berdiche Axemen"  1   0.5   4  0  requires factions { russia, kiev, }  and region_religion orthodox 80   
                recruit_pool "Armenianh Infantry"  1   0.5   4  1  requires factions { armenia, }  and region_religion orthodox 80  
                recruit_pool "Scoutatoi Swordsmen"  1   0.5   4  1  requires factions { byzantium, }  and region_religion orthodox 80   
                recruit_pool "Urban Militia"  1   0.5   4  1  requires factions { moors, }  and region_religion islam 80   
                recruit_pool "ME Halberd Militia"  1   0.5   4  1  requires factions { egypt, turks, }  and region_religion islam 80    
                recruit_pool "ME Spear Militia"  1   0.5   4  1  requires factions { mongols, }  and region_religion pagan 80   
		recruit_pool "Flemish Pikemen"  1   0.5   4  1  requires factions { flanders, }  and region_religion catholic 80  
                construction_cost_bonus_stone bonus 40
                happiness_bonus bonus 2
            }
            faction_capability
            {
                construction_cost_bonus_stone bonus 30
            }
            material stone
            construction  4 
            cost  6000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_theologians_guild
{
    levels theologians_guild m_theologians_guild gm_theologians_guild 
    {
        theologians_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
		religion_level bonus 2
            }
            material wooden
            construction  2 
            cost  2000 
            settlement_min city
            upgrades
            {
                m_theologians_guild
            }
        }
        m_theologians_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
		religion_level bonus 4
            }
            material wooden
            construction  3 
            cost  4000 
            settlement_min large_city
            upgrades
            {
                gm_theologians_guild
            }
        }
        gm_theologians_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
		religion_level bonus 6
            }
            material wooden
            construction  4 
            cost  6000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_merchants_guild
{
    levels merchants_guild m_merchants_guild gm_merchants_guild 
    {
        merchants_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Merchant Cavalry Militia"  1   0.4   3  0  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, poland, hungary, flanders, norway, }  and region_religion catholic 80   
                recruit_pool "Merchant Cavalry Militia"  1   0.4   3  0  requires factions { lit, }  and region_religion pagan 80     
                recruit_pool "Italian Cavalry Militia"  1   0.4   3  0  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 80   
                recruit_pool "EE Cavalry Militia"  1   0.4   3  0  requires factions { russia, kiev, }  and region_religion orthodox 80    
                recruit_pool "Mounted Acritae"  1   0.4   3  0  requires factions { byzantium, }  and region_religion orthodox 80  
                recruit_pool "Arab Cavalry"  1   0.4   3  0  requires factions { moors, egypt, }  and region_religion islam 80  
                recruit_pool "Sipahis"  1   0.4   3  0  requires factions { turks, }  and region_religion islam 80  
                trade_base_income_bonus bonus 1
            }
            material wooden
            construction  2 
            cost  2000 
            settlement_min city
            upgrades
            {
                m_merchants_guild
            }
        }
        m_merchants_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Merchant Cavalry Militia"  1   0.4   3  1  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, poland, hungary, flanders, norway, }  and region_religion catholic 80   
                recruit_pool "Merchant Cavalry Militia"  1   0.4   3  1  requires factions { lit, }  and region_religion pagan 80     
                recruit_pool "Italian Cavalry Militia"  1   0.4   3  1  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 80   
                recruit_pool "EE Cavalry Militia"  1   0.4   3  1  requires factions { russia, kiev, }  and region_religion orthodox 80    
                recruit_pool "Mounted Acritae"  1   0.4   3  1  requires factions { byzantium, }  and region_religion orthodox 80  
                recruit_pool "Arab Cavalry"  1   0.4   3  1  requires factions { moors, egypt, }  and region_religion islam 80  
                recruit_pool "Sipahis"  1   0.4   3  1  requires factions { turks, }  and region_religion islam 80  
                trade_base_income_bonus bonus 2
            }
            material wooden
            construction  3 
            cost  4000
            settlement_min large_city
            upgrades
            {
                gm_merchants_guild
            }
        }
        gm_merchants_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                recruit_pool "Merchant Cavalry Militia"  1   0.5   4  2  requires factions { england, scotland, france, elo, hre, teutons, denmark, spain, portugal, poland, hungary, flanders, norway, }  and region_religion catholic 80   
                recruit_pool "Merchant Cavalry Militia"  1   0.5   4  2  requires factions { lit, }  and region_religion pagan 80     
                recruit_pool "Italian Cavalry Militia"  1   0.5   4  2  requires factions { milan, venice, papal_states, sicily, }  and region_religion catholic 80   
                recruit_pool "EE Cavalry Militia"  1   0.5   4  2  requires factions { russia, kiev, }  and region_religion orthodox 80    
                recruit_pool "Mounted Acritae"  1   0.5   4  2  requires factions { byzantium, }  and region_religion orthodox 80  
                recruit_pool "Arab Cavalry"  1   0.5   4  2  requires factions { moors, egypt, }  and region_religion islam 80  
                recruit_pool "Sipahis"  1   0.5   4  2  requires factions { turks, }  and region_religion islam 80  
                trade_base_income_bonus bonus 3
            }
            material wooden
            construction  4 
            cost  6000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_alchemists_guild
{
    levels alchemists_guild m_alchemists_guild gm_alchemists_guild 
    {
        alchemists_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                weapon_missile_gunpowder 1
                weapon_artillery_gunpowder 1
                weapon_naval_gunpowder 1  
		happiness_bonus bonus -1
		law_bonus bonus -1
		population_loyalty_bonus bonus -1
            }
            material wooden
            construction  2 
            cost  2000 
            settlement_min city
            upgrades
            {
                m_alchemists_guild
            }
        }
        m_alchemists_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                weapon_missile_gunpowder 2
                weapon_artillery_gunpowder 2
                weapon_naval_gunpowder 2  
		happiness_bonus bonus -2
		law_bonus bonus -2
		population_loyalty_bonus bonus -2
            }
            faction_capability
            {
                gun_bonus 1
            }
            material wooden
            construction  3 
            cost  4000 
            settlement_min large_city
            upgrades
            {
                gm_alchemists_guild
            }
        }
        gm_alchemists_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                weapon_missile_gunpowder 3
                weapon_artillery_gunpowder 3
                weapon_naval_gunpowder 3  
		happiness_bonus bonus -2
		law_bonus bonus -2
		population_loyalty_bonus bonus -2  
            }
            faction_capability
            {
                gun_bonus 2
            }
            material wooden
            construction  4 
            cost  6000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_thiefs_guild
{
    levels thieves_guild m_thieves_guild gm_thieves_guild 
    {
        thieves_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
            }
            material wooden
            construction  2 
            cost  2000 
            settlement_min city
            upgrades
            {
                m_thieves_guild
            }
        }
        m_thieves_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
            }
            material wooden
            construction  3 
            cost  4000
            settlement_min large_city
            upgrades
            {
                gm_thieves_guild
            }
        }
        gm_thieves_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
            }
            material wooden
            construction  4 
            cost  6000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_explorers_guild
{
    levels explorers_guild m_explorers_guild gm_explorers_guild 
    {
        explorers_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
		road_level 2
            }
            material wooden
            construction  2 
            cost  2000 
            settlement_min city
            upgrades
            {
                m_explorers_guild
            }
        }
        m_explorers_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
		road_level 2
                trade_base_income_bonus bonus 1
            }
            material wooden
            construction  3 
            cost  4000 
            settlement_min large_city
            upgrades
            {
                gm_explorers_guild
            }
        }
        gm_explorers_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
		road_level 2
                trade_base_income_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  6000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_swordsmiths_guild
{
    convert_to guild_swordsmiths_guild
    levels swordsmiths_guild m_swordsmiths_guild gm_swordsmiths_guild 
    {
        swordsmiths_guild  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 0
            capability
            {
                weapon_melee_blade 1
            }
            material wooden
            construction  2 
            cost  2000 
            settlement_min large_town
            upgrades
            {
                m_swordsmiths_guild
            }
        }
        m_swordsmiths_guild  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 1
            capability
            {
                weapon_melee_blade 2
            }
            faction_capability
            {
                heavy_cavalry_bonus bonus 1
            }
            material wooden
            construction  3 
            cost  4000 
            settlement_min city
            upgrades
            {
                gm_swordsmiths_guild
            }
        }
        gm_swordsmiths_guild  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            convert_to 2
            capability
            {
                weapon_melee_blade 3
            }
            faction_capability
            {
                heavy_cavalry_bonus bonus 1
            }
            material wooden
            construction  4 
            cost  6000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_templars_chapter_house
{
    convert_to guild_templars_chapter_house
    religion catholic
    levels templars_minor_ch templars_major_ch templars_hq 
    {
        templars_minor_ch  requires factions { england, france, elo, scotland, denmark, hungary, poland, papal_states, milan, sicily, venice, flanders, ireland, norway, }  and event_counter governor_present 1  
        {
            convert_to 0
            capability
            {
		recruit_pool "Templar Sergeant"  1   0.2   2  0  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and not event_counter tokus_end_knights_templar 1  and region_religion catholic 80     
		    trade_base_income_bonus bonus 1
                law_bonus bonus 1 
            }
            material stone
            construction  2 
            cost  2000 
            settlement_min large_town
            upgrades
            {
                templars_major_ch
            }
        }
        templars_major_ch  requires factions { england, france, elo, scotland, denmark, hungary, poland, papal_states, milan, sicily, venice, flanders, ireland,norway, }  and event_counter governor_present 1  
        {
            convert_to 1
            capability
            {
                recruit_pool "Knights Templar"  1   0.2   2  0  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and not event_counter tokus_end_knights_templar 1  and region_religion catholic 80   
		recruit_pool "Templar Sergeant"  1   0.3   3  0  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and not event_counter tokus_end_knights_templar 1  and region_religion catholic 80     
                recruit_pool "Dismounted Knights Templar"  1   0.1   1  0  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and not event_counter tokus_end_knights_templar 1  and region_religion catholic 80   
		    trade_base_income_bonus bonus 2
                law_bonus bonus 2 
            }
            material stone
            construction  3 
            cost  4000 
            settlement_min city
            upgrades
            {
                templars_hq
            }
        }
        templars_hq  requires factions { england, france, elo, scotland, denmark, hungary, poland, papal_states, milan, sicily, venice, flanders, ireland,norway, }  and event_counter governor_present 1  
        {
            convert_to 2
            capability
            {
                recruit_pool "Knights Templar"  1   0.4   4  1  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and not event_counter tokus_end_knights_templar 1  and region_religion catholic 80   
		recruit_pool "Templar Sergeant"  1   0.4   4  1  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and not event_counter tokus_end_knights_templar 1  and region_religion catholic 80     
                recruit_pool "Dismounted Knights Templar"  1   0.4   4  1  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and not event_counter tokus_end_knights_templar 1  and region_religion catholic 80   
		    trade_base_income_bonus bonus 4
                law_bonus bonus 4 
            }
            material stone
            construction  4 
            cost  8000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_st_johns_chapter_house
{
    convert_to guild_st_johns_chapter_house
    religion catholic
    levels st_johns_minor_ch st_johns_major_ch st_johns_hq 
    {
        st_johns_minor_ch  requires factions { england, france, elo, scotland, denmark, hungary, poland, papal_states, milan, sicily, venice, flanders, norway, ireland, }  and event_counter governor_present 1  
        {
            convert_to 0
            capability
            {
                recruit_pool "Dismounted Knights Hospitaller"  1   0.15   1  0  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and region_religion catholic 80    
                recruit_pool "Canons of the Holy Sepulcher"  1   0.15   1  0  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and region_religion catholic 80    
                population_health_bonus bonus 2
            }
            material stone
            construction  2 
            cost  2000 
            settlement_min large_town
            upgrades
            {
                st_johns_major_ch
            }
        }
        st_johns_major_ch  requires factions { england, france, elo, scotland, denmark, hungary, poland, papal_states, milan, sicily, venice, flanders, norway, ireland, }  and event_counter governor_present 1  
        {
            convert_to 1
            capability
            {
                recruit_pool "Canons of the Holy Sepulcher"  1   0.25   2  0  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and region_religion catholic 80    
                recruit_pool "Knights Hospitaller"  1   0.1   1  0  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and region_religion catholic 80    
		recruit_pool "Dismounted Knights Hospitaller"  1   0.25   2  0  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and region_religion catholic 80    
                population_health_bonus bonus 4
            }
            material stone
            construction  3 
            cost  4000 
            settlement_min city
            upgrades
            {
                st_johns_hq
            }
        }
        st_johns_hq  requires factions { england, france, elo, scotland, denmark, hungary, poland, papal_states, milan, sicily, venice, flanders, norway, ireland, }  and event_counter governor_present 1  
        {
            convert_to 2
            capability
            {
                recruit_pool "Canons of the Holy Sepulcher"  1   0.4   4  0  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and region_religion catholic 80    
                recruit_pool "Knights Hospitaller"  1   0.4   4  1  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and region_religion catholic 80    
		recruit_pool "Dismounted Knights Hospitaller"  1   0.4   4  1  requires factions { england, scotland, france, elo, denmark, milan, venice, papal_states, sicily, poland, hungary, flanders, norway, ireland, }  and region_religion catholic 80    
                population_health_bonus bonus 8
            }
            material stone
            construction  4 
            cost  8000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_teutonic_knights_chapter_house
{
    convert_to guild_teutonic_knights_chapter_house
    religion catholic
    levels teutonic_knights_minor_ch teutonic_knights_major_ch teutonic_knights_hq 
    {
        teutonic_knights_minor_ch  requires factions { teutons, hre, }  and event_counter governor_present 1  
        {
            convert_to 0
            capability
            {
                recruit_pool "Dismounted Halbbruder"  1   0.15   1  0  requires factions { teutons,  hre, } and region_religion catholic 80
                recruit_pool "Halbbruder"  1   0.15   1  0  requires factions { teutons,  hre, } and region_religion catholic 80
                law_bonus bonus 2 
		religion_level bonus 1
            }
            material stone
            construction  2 
            cost  2000 
            settlement_min large_town
            upgrades
            {
                teutonic_knights_major_ch
            }
        }
        teutonic_knights_major_ch  requires factions { teutons, hre, }  and event_counter governor_present 1  
        {
            convert_to 1
            capability
            {
                recruit_pool "Dismounted Halbbruder"  1   0.2   2  0  requires factions { teutons,  hre, } and region_religion catholic 80
                recruit_pool "Halbbruder"  1   0.2   2  0  requires factions { teutons,  hre, } and region_religion catholic 80
                recruit_pool "Dismounted Teutonic Knights"  1   0.1   1  0  requires factions { teutons,  hre, } and region_religion catholic 80
                recruit_pool "Teutonic Knights"  1   0.1   1  0  requires factions { teutons, hre, } and region_religion catholic 80
                law_bonus bonus 4
		religion_level bonus 2 
            }
            material stone
            construction  3 
            cost  4000 
            settlement_min large_city
            upgrades
            {
                teutonic_knights_hq
            }
        }
        teutonic_knights_hq  requires factions { teutons, hre, }  and event_counter governor_present 1  
        {
            convert_to 2
            capability
            {
                recruit_pool "Dismounted Halbbruder"  1   0.3   3  0  requires factions { teutons,  hre, } and region_religion catholic 80
                recruit_pool "Halbbruder"  1   0.3   3  0  requires factions { teutons,  hre, } and region_religion catholic 80
                recruit_pool "Dismounted Teutonic Knights"  1   0.2   2  0  requires factions { teutons,  hre, } and region_religion catholic 80
                recruit_pool "Teutonic Knights"  1   0.2   2  0  requires factions { teutons, hre, } and region_religion catholic 80
                recruit_pool "Dismounted Ritterbruder"  1   0.1   1  1  requires factions { teutons, hre, }  and region_religion catholic 80
                recruit_pool "Ritterbruder"  1   0.1   1  1  requires factions { teutons, hre, }  and region_religion catholic 80
                law_bonus bonus 6
		religion_level bonus 3
            }
            material stone
            construction  4 
            cost  8000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_knights_of_santiago_chapter_house
{
    convert_to guild_knights_of_santiago_chapter_house
    religion catholic
    levels knights_of_santiago_minor_ch knights_of_santiago_major_ch knights_of_santiago_hq 
    {
        knights_of_santiago_minor_ch  requires factions { portugal, spain, }  and event_counter governor_present 1  
        {
            convert_to 0
            capability
            {
                recruit_pool "Dismounted Knights of Santiago"  1   0.125   1  0  requires factions { spain, portugal, }  and region_religion catholic 80
                law_bonus bonus 1
                population_health_bonus bonus 1 
		religion_level bonus 1
            }
            material stone
            construction  2 
            cost  2000 
            settlement_min large_town
            upgrades
            {
                knights_of_santiago_major_ch
            }
        }
        knights_of_santiago_major_ch  requires factions { portugal, spain, }  and event_counter governor_present 1  
        {
            convert_to 1
            capability
            {
                recruit_pool "Knights of Santiago"  1   0.125   2  0  requires factions { spain, portugal, }  and region_religion catholic 80
                recruit_pool "Dismounted Knights of Santiago"  1   0.167   2  0  requires factions { spain, portugal, }  and region_religion catholic 80
                law_bonus bonus 2
                population_health_bonus bonus 2
		religion_level bonus 2
            }
            material stone
            construction  3 
            cost  4000
            settlement_min city
            upgrades
            {
                knights_of_santiago_hq
            }
        }
        knights_of_santiago_hq  requires factions { portugal, spain, }  and event_counter governor_present 1  
        {
            convert_to 2
            capability
            {
                recruit_pool "Knights of Santiago"  1   0.25   2  1  requires factions { spain, portugal, }  and region_religion catholic 80
                recruit_pool "Dismounted Knights of Santiago"  1   0.25   2  1  requires factions { spain, portugal, }  and region_religion catholic 80
                law_bonus bonus 4
                population_health_bonus bonus 4 
		religion_level bonus 3
            }
            material stone
            construction  4 
            cost  8000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_woodsmens_guild
{
    levels woodsmens_guild m_woodsmens_guild gm_woodsmens_guild 
    {
        woodsmens_guild castle requires factions { england, }  and event_counter governor_present 1  
        {
            capability
            {
                archer_bonus 1
            }
            material wooden
            construction  2 
            cost  2000 
            settlement_min large_town
            upgrades
            {
                m_woodsmens_guild
            }
        }
        m_woodsmens_guild castle requires factions { england, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Sherwood Archers"  1   0.2   2  0  requires factions { england, } 
                archer_bonus 1
            }
            faction_capability
            {
                archer_bonus 1
            }
            material wooden
            construction  3 
            cost  4000 
            settlement_min city
            upgrades
            {
                gm_woodsmens_guild
            }
        }
        gm_woodsmens_guild castle requires factions { england, }  and event_counter governor_present 1  
        {
            capability
            {
                recruit_pool "Sherwood Archers"  1   0.4   3  1  requires factions { england, } 
                archer_bonus 1
            }
            faction_capability
            {
                archer_bonus 2
            }
            material wooden
            construction  4 
            cost  6000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_horse_breeders_guild
{
    levels horse_breeders_guild m_horse_breeders_guild gm_horse_breeders_guild 
    {
        horse_breeders_guild requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                cavalry_bonus 1
            }
            material wooden
            construction  2 
            cost  2000 
            settlement_min large_town
            upgrades
            {
                m_horse_breeders_guild
            }
        }
        m_horse_breeders_guild requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                cavalry_bonus 1
            }
            faction_capability
            {
                cavalry_bonus 1
            }
            material wooden
            construction  3 
            cost  4000 
            settlement_min city
            upgrades
            {
                gm_horse_breeders_guild
            }
        }
        gm_horse_breeders_guild requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                cavalry_bonus 1
            }
            faction_capability
            {
                cavalry_bonus 2
            }
            material wooden
            construction  4 
            cost  6000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_hanseatic_guild
{
    levels hanseatic_guild 
    {
        hanseatic_guild  requires factions { norway, denmark, hre, teutons, poland, lit, russia, }  and event_counter governor_present 1
        {
            capability
            {
            }
            faction_capability
            {
                trade_base_income_bonus bonus 4
            }
            material wooden
            construction  1 
            cost  4000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building slave_market
{
    levels slave_market
    {
        slave_market city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market corn_exchange and resource slaves
        {
            capability
            {
                trade_base_income_bonus bonus 6
                happiness_bonus bonus -2
                law_bonus bonus -2
            }
            material wooden
            construction  4 
            cost  4000 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building forging_shop
{
    levels forging_shop
    {
        forging_shop city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level hinterland_mines mines and building_present_min_level smith blacksmith and resource iron or resource tin
        {
            capability
            {
                trade_base_income_bonus bonus 3
		trade_base_income_bonus bonus -3 requires event_counter tokus_negative_event_mines 1
		trade_base_income_bonus bonus 2 requires event_counter tokus_positive_event_mines 1
                weapon_melee_blade 1
            }
            material wooden
            construction  4 
            cost  4000 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building forging_shop_c
{
    convert_to forging_shop
    levels forging_shop_c
    {
        forging_shop_c castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level hinterland_castle_mines c_mines and building_present_min_level castle_smith c_blacksmith and resource iron or resource tin
        {
            convert_to 0
            capability
            {
                weapon_melee_blade 1
            }
            material wooden
            construction  4 
            cost  4000 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building mint_coin
{
    levels mint_coin
    {
        mint_coin city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and resource gold or resource silver and building_present_min_level hinterland_mines mines+1
        {
            capability
            {
                law_bonus bonus -4
            }
            faction_capability
            {
                trade_base_income_bonus bonus 4
		trade_base_income_bonus bonus -4 requires event_counter tokus_negative_event_mines 1
		trade_base_income_bonus bonus 2 requires event_counter tokus_positive_event_mines 1
            }
            material wooden
            construction  6 
            cost  8000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building jeweller_shop
{
    levels jeweller_shop
    {
        jeweller_shop city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market market and resource gold or resource silver or resource ivory or resource amber
        {
            capability
            {
                trade_base_income_bonus bonus 6
		trade_base_income_bonus bonus -6 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 4 requires event_counter tokus_positive_event_market 1
            }
            material wooden
            construction  6 
            cost  6000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building joiner_shop
{
    levels joiner_shop sawmill
    {
        joiner_shop city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market corn_exchange and resource timber
        {
            capability
            {
                trade_base_income_bonus bonus 2
		trade_base_income_bonus bonus -2 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 1 requires event_counter tokus_positive_event_market 1
		construction_cost_bonus_wooden bonus 15
                recruitment_cost_bonus_naval bonus 1
            }
            material wooden
            construction  4 
            cost  4000 
            settlement_min large_town
            upgrades
            {
		sawmill
            }
        }
        sawmill city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market market and resource timber
        {
            capability
            {
                trade_base_income_bonus bonus 4
		trade_base_income_bonus bonus -4 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 2 requires event_counter tokus_positive_event_market 1
		construction_cost_bonus_wooden bonus 30
                recruitment_cost_bonus_naval bonus 3
		retrain_cost_bonus bonus 1
            }
            material wooden
            construction  6 
            cost  6000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building joiner_shop_c
{
    convert_to joiner_shop
    levels joiner_shop_c sawmill_c
    {
        joiner_shop_c castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and resource timber
        {
            convert_to 0
            capability
            {
		construction_cost_bonus_wooden bonus 15
                recruitment_cost_bonus_naval bonus 1
                weapon_missile_mechanical 1
            }
            material wooden
            construction  4 
            cost  3000 
            settlement_min large_town
            upgrades
            {
		sawmill_c
            }
        }
        sawmill_c castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and resource timber and building_present_min_level castle_port c_port
        {
            convert_to 1
            capability
            {
		construction_cost_bonus_wooden bonus 30
                recruitment_cost_bonus_naval bonus 3
                weapon_missile_mechanical 2
		retrain_cost_bonus bonus 1
            }
            material wooden
            construction  6 
            cost  6000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building winery_guild
{
    levels vineyard winery_guild
    {
        vineyard city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market corn_exchange and resource wine
        {
            capability
            {
                trade_base_income_bonus bonus 4
		trade_base_income_bonus bonus -4 requires event_counter tokus_negative_event_agriculture 1
		trade_base_income_bonus bonus 2 requires event_counter tokus_positive_event_agriculture 1
                happiness_bonus bonus 4 requires building_present_min_level taverns inn and not factions { middle_eastern, }
		population_health_bonus bonus 2 requires factions { middle_eastern, }
		population_health_bonus bonus -2 requires building_present_min_level taverns inn and not factions { middle_eastern, greek, }

            }
            material wooden
            construction  4 
            cost  3000 
            settlement_min large_town
            upgrades
            {
		winery_guild
            }
        }
        winery_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market market and resource wine
        {
            capability
            {
                trade_base_income_bonus bonus 6
		trade_base_income_bonus bonus -6 requires event_counter tokus_negative_event_agriculture 1
		trade_base_income_bonus bonus 4 requires event_counter tokus_positive_event_agriculture 1
                happiness_bonus bonus 4 requires building_present_min_level taverns inn and not factions { middle_eastern, }
		population_health_bonus bonus 4 requires factions { middle_eastern, }
		population_health_bonus bonus 2 requires factions { greek, }
		population_health_bonus bonus -2 requires building_present_min_level taverns inn and not factions { middle_eastern, greek, }
		population_health_bonus bonus -2 requires building_present_min_level taverns tavern and not factions { middle_eastern, greek, }
            }
            material wooden
            construction  6 
            cost  6000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building textile_factory
{
    levels textile_factory
    {
        textile_factory city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market corn_exchange and resource textiles
        {
            capability
            {
                trade_base_income_bonus bonus 5
		trade_base_income_bonus bonus -5 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 4 requires event_counter tokus_positive_event_market 1
                happiness_bonus bonus 2 
            }
            material wooden
            construction  4 
            cost  3000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building cotton_factory
{
    levels cotton_factory
    {
        cotton_factory city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market market and resource cotton
        {
            capability
            {
                trade_base_income_bonus bonus 5
		trade_base_income_bonus bonus -5 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 4 requires event_counter tokus_positive_event_market 1
                happiness_bonus bonus 2 
            }
            material wooden
            construction  4 
            cost  4000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building silk_factory
{
    levels silk_factory
    {
        silk_factory city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market market and resource silk
        {
            capability
            {
                trade_base_income_bonus bonus 5
		trade_base_income_bonus bonus -5 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 4 requires event_counter tokus_positive_event_market 1
                happiness_bonus bonus 2 
            }
            material wooden
            construction  4 
            cost  6000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building fishers_quarter
{
    levels fishers_quarter
    {
        fishers_quarter city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market corn_exchange and resource fish
        {
            capability
            {
                trade_base_income_bonus bonus 3
		trade_base_income_bonus bonus -3 requires event_counter tokus_negative_event_harbour 1
		trade_base_income_bonus bonus 2 requires event_counter tokus_positive_event_harbour 1
		population_growth_bonus bonus 2 
            }
            material wooden
            construction  4 
            cost  3000 
            settlement_min town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building windmill
{
    levels windmill
    {
        windmill city requires factions { northern_european, }  and event_counter governor_present 1 and event_counter first_windmill 1 and building_present_min_level hinterland_farms farms+1 and resource grain
        {
            capability
            {
                trade_base_income_bonus bonus 2
		trade_base_income_bonus bonus -2 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 2 requires event_counter tokus_positive_event_market 1
		population_growth_bonus bonus 2 
            }
            material wooden
            construction  4 
            cost  4000 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building sugar_refinery
{
    levels sugar_refinery
    {
        sugar_refinery city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market corn_exchange and resource sugar
        {
            capability
            {
                trade_base_income_bonus bonus 3
		trade_base_income_bonus bonus -3 requires event_counter tokus_negative_event_agriculture 1
		trade_base_income_bonus bonus 2 requires event_counter tokus_positive_event_agriculture 1
            }
            material wooden
            construction  4 
            cost  4000 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building marble_workshop
{
    levels marble_workshop
    {
        marble_workshop city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market market and resource marble
        {
            capability
            {
                trade_base_income_bonus bonus 6
		trade_base_income_bonus bonus -6 requires event_counter tokus_negative_event_mines 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_mines 1
		happiness_bonus bonus 3 
            }
            material wooden
            construction  6 
            cost  6000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building wool_factory
{
    levels wool_farm wool_factory
    {
        wool_farm city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market corn_exchange and resource wool
        {
            capability
            {
                trade_base_income_bonus bonus 4
		trade_base_income_bonus bonus -4 requires event_counter tokus_negative_event_agriculture 1
		trade_base_income_bonus bonus 2 requires event_counter tokus_positive_event_agriculture 1 
            }
            material wooden
            construction  4 
            cost  3000 
            settlement_min town
            upgrades
            {
		wool_factory
            }
        }
        wool_factory city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market market and resource wool
        {
            capability
            {
                trade_base_income_bonus bonus 6 
		trade_base_income_bonus bonus -6 requires event_counter tokus_negative_event_agriculture 1
		trade_base_income_bonus bonus 4 requires event_counter tokus_positive_event_agriculture 1
            }
            material wooden
            construction  6 
            cost  6000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building hunters_hut
{
    levels hunters_hut
    {
        hunters_hut city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and resource furs
        {
            capability
            {
                trade_base_income_bonus bonus 6
		trade_base_income_bonus bonus -6 requires event_counter tokus_negative_event_agriculture 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_agriculture 1
		population_growth_bonus bonus 2 
            }
            material wooden
            construction  4 
            cost  3000 
            settlement_min town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building glass_blower
{
    levels glass_blower
    {
        glass_blower city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market market and resource camels
        {
            capability
            {
                trade_base_income_bonus bonus 6
		trade_base_income_bonus bonus -6 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_market 1
                happiness_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  5000 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building saltern
{
    levels saltern
    {
        saltern city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market corn_exchange and resource elephants
        {
            capability
            {
                trade_base_income_bonus bonus 6
		trade_base_income_bonus bonus -6 requires event_counter tokus_negative_event_market 1
		trade_base_income_bonus bonus 3 requires event_counter tokus_positive_event_market 1
            }
            material wooden
            construction  4 
            cost  4000 
            settlement_min town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building bakery
{
    levels bakery
    {
        bakery city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and building_present_min_level market market and building_present_min_level windmill windmill and resource grain
        {
            capability
            {
                trade_base_income_bonus bonus 2 requires event_counter kivals_summer 1
                trade_base_income_bonus bonus 4 requires event_counter kivals_winter 1
		population_growth_bonus bonus 2
		happiness_bonus bonus 1
            }
            material wooden
            construction  4 
            cost  5000 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building brewery
{
    levels brewery
    {
        brewery city requires factions { northern_european, eastern_european, southern_european, greek, }  and event_counter governor_present 1 and resource grain
        {
            capability
            {
		happiness_bonus bonus 2
		population_health_bonus bonus -2 requires building_present_min_level taverns tavern and not factions { middle_eastern, greek, }
            }
            material wooden
            construction  4 
            cost  5000 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_velnias
{
    religion pagan 	
    levels temple_velnias m_temple_velnias gm_temple_velnias 
    {
        temple_velnias requires factions { lit, mongols, }  and event_counter governor_present 1  
        {
            capability
            {
                agent priest  0  requires factions { lit, mongols, }   
		religion_level bonus 5
                agent_limit priest 1
                law_bonus bonus 2
            }
            material wooden
            construction  2 
            cost  1000 
            settlement_min town
            upgrades
            {
                m_temple_velnias
            }
        }
        m_temple_velnias requires factions { lit, mongols, }  and event_counter governor_present 1  
        {
            capability
            {
                agent priest  1  requires factions { lit, mongols, }        
		religion_level bonus 6
                agent_limit priest 2
                law_bonus bonus 3
                weapon_melee_blade 1
            }
            material wooden
            construction  4 
            cost  3000 
            settlement_min large_town
            upgrades
            {
                gm_temple_velnias
            }
        }
        gm_temple_velnias requires factions { lit, mongols, }  and event_counter governor_present 1  
        {
            capability
            {
                agent priest  2  requires factions { lit, mongols, }           
                religion_level bonus 8
                agent_limit priest 3 
                law_bonus bonus 5
                weapon_melee_blade 2
            }
            material wooden
            construction  8 
            cost  8000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building synagogue
{
    religion judaism
    levels synagogue m_synagogue
    {
        synagogue city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                happiness_bonus bonus -4
                law_bonus bonus -4
		religion_level bonus 1
                population_health_bonus bonus 1
                trade_base_income_bonus bonus 1
		religion_level bonus 3  requires factions { byzantium, }  and event_counter introduction_byzantium 1
		religion_level bonus 3  requires factions { denmark, }  and event_counter introduction_denmark 1
		religion_level bonus 3  requires factions { egypt, }  and event_counter introduction_egypt 1
		religion_level bonus 3  requires factions { england, }  and event_counter introduction_england 1
		religion_level bonus 3  requires factions { france, }  and event_counter introduction_france 1
		religion_level bonus 3  requires factions { hre, }  and event_counter introduction_hre 1
		religion_level bonus 3  requires factions { hungary, }  and event_counter introduction_hungary 1
		religion_level bonus 3  requires factions { milan, }  and event_counter introduction_milan 1
		religion_level bonus 3  requires factions { mongols, }  and event_counter introduction_mongols 1
		religion_level bonus 3  requires factions { moors, }  and event_counter introduction_moors 1
		religion_level bonus 3  requires factions { papal_states, }  and event_counter introduction_papal_states 1
		religion_level bonus 3  requires factions { poland, }  and event_counter introduction_poland 1
		religion_level bonus 3  requires factions { portugal, }  and event_counter introduction_portugal 1
		religion_level bonus 3  requires factions { russia, }  and event_counter introduction_russia 1
		religion_level bonus 3  requires factions { kiev, }  and event_counter introduction_kiev 1
		religion_level bonus 3  requires factions { scotland, }  and event_counter introduction_scotland 1
		religion_level bonus 3  requires factions { sicily, }  and event_counter introduction_sicily 1
		religion_level bonus 3  requires factions { venice, }  and event_counter introduction_venice 1
		religion_level bonus 3  requires factions { spain, }  and event_counter introduction_spain 1
		religion_level bonus 3  requires factions { turks, }  and event_counter introduction_turks 1
		religion_level bonus 3  requires factions { flanders, }  and event_counter introduction_flanders 1
		religion_level bonus 3  requires factions { ireland, }  and event_counter introduction_ireland 1
		religion_level bonus 3  requires factions { lit, }  and event_counter introduction_lit 1
		religion_level bonus 3  requires factions { teutons, }  and event_counter introduction_teutons 1
		religion_level bonus 3  requires factions { elo, }  and event_counter introduction_elo 1
		religion_level bonus 3  requires factions { armenia, }  and event_counter introduction_armenia 1
		religion_level bonus 3  requires factions { norway, }  and event_counter introduction_norway 1
		religion_level bonus 3  requires factions { timurids, }  and event_counter introduction_georgia 1
		religion_level bonus 3  requires factions { hedjaz, }  and event_counter introduction_hedjaz 1
		law_bonus bonus 4  requires factions { byzantium, }  and not event_counter introduction_byzantium 1
		law_bonus bonus 4  requires factions { denmark, }  and not event_counter introduction_denmark 1
		law_bonus bonus 4  requires factions { egypt, }  and not event_counter introduction_egypt 1
		law_bonus bonus 4  requires factions { england, }  and not event_counter introduction_england 1
		law_bonus bonus 4  requires factions { france, }  and not event_counter introduction_france 1
		law_bonus bonus 4  requires factions { hre, }  and not event_counter introduction_hre 1
		law_bonus bonus 4  requires factions { hungary, }  and not event_counter introduction_hungary 1
		law_bonus bonus 4  requires factions { milan, }  and not event_counter introduction_milan 1
		law_bonus bonus 4  requires factions { mongols, }  and not event_counter introduction_mongols 1
		law_bonus bonus 4  requires factions { moors, }  and not event_counter introduction_moors 1
		law_bonus bonus 4  requires factions { papal_states, }  and not event_counter introduction_papal_states 1
		law_bonus bonus 4  requires factions { poland, }  and not event_counter introduction_poland 1
		law_bonus bonus 4  requires factions { portugal, }  and not event_counter introduction_portugal 1
		law_bonus bonus 4  requires factions { russia, }  and not event_counter introduction_russia 1
		law_bonus bonus 4  requires factions { kiev, }  and not event_counter introduction_kiev 1
		law_bonus bonus 4  requires factions { scotland, }  and not event_counter introduction_scotland 1
		law_bonus bonus 4  requires factions { sicily, }  and not event_counter introduction_sicily 1
		law_bonus bonus 4  requires factions { venice, }  and not event_counter introduction_venice 1
		law_bonus bonus 4  requires factions { spain, }  and not event_counter introduction_spain 1
		law_bonus bonus 4  requires factions { turks, }  and not event_counter introduction_turks 1
		law_bonus bonus 4  requires factions { flanders, }  and not event_counter introduction_flanders 1
		law_bonus bonus 4  requires factions { ireland, }  and not event_counter introduction_ireland 1
		law_bonus bonus 4  requires factions { lit, }  and not event_counter introduction_lit 1
		law_bonus bonus 4  requires factions { teutons, }  and not event_counter introduction_teutons 1
		law_bonus bonus 4  requires factions { elo, }  and not event_counter introduction_elo 1
		law_bonus bonus 4  requires factions { armenia, }  and not event_counter introduction_armenia 1
		law_bonus bonus 4  requires factions { norway, }  and not event_counter introduction_norway 1
		law_bonus bonus 4  requires factions { timurids, }  and not event_counter introduction_georgia 1
		law_bonus bonus 4  requires factions { hedjaz, }  and not event_counter introduction_hedjaz 1
		happiness_bonus bonus 4  requires factions { byzantium, }  and not event_counter introduction_byzantium 1
		happiness_bonus bonus 4  requires factions { denmark, }  and not event_counter introduction_denmark 1
		happiness_bonus bonus 4  requires factions { egypt, }  and not event_counter introduction_egypt 1
		happiness_bonus bonus 4  requires factions { england, }  and not event_counter introduction_england 1
		happiness_bonus bonus 4  requires factions { france, }  and not event_counter introduction_france 1
		happiness_bonus bonus 4  requires factions { hre, }  and not event_counter introduction_hre 1
		happiness_bonus bonus 4  requires factions { hungary, }  and not event_counter introduction_hungary 1
		happiness_bonus bonus 4  requires factions { milan, }  and not event_counter introduction_milan 1
		happiness_bonus bonus 4  requires factions { mongols, }  and not event_counter introduction_mongols 1
		happiness_bonus bonus 4  requires factions { moors, }  and not event_counter introduction_moors 1
		happiness_bonus bonus 4  requires factions { papal_states, }  and not event_counter introduction_papal_states 1
		happiness_bonus bonus 4  requires factions { poland, }  and not event_counter introduction_poland 1
		happiness_bonus bonus 4  requires factions { portugal, }  and not event_counter introduction_portugal 1
		happiness_bonus bonus 4  requires factions { russia, }  and not event_counter introduction_russia 1
		happiness_bonus bonus 4  requires factions { kiev, }  and not event_counter introduction_kiev 1
		happiness_bonus bonus 4  requires factions { scotland, }  and not event_counter introduction_scotland 1
		happiness_bonus bonus 4  requires factions { sicily, }  and not event_counter introduction_sicily 1
		happiness_bonus bonus 4  requires factions { venice, }  and not event_counter introduction_venice 1
		happiness_bonus bonus 4  requires factions { spain, }  and not event_counter introduction_spain 1
		happiness_bonus bonus 4  requires factions { turks, }  and not event_counter introduction_turks 1
		happiness_bonus bonus 4  requires factions { flanders, }  and not event_counter introduction_flanders 1
		happiness_bonus bonus 4  requires factions { ireland, }  and not event_counter introduction_ireland 1
		happiness_bonus bonus 4  requires factions { lit, }  and not event_counter introduction_lit 1
		happiness_bonus bonus 4  requires factions { teutons, }  and not event_counter introduction_teutons 1
		happiness_bonus bonus 4  requires factions { elo, }  and not event_counter introduction_elo 1
		happiness_bonus bonus 4  requires factions { armenia, }  and not event_counter introduction_armenia 1
		happiness_bonus bonus 4  requires factions { norway, }  and not event_counter introduction_norway 1
		happiness_bonus bonus 4  requires factions { timurids, }  and not event_counter introduction_georgia 1
		happiness_bonus bonus 4  requires factions { hedjaz, }  and not event_counter introduction_hedjaz 1
            }
            material wooden
            construction  2 
            cost  1500 
            settlement_min town
            upgrades
            {
                m_synagogue
            }
        }
        m_synagogue city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 
        {
            capability
            {
                happiness_bonus bonus -6
                law_bonus bonus -6
		religion_level bonus 2
           	population_health_bonus bonus 2
                trade_base_income_bonus bonus 2
		religion_level bonus 4  requires factions { byzantium, }  and event_counter introduction_byzantium 1
		religion_level bonus 4  requires factions { denmark, }  and event_counter introduction_denmark 1
		religion_level bonus 4  requires factions { egypt, }  and event_counter introduction_egypt 1
		religion_level bonus 4  requires factions { england, }  and event_counter introduction_england 1
		religion_level bonus 4  requires factions { france, }  and event_counter introduction_france 1
		religion_level bonus 4  requires factions { hre, }  and event_counter introduction_hre 1
		religion_level bonus 4  requires factions { hungary, }  and event_counter introduction_hungary 1
		religion_level bonus 4  requires factions { milan, }  and event_counter introduction_milan 1
		religion_level bonus 4  requires factions { mongols, }  and event_counter introduction_mongols 1
		religion_level bonus 4  requires factions { moors, }  and event_counter introduction_moors 1
		religion_level bonus 4  requires factions { papal_states, }  and event_counter introduction_papal_states 1
		religion_level bonus 4  requires factions { poland, }  and event_counter introduction_poland 1
		religion_level bonus 4  requires factions { portugal, }  and event_counter introduction_portugal 1
		religion_level bonus 4  requires factions { russia, }  and event_counter introduction_russia 1
		religion_level bonus 4  requires factions { kiev, }  and event_counter introduction_kiev 1
		religion_level bonus 4  requires factions { scotland, }  and event_counter introduction_scotland 1
		religion_level bonus 4  requires factions { sicily, }  and event_counter introduction_sicily 1
		religion_level bonus 4  requires factions { venice, }  and event_counter introduction_venice 1
		religion_level bonus 4  requires factions { spain, }  and event_counter introduction_spain 1
		religion_level bonus 4  requires factions { turks, }  and event_counter introduction_turks 1
		religion_level bonus 4  requires factions { flanders, }  and event_counter introduction_flanders 1
		religion_level bonus 4  requires factions { ireland, }  and event_counter introduction_ireland 1
		religion_level bonus 4  requires factions { lit, }  and event_counter introduction_lit 1
		religion_level bonus 4  requires factions { teutons, }  and event_counter introduction_teutons 1
		religion_level bonus 4  requires factions { elo, }  and event_counter introduction_elo 1
		religion_level bonus 4  requires factions { armenia, }  and event_counter introduction_armenia 1
		religion_level bonus 4  requires factions { norway, }  and event_counter introduction_norway 1
		religion_level bonus 4  requires factions { timurids, }  and event_counter introduction_georgia 1
		religion_level bonus 4  requires factions { hedjaz, }  and event_counter introduction_hedjaz 1
		law_bonus bonus 6  requires factions { byzantium, }  and not event_counter introduction_byzantium 1
		law_bonus bonus 6  requires factions { denmark, }  and not event_counter introduction_denmark 1
		law_bonus bonus 6  requires factions { egypt, }  and not event_counter introduction_egypt 1
		law_bonus bonus 6  requires factions { england, }  and not event_counter introduction_england 1
		law_bonus bonus 6  requires factions { france, }  and not event_counter introduction_france 1
		law_bonus bonus 6  requires factions { hre, }  and not event_counter introduction_hre 1
		law_bonus bonus 6  requires factions { hungary, }  and not event_counter introduction_hungary 1
		law_bonus bonus 6  requires factions { milan, }  and not event_counter introduction_milan 1
		law_bonus bonus 6  requires factions { mongols, }  and not event_counter introduction_mongols 1
		law_bonus bonus 6  requires factions { moors, }  and not event_counter introduction_moors 1
		law_bonus bonus 6  requires factions { papal_states, }  and not event_counter introduction_papal_states 1
		law_bonus bonus 6  requires factions { poland, }  and not event_counter introduction_poland 1
		law_bonus bonus 6  requires factions { portugal, }  and not event_counter introduction_portugal 1
		law_bonus bonus 6  requires factions { russia, }  and not event_counter introduction_russia 1
		law_bonus bonus 6  requires factions { kiev, }  and not event_counter introduction_kiev 1
		law_bonus bonus 6  requires factions { scotland, }  and not event_counter introduction_scotland 1
		law_bonus bonus 6  requires factions { sicily, }  and not event_counter introduction_sicily 1
		law_bonus bonus 6  requires factions { venice, }  and not event_counter introduction_venice 1
		law_bonus bonus 6  requires factions { spain, }  and not event_counter introduction_spain 1
		law_bonus bonus 6  requires factions { turks, }  and not event_counter introduction_turks 1
		law_bonus bonus 6  requires factions { flanders, }  and not event_counter introduction_flanders 1
		law_bonus bonus 6  requires factions { ireland, }  and not event_counter introduction_ireland 1
		law_bonus bonus 6  requires factions { lit, }  and not event_counter introduction_lit 1
		law_bonus bonus 6  requires factions { teutons, }  and not event_counter introduction_teutons 1
		law_bonus bonus 6  requires factions { elo, }  and not event_counter introduction_elo 1
		law_bonus bonus 6  requires factions { armenia, }  and not event_counter introduction_armenia 1
		law_bonus bonus 6  requires factions { norway, }  and not event_counter introduction_norway 1
		law_bonus bonus 6  requires factions { timurids, }  and not event_counter introduction_georgia 1
		law_bonus bonus 6  requires factions { hedjaz, }  and not event_counter introduction_hedjaz 1
		happiness_bonus bonus 6  requires factions { byzantium, }  and not event_counter introduction_byzantium 1
		happiness_bonus bonus 6  requires factions { denmark, }  and not event_counter introduction_denmark 1
		happiness_bonus bonus 6  requires factions { egypt, }  and not event_counter introduction_egypt 1
		happiness_bonus bonus 6  requires factions { england, }  and not event_counter introduction_england 1
		happiness_bonus bonus 6  requires factions { france, }  and not event_counter introduction_france 1
		happiness_bonus bonus 6  requires factions { hre, }  and not event_counter introduction_hre 1
		happiness_bonus bonus 6  requires factions { hungary, }  and not event_counter introduction_hungary 1
		happiness_bonus bonus 6  requires factions { milan, }  and not event_counter introduction_milan 1
		happiness_bonus bonus 6  requires factions { mongols, }  and not event_counter introduction_mongols 1
		happiness_bonus bonus 6  requires factions { moors, }  and not event_counter introduction_moors 1
		happiness_bonus bonus 6  requires factions { papal_states, }  and not event_counter introduction_papal_states 1
		happiness_bonus bonus 6  requires factions { poland, }  and not event_counter introduction_poland 1
		happiness_bonus bonus 6  requires factions { portugal, }  and not event_counter introduction_portugal 1
		happiness_bonus bonus 6  requires factions { russia, }  and not event_counter introduction_russia 1
		happiness_bonus bonus 6  requires factions { kiev, }  and not event_counter introduction_kiev 1
		happiness_bonus bonus 6  requires factions { scotland, }  and not event_counter introduction_scotland 1
		happiness_bonus bonus 6  requires factions { sicily, }  and not event_counter introduction_sicily 1
		happiness_bonus bonus 6  requires factions { venice, }  and not event_counter introduction_venice 1
		happiness_bonus bonus 6  requires factions { spain, }  and not event_counter introduction_spain 1
		happiness_bonus bonus 6  requires factions { turks, }  and not event_counter introduction_turks 1
		happiness_bonus bonus 6  requires factions { flanders, }  and not event_counter introduction_flanders 1
		happiness_bonus bonus 6  requires factions { ireland, }  and not event_counter introduction_ireland 1
		happiness_bonus bonus 6  requires factions { lit, }  and not event_counter introduction_lit 1
		happiness_bonus bonus 6  requires factions { teutons, }  and not event_counter introduction_teutons 1
		happiness_bonus bonus 6  requires factions { elo, }  and not event_counter introduction_elo 1
		happiness_bonus bonus 6  requires factions { armenia, }  and not event_counter introduction_armenia 1
		happiness_bonus bonus 6  requires factions { norway, }  and not event_counter introduction_norway 1
		happiness_bonus bonus 6  requires factions { timurids, }  and not event_counter introduction_georgia 1
		happiness_bonus bonus 6  requires factions { hedjaz, }  and not event_counter introduction_hedjaz 1
            }
            material wooden
            construction  4 
            cost  3000 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building aztec_aqueduct
{
    religion pagan
    levels aztec_aqueduct 
    {
        aztec_aqueduct city requires factions { aztecs, } 
        {
            capability
            {
                population_health_bonus bonus 2
                population_growth_bonus bonus 1
            }
            material stone
            construction  3 
            cost  1600 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building chultun
{
    religion pagan
    levels chultun 
    {
        chultun city requires factions { aztecs, } 
        {
            capability
            {
                population_health_bonus bonus 2
                population_growth_bonus bonus 1
            }
            material stone
            construction  3 
            cost  1600 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building observatory
{
    religion pagan
    levels observatory 
    {
        observatory city requires factions { aztecs, } 
        {
            capability
            {
                religion_level bonus 1
                agent_limit priest 1
            }
            material stone
            construction  3 
            cost  1600 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building meso_market
{
    religion pagan
    levels marketplace plaza great_plaza 
    {
        marketplace city requires factions { mesoamerican, } 
        {
            capability
            {
                trade_base_income_bonus bonus 1
            }
            material wooden
            construction  3 
            cost  1200 
            settlement_min town
            upgrades
            {
                plaza
            }
        }
        plaza city requires factions { mesoamerican, } 
        {
            capability
            { 
                trade_base_income_bonus bonus 2
                population_growth_bonus bonus 1
            }
            material stone
            construction  6 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                great_plaza
            }
        }
        great_plaza city requires factions { mesoamerican, } 
        {
            capability
            {
                agent merchant  0  requires factions { mesoamerican, } 
                trade_base_income_bonus bonus 3
                population_growth_bonus bonus 2
		agent_limit merchant 1
            }
            material stone
            construction  8 
            cost  4800 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building meso_palace
{
    religion pagan
    levels palace palace_complex acropolis 
    {
        palace city requires factions { mesoamerican, } 
        {
            capability
            {
                agent diplomat  0  requires factions { mesoamerican, } 
                agent spy  0  requires factions { mesoamerican, } 
                recruit_pool "Aztec Archers"  1   0.5   4  0  requires factions { aztecs, } 
                law_bonus bonus 1
		agent_limit diplomat 1
		agent_limit spy 1
            }
            material stone
            construction  3 
            cost  2000 
            settlement_min town
            upgrades
            {
                palace_complex
            }
        }
        palace_complex city requires factions { mesoamerican, } 
        {
            capability
            {
                agent diplomat  0  requires factions { mesoamerican, } 
                agent spy  0  requires factions { mesoamerican, } 
                agent assassin  0  requires factions { mesoamerican, } 
                recruit_pool "Aztec Archers"  1   0.7   6  0  requires factions { aztecs, } 
                recruit_pool "Aztec Spear Throwers"  1   0.5   4  0  requires factions { aztecs, }  
                population_health_bonus bonus 1
                population_growth_bonus bonus 1
		agent_limit diplomat 1
		agent_limit spy 1
		agent_limit assassin 1
                law_bonus bonus 2
            }
            material stone
            construction  6 
            cost  3000 
            settlement_min large_town
            upgrades
            {
                acropolis
            }
        }
        acropolis city requires factions { mesoamerican, } 
        {
            capability
            {
                agent diplomat  0  requires factions { mesoamerican, } 
                agent spy   0  requires factions { mesoamerican, } 
                agent assassin  0  requires factions { mesoamerican, } 
                recruit_pool "Aztec Archers"  1   1   9  0  requires factions { aztecs, } 
                recruit_pool "Aztec Spear Throwers"  1   0.7   6  0  requires factions { aztecs, } 
                population_health_bonus bonus 2
                population_growth_bonus bonus 1
		agent_limit diplomat 2
		agent_limit spy 2
		agent_limit assassin 2
                law_bonus bonus 3
                archer_bonus 1
            }
            material stone
            construction  8 
            cost  5000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_pagan
{
    religion pagan
    levels pyramid great_pyramid high_temple 
    {
        pyramid city requires factions { mesoamerican, } 
        {
            capability
            {
                agent priest  0  requires factions { mesoamerican, } 
                recruit_pool "Aztec Spearmen"  1   0.5   4  0  requires factions { aztecs, } 
                religion_level bonus 1
                law_bonus bonus 1
                agent_limit priest 1
                happiness_bonus bonus 1
            }
            material stone
            construction  2 
            cost  2000 
            settlement_min town
            upgrades
            {
                great_pyramid
            }
        }
        great_pyramid city requires factions { mesoamerican, } 
        {
            capability
            {
                agent priest  0  requires factions { mesoamerican, } 
                recruit_pool "Aztec Spearmen"  1   0.7   6  0  requires factions { aztecs, }  
                recruit_pool "Aztec Warriors"  1   0.5   4  0  requires factions { aztecs, } 
                recruit_pool "Coyote Priests"  1   0.5   4  0  requires factions { aztecs, } 
                religion_level bonus 2
                law_bonus bonus 1
                agent_limit priest 1
                happiness_bonus bonus 2
            }
            material stone
            construction  6 
            cost  3000 
            settlement_min large_town
            upgrades
            {
                high_temple
            }
        }
        high_temple city requires factions { mesoamerican, } 
        {
            capability
            {
                agent priest  0  requires factions { mesoamerican, } 
                recruit_pool "Aztec Spearmen"  1   1   9  0  requires factions { aztecs, }  
                recruit_pool "Aztec Warriors"  1   0.7   6  0  requires factions { aztecs, } 
                recruit_pool "Coyote Priests"  1   0.7   6  0  requires factions { aztecs, } 
                recruit_pool "Cuahchiqueh"  1   0.5   4  0  requires factions { aztecs, } 
                religion_level bonus 3
                law_bonus bonus 2
                agent_limit priest 1
                happiness_bonus bonus 3
            }
            material stone
            construction  8 
            cost  5000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temazcal
{
    religion pagan
    levels temazcal 
    {
        temazcal city requires factions { mesoamerican, }  and building_present_min_level temple_pagan pyramid
        {
            capability
            {
                population_health_bonus bonus 1
                happiness_bonus bonus 1
                religion_level bonus 1
            }
            material stone
            construction  2 
            cost  1000 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building ball_court
{
    religion pagan
    levels ball_court great_ball_court 
    {
        ball_court city requires factions { mesoamerican, }  and building_present_min_level temple_pagan pyramid
        {
            capability
            {
                recruit_pool "Eagle Warriors"  1   0.5   4  0  requires factions { aztecs, } 
                happiness_bonus bonus 1
                armour 1
                religion_level bonus 1
            }
            material stone
            construction  3 
            cost  1600 
            settlement_min large_town
            upgrades
            {
                great_ball_court
            }
        }
        great_ball_court city requires factions { mesoamerican, } 
        {
            capability
            {
                recruit_pool "Eagle Warriors"  1   0.7   6  0  requires factions { aztecs, } 
                recruit_pool "Jaguar Warriors"  1   0.5   4  0  requires factions { aztecs, } 
                happiness_bonus bonus 2
                armour 1
                religion_level bonus 2
            }
            material stone
            construction  8 
            cost  3000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building skull_rack
{
    religion pagan
    levels skull_rack 
    {
        skull_rack city requires factions { aztecs, }  and building_present_min_level ball_court ball_court
        {
            capability
            {
                recruit_pool "Arrow Warriors"  1   0.5   4  0  requires factions { aztecs, } 
                religion_level bonus 1
                happiness_bonus bonus 1
            }
            material stone
            construction  3 
            cost  1600 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building mayan_farms
{
    religion pagan
    levels forest_gardens wild_harvesting raised_fields managed_fallows 
    {
        forest_gardens city requires factions { aztecs, } 
        {
            capability
            {
                farming_level 1
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min village
            upgrades
            {
                wild_harvesting
            }
        }
        wild_harvesting city requires factions { aztecs, } 
        {
            capability
            {
                farming_level 2
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min town
            upgrades
            {
                raised_fields
            }
        }
        raised_fields city requires factions { aztecs, } 
        {
            capability
            {
                farming_level 3
            }
            material wooden
            construction  6 
            cost  4800 
            settlement_min large_town
            upgrades
            {
                managed_fallows
            }
        }
        managed_fallows city requires factions { aztecs, } 
        {
            capability
            {
                farming_level 4
            }
            material wooden
            construction  8
            cost  6800 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building ordo_dominicana
{
    religion catholic
    levels hermit_dom monast_dom abbey_dom
    {
        hermit_dom city requires factions { northern_european, southern_european, poland, hungary, }  and event_counter governor_present 1 and event_counter tokus_dominican_order 1 and not building_present_min_level ordo_franciscana hermit_franc 
        {
            capability
            {
                religion_level bonus 5
		happiness_bonus bonus -1
		law_bonus bonus 1
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                monast_dom
            }
        }
        monast_dom city requires factions { northern_european, southern_european, poland, hungary, }  and event_counter governor_present 1 and event_counter tokus_dominican_order 1 and not building_present_min_level ordo_franciscana hermit_franc  
        {
            capability
            {
                retrain_cost_bonus bonus 2
                religion_level bonus 10
                agent priest  2  requires factions { northern_european, southern_european, poland, hungary, } 
                agent_limit priest 2
		happiness_bonus bonus -2
		law_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min city
            upgrades
            {
                abbey_dom
            }
        }
        abbey_dom city requires factions { northern_european, southern_european, poland, hungary, }  and event_counter governor_present 1 and event_counter tokus_dominican_order 1 and not building_present_min_level ordo_franciscana hermit_franc   
        {
            capability
            {
                retrain_cost_bonus bonus 3
                religion_level bonus 15
                agent priest  3  requires factions { northern_european, southern_european, poland, hungary, } 
                agent_limit priest 2
		happiness_bonus bonus -3
		law_bonus bonus 3
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building ordo_franciscana
{
    religion catholic
    levels hermit_franc monast_franc abbey_franc
    {
        hermit_franc city requires factions { northern_european, southern_european, poland, hungary, }  and event_counter governor_present 1 and event_counter tokus_franciscan_order 1  and not building_present_min_level ordo_dominicana hermit_dom
        {
            capability
            {
                religion_level bonus 10
		happiness_bonus bonus 1
		law_bonus bonus -1
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                monast_franc
            }
        }
        monast_franc city requires factions { northern_european, southern_european, poland, hungary, }  and event_counter governor_present 1 and event_counter tokus_franciscan_order 1 and not building_present_min_level ordo_dominicana hermit_dom  
        {
            capability
            {
                religion_level bonus 15
                agent priest  2  requires factions { northern_european, southern_european, poland, hungary, } 
                agent_limit priest 2
		happiness_bonus bonus 2
		law_bonus bonus -2
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min city
            upgrades
            {
                abbey_franc
            }
        }
        abbey_franc city requires factions { northern_european, southern_european, poland, hungary, }  and event_counter governor_present 1 and event_counter tokus_franciscan_order 1 and not building_present_min_level ordo_dominicana hermit_dom  
        {
            capability
            {
                religion_level bonus 20
                agent priest  3  requires factions { northern_european, southern_european, poland, hungary, } 
                agent_limit priest 2
		happiness_bonus bonus 3
		law_bonus bonus -3
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building ordo_anchorit
{
    religion orthodox
    levels hermit_anchorit monast_anchorit abbey_anchorit
    {
        hermit_anchorit city requires factions { russia, kiev, greek, armenia, timurids, }  and event_counter governor_present 1  and not building_present_min_level ordo_cenobit hermit_cenobit
        {
            capability
            {
                religion_level bonus 10
		happiness_bonus bonus 1
		law_bonus bonus -1
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                monast_anchorit
            }
        }
        monast_anchorit city requires factions { russia, kiev, greek, armenia, timurids, }  and event_counter governor_present 1 and not building_present_min_level ordo_cenobit hermit_cenobit  
        {
            capability
            {
                religion_level bonus 15
                agent priest  2  requires factions { russia, kiev, greek, armenia, timurids, } 
                agent_limit priest 2
		happiness_bonus bonus 2
		law_bonus bonus -2
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min city
            upgrades
            {
                abbey_anchorit
            }
        }
        abbey_anchorit city requires factions { russia, kiev, greek, armenia, timurids, }  and event_counter governor_present 1 and not building_present_min_level ordo_cenobit hermit_cenobit  
        {
            capability
            {
                religion_level bonus 20
                agent priest  3  requires factions { russia, kiev, greek, armenia, timurids, } 
                agent_limit priest 2
		happiness_bonus bonus 3
		law_bonus bonus -3
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building ordo_cenobit
{
    religion orthodox
    levels hermit_cenobit monast_cenobit abbey_cenobit
    {
        hermit_cenobit city requires factions { russia, kiev, greek, armenia, timurids, }  and event_counter governor_present 1  and not building_present_min_level ordo_anchorit hermit_anchorit
        {
            capability
            {
                religion_level bonus 5
		happiness_bonus bonus -1
		law_bonus bonus 1
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                monast_cenobit
            }
        }
        monast_cenobit city requires factions { russia, kiev, greek, armenia, timurids, }  and event_counter governor_present 1  and not building_present_min_level ordo_anchorit hermit_anchorit
        {
            capability
            {
                retrain_cost_bonus bonus 2
                religion_level bonus 10
                agent priest  2  requires factions { russia, kiev, greek, armenia, timurids, } 
                agent_limit priest 2
		happiness_bonus bonus -2
		law_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min city
            upgrades
            {
                abbey_cenobit
            }
        }
        abbey_cenobit city requires factions { russia, kiev, greek, armenia, timurids, }  and event_counter governor_present 1  and not building_present_min_level ordo_anchorit hermit_anchorit
        {
            capability
            {
                retrain_cost_bonus bonus 3
                religion_level bonus 15
                agent priest  3  requires factions { russia, kiev, greek, armenia, timurids, } 
                agent_limit priest 2
		happiness_bonus bonus -3
		law_bonus bonus 3
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building ordo_sufi
{
    religion islam
    levels hermit_sufi monast_sufi abbey_sufi
    {
        hermit_sufi city requires factions { moors, egypt, turks, hedjaz, }  and event_counter governor_present 1  and not building_present_min_level ordo_sunnit hermit_sunnit
        {
            capability
            {
                religion_level bonus 10
		happiness_bonus bonus 1
		law_bonus bonus -1
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                monast_sufi
            }
        }
        monast_sufi city requires factions { moors, egypt, turks, hedjaz, }  and event_counter governor_present 1 and not building_present_min_level ordo_sunnit hermit_sunnit  
        {
            capability
            {
                religion_level bonus 15
                agent priest  2  requires factions { moors, egypt, turks, hedjaz, } 
                agent_limit priest 2
		happiness_bonus bonus 2
		law_bonus bonus -2
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min city
            upgrades
            {
                abbey_sufi
            }
        }
        abbey_sufi city requires factions { moors, egypt, turks, hedjaz, }  and event_counter governor_present 1 and not building_present_min_level ordo_sunnit hermit_sunnit  
        {
            capability
            {
                religion_level bonus 20
                agent priest  3  requires factions { moors, egypt, turks, hedjaz, } 
                agent_limit priest 2
		happiness_bonus bonus 3
		law_bonus bonus -3
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building ordo_sunnit
{
    religion islam
    levels hermit_sunnit monast_sunnit abbey_sunnit
    {
        hermit_sunnit city requires factions { moors, egypt, turks, hedjaz, }  and event_counter governor_present 1  and not building_present_min_level ordo_sufi hermit_sufi
        {
            capability
            {
                religion_level bonus 5
		happiness_bonus bonus -1
		law_bonus bonus 1
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                monast_sunnit
            }
        }
        monast_sunnit city requires factions { moors, egypt, turks, hedjaz, }  and event_counter governor_present 1  and not building_present_min_level ordo_sufi hermit_sufi
        {
            capability
            {
                retrain_cost_bonus bonus 2
                religion_level bonus 10
                agent priest  2  requires factions { moors, egypt, turks, hedjaz, } 
                agent_limit priest 2
		happiness_bonus bonus -2
		law_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min city
            upgrades
            {
                abbey_sunnit
            }
        }
        abbey_sunnit city requires factions { moors, egypt, turks, hedjaz, }  and event_counter governor_present 1  and not building_present_min_level ordo_sufi hermit_sufi
        {
            capability
            {
                retrain_cost_bonus bonus 3
                religion_level bonus 15
                agent priest  3  requires factions { moors, egypt, turks, hedjaz, } 
                agent_limit priest 2
		happiness_bonus bonus -3
		law_bonus bonus 3
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building punishment
{
    levels dungeon execution torture
    {
        dungeon city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and hidden_resource metropolis
        {
            capability
            {
		happiness_bonus bonus -1
		law_bonus bonus 1
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                execution
            }
        }
        execution city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and hidden_resource metropolis
        {
            capability
            {
		happiness_bonus bonus -2
		law_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min city
            upgrades
            {
                torture
            }
        }
        torture city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1 and hidden_resource metropolis
        {
            capability
            {
		happiness_bonus bonus -3
		law_bonus bonus 3
            }
            material wooden
            construction  8 
            cost  4800 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building education
{
    levels scholarium university 
    {
        scholarium city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1
        {
            capability
            {
                happiness_bonus bonus 1
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                university
            }
        }
        university city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and hidden_resource metropolis 
        {
            capability
            {
                happiness_bonus bonus 2
            }
            material wooden
            construction  6 
            cost  4800 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building mercenary_camp
{
    levels camp merc_quarter merc_barracks
    {
        camp castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and hidden_resource metropolis  or building_present_min_level castle_port c_port
        {
            capability
            {
		law_bonus bonus -1
		population_loyalty_bonus bonus -1
		recruit_pool "Ghazis"  2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc1 1
;		recruit_pool "Turkomans Mercs"  2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc1 1
		recruit_pool "Armenian Archers"  2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc2 1
;		recruit_pool "Armenian Cavalry"  2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc2 1
		recruit_pool "Dismounted Frankish Knights"  2   1   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc3 1
;		recruit_pool "Mercenary Knights"  2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc3 1
		recruit_pool "Swiss Pikemen Mercs"  2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc4 1
;		recruit_pool "Condottieri"  2   2   2  0  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc4 1
;		recruit_pool "Bulgarian Brigands Mercs"  2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc5 1
		recruit_pool "Slav Mercenaries"  2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc5 1
;		recruit_pool "Welsh Longbowmen Mercs"  2   1   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc6 1
		recruit_pool "Galloglaich Mercs" 2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc6 1
		recruit_pool "Cuman Horse Archers"  2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc7 1
;		recruit_pool "Alan Light Cavalry"  2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc7 1
;		recruit_pool "Landschneckt Pikemen"  2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc8 1
		recruit_pool "Mercenary German Knights"  2   2   2  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc8 1
            }
            material wooden
            construction  2 
            cost  2400 
            settlement_min town
            upgrades
            {
		merc_quarter
            }
        }
        merc_quarter castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and hidden_resource metropolis  or building_present_min_level castle_port c_shipwright
        {
            capability
            {
		law_bonus bonus -1
		population_loyalty_bonus bonus -2
		recruit_pool "Ghazis"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc1 1
		recruit_pool "Turkomans Mercs"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc1 1
		recruit_pool "Armenian Archers"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc2 1
		recruit_pool "Armenian Cavalry"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc2 1
		recruit_pool "Dismounted Frankish Knights"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc3 1
		recruit_pool "Mercenary Knights"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc3 1
		recruit_pool "Swiss Pikemen Mercs"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc4 1
		recruit_pool "Condottieri"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc4 1
		recruit_pool "Bulgarian Brigands Mercs"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc5 1
		recruit_pool "Slav Mercenaries"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc5 1
		recruit_pool "Welsh Longbowmen Mercs"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc6 1
		recruit_pool "Galloglaich Mercs"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc6 1
		recruit_pool "Cuman Horse Archers"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc7 1
		recruit_pool "Alan Light Cavalry"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc7 1
		recruit_pool "Landschneckt Pikemen"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc8 1
		recruit_pool "Mercenary German Knights"  1   1   1  1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc8 1
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min large_town
            upgrades
            {
		merc_barracks
            }
        }
        merc_barracks castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter governor_present 1  and hidden_resource metropolis  or building_present_min_level castle_port c_dockyard
        {
            capability
            {
		law_bonus bonus -2
		population_loyalty_bonus bonus -2
		recruit_pool "Ghazis"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc1 1
		recruit_pool "Turkomans Mercs"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc1 1
		recruit_pool "Armenian Archers"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc2 1
		recruit_pool "Armenian Cavalry"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc2 1
		recruit_pool "Dismounted Frankish Knights"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc3 1
		recruit_pool "Mercenary Knights"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc3 1
		recruit_pool "Swiss Pikemen Mercs"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc4 1
		recruit_pool "Condottieri"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc4 1
		recruit_pool "Bulgarian Brigands Mercs"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc5 1
		recruit_pool "Slav Mercenaries"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc5 1
		recruit_pool "Welsh Longbowmen Mercs"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc6 1
		recruit_pool "Galloglaich Mercs"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc6 1
		recruit_pool "Cuman Horse Archers"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc7 1
		recruit_pool "Alan Light Cavalry"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc7 1
		recruit_pool "Landschneckt Pikemen"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc8 1
		recruit_pool "Mercenary German Knights"  2   2   2  2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter merc8 1
            }
            material wooden
            construction  6 
            cost  6400 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building london1
{
    levels tower1
    {
        tower1 city requires factions { northern_european, southern_european, }  and event_counter governor_present 1  and event_counter wonder 1  and hidden_resource rlondon1
        {
            capability
            {
		happiness_bonus bonus 1
		law_bonus bonus 1
            }
            material wooden
            construction  12 
            cost  14400 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building jerusalem2
{
    levels dome_rock
    {
        dome_rock city requires factions { middle_eastern, northern_european, southern_european, }  and event_counter governor_present 1  and event_counter wonder 1  and hidden_resource rjerusalem2
        {
            capability
            {
                happiness_bonus bonus 1
		law_bonus bonus 1
            }
            material wooden
            construction  12 
            cost  14400 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building constantinople3
{
    levels hagia_sophia
    {
        hagia_sophia city requires factions { greek, northern_european, southern_european, eastern_european, }  and event_counter governor_present 1  and event_counter wonder 1  and hidden_resource rconstantinople3
        {
            capability
            {
                happiness_bonus bonus 1
                law_bonus bonus 1
            }
            material wooden
            construction  12 
            cost  14400 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
} 
building baghdad4
{
    levels bayt_al_hikma
    {
        bayt_al_hikma city requires factions { eastern_european, northern_european, middle_eastern, greek, southern_european, }  and event_counter governor_present 1  and  event_counter wonder 1  and hidden_resource rbaghdad4
        {
            capability
            {
                happiness_bonus bonus 1
                law_bonus bonus 1  
                trade_base_income_bonus bonus 1
            }
            material wooden
            construction  12 
            cost  14400
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building mekka5
{
    religion islam
    levels kaaba
    {
       kaaba city requires factions { middle_eastern, }  and event_counter governor_present 1  and event_counter wonder 1  and hidden_resource rmekka5
        {
            capability
            {
                happiness_bonus bonus 1
                trade_base_income_bonus bonus 1
                religion_level bonus 1
            }
            material wooden
            construction  12 
            cost  14400
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building venecia6
{
    levels palazzo_ducale
    {
        palazzo_ducale city requires factions { northern_european, southern_european, }  and event_counter governor_present 1  and event_counter wonder 1  and hidden_resource rvenecia6
        {
            capability
            {
                happiness_bonus bonus 1
                law_bonus bonus 2
            }
            material wooden
            construction  12 
            cost  14400
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building paris7
{
    religion catholic
    levels notre_dame
    {
        notre_dame city requires factions { northern_european, southern_european, }  and event_counter governor_present 1  and event_counter wonder 1  and hidden_resource rparis7
        {
            capability
            {
                happiness_bonus bonus 1
                religion_level bonus 1
            }
            material wooden
            construction  12 
            cost  12000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building cordoba8
{
    religion islam
    levels cordoba_mosque
    {
        cordoba_mosque city requires factions { middle_eastern, }  and event_counter governor_present 1  and event_counter wonder 1  and hidden_resource rcordoba8
        {
            capability
            {
                happiness_bonus bonus 1
                religion_level bonus 1
            }
            material wooden
            construction  12 
            cost  12000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building frankfurt9
{
    levels roemer
    {
        roemer city requires factions { northern_european, southern_european, }  and event_counter governor_present 1  and event_counter wonder 1  and hidden_resource rfrankfurt9
        {
            capability
            {
                happiness_bonus bonus 1
               	trade_base_income_bonus bonus 1
                law_bonus bonus 1
            }
            material wooden
            construction  12 
            cost  12000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building moscow10
{
    religion orthodox
    levels kremlin
    {
        kremlin city requires factions { eastern_european, greek, }  and event_counter governor_present 1  and event_counter wonder 1  and hidden_resource rmoscow10
        {
            capability
            {
                law_bonus bonus 1
                religion_level bonus 1
            }
            material wooden
            construction  12 
            cost  12000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}

building convert_to_castle
{
    convert_to convert_to_city
    levels village_to_wooden_castle small_town_to_stone_keep large_town_to_castle 
    {
        village_to_wooden_castle city requires factions { denmark, hre, scotland, france, england, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 0
            capability
            {
            }
            material wooden
            construction  1 
            cost  800 
            settlement_min village
            upgrades
            {
                small_town_to_stone_keep
            }
        }
        small_town_to_stone_keep city requires factions { denmark, hre, scotland, france, england, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
            }
            material wooden
            construction  1 
            cost  1600 
            settlement_min town
            upgrades
            {
                large_town_to_castle
            }
        }
        large_town_to_castle city requires factions { denmark, hre, scotland, france, england, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 2
            capability
            {
            }
            material wooden
            construction  2 
            cost  3200 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building convert_to_city
{
    convert_to convert_to_castle
    levels wooden_castle_to_village stone_keep_to_small_town castle_to_large_town large_castle_to_city fortress_to_city 
    {
        wooden_castle_to_village castle requires factions { denmark, hre, scotland, france, england, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 0
            capability
            {
            }
            material wooden
            construction  1 
            cost  800 
            settlement_min village
            upgrades
            {
                stone_keep_to_small_town
            }
        }
        stone_keep_to_small_town castle requires factions { denmark, hre, scotland, france, england, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
            }
            material wooden
            construction  1 
            cost  1200 
            settlement_min town
            upgrades
            {
                castle_to_large_town
            }
        }
        castle_to_large_town castle requires factions { denmark, hre, scotland, france, england, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 2
            capability
            {
            }
            material wooden
            construction  2 
            cost  1600 
            settlement_min large_town
            upgrades
            {
                large_castle_to_city
            }
        }
        large_castle_to_city castle requires factions { denmark, hre, scotland, france, england, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
            }
            material wooden
            construction  2 
            cost  3200 
            settlement_min city
            upgrades
            {
                fortress_to_city
            }
        }
        fortress_to_city castle requires factions { denmark, hre, scotland, france, england, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
            }
            material wooden
            construction  3 
            cost  6400 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
