﻿Town_holl = {
    is_foreign = no
    pop_type = bureaucrats
    max_levels = town_holl_1_max_level
    category = government_category
    employment_size = 0.15
    city = yes
	forbidden_for_estates = yes
    price = Town_holl
	expensive = yes
	ai_forbid_shutdown = yes	
	automation_build_allowed = no
	important_for_AI = yes
	ai_ignore_maintenance = yes
    location_potential = { is_capital = no
	    city = yes }
    allow = { owner = { has_primary_or_accepted_culture = prev.dominant_culture }
    population >= 30 }
    modifier = {
        local_proximity_source = 60	
        local_monthly_development = 0.0050
	local_bureaucrats_desired_pop_scaled = 0.005
    }
    unique_production_methods = {
        Town_holl_requirements = {
			tools = 1.25
			masonry = 2
			weaponry = 0.50
			paper = 0.5
			books = 0.50
			furniture = 1.0
			fine_cloth = 0.75
            category = building_maintenance
        }
    }

    graphical_tags = { palace }
    build_time = 180
    construction_demand = university_construction
}

Town_holl_3 = {
    is_foreign = no
    pop_type = bureaucrats
    max_levels = town_holl_3_max_level
    category = government_category
    employment_size = 0.450
    city = yes
	forbidden_for_estates = yes
    obsolete = Town_holl
    price = Town_holl_3
    location_potential = { is_capital = no }
    allow = { owner = { has_primary_or_accepted_culture = prev.dominant_culture }
    population >= 50 }
    modifier = {
        local_proximity_source = 70
        local_monthly_development = 0.001
	local_bureaucrats_desired_pop_scaled = 0.0175
    }
    unique_production_methods = {
        Town_holl_3_requirements = {
			tools = 1.5
			masonry = 3
			weaponry = 1.0
			paper = 1.0
			books = 0.75
			furniture = 1.5
			fine_cloth = 1.0
            category = building_maintenance
        }
    }
    graphical_tags = { palace }
    build_time = 360
    construction_demand = university_construction
}




Town_holl_5 = {
    is_foreign = no
    pop_type = bureaucrats
    max_levels = town_holl_5_max_level
    category = government_category
    employment_size = 1.0
    city = yes
	forbidden_for_estates = yes
    obsolete = Town_holl_4
    desc = "Town_holl_5_desc"
    price = Town_holl_3
    location_potential = { is_capital = no }
    allow = { owner = { has_primary_or_accepted_culture = prev.dominant_culture }
    population >= 75 }
    modifier = {
        local_proximity_source = 80
        local_monthly_development = 0.0015
	local_bureaucrats_desired_pop_scaled = 0.025
    }
    unique_production_methods = {
        Town_holl_5_requirements = {
			tools = 2.25
			masonry = 3
			weaponry = 1.5
			paper = 1.5
			books = 1.5
			furniture = 2
			fine_cloth = 1.50
            category = building_maintenance
        }
    }
    graphical_tags = { palace }
    build_time = 720
    construction_demand = university_construction
}


# ================= TRADE_CENTR CHAIN =================
Trade_centr = {
    is_foreign = no
    pop_type = bureaucrats
    max_levels = trade_centr_1_max_level
    category = government_category
    employment_size = 0.100
    town = yes city = yes
    desc = "Trade_centr_desc"
    price = Trade_centr
	forbidden_for_estates = yes
	expensive = yes
	ai_forbid_shutdown = yes	
	automation_build_allowed = no
	important_for_AI = yes
	ai_ignore_maintenance = yes
    location_potential = { is_market_center = yes }
    allow = { owner = { has_primary_or_accepted_culture = prev.dominant_culture }  }
    modifier = {
        free_building_levels = 10
	local_trade_center_power = 0.05
        local_monthly_development_modifier = 0.05
	local_bureaucrats_desired_pop_scaled = 0.005
    }
    capital_country_modifier = { merchant_maintenance_cost = -0.05 }
    unique_production_methods = {
        Trade_centr_requirements = {
			tools = 1.25
			masonry = 3
			weaponry = 1.0
			paper = 0.75
			books = 0.75
			furniture = 1.0
			fine_cloth = 0.75
            category = building_maintenance
        }
    }
    graphical_tags = { palace }
    build_time = 180
    construction_demand = university_construction
}

