;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
            {
                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 "Conquistadores"  1   0.4   3  0  requires factions { spain, portugal, }  and hidden_resource america
                recruit_pool "Dismounted Conquistadores"  1   0.4   3  0  requires factions { spain, portugal, }  and hidden_resource america
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Burgher Pikemen"  1   0.2   2  0  requires factions { teutonic_order, } 
                recruit_pool "EE Town Militia"  1   0.2   2  0  requires factions { poland, hungary, } 
                recruit_pool "EE Archer Militia"  1   0.2   2  0  requires factions { novgorod, russia, } 
                recruit_pool "L Cavalry Militia"  1   0.2   2  0  requires factions { lithuania, } 
                recruit_pool "Italian Militia"  1   0.2   2  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Town Militia"  1   0.2   2  0  requires factions { byzantium, } 
                recruit_pool "ME Town Militia"  1   0.2   2  0  requires factions { moors, turks, mongols, timurids, } 
                recruit_pool "ME Archer Militia"  1   0.2   2  0  requires factions { egypt, } 
                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 "Conquistadores"  1   0.4   3  0  requires factions { spain, portugal, }  and hidden_resource america
                recruit_pool "Papal Guard"  1   0.4   3  0  requires factions { papal_states, } 
                recruit_pool "Dismounted Conquistadores"  1   0.4   3  0  requires factions { spain, portugal, }  and hidden_resource america
                recruit_pool "Aztec Peasants"  1   1   9  0  requires factions { aztecs, } 
                recruit_pool "Aztec Spearmen"  1   0.7   6  0  requires factions { aztecs, } 
                recruit_pool "Aztec Archers"  1   0.7   6  0  requires factions { aztecs, } 
                recruit_pool "Aztec Spear Throwers"  1   0.7   6  0  requires factions { aztecs, } 
                recruit_pool "Aztec Warriors"  1   0.7   6  0  requires factions { aztecs, } 
                recruit_pool "Jaguar Warriors"  1   0.4   3  0  requires factions { aztecs, } 
                recruit_pool "Eagle Warriors"  1   0.4   3  0  requires factions { aztecs, } 
                recruit_pool "Cuahchiqueh"  1   0.4   3  0  requires factions { aztecs, } 
                recruit_pool "Coyote Priests"  1   0.4   3  0  requires factions { aztecs, } 
                recruit_pool "Mongol Infantry"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "Arrow Warriors"  1   0.4   3  0  requires factions { aztecs, } 
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Burgher Pikemen"  1   0.2   2  0  requires factions { teutonic_order, } 
                recruit_pool "EE Town Militia"  1   0.2   2  0  requires factions { poland, hungary, } 
                recruit_pool "EE Archer Militia"  1   0.2   2  0  requires factions { novgorod, russia, } 
                recruit_pool "L Cavalry Militia"  1   0.2   2  0  requires factions { lithuania, } 
                recruit_pool "Italian Militia"  1   0.2   2  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Town Militia"  1   0.2   2  0  requires factions { byzantium, } 
                recruit_pool "ME Town Militia"  1   0.2   2  0  requires factions { moors, turks, mongols, timurids, } 
                recruit_pool "ME Archer Militia"  1   0.2   2  0  requires factions { egypt, } 
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "EE Spear Militia"  0   0.000001   0.999  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Italian Spear Militia"  0   0.000001   0.999  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Spear Militia"  0   0.000001   0.999  0  requires factions { byzantium, } 
                recruit_pool "ME Spear Militia"  0   0.000001   0.999  0  requires factions { moors, egypt, turks, mongols, timurids, } 
                recruit_pool "Jinetes"  1   0.2   2  0  requires factions { portugal, } 
                recruit_pool "Mongol Horse Archers"  1   0.2   2  0  requires factions { mongols, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Conquistadores"  1   0.5   4  1  requires factions { spain, portugal, }  and hidden_resource america
                recruit_pool "Papal Guard"  1   0.5   4  0  requires factions { papal_states, } 
                recruit_pool "Dismounted Conquistadores"  1   0.4   3  1  requires factions { spain, portugal, }  and hidden_resource america
                recruit_pool "Mongol Infantry"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Burgher Pikemen"  1   0.2   2  0  requires factions { teutonic_order, } 
                recruit_pool "EE Town Militia"  1   0.2   2  0  requires factions { poland, hungary, } 
                recruit_pool "EE Archer Militia"  1   0.2   2  0  requires factions { novgorod, russia, } 
                recruit_pool "L Cavalry Militia"  1   0.2   2  0  requires factions { lithuania, } 
                recruit_pool "Italian Militia"  1   0.2   2  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Town Militia"  1   0.2   2  0  requires factions { byzantium, } 
                recruit_pool "ME Town Militia"  1   0.2   2  0  requires factions { moors, turks, mongols, timurids, } 
                recruit_pool "ME Archer Militia"  1   0.2   2  0  requires factions { egypt, } 
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "EE Spear Militia"  0   0.000001   0.999  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Italian Spear Militia"  0   0.000001   0.999  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Spear Militia"  0   0.000001   0.999  0  requires factions { byzantium, } 
                recruit_pool "ME Spear Militia"  0   0.000001   0.999  0  requires factions { moors, egypt, turks, mongols, timurids, } 
                recruit_pool "Crossbow Militia"  0   0.000001   0.999  0  requires factions { hre, denmark, france, spain, portugal, } 
                recruit_pool "Prussian Archers"  0   0.000001   0.999  0  requires factions { teutonic_order, } 
                recruit_pool "EE Crossbow Militia"  0   0.000001   0.999  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Baltic Archers"  0   0.000001   0.999  0  requires factions { lithuania, } 
                recruit_pool "Archer Militia"  0   0.000001   0.999  0  requires factions { england, } 
                recruit_pool "Scots Pike Militia"  0   0.000001   0.999  0  requires factions { scotland, } 
                recruit_pool "Genoese Crossbow Militia"  0   0.000001   0.999  0  requires factions { milan, } 
                recruit_pool "Pavise Crossbow Militia"  0   0.000001   0.999  0  requires factions { venice, papal_states, sicily, hungary, } 
                recruit_pool "S Archer Militia"  0   0.000001   0.999  0  requires factions { byzantium, } 
                recruit_pool "ME Crossbow Militia"  0   0.000001   0.999  0  requires factions { moors, } 
                recruit_pool "Saracen Militia"  0   0.000001   0.999  0  requires factions { egypt, turks, } 
                recruit_pool "Sabadar Militia"  0   0.000001   0.999  0  requires factions { timurids, } 
                recruit_pool "Mongol Horse Archers"  1   0.2   2  0  requires factions { mongols, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Hussars"  1   0.5   4  0  requires factions { poland, hungary, } 
                recruit_pool "Cossack Musketeers"  1   0.5   4  0  requires factions { novgorod, russia, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Conquistadores"  1   0.5   4  1  requires factions { spain, portugal, }  and hidden_resource america
                recruit_pool "Swiss Guard"  1   0.5   4  0  requires factions { papal_states, } 
                recruit_pool "Dismounted Conquistadores"  1   0.7   6  1  requires factions { spain, portugal, }  and hidden_resource america
                recruit_pool "Mongol Infantry"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Town Militia"  1   0.2   2  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Burgher Pikemen"  1   0.2   2  0  requires factions { teutonic_order, } 
                recruit_pool "EE Town Militia"  1   0.2   2  0  requires factions { poland, hungary, } 
                recruit_pool "EE Archer Militia"  1   0.2   2  0  requires factions { novgorod, russia, } 
                recruit_pool "L Cavalry Militia"  1   0.2   2  0  requires factions { lithuania, } 
                recruit_pool "Italian Militia"  1   0.2   2  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Town Militia"  1   0.2   2  0  requires factions { byzantium, } 
                recruit_pool "ME Town Militia"  1   0.2   2  0  requires factions { moors, turks, mongols, timurids, } 
                recruit_pool "ME Archer Militia"  1   0.2   2  0  requires factions { egypt, } 
                recruit_pool "Spear Militia"  0   0.000001   0.999  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "EE Spear Militia"  0   0.000001   0.999  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Italian Spear Militia"  0   0.000001   0.999  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Spear Militia"  0   0.000001   0.999  0  requires factions { byzantium, } 
                recruit_pool "ME Spear Militia"  0   0.000001   0.999  0  requires factions { moors, egypt, turks, mongols, timurids, } 
                recruit_pool "Crossbow Militia"  0   0.000001   0.999  0  requires factions { hre, denmark, france, spain, portugal, } 
                recruit_pool "Prussian Archers"  0   0.000001   0.999  0  requires factions { teutonic_order, } 
                recruit_pool "EE Crossbow Militia"  0   0.000001   0.999  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Baltic Archers"  0   0.000001   0.999  0  requires factions { lithuania, } 
                recruit_pool "Archer Militia"  0   0.000001   0.999  0  requires factions { england, } 
                recruit_pool "Scots Pike Militia"  0   0.000001   0.999  0  requires factions { scotland, } 
                recruit_pool "Genoese Crossbow Militia"  0   0.000001   0.999  0  requires factions { milan, } 
                recruit_pool "Pavise Crossbow Militia"  0   0.000001   0.999  0  requires factions { venice, papal_states, sicily, hungary, } 
                recruit_pool "S Archer Militia"  0   0.000001   0.999  0  requires factions { byzantium, } 
                recruit_pool "ME Crossbow Militia"  0   0.000001   0.999  0  requires factions { moors, } 
                recruit_pool "Saracen Militia"  0   0.000001   0.999  0  requires factions { egypt, turks, } 
                recruit_pool "Sabadar Militia"  0   0.000001   0.999  0  requires factions { timurids, } 
                recruit_pool "Mongol Horse Archers"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "Dismounted Broken Lances"  1   0.4   3  0  requires factions { milan, } 
                recruit_pool "Noble Pikemen"  1   0.4   3  0  requires factions { scotland, } 
                recruit_pool "Scots Guard"  1   0.4   3  0  requires factions { france, } 
                recruit_pool "Christian Guard"  1   0.4   3  0  requires factions { moors, } 
                recruit_pool "Broken Lances"  1   0.5   4  0  requires factions { milan, venice, papal_states, } 
                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 "Mounted Sergeants"  1   0.2   2  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Knechten"  1   0.2   2  0  requires factions { teutonic_order, } 
                recruit_pool "Scouts"  1   0.2   2  0  requires factions { denmark, } 
                recruit_pool "Polish Shooters"  1   0.2   2  0  requires factions { poland, } 
                recruit_pool "Kazaks"  1   0.2   2  0  requires factions { novgorod, russia, } 
                recruit_pool "Tartar Lancers"  1   0.2   2  0  requires factions { lithuania, } 
                recruit_pool "Hobilars"  1   0.2   2  0  requires factions { england, } 
                recruit_pool "Border Horse"  1   0.2   2  0  requires factions { scotland, } 
                recruit_pool "Jinetes"  1   0.2   2  0  requires factions { spain, portugal, } 
                recruit_pool "Magyar Cavalry"  1   0.2   2  0  requires factions { hungary, } 
                recruit_pool "Skythikon"  1   0.2   2  0  requires factions { byzantium, } 
                recruit_pool "Desert Cavalry"  1   0.2   2  0  requires factions { moors, } 
                recruit_pool "Arab Cavalry"  1   0.2   2  0  requires factions { egypt, } 
                recruit_pool "Turkomans"  1   0.2   2  0  requires factions { turks, } 
                recruit_pool "Mongol Horse Archers"  1   0.2   2  0  requires factions { mongols, } 
                recruit_pool "Turkish Horse Archers"  1   0.2   2  0  requires factions { timurids, } 
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { hre, denmark, england, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "Order Militia"  0   0.000001   0.999  0  requires factions { teutonic_order, } 
                recruit_pool "EE Peasants"  0   0.000001   0.999  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Highland Rabble"  0   0.000001   0.999  0  requires factions { scotland, } 
                recruit_pool "Southern Peasants"  0   0.000001   0.999  0  requires factions { sicily, byzantium, } 
                recruit_pool "ME Peasants"  0   0.000001   0.999  0  requires factions { moors, egypt, turks, mongols, timurids, } 
                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 "Mailed Knights"  1   0.2   2  0  requires factions { hre, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Order Spearmen"  1   0.2   2  0  requires factions { teutonic_order, } 
                recruit_pool "Viking Raiders"  1   0.2   2  0  requires factions { denmark, } 
                recruit_pool "Polish Nobles"  1   0.2   2  0  requires factions { poland, } 
                recruit_pool "Boyar Sons"  1   0.2   2  0  requires factions { novgorod, russia, } 
                recruit_pool "Estonian Rebels"  1   0.2   2  0  requires factions { lithuania, } 
                recruit_pool "Hungarian Nobles"  1   0.2   2  0  requires factions { hungary, } 
                recruit_pool "Byzantine Cavalry"  1   0.2   2  0  requires factions { byzantium, } 
                recruit_pool "Arab Cavalry"  1   0.2   2  0  requires factions { moors, } 
                recruit_pool "Mamluk Archers"  1   0.2   2  0  requires factions { egypt, } 
                recruit_pool "Sipahis"  1   0.2   2  0  requires factions { turks, } 
                recruit_pool "Mongol Light Lancers"  1   0.2   2  0  requires factions { mongols, } 
                recruit_pool "Turkomans"  1   0.2   2  0  requires factions { timurids, } 
                recruit_pool "Mounted Sergeants"  1   0.4   3  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Knechten"  1   0.4   3  0  requires factions { teutonic_order, } 
                recruit_pool "Scouts"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "Polish Shooters"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Kazaks"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "Tartar Lancers"  1   0.4   3  0  requires factions { lithuania, } 
                recruit_pool "Hobilars"  1   0.4   3  0  requires factions { england, } 
                recruit_pool "Border Horse"  1   0.4   3  0  requires factions { scotland, } 
                recruit_pool "Jinetes"  1   0.4   3  0  requires factions { spain, portugal, } 
                recruit_pool "Magyar Cavalry"  1   0.4   3  0  requires factions { hungary, } 
                recruit_pool "Skythikon"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "Desert Cavalry"  1   0.4   3  0  requires factions { moors, } 
                recruit_pool "Arab Cavalry"  1   0.4   3  0  requires factions { egypt, } 
                recruit_pool "Turkomans"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "Mongol Horse Archers"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "Turkish Horse Archers"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "Dismounted Polish Nobles"  1   0.2   2  0  requires factions { poland, } 
                recruit_pool "Mongol Infantry"  1   0.2   2  0  requires factions { mongols, } 
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { hre, denmark, england, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "EE Peasants"  0   0.000001   0.999  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Highland Rabble"  0   0.000001   0.999  0  requires factions { scotland, } 
                recruit_pool "Southern Peasants"  0   0.000001   0.999  0  requires factions { sicily, byzantium, } 
                recruit_pool "ME Peasants"  0   0.000001   0.999  0  requires factions { moors, egypt, turks, mongols, timurids, } 
                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 "Sami Axemen"  1   0.2   2  0  requires factions { denmark, }  and event_counter kalmar_question_accepted 1 
                recruit_pool "Druzhina"  1   0.2   2  0  requires factions { novgorod, russia, } 
                recruit_pool "Vardariotai"  1   0.2   2  0  requires factions { byzantium, } 
                recruit_pool "Mongol Heavy Archers"  1   0.2   2  0  requires factions { mongols, timurids, } 
                recruit_pool "Mailed Knights"  1   0.4   3  0  requires factions { hre, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Order Spearmen"  1   0.4   3  0  requires factions { teutonic_order, } 
                recruit_pool "Dismounted Huscarls"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "Polish Nobles"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Boyar Sons"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "Dismounted Tartar Lancers"  1   0.4   3  0  requires factions { lithuania, } 
                recruit_pool "Hungarian Nobles"  1   0.4   3  0  requires factions { hungary, } 
                recruit_pool "Byzantine Cavalry"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "Arab Cavalry"  1   0.4   3  0  requires factions { moors, } 
                recruit_pool "Mamluk Archers"  1   0.4   3  0  requires factions { egypt, } 
                recruit_pool "Sipahis"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "Mongol Light Lancers"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "Turkomans"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "Viking Raiders"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "Dismounted Polish Nobles"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Estonian Rebels"  1   0.4   3  0  requires factions { lithuania, } 
                recruit_pool "Mongol Infantry"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "Mounted Sergeants"  1   0.4   3  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Knechten"  1   0.4   3  0  requires factions { teutonic_order, } 
                recruit_pool "Scouts"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "Polish Shooters"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Kazaks"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "Tartar Lancers"  1   0.4   3  0  requires factions { lithuania, } 
                recruit_pool "Hobilars"  1   0.4   3  0  requires factions { england, } 
                recruit_pool "Border Horse"  1   0.4   3  0  requires factions { scotland, } 
                recruit_pool "Jinetes"  1   0.4   3  0  requires factions { spain, portugal, } 
                recruit_pool "Magyar Cavalry"  1   0.4   3  0  requires factions { hungary, } 
                recruit_pool "Skythikon"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "Desert Cavalry"  1   0.4   3  0  requires factions { moors, } 
                recruit_pool "Arab Cavalry"  1   0.4   3  0  requires factions { egypt, } 
                recruit_pool "Turkomans"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "Mongol Horse Archers"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "Turkish Horse Archers"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { hre, denmark, england, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "Order Militia"  0   0.000001   0.999  0  requires factions { teutonic_order, } 
                recruit_pool "EE Peasants"  0   0.000001   0.999  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Highland Rabble"  0   0.000001   0.999  0  requires factions { scotland, } 
                recruit_pool "Southern Peasants"  0   0.000001   0.999  0  requires factions { sicily, byzantium, } 
                recruit_pool "ME Peasants"  0   0.000001   0.999  0  requires factions { moors, egypt, turks, mongols, timurids, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "Sami Axemen"  1   0.2   2  0  requires factions { denmark, }  and event_counter kalmar_question_accepted 1 
                recruit_pool "Polish Retainers"  1   0.2   2  0  requires factions { poland, } 
                recruit_pool "Druzhina"  1   0.2   2  0  requires factions { novgorod, russia, } 
                recruit_pool "Byzantine Lancers"  1   0.2   2  0  requires factions { byzantium, } 
                recruit_pool "Mongol Heavy Lancers"  1   0.2   2  0  requires factions { mongols, timurids, } 
                recruit_pool "Feudal Knights"  1   0.4   3  0  requires factions { hre, denmark, scotland, france, spain, milan, venice, papal_states, hungary, } 
                recruit_pool "Christ Knights"  1   0.4   3  0  requires factions { teutonic_order, }  and region_religion catholic 70 
                recruit_pool "Dismounted Polish Nobles"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Boyar Sons"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "Dismounted Tartar Lancers"  1   0.4   3  0  requires factions { lithuania, } 
                recruit_pool "Norman Knights"  1   0.4   3  0  requires factions { sicily, } 
                recruit_pool "Vardariotai"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "Granadine Jinetes"  1   0.4   3  0  requires factions { moors, } 
                recruit_pool "Mamluks"  1   0.4   3  0  requires factions { egypt, } 
                recruit_pool "Sipahi Lancers"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "Mongol Heavy Archers"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "Viking Raiders"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "Polish Nobles"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Estonian Rebels"  1   0.4   3  0  requires factions { lithuania, } 
                recruit_pool "Mounted Sergeants"  1   0.4   3  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Knechten"  1   0.4   3  0  requires factions { teutonic_order, } 
                recruit_pool "Scouts"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "Polish Shooters"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Hobilars"  1   0.4   3  0  requires factions { england, } 
                recruit_pool "Border Horse"  1   0.4   3  0  requires factions { scotland, } 
                recruit_pool "Jinetes"  1   0.4   3  0  requires factions { spain, portugal, } 
                recruit_pool "Magyar Cavalry"  1   0.4   3  0  requires factions { hungary, } 
                recruit_pool "Skythikon"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "Desert Cavalry"  1   0.4   3  0  requires factions { moors, } 
                recruit_pool "Arab Cavalry"  1   0.4   3  0  requires factions { egypt, } 
                recruit_pool "Turkomans"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "Mongol Horse Archers"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "Turkish Horse Archers"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { hre, denmark, england, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "Order Militia"  0   0.000001   0.999  0  requires factions { teutonic_order, } 
                recruit_pool "EE Peasants"  0   0.000001   0.999  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Highland Rabble"  0   0.000001   0.999  0  requires factions { scotland, } 
                recruit_pool "Southern Peasants"  0   0.000001   0.999  0  requires factions { sicily, byzantium, } 
                recruit_pool "ME Peasants"  0   0.000001   0.999  0  requires factions { moors, egypt, turks, mongols, timurids, } 
                recruit_pool "Sergeant Spearmen"  0   0.000001   0.999  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Burgher Pikemen"  0   0.000001   0.999  0  requires factions { teutonic_order, } 
                recruit_pool "Viking Raiders"  0   0.000001   0.999  0  requires factions { denmark, } 
                recruit_pool "Woodsmen"  0   0.000001   0.999  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Estonian Rebels"  0   0.000001   0.999  0  requires factions { lithuania, } 
                recruit_pool "Levy Spearmen"  0   0.000001   0.999  0  requires factions { england, } 
                recruit_pool "Highlanders"  0   0.000001   0.999  0  requires factions { scotland, } 
                recruit_pool "Javelinmen"  0   0.000001   0.999  0  requires factions { spain, } 
                recruit_pool "Lusitanian Javelinmen"  0   0.000001   0.999  0  requires factions { portugal, } 
                recruit_pool "Slav Levies"  0   0.000001   0.999  0  requires factions { hungary, } 
                recruit_pool "Byzantine Spearmen"  0   0.000001   0.999  0  requires factions { byzantium, } 
                recruit_pool "Berber Spearmen"  0   0.000001   0.999  0  requires factions { moors, } 
                recruit_pool "Kurdish Javelinmen"  0   0.000001   0.999  0  requires factions { egypt, } 
                recruit_pool "Turkish Javelinmen"  0   0.000001   0.999  0  requires factions { turks, } 
                recruit_pool "ME Levy Spearmen"  0   0.000001   0.999  0  requires factions { mongols, } 
                recruit_pool "Afghan Javelinmen"  0   0.000001   0.999  0  requires factions { timurids, } 
                recruit_pool "Peasant Archers"  0   0.000001   0.999  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "Livonian Auxiliaries"  0   0.000001   0.999  0  requires factions { teutonic_order, } 
                recruit_pool "EE Peasant Archers"  0   0.000001   0.999  0  requires factions { poland, novgorod, lithuania, russia, } 
                recruit_pool "S Peasant Archers"  0   0.000001   0.999  0  requires factions { sicily, hungary, byzantium, } 
                recruit_pool "Sudanese Javelinmen"  0   0.000001   0.999  0  requires factions { moors, } 
                recruit_pool "ME Peasant Archers"  0   0.000001   0.999  0  requires factions { egypt, turks, mongols, timurids, } 
                recruit_pool "Dismounted Feudal Knights"  1   0.4   3  0  requires factions { hre, denmark, scotland, france, spain, milan, venice, papal_states, hungary, } 
                recruit_pool "Sword Brethren"  1   0.4   3  0  requires factions { teutonic_order, } 
                recruit_pool "Dismounted Boyar Sons"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "Dismounted Szlachta"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Dismounted Norman Knights"  1   0.4   3  0  requires factions { sicily, } 
                recruit_pool "Dismounted Arab Cavalry"  1   0.4   3  0  requires factions { moors, egypt, } 
                recruit_pool "Dismounted Sipahi Lancers"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "Dismounted Heavy Archers"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "Dismounted Feudal Knights"  1   0.5   4  0  requires factions { england, portugal, } 
                recruit_pool "Mongol Infantry"  1   0.5   4  0  requires factions { mongols, } 
                recruit_pool "Mailed Knights"  1   0.4   3  0  requires factions { hre, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Order Spearmen"  1   0.4   3  0  requires factions { teutonic_order, } 
                recruit_pool "Dismounted Huscarls"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "Kazaks"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "Tartar Lancers"  1   0.4   3  1  requires factions { lithuania, } 
                recruit_pool "Hungarian Nobles"  1   0.4   3  0  requires factions { hungary, } 
                recruit_pool "Byzantine Cavalry"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "Arab Cavalry"  1   0.4   3  0  requires factions { moors, } 
                recruit_pool "Mamluk Archers"  1   0.4   3  0  requires factions { egypt, } 
                recruit_pool "Sipahis"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "Mongol Light Lancers"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "Turkomans"  1   0.4   3  0  requires factions { timurids, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "Sami Axemen"  1   0.4   3  0  requires factions { denmark, }  and event_counter kalmar_question_accepted 1 
                recruit_pool "Dismounted Polish Knights"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Khan's Guard"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "Imperial Knights"  1   0.4   3  0  requires factions { hre, } 
                recruit_pool "Halbbruder"  1   0.4   3  0  requires factions { teutonic_order, }  and region_religion catholic 80 
                recruit_pool "Polish Retainers"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Noble Swordsmen"  1   0.4   3  0  requires factions { scotland, } 
                recruit_pool "Noble Knights"  1   0.4   3  0  requires factions { france, } 
                recruit_pool "Chivalric Knights"  1   0.4   3  0  requires factions { spain, sicily, } 
                recruit_pool "Italian MAA"  1   0.4   3  0  requires factions { milan, venice, papal_states, } 
                recruit_pool "E Chivalric Knights"  1   0.4   3  0  requires factions { hungary, } 
                recruit_pool "Byzantine Lancers"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "Granadine Lancers"  1   0.4   3  0  requires factions { moors, } 
                recruit_pool "Mongol Heavy Lancers"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "Feudal Knights"  1   0.4   3  0  requires factions { denmark, scotland, } 
                recruit_pool "Polish Knights"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Boyar Sons"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "Dismounted Tartar Lancers"  1   0.4   3  1  requires factions { lithuania, } 
                recruit_pool "Vardariotai"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "Granadine Jinetes"  1   0.4   3  0  requires factions { moors, } 
                recruit_pool "Mamluks"  1   0.4   3  0  requires factions { egypt, } 
                recruit_pool "Sipahi Lancers"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "Mongol Heavy Archers"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "Dismounted Polish Nobles"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Estonian Rebels"  1   0.4   3  0  requires factions { lithuania, } 
                recruit_pool "Mongol Infantry"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "Mounted Sergeants"  1   0.4   3  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Knechten"  1   0.4   3  0  requires factions { teutonic_order, } 
                recruit_pool "Scouts"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "Polish Shooters"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Kazaks"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "Tartar Lancers"  1   0.4   3  1  requires factions { lithuania, } 
                recruit_pool "Hobilars"  1   0.4   3  0  requires factions { england, } 
                recruit_pool "Border Horse"  1   0.4   3  0  requires factions { scotland, } 
                recruit_pool "Jinetes"  1   0.4   3  0  requires factions { spain, portugal, } 
                recruit_pool "Magyar Cavalry"  1   0.4   3  0  requires factions { hungary, } 
                recruit_pool "Skythikon"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "Desert Cavalry"  1   0.4   3  0  requires factions { moors, } 
                recruit_pool "Arab Cavalry"  1   0.4   3  0  requires factions { egypt, } 
                recruit_pool "Turkomans"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "Mongol Horse Archers"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "Turkish Horse Archers"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "Peasants"  0   0.000001   0.999  0  requires factions { hre, denmark, england, france, papal_states, } 
                recruit_pool "Order Militia"  0   0.000001   0.999  0  requires factions { teutonic_order, } 
                recruit_pool "EE Peasants"  0   0.000001   0.999  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Highland Rabble"  0   0.000001   0.999  0  requires factions { scotland, } 
                recruit_pool "Southern Peasants"  0   0.000001   0.999  0  requires factions { sicily, byzantium, } 
                recruit_pool "ME Peasants"  0   0.000001   0.999  0  requires factions { moors, egypt, turks, mongols, timurids, } 
                recruit_pool "Sergeant Spearmen"  0   0.000001   0.999  0  requires factions { hre, france, papal_states, sicily, } 
                recruit_pool "Burgher Pikemen"  0   0.000001   0.999  0  requires factions { teutonic_order, } 
                recruit_pool "Viking Raiders"  0   0.000001   0.999  0  requires factions { denmark, } 
                recruit_pool "Woodsmen"  0   0.000001   0.999  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Estonian Rebels"  0   0.000001   0.999  0  requires factions { lithuania, } 
                recruit_pool "Levy Spearmen"  0   0.000001   0.999  0  requires factions { england, } 
                recruit_pool "Highlanders"  0   0.000001   0.999  0  requires factions { scotland, } 
                recruit_pool "Slav Levies"  0   0.000001   0.999  0  requires factions { hungary, } 
                recruit_pool "Byzantine Spearmen"  0   0.000001   0.999  0  requires factions { byzantium, } 
                recruit_pool "Berber Spearmen"  0   0.000001   0.999  0  requires factions { moors, } 
                recruit_pool "ME Levy Spearmen"  0   0.000001   0.999  0  requires factions { mongols, } 
                recruit_pool "Afghan Javelinmen"  0   0.000001   0.999  0  requires factions { timurids, } 
                recruit_pool "Peasant Archers"  0   0.000001   0.999  0  requires factions { hre, denmark, england, scotland, france, venice, papal_states, } 
                recruit_pool "Livonian Auxiliaries"  0   0.000001   0.999  0  requires factions { teutonic_order, } 
                recruit_pool "EE Peasant Archers"  0   0.000001   0.999  0  requires factions { poland, novgorod, lithuania, russia, } 
                recruit_pool "S Peasant Archers"  0   0.000001   0.999  0  requires factions { sicily, hungary, byzantium, } 
                recruit_pool "Sudanese Javelinmen"  0   0.000001   0.999  0  requires factions { moors, } 
                recruit_pool "ME Peasant Archers"  0   0.000001   0.999  0  requires factions { egypt, turks, mongols, timurids, } 
                recruit_pool "Dismounted Imperial Knights"  1   0.4   3  0  requires factions { hre, } 
                recruit_pool "Dismounted Halbbruder"  1   0.4   3  0  requires factions { teutonic_order, }  and region_religion catholic 80 
                recruit_pool "Dismounted Feudal Knights"  1   0.4   3  0  requires factions { denmark, scotland, } 
                recruit_pool "Dismounted Boyar Sons"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "L Dismounted Chivalric Knights"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Dismounted Noble Knights"  1   0.4   3  0  requires factions { france, } 
                recruit_pool "Dismounted Chivalric Knights"  1   0.4   3  0  requires factions { spain, } 
                recruit_pool "Dismounted Italian MAA"  1   0.4   3  0  requires factions { milan, venice, papal_states, } 
                recruit_pool "Dismounted Norman Knights"  1   0.4   3  0  requires factions { sicily, } 
                recruit_pool "Dismounted E Chivalric Knights"  1   0.4   3  0  requires factions { hungary, } 
                recruit_pool "Dismounted Arab Cavalry"  1   0.4   3  0  requires factions { moors, egypt, } 
                recruit_pool "Dismounted Sipahi Lancers"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "Dismounted Heavy Archers"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "Dismounted English Knights"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "Dismounted Portuguese Knights"  1   0.5   4  0  requires factions { portugal, } 
                recruit_pool "Dismounted Feudal Knights"  1   0.7   6  0  requires factions { hre, england, france, spain, portugal, milan, venice, papal_states, hungary, } 
                recruit_pool "Sword Brethren"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Arab Cavalry"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Mamluk Archers"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "Sipahis"  1   0.7   6  0  requires factions { turks, } 
                recruit_pool "Mongol Light Lancers"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Turkomans"  1   0.7   6  0  requires factions { timurids, } 
                recruit_pool "Feudal Knights"  1   0.4   3  0  requires factions { hre, france, spain, milan, venice, papal_states, } 
                recruit_pool "Christ Knights"  1   0.4   3  0  requires factions { teutonic_order, }  and region_religion catholic 70 
                recruit_pool "Dismounted Huscarls"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "Polish Nobles"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Druzhina"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "Mailed Knights"  1   0.4   3  0  requires factions { england, scotland, } 
                recruit_pool "Norman Knights"  1   0.4   3  0  requires factions { sicily, } 
                recruit_pool "Hungarian Nobles"  1   0.4   3  0  requires factions { hungary, } 
                recruit_pool "Byzantine Cavalry"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "Mailed Knights"  1   0.4   3  0  requires factions { hre, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Order Spearmen"  1   0.4   3  0  requires factions { teutonic_order, } 
                recruit_pool "Feudal Knights"  1   0.4   3  0  requires factions { hungary, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            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 not_pagan_lithuania 1  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, }  and event_counter not_pagan_lithuania 1 
        {
            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 not_pagan_lithuania 1  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 "Mounted Sergeants"  1   0.5   4  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Knechten"  1   0.5   4  0  requires factions { teutonic_order, } 
                recruit_pool "Scouts"  1   0.5   4  0  requires factions { denmark, } 
                recruit_pool "Polish Shooters"  1   0.5   4  0  requires factions { poland, } 
                recruit_pool "Kazaks"  1   0.5   4  0  requires factions { novgorod, russia, } 
                recruit_pool "Tartar Lancers"  1   0.5   4  0  requires factions { lithuania, } 
                recruit_pool "Hobilars"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "Border Horse"  1   0.5   4  0  requires factions { scotland, } 
                recruit_pool "Jinetes"  1   0.5   4  0  requires factions { spain, portugal, } 
                recruit_pool "Magyar Cavalry"  1   0.5   4  0  requires factions { hungary, } 
                recruit_pool "Skythikon"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "Desert Cavalry"  1   0.5   4  0  requires factions { moors, egypt, } 
                recruit_pool "Turkish Horse Archers"  1   0.5   4  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Horse Archers"  1   0.5   4  0  requires factions { mongols, } 
            }
            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 { hre, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Christ Knights"  1   0.5   4  0  requires factions { teutonic_order, }  and region_religion catholic 70 
                recruit_pool "Huscarls"  1   0.5   4  0  requires factions { denmark, } 
                recruit_pool "Polish Nobles"  1   0.5   4  0  requires factions { poland, } 
                recruit_pool "Boyar Sons"  1   0.5   4  0  requires factions { novgorod, russia, } 
                recruit_pool "Cuman Horse Archers"  1   0.5   4  0  requires factions { lithuania, } 
                recruit_pool "Hungarian Nobles"  1   0.5   4  0  requires factions { hungary, } 
                recruit_pool "Byzantine Cavalry"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "Arab Cavalry"  1   0.5   4  0  requires factions { moors, egypt, } 
                recruit_pool "Turkomans"  1   0.5   4  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Light Lancers"  1   0.5   4  0  requires factions { mongols, } 
                recruit_pool "Mounted Sergeants"  1   0.7   6  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Knechten"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Scouts"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Polish Shooters"  1   0.7   6  0  requires factions { poland, } 
                recruit_pool "Kazaks"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Tartar Lancers"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Hobilars"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Border Horse"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Jinetes"  1   0.7   6  0  requires factions { spain, portugal, } 
                recruit_pool "Magyar Cavalry"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Skythikon"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Desert Cavalry"  1   0.7   6  0  requires factions { moors, egypt, } 
                recruit_pool "Turkish Horse Archers"  1   0.7   6  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Horse Archers"  1   0.7   6  0  requires factions { mongols, } 
            }
            material wooden
            construction  3 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                barons_stables
            }
        }
        barons_stables castle requires factions { teutonic_order, scotland, denmark, hre, france, england, middle_eastern, eastern_european, greek, southern_european, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Feudal Knights"  1   0.5   4  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, hungary, } 
                recruit_pool "Halbbruder"  1   0.5   4  0  requires factions { teutonic_order, }  and region_religion catholic 80 
                recruit_pool "Druzhina"  1   0.5   4  0  requires factions { novgorod, russia, } 
                recruit_pool "Dzukijan Horsemen"  1   0.5   4  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Norman Knights"  1   0.5   4  0  requires factions { sicily, } 
                recruit_pool "Byzantine Lancers"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "Granadine Jinetes"  1   0.5   4  0  requires factions { moors, } 
                recruit_pool "Mamluk Archers"  1   0.5   4  0  requires factions { egypt, } 
                recruit_pool "Sipahis"  1   0.5   4  0  requires factions { turks, } 
                recruit_pool "Mongol Heavy Archers"  1   0.5   4  0  requires factions { mongols, timurids, } 
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { hre, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Christ Knights"  1   0.7   6  0  requires factions { teutonic_order, }  and region_religion catholic 70 
                recruit_pool "Huscarls"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Polish Nobles"  1   0.7   6  1  requires factions { poland, } 
                recruit_pool "Boyar Sons"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Cuman Horse Archers"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Hungarian Nobles"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Byzantine Cavalry"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Arab Cavalry"  1   0.7   6  0  requires factions { moors, egypt, } 
                recruit_pool "Turkomans"  1   0.7   6  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Light Lancers"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Mounted Sergeants"  1   0.7   6  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Knechten"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Scouts"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Polish Shooters"  1   0.7   6  0  requires factions { poland, } 
                recruit_pool "Kazaks"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Tartar Lancers"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Hobilars"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Border Horse"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Jinetes"  1   0.7   6  0  requires factions { spain, portugal, } 
                recruit_pool "Magyar Cavalry"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Skythikon"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Desert Cavalry"  1   0.7   6  0  requires factions { moors, egypt, } 
                recruit_pool "Turkish Horse Archers"  1   0.7   6  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Horse Archers"  1   0.7   6  0  requires factions { mongols, } 
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min city
            upgrades
            {
                earls_stables
            }
        }
        earls_stables castle requires factions { teutonic_order, scotland, denmark, hre, france, england, middle_eastern, eastern_european, greek, southern_european, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Svenner"  1   0.4   3  0  requires factions { denmark, }  and event_counter kalmar_question_accepted 1 
                recruit_pool "Hussars"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "Dvor Cavalry"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "Imperial Knights"  1   0.5   4  0  requires factions { hre, } 
                recruit_pool "Ritterbruder"  1   0.5   4  0  requires factions { teutonic_order, }  and region_religion catholic 90 
                recruit_pool "Chivalric Knights"  1   0.5   4  0  requires factions { denmark, france, spain, sicily, } 
                recruit_pool "Polish Knights"  1   0.5   4  0  requires factions { poland, } 
                recruit_pool "Cossack Cavalry"  1   0.5   4  0  requires factions { novgorod, russia, } 
                recruit_pool "Szlachta"  1   0.5   4  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "English Knights"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "Portuguese Knights"  1   0.5   4  0  requires factions { portugal, } 
                recruit_pool "Italian MAA"  1   0.5   4  0  requires factions { milan, venice, papal_states, } 
                recruit_pool "E Chivalric Knights"  1   0.5   4  0  requires factions { hungary, } 
                recruit_pool "Latinkon"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "Granadine Lancers"  1   0.5   4  0  requires factions { moors, } 
                recruit_pool "Mamluks"  1   0.5   4  0  requires factions { egypt, } 
                recruit_pool "Sipahi Lancers"  1   0.5   4  0  requires factions { turks, } 
                recruit_pool "Mongol Heavy Lancers"  1   0.5   4  0  requires factions { mongols, timurids, } 
                recruit_pool "Feudal Knights"  1   0.7   6  0  requires factions { hre, denmark, england, france, spain, portugal, milan, venice, papal_states, hungary, } 
                recruit_pool "Halbbruder"  1   0.7   6  0  requires factions { teutonic_order, }  and region_religion catholic 80 
                recruit_pool "Druzhina"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Dzukijan Horsemen"  1   0.7   6  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Feudal Knights"  1   0.7   6  1  requires factions { scotland, } 
                recruit_pool "Norman Knights"  1   0.7   6  0  requires factions { sicily, } 
                recruit_pool "Byzantine Lancers"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Granadine Jinetes"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Mamluk Archers"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "Sipahis"  1   0.7   6  0  requires factions { turks, } 
                recruit_pool "Mongol Heavy Archers"  1   0.7   6  0  requires factions { mongols, timurids, } 
                recruit_pool "Boyar Sons"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Cuman Horse Archers"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Byzantine Cavalry"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Arab Cavalry"  1   0.7   6  0  requires factions { moors, egypt, } 
                recruit_pool "Turkomans"  1   0.7   6  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Light Lancers"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Mounted Sergeants"  1   0.7   6  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Knechten"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Scouts"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Polish Shooters"  1   0.7   6  0  requires factions { poland, } 
                recruit_pool "Kazaks"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Tartar Lancers"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Hobilars"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Border Horse"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Jinetes"  1   0.7   6  0  requires factions { spain, portugal, } 
                recruit_pool "Magyar Cavalry"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Skythikon"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Desert Cavalry"  1   0.7   6  0  requires factions { moors, egypt, } 
                recruit_pool "Turkish Horse Archers"  1   0.7   6  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Horse Archers"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Elephants"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { hre, england, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Christ Knights"  1   0.7   6  0  requires factions { teutonic_order, }  and region_religion catholic 70 
                recruit_pool "Huscarls"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Polish Nobles"  1   0.7   6  0  requires factions { poland, } 
                recruit_pool "Hungarian Nobles"  1   0.7   6  0  requires factions { hungary, } 
            }
            material wooden
            construction  5 
            cost  9600 
            settlement_min large_city
            upgrades
            {
                kings_stables
            }
        }
        kings_stables castle requires factions { hre, france, middle_eastern, eastern_european, greek, venice, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Gothic Knights"  1   0.5   4  0  requires factions { hre, } 
                recruit_pool "Ritterbruder"  1   0.5   4  0  requires factions { teutonic_order, }  and region_religion catholic 90 
                recruit_pool "Svenner"  1   0.5   4  0  requires factions { denmark, }  and event_counter kalmar_question_accepted 1 
                recruit_pool "Polish Guard"  1   0.5   4  0  requires factions { poland, } 
                recruit_pool "Tsars Guard"  1   0.5   4  0  requires factions { novgorod, russia, } 
                recruit_pool "Lancers"  1   0.5   4  0  requires factions { france, } 
                recruit_pool "Stradiots"  1   0.5   4  0  requires factions { venice, } 
                recruit_pool "Royal Banderium"  1   0.5   4  0  requires factions { hungary, } 
                recruit_pool "Kataphractoi"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "Christian Guard"  1   0.5   4  0  requires factions { moors, } 
                recruit_pool "Royal Mamluks"  1   0.5   4  0  requires factions { egypt, } 
                recruit_pool "Quapukulu"  1   0.5   4  0  requires factions { turks, } 
                recruit_pool "Khan's Guard"  1   0.5   4  0  requires factions { mongols, timurids, } 
                recruit_pool "Reiters"  1   0.5   4  0  requires factions { hre, }  and event_counter gunpowder_discovered 1 
                recruit_pool "L Chivalric Knights"  1   0.5   4  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Imperial Knights"  1   0.7   6  0  requires factions { hre, } 
                recruit_pool "Chivalric Knights"  1   0.7   6  0  requires factions { denmark, france, spain, sicily, } 
                recruit_pool "Polish Knights"  1   0.7   6  0  requires factions { poland, } 
                recruit_pool "Dvor Cavalry"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Szlachta"  1   0.7   6  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "English Knights"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Portuguese Knights"  1   0.7   6  0  requires factions { portugal, } 
                recruit_pool "Italian MAA"  1   0.7   6  0  requires factions { milan, venice, papal_states, } 
                recruit_pool "E Chivalric Knights"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Latinkon"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Granadine Lancers"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Mamluks"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "Sipahi Lancers"  1   0.7   6  0  requires factions { turks, } 
                recruit_pool "Mongol Heavy Lancers"  1   0.7   6  0  requires factions { mongols, timurids, } 
                recruit_pool "Druzhina"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Dzukijan Horsemen"  1   0.7   6  1  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Feudal Knights"  1   0.7   6  1  requires factions { scotland, } 
                recruit_pool "Byzantine Lancers"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Granadine Jinetes"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Mamluk Archers"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "Sipahis"  1   0.7   6  0  requires factions { turks, } 
                recruit_pool "Mongol Heavy Archers"  1   0.7   6  0  requires factions { mongols, timurids, } 
                recruit_pool "Boyar Sons"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Cuman Horse Archers"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Byzantine Cavalry"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Arab Cavalry"  1   0.7   6  0  requires factions { moors, egypt, } 
                recruit_pool "Turkomans"  1   0.7   6  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Light Lancers"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Scouts"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Polish Shooters"  1   0.7   6  0  requires factions { poland, } 
                recruit_pool "Kazaks"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Tartar Lancers"  1   0.7   6  1  requires factions { lithuania, } 
                recruit_pool "Hobilars"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Border Horse"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Mounted Sergeants"  1   0.7   6  0  requires factions { france, milan, venice, papal_states, sicily, } 
                recruit_pool "Jinetes"  1   0.7   6  0  requires factions { spain, portugal, } 
                recruit_pool "Magyar Cavalry"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Skythikon"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Desert Cavalry"  1   0.7   6  0  requires factions { moors, egypt, } 
                recruit_pool "Turkish Horse Archers"  1   0.7   6  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Horse Archers"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Hussars"  1   0.7   6  0  requires factions { poland, } 
                recruit_pool "Cossack Cavalry"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Elephants"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "Elephant Artillery"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "Feudal Knights"  1   0.7   6  0  requires factions { hre, denmark, england, france, spain, portugal, milan, venice, papal_states, hungary, } 
                recruit_pool "Halbbruder"  1   0.7   6  1  requires factions { teutonic_order, } 
                recruit_pool "Norman Knights"  1   0.7   6  0  requires factions { sicily, } 
                recruit_pool "Mailed Knights"  1   0.7   6  0  requires factions { hre, england, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Christ Knights"  1   0.7   6  1  requires factions { teutonic_order, }  and region_religion catholic 70 
                recruit_pool "Huscarls"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Polish Nobles"  1   0.7   6  0  requires factions { poland, } 
                recruit_pool "Hungarian Nobles"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Mounted Sergeants"  1   0.7   6  0  requires factions { hre, } 
                recruit_pool "Knechten"  1   0.7   6  0  requires factions { teutonic_order, } 
            }
            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 { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Order Militia"  1   0.5   4  0  requires factions { teutonic_order, } 
                recruit_pool "EE Town Militia"  1   0.5   4  0  requires factions { poland, lithuania, hungary, } 
                recruit_pool "EE Archer Militia"  1   0.5   4  0  requires factions { novgorod, russia, } 
                recruit_pool "Italian Militia"  1   0.5   4  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Town Militia"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "ME Town Militia"  1   0.5   4  0  requires factions { moors, turks, mongols, timurids, } 
                recruit_pool "ME Archer Militia"  1   0.5   4  0  requires factions { egypt, } 
                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 { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Burgher Pikemen"  1   0.5   4  0  requires factions { teutonic_order, } 
                recruit_pool "EE Spear Militia"  1   0.5   4  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Italian Spear Militia"  1   0.5   4  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Spear Militia"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "ME Spear Militia"  1   0.5   4  0  requires factions { moors, egypt, turks, mongols, timurids, } 
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Order Militia"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "EE Town Militia"  1   0.7   6  0  requires factions { poland, lithuania, hungary, } 
                recruit_pool "EE Archer Militia"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Italian Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Town Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { moors, turks, mongols, timurids, } 
                recruit_pool "ME Archer Militia"  1   0.7   6  0  requires factions { egypt, } 
                law_bonus bonus 2
            }
            material wooden
            construction  3 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                city_watch
            }
        }
        city_watch city requires factions { teutonic_order, denmark, hre, france, scotland, england, middle_eastern, eastern_european, greek, southern_european, } 
        {
            convert_to 3
            capability
            {
                recruit_pool "Crossbow Militia"  1   0.5   4  0  requires factions { hre, teutonic_order, denmark, france, spain, portugal, } 
                recruit_pool "EE Crossbow Militia"  1   0.5   4  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Baltic Archers"  1   0.5   4  0  requires factions { lithuania, } 
                recruit_pool "Archer Militia"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "Scots Pike Militia"  1   0.5   4  0  requires factions { scotland, } 
                recruit_pool "Genoese Crossbow Militia"  1   0.5   4  0  requires factions { milan, } 
                recruit_pool "Pavise Crossbow Militia"  1   0.5   4  0  requires factions { venice, papal_states, sicily, hungary, } 
                recruit_pool "S Archer Militia"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "ME Crossbow Militia"  1   0.5   4  0  requires factions { moors, } 
                recruit_pool "Saracen Militia"  1   0.5   4  0  requires factions { egypt, turks, } 
                recruit_pool "Sabadar Militia"  1   0.5   4  0  requires factions { timurids, } 
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Burgher Pikemen"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "EE Spear Militia"  1   0.7   6  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Italian Spear Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Spear Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Spear Militia"  1   0.7   6  0  requires factions { moors, egypt, turks, timurids, } 
                recruit_pool "ME Spear Militia"  1   0.7   6  1  requires factions { mongols, } 
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Order Militia"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "EE Town Militia"  1   0.7   6  0  requires factions { poland, lithuania, hungary, } 
                recruit_pool "EE Archer Militia"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Italian Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Town Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { moors, turks, timurids, } 
                recruit_pool "ME Archer Militia"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { mongols, } 
                law_bonus bonus 3
            }
            material wooden
            construction  4 
            cost  2400 
            settlement_min city
            upgrades
            {
                militia_drill_square
            }
        }
        militia_drill_square city requires factions { teutonic_order, denmark, hre, france, scotland, england, timurids, moors, egypt, turks, eastern_european, greek, southern_european, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 4
            capability
            {
                recruit_pool "Halberd Militia"  1   0.5   4  0  requires factions { hre, poland, papal_states, sicily, hungary, } 
                recruit_pool "Knechten"  1   0.5   4  0  requires factions { teutonic_order, } 
                recruit_pool "Swordstaff Militia"  1   0.5   4  0  requires factions { denmark, } 
                recruit_pool "EE Cavalry Militia"  1   0.5   4  0  requires factions { novgorod, russia, } 
                recruit_pool "Lettish Crossbowmen"  1   0.5   4  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Bill Militia"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "Heavy Pike Militia"  1   0.5   4  0  requires factions { scotland, } 
                recruit_pool "Partisan Militia"  1   0.5   4  0  requires factions { france, } 
                recruit_pool "Swordsmen Militia"  1   0.5   4  0  requires factions { spain, portugal, } 
                recruit_pool "Italian Cavalry Militia"  1   0.5   4  0  requires factions { milan, venice, } 
                recruit_pool "Byzantine Infantry"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "Urban Militia"  1   0.5   4  0  requires factions { moors, } 
                recruit_pool "ME Halberd Militia"  1   0.5   4  0  requires factions { egypt, turks, timurids, } 
                recruit_pool "Crossbow Militia"  1   0.7   6  0  requires factions { hre, teutonic_order, denmark, france, spain, portugal, } 
                recruit_pool "EE Crossbow Militia"  1   0.7   6  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Baltic Archers"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Scots Pike Militia"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Genoese Crossbow Militia"  1   0.7   6  0  requires factions { milan, } 
                recruit_pool "Pavise Crossbow Militia"  1   0.7   6  0  requires factions { venice, papal_states, sicily, hungary, } 
                recruit_pool "S Archer Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Crossbow Militia"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Saracen Militia"  1   0.7   6  0  requires factions { egypt, turks, } 
                recruit_pool "Sabadar Militia"  1   0.7   6  0  requires factions { timurids, } 
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Burgher Pikemen"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "EE Spear Militia"  1   0.7   6  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Italian Spear Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Spear Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Spear Militia"  1   0.7   6  0  requires factions { moors, egypt, turks, timurids, } 
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Order Militia"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "EE Town Militia"  1   0.7   6  0  requires factions { poland, lithuania, hungary, } 
                recruit_pool "EE Archer Militia"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Italian Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Town Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { moors, turks, timurids, } 
                recruit_pool "ME Archer Militia"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "ME Spear Militia"  1   0.7   6  1  requires factions { mongols, } 
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { mongols, } 
                law_bonus bonus 3
            }
            material wooden
            construction  5 
            cost  4800 
            settlement_min large_city
            upgrades
            {
                militia_barracks
            }
        }
        militia_barracks city requires factions { teutonic_order, denmark, hre, france, england, timurids, moors, egypt, turks, eastern_european, greek, southern_european, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 4
            capability
            {
                recruit_pool "Pike Militia"  1   0.5   4  0  requires factions { hre, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Hand Gunners"  1   0.5   4  0  requires factions { teutonic_order, denmark, poland, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Berdiche Axemen"  1   0.5   4  0  requires factions { novgorod, russia, } 
                recruit_pool "Samogitian Axemen"  1   0.5   4  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Heavy Bill Militia"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "Arquebusiers"  1   0.5   4  0  requires factions { hungary, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Varangian Guard"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "ME Hand Gunners"  1   0.5   4  0  requires factions { moors, turks, timurids, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Tabardariyya"  1   0.5   4  0  requires factions { egypt, } 
                recruit_pool "Hand Gunners"  1   0.5   4  0  requires factions { hre, spain, portugal, milan, venice, papal_states, sicily, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Halberd Militia"  1   0.7   6  0  requires factions { hre, poland, papal_states, sicily, hungary, } 
                recruit_pool "Knechten"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Swordstaff Militia"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "EE Cavalry Militia"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Lettish Crossbowmen"  1   0.7   6  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Bill Militia"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Heavy Pike Militia"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Partisan Militia"  1   0.7   6  0  requires factions { france, } 
                recruit_pool "Swordsmen Militia"  1   0.7   6  0  requires factions { spain, portugal, } 
                recruit_pool "Italian Cavalry Militia"  1   0.7   6  0  requires factions { milan, venice, } 
                recruit_pool "Byzantine Infantry"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Urban Militia"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "ME Halberd Militia"  1   0.7   6  0  requires factions { egypt, turks, timurids, } 
                recruit_pool "Crossbow Militia"  1   0.7   6  0  requires factions { hre, teutonic_order, denmark, france, spain, portugal, } 
                recruit_pool "EE Crossbow Militia"  1   0.7   6  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Baltic Archers"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Scots Pike Militia"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Genoese Crossbow Militia"  1   0.7   6  0  requires factions { milan, } 
                recruit_pool "Pavise Crossbow Militia"  1   0.7   6  0  requires factions { venice, papal_states, sicily, hungary, } 
                recruit_pool "S Archer Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Crossbow Militia"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Saracen Militia"  1   0.7   6  0  requires factions { egypt, turks, } 
                recruit_pool "Sabadar Militia"  1   0.7   6  0  requires factions { timurids, } 
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Burgher Pikemen"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "EE Spear Militia"  1   0.7   6  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Italian Spear Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Spear Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Spear Militia"  1   0.7   6  0  requires factions { moors, egypt, turks, timurids, } 
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Order Militia"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "EE Town Militia"  1   0.7   6  0  requires factions { poland, lithuania, hungary, } 
                recruit_pool "EE Archer Militia"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Italian Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Town Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { moors, turks, timurids, } 
                recruit_pool "ME Archer Militia"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "ME Spear Militia"  1   0.7   6  1  requires factions { mongols, } 
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { mongols, } 
                law_bonus bonus 3
            }
            material wooden
            construction  6 
            cost  9600 
            settlement_min huge_city
            upgrades
            {
                army_barracks
            }
        }
        army_barracks city requires factions { teutonic_order, denmark, hre, france, england, moors, egypt, turks, lithuania, novgorod, poland, russia, southern_european, }  and event_counter not_teutonic 1  and event_counter not_pagan_lithuania 1 
        {
            convert_to 4
            capability
            {
                recruit_pool "Arquebusiers"  1   0.5   4  0  requires factions { hre, denmark, poland, novgorod, england, france, russia, spain, milan, venice, papal_states, sicily, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Lithuanian Arquebusiers"  1   0.5   4  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1  and event_counter gunpowder_discovered 1 
                recruit_pool "Portuguese Arquebusiers"  1   0.5   4  0  requires factions { portugal, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Sudanese Gunners"  1   0.5   4  0  requires factions { moors, egypt, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Janissary Archers"  1   0.5   4  0  requires factions { turks, } 
                recruit_pool "Pikemen"  1   0.5   4  0  requires factions { france, } 
                recruit_pool "Pike Militia"  1   0.7   6  0  requires factions { hre, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Hand Gunners"  1   0.7   6  0  requires factions { teutonic_order, denmark, poland, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Berdiche Axemen"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Samogitian Axemen"  1   0.7   6  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Heavy Bill Militia"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Arquebusiers"  1   0.7   6  0  requires factions { hungary, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Varangian Guard"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Hand Gunners"  1   0.7   6  0  requires factions { moors, turks, timurids, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Tabardariyya"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "Hand Gunners"  1   0.7   6  0  requires factions { hre, spain, portugal, milan, venice, papal_states, sicily, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Halberd Militia"  1   0.7   6  0  requires factions { hre, poland, papal_states, sicily, hungary, } 
                recruit_pool "Knechten"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Swordstaff Militia"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "EE Cavalry Militia"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Lettish Crossbowmen"  1   0.7   6  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Bill Militia"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Heavy Pike Militia"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Partisan Militia"  1   0.7   6  0  requires factions { france, } 
                recruit_pool "Swordsmen Militia"  1   0.7   6  0  requires factions { spain, portugal, } 
                recruit_pool "Italian Cavalry Militia"  1   0.7   6  0  requires factions { milan, venice, } 
                recruit_pool "Byzantine Infantry"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Urban Militia"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "ME Halberd Militia"  1   0.7   6  0  requires factions { egypt, turks, timurids, } 
                recruit_pool "Crossbow Militia"  1   0.7   6  0  requires factions { hre, teutonic_order, denmark, france, spain, portugal, } 
                recruit_pool "EE Crossbow Militia"  1   0.7   6  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Baltic Archers"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Scots Pike Militia"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Genoese Crossbow Militia"  1   0.7   6  0  requires factions { milan, } 
                recruit_pool "Pavise Crossbow Militia"  1   0.7   6  0  requires factions { venice, papal_states, sicily, hungary, } 
                recruit_pool "S Archer Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Crossbow Militia"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Saracen Militia"  1   0.7   6  0  requires factions { egypt, turks, } 
                recruit_pool "Sabadar Militia"  1   0.7   6  0  requires factions { timurids, } 
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Burgher Pikemen"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "EE Spear Militia"  1   0.7   6  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Italian Spear Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Spear Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Spear Militia"  1   0.7   6  0  requires factions { moors, egypt, turks, timurids, } 
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Order Militia"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "EE Town Militia"  1   0.7   6  0  requires factions { poland, lithuania, hungary, } 
                recruit_pool "EE Archer Militia"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Italian Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Town Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { moors, turks, timurids, } 
                recruit_pool "ME Archer Militia"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "ME Spear Militia"  1   0.7   6  1  requires factions { mongols, } 
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { mongols, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 4
            capability
            {
                recruit_pool "Musketeers"  1   0.5   4  0  requires factions { spain, portugal, milan, venice, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Janissary Musketeers"  1   0.5   4  0  requires factions { turks, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Arquebusiers"  1   0.7   6  0  requires factions { hre, denmark, poland, novgorod, england, france, russia, spain, milan, venice, papal_states, sicily, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Lithuanian Arquebusiers"  1   0.7   6  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1  and event_counter gunpowder_discovered 1 
                recruit_pool "Portuguese Arquebusiers"  1   0.7   6  0  requires factions { portugal, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Sudanese Gunners"  1   0.7   6  0  requires factions { moors, egypt, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Janissary Archers"  1   0.7   6  0  requires factions { turks, } 
                recruit_pool "Pikemen"  1   0.7   6  0  requires factions { france, } 
                recruit_pool "Pike Militia"  1   0.7   6  0  requires factions { hre, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Hand Gunners"  1   0.7   6  0  requires factions { denmark, poland, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Berdiche Axemen"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Samogitian Axemen"  1   0.7   6  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Heavy Bill Militia"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Arquebusiers"  1   0.7   6  0  requires factions { hungary, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Varangian Guard"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Hand Gunners"  1   0.7   6  0  requires factions { moors, turks, timurids, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Tabardariyya"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "Hand Gunners"  1   0.7   6  0  requires factions { hre, spain, portugal, milan, venice, papal_states, sicily, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Halberd Militia"  1   0.7   6  0  requires factions { hre, poland, papal_states, sicily, hungary, } 
                recruit_pool "Swordstaff Militia"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "EE Cavalry Militia"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Lettish Crossbowmen"  1   0.7   6  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Bill Militia"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Heavy Pike Militia"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Partisan Militia"  1   0.7   6  0  requires factions { france, } 
                recruit_pool "Swordsmen Militia"  1   0.7   6  0  requires factions { spain, portugal, } 
                recruit_pool "Italian Cavalry Militia"  1   0.7   6  0  requires factions { milan, venice, } 
                recruit_pool "Byzantine Infantry"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Urban Militia"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "ME Halberd Militia"  1   0.7   6  0  requires factions { egypt, turks, timurids, } 
                recruit_pool "Crossbow Militia"  1   0.7   6  0  requires factions { hre, denmark, france, spain, portugal, } 
                recruit_pool "EE Crossbow Militia"  1   0.7   6  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Baltic Archers"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Archer Militia"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Scots Pike Militia"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Genoese Crossbow Militia"  1   0.7   6  0  requires factions { milan, } 
                recruit_pool "Pavise Crossbow Militia"  1   0.7   6  0  requires factions { venice, papal_states, sicily, hungary, } 
                recruit_pool "S Archer Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Crossbow Militia"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Saracen Militia"  1   0.7   6  0  requires factions { egypt, turks, } 
                recruit_pool "Sabadar Militia"  1   0.7   6  0  requires factions { timurids, } 
                recruit_pool "Spear Militia"  1   0.7   6  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "EE Spear Militia"  1   0.7   6  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Italian Spear Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Spear Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Spear Militia"  1   0.7   6  0  requires factions { moors, egypt, turks, timurids, } 
                recruit_pool "Town Militia"  1   0.7   6  0  requires factions { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "EE Town Militia"  1   0.7   6  0  requires factions { poland, lithuania, hungary, } 
                recruit_pool "EE Archer Militia"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Italian Militia"  1   0.7   6  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Town Militia"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { moors, turks, timurids, } 
                recruit_pool "ME Archer Militia"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "ME Spear Militia"  1   0.7   6  1  requires factions { mongols, } 
                recruit_pool "ME Town Militia"  1   0.7   6  0  requires factions { mongols, } 
                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 { hre, teutonic_order, denmark, england, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "EE Peasants"  1   0.5   4  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Highland Rabble"  1   0.5   4  0  requires factions { scotland, } 
                recruit_pool "Southern Peasants"  1   0.5   4  0  requires factions { sicily, byzantium, } 
                recruit_pool "ME Peasants"  1   0.5   4  0  requires factions { moors, egypt, turks, mongols, timurids, } 
            }
            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 "Sergeant Spearmen"  1   0.5   4  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Order Spearmen"  1   0.5   4  0  requires factions { teutonic_order, } 
                recruit_pool "Viking Raiders"  1   0.5   4  0  requires factions { denmark, } 
                recruit_pool "Woodsmen"  1   0.5   4  0  requires factions { novgorod, russia, } 
                recruit_pool "Sudovian Tribesmen"  1   0.5   4  0  requires factions { lithuania, } 
                recruit_pool "Levy Spearmen"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "Highlanders"  1   0.5   4  0  requires factions { scotland, } 
                recruit_pool "Javelinmen"  1   0.5   4  0  requires factions { spain, } 
                recruit_pool "Lusitanian Javelinmen"  1   0.5   4  0  requires factions { portugal, } 
                recruit_pool "Slav Levies"  1   0.5   4  0  requires factions { hungary, } 
                recruit_pool "Byzantine Spearmen"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "Berber Spearmen"  1   0.5   4  0  requires factions { moors, } 
                recruit_pool "Kurdish Javelinmen"  1   0.5   4  0  requires factions { egypt, } 
                recruit_pool "Turkish Javelinmen"  1   0.5   4  0  requires factions { turks, } 
                recruit_pool "ME Levy Spearmen"  1   0.5   4  0  requires factions { mongols, } 
                recruit_pool "Afghan Javelinmen"  1   0.5   4  0  requires factions { timurids, } 
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { hre, teutonic_order, denmark, england, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "EE Peasants"  1   0.7   6  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Highland Rabble"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Southern Peasants"  1   0.7   6  0  requires factions { sicily, byzantium, } 
                recruit_pool "ME Peasants"  1   0.7   6  0  requires factions { moors, egypt, turks, mongols, timurids, } 
            }
            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 "Armored Sergeants"  1   0.5   4  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Sword Brethren"  1   0.5   4  0  requires factions { teutonic_order, } 
                recruit_pool "Norse Swordsmen"  1   0.5   4  0  requires factions { denmark, } 
                recruit_pool "EE Spearmen"  1   0.5   4  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Dismounted Szlachta"  1   0.5   4  0  requires factions { lithuania, } 
                recruit_pool "Billmen"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "Highland Nobles"  1   0.5   4  0  requires factions { scotland, } 
                recruit_pool "Almughavars"  1   0.5   4  0  requires factions { spain, portugal, } 
                recruit_pool "Croat Axemen"  1   0.5   4  0  requires factions { hungary, } 
                recruit_pool "Nubian Spearmen"  1   0.5   4  0  requires factions { moors, egypt, } 
                recruit_pool "Azabs"  1   0.5   4  0  requires factions { turks, } 
                recruit_pool "Mongol Infantry"  1   0.5   4  0  requires factions { mongols, } 
                recruit_pool "Afghan Javelinmen"  1   0.5   4  1  requires factions { timurids, } 
                recruit_pool "Dismounted Halbbruder"  1   0.5   4  0  requires factions { teutonic_order, }  and region_religion catholic 80 
                recruit_pool "Dismounted Huscarls"  1   0.5   4  0  requires factions { denmark, } 
                recruit_pool "Sergeant Spearmen"  1   0.7   6  0  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Order Spearmen"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Woodsmen"  1   0.7   6  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Sudovian Tribesmen"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Levy Spearmen"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Highlanders"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Javelinmen"  1   0.7   6  0  requires factions { spain, } 
                recruit_pool "Lusitanian Javelinmen"  1   0.7   6  0  requires factions { portugal, } 
                recruit_pool "Slav Levies"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Byzantine Spearmen"  1   0.7   6  1  requires factions { byzantium, } 
                recruit_pool "Berber Spearmen"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Kurdish Javelinmen"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "Turkish Javelinmen"  1   0.7   6  0  requires factions { turks, } 
                recruit_pool "ME Levy Spearmen"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { hre, teutonic_order, denmark, england, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "EE Peasants"  1   0.7   6  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Highland Rabble"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Southern Peasants"  1   0.7   6  0  requires factions { sicily, byzantium, } 
                recruit_pool "ME Peasants"  1   0.7   6  0  requires factions { moors, egypt, turks, mongols, timurids, } 
            }
            material wooden
            construction  3 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                barracks
            }
        }
        barracks castle requires factions { teutonic_order, denmark, hre, france, scotland, england, middle_eastern, eastern_european, greek, southern_european, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "Dismounted Halbbruder"  1   0.7   6  0  requires factions { teutonic_order, }  and region_religion catholic 80 
                recruit_pool "Dismounted Huscarls"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Dismounted Szlachta"  1   0.7   6  1  requires factions { lithuania, } 
                recruit_pool "Dismounted Ritterbruder"  1   0.5   4  0  requires factions { teutonic_order, }  and region_religion catholic 90 
                recruit_pool "Norse Axemen"  1   0.5   4  0  requires factions { denmark, } 
                recruit_pool "Dismounted Druchima"  1   0.5   4  0  requires factions { novgorod, russia, } 
                recruit_pool "Armored Swordsmen"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "Highland Pikemen"  1   0.5   4  0  requires factions { scotland, } 
                recruit_pool "Voulgier"  1   0.5   4  0  requires factions { france, } 
                recruit_pool "Venetian Heavy Infantry"  1   0.5   4  0  requires factions { venice, } 
                recruit_pool "Pavise Spearmen"  1   0.5   4  0  requires factions { hungary, } 
                recruit_pool "Lamtuna Spearmen"  1   0.5   4  0  requires factions { moors, } 
                recruit_pool "Naffatun"  1   0.5   4  0  requires factions { egypt, turks, mongols, timurids, } 
                recruit_pool "Armored Sergeants"  1   0.7   6  1  requires factions { hre, france, milan, papal_states, sicily, } 
                recruit_pool "Sword Brethren"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Norse Swordsmen"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "EE Spearmen"  1   0.7   6  1  requires factions { poland, novgorod, russia, } 
                recruit_pool "Dismounted Tartar Lancers"  1   0.7   6  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Billmen"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Highland Nobles"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Almughavars"  1   0.7   6  1  requires factions { spain, portugal, } 
                recruit_pool "Armored Sergeants"  1   0.7   6  0  requires factions { venice, } 
                recruit_pool "Croat Axemen"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Dismounted Byzantine Lancers"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Nubian Spearmen"  1   0.7   6  0  requires factions { moors, egypt, } 
                recruit_pool "Azabs"  1   0.7   6  0  requires factions { turks, } 
                recruit_pool "Mongol Infantry"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Afghan Javelinmen"  1   0.7   6  1  requires factions { timurids, } 
                recruit_pool "Sergeant Spearmen"  1   0.7   6  1  requires factions { hre, france, milan, papal_states, sicily, } 
                recruit_pool "Order Spearmen"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Woodsmen"  1   0.7   6  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Sudovian Tribesmen"  1   0.7   6  1  requires factions { lithuania, } 
                recruit_pool "Levy Spearmen"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Highlanders"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Javelinmen"  1   0.7   6  1  requires factions { spain, } 
                recruit_pool "Lusitanian Javelinmen"  1   0.7   6  1  requires factions { portugal, } 
                recruit_pool "Sergeant Spearmen"  1   0.7   6  0  requires factions { venice, } 
                recruit_pool "Slav Levies"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Byzantine Spearmen"  1   0.7   6  2  requires factions { byzantium, } 
                recruit_pool "Berber Spearmen"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Kurdish Javelinmen"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "Turkish Javelinmen"  1   0.7   6  0  requires factions { turks, } 
                recruit_pool "ME Levy Spearmen"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Peasants"  1   0.1   4  0  requires factions { hre, teutonic_order, denmark, england, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "EE Peasants"  1   0.1   4  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Highland Rabble"  1   0.1   4  0  requires factions { scotland, } 
                recruit_pool "Southern Peasants"  1   0.1   4  0  requires factions { sicily, byzantium, } 
                recruit_pool "ME Peasants"  1   0.1   4  0  requires factions { moors, egypt, turks, mongols, timurids, } 
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min city
            upgrades
            {
                armoury
            }
        }
        armoury castle requires factions { teutonic_order, denmark, hre, france, scotland, england, turks, egypt, moors, hungary, greek, sicily, venice, portugal, spain, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "Noble Swordsmen"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Pikemen"  1   0.7   6  0  requires factions { france, } 
                recruit_pool "Dismounted Broken Lances"  1   0.7   6  0  requires factions { sicily, } 
                recruit_pool "Dismounted Christian Guard"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Obudshaer"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Heavy Billmen"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Noble Pikemen"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Zweihander"  1   0.7   6  0  requires factions { hre, } 
                recruit_pool "Dismounted Halbbruder"  1   0.7   6  0  requires factions { teutonic_order, }  and region_religion catholic 80 
                recruit_pool "Norse Axemen"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Dismounted Druchima"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Armored Swordsmen"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Highland Pikemen"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Voulgier"  1   0.7   6  0  requires factions { france, } 
                recruit_pool "Sword and Buckler Men"  1   0.7   6  0  requires factions { spain, sicily, } 
                recruit_pool "Aventuros"  1   0.7   6  0  requires factions { portugal, } 
                recruit_pool "Venetian Heavy Infantry"  1   0.7   6  1  requires factions { venice, } 
                recruit_pool "Pavise Spearmen"  1   0.7   6  1  requires factions { hungary, } 
                recruit_pool "Dismounted Latinkon"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Lamtuna Spearmen"  1   0.7   6  1  requires factions { moors, } 
                recruit_pool "Naffatun"  1   0.7   6  1  requires factions { egypt, turks, } 
                recruit_pool "Naffatun"  1   0.7   6  0  requires factions { mongols, timurids, } 
                recruit_pool "Dismounted Ritterbruder"  1   0.7   6  0  requires factions { teutonic_order, }  and region_religion catholic 90 
                recruit_pool "Dismounted Huscarls"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Dismounted Szlachta"  1   0.7   6  2  requires factions { lithuania, } 
                recruit_pool "Armored Sergeants"  1   0.7   6  1  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Sword Brethren"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Norse Swordsmen"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "EE Spearmen"  1   0.7   6  1  requires factions { poland, novgorod, russia, } 
                recruit_pool "Dismounted Tartar Lancers"  1   0.7   6  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Billmen"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Highland Nobles"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Almughavars"  1   0.7   6  1  requires factions { spain, portugal, } 
                recruit_pool "Croat Axemen"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Dismounted Byzantine Lancers"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Nubian Spearmen"  1   0.7   6  1  requires factions { moors, egypt, } 
                recruit_pool "Azabs"  1   0.7   6  1  requires factions { turks, } 
                recruit_pool "Mongol Infantry"  1   0.7   6  1  requires factions { mongols, } 
                recruit_pool "Afghan Javelinmen"  1   0.7   6  1  requires factions { timurids, } 
                recruit_pool "Sergeant Spearmen"  1   0.7   6  1  requires factions { hre, france, milan, venice, papal_states, sicily, } 
                recruit_pool "Order Spearmen"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Viking Raiders"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Woodsmen"  1   0.7   6  0  requires factions { poland, novgorod, russia, } 
                recruit_pool "Sudovian Tribesmen"  1   0.7   6  2  requires factions { lithuania, } 
                recruit_pool "Levy Spearmen"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Highlanders"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Javelinmen"  1   0.7   6  1  requires factions { spain, } 
                recruit_pool "Lusitanian Javelinmen"  1   0.7   6  1  requires factions { portugal, } 
                recruit_pool "Slav Levies"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Byzantine Spearmen"  1   0.7   6  3  requires factions { byzantium, } 
                recruit_pool "Berber Spearmen"  1   0.7   6  1  requires factions { moors, } 
                recruit_pool "Kurdish Javelinmen"  1   0.7   6  1  requires factions { egypt, } 
                recruit_pool "Turkish Javelinmen"  1   0.7   6  1  requires factions { turks, } 
                recruit_pool "ME Levy Spearmen"  1   0.7   6  1  requires factions { mongols, } 
                recruit_pool "Peasants"  1   0.7   6  0  requires factions { hre, teutonic_order, denmark, england, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "EE Peasants"  1   0.7   6  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Highland Rabble"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Southern Peasants"  1   0.7   6  0  requires factions { sicily, byzantium, } 
                recruit_pool "ME Peasants"  1   0.7   6  0  requires factions { moors, egypt, turks, mongols, timurids, } 
            }
            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 , england, spain, portugal, } 
        {
            capability
            {
                recruit_pool "Demi Lancers"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "French Mounted Archers"  1   0.5   4  0  requires factions { france, } 
                recruit_pool "Tercio Pikemen"  1   0.5   4  0  requires factions { spain, } 
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min huge_city
            upgrades
            {
                officers_academy
            }
        }
        officers_academy city requires factions { france , england, spain, portugal, } 
        {
            capability
            {
                recruit_pool "Gendarmes"  1   0.7   6  0  requires factions { france, spain, } 
                recruit_pool "Demi Lancers"  1   0.7   6  1  requires factions { england, } 
                recruit_pool "French Mounted Archers"  1   0.7   6  0  requires factions { france, } 
                recruit_pool "Tercio Pikemen"  1   0.7   6  0  requires factions { spain, } 
            }
            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 { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "EE Peasant Archers"  1   0.7   6  0  requires factions { poland, novgorod, lithuania, russia, } 
                recruit_pool "S Peasant Archers"  1   0.7   6  0  requires factions { sicily, hungary, byzantium, } 
                recruit_pool "Sudanese Javelinmen"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "ME Peasant Archers"  1   0.7   6  0  requires factions { egypt, turks, mongols, timurids, } 
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min town
            upgrades
            {
                practice_range
            }
        }
        practice_range castle requires factions { teutonic_order, denmark, hre, scotland, france, england, middle_eastern, eastern_european, greek, southern_european, } 
        {
            capability
            {
                recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { hre, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "Prussian Archers"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Norse Archers"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Lithuanian Archers"  1   0.7   6  0  requires factions { poland, } 
                recruit_pool "Baltic Archers"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Longbowmen"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Highland Archers"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Sicilian Muslim Archers"  1   0.7   6  0  requires factions { sicily, } 
                recruit_pool "Bosnian Archers"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Trebizond Archers"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Desert Archers"  1   0.7   6  0  requires factions { moors, egypt, } 
                recruit_pool "Turkish Archers"  1   0.7   6  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Foot Archers"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "EE Peasant Archers"  1   0.7   6  0  requires factions { poland, } 
                recruit_pool "EE Peasant Archers"  1   0.7   6  1  requires factions { novgorod, lithuania, russia, } 
                recruit_pool "S Peasant Archers"  1   0.7   6  0  requires factions { sicily, hungary, byzantium, } 
                recruit_pool "Sudanese Javelinmen"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "ME Peasant Archers"  1   0.7   6  0  requires factions { egypt, turks, mongols, timurids, } 
            }
            material wooden
            construction  3 
            cost  2400 
            settlement_min large_town
            upgrades
            {
                archery_range
            }
        }
        archery_range castle requires factions { teutonic_order, denmark, hre, scotland, france, england, egypt, turks, moors, eastern_european, greek, southern_european, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Pavise Crossbowmen"  1   0.7   6  0  requires factions { hre, spain, portugal, papal_states, sicily, } 
                recruit_pool "Livonian Auxiliaries"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Crossbowmen"  1   0.7   6  0  requires factions { denmark, france, hungary, } 
                recruit_pool "Dismounted Dvor"  1   0.7   6  0  requires factions { novgorod, russia, } 
                recruit_pool "Lettish Crossbowmen"  1   0.7   6  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Yeoman Archers"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Noble Highland Archers"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Genoese Crossbowmen"  1   0.7   6  0  requires factions { milan, } 
                recruit_pool "Venetian Archers"  1   0.7   6  0  requires factions { venice, } 
                recruit_pool "Byzantine Guard Archers"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Peasant Crossbowmen"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Nubian Archers"  1   0.7   6  0  requires factions { egypt, } 
                recruit_pool "Ottoman Infantry"  1   0.7   6  0  requires factions { turks, } 
                recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { hre, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "Prussian Archers"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Norse Archers"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Lithuanian Archers"  1   0.7   6  0  requires factions { poland, } 
                recruit_pool "Baltic Archers"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Longbowmen"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Highland Archers"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Sicilian Muslim Archers"  1   0.7   6  0  requires factions { sicily, } 
                recruit_pool "Bosnian Archers"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Trebizond Archers"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Desert Archers"  1   0.7   6  0  requires factions { moors, egypt, } 
                recruit_pool "Turkish Archers"  1   0.7   6  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Foot Archers"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "EE Peasant Archers"  1   0.7   6  1  requires factions { poland, novgorod, lithuania, russia, } 
                recruit_pool "S Peasant Archers"  1   0.7   6  0  requires factions { sicily, hungary, byzantium, } 
                recruit_pool "Sudanese Javelinmen"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "ME Peasant Archers"  1   0.7   6  0  requires factions { egypt, turks, mongols, timurids, } 
            }
            material wooden
            construction  4 
            cost  4800 
            settlement_min city
            upgrades
            {
                marksmans_range
            }
        }
        marksmans_range castle requires factions { teutonic_order, denmark, hre, france, england, egypt, turks, moors, southern_european, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Mounted Crossbowmen"  1   0.7   6  0  requires factions { hre, teutonic_order, denmark, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Dismounted Longbowmen"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Aventurier"  1   0.7   6  0  requires factions { france, } 
                recruit_pool "Granadine CB Cav"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Pavise Crossbowmen"  1   0.7   6  0  requires factions { hre, spain, portugal, papal_states, sicily, } 
                recruit_pool "Livonian Auxiliaries"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Crossbowmen"  1   0.7   6  0  requires factions { denmark, france, hungary, } 
                recruit_pool "Lettish Crossbowmen"  1   0.7   6  1  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "Yeoman Archers"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Noble Highland Archers"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Genoese Crossbowmen"  1   0.7   6  0  requires factions { milan, } 
                recruit_pool "Venetian Archers"  1   0.7   6  0  requires factions { venice, } 
                recruit_pool "Byzantine Guard Archers"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "ME Peasant Crossbowmen"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "Nubian Archers"  1   0.7   6  1  requires factions { egypt, } 
                recruit_pool "Ottoman Infantry"  1   0.7   6  1  requires factions { turks, } 
                recruit_pool "Peasant Crossbowmen"  1   0.7   6  0  requires factions { hre, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "Prussian Archers"  1   0.7   6  0  requires factions { teutonic_order, } 
                recruit_pool "Norse Archers"  1   0.7   6  0  requires factions { denmark, } 
                recruit_pool "Lithuanian Archers"  1   0.7   6  1  requires factions { poland, } 
                recruit_pool "Baltic Archers"  1   0.7   6  1  requires factions { lithuania, } 
                recruit_pool "Longbowmen"  1   0.7   6  0  requires factions { england, } 
                recruit_pool "Highland Archers"  1   0.7   6  0  requires factions { scotland, } 
                recruit_pool "Sicilian Muslim Archers"  1   0.7   6  0  requires factions { sicily, } 
                recruit_pool "Bosnian Archers"  1   0.7   6  0  requires factions { hungary, } 
                recruit_pool "Trebizond Archers"  1   0.7   6  0  requires factions { byzantium, } 
                recruit_pool "Desert Archers"  1   0.7   6  0  requires factions { moors, egypt, } 
                recruit_pool "Turkish Archers"  1   0.7   6  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Foot Archers"  1   0.7   6  0  requires factions { mongols, } 
                recruit_pool "Peasant Archers"  1   0.7   6  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "EE Peasant Archers"  1   0.7   6  2  requires factions { poland, } 
                recruit_pool "EE Peasant Archers"  1   0.7   6  1  requires factions { novgorod, lithuania, russia, } 
                recruit_pool "S Peasant Archers"  1   0.7   6  0  requires factions { sicily, hungary, byzantium, } 
                recruit_pool "Sudanese Javelinmen"  1   0.7   6  0  requires factions { moors, } 
                recruit_pool "ME Peasant Archers"  1   0.7   6  0  requires factions { egypt, turks, mongols, timurids, } 
            }
            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 { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Ballista"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "GR Ballista"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Ballista"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Ballista"  1   0.4   3  0  requires factions { mongols, timurids, } 
            }
            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 { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Catapult"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "GR Catapult"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Catapult"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Catapult"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Ballista"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "GR Ballista"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Ballista"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Ballista"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "Mangonel"  1   0.4   3  0  requires factions { teutonic_order, } 
            }
            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 { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Trebuchet"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "GR Trebuchet"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Trebuchet"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Trebuchet"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Catapult"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "GR Catapult"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Catapult"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Catapult"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Ballista"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "GR Ballista"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Ballista"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Ballista"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "Mangonel"  1   0.4   3  0  requires factions { teutonic_order, } 
            }
            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 { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Ballista"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "GR Ballista"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Ballista"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Ballista"  1   0.4   3  0  requires factions { mongols, timurids, } 
            }
            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 { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Catapult"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "GR Catapult"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Catapult"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Catapult"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Ballista"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "GR Ballista"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Ballista"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Ballista"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "Mangonel"  1   0.4   3  0  requires factions { teutonic_order, } 
            }
            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, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "NE Trebuchet"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Trebuchet"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "GR Trebuchet"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Trebuchet"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Trebuchet"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "NE Catapult"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Catapult"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "GR Catapult"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Catapult"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Catapult"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "NE Ballista"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Ballista"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "GR Ballista"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Ballista"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Ballista"  1   0.4   3  0  requires factions { mongols, timurids, } 
                recruit_pool "Mangonel"  1   0.4   3  0  requires factions { teutonic_order, } 
            }
            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 not_pagan_lithuania 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 0
            capability
            {
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { poland, novgorod, russia, hungary, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "GR Bombard"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "AS Bombard"  1   0.4   3  0  requires factions { timurids, } 
            }
            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 not_pagan_lithuania 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 1
            capability
            {
                recruit_pool "NE Grand Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, france, spain, portugal, milan, } 
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Ribault"  1   0.4   3  0  requires factions { poland, hungary, } 
                recruit_pool "EE Grand Bombard"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "EE Grand Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { england, scotland, venice, papal_states, sicily, } 
                recruit_pool "ME Grand Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Grand Bombard"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { poland, novgorod, russia, hungary, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "GR Bombard"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "AS Bombard"  1   0.4   3  0  requires factions { timurids, } 
                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 not_pagan_lithuania 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "NE Cannon"  1   0.4   3  0  requires factions { hre, teutonic_order, sicily, } 
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Serpentine"  1   0.4   3  0  requires factions { poland, hungary, } 
                recruit_pool "EE Serpentine"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { england, scotland, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "EE Cannon"  1   0.4   3  0  requires factions { russia, } 
                recruit_pool "ME Cannon"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Cannon"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { hre, teutonic_order, france, } 
                recruit_pool "NE Cannon"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Cannon"  1   0.4   3  0  requires factions { poland, novgorod, } 
                recruit_pool "EE Cannon"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Grand Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, france, spain, portugal, milan, } 
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Ribault"  1   0.4   3  0  requires factions { poland, hungary, } 
                recruit_pool "EE Grand Bombard"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "EE Grand Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { england, scotland, venice, papal_states, sicily, } 
                recruit_pool "ME Grand Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Grand Bombard"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { poland, novgorod, russia, hungary, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "GR Bombard"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "AS Bombard"  1   0.4   3  0  requires factions { timurids, } 
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  5 
            cost  3200 
            settlement_min huge_city
            upgrades
            {
                royal_arsenal
            }
        }
        royal_arsenal city requires factions { teutonic_order, hre, france, turks, novgorod, hungary, russia, venice, milan, portugal, spain, }  and event_counter not_pagan_lithuania 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "NE Basilisk"  1   0.4   3  0  requires factions { hre, teutonic_order, france, spain, portugal, } 
                recruit_pool "EE Basilisk"  1   0.4   3  0  requires factions { novgorod, russia, hungary, } 
                recruit_pool "NE Monster Ribault"  1   0.4   3  0  requires factions { milan, venice, } 
                recruit_pool "ME Monster Bombard"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "NE Cannon"  1   0.4   3  0  requires factions { hre, teutonic_order, sicily, } 
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Serpentine"  1   0.4   3  0  requires factions { poland, hungary, } 
                recruit_pool "EE Serpentine"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { england, scotland, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "EE Cannon"  1   0.4   3  0  requires factions { russia, } 
                recruit_pool "ME Cannon"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Cannon"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { hre, teutonic_order, france, } 
                recruit_pool "NE Cannon"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Cannon"  1   0.4   3  0  requires factions { poland, novgorod, } 
                recruit_pool "EE Cannon"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Grand Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, france, spain, portugal, milan, } 
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Ribault"  1   0.4   3  0  requires factions { poland, hungary, } 
                recruit_pool "EE Grand Bombard"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "EE Grand Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { england, scotland, venice, papal_states, sicily, } 
                recruit_pool "ME Grand Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Grand Bombard"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { poland, novgorod, russia, hungary, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "GR Bombard"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "AS Bombard"  1   0.4   3  0  requires factions { timurids, } 
                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 not_pagan_lithuania 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 0
            capability
            {
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { poland, novgorod, russia, hungary, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "GR Bombard"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "AS Bombard"  1   0.4   3  0  requires factions { timurids, } 
            }
            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 not_pagan_lithuania 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 1
            capability
            {
                recruit_pool "NE Grand Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, france, spain, portugal, milan, } 
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Ribault"  1   0.4   3  0  requires factions { poland, hungary, } 
                recruit_pool "EE Grand Bombard"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "EE Grand Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { england, scotland, venice, papal_states, sicily, } 
                recruit_pool "ME Grand Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Grand Bombard"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { poland, novgorod, russia, hungary, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "GR Bombard"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "AS Bombard"  1   0.4   3  0  requires factions { timurids, } 
                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 not_pagan_lithuania 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "NE Cannon"  1   0.4   3  0  requires factions { hre, teutonic_order, sicily, } 
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Serpentine"  1   0.4   3  0  requires factions { poland, hungary, } 
                recruit_pool "EE Cannon"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "EE Serpentine"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { england, scotland, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "ME Cannon"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Cannon"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { hre, teutonic_order, france, } 
                recruit_pool "NE Cannon"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Cannon"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "EE Cannon"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Grand Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, france, spain, portugal, milan, } 
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Ribault"  1   0.4   3  0  requires factions { poland, hungary, } 
                recruit_pool "EE Grand Bombard"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "EE Grand Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { england, scotland, venice, papal_states, sicily, } 
                recruit_pool "ME Grand Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Grand Bombard"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { poland, novgorod, russia, hungary, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "GR Bombard"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "AS Bombard"  1   0.4   3  0  requires factions { timurids, } 
                weapon_naval_gunpowder 1
            }
            material wooden
            construction  5 
            cost  3200 
            settlement_min large_city
            upgrades
            {
                c_royal_arsenal
            }
        }
        c_royal_arsenal castle requires factions { teutonic_order, hre, france, turks, novgorod, hungary, russia, venice, milan, portugal, spain, }  and event_counter not_pagan_lithuania 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "NE Basilisk"  1   0.4   3  0  requires factions { hre, teutonic_order, france, spain, portugal, } 
                recruit_pool "EE Basilisk"  1   0.4   3  0  requires factions { novgorod, russia, hungary, } 
                recruit_pool "NE Monster Ribault"  1   0.4   3  0  requires factions { milan, venice, } 
                recruit_pool "ME Monster Bombard"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "NE Cannon"  1   0.4   3  0  requires factions { hre, teutonic_order, sicily, } 
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Serpentine"  1   0.4   3  0  requires factions { poland, hungary, } 
                recruit_pool "EE Cannon"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "EE Serpentine"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Culverin"  1   0.4   3  0  requires factions { england, scotland, france, spain, portugal, milan, venice, papal_states, } 
                recruit_pool "ME Cannon"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Cannon"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "NE Serpentine"  1   0.4   3  0  requires factions { hre, teutonic_order, france, } 
                recruit_pool "NE Cannon"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Cannon"  1   0.4   3  0  requires factions { poland, } 
                recruit_pool "EE Cannon"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Grand Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, france, spain, portugal, milan, } 
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "EE Ribault"  1   0.4   3  0  requires factions { poland, hungary, } 
                recruit_pool "EE Grand Bombard"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "EE Grand Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "NE Mortar"  1   0.4   3  0  requires factions { england, scotland, venice, papal_states, sicily, } 
                recruit_pool "ME Grand Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Grand Bombard"  1   0.4   3  0  requires factions { timurids, } 
                recruit_pool "NE Ribault"  1   0.4   3  0  requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "NE Bombard"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, england, scotland, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { poland, novgorod, russia, hungary, } 
                recruit_pool "EE Bombard"  1   0.4   3  0  requires factions { lithuania, }  and event_counter not_pagan_lithuania 1 
                recruit_pool "GR Bombard"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Bombard"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
                recruit_pool "AS Rocket Launcher"  1   0.4   3  0  requires factions { mongols, } 
                recruit_pool "AS Bombard"  1   0.4   3  0  requires factions { timurids, } 
                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
            {
                recruit_pool "Arab Cavalry"  1   0.5   4  0  requires factions { moors, egypt, } 
                recruit_pool "Turkomans"  1   0.5   4  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Light Lancers"  1   0.5   4  0  requires factions { mongols, } 
                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
            {
                recruit_pool "Arab Cavalry"  1   0.5   4  0  requires factions { moors, egypt, } 
                recruit_pool "Turkomans"  1   0.5   4  0  requires factions { turks, timurids, } 
                recruit_pool "Mongol Light Lancers"  1   0.5   4  0  requires factions { mongols, } 
                recruit_pool "Granadine Jinetes"  1   0.4   3  0  requires factions { moors, } 
                recruit_pool "Mamluk Archers"  1   0.4   3  0  requires factions { egypt, } 
                recruit_pool "Sipahis"  1   0.4   3  0  requires factions { turks, } 
                recruit_pool "Mongol Heavy Archers"  1   0.4   3  0  requires factions { mongols, timurids, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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 {  teutonic_order, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "dhow"  1   1   3  0  requires factions { middle_eastern, } 
                recruit_pool "cog"  1   1   3  0  requires factions {  lithuania, hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { novgorod, 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, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 1
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  teutonic_order, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "holk"  1   1   3  0  requires factions { 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 {  lithuania, hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { novgorod, russia, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "holk"  1   1   3  0  requires factions {  lithuania, novgorod, 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 not_pagan_lithuania 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  teutonic_order, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "holk"  1   1   3  0  requires factions { 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 {  lithuania, hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { novgorod, russia, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "holk"  1   1   3  0  requires factions {  lithuania, novgorod, russia, poland, } 
                recruit_pool "gun holk"  1   1   3  0  requires factions {  lithuania, novgorod, russia, poland, }  and event_counter not_pagan_lithuania 1 
                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 not_pagan_lithuania 1  and event_counter world_is_round 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  teutonic_order, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "holk"  1   1   3  0  requires factions { 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 {  lithuania, hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { novgorod, russia, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "holk"  1   1   3  0  requires factions {  lithuania, novgorod, russia, poland, } 
                recruit_pool "gun holk"  1   1   3  0  requires factions {  lithuania, novgorod, russia, poland, }  and event_counter not_pagan_lithuania 1 
                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 {  teutonic_order, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "dhow"  1   1   3  0  requires factions { middle_eastern, } 
                recruit_pool "cog"  1   1   3  0  requires factions {  lithuania, hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { novgorod, 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 {  teutonic_order, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "holk"  1   1   3  0  requires factions { 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 {  lithuania, hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { novgorod, russia, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "holk"  1   1   3  0  requires factions {  lithuania, novgorod, 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 not_pagan_lithuania 1  and event_counter gunpowder_discovered 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  teutonic_order, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "holk"  1   1   3  0  requires factions { 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 { novgorod, russia, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "holk"  1   1   3  0  requires factions {  lithuania, novgorod, russia, poland, } 
                recruit_pool "gun holk"  1   1   3  0  requires factions { lithuania, novgorod, russia, poland, }  and event_counter not_pagan_lithuania 1 
                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 not_pagan_lithuania 1  and event_counter world_is_round 1 
        {
            convert_to 3
            capability
            {
                recruit_pool "cog"  1   1   3  0  requires factions {  teutonic_order, hre, france, scotland, england, } 
                recruit_pool "longboat"  1   1   3  0  requires factions { denmark, } 
                recruit_pool "holk"  1   1   3  0  requires factions { 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 {  lithuania, hungary, poland, } 
                recruit_pool "ladya"  1   1   3  0  requires factions { novgorod, russia, } 
                recruit_pool "war galley"  1   1   3  0  requires factions { hungary, } 
                recruit_pool "holk"  1   1   3  0  requires factions {  lithuania, novgorod, russia, poland, } 
                recruit_pool "gun holk"  1   1   3  0  requires factions { lithuania, novgorod, russia, poland, }  and event_counter not_pagan_lithuania 1 
                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 event_counter not_pagan_lithuania 1  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 event_counter not_pagan_lithuania 1  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 { denmark, england, portugal, }  and event_counter not_pagan_lithuania 1  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 { denmark, england, portugal, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                weapon_projectile 1
            }
            material wooden
            construction  6 
            cost  6400 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_dievas
{
    convert_to temple_dievas_castle
    religion pagan
    levels dievas_altar dievas_sanctuary dievas_temple 
    {
        dievas_altar city requires factions {  lithuania, }  and event_counter pagan_lithuania 1  and not building_present temple_giltine and not building_present temple_perkunas
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions {  lithuania, } 
                recruit_pool "Dzukijan Horsemen"  1   0.4   3  0  requires factions { lithuania, } 
                population_growth_bonus bonus 2
                happiness_bonus bonus 1
                agent_limit priest 1
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min town
            upgrades
            {
                dievas_sanctuary
            }
        }
        dievas_sanctuary city requires factions {  lithuania, }  and event_counter pagan_lithuania 1  and not building_present temple_giltine and not building_present temple_perkunas
        {
            capability
            {
                agent priest  0  requires factions {  lithuania, } 
                recruit_pool "Dzukijan Horsemen"  1   0.5   4  0  requires factions { lithuania, } 
                recruit_pool "Szlachta"  1   0.2   2  0  requires factions { lithuania, } 
                population_growth_bonus bonus 4
                happiness_bonus bonus 2
                agent_limit priest 1
            }
            material wooden
            construction  2 
            cost  2200 
            settlement_min large_town
            upgrades
            {
                dievas_temple
            }
        }
        dievas_temple city requires factions {  lithuania, }  and event_counter pagan_lithuania 1  and not building_present temple_giltine and not building_present temple_perkunas
        {
            capability
            {
                agent priest  0  requires factions {  lithuania, } 
                recruit_pool "Dzukijan Horsemen"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Szlachta"  1   0.2   2  0  requires factions { lithuania, } 
                recruit_pool "Dievas Guard"  1   0.4   3  0  requires factions { lithuania, } 
                population_growth_bonus bonus 6
                happiness_bonus 3
                agent_limit priest 2
            }
            material wooden
            construction  3 
            cost  4000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_dievas_castle
{
    convert_to temple_dievas
    religion pagan
    levels c_dievas_altar 
    {
        c_dievas_altar castle requires factions {  lithuania, }  and event_counter pagan_lithuania 1  and not building_present temple_giltine and not building_present temple_perkunas
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions {  lithuania, } 
                recruit_pool "Dzukijan Horsemen"  1   0.4   3  0  requires factions { lithuania, } 
                population_growth_bonus bonus 1
                happiness_bonus bonus 1
                agent_limit priest 1
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_perkunas
{
    convert_to temple_perkunas_castle
    religion pagan
    levels perkunas_altar perkunas_sanctuary perkunas_temple 
    {
        perkunas_altar city requires factions {  lithuania, }  and event_counter pagan_lithuania 1  and not building_present temple_giltine and not building_present temple_dievas
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions {  lithuania, } 
                recruit_pool "Lettish Crossbowmen"  1   0.4   3  0  requires factions { lithuania, } 
                population_health_bonus 1
                agent_limit priest 1
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min town
            upgrades
            {
                perkunas_sanctuary
            }
        }
        perkunas_sanctuary city requires factions {  lithuania, }  and event_counter pagan_lithuania 1  and not building_present temple_giltine and not building_present temple_dievas
        {
            capability
            {
                agent priest  0  requires factions {  lithuania, } 
                recruit_pool "Lettish Crossbowmen"  1   0.5   4  0  requires factions { lithuania, } 
                recruit_pool "Szlachta"  1   0.2   2  0  requires factions { lithuania, } 
                weapon_melee_blade 1
                population_health_bonus 2
                agent_limit priest 1
            }
            material wooden
            construction  2 
            cost  2200 
            settlement_min large_town
            upgrades
            {
                perkunas_temple
            }
        }
        perkunas_temple city requires factions {  lithuania, }  and event_counter pagan_lithuania 1  and not building_present temple_giltine and not building_present temple_dievas
        {
            capability
            {
                agent priest  0  requires factions {  lithuania, } 
                recruit_pool "Lettish Crossbowmen"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Szlachta"  1   0.2   2  0  requires factions { lithuania, } 
                recruit_pool "Followers of Perkunas"  1   0.4   3  0  requires factions { lithuania, } 
                weapon_melee_blade 2
                population_health_bonus 3
                agent_limit priest 2
            }
            material wooden
            construction  3 
            cost  4000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_perkunas_castle
{
    convert_to temple_perkunas
    religion pagan
    levels c_perkunas_altar 
    {
        c_perkunas_altar castle requires factions {  lithuania, }  and event_counter pagan_lithuania 1  and not building_present temple_giltine and not building_present temple_dievas
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions {  lithuania, } 
                recruit_pool "Lettish Crossbowmen"  1   0.4   3  0  requires factions { lithuania, } 
                population_health_bonus 1
                agent_limit priest 1
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_giltine
{
    convert_to temple_giltine_castle
    religion pagan
    levels giltine_altar giltine_sanctuary giltine_temple 
    {
        giltine_altar city requires factions {  lithuania, }  and event_counter pagan_lithuania 1  and not building_present temple_perkunas and not building_present temple_dievas
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions {  lithuania, } 
                recruit_pool "Samogitian Axemen"  1   0.4   3  0  requires factions { lithuania, } 
                law_bonus bonus 1
                agent_limit priest 1
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min town
            upgrades
            {
                giltine_sanctuary
            }
        }
        giltine_sanctuary city requires factions {  lithuania, }  and event_counter pagan_lithuania 1  and not building_present temple_perkunas and not building_present temple_dievas
        {
            capability
            {
                agent priest  0  requires factions {  lithuania, } 
                recruit_pool "Samogitian Axemen"  1   0.5   4  0  requires factions { lithuania, } 
                recruit_pool "Szlachta"  1   0.2   2  0  requires factions { lithuania, } 
                law_bonus bonus 2
                agent_limit priest 1
            }
            material wooden
            construction  2 
            cost  2200 
            settlement_min large_town
            upgrades
            {
                giltine_temple
            }
        }
        giltine_temple city requires factions {  lithuania, }  and event_counter pagan_lithuania 1  and not building_present temple_perkunas and not building_present temple_dievas
        {
            capability
            {
                agent priest  0  requires factions {  lithuania, } 
                recruit_pool "Samogitian Axemen"  1   0.7   6  0  requires factions { lithuania, } 
                recruit_pool "Szlachta"  1   0.2   2  0  requires factions { lithuania, } 
                recruit_pool "Giltines Chosen"  1   0.4   3  0  requires factions { lithuania, } 
                law_bonus bonus 3
                recruits_morale_bonus bonus 1
                agent_limit priest 2
            }
            material wooden
            construction  3 
            cost  4000 
            settlement_min city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_giltine_castle
{
    convert_to temple_giltine
    religion pagan
    levels c_giltine_altar 
    {
        c_giltine_altar castle requires factions {  lithuania, }  and event_counter pagan_lithuania 1  and not building_present temple_perkunas and not building_present temple_dievas
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions {  lithuania, } 
                recruit_pool "Samogitian Axemen"  1   0.4   3  0  requires factions { lithuania, } 
                law_bonus bonus 1
                agent_limit priest 1
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min town
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building temple_catholic
{
    convert_to temple_catholic_castle
    religion catholic
    levels small_church church abbey cathedral huge_cathedral 
    {
        small_church city requires factions {  teutonic_order, normans, denmark, hre, scotland, france, england,  lithuania, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions { teutonic_order, normans, denmark, scotland, hre, france, england, } 
                agent priest  0  requires factions {  lithuania, hungary, poland, }  and event_counter not_pagan_lithuania 1 
                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 {  teutonic_order, normans, denmark, hre, scotland, france, england,  lithuania, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions { teutonic_order, normans, denmark, scotland, hre, france, england, } 
                agent priest  0  requires factions {  lithuania, hungary, poland, }  and event_counter not_pagan_lithuania 1 
                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 { teutonic_order, normans, denmark, hre, scotland, france, england,  lithuania, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                agent priest  0  requires factions { teutonic_order, normans, denmark, scotland, hre, france, england, } 
                agent priest  0  requires factions {  lithuania, hungary, poland, }  and event_counter not_pagan_lithuania 1 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, } 
                recruit_pool "Armored Clergy"  1   0.2   2  0  requires factions { denmark, } 
                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 {  teutonic_order, normans, denmark, hre, scotland, france, england,  lithuania, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, venice, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                agent priest  0  requires factions { teutonic_order, normans, denmark, scotland, hre, france, england, } 
                agent priest  0  requires factions {  lithuania, hungary, poland, }  and event_counter not_pagan_lithuania 1 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, } 
                recruit_pool "Armored Clergy"  1   0.4   3  0  requires factions { denmark, } 
                recruit_pool "Clergymen"  1   0.2   2  0  requires factions { teutonic_order, }  and region_religion catholic 80 
                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 {  teutonic_order, normans, denmark, hre, scotland, france, england,  lithuania, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                agent priest  0  requires factions { teutonic_order, normans, denmark, scotland, hre, france, england, } 
                agent priest  0  requires factions {  lithuania, hungary, poland, }  and event_counter not_pagan_lithuania 1 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, } 
                recruit_pool "Armored Clergy"  1   0.4   3  1  requires factions { denmark, } 
                recruit_pool "Clergymen"  1   0.4   3  0  requires factions { teutonic_order, }  and region_religion catholic 80 
                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
    religion catholic
    levels small_chapel chapel 
    {
        small_chapel castle requires factions {  teutonic_order, normans, denmark, hre, scotland, france, england,  lithuania, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions { teutonic_order, normans, denmark, scotland, hre, france, england, } 
                agent priest  0  requires factions {  lithuania, hungary, poland, }  and event_counter not_pagan_lithuania 1 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, } 
                recruit_pool "Clergymen"  1   0.2   2  0  requires factions { teutonic_order, }  and region_religion catholic 80 
                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 {  teutonic_order, normans, denmark, hre, scotland, france, england,  lithuania, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions { teutonic_order, normans, denmark, scotland, hre, france, england, } 
                agent priest  0  requires factions {  lithuania, hungary, poland, }  and event_counter not_pagan_lithuania 1 
                agent priest  0  requires factions { papal_states, portugal, spain, sicily, milan, venice, } 
                recruit_pool "Clergymen"  1   0.4   3  0  requires factions { teutonic_order, }  and region_religion catholic 80 
                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
    religion orthodox
    levels small_church_o church_o abbey_o cathedral_o huge_cathedral_o 
    {
        small_church_o city requires factions { novgorod, russia, byzantium, } 
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions {  novgorod,  lithuania, 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 { novgorod, russia, byzantium, } 
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions { novgorod, 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 { novgorod, russia, byzantium, } 
        {
            capability
            {
                agent priest  0  requires factions { novgorod, 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 { novgorod, russia, byzantium, } 
        {
            capability
            {
                agent priest  0  requires factions { novgorod, 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 {  novgorod, russia, byzantium, } 
        {
            capability
            {
                agent priest  0  requires factions {  novgorod, 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
    religion orthodox
    levels small_chapel_o chapel_o 
    {
        small_chapel_o castle requires factions {  novgorod, russia, byzantium, } 
        {
            convert_to 0
            capability
            {
                agent priest  0  requires factions {  lithuania,  novgorod, 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 { novgorod, russia, byzantium, } 
        {
            convert_to 1
            capability
            {
                agent priest  0  requires factions { novgorod, 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
    religion islam
    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
    religion islam
    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 {  norway,  hre,  poland,  denmark, 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 {  norway,  hre,  poland,  denmark, 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 {  norway,  hre,  poland,  denmark, 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, } 
                recruit_pool "Transilvanian Peasants"  1   0.4   3  0  requires factions { hungary, } 
                happiness_bonus bonus 3
            }
            material wooden
            construction  4 
            cost  3200 
            settlement_min city
            upgrades
            {
                coaching_house
            }
        }
        coaching_house city requires factions {  norway,  hre,  poland,  denmark, middle_eastern, eastern_european, greek, southern_european, }  and event_counter not_pagan_lithuania 1 
        {
            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, } 
                recruit_pool "Transilvanian Peasants"  1   0.5   4  0  requires factions { hungary, } 
                happiness_bonus bonus 4
            }
            material wooden
            construction  5 
            cost  6400 
            settlement_min large_city
            upgrades
            {
                pleasure_palace
            }
        }
        pleasure_palace city requires factions {  norway,  hre,  poland,  denmark, middle_eastern, eastern_european, greek, southern_european, }  and event_counter not_pagan_lithuania 1 
        {
            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, } 
                recruit_pool "Transilvanian Peasants"  1   0.5   4  0  requires factions { hungary, } 
                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, } 
                recruit_pool "Carroccio Standard M"  1   0.2   2  0  requires factions { milan, } 
                recruit_pool "Carroccio Standard V"  1   0.2   2  0  requires factions { venice, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                agent diplomat  0  requires factions { northern_european, } 
                agent diplomat  0  requires factions { middle_eastern, } 
                agent diplomat  0  requires factions { eastern_european, } 
                agent diplomat  0  requires factions { greek, } 
                agent diplomat  0  requires factions { southern_european, } 
                recruit_pool "Carroccio Standard M"  1   0.2   2  0  requires factions { milan, } 
                recruit_pool "Carroccio Standard V"  1   0.2   2  0  requires factions { venice, } 
                recruit_pool "Janissary Heavy Inf"  1   0.4   3  0  requires factions { turks, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                agent diplomat  0  requires factions { northern_european, } 
                agent diplomat  0  requires factions { middle_eastern, } 
                agent diplomat  0  requires factions { eastern_european, } 
                agent diplomat  0  requires factions { greek, } 
                agent diplomat  0  requires factions { southern_european, } 
                recruit_pool "Forlorn Hope"  1   0.4   3  0  requires factions { hre, } 
                recruit_pool "Carroccio Standard M"  1   0.4   3  0  requires factions { milan, } 
                recruit_pool "Carroccio Standard V"  1   0.4   3  0  requires factions { venice, } 
                recruit_pool "Famiglia Ducale"  1   0.5   4  0  requires factions { milan, } 
                recruit_pool "Janissary Heavy Inf"  1   0.5   4  0  requires factions { turks, } 
                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
            {
                recruit_pool "Jinetes"  1   0.5   4  0  requires factions { spain, portugal, } 
                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 {  novgorod, 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 { novgorod, 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 {  teutonic_order, 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 { teutonic_order, 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 { teutonic_order, scotland, hungary, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                agent spy  0  requires factions { northern_european, } 
                agent diplomat  0  requires factions { northern_european, } 
                agent spy  0  requires factions { eastern_european, } 
                agent diplomat  0  requires factions { eastern_european, } 
            }
            material wooden
            construction  3 
            cost  1600 
            settlement_min large_town
            upgrades
            {
                academy
            }
        }
        academy castle requires factions { teutonic_order, scotland, hungary, }  and event_counter not_pagan_lithuania 1 
        {
            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 city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building caravan
{
    levels caravan_stop caravanersary 
    {
        caravan_stop castle requires factions { moors, } 
        {
            capability
            {
                recruit_pool "Tuareg Camel Spearmens"  1   0.5   4  0  requires factions { moors, } 
                trade_level_bonus bonus 2
            }
            material wooden
            construction  2 
            cost  1200 
            settlement_min large_town
            upgrades
            {
                caravanersary
            }
        }
        caravanersary castle requires factions { moors, } 
        {
            capability
            {
                recruit_pool "Tuareg Camel Spearmens"  1   0.5   4  0  requires factions { moors, } 
                recruit_pool "Camel Gunners"  1   0.4   3  0  requires factions { moors, }  and event_counter gunpowder_discovered 1 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Battlefield Assassins"  1   0.4   3  0  requires factions { hungary, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Battlefield Assassins"  1   0.4   3  1  requires factions { hungary, } 
                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
            {
                recruit_pool "Hashishim"  1   0.4   3  0  requires factions { moors, egypt, turks, } 
            }
            material wooden
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                m_eastern_assassins_guild
            }
        }
        m_eastern_assassins_guild city requires factions { middle_eastern, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Hashishim"  1   0.4   3  1  requires factions { moors, egypt, turks, } 
            }
            material wooden
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_eastern_assassins_guild
            }
        }
        gm_eastern_assassins_guild city requires factions { middle_eastern, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Hashishim"  1   0.4   3  2  requires factions { moors, egypt, turks, } 
            }
            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 { hre, denmark, england, scotland, france, spain, portugal, } 
                recruit_pool "Order Militia"  1   0.4   3  0  requires factions { teutonic_order, } 
                recruit_pool "EE Spear Militia"  1   0.4   3  0  requires factions { poland, novgorod, lithuania, russia, hungary, } 
                recruit_pool "Italian Spear Militia"  1   0.4   3  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "SE Spear Militia"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "ME Spear Militia"  1   0.4   3  0  requires factions { moors, egypt, turks, mongols, timurids, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Halberd Militia"  1   0.5   4  0  requires factions { hre, poland, papal_states, sicily, hungary, } 
                recruit_pool "Burgher Pikemen"  1   0.5   4  0  requires factions { teutonic_order, } 
                recruit_pool "Swordstaff Militia"  1   0.5   4  0  requires factions { denmark, } 
                recruit_pool "EE Spear Militia"  1   0.5   4  0  requires factions { novgorod, lithuania, russia, } 
                recruit_pool "Bill Militia"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "Heavy Pike Militia"  1   0.5   4  0  requires factions { scotland, } 
                recruit_pool "Partisan Militia"  1   0.5   4  0  requires factions { france, } 
                recruit_pool "Swordsmen Militia"  1   0.5   4  0  requires factions { spain, portugal, } 
                recruit_pool "Italian Spear Militia"  1   0.5   4  0  requires factions { milan, venice, } 
                recruit_pool "Byzantine Infantry"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "Urban Militia"  1   0.5   4  0  requires factions { moors, } 
                recruit_pool "ME Halberd Militia"  1   0.5   4  0  requires factions { egypt, turks, timurids, } 
                recruit_pool "ME Spear Militia"  1   0.5   4  0  requires factions { mongols, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Pike Militia"  1   0.5   4  0  requires factions { hre, france, spain, portugal, milan, venice, papal_states, sicily, } 
                recruit_pool "Hand Gunners"  1   0.5   4  0  requires factions { teutonic_order, }  and event_counter gunpowder_discovered 1 
                recruit_pool "Swordstaff Militia"  1   0.5   4  0  requires factions { denmark, } 
                recruit_pool "Halberd Militia"  1   0.5   4  0  requires factions { poland, hungary, } 
                recruit_pool "Berdiche Axemen"  1   0.5   4  0  requires factions { novgorod, russia, } 
                recruit_pool "Samogitian Axemen"  1   0.5   4  0  requires factions { lithuania, } 
                recruit_pool "Heavy Bill Militia"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "Heavy Pike Militia"  1   0.5   4  0  requires factions { scotland, } 
                recruit_pool "Byzantine Infantry"  1   0.5   4  0  requires factions { byzantium, } 
                recruit_pool "Urban Militia"  1   0.5   4  0  requires factions { moors, } 
                recruit_pool "ME Halberd Militia"  1   0.5   4  0  requires factions { egypt, turks, timurids, } 
                recruit_pool "ME Spear Militia"  1   0.5   4  0  requires factions { mongols, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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 { hre, teutonic_order, denmark, poland, england, scotland, france, spain, portugal, hungary, } 
                recruit_pool "EE Cavalry Militia"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "L Cavalry Militia"  1   0.4   3  0  requires factions { lithuania, } 
                recruit_pool "Italian Cavalry Militia"  1   0.4   3  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "Greek Militia Cavalry"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "Arab Cavalry"  1   0.4   3  0  requires factions { moors, egypt, } 
                recruit_pool "Sipahis"  1   0.4   3  0  requires factions { turks, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Merchant Cavalry Militia"  1   0.4   3  0  requires factions { hre, teutonic_order, denmark, poland, england, scotland, france, spain, portugal, hungary, } 
                recruit_pool "EE Cavalry Militia"  1   0.4   3  0  requires factions { novgorod, russia, } 
                recruit_pool "L Cavalry Militia"  1   0.4   3  0  requires factions { lithuania, } 
                recruit_pool "Italian Cavalry Militia"  1   0.4   3  0  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "Greek Militia Cavalry"  1   0.4   3  0  requires factions { byzantium, } 
                recruit_pool "Arab Cavalry"  1   0.4   3  0  requires factions { moors, egypt, } 
                recruit_pool "Sipahis"  1   0.4   3  0  requires factions { turks, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Merchant Cavalry Militia"  1   0.5   4  1  requires factions { hre, teutonic_order, denmark, poland, scotland, france, spain, portugal, hungary, } 
                recruit_pool "EE Cavalry Militia"  1   0.5   4  1  requires factions { novgorod, russia, } 
                recruit_pool "L Cavalry Militia"  1   0.5   4  1  requires factions { lithuania, } 
                recruit_pool "Merchant Cavalry Militia"  1   0.5   4  0  requires factions { england, } 
                recruit_pool "Italian Cavalry Militia"  1   0.5   4  1  requires factions { milan, venice, papal_states, sicily, } 
                recruit_pool "Greek Militia Cavalry"  1   0.5   4  1  requires factions { byzantium, } 
                recruit_pool "Arab Cavalry"  1   0.5   4  1  requires factions { moors, egypt, } 
                recruit_pool "Sipahis"  1   0.5   4  1  requires factions { turks, } 
                trade_base_income_bonus bonus 3
            }
            material wooden
            construction  1 
            cost  3000 
            settlement_min huge_city
            upgrades
            {
            }
        }
    }
    plugins 
    {
    }
}
building guild_hanseatic_guild
{
    levels hanseatic_guild 
    {
        hanseatic_guild  requires factions { northern_european, eastern_european, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
            }
            faction_capability
            {
                trade_base_income_bonus bonus 3
            }
            material wooden
            construction  1 
            cost  4000 
            settlement_min 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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 0
            capability
            {
                recruit_pool "Gotland Footmen"  1   0.4   3  0  requires factions { denmark, }  and event_counter kalmar_question_accepted 1 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 1
            capability
            {
                recruit_pool "Gotland Footmen"  1   0.4   3  1  requires factions { denmark, }  and event_counter kalmar_question_accepted 1 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            convert_to 2
            capability
            {
                recruit_pool "Gotland Footmen"  1   0.4   3  2  requires factions { denmark, }  and event_counter kalmar_question_accepted 1 
                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
    religion catholic
    levels templars_minor_ch templars_major_ch templars_hq 
    {
        templars_minor_ch  requires factions { papal_states, milan, sicily, venice, } 
        {
            convert_to 0
            capability
            {
                recruit_pool "Knights Templar"  1   0.4   3  0  requires factions { england, scotland, france, milan, venice, papal_states, sicily, hungary, } 
            }
            material stone
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                templars_major_ch
            }
        }
        templars_major_ch  requires factions { papal_states, milan, sicily, venice, } 
        {
            convert_to 1
            capability
            {
                recruit_pool "Knights Templar"  1   0.5   4  1  requires factions { england, scotland, france, milan, venice, papal_states, sicily, hungary, } 
            }
            material stone
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                templars_hq
            }
        }
        templars_hq  requires factions { papal_states, milan, sicily, venice, } 
        {
            convert_to 2
            capability
            {
                recruit_pool "Knights Templar"  1   0.7   6  2  requires factions { england, scotland, france, milan, venice, papal_states, sicily, hungary, } 
            }
            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
    religion catholic
    levels st_johns_minor_ch st_johns_major_ch st_johns_hq 
    {
        st_johns_minor_ch  requires factions { papal_states, milan, sicily, venice, } 
        {
            convert_to 0
            capability
            {
                recruit_pool "Knights Hospitaller"  1   0.4   3  0  requires factions { england, scotland, france, milan, venice, papal_states, sicily, hungary, } 
                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 { papal_states, milan, sicily, venice, } 
        {
            convert_to 1
            capability
            {
                recruit_pool "Knights Hospitaller"  1   0.5   4  1  requires factions { england, scotland, france, milan, venice, papal_states, sicily, hungary, } 
                population_health_bonus bonus 2
            }
            material stone
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                st_johns_hq
            }
        }
        st_johns_hq  requires factions { papal_states, milan, sicily, venice, } 
        {
            convert_to 2
            capability
            {
                recruit_pool "Knights Hospitaller"  1   0.7   6  2  requires factions { england, scotland, france, milan, venice, papal_states, sicily, hungary, } 
                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
    religion catholic
    levels teutonic_knights_minor_ch teutonic_knights_major_ch teutonic_knights_hq 
    {
        teutonic_knights_minor_ch  requires factions { england, } 
        {
            convert_to 0
            capability
            {
            }
            material stone
            construction  1 
            cost  1000 
            settlement_min city
            upgrades
            {
                teutonic_knights_major_ch
            }
        }
        teutonic_knights_major_ch  requires factions { england, } 
        {
            convert_to 1
            capability
            {
            }
            material stone
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                teutonic_knights_hq
            }
        }
        teutonic_knights_hq  requires factions { england, } 
        {
            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
    religion catholic
    levels knights_of_santiago_minor_ch knights_of_santiago_major_ch knights_of_santiago_hq 
    {
        knights_of_santiago_minor_ch  requires factions { portugal, spain, } 
        {
            convert_to 0
            capability
            {
                recruit_pool "Knights of Santiago"  1   0.4   3  0  requires factions { spain, portugal, } 
            }
            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
            {
                recruit_pool "Knights of Santiago"  1   0.5   4  1  requires factions { spain, portugal, } 
            }
            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
            {
                recruit_pool "Knights of Santiago"  1   0.7   6  2  requires factions { spain, portugal, } 
            }
            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, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Sherwood Archers"  1   0.2   2  0  requires factions { england, } 
                archer_bonus 1
            }
            faction_capability
            {
                archer_bonus 1
            }
            material wooden
            construction  1 
            cost  2000 
            settlement_min large_city
            upgrades
            {
                gm_woodsmens_guild
            }
        }
        gm_woodsmens_guild castle requires factions { england, }  and event_counter not_pagan_lithuania 1 
        {
            capability
            {
                recruit_pool "Sherwood Archers"  1   0.4   3  0  requires factions { england, } 
                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, }  and event_counter not_pagan_lithuania 1 
        {
            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, }  and event_counter not_pagan_lithuania 1 
        {
            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 {  teutonic_order, 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 {  teutonic_order, 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 {  teutonic_order, 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 {  teutonic_order, 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 {  teutonic_order, 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 {  teutonic_order, 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 {  teutonic_order, 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 {  teutonic_order, 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
{
    religion 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 
    {
    }
}
