;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

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
            {
                recruit_pool "Highland Pikemen Mercs"  1   0.2   2  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 20
                recruit_pool "Billmen Mercs"  1   0.2   2  0  requires factions { scotland, }  and region_religion catholic 20
                recruit_pool "Scouts Mercs"  1   0.2   2  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 20
                recruit_pool "Billmen Mercs"  1   0.2   2  0  requires factions { norway, }  and region_religion catholic 20
                recruit_pool "Welsh Skirmishers Mercs"  1   0.2   2  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 20
                recruit_pool "Billmen Mercs"  1   0.2   2  0  requires factions { Wales, }  and region_religion catholic 20
                recruit_pool "Irish Kerns Mercs"  1   0.2   2  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 20
                recruit_pool "Billmen Mercs"  1   0.2   2  0  requires factions { Ireland, }  and region_religion catholic 20
                wall_level 0
                tower_level 1
                free_upkeep bonus 2
                happiness_bonus bonus 1
                recruitment_slots 1
            }
            material wooden
            construction  2 
            cost  600 
            settlement_min village
            upgrades
            {
                wooden_wall
            }
        }
        wooden_wall city requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 2
            capability
            {
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Ceitherne"  1   0.2   2  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Welsh Militiamen"  1   0.2   2  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Highland Pikemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 20
                recruit_pool "Border Horse Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 40
                recruit_pool "Scouts Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 20
                recruit_pool "Norse Archers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 40
                recruit_pool "Welsh Skirmishers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 20
                recruit_pool "Welsh Hunters Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 40
                recruit_pool "Irish Kerns Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 20
                recruit_pool "Horseboys Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 40
                wall_level 1
                gate_strength 1
                tower_level 1
                free_upkeep bonus 3
                happiness_bonus bonus 1
                recruitment_slots 2
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min town
            upgrades
            {
                stone_wall
            }
        }
        stone_wall city requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Ceitherne"  1   0.2   2  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Welsh Militiamen"  1   0.2   2  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 15
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 15
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 15
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Deisi Javelinmen"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 15
                recruit_pool "Highland Pikemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 20
                recruit_pool "Border Horse Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 40
                recruit_pool "Highland Archers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 50
                recruit_pool "Scouts Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 20
                recruit_pool "Norse Archers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 40
                recruit_pool "Viking Raiders Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 50
                recruit_pool "Welsh Skirmishers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 20
                recruit_pool "Welsh Hunters Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 40
                recruit_pool "Welsh Axemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 50
                recruit_pool "Irish Kerns Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 20
                recruit_pool "Horseboys Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 40
                recruit_pool "Galloglaich Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 50
                wall_level 2
                tower_level 1
                gate_strength 1
                gate_defences 2
                free_upkeep bonus 4
                happiness_bonus bonus 1
                recruitment_slots 2
            }
            material stone
            construction  3 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                large_stone_wall
            }
        }
        large_stone_wall city requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Ceitherne"  1   0.2   2  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Welsh Militiamen"  1   0.2   2  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 15
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 15
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 15
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Deisi Javelinmen"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 15
                recruit_pool "Archer Militia"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Archer Militia"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Scots Pike Militia"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 10
                recruit_pool "Crossbow Militia"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 10
                recruit_pool "Saighdeoir"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 10
                recruit_pool "Helwyr"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Highland Pikemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 20
                recruit_pool "Border Horse Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 40
                recruit_pool "Highland Archers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 50
                recruit_pool "Highland Swordsmen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 70
                recruit_pool "Armored Sergeants Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 70
                recruit_pool "Scouts Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 20
                recruit_pool "Norse Archers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 40
                recruit_pool "Viking Raiders Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 50
                recruit_pool "Norse Axemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 70
                recruit_pool "Armored Sergeants Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 70
                recruit_pool "Welsh Skirmishers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 20
                recruit_pool "Welsh Hunters Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 40
                recruit_pool "Welsh Axemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 50
                recruit_pool "Welsh Longbowmen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 70
                recruit_pool "Armored Sergeants Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 70
                recruit_pool "Irish Kerns Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 20
                recruit_pool "Horseboys Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 40
                recruit_pool "Galloglaich Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 50
                recruit_pool "Calivermen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and event_counter gunpowder_discovered 1  and region_religion irish 70
                recruit_pool "Armored Sergeants Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 70
                wall_level 3
                tower_level 1
                gate_strength 2
                gate_defences 2
                free_upkeep bonus 5
                happiness_bonus bonus 2
                recruitment_slots 3
            }
            material stone
            construction  3 
            cost  4800 
            settlement_min city
            upgrades
            {
                huge_stone_wall
            }
        }
        huge_stone_wall city requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Ceitherne"  1   0.2   2  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Welsh Militiamen"  1   0.2   2  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 15
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 15
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 15
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Deisi Javelinmen"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 15
                recruit_pool "Archer Militia"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Archer Militia"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Scots Pike Militia"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 10
                recruit_pool "Crossbow Militia"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 10
                recruit_pool "Saighdeoir"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 10
                recruit_pool "Helwyr"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Highland Pikemen Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 20
                recruit_pool "Billmen Mercs"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 20
                recruit_pool "Border Horse Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 40
                recruit_pool "Highland Archers Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 50
                recruit_pool "Mailed Knights Mercs"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 50
                recruit_pool "Highland Swordsmen Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 70
                recruit_pool "Armored Sergeants Mercs"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 70
                recruit_pool "Scouts Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 20
                recruit_pool "Billmen Mercs"  1   0.5   4  0  requires factions { norway, }  and region_religion catholic 20
                recruit_pool "Norse Archers Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 40
                recruit_pool "Heavy Billmen Mercs"  1   0.5   4  0  requires factions { norway, }  and region_religion catholic 40
                recruit_pool "Viking Raiders Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 50
                recruit_pool "Mailed Knights Mercs"  1   0.5   4  0  requires factions { norway, }  and region_religion catholic 50
                recruit_pool "Norse Axemen Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 70
                recruit_pool "Armored Sergeants Mercs"  1   0.5   4  0  requires factions { norway, }  and region_religion catholic 70
                recruit_pool "Welsh Skirmishers Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 20
                recruit_pool "Billmen Mercs"  1   0.5   4  0  requires factions { Wales, }  and region_religion catholic 20
                recruit_pool "Welsh Hunters Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 40
                recruit_pool "Heavy Billmen Mercs"  1   0.5   4  0  requires factions { Wales, }  and region_religion catholic 40
                recruit_pool "Welsh Axemen Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 50
                recruit_pool "Mailed Knights Mercs"  1   0.5   4  0  requires factions { Wales, }  and region_religion catholic 50
                recruit_pool "Welsh Longbowmen Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 70
                recruit_pool "Armored Sergeants Mercs"  1   0.5   4  0  requires factions { Wales, }  and region_religion catholic 70
                recruit_pool "Irish Kerns Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 20
                recruit_pool "Billmen Mercs"  1   0.5   4  0  requires factions { Ireland, }  and region_religion catholic 20
                recruit_pool "Horseboys Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.5   4  0  requires factions { Ireland, }  and region_religion catholic 40
                recruit_pool "Galloglaich Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 50
                recruit_pool "Mailed Knights Mercs"  1   0.5   4  0  requires factions { Ireland, }  and region_religion catholic 50
                recruit_pool "Calivermen Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and event_counter gunpowder_discovered 1  and region_religion irish 70
                recruit_pool "Armored Sergeants Mercs"  1   0.5   4  0  requires factions { Ireland, }  and region_religion catholic 70
                recruit_pool "Noble Pikemen"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 70
                wall_level 4
                tower_level 1
                gate_strength 2
                gate_defences 2
                free_upkeep bonus 6
                happiness_bonus bonus 3
                recruitment_slots 3
            }
            material stone
            construction  4 
            cost  9600 
            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, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Hobilars"  1   0.2   2  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Hobilars"  1   0.2   2  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Border Horse"  1   0.2   2  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "Viking Raiders"  1   0.2   2  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Horseboys"  1   0.2   2  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "Gwent Raiders"  1   0.2   2  0  requires factions { Wales, }  and region_religion welsh 30
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Highland Rabble"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Highland Pikemen Mercs"  1   0.2   2  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 20
                recruit_pool "Billmen Mercs"  1   0.2   2  0  requires factions { scotland, }  and region_religion catholic 20
                recruit_pool "Scouts Mercs"  1   0.2   2  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 20
                recruit_pool "Billmen Mercs"  1   0.2   2  0  requires factions { norway, }  and region_religion catholic 20
                recruit_pool "Welsh Skirmishers Mercs"  1   0.2   2  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 20
                recruit_pool "Billmen Mercs"  1   0.2   2  0  requires factions { Wales, }  and region_religion catholic 20
                recruit_pool "Irish Kerns Mercs"  1   0.2   2  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 20
                recruit_pool "Billmen Mercs"  1   0.2   2  0  requires factions { Ireland, }  and region_religion catholic 20
                wall_level 0
                tower_level 1
                law_bonus bonus 1
                recruitment_slots 1
            }
            material wooden
            construction  2 
            cost  600 
            settlement_min village
            upgrades
            {
                wooden_castle
            }
        }
        wooden_castle castle requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 0
            capability
            {
                recruit_pool "Highland Pikemen"  1   0.2   2  0  requires factions { scotland, }  and region_religion scottish 30
                recruit_pool "Viking Raiders"  1   0.2   2  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Gwent Raiders"  1   0.2   2  0  requires factions { Wales, }  and region_religion welsh 30
                recruit_pool "Hobilars"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Hobilars"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Border Horse"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "Horseboys"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "Meirionnydd Spearmen"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 35
                recruit_pool "Levy Spearmen"  1   0.2   2  0  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Levy Spearmen"  1   0.2   2  0  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Highland Rabble"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Highland Pikemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 20
                recruit_pool "Border Horse Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 40
                recruit_pool "Scouts Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 20
                recruit_pool "Norse Archers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 40
                recruit_pool "Welsh Skirmishers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 20
                recruit_pool "Welsh Hunters Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 40
                recruit_pool "Irish Kerns Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 20
                recruit_pool "Horseboys Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 40
                wall_level 1
                gate_strength 1
                tower_level 1
                free_upkeep bonus 1
                law_bonus bonus 2
                recruitment_slots 2
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min village
            upgrades
            {
                castle
            }
        }
        castle castle requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
                recruit_pool "Hobilars"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Hobilars"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Highland Pikemen"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 30
                recruit_pool "Dismounted Huscarls"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "Horseboys"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "Gwent Raiders"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 30
                recruit_pool "Viking Raiders"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Armored Sergeants"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Armored Sergeants"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Border Horse"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "Ridire"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 60
                recruit_pool "Meirionnydd Spearmen"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 35
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Highland Rabble"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Highland Pikemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 20
                recruit_pool "Border Horse Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 40
                recruit_pool "Highland Archers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 50
                recruit_pool "Highland Swordsmen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 70
                recruit_pool "Armored Sergeants Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 70
                recruit_pool "Scouts Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 20
                recruit_pool "Norse Archers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 40
                recruit_pool "Viking Raiders Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 50
                recruit_pool "Norse Axemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 70
                recruit_pool "Armored Sergeants Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 70
                recruit_pool "Welsh Skirmishers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 20
                recruit_pool "Welsh Hunters Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 40
                recruit_pool "Welsh Axemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 50
                recruit_pool "Welsh Longbowmen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 70
                recruit_pool "Armored Sergeants Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 70
                recruit_pool "Irish Kerns Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 20
                recruit_pool "Horseboys Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 40
                recruit_pool "Galloglaich Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 50
                recruit_pool "Calivermen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and event_counter gunpowder_discovered 1  and region_religion irish 70
                recruit_pool "Armored Sergeants Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 70
                wall_level 2
                tower_level 1
                gate_strength 1
                gate_defences 2
                law_bonus bonus 3
                recruitment_slots 3
            }
            material stone
            construction  3 
            cost  2400 
            settlement_min town
            upgrades
            {
                fortress
            }
        }
        fortress castle requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 2
            capability
            {
                recruit_pool "Dismounted Huscarls"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "Horseboys"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "Gwent Raiders"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 30
                recruit_pool "Viking Raiders"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Hobilars"  1   0.2   2  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Hobilars"  1   0.2   2  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Noble Pikemen"  1   0.2   2  0  requires factions { scotland, }  and region_religion scottish 70
                recruit_pool "Meirionnydd Spearmen"  1   0.2   2  0  requires factions { Wales, }  and region_religion welsh 35
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Highland Rabble"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Levy Spearmen"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Levy Spearmen"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Highlanders"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 15
                recruit_pool "Viking Raiders"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Ostmen"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Welsh Skirmishers"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Peasant Archers"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasant Archers"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Peasant Archers"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasant Archers"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Saighdeoir"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 10
                recruit_pool "Helwyr"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Armored Sergeants"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Armored Sergeants"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Highland Pikemen"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 30
                recruit_pool "Ridire"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 60
                recruit_pool "Dismounted Feudal Knights"  1   0.2   2  0  requires factions { england, }  and region_religion catholic 70
                recruit_pool "Dismounted Feudal Knights"  1   0.2   2  0  requires factions { barons_alliance, }  and region_religion catholic 70
                recruit_pool "Dismounted Chivalric Knights"  1   0.2   2  0  requires factions { norway, }  and region_religion norwegian 85
                recruit_pool "Muire"  1   0.2   2  0  requires factions { Ireland, }  and region_religion irish 70
                recruit_pool "Rhyfelwyr"  1   0.2   2  0  requires factions { Wales, }  and region_religion welsh 55
                recruit_pool "Border Horse"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "Highland Pikemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 20
                recruit_pool "Border Horse Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 40
                recruit_pool "Highland Archers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 50
                recruit_pool "Highland Swordsmen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 70
                recruit_pool "Armored Sergeants Mercs"  1   0.4   3  0  requires factions { scotland, }  and region_religion catholic 70
                recruit_pool "Scouts Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 20
                recruit_pool "Norse Archers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 40
                recruit_pool "Viking Raiders Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 50
                recruit_pool "Norse Axemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 70
                recruit_pool "Armored Sergeants Mercs"  1   0.4   3  0  requires factions { norway, }  and region_religion catholic 70
                recruit_pool "Welsh Skirmishers Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 20
                recruit_pool "Welsh Hunters Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 40
                recruit_pool "Welsh Axemen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 50
                recruit_pool "Welsh Longbowmen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 70
                recruit_pool "Armored Sergeants Mercs"  1   0.4   3  0  requires factions { Wales, }  and region_religion catholic 70
                recruit_pool "Irish Kerns Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 20
                recruit_pool "Billmen Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 20
                recruit_pool "Horseboys Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 40
                recruit_pool "Galloglaich Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 50
                recruit_pool "Mailed Knights Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 50
                recruit_pool "Calivermen Mercs"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and event_counter gunpowder_discovered 1  and region_religion irish 70
                recruit_pool "Armored Sergeants Mercs"  1   0.4   3  0  requires factions { Ireland, }  and region_religion catholic 70
                wall_level 3
                tower_level 1
                gate_strength 2
                gate_defences 2
                law_bonus bonus 4
                recruitment_slots 3
            }
            material stone
            construction  3 
            cost  4800 
            settlement_min large_town
            upgrades
            {
                citadel
            }
        }
        citadel castle requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 2
            capability
            {
                recruit_pool "Dismounted Huscarls"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "Horseboys"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "Gwent Raiders"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 30
                recruit_pool "Noble Swordsmen"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 60
                recruit_pool "Viking Raiders"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Noble Pikemen"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 70
                recruit_pool "Ridire"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 60
                recruit_pool "Meirionnydd Spearmen"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 35
                recruit_pool "Hobilars"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Hobilars"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Border Horse"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "Mathrafal Horsemen"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Highland Rabble"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Levy Spearmen"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Levy Spearmen"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Highlanders"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 15
                recruit_pool "Viking Raiders"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Ostmen"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Welsh Skirmishers"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Peasant Archers"  0   0.000001   0.999  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasant Archers"  0   0.000001   0.999  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Peasant Archers"  0   0.000001   0.999  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasant Archers"  0   0.000001   0.999  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Saighdeoir"  0   0.000001   0.999  0  requires factions { Ireland, }  and region_religion irish 10
                recruit_pool "Helwyr"  0   0.000001   0.999  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Armored Sergeants"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Armored Sergeants"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Highland Pikemen"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 30
                recruit_pool "Dismounted English Knights"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 85
                recruit_pool "Dismounted English Knights"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 85
                recruit_pool "Dismounted Feudal Knights"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 65
                recruit_pool "Dismounted Chivalric Knights"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 85
                recruit_pool "Muire"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 70
                recruit_pool "Rhyfelwyr"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 55
                recruit_pool "Welsh Skirmishers"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Highland Pikemen Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 20
                recruit_pool "Billmen Mercs"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 20
                recruit_pool "Border Horse Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 40
                recruit_pool "Highland Archers Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 50
                recruit_pool "Mailed Knights Mercs"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 50
                recruit_pool "Highland Swordsmen Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, norway, Ireland, Wales, }  and region_religion scottish 70
                recruit_pool "Armored Sergeants Mercs"  1   0.5   4  0  requires factions { scotland, }  and region_religion catholic 70
                recruit_pool "Scouts Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 20
                recruit_pool "Billmen Mercs"  1   0.5   4  0  requires factions { norway, }  and region_religion catholic 20
                recruit_pool "Norse Archers Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 40
                recruit_pool "Heavy Billmen Mercs"  1   0.5   4  0  requires factions { norway, }  and region_religion catholic 40
                recruit_pool "Viking Raiders Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 50
                recruit_pool "Mailed Knights Mercs"  1   0.5   4  0  requires factions { norway, }  and region_religion catholic 50
                recruit_pool "Norse Axemen Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, Ireland, Wales, }  and region_religion norwegian 70
                recruit_pool "Armored Sergeants Mercs"  1   0.5   4  0  requires factions { norway, }  and region_religion catholic 70
                recruit_pool "Welsh Skirmishers Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 20
                recruit_pool "Billmen Mercs"  1   0.5   4  0  requires factions { Wales, }  and region_religion catholic 20
                recruit_pool "Welsh Hunters Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 40
                recruit_pool "Heavy Billmen Mercs"  1   0.5   4  0  requires factions { Wales, }  and region_religion catholic 40
                recruit_pool "Welsh Axemen Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 50
                recruit_pool "Mailed Knights Mercs"  1   0.5   4  0  requires factions { Wales, }  and region_religion catholic 50
                recruit_pool "Welsh Longbowmen Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Ireland, }  and region_religion welsh 70
                recruit_pool "Armored Sergeants Mercs"  1   0.5   4  0  requires factions { Wales, }  and region_religion catholic 70
                recruit_pool "Irish Kerns Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 20
                recruit_pool "Billmen Mercs"  1   0.5   4  0  requires factions { Ireland, }  and region_religion catholic 20
                recruit_pool "Horseboys Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 40
                recruit_pool "Heavy Billmen Mercs"  1   0.5   4  0  requires factions { Ireland, }  and region_religion catholic 40
                recruit_pool "Galloglaich Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and region_religion irish 50
                recruit_pool "Mailed Knights Mercs"  1   0.5   4  0  requires factions { Ireland, }  and region_religion catholic 50
                recruit_pool "Calivermen Mercs"  1   0.5   4  0  requires factions { england, barons_alliance, scotland, norway, Wales, }  and event_counter gunpowder_discovered 1  and region_religion irish 70
                recruit_pool "Armored Sergeants Mercs"  1   0.5   4  0  requires factions { Ireland, }  and region_religion catholic 70
                wall_level 4
                tower_level 1
                gate_strength 2
                gate_defences 2
                law_bonus bonus 5
                recruitment_slots 3
            }
            material stone
            construction  4 
            cost  9600 
            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, } 
        {
            convert_to 0
            capability
            {
                tower_level 2
            }
            material stone
            construction  3 
            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 gunpowder_discovered 1 
        {
            convert_to 1
            capability
            {
                tower_level 3
            }
            material stone
            construction  4 
            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, } 
        {
            convert_to 0
            capability
            {
                tower_level 2
            }
            material stone
            construction  3 
            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 gunpowder_discovered 1 
        {
            convert_to 1
            capability
            {
                tower_level 3
            }
            material stone
            construction  4 
            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, } 
        {
            capability
            {
                recruit_pool "Hobilars"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Hobilars"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Border Horse"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "Hobiguir"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 50
                recruit_pool "Svenner"  1   0.2   2  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "Mathrafal Horsemen"  1   0.2   2  0  requires factions { Wales, }  and region_religion welsh 40
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min town
            upgrades
            {
                knights_stables
            }
        }
        knights_stables castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Mailed Knights"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 65
                recruit_pool "Mailed Knights"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 65
                recruit_pool "Mailed Knights"  1   0.5   4  0  requires factions { scotland, }  and region_religion scottish 65
                recruit_pool "Huscarls"  1   0.2   2  0  requires factions { norway, }  and region_religion norwegian 70
                recruit_pool "Ridire"  1   0.2   2  0  requires factions { Ireland, }  and region_religion irish 60
                recruit_pool "Mailed Knights"  1   0.2   2  0  requires factions { Wales, }  and region_religion welsh 65
                recruit_pool "Svenner"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "Mathrafal Horsemen"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "Hobilars"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Hobilars"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Border Horse"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "Hobiguir"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 50
            }
            material wooden
            construction  3 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                barons_stables
            }
        }
        barons_stables castle requires factions {  barons_alliance,  norway, ireland, wales, scotland, denmark, hre, france, england, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Feudal Knights"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 70
                recruit_pool "Feudal Knights"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 70
                recruit_pool "Feudal Knights"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 70
                recruit_pool "Feudal Knights"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 70
                recruit_pool "Ridire"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 60
                recruit_pool "Mailed Knights"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 65
                recruit_pool "Mailed Knights"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 65
                recruit_pool "Mailed Knights"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 65
                recruit_pool "Mailed Knights"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 65
                recruit_pool "Huscarls"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 70
                recruit_pool "Horseboys"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "Teulu Skirmishers"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 70
                recruit_pool "Svenner"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "Mathrafal Horsemen"  1   0.4   3  1  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "Hobilars"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Hobilars"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Border Horse"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "Hobiguir"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 50
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min city
            upgrades
            {
                earls_stables
            }
        }
        earls_stables castle requires factions {  barons_alliance, norway, ireland, wales, scotland, denmark, hre, france, england, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Teulu"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 75
                recruit_pool "English Knights"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 85
                recruit_pool "English Knights"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 85
                recruit_pool "Chivalric Knights"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 80
                recruit_pool "Lords Retinue"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 80
                recruit_pool "Feudal Knights"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 70
                recruit_pool "Feudal Knights"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 70
                recruit_pool "Feudal Knights"  1   0.5   4  1  requires factions { scotland, }  and region_religion scottish 70
                recruit_pool "Feudal Knights"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 70
                recruit_pool "Ridire"  1   0.5   4  0  requires factions { Ireland, }  and region_religion irish 60
                recruit_pool "Mailed Knights"  1   0.5   4  0  requires factions { Wales, }  and region_religion welsh 65
                recruit_pool "Horseboys"  1   0.5   4  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 65
                recruit_pool "Teulu Skirmishers"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 70
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 65
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 65
                recruit_pool "Border Horse"  1   0.7   6  1  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "Huscarls"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 70
                recruit_pool "Mathrafal Horsemen"  1   0.5   4  1  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "Svenner"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "Hobilars"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Hobilars"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Hobiguir"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 50
                recruit_pool "Mounted Calivermen"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 85 and event_counter gunpowder_discovered 1 
            }
            material wooden
            construction  5 
            cost  9600 
            settlement_min large_city
            upgrades
            {
                kings_stables
            }
        }
        kings_stables castle requires factions {  barons_alliance, norway, wales, ireland, denmark, scotland, england, hre, france, middle_eastern, eastern_european, greek, venice, } 
        {
            capability
            {
                recruit_pool "English Knights"  1   0.5   4  1  requires factions { england, }  and region_religion catholic 85
                recruit_pool "English Knights"  1   0.5   4  1  requires factions { barons_alliance, }  and region_religion catholic 85
                recruit_pool "Lords Retinue"  1   0.5   4  1  requires factions { Ireland, }  and region_religion irish 80
                recruit_pool "Feudal Knights"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 70
                recruit_pool "Feudal Knights"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 70
                recruit_pool "Ridire"  1   0.5   4  1  requires factions { Ireland, }  and region_religion irish 60
                recruit_pool "Teulu"  1   0.5   4  1  requires factions { Wales, }  and region_religion welsh 75
                recruit_pool "Horseboys"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 65
                recruit_pool "Chivalric Knights"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 80
                recruit_pool "Feudal Knights"  1   0.7   6  1  requires factions { scotland, }  and region_religion scottish 70
                recruit_pool "Mailed Knights"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 65
                recruit_pool "Mailed Knights"  1   0.7   6  1  requires factions { barons_alliance, }  and region_religion catholic 65
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 65
                recruit_pool "Teulu Skirmishers"  1   0.7   6  1  requires factions { Wales, }  and region_religion welsh 70
                recruit_pool "Border Horse"  1   0.7   6  2  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "Hobiguir"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 50
                recruit_pool "Feudal Knights"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 70
                recruit_pool "Mounted Calivermen"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 85 and event_counter gunpowder_discovered 1 
                recruit_pool "Mathrafal Horsemen"  1   0.5   4  2  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "Huscarls"  1   0.5   4  1  requires factions { norway, }  and region_religion norwegian 70
                recruit_pool "Hobilars"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 40
                recruit_pool "Hobilars"  1   0.7   6  1  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "Svenner"  1   0.7   6  1  requires factions { norway, }  and region_religion norwegian 40
            }
            material wooden
            construction  6 
            cost  9600 
            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, } 
        {
            convert_to 1
            capability
            {
                recruit_pool "Town Militia"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.5   4  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Town Militia"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Ceitherne"  1   0.5   4  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Welsh Militiamen"  1   0.5   4  0  requires factions { Wales, }  and region_religion welsh 5
                law_bonus bonus 1
            }
            material wooden
            construction  2 
            cost  600 
            settlement_min town
            upgrades
            {
                town_guard
            }
        }
        town_guard city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 2
            capability
            {
                recruit_pool "Spear Militia"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 15
                recruit_pool "Spear Militia"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 15
                recruit_pool "Spear Militia"  1   0.5   4  0  requires factions { scotland, }  and region_religion scottish 15
                recruit_pool "Spear Militia"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Spear Militia"  1   0.5   4  0  requires factions { Wales, }  and region_religion welsh 15
                recruit_pool "Deisi Javelinmen"  1   0.2   2  0  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Ceitherne"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Welsh Militiamen"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 5
                law_bonus bonus 2
            }
            material wooden
            construction  3 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                city_watch
            }
        }
        city_watch city requires factions {  barons_alliance, norway, ireland, wales, denmark, hre, france, scotland, england, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 3
            capability
            {
                recruit_pool "Bill Militia"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 35
                recruit_pool "Bill Militia"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 35
                recruit_pool "Heavy Pike Militia"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 35
                recruit_pool "Swordstaff Militia"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 35
                recruit_pool "Archer Militia"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Archer Militia"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Scots Pike Militia"  1   0.5   4  0  requires factions { scotland, }  and region_religion scottish 10
                recruit_pool "Crossbow Militia"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 10
                recruit_pool "Helwyr"  1   0.5   4  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 15
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 15
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 15
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 15
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Ceitherne"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Welsh Militiamen"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Cliathairi"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 35
                recruit_pool "Deisi Javelinmen"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Saighdeoir"  1   0.2   2  0  requires factions { Ireland, }  and region_religion irish 10
                law_bonus bonus 3
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min city
            upgrades
            {
                militia_drill_square
            }
        }
        militia_drill_square city requires factions {  barons_alliance, norway, ireland, wales, denmark, hre, france, scotland, england, timurids, moors, egypt, turks, eastern_european, greek, southern_european, } 
        {
            convert_to 4
            capability
            {
                recruit_pool "Bill Militia"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 35
                recruit_pool "Bill Militia"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 35
                recruit_pool "Heavy Pike Militia"  1   0.5   4  0  requires factions { scotland, }  and region_religion scottish 35
                recruit_pool "Swordstaff Militia"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 35
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Scots Pike Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 10
                recruit_pool "Crossbow Militia"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 10
                recruit_pool "Helwyr"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 15
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 15
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 15
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 15
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Ceitherne"  1   0.7   6  1  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Welsh Militiamen"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Cliathairi"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 35
                recruit_pool "Deisi Javelinmen"  1   0.5   4  1  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Saighdeoir"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 10
                recruit_pool "Meirionnydd Spearmen"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 35
                recruit_pool "Heavy Bill Militia"  1   0.2   2  0  requires factions { england, }  and region_religion catholic 55
                recruit_pool "Heavy Bill Militia"  1   0.2   2  0  requires factions { barons_alliance, }  and region_religion catholic 55
                recruit_pool "Galloglaich"  1   0.2   2  0  requires factions { Ireland, }  and region_religion irish 55
                law_bonus bonus 3
            }
            material wooden
            construction  5 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                militia_barracks
            }
        }
        militia_barracks city requires factions {  barons_alliance, norway, ireland, wales, scotland, denmark, hre, france, england, timurids, moors, egypt, turks, eastern_european, greek, southern_european, } 
        {
            convert_to 4
            capability
            {
                recruit_pool "Heavy Bill Militia"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 55
                recruit_pool "Heavy Bill Militia"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 55
                recruit_pool "Hand Gunners"  1   0.2   2  0  requires factions { norway, }  and region_religion norwegian 60 and event_counter gunpowder_discovered 1 
                recruit_pool "Magnelwyr"  1   0.2   2  0  requires factions { Wales, }  and region_religion welsh 60 and event_counter gunpowder_discovered 1 
                recruit_pool "Bill Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 35
                recruit_pool "Bill Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 35
                recruit_pool "Heavy Pike Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 35
                recruit_pool "Swordstaff Militia"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 35
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Scots Pike Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 10
                recruit_pool "Crossbow Militia"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 10
                recruit_pool "Helwyr"  1   0.7   6  1  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { scotland, }  and region_religion scottish 10
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Ceitherne"  1   0.7   6  1  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Cliathairi"  1   0.5   4  0  requires factions { Ireland, }  and region_religion irish 35
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { Wales, }  and region_religion welsh 15
                recruit_pool "Welsh Militiamen"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Galloglaich"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 55
                recruit_pool "Deisi Javelinmen"  1   0.5   4  1  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Meirionnydd Spearmen"  1   0.5   4  1  requires factions { Wales, }  and region_religion welsh 35
                recruit_pool "Saighdeoir"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 10
                law_bonus bonus 3
            }
            material wooden
            construction  6 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
                army_barracks
            }
        }
        army_barracks city requires factions {  barons_alliance, norway, ireland, wales, scotland, denmark, hre, france, england, moors, egypt, turks, poland, russia, southern_european, } 
        {
            convert_to 4
            capability
            {
                recruit_pool "Arquebusiers"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 70 and event_counter gunpowder_discovered 1 
                recruit_pool "Arquebusiers"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 70 and event_counter gunpowder_discovered 1 
                recruit_pool "Calivermen"  1   0.5   4  0  requires factions { Ireland, }  and region_religion irish 75 and event_counter gunpowder_discovered 1 
                recruit_pool "Hand Gunners"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 60 and event_counter gunpowder_discovered 1 
                recruit_pool "Magnelwyr"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 60 and event_counter gunpowder_discovered 1 
                recruit_pool "Ceitherne"  1   0.7   6  2  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Heavy Bill Militia"  1   0.5   4  1  requires factions { england, }  and region_religion catholic 55
                recruit_pool "Heavy Bill Militia"  1   0.5   4  1  requires factions { barons_alliance, }  and region_religion catholic 55
                recruit_pool "Cliathairi"  1   0.5   4  0  requires factions { Ireland, }  and region_religion irish 35
                recruit_pool "Bill Militia"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 35
                recruit_pool "Bill Militia"  1   0.7   6  1  requires factions { barons_alliance, }  and region_religion catholic 35
                recruit_pool "Heavy Pike Militia"  1   0.7   6  1  requires factions { scotland, }  and region_religion scottish 35
                recruit_pool "Swordstaff Militia"  1   0.7   6  1  requires factions { norway, }  and region_religion norwegian 35
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Scots Pike Militia"  1   0.7   6  1  requires factions { scotland, }  and region_religion scottish 10
                recruit_pool "Crossbow Militia"  1   0.7   6  1  requires factions { norway, }  and region_religion norwegian 10
                recruit_pool "Helwyr"  1   0.7   6  2  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { scotland, }  and region_religion scottish 10
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { Wales, }  and region_religion welsh 15
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Welsh Militiamen"  1   0.7   6  1  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Meirionnydd Spearmen"  1   0.7   6  1  requires factions { Wales, }  and region_religion welsh 35
                recruit_pool "Galloglaich"  1   0.5   4  1  requires factions { Ireland, }  and region_religion irish 55
                recruit_pool "Deisi Javelinmen"  1   0.5   4  2  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Saighdeoir"  1   0.4   3  1  requires factions { Ireland, }  and region_religion irish 10
                law_bonus bonus 3
            }
            material wooden
            construction  7 
            cost  12000 
            settlement_min huge_city
            upgrades
            {
                royal_armoury
            }
        }
        royal_armoury city requires factions { turks, venice, milan, portugal, spain, } 
        {
            convert_to 4
            capability
            {
                recruit_pool "Arquebusiers"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 70 and event_counter gunpowder_discovered 1 
                recruit_pool "Arquebusiers"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 70 and event_counter gunpowder_discovered 1 
                recruit_pool "Hand Gunners"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 60 and event_counter gunpowder_discovered 1 
                recruit_pool "Calivermen"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 75 and event_counter gunpowder_discovered 1 
                recruit_pool "Heavy Bill Militia"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 55
                recruit_pool "Heavy Bill Militia"  1   0.7   6  1  requires factions { barons_alliance, }  and region_religion catholic 55
                recruit_pool "Ceitherne"  1   0.7   6  1  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Magnelwyr"  1   0.7   6  0  requires factions { Wales, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Bill Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 35
                recruit_pool "Bill Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 35
                recruit_pool "Heavy Pike Militia"  1   0.7   6  1  requires factions { scotland, }  and region_religion scottish 35
                recruit_pool "Swordstaff Militia"  1   0.7   6  1  requires factions { norway, }  and region_religion norwegian 35
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Scots Pike Militia"  1   0.7   6  1  requires factions { scotland, }  and region_religion scottish 10
                recruit_pool "Crossbow Militia"  1   0.7   6  1  requires factions { norway, }  and region_religion norwegian 10
                recruit_pool "Helwyr"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { scotland, }  and region_religion scottish 10
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Spear Militia"  1   0.7   6  1  requires factions { Wales, }  and region_religion welsh 15
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Welsh Militiamen"  1   0.7   6  1  requires factions { Wales, } 
                recruit_pool "Cliathairi"  1   0.5   4  1  requires factions { Ireland, }  and region_religion irish 35
                recruit_pool "Galloglaich"  1   0.5   4  0  requires factions { Ireland, }  and region_religion irish 55
                recruit_pool "Deisi Javelinmen"  1   0.5   4  2  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Saighdeoir"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 10
                law_bonus bonus 3
            }
            material wooden
            construction  8 
            cost  15000 
            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, } 
        {
            capability
            {
                recruit_pool "Peasants"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasants"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Highland Rabble"  1   0.5   4  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasants"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Peasants"  1   0.5   4  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Peasants"  1   0.5   4  0  requires factions { Wales, }  and region_religion welsh 5
            }
            material wooden
            construction  1 
            cost  600 
            settlement_min village
            upgrades
            {
                garrison_quarters
            }
        }
        garrison_quarters castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 0
            capability
            {
                recruit_pool "Levy Spearmen"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Levy Spearmen"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Highlanders"  1   0.5   4  0  requires factions { scotland, }  and region_religion scottish 15
                recruit_pool "Viking Raiders"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Ostmen"  1   0.5   4  0  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Welsh Skirmishers"  1   0.5   4  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Highland Rabble"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 5
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min town
            upgrades
            {
                drill_square
            }
        }
        drill_square castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
                recruit_pool "Billmen"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 30
                recruit_pool "Billmen"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 30
                recruit_pool "Highland Pikemen"  1   0.5   4  0  requires factions { scotland, }  and region_religion scottish 30
                recruit_pool "Norse Swordsmen"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 30
                recruit_pool "Ulster Swordsmen"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 50
                recruit_pool "Gwent Raiders"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 30
                recruit_pool "Muire"  1   0.2   2  0  requires factions { Ireland, }  and region_religion irish 70
                recruit_pool "Dismounted Huscarls"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "Welsh Skirmishers"  1   0.5   4  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Levy Spearmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Levy Spearmen"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Highlanders"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 15
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Ostmen"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Highland Rabble"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 5
                recruit_pool "Armored Swordsmen"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 70
                recruit_pool "Armored Swordsmen"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 70
                recruit_pool "Highland Nobles"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 50
                recruit_pool "Sami Axemen"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 50
            }
            material wooden
            construction  3 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                barracks
            }
        }
        barracks castle requires factions {  barons_alliance, norway, ireland, wales, denmark, hre, france, scotland, england, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 2
            capability
            {
                recruit_pool "Dismounted Huscarls"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "Armored Swordsmen"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 70
                recruit_pool "Armored Swordsmen"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 70
                recruit_pool "Sami Axemen"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 50
                recruit_pool "Ulster Swordsmen"  1   0.5   4  0  requires factions { Ireland, }  and region_religion irish 50
                recruit_pool "Gwent Raiders"  1   0.5   4  0  requires factions { Wales, }  and region_religion welsh 30
                recruit_pool "Highland Nobles"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 50
                recruit_pool "Muire"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 70
                recruit_pool "Morgannwg Spearmen"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 65
                recruit_pool "Billmen"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 30
                recruit_pool "Billmen"  1   0.7   6  1  requires factions { barons_alliance, }  and region_religion catholic 30
                recruit_pool "Highland Pikemen"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 30
                recruit_pool "Norse Swordsmen"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 30
                recruit_pool "Levy Spearmen"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Levy Spearmen"  1   0.7   6  1  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Highlanders"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 15
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Ostmen"  1   0.7   6  1  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Welsh Skirmishers"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Heavy Billmen"  1   0.5   4  0  requires factions { england, }  and region_religion catholic 50
                recruit_pool "Heavy Billmen"  1   0.5   4  0  requires factions { barons_alliance, }  and region_religion catholic 50
                recruit_pool "Noble Swordsmen"  1   0.5   4  0  requires factions { scotland, }  and region_religion scottish 60
                recruit_pool "Gotland Footmen"  1   0.5   4  0  requires factions { norway, }  and region_religion norwegian 70
                recruit_pool "Rhyfelwyr"  1   0.5   4  0  requires factions { Wales, }  and region_religion welsh 55
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Highland Rabble"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 5
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min city
            upgrades
            {
                armoury
            }
        }
        armoury castle requires factions {  barons_alliance, norway, ireland, wales, denmark, hre, france, scotland, england, turks, egypt, moors, hungary, greek, sicily, venice, portugal, spain, } 
        {
            convert_to 3
            capability
            {
                recruit_pool "Heavy Billmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 50
                recruit_pool "Heavy Billmen"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 50
                recruit_pool "Noble Swordsmen"  1   0.7   6  1  requires factions { scotland, }  and region_religion scottish 60
                recruit_pool "Ulster Swordsmen"  1   0.7   6  1  requires factions { Ireland, }  and region_religion irish 50
                recruit_pool "Gwent Raiders"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 30
                recruit_pool "Noble Pikemen"  1   0.5   4  0  requires factions { scotland, }  and region_religion scottish 70
                recruit_pool "Gotland Footmen"  1   0.5   4  1  requires factions { norway, }  and region_religion norwegian 70
                recruit_pool "Muire"  1   0.5   4  1  requires factions { Ireland, }  and region_religion irish 70
                recruit_pool "Morgannwg Spearmen"  1   0.5   4  0  requires factions { Wales, }  and region_religion welsh 65
                recruit_pool "Armored Swordsmen"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 70
                recruit_pool "Armored Swordsmen"  1   0.7   6  1  requires factions { barons_alliance, }  and region_religion catholic 70
                recruit_pool "Dismounted Huscarls"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "Sami Axemen"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 50
                recruit_pool "Billmen"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 30
                recruit_pool "Billmen"  1   0.7   6  1  requires factions { barons_alliance, }  and region_religion catholic 30
                recruit_pool "Norse Swordsmen"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 30
                recruit_pool "Rhyfelwyr"  1   0.7   6  1  requires factions { Wales, }  and region_religion welsh 55
                recruit_pool "Highland Nobles"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 50
                recruit_pool "Highland Pikemen"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 30
                recruit_pool "Levy Spearmen"  1   0.7   6  1  requires factions { england, }  and region_religion catholic 10
                recruit_pool "Levy Spearmen"  1   0.7   6  1  requires factions { barons_alliance, }  and region_religion catholic 10
                recruit_pool "Highlanders"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 15
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 15
                recruit_pool "Ostmen"  1   0.7   6  1  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Welsh Skirmishers"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Highland Rabble"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 5
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 5
            }
            material wooden
            construction  6 
            cost  9600 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building professional_military
{
    levels military_academy officers_academy 
    {
        military_academy city requires factions { france , spain, portugal, } 
        {
            capability
            {
                recruit_pool "Demi Lancers"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 70
                recruit_pool "Demi Lancers"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 70
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min huge_city
            upgrades
            {
                officers_academy
            }
        }
        officers_academy city requires factions { france , spain, portugal, } 
        {
            capability
            {
                recruit_pool "Demi Lancers"  1   0.5   4  1  requires factions { england, }  and region_religion catholic 70
                recruit_pool "Demi Lancers"  1   0.5   4  1  requires factions { barons_alliance, }  and region_religion catholic 70
            }
            material wooden
            construction  6 
            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, } 
        {
            capability
            {
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Helwyr"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Saighdeoir"  1   0.2   2  0  requires factions { Ireland, }  and region_religion irish 10
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min town
            upgrades
            {
                practice_range
            }
        }
        practice_range castle requires factions {  barons_alliance, norway, ireland, wales, denmark, hre, scotland, france, england, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Longbowmen"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 65
                recruit_pool "Longbowmen"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 65
                recruit_pool "Highland Archers"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 35
                recruit_pool "Norse Archers"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 25
                recruit_pool "Saighdeoir"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 10
                recruit_pool "Saethwyr"  1   0.5   4  0  requires factions { Wales, }  and region_religion welsh 80
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Horseboys"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "Helwyr"  1   0.7   6  0  requires factions { Wales, }  and region_religion welsh 10
            }
            material wooden
            construction  3 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                archery_range
            }
        }
        archery_range castle requires factions {  barons_alliance, norway, ireland, wales, denmark, hre, scotland, france, england, egypt, turks, moors, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Yeoman Archers"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 80
                recruit_pool "Yeoman Archers"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 80
                recruit_pool "Noble Highland Archers"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 60
                recruit_pool "Crossbowmen"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "Saighdeoir"  1   0.4   3  1  requires factions { Ireland, }  and region_religion irish 10
                recruit_pool "Longbowmen"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 65
                recruit_pool "Longbowmen"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 65
                recruit_pool "Norse Archers"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 25
                recruit_pool "Deisi Javelinmen"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool "Welsh Skirmishers"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Highland Archers"  1   0.5   4  0  requires factions { scotland, }  and region_religion scottish 35
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Horseboys"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "Saethwyr"  1   0.7   6  1  requires factions { Wales, }  and region_religion welsh 80
                recruit_pool "Helwyr"  1   0.7   6  1  requires factions { Wales, }  and region_religion welsh 10
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min city
            upgrades
            {
                marksmans_range
            }
        }
        marksmans_range castle requires factions { norway, ireland, wales, denmark, hre, france, england, egypt, turks, moors, southern_european, } 
        {
            capability
            {
                recruit_pool "Dismounted Longbowmen"  1   0.2   2  0  requires factions { england, }  and region_religion catholic 90
                recruit_pool "Dismounted Longbowmen"  1   0.2   2  0  requires factions { barons_alliance, }  and region_religion catholic 90
                recruit_pool "Mounted Crossbowmen"  1   0.2   2  0  requires factions { norway, }  and region_religion norwegian 55
                recruit_pool "Yeoman Archers"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 80
                recruit_pool "Yeoman Archers"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 80
                recruit_pool "Noble Highland Archers"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 60
                recruit_pool "Crossbowmen"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "Saighdeoir"  1   0.5   4  2  requires factions { Ireland, }  and region_religion irish 10
                recruit_pool "Welsh Skirmishers"  1   0.5   4  0  requires factions { Wales, }  and region_religion welsh 10
                recruit_pool "Longbowmen"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 65
                recruit_pool "Longbowmen"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 65
                recruit_pool "Highland Archers"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 35
                recruit_pool "Norse Archers"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 25
                recruit_pool "Deisi Javelinmen"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 15
                recruit_pool " Saethwyr"  1   0.7   6  2  requires factions { Wales, }  and region_religion welsh 80
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { england, }  and region_religion catholic 5
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { barons_alliance, }  and region_religion catholic 5
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { scotland, }  and region_religion scottish 5
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { norway, }  and region_religion norwegian 5
                recruit_pool "Horseboys"  1   0.7   6  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool " Helwyr"  1   0.7   6  1  requires factions { Wales, }  and region_religion welsh 10
            }
            material wooden
            construction  5 
            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, } 
        {
            convert_to 0
            capability
            {
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 20
            }
            material wooden
            construction  3 
            cost  1600 
            settlement_min large_town
            upgrades
            {
                catapult_range
            }
        }
        catapult_range city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 20
            }
            material wooden
            construction  4 
            cost  3200 
            settlement_min large_town
            upgrades
            {
                siege_works
            }
        }
        siege_works city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 2
            capability
            {
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 20
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 20
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 20
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 20
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 20
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 20
            }
            material wooden
            construction  5 
            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, } 
        {
            convert_to 0
            capability
            {
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 20
            }
            material wooden
            construction  3 
            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, } 
        {
            convert_to 1
            capability
            {
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 20
            }
            material wooden
            construction  4 
            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, } 
        {
            convert_to 2
            capability
            {
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 20
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 20
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 20
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 20
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 20
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 20
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 20
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 20
            }
            material wooden
            construction  5 
            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 gunpowder_discovered 1 
        {
            convert_to 0
            capability
            {
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
            }
            material wooden
            construction  3 
            cost  800 
            settlement_min city
            upgrades
            {
                cannon_maker
            }
        }
        cannon_maker city requires factions { northern_european, timurids, egypt, moors, turks, eastern_european, southern_european, }  and event_counter gunpowder_discovered 1 
        {
            convert_to 1
            capability
            {
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  4 
            cost  1600 
            settlement_min large_city
            upgrades
            {
                cannon_foundry
            }
        }
        cannon_foundry city requires factions { northern_european, egypt, timurids, moors, turks, eastern_european, southern_european, }  and event_counter gunpowder_discovered 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Cannon"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  5 
            cost  3200 
            settlement_min huge_city
            upgrades
            {
                royal_arsenal
            }
        }
        royal_arsenal city requires factions { hre, france, turks, hungary, russia, venice, milan, portugal, spain, }  and event_counter gunpowder_discovered 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Cannon"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  6 
            cost  6400 
            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 gunpowder_discovered 1 
        {
            convert_to 0
            capability
            {
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
            }
            material wooden
            construction  3 
            cost  800 
            settlement_min city
            upgrades
            {
                c_cannon_maker
            }
        }
        c_cannon_maker castle requires factions { northern_european, timurids, egypt, moors, turks, eastern_european, southern_european, }  and event_counter gunpowder_discovered 1 
        {
            convert_to 1
            capability
            {
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  4 
            cost  1600 
            settlement_min large_city
            upgrades
            {
                c_cannon_foundry
            }
        }
        c_cannon_foundry castle requires factions { northern_european, egypt, timurids, moors, turks, eastern_european, southern_european, }  and event_counter gunpowder_discovered 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  5 
            cost  3200 
            settlement_min large_city
            upgrades
            {
                c_royal_arsenal
            }
        }
        c_royal_arsenal castle requires factions { hre, france, turks, hungary, russia, venice, milan, portugal, spain, }  and event_counter gunpowder_discovered 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { england, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { barons_alliance, }  and region_religion catholic 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { scotland, }  and region_religion scottish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { norway, }  and region_religion norwegian 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Ireland, }  and region_religion irish 40
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { Wales, }  and region_religion welsh 40
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  6 
            cost  6400 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building urban_equestrian
{
    levels racing_track sultans_racing_track 
    {
        racing_track city requires factions { middle_eastern, } 
        {
            capability
            {
                happiness_bonus bonus 1
                stage_races 1
            }
            material wooden
            construction  4 
            cost  1200 
            settlement_min city
            upgrades
            {
                sultans_racing_track
            }
        }
        sultans_racing_track city requires factions { middle_eastern, } 
        {
            capability
            {
                happiness_bonus bonus 2
                stage_races 2
            }
            material wooden
            construction  5 
            cost  1200 
            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, } 
        {
            convert_to 0
            capability
            {
                armour 1
            }
            material wooden
            construction  2 
            cost  600 
            settlement_min town
            upgrades
            {
                blacksmith
            }
        }
        blacksmith city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
                armour 2
            }
            material wooden
            construction  3 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                armourer
            }
        }
        armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 2
            capability
            {
                armour 3
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min city
            upgrades
            {
                heavy_armourer
            }
        }
        heavy_armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 3
            capability
            {
                armour 4
            }
            material wooden
            construction  5 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                plate_armourer
            }
        }
        plate_armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 4
            capability
            {
                armour 5
            }
            material wooden
            construction  6 
            cost  10000 
            settlement_min huge_city
            upgrades
            {
                gothic_armourer
            }
        }
        gothic_armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 5
            capability
            {
                armour 6
            }
            material wooden
            construction  7 
            cost  15000 
            settlement_min huge_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, } 
        {
            convert_to 0
            capability
            {
                armour 1
            }
            material wooden
            construction  2 
            cost  600 
            settlement_min town
            upgrades
            {
                c_blacksmith
            }
        }
        c_blacksmith castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
                armour 2
            }
            material wooden
            construction  3 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                c_armourer
            }
        }
        c_armourer castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 2
            capability
            {
                armour 3
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min city
            upgrades
            {
                c_heavy_armourer
            }
        }
        c_heavy_armourer castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 3
            capability
            {
                armour 4
            }
            material wooden
            construction  5 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                c_plate_armourer
            }
        }
        c_plate_armourer castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 4
            capability
            {
                armour 5
            }
            material wooden
            construction  6 
            cost  10000 
            settlement_min large_city
            upgrades
            {
                c_gothic_armourer
            }
        }
        c_gothic_armourer castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 5
            capability
            {
                armour 6
            }
            material wooden
            construction  7 
            cost  15000 
            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, } 
        {
            convert_to 0
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { norway, denmark, } 
                recruit_pool "dhow"  1   1   3  0  requires factions { middle_eastern, } 
                recruit_pool "cog"  1   1   3  0  requires factions { hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { russia, } 
                recruit_pool "dromon"  1   1   3  0  requires factions { greek, } 
                recruit_pool "galley"  1   1   3  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   1   3  0  requires factions { portugal, spain, } 
                trade_base_income_bonus bonus 2
                trade_fleet 1
            }
            material wooden
            construction  2 
            cost  800 
            settlement_min large_town
            upgrades
            {
                shipwright
            }
        }
        shipwright city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { norway, denmark, } 
                recruit_pool "holk"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, scotland, france, england, } 
                recruit_pool "dragon boat"  1   1   3  0  requires factions { norway, denmark, } 
                recruit_pool "dhow"  1   1   3  0  requires factions { middle_eastern, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { egypt, moors, turks, } 
                recruit_pool "cog"  1   1   3  0  requires factions { hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { russia, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "holk"  1   1   3  0  requires factions { russia, poland, } 
                recruit_pool "dromon"  1   1   3  0  requires factions { greek, } 
                recruit_pool "fire ship"  1   1   3  0  requires factions { greek, } 
                recruit_pool "galley"  1   1   3  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   1   3  0  requires factions { portugal, spain, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { southern_european, } 
                trade_base_income_bonus bonus 3
                trade_fleet 1
            }
            material wooden
            construction  3 
            cost  1600 
            settlement_min city
            upgrades
            {
                dockyard
            }
        }
        dockyard city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter gunpowder_discovered 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { norway, denmark, } 
                recruit_pool "holk"  1   1   3  0  requires factions { wales, ireland, hre, scotland, france, england, } 
                recruit_pool "dragon boat"  1   1   3  0  requires factions { norway, denmark, } 
                recruit_pool "gun holk"  1   1   3  0  requires factions { northern_european, } 
                recruit_pool "dhow"  1   1   3  0  requires factions { middle_eastern, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { egypt, moors, turks, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { egypt, moors, turks, } 
                recruit_pool "cog"  1   1   3  0  requires factions { hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { russia, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "holk"  1   1   3  0  requires factions { russia, poland, } 
                recruit_pool "gun holk"  1   1   3  0  requires factions { russia, poland, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "dromon"  1   1   3  0  requires factions { greek, } 
                recruit_pool "fire ship"  1   1   3  0  requires factions { greek, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { greek, } 
                recruit_pool "galley"  1   1   3  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   1   3  0  requires factions { portugal, spain, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { southern_european, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { portugal, spain, papal_states, milan, sicily, } 
                recruit_pool "caravel"  1   1   3  0  requires factions { portugal, spain, }  and event_counter world_is_round 1 
                recruit_pool "galleass"  1   1   3  0  requires factions { venice, } 
                trade_base_income_bonus bonus 4
                trade_fleet 1
            }
            material wooden
            construction  5 
            cost  3200 
            settlement_min large_city
            upgrades
            {
                naval_drydock
            }
        }
        naval_drydock city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter world_is_round 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "holk"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, scotland, france, england, } 
                recruit_pool "dragon boat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "gun holk"  1   1   3  0  requires factions { northern_european, } 
                recruit_pool "carrack"  1   1   3  0  requires factions { northern_european, } 
                recruit_pool "dhow"  1   1   3  0  requires factions { middle_eastern, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { egypt, moors, turks, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { egypt, moors, turks, } 
                recruit_pool "baghlah"  1   1   3  0  requires factions { egypt, moors, turks, } 
                recruit_pool "cog"  1   1   3  0  requires factions { hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { russia, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "holk"  1   1   3  0  requires factions { russia, poland, } 
                recruit_pool "gun holk"  1   1   3  0  requires factions { russia, poland, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "carrack"  1   1   3  0  requires factions { eastern_european, } 
                recruit_pool "dromon"  1   1   3  0  requires factions { greek, } 
                recruit_pool "fire ship"  1   1   3  0  requires factions { greek, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { greek, } 
                recruit_pool "carrack"  1   1   3  0  requires factions { greek, } 
                recruit_pool "galley"  1   1   3  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   1   3  0  requires factions { portugal, spain, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { southern_european, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { portugal, spain, papal_states, milan, sicily, } 
                recruit_pool "caravel"  1   1   3  0  requires factions { portugal, spain, } 
                recruit_pool "galleass"  1   1   3  0  requires factions { venice, } 
                recruit_pool "carrack"  1   1   3  0  requires factions { papal_states, sicily, milan, venice, } 
                recruit_pool "grande carrack"  1   1   3  0  requires factions { portugal, spain, } 
                trade_base_income_bonus bonus 5
                trade_fleet 1
            }
            material wooden
            construction  6 
            cost  6400 
            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, } 
        {
            convert_to 0
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { norway, denmark, } 
                recruit_pool "dhow"  1   1   3  0  requires factions { middle_eastern, } 
                recruit_pool "cog"  1   1   3  0  requires factions { hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { russia, } 
                recruit_pool "dromon"  1   1   3  0  requires factions { greek, } 
                recruit_pool "galley"  1   1   3  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   1   3  0  requires factions { portugal, spain, } 
                trade_base_income_bonus bonus 2
                trade_fleet 1
            }
            material wooden
            construction  2 
            cost  800 
            settlement_min large_town
            upgrades
            {
                c_shipwright
            }
        }
        c_shipwright castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { norway, denmark, } 
                recruit_pool "holk"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, scotland, france, england, } 
                recruit_pool "dragon boat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "dhow"  1   1   3  0  requires factions { middle_eastern, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { egypt, moors, turks, } 
                recruit_pool "cog"  1   1   3  0  requires factions { hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { russia, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "holk"  1   1   3  0  requires factions { russia, poland, } 
                recruit_pool "dromon"  1   1   3  0  requires factions { greek, } 
                recruit_pool "fire ship"  1   1   3  0  requires factions { greek, } 
                recruit_pool "galley"  1   1   3  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   1   3  0  requires factions { portugal, spain, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { southern_european, } 
                trade_base_income_bonus bonus 3
                trade_fleet 1
            }
            material wooden
            construction  3 
            cost  1600 
            settlement_min city
            upgrades
            {
                c_dockyard
            }
        }
        c_dockyard castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter gunpowder_discovered 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { norway, denmark, } 
                recruit_pool "holk"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, scotland, france, england, } 
                recruit_pool "dragon boat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "gun holk"  1   1   3  0  requires factions { northern_european, } 
                recruit_pool "dhow"  1   1   3  0  requires factions { middle_eastern, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { egypt, moors, turks, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { egypt, moors, turks, } 
                recruit_pool "cog"  1   1   3  0  requires factions { hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { russia, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "holk"  1   1   3  0  requires factions { russia, poland, } 
                recruit_pool "gun holk"  1   1   3  0  requires factions { russia, poland, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "dromon"  1   1   3  0  requires factions { greek, } 
                recruit_pool "fire ship"  1   1   3  0  requires factions { greek, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { greek, } 
                recruit_pool "galley"  1   1   3  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   1   3  0  requires factions { portugal, spain, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { southern_european, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { portugal, spain, papal_states, milan, sicily, } 
                recruit_pool "caravel"  1   1   3  0  requires factions { portugal, spain, }  and event_counter world_is_round 1 
                recruit_pool "galleass"  1   1   3  0  requires factions { venice, } 
                trade_base_income_bonus bonus 4
                trade_fleet 1
            }
            material wooden
            construction  5 
            cost  3200 
            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 world_is_round 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { norway, denmark, } 
                recruit_pool "holk"  1   1   3  0  requires factions {  barons_alliance, wales, ireland, hre, scotland, france, england, } 
                recruit_pool "dragon boat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "gun holk"  1   1   3  0  requires factions { northern_european, } 
                recruit_pool "carrack"  1   1   3  0  requires factions { northern_european, } 
                recruit_pool "dhow"  1   1   3  0  requires factions { middle_eastern, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { egypt, moors, turks, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { egypt, moors, turks, } 
                recruit_pool "baghlah"  1   1   3  0  requires factions { egypt, moors, turks, } 
                recruit_pool "cog"  1   1   3  0  requires factions { hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { russia, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "holk"  1   1   3  0  requires factions { russia, poland, } 
                recruit_pool "gun holk"  1   1   3  0  requires factions { russia, poland, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "carrack"  1   1   3  0  requires factions { eastern_european, } 
                recruit_pool "dromon"  1   1   3  0  requires factions { greek, } 
                recruit_pool "fire ship"  1   1   3  0  requires factions { greek, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { greek, } 
                recruit_pool "carrack"  1   1   3  0  requires factions { greek, } 
                recruit_pool "galley"  1   1   3  0  requires factions { sicily, papal_states, milan, venice, } 
                recruit_pool "cog"  1   1   3  0  requires factions { portugal, spain, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { southern_european, } 
                recruit_pool "lanternas"  1   1   3  0  requires factions { portugal, spain, papal_states, milan, sicily, } 
                recruit_pool "caravel"  1   1   3  0  requires factions { portugal, spain, } 
                recruit_pool "galleass"  1   1   3  0  requires factions { venice, } 
                recruit_pool "carrack"  1   1   3  0  requires factions { papal_states, sicily, milan, venice, } 
                recruit_pool "grande carrack"  1   1   3  0  requires factions { portugal, spain, } 
                trade_base_income_bonus bonus 5
                trade_fleet 1
            }
            material wooden
            construction  6 
            cost  6400 
            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 building_present_min_level port port
        {
            capability
            {
                trade_fleet 2
                trade_base_income_bonus bonus 2
            }
            material wooden
            construction  3 
            cost  1600 
            settlement_min city
            upgrades
            {
                warehouse
            }
        }
        warehouse city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and building_present_min_level port port
        {
            capability
            {
                trade_fleet 3
                trade_base_income_bonus bonus 3
            }
            material wooden
            construction  5 
            cost  3200 
            settlement_min large_city
            upgrades
            {
                docklands
            }
        }
        docklands city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and building_present_min_level port port
        {
            capability
            {
                trade_fleet 4
                trade_base_income_bonus bonus 4
            }
            material wooden
            construction  6 
            cost  6400 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building admiralty
{
    levels naval_academy admiralty 
    {
        naval_academy city requires factions {  norway, portugal, }  and building_present_min_level port port
        {
            capability
            {
                recruitment_cost_bonus_naval bonus 1
                navy_bonus 1
            }
            material wooden
            construction  3 
            cost  2400 
            settlement_min city
            upgrades
            {
                admiralty
            }
        }
        admiralty city requires factions {  norway, portugal, } 
        {
            capability
            {
                recruitment_cost_bonus_naval bonus 2
                navy_bonus 1
            }
            material wooden
            construction  5 
            cost  4800 
            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, } 
        {
            capability
            {
                agent merchant  0  requires factions { northern_european, } 
                agent merchant  0  requires factions { middle_eastern, } 
                agent merchant  0  requires factions { eastern_european, } 
                agent merchant  0  requires factions { greek, } 
                agent merchant  0  requires factions { southern_european, } 
                trade_base_income_bonus bonus 2
                agent_limit merchant 1
            }
            material wooden
            construction  2 
            cost  600 
            settlement_min town
            upgrades
            {
                market
            }
        }
        market city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                agent merchant  0  requires factions { northern_european, } 
                agent merchant  0  requires factions { middle_eastern, } 
                agent merchant  0  requires factions { eastern_european, } 
                agent merchant  0  requires factions { greek, } 
                agent merchant  0  requires factions { southern_european, } 
                trade_base_income_bonus bonus 3
                agent_limit merchant 1
            }
            material wooden
            construction  3 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                fairground
            }
        }
        fairground city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                agent merchant  0  requires factions { northern_european, } 
                agent merchant  0  requires factions { middle_eastern, } 
                agent merchant  0  requires factions { eastern_european, } 
                agent merchant  0  requires factions { greek, } 
                agent merchant  0  requires factions { southern_european, } 
                trade_base_income_bonus bonus 4
                agent_limit merchant 1
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min city
            upgrades
            {
                great_market
            }
        }
        great_market city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                agent merchant  0  requires factions { northern_european, } 
                agent merchant  0  requires factions { middle_eastern, } 
                agent merchant  0  requires factions { eastern_european, } 
                agent merchant  0  requires factions { greek, } 
                agent merchant  0  requires factions { southern_european, } 
                trade_base_income_bonus bonus 5
                agent_limit merchant 1
            }
            material wooden
            construction  6 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                merchants_quarter
            }
        }
        merchants_quarter city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                agent merchant  0  requires factions { northern_european, } 
                agent merchant  0  requires factions { middle_eastern, } 
                agent merchant  0  requires factions { eastern_european, } 
                agent merchant  0  requires factions { greek, } 
                agent merchant  0  requires factions { southern_european, } 
                trade_base_income_bonus bonus 6
                agent_limit merchant 1
            }
            material wooden
            construction  7 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building hinterland_roads
{
    convert_to hinterland_castle_roads
    levels roads paved_roads 
    {
        roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 0
            capability
            {
                road_level 0
            }
            material wooden
            construction  1 
            cost  400 
            settlement_min town
            upgrades
            {
                paved_roads
            }
        }
        paved_roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
                road_level 1
            }
            material wooden
            construction  3 
            cost  1200 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building hinterland_castle_roads
{
    convert_to hinterland_roads
    levels c_roads c_paved_roads 
    {
        c_roads castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 0
            capability
            {
                road_level 0
            }
            material wooden
            construction  1 
            cost  400 
            settlement_min town
            upgrades
            {
                c_paved_roads
            }
        }
        c_paved_roads castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
                road_level 1
            }
            material wooden
            construction  3 
            cost  1200 
            settlement_min 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, } 
        {
            convert_to 0
            capability
            {
                farming_level 1
            }
            material wooden
            construction  2 
            cost  600 
            settlement_min village
            upgrades
            {
                farms+1
            }
        }
        farms+1  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
                farming_level 2
            }
            material wooden
            construction  3 
            cost  1200 
            settlement_min town
            upgrades
            {
                farms+2
            }
        }
        farms+2  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 2
            capability
            {
                farming_level 3
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                farms+3
            }
        }
        farms+3  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 3
            capability
            {
                farming_level 4
            }
            material wooden
            construction  6 
            cost  4800 
            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 resource silver or resource gold
        {
            convert_to 0
            capability
            {
                mine_resource 4
            }
            material wooden
            construction  2 
            cost  2000 
            settlement_min large_town
            upgrades
            {
                mines+1
            }
        }
        mines+1 city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and resource silver or resource gold
        {
            convert_to 1
            capability
            {
                mine_resource 7
            }
            material wooden
            construction  3 
            cost  3500 
            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 resource silver or resource gold
        {
            convert_to 0
            capability
            {
                mine_resource 4
            }
            material wooden
            construction  2 
            cost  2000 
            settlement_min large_town
            upgrades
            {
                c_mines+1
            }
        }
        c_mines+1 castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and resource silver or resource gold
        {
            convert_to 1
            capability
            {
                mine_resource 7
            }
            material wooden
            construction  3 
            cost  3500 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building health
{
    levels public_baths aqueduct 
    {
        public_baths city requires factions { greek, }  and building_present_min_level market market
        {
            capability
            {
                population_health_bonus bonus 2
                population_growth_bonus bonus 1
            }
            material wooden
            construction  4 
            cost  800 
            settlement_min large_city
            upgrades
            {
                aqueduct
            }
        }
        aqueduct city requires factions { greek, }  and building_present_min_level market great_market
        {
            capability
            {
                population_health_bonus bonus 4
                population_growth_bonus bonus 2
            }
            material wooden
            construction  6 
            cost  1600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building hospital
{
    levels bimaristan great_bimaristan 
    {
        bimaristan city requires factions { middle_eastern, } 
        {
            capability
            {
                retrain_cost_bonus bonus 1
                population_health_bonus bonus 2
            }
            material wooden
            construction  5 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                great_bimaristan
            }
        }
        great_bimaristan city requires factions { middle_eastern, } 
        {
            capability
            {
                retrain_cost_bonus bonus 2
                population_health_bonus bonus 4
            }
            material wooden
            construction  7 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building academic
{
    levels alchemists_lab alchemy_school university 
    {
        alchemists_lab city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter gunpowder_discovered 1  and building_present_min_level market great_market
        {
            capability
            {
                weapon_missile_gunpowder 1
            }
            material wooden
            construction  3 
            cost  1600 
            settlement_min large_city
            upgrades
            {
                alchemy_school
            }
        }
        alchemy_school city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and event_counter gunpowder_discovered 1  and building_present_min_level market merchants_quarter
        {
            capability
            {
                weapon_missile_gunpowder 1
                weapon_artillery_gunpowder 1
            }
            material wooden
            construction  5 
            cost  3200 
            settlement_min huge_city
            upgrades
            {
                university
            }
        }
        university city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                weapon_projectile 1
            }
            material wooden
            construction  6 
            cost  6400 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_catholic
{
    convert_to temple_catholic_castle
    levels small_church church abbey cathedral huge_cathedral 
    {
        small_church city requires factions {  barons_alliance,  norway, ireland, wales, normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, } 
        {
            convert_to 0
            capability
            {
                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  1 
            cost  800 
            settlement_min town
            upgrades
            {
                church
            }
        }
        church city requires factions {  barons_alliance,  norway,  ireland,  wales, normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, } 
        {
            convert_to 1
            capability
            {
                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  2 
            cost  1600 
            settlement_min large_town
            upgrades
            {
                abbey
            }
        }
        abbey city requires factions {  barons_alliance,  norway,  wales,  ireland, normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, } 
        {
            capability
            {
                agent priest  0  requires factions { hungary, poland, } 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, } 
                happiness_bonus bonus 2
                religion_level bonus 3
                agent_limit priest 2
                pope_disapproval 1
            }
            material wooden
            construction  3 
            cost  3200 
            settlement_min city
            upgrades
            {
                cathedral
            }
        }
        cathedral city requires factions {  barons_alliance,  norway,  wales,  ireland, normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, venice, } 
        {
            capability
            {
                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 norwegian 85
                happiness_bonus bonus 2
                religion_level bonus 4
                agent_limit priest 2
                pope_disapproval 1
                pope_approval 1
                population_health_bonus bonus 1
            }
            material wooden
            construction  4 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                huge_cathedral
            }
        }
        huge_cathedral city requires factions {  barons_alliance,  norway,  wales,  ireland, normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, } 
        {
            capability
            {
                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  1  requires factions { norway, }  and region_religion norwegian 85
                happiness_bonus bonus 3
                religion_level bonus 5
                agent_limit priest 2
                pope_disapproval 1
                pope_approval 1
                population_health_bonus bonus 3
            }
            material wooden
            construction  6 
            cost  10000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_catholic_castle
{
    convert_to temple_catholic
    levels small_chapel chapel 
    {
        small_chapel castle requires factions {  barons_alliance,  norway,  wales,  ireland, normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, } 
        {
            convert_to 0
            capability
            {
                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
                pope_disapproval 1
                agent_limit priest 1
            }
            material wooden
            construction  1 
            cost  800 
            settlement_min town
            upgrades
            {
                chapel
            }
        }
        chapel castle requires factions {  barons_alliance,  norway,  ireland,  wales, normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, } 
        {
            convert_to 1
            capability
            {
                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 3
                agent_limit priest 1
                pope_disapproval 1
            }
            material wooden
            construction  2 
            cost  1600 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_orthodox
{
    convert_to temple_orthodox_castle
    levels small_church_o church_o abbey_o cathedral_o huge_cathedral_o 
    {
        small_church_o city requires factions { russia, byzantium, } 
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions { russia, } 
                agent priest  0  requires factions { byzantium, } 
                happiness_bonus bonus 1
                religion_level bonus 2
                agent_limit priest 1
            }
            material wooden
            construction  1 
            cost  800 
            settlement_min town
            upgrades
            {
                church_o
            }
        }
        church_o city requires factions { russia, byzantium, } 
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions { russia, } 
                agent priest  0  requires factions { byzantium, } 
                happiness_bonus bonus 1
                religion_level bonus 4
                agent_limit priest 1
            }
            material wooden
            construction  2 
            cost  1600 
            settlement_min large_town
            upgrades
            {
                abbey_o
            }
        }
        abbey_o city requires factions { russia, byzantium, } 
        {
            capability
            {
                agent priest  0  requires factions { russia, } 
                agent priest  0  requires factions { byzantium, } 
                happiness_bonus bonus 2
                religion_level bonus 6
                agent_limit priest 2
            }
            material wooden
            construction  3 
            cost  3200 
            settlement_min city
            upgrades
            {
                cathedral_o
            }
        }
        cathedral_o city requires factions { russia, byzantium, } 
        {
            capability
            {
                agent priest  0  requires factions { russia, } 
                agent priest  0  requires factions { byzantium, } 
                happiness_bonus bonus 2
                religion_level bonus 8
                agent_limit priest 2
            }
            material wooden
            construction  4 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                huge_cathedral_o
            }
        }
        huge_cathedral_o city requires factions { russia, byzantium, } 
        {
            capability
            {
                agent priest  0  requires factions { russia, } 
                agent priest  0  requires factions { byzantium, } 
                happiness_bonus bonus 3
                religion_level bonus 10
                agent_limit priest 2
            }
            material wooden
            construction  6 
            cost  10000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_orthodox_castle
{
    convert_to temple_orthodox
    levels small_chapel_o chapel_o 
    {
        small_chapel_o castle requires factions { russia, byzantium, } 
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions { russia, } 
                agent priest  0  requires factions { byzantium, } 
                happiness_bonus bonus 1
                religion_level bonus 4
                agent_limit priest 1
            }
            material wooden
            construction  1 
            cost  800 
            settlement_min town
            upgrades
            {
                chapel_o
            }
        }
        chapel_o castle requires factions { russia, byzantium, } 
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions { russia, } 
                agent priest  0  requires factions { byzantium, } 
                happiness_bonus bonus 1
                religion_level bonus 6
                agent_limit priest 1
            }
            material wooden
            construction  2 
            cost  1600 
            settlement_min large_town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_muslim
{
    convert_to temple_muslim_castle
    levels small_masjid masjid minareted_masjid jama great_jama 
    {
        small_masjid city requires factions { timurids, mongols, egypt, moors, turks, } 
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, } 
                happiness_bonus bonus 1
                religion_level bonus 2
                agent_limit priest 1
            }
            material wooden
            construction  1 
            cost  800 
            settlement_min town
            upgrades
            {
                masjid
            }
        }
        masjid city requires factions { timurids, mongols, egypt, moors, turks, } 
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, } 
                happiness_bonus bonus 1
                religion_level bonus 4
                agent_limit priest 1
            }
            material wooden
            construction  2 
            cost  1600 
            settlement_min large_town
            upgrades
            {
                minareted_masjid
            }
        }
        minareted_masjid city requires factions { timurids, mongols, egypt, moors, turks, } 
        {
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, } 
                happiness_bonus bonus 2
                religion_level bonus 6
                agent_limit priest 2
            }
            material wooden
            construction  3 
            cost  3200 
            settlement_min city
            upgrades
            {
                jama
            }
        }
        jama city requires factions { timurids, mongols, egypt, moors, turks, } 
        {
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, } 
                happiness_bonus bonus 2
                religion_level bonus 8
                agent_limit priest 2
            }
            material wooden
            construction  4 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                great_jama
            }
        }
        great_jama city requires factions { timurids, mongols, egypt, moors, turks, } 
        {
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, } 
                happiness_bonus bonus 3
                religion_level bonus 10
                agent_limit priest 2
            }
            material wooden
            construction  6 
            cost  10000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_muslim_castle
{
    convert_to temple_muslim
    levels c_small_masjid c_masjid 
    {
        c_small_masjid castle requires factions { timurids, mongols, egypt, moors, turks, } 
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, } 
                happiness_bonus bonus 1
                religion_level bonus 4
                agent_limit priest 1
            }
            material wooden
            construction  1 
            cost  800 
            settlement_min town
            upgrades
            {
                c_masjid
            }
        }
        c_masjid castle requires factions { timurids, mongols, egypt, moors, turks, } 
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions { egypt, moors, turks, } 
                happiness_bonus bonus 1
                religion_level bonus 6
                agent_limit priest 1
            }
            material wooden
            construction  2 
            cost  1600 
            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, } 
        {
            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
            }
            material wooden
            construction  2 
            cost  800 
            settlement_min town
            upgrades
            {
                inn
            }
        }
        inn city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            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
            }
            material wooden
            construction  3 
            cost  1600 
            settlement_min large_town
            upgrades
            {
                tavern
            }
        }
        tavern city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            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 3
            }
            material wooden
            construction  4 
            cost  3200 
            settlement_min city
            upgrades
            {
                coaching_house
            }
        }
        coaching_house city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            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 4
            }
            material wooden
            construction  5 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                pleasure_palace
            }
        }
        pleasure_palace city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            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 5
            }
            material wooden
            construction  6 
            cost  10000 
            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, } 
        {
            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
                population_health_bonus bonus 1
            }
            material wooden
            construction  2 
            cost  600 
            settlement_min large_town
            upgrades
            {
                council_chambers
            }
        }
        council_chambers city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            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 2
                population_health_bonus bonus 2
            }
            material wooden
            construction  3 
            cost  1200 
            settlement_min city
            upgrades
            {
                city_hall
            }
        }
        city_hall city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            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 3
                population_health_bonus bonus 4
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min large_city
            upgrades
            {
                mayors_palace
            }
        }
        mayors_palace city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            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 4
                population_health_bonus bonus 5
            }
            material wooden
            construction  5 
            cost  4800 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building art
{
    levels artist_studio artist_gallery 
    {
        artist_studio city requires factions { milan, venice, sicily, } 
        {
            capability
            {
                happiness_bonus bonus 1
            }
            material wooden
            construction  3 
            cost  2400 
            settlement_min large_city
            upgrades
            {
                artist_gallery
            }
        }
        artist_gallery city requires factions { milan, venice, sicily, } 
        {
            capability
            {
                happiness_bonus bonus 2
                population_health_bonus bonus 1
            }
            material wooden
            construction  6 
            cost  4800 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building bullring
{
    levels plaza_del_toro 
    {
        plaza_del_toro city requires factions { portugal, spain, } 
        {
            capability
            {
                happiness_bonus bonus 1
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building bank
{
    levels merchant_bank merchant_vault 
    {
        merchant_bank city requires factions { hre, venice, milan, } 
        {
            capability
            {
                trade_base_income_bonus bonus 2
                agent_limit merchant 1
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                merchant_vault
            }
        }
        merchant_vault city requires factions { hre, venice, milan, } 
        {
            capability
            {
                trade_base_income_bonus bonus 3
                agent_limit merchant 2
            }
            material wooden
            construction  6 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building paper
{
    levels printing_press printing_house 
    {
        printing_press city requires factions { hre, poland, } 
        {
            capability
            {
                happiness_bonus bonus 1
                trade_base_income_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                printing_house
            }
        }
        printing_house city requires factions { hre, poland, } 
        {
            capability
            {
                happiness_bonus bonus 2
                trade_base_income_bonus bonus 4
            }
            material wooden
            construction  6 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building icon_art
{
    levels ikoner_studio master_ikoner_studio 
    {
        ikoner_studio city requires factions { russia, greek, } 
        {
            capability
            {
                population_health_bonus bonus 1
                amplify_religion_level 1.5
            }
            material wooden
            construction  3 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                master_ikoner_studio
            }
        }
        master_ikoner_studio city requires factions { russia, greek, } 
        {
            capability
            {
                population_health_bonus bonus 2
                amplify_religion_level 2
            }
            material wooden
            construction  6 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building music
{
    levels theatre conservatorium 
    {
        theatre city requires factions { france, } 
        {
            capability
            {
                happiness_bonus bonus 1
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                conservatorium
            }
        }
        conservatorium city requires factions { france, } 
        {
            capability
            {
                happiness_bonus bonus 2
            }
            material wooden
            construction  6 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building tourney
{
    levels jousting_lists tourney_fields 
    {
        jousting_lists castle requires factions {  barons_alliance, hre, france, england, portugal, spain, } 
        {
            capability
            {
                heavy_cavalry_bonus bonus 1
            }
            material wooden
            construction  2 
            cost  1600 
            settlement_min city
            upgrades
            {
                tourney_fields
            }
        }
        tourney_fields castle requires factions {  barons_alliance, hre, france, england, portugal, spain, } 
        {
            capability
            {
                happiness_bonus bonus 1
                free_upkeep bonus 1
                heavy_cavalry_bonus bonus 2
            }
            material wooden
            construction  4 
            cost  3200 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building castle_academic
{
    levels library academy 
    {
        library castle requires factions { norway, denmark, scotland, hungary, poland, } 
        {
            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, } 
            }
            material wooden
            construction  3 
            cost  1600 
            settlement_min large_city
            upgrades
            {
                academy
            }
        }
        academy castle requires factions { norway, denmark, scotland, hungary, poland, } 
        {
            capability
            {
                agent spy  0  requires factions { northern_european, } 
                agent diplomat  0  requires factions { northern_european, } 
                agent assassin  0  requires factions { northern_european, } 
                agent spy  0  requires factions { eastern_european, } 
                agent diplomat  0  requires factions { eastern_european, } 
                agent assassin  0  requires factions { eastern_european, } 
            }
            material wooden
            construction  6 
            cost  3200 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building caravan
{
    levels caravan_stop caravanersary 
    {
        caravan_stop castle requires factions { moors, } 
        {
            capability
            {
                trade_level_bonus bonus 2
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                caravanersary
            }
        }
        caravanersary castle requires factions { moors, } 
        {
            capability
            {
                trade_level_bonus bonus 4
            }
            material wooden
            construction  4 
            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, } 
        {
            capability
            {
                law_bonus bonus 1
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                m_assassins_guild
            }
        }
        m_assassins_guild city requires factions { northern_european, eastern_european, greek, southern_european, } 
        {
            capability
            {
                law_bonus bonus 1
            }
            material wooden
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_assassins_guild
            }
        }
        gm_assassins_guild city requires factions { northern_european, eastern_european, greek, southern_european, } 
        {
            capability
            {
                law_bonus bonus 2
            }
            material wooden
            construction  1 
            cost  3000 
            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, } 
        {
            capability
            {
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                m_eastern_assassins_guild
            }
        }
        m_eastern_assassins_guild city requires factions { middle_eastern, } 
        {
            capability
            {
            }
            material wooden
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_eastern_assassins_guild
            }
        }
        gm_eastern_assassins_guild city requires factions { middle_eastern, } 
        {
            capability
            {
            }
            material wooden
            construction  1 
            cost  3000 
            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, } 
        {
            capability
            {
                recruit_pool "Spear Militia"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Wales, } 
                recruit_pool "Cliathairi"  1   0.4   3  0  requires factions { Ireland, } 
                construction_cost_bonus_stone bonus 30
                happiness_bonus bonus 1
            }
            material stone
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                m_masons_guild
            }
        }
        m_masons_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Bill Militia"  1   0.5   4  0  requires factions { england, barons_alliance, } 
                recruit_pool "Heavy Pike Militia"  1   0.5   4  0  requires factions { scotland, } 
                recruit_pool "Swordstaff Militia"  1   0.5   4  0  requires factions { norway, } 
                recruit_pool "Ostmen"  1   0.5   4  0  requires factions { Ireland, } 
                recruit_pool "Meirionnydd Spearmen"  1   0.5   4  0  requires factions { Wales, } 
                construction_cost_bonus_stone bonus 30
                happiness_bonus bonus 1
            }
            faction_capability
            {
                construction_cost_bonus_stone bonus 20
            }
            material stone
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_masons_guild
            }
        }
        gm_masons_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Heavy Bill Militia"  1   0.5   4  0  requires factions { england, barons_alliance, } 
                recruit_pool "Heavy Pike Militia"  1   0.5   4  0  requires factions { scotland, } 
                recruit_pool "Swordstaff Militia"  1   0.5   4  0  requires factions { norway, } 
                recruit_pool "Calivermen"  1   0.5   4  0  requires factions { Ireland, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Meirionnydd Spearmen"  1   0.5   4  0  requires factions { Wales, } 
                construction_cost_bonus_stone bonus 30
                happiness_bonus bonus 2
            }
            faction_capability
            {
                construction_cost_bonus_stone bonus 30
            }
            material stone
            construction  1 
            cost  3000 
            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, } 
        {
            capability
            {
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                m_theologians_guild
            }
        }
        m_theologians_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
            }
            material wooden
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_theologians_guild
            }
        }
        gm_theologians_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
            }
            material wooden
            construction  1 
            cost  3000 
            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, } 
        {
            capability
            {
                recruit_pool "Merchant Cavalry Militia"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, Wales, } 
                trade_base_income_bonus bonus 1
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                m_merchants_guild
            }
        }
        m_merchants_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Merchant Cavalry Militia"  1   0.4   3  0  requires factions { england, barons_alliance, scotland, norway, Ireland, Wales, } 
                trade_base_income_bonus bonus 2
            }
            material wooden
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_merchants_guild
            }
        }
        gm_merchants_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Merchant Cavalry Militia"  1   0.5   4  0  requires factions { england, barons_alliance, } 
                recruit_pool "Merchant Cavalry Militia"  1   0.5   4  1  requires factions { scotland, norway, Ireland, Wales, } 
                trade_base_income_bonus bonus 3
            }
            material wooden
            construction  1 
            cost  3000 
            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, } 
        {
            capability
            {
                gun_bonus 1
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                m_alchemists_guild
            }
        }
        m_alchemists_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                gun_bonus 1
            }
            faction_capability
            {
                gun_bonus 1
            }
            material wooden
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_alchemists_guild
            }
        }
        gm_alchemists_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                gun_bonus 1
            }
            faction_capability
            {
                gun_bonus 2
            }
            material wooden
            construction  1 
            cost  3000 
            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, } 
        {
            capability
            {
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                m_thieves_guild
            }
        }
        m_thieves_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
            }
            material wooden
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_thieves_guild
            }
        }
        gm_thieves_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
            }
            material wooden
            construction  1 
            cost  3000 
            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, } 
        {
            capability
            {
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                m_explorers_guild
            }
        }
        m_explorers_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
            }
            material wooden
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_explorers_guild
            }
        }
        gm_explorers_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
            }
            material wooden
            construction  1 
            cost  3000 
            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, } 
        {
            convert_to 0
            capability
            {
                weapon_melee_blade 1
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                m_swordsmiths_guild
            }
        }
        m_swordsmiths_guild  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 1
            capability
            {
                weapon_melee_blade 1
            }
            faction_capability
            {
                heavy_cavalry_bonus bonus 1
            }
            material wooden
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_swordsmiths_guild
            }
        }
        gm_swordsmiths_guild  requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 2
            capability
            {
                weapon_melee_blade 1
            }
            faction_capability
            {
                heavy_cavalry_bonus bonus 2
            }
            material wooden
            construction  1 
            cost  3000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_templars_chapter_house
{
    convert_to guild_templars_chapter_house
    levels templars_minor_ch templars_major_ch templars_hq 
    {
        templars_minor_ch  requires factions { england, hungary, poland, papal_states, milan, sicily, venice, } 
        {
            convert_to 0
            capability
            {
                recruit_pool "Knights Templar"  1   0.4   3  0  requires factions { england, } 
            }
            material stone
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                templars_major_ch
            }
        }
        templars_major_ch  requires factions { england, hungary, poland, papal_states, milan, sicily, venice, } 
        {
            convert_to 1
            capability
            {
                recruit_pool "Knights Templar"  1   0.4   3  1  requires factions { england, } 
            }
            material stone
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                templars_hq
            }
        }
        templars_hq  requires factions { england, hungary, poland, papal_states, milan, sicily, venice, } 
        {
            convert_to 2
            capability
            {
                recruit_pool "Knights Templar"  1   0.4   3  2  requires factions { england, } 
            }
            material stone
            construction  1 
            cost  3000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_st_johns_chapter_house
{
    convert_to guild_st_johns_chapter_house
    levels st_johns_minor_ch st_johns_major_ch st_johns_hq 
    {
        st_johns_minor_ch  requires factions { hungary, poland, papal_states, milan, sicily, venice, } 
        {
            convert_to 0
            capability
            {
                population_health_bonus bonus 1
            }
            material stone
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                st_johns_major_ch
            }
        }
        st_johns_major_ch  requires factions { hungary, poland, papal_states, milan, sicily, venice, } 
        {
            convert_to 1
            capability
            {
                population_health_bonus bonus 2
            }
            material stone
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                st_johns_hq
            }
        }
        st_johns_hq  requires factions { hungary, poland, papal_states, milan, sicily, venice, } 
        {
            convert_to 2
            capability
            {
                population_health_bonus bonus 3
            }
            material stone
            construction  1 
            cost  3000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_teutonic_knights_chapter_house
{
    convert_to guild_teutonic_knights_chapter_house
    levels teutonic_knights_minor_ch teutonic_knights_major_ch teutonic_knights_hq 
    {
        teutonic_knights_minor_ch  requires factions { hre, } 
        {
            convert_to 0
            capability
            {
            }
            material stone
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                teutonic_knights_major_ch
            }
        }
        teutonic_knights_major_ch  requires factions { hre, } 
        {
            convert_to 1
            capability
            {
            }
            material stone
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                teutonic_knights_hq
            }
        }
        teutonic_knights_hq  requires factions { hre, } 
        {
            convert_to 2
            capability
            {
            }
            material stone
            construction  1 
            cost  3000 
            settlement_min large_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_knights_of_santiago_chapter_house
{
    convert_to guild_knights_of_santiago_chapter_house
    levels knights_of_santiago_minor_ch knights_of_santiago_major_ch knights_of_santiago_hq 
    {
        knights_of_santiago_minor_ch  requires factions { portugal, spain, } 
        {
            convert_to 0
            capability
            {
            }
            material stone
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                knights_of_santiago_major_ch
            }
        }
        knights_of_santiago_major_ch  requires factions { portugal, spain, } 
        {
            convert_to 1
            capability
            {
            }
            material stone
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                knights_of_santiago_hq
            }
        }
        knights_of_santiago_hq  requires factions { portugal, spain, } 
        {
            convert_to 2
            capability
            {
            }
            material stone
            construction  1 
            cost  3000 
            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, } 
        {
            capability
            {
                archer_bonus 1
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                m_woodsmens_guild
            }
        }
        m_woodsmens_guild castle requires factions { england, } 
        {
            capability
            {
                recruit_pool "Saethwyr"  1   0.2   2  0  requires factions { Wales, } 
                archer_bonus 1
            }
            faction_capability
            {
                archer_bonus 1
            }
            material wooden
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_woodsmens_guild
            }
        }
        gm_woodsmens_guild castle requires factions { england, } 
        {
            capability
            {
                recruit_pool "Saethwyr"  1   0.4   3  1  requires factions { Wales, } 
                archer_bonus 1
            }
            faction_capability
            {
                archer_bonus 2
            }
            material wooden
            construction  1 
            cost  3000 
            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 city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                cavalry_bonus 1
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                m_horse_breeders_guild
            }
        }
        m_horse_breeders_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                cavalry_bonus 1
            }
            faction_capability
            {
                cavalry_bonus 1
            }
            material wooden
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_horse_breeders_guild
            }
        }
        gm_horse_breeders_guild city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                cavalry_bonus 1
            }
            faction_capability
            {
                cavalry_bonus 2
            }
            material wooden
            construction  1 
            cost  3000 
            settlement_min huge_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 {  barons_alliance,  norway, ireland, wales, 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 {  barons_alliance,  norway, ireland, wales, 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 {  barons_alliance,  norway, ireland, wales, 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 {  barons_alliance,  norway, ireland, wales, 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 {  barons_alliance,  norway, ireland, wales, 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 {  barons_alliance,  norway, ireland, wales, 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 { barons_alliance, norway, ireland, wales, 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 { barons_alliance, norway, ireland, wales, 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 
    {
    }
}
building temple_pagan
{
    levels high_temple 
    {
        high_temple city requires factions { mesoamerican, } 
        {
            capability
            {
                happiness_bonus bonus 2
                religion_level bonus 10
                law_bonus bonus 5
            }
            material wooden
            construction  1 
            cost  15000 
            settlement_min town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