Trade_centr_3 = {
    is_foreign = no
    pop_type = bureaucrats
    max_levels = trade_centr_3_max_level
    category = government_category
    employment_size = 0.10
    town = yes city = yes
	forbidden_for_estates = yes
    obsolete = Trade_centr
    desc = "Trade_centr_3_desc"
    price = Trade_centr
    location_potential = { is_market_center = yes }
    allow = { owner = { has_primary_or_accepted_culture = prev.dominant_culture } }
    modifier = {
	local_trade_center_power = 0.1
        free_building_levels = 20
        local_monthly_development_modifier = 0.1
	local_bureaucrats_desired_pop_scaled = 0.0175
    }
    capital_country_modifier = { merchant_maintenance_cost = -0.09 }
    unique_production_methods = {
        Trade_centr_3_requirements = {
			tools = 0.75
			masonry = 1.50
			weaponry = 0.75
			paper = 1.00
			books = 1.00
			furniture = 1.50
			fine_cloth = 0.50

            category = building_maintenance
        }
    }
    graphical_tags = { palace }
    build_time = 360
    construction_demand = university_construction
}

Trade_centr_5 = {
    is_foreign = no
    pop_type = bureaucrats
    max_levels = trade_centr_5_max_level
    category = government_category
    employment_size = 0.15
    town = yes city = yes
	forbidden_for_estates = yes
    obsolete = Trade_centr_3
    desc = "Trade_centr_5_desc"
    price = Trade_centr_3
    location_potential = { is_market_center = yes }
    allow = { owner = { has_primary_or_accepted_culture = prev.dominant_culture } }
    modifier = {
	local_trade_center_power = 0.2
        free_building_levels = 30
        local_monthly_development_modifier = 0.20
	local_bureaucrats_desired_pop_scaled = 0.025
    }
    capital_country_modifier = { merchant_maintenance_cost = -0.13 }
    unique_production_methods = {
        Trade_centr_5_requirements = {
			tools = 2.5
			masonry = 3
			weaponry = 1.5
			paper = 1.5
			books = 1.5
			furniture = 2
			fine_cloth = 1.75

            category = building_maintenance
        }
    }
    graphical_tags = { palace }
    build_time = 720
    construction_demand = university_construction
}





# ================= INFRASTRUCTURE (Оригинальная схема) =================
Infrastructure = {
    is_foreign = no
    pop_type = bureaucrats
    max_levels = infrastructure_max_level
    category = government_category
    employment_size = 0.025
    town = yes city = yes
    desc = "Infrastructure_desc"
    increase_per_level_cost = 1.0
    construction_cost = { gold = 200 }
    price = Infrastructure
    allow = { owner = { has_primary_or_accepted_culture = prev.dominant_culture } }
    modifier = {
        local_monthly_development_modifier = 0.05
        free_building_levels = 15
        local_population_capacity_modifier = 0.10
        local_monthly_prosperity = 0.0005
	local_bureaucrats_desired_pop_scaled = 0.0025
    }
    unique_production_methods = {
        Infrastructure_requirements = {
	tools = 0.25 
	masonry = 0.35 
	lumber = 0.35
	paper = 0.15 
	books = 0.15 
	furniture = 0.25
            category = building_maintenance
        }
    }
    graphical_tags = { palace }
    build_time = 180
    construction_demand = university_construction
}

temple = {
    is_foreign = no
    max_levels = 1
    pop_type = clergy
    desc = "temple_desc"
    employment_size = religious_building_employment
    category = religious_category
    town = yes
    city = yes
	forbidden_for_estates = yes
    price = temple
    build_time = religious_building_time
    possible_production_methods = {
        temple_maintenance
    }
    graphical_tags = { small_religious }
    construction_demand = town_building_construction
    modifier = {
        local_max_literacy = 2.5
        local_unrest = -0.025
        local_monthly_literacy = 0.01
        local_monthly_development_modifier = 0.05
    }
}

