﻿brewery = {
	audio_tier = 1
	is_foreign = no
	pop_type = burghers
	max_levels = guild_max_level
	startup_ramp_target = guild_startup_ramp_target
	
	category = consumer_goods_category
	
	employment_size = guild_employment
	price = low_base_price
	increase_per_level_cost = 1.0
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = guild_build_time
	
	unique_production_methods = {
	
		wheat_brewery_maintenance = {
			icon_type = goods
			icon = wheat
			wheat = 0.9944
			lumber = 0.2484
			tools = 0.0999

			produced = beer
			output = 0.1

			debug_max_profit = guild_profit_margin
			category = guild_input
		}

		millet_brewery_maintenance = {
			icon_type = goods
			icon = millet
			millet = 0.9944
			lumber = 0.2484
			tools = 0.0999

			produced = beer
			output = 1.0

			debug_max_profit = guild_profit_margin
			category = guild_input
		}

		fruit_brewery_maintenance = {
			icon_type = goods
			icon = fruit
			fruit = 1.0412
			lumber = 0.208
			tools = 0.1045

			produced = beer
			output = 1.0

			debug_max_profit = guild_profit_margin
			category = guild_input
		}

		maize_brewery_maintenance = {
			icon_type = goods
			icon = maize
			maize = 1.3724
			pottery = 0.2943

			produced = beer
			output = 1.0

			debug_max_profit = guild_profit_margin
			category = guild_input
		}

		bavarian_brewery_maintenance = {
			icon_type = goods
			icon = wheat
			wheat = 1.3345
			lumber = 0.2218
			tools = 0.1109
			
			produced = beer
			output = 1.25
			
			category = guild_input			
			debug_max_profit = guild_profit_margin
		}
	
		honey_brewery_maintenance = {
			icon_type = goods
			icon = beeswax
			beeswax = 0.2603
			millet = 0.5206
			lumber = 0.208
			tools = 0.1045

			produced = beer
			output = 1.0

			debug_max_profit = guild_profit_margin
			category = guild_input
		}

		rice_brewery_maintenance = {
			icon_type = goods
			icon = rice
			rice = 0.9944
			lumber = 0.2484
			tools = 0.0999

			produced = beer
			output = 1.0

			debug_max_profit = guild_profit_margin
			category = guild_input
		}
	}


	custom_tags = { guild }
	construction_demand = guild_construction
}

beer_workshop = {
	audio_tier = 2
	is_foreign = no
	pop_type = burghers
	max_levels = workshop_max_level
	startup_ramp_target = workshop_startup_ramp_target
	price = base_price
	increase_per_level_cost = 1.0
	category = consumer_goods_category
	
	employment_size = workshop_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = workshop_build_time
	
	unique_production_methods = {
	
		wheat_beer_workshop_maintenance = {
			icon_type = goods
			icon = wheat
			wheat = 1.0513
			lumber = 0.2625
			tools = 0.105
			
			produced = beer
			output = 1.1
			
			debug_max_profit = workshop_profit_margin
			
			category = workshop_input
		}
	
		millet_beer_workshop_maintenance = {
			icon_type = goods
			icon = millet
			millet = 1.0513
			lumber = 0.2625
			tools = 0.105
			
			produced = beer
			output = 1.1
			debug_max_profit = workshop_profit_margin
			
			category = workshop_input
		}
	
		fruit_beer_workshop_maintenance = {
			icon_type = goods
			icon = fruit
			fruit = 1.0995
			lumber = 0.2202
			tools = 0.1101
			
			produced = beer
			output = 1.1
			
			debug_max_profit = workshop_profit_margin
			
			category = workshop_input
		}

		maize_beer_workshop_maintenance = {
			icon_type = goods
			icon = maize
			maize = 1.4298
			pottery = 0.3302
			
			produced = beer
			output = 1.1
			
			debug_max_profit = workshop_profit_margin
			category = workshop_input
				
		}

		bavarian_beer_workshop_maintenance = {
			icon_type = goods
			icon = wheat
			wheat = 1.3449
			lumber = 0.2444
			tools = 0.1228
			
			produced = beer
			output = 1.3
			
			
			
			category = workshop_input			
			debug_max_profit = workshop_profit_margin
		}
	
		honey_beer_workshop_maintenance = {
			icon_type = goods
			icon = beeswax
			beeswax = 0.275
			millet = 0.55
			lumber = 0.22
			tools = 0.11

			produced = beer
			output = 1.1

			debug_max_profit = workshop_profit_margin

			category = workshop_input
		}

		rice_beer_workshop_maintenance = {
			icon_type = goods
			icon = rice
			rice = 1.0513
			lumber = 0.2625
			tools = 0.105

			produced = beer
			output = 1.1

			debug_max_profit = workshop_profit_margin

			category = workshop_input
		}
	}

	obsolete = brewery


	custom_tags = { workshop }
	construction_demand = workshop_construction
}

brewery_manufactory = {
	audio_tier = 3
	is_foreign = no
	pop_type = burghers
	max_levels = manufactory_max_level
	startup_ramp_target = manufactory_startup_ramp_target
	price = base_price
	increase_per_level_cost = 1.0
	category = consumer_goods_category
	
	employment_size = manufactory_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = manufactory_build_time
	
	obsolete = beer_workshop
	
	unique_production_methods = {
		brewery_manufactory_maintenance = {
			icon_type = goods
			icon = lumber
			
			lumber = 0.3179
			wheat = 2.1231
			tools = 0.159
			
			produced = beer
			output = 2.0
			
			debug_max_profit = manufactory_profit_margin

			category = manufactory_input
		}
	}

	custom_tags = { midgame_manufactory }
	construction_demand = manufactory_construction
}

brewery_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
	price = base_price
	increase_per_level_cost = 1.0
	category = consumer_goods_category
	
	employment_size = mills_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = mills_build_time
	
	obsolete = brewery_manufactory
	
	unique_production_methods = {
		brewery_mill_maintenance = {
			icon_type = goods
			icon = lumber
			
			lumber = 0.5038
			wheat = 4.4144
			tools = 0.2519
			
			produced = beer
			output = 4.0
			
			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
	}
}