﻿cloth_guild = {
	is_foreign = no
	pop_type = burghers
	max_levels = cloth_guild_max_level
	startup_ramp_target = guild_startup_ramp_target
	price = low_base_price
	increase_per_level_cost = 1.00
	category = consumer_goods_category
	
	employment_size = guild_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = guild_build_time
	
	unique_production_methods = {
		cotton_cloth_guild_maintenance = {
			icon_type = goods
			icon = cotton
			cotton = 0.9

			produced = cloth
			output = 1.4

			debug_max_profit = guild_profit_margin
			category = guild_input
		}

		wool_cloth_guild_maintenance = {
			icon_type = goods
			icon = wool
			wool = 1.125

			produced = cloth
			output = 1.50

			debug_max_profit = guild_profit_margin
			category = guild_input
		}

		fiber_crops_cloth_guild_maintenance = {
			icon_type = goods
			icon = fiber_crops
			fiber_crops = 1.50

			produced = cloth
			output = 1.0

			debug_max_profit = guild_profit_margin
			category = guild_input
		}
		
	}

	construction_demand = guild_construction
	
	custom_tags = { guild }
	modifier = {
	}
}

cloth_workshop = {
	audio_tier = 2
	is_foreign = no
	pop_type = burghers
	max_levels = workshop_max_level
	startup_ramp_target = workshop_startup_ramp_target
	
	category = consumer_goods_category
	
	employment_size = workshop_employment
	
	obsolete = cloth_guild
	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = workshop_build_time
	
	unique_production_methods = {
		cotton_cloth_workshop_maintenance = {
			icon_type = goods
			icon = cotton
			cotton = 1.32
			
			produced = cloth
			output = 1.1
			
			debug_max_profit = workshop_profit_margin
			
			category = workshop_input
		}
		
		wool_cloth_workshop_maintenance = {
			icon_type = goods
			icon = wool
			wool = 1.584
			
			produced = cloth
			output = 1.1
			
			debug_max_profit = workshop_profit_margin
			category = workshop_input
		}

		fiber_crops_cloth_workshop_maintenance = {
			icon_type = goods
			icon = fiber_crops
			fiber_crops = 1.62
			
			produced = cloth
			output = 0.9
			
			category = workshop_input
			debug_max_profit = workshop_profit_margin
		}
		
	}

	construction_demand = workshop_construction
	
	custom_tags = { workshop }
	modifier = {
	}
}

cloth_manufactory = {
	audio_tier = 3
	is_foreign = no
	pop_type = burghers
	max_levels = manufactory_max_level
	startup_ramp_target = manufactory_startup_ramp_target
	
	category = consumer_goods_category
	
	employment_size = manufactory_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	
	
	obsolete = cloth_workshop

	build_time = manufactory_build_time
	
	unique_production_methods = {
		wool_cloth_manufactory_maintenance = {
			icon_type = goods
			icon = wool
			wool = 2.414
			dyes = 0.222
			produced = cloth
			output = 2
			
			category = guild_input
			debug_max_profit = manufactory_profit_margin
		}

		cotton_cloth_manufactory_maintenance = {
			icon_type = goods
			icon = cotton
			produced = cloth
			output = 2
			cotton = 2.0118
			dyes = 0.222
			
			category = guild_input
			debug_max_profit = manufactory_profit_margin
		}

		fiber_crops_cloth_manufactory_maintenance = {
			icon_type = goods
			icon = fiber_crops
			produced = cloth
			fiber_crops = 3.2798
			dyes = 0.0909
			output = 2

			category = guild_input
			debug_max_profit = manufactory_profit_margin
		}

	}

	custom_tags = { midgame_manufactory }
	construction_demand = guild_construction
}

textile_mill = {
	audio_tier = 5
	is_foreign = no
	pop_type = laborers
	is_mill = yes
	max_levels = mills_max_level
	startup_ramp_target = mills_startup_ramp_target
	
	category = consumer_goods_category
	employment_size = mills_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	
	
	obsolete = cloth_manufactory

	build_time = mills_build_time
	
	unique_production_methods = {
		cotton_mill_maintenance = {
			icon_type = goods
			icon = cotton
			cotton = 2.8299
			dyes = 0.3776
			produced = cloth
			output = 3
			
			debug_max_profit = mills_profit_margin
			
			category = mills_input
		}

		wool_mill_maintenance = {
			icon_type = goods
			icon = wool
			wool = 2.7467
			dyes = 0.3666
			produced = cloth
			output = 2.5
			
			debug_max_profit = mills_profit_margin
			
			category = mills_input
		}

		fiber_crops_mill_maintenance = {
			icon_type = goods
			icon = fiber_crops
			fiber_crops = 3.473
			dyes = 0.3468
			produced = cloth
			output = 2.5
			debug_max_profit = mills_profit_margin
			
			category = mills_input
		}

	}

	custom_tags = { lategame_manufactory }
	construction_demand = mill_construction

	raw_modifier = {
		local_burghers_desired_pop = 0.05
	}
}