counting_house = {
	price = Counting_house
    is_foreign = no
    max_levels = 1
    pop_type = bureaucrats
    desc = "counting_house_desc"
    employment_size = 0.25
    category = government_category
    forbidden_for_estates = yes
    town = yes
    city = yes
    expensive = yes
    build_time = government_build_time
    unique_production_methods = {
        counting_house_maintenance = {
            icon_type = goods
            icon = paper
            paper = 0.5
            books = 0.25
            goods_gold = 0.15
            tools = 0.5
            category = building_maintenance
        }
    }
    construction_demand = town_building_construction
    modifier = {
        local_crown_estate_power = 0.20
        local_monthly_development_modifier = 0.005
	local_bureaucrats_desired_pop_scaled = 0.005
    }
}


Counting_house_2 = {
    is_foreign = no
    max_levels = 1
    pop_type = bureaucrats
    employment_size = 0.5
    category = government_category
    forbidden_for_estates = yes
    desc = "Counting_house_2_desc"
    town = yes
    city = yes
    expensive = yes
    obsolete = counting_house
    price = Counting_house_2
    build_time = government_build_time
    unique_production_methods = {
        counting_house_2_requirements = {
            icon_type = goods
            icon = paper
            paper = 1.0
            books = 0.75
            goods_gold = 0.5
            tools = 1.25
            category = building_maintenance
        }
    }
    construction_demand = town_building_construction
    modifier = {
        local_crown_estate_power = 0.40
        local_monthly_development_modifier = 0.01
	local_bureaucrats_desired_pop_scaled = 0.01
    }
}


Construction_ministry = {
    is_foreign = no
    pop_type = bureaucrats
    max_levels = 1
    category = government_category
    employment_size = 0.1
    city = yes
	forbidden_for_estates = yes
    desc = "Construction_ministry_desc"
    price = Construction_ministry
    location_potential = { 
    location_rank = location_rank:city }
    modifier = {
        local_monthly_development_modifier = 0.05
	local_build_buildings_efficiency = 0.50
    }
    unique_production_methods = {
        construction_ministry_requirements = {
	icon_type = goods
	icon = paper
	tools = 0.5
        paper = 0.5 
	masonry = 1.0
	furniture = 0.75 
            category = building_maintenance
        }
    }
    graphical_tags = { palace }
    build_time = 180
    construction_demand = university_construction
}



# Исправлена кириллическая "С" на латинскую "C"
Construction_ministry_3 = {
    is_foreign = no
    pop_type = bureaucrats
    max_levels = 1
	forbidden_for_estates = yes
    desc = "Construction_ministry_3_desc"
    category = government_category
    employment_size = 0.5
    city = yes
    location_potential = { 
    location_rank = location_rank:city }
    obsolete = Construction_ministry
    price = Construction_ministry_3
    modifier = {
        local_monthly_development_modifier = 0.15
	local_build_buildings_efficiency = 1.0
    }
    unique_production_methods = {
        construction_ministry_3_requirements = {
            icon_type = goods
            icon = paper
	    tools = 1.0
            paper = 1.0 
	    masonry = 2.0
	    furniture = 1.5 
            category = building_maintenance
        }
    }
    graphical_tags = { palace }
    build_time = 180
    construction_demand = university_construction
}


# Исправлена кириллическая "С" на латинскую "C"
Construction_ministry_5 = {
    is_foreign = no
    pop_type = bureaucrats
    max_levels = 1
    category = government_category
    employment_size = 1.0
    city = yes
	forbidden_for_estates = yes
    location_potential = { 
    location_rank = location_rank:city }
    desc = "Construction_ministry_5_desc"
    obsolete = Construction_ministry_3
    price = Construction_ministry_5
    modifier = {
        local_monthly_development_modifier = 0.15
	local_build_buildings_efficiency = 1.75
    }
    unique_production_methods = {
        construction_ministry_5_requirements = {
            icon_type = goods
            icon = paper
	    tools = 2.0
            paper = 2.0 
	    masonry = 4.0
	    furniture = 3.0
            category = building_maintenance
        }
    }
    graphical_tags = { palace }
    build_time = 360
    construction_demand = university_construction
}



Proximity_house = {
    is_foreign = no
    pop_type = bureaucrats
    max_levels = 1
    category = government_category
    employment_size = 0.25
    town = yes 
    price = Proximity_house
    forbidden_for_estates = yes
  location_potential = {
        is_capital = no
        location_rank = location_rank:town
    }

    allow = { owner = { has_primary_or_accepted_culture = prev.dominant_culture } }
   
    modifier = {
        local_proximity_source = 45
	local_bureaucrats_desired_pop_scaled = 0.025
    }
    
    unique_production_methods = {
        proximity_house_maintenance = {
            icon_type = goods
            icon = tools
			tools = 0.75
			masonry = 1.5
			weaponry = 0.50
			paper = 0.50
			books = 0.50
			furniture = 1.0
			fine_cloth = 0.75
            category = building_maintenance
        }
    }
    
    graphical_tags = { palace }
    build_time = 180
    construction_demand = university_construction
}

bridge_infrastructure = {
	audio_tier = 1
	is_foreign = no
	pop_type = laborers
	max_levels = 1
	
	employment_size = generic_peasant_building_employment
	price = low_base_price
	category = infrastructure_category

	rural_settlement = yes
	town = yes
	city = yes
	megalopolis = yes
	
	build_time = infrastructure_build_time
	
	location_potential = {
		has_river = yes
		num_roads > 0
	}
	allow = { }	
	
	modifier = {
		local_monthly_development_modifier = 0.1
		local_distance_from_capital_speed_propagation = 0.2
		movement_cost = -0.1
	}
	
	possible_production_methods = {
		bridge_maintenance
	}
	
	construction_demand = bridge_construction
}
trade_office = {
	audio_tier = 2
	is_foreign = yes
	stronger_power_projection = no
	max_levels = trade_office_max_level
	need_good_relation = yes
	pop_type = burghers
	increase_per_level_cost = 1.0
	forbidden_for_estates = yes	
	category = trade_category
	
	employment_size = foreign_trade_employment
	pop_size_created = foreign_trade_employment

	rural_settlement = no
	town = yes
	city = yes
	megalopolis = yes

	country_potential = {
		NOR = {
			AND = {
				has_reform = government_reform:japanese_imperial_family
				country_type = building
			}
			has_reform = government_reform:japanese_clan
		}
	}

	allow = {
		market = { in_trade_range_of = scope:actor }
	}
	
	
	
	build_time = trade_post_build_time
	
	unique_production_methods = {
		trade_office_requirements = {
			icon_type = goods
			icon = paper
			paper = 0.1
			category = building_maintenance
		}
	}
	
	
	modifier = {
		merchant_capacity_from_building = 0.3
		building_owner_maritime_presence = 0.05
		merchant_power_from_building = 0.2
	}
}
sergeantry = {
	audio_tier = 1
	is_foreign = no
	pop_type = soldiers
	max_levels = 1
	
	category = military_category
	forbidden_for_estates = yes
	
	employment_size = manpower_employment
	
	town = yes
	city = yes
	megalopolis = yes
	
	build_time = medium_soldier_building
	
	location_potential = {
		is_capital = yes
	}
	country_potential = {
		government_type ?= government_type:monarchy
	}
	remove_if = {
		is_no_longer_capital = yes
	}

	capital_modifier = {
		local_manpower = 0.050
		can_recruit_regiment_in_this_location = yes
		local_crown_estate_power = 0.25
	}

	possible_production_methods =  {
		early_soldier_building_maintenance
	}
	construction_demand = early_soldier_building_construction
}

city_guard = {
	audio_tier = 1
	is_foreign = no
	pop_type = soldiers
	max_levels = 1
	
	category = military_category
	forbidden_for_estates = yes
	
	employment_size = manpower_employment
	
	town = yes
	city = yes
	megalopolis = yes
	
	build_time = medium_soldier_building
	
	location_potential = {
		is_capital = yes
	}
	country_potential = {
		government_type ?= government_type:republic
	}
	remove_if = {
		is_no_longer_capital = yes
	}
	
	capital_modifier = {
		local_manpower = 0.04
		can_recruit_regiment_in_this_location = yes
	}

	possible_production_methods =  {
		early_soldier_building_maintenance
	}
	construction_demand = early_soldier_building_construction
}
itinerant_court_seat = {

}