﻿hand_cannon_guild = {
	is_foreign = no
	pop_type = burghers
	max_levels = 1
	category = weapons_industry_category
	employment_size = manufactory_employment		#yes.. its early and require more
	town = yes
	city = yes
	megalopolis = yes
	price = base_price
	increase_per_level_cost = 1.0	
	build_time = guild_build_time
	unique_production_methods = {
		hand_cannon_guild_maintenance = {
			icon_type = goods
			icon = tools
			tools = 0.0513
			lead = 0.0101

			#Gunpowder
			saltpeter = 0.1035
			alum = 0.0055

			#Bronze
			copper = 0.1035
			tin = 0.0211

			produced = firearms
			output = 0.4

			debug_max_profit = guild_profit_margin
			category = guild_input
		}
	}
	construction_demand = guild_construction
	modifier = {}
}

gun_smith = {
	audio_tier = 1
	is_foreign = no
	pop_type = burghers
	max_levels = guild_max_level
	startup_ramp_target = guild_startup_ramp_target
	
	category = weapons_industry_category
	
	employment_size = guild_employment
	
	
	town = yes
	city = yes
	megalopolis = yes
	
	obsolete = hand_cannon_guild

	

	build_time = guild_build_time
	
	unique_production_methods = {
		
		guns_guild_lumber_maintenance = {			
			# Wood
			lumber = 0.1342
			iron = 0.0404
			tools = 0.0175
			
			produced = firearms
			output = 0.15
			
			category = guild_input

			
			debug_max_profit = guild_profit_margin
		}
		
		guns_guild_bronze_maintenance = {
			icon_type = goods
			icon = copper
			# Bronze
			copper = 0.4804
			tin = 0.0963
			tools = 0.2888

			produced = firearms
			output = 1.0

			debug_max_profit = guild_profit_margin
			category = guild_input
		}

		guns_guild_iron_maintenance = {
			icon_type = goods
			icon = iron
			# Wrought Iron
			iron = 0.5207
			tools = 0.3126

			produced = firearms
			output = 1.0

			debug_max_profit = guild_profit_margin
			category = guild_input
		}
		
	
	}

	unique_production_methods = {
		guns_guild_ammunition_lead_maintenance = {
			icon_type = goods
			icon = lead
			lead = 0.1
			saltpeter = 0.1
			produced = firearms
			output = 0.16
			debug_max_profit = guild_profit_margin
			category = guild_input
		}
		guns_guild_ammunition_iron_maintenance = {
			icon_type = goods
			icon = iron
			iron = 0.1
			saltpeter = 0.1
			produced = firearms
			output = 0.2

			debug_max_profit = guild_profit_margin
			category = guild_input
		}
	}

	
	construction_demand = guild_construction
	
	modifier = {
	}
}

guns_workshop = {
	audio_tier = 2
	is_foreign = no
	pop_type = burghers
	max_levels = workshop_max_level
	startup_ramp_target = workshop_startup_ramp_target
	
	category = weapons_industry_category
	
	employment_size = workshop_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = workshop_build_time
	
	unique_production_methods = {

		guns_workshop_bronze_maintenance = {			
			# Bronze
			copper = 0.5008
			tin = 0.0999
			tools = 0.3125
			
			produced = firearms
			output = 1.1
			debug_max_profit = workshop_profit_margin
			
			category = workshop_input
		}
		
		guns_workshop_iron_maintenance = {			
			# Wrought Iron
			iron = 0.4928
			tools = 0.3072
			
			produced = firearms
			output = 1.0
			debug_max_profit = workshop_profit_margin
			
			category = workshop_input
		}
		
	
	}

	unique_production_methods = {
		guns_workshop_ammunition_lead_maintenance = {
			icon_type = goods
			icon = lead
			lead = 0.12
			saltpeter = 0.12
			produced = firearms
			output = 0.2
			debug_max_profit = workshop_profit_margin
			category = workshop_input
		}
		guns_workshop_ammunition_iron_maintenance = {
			icon_type = goods
			icon = iron
			iron = 0.12
			saltpeter = 0.12
			produced = firearms
			output = 0.25
			debug_max_profit = workshop_profit_margin
			category = workshop_input
		}
	}

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

firearms_manufactory = {
	audio_tier = 3
	is_foreign = no
	pop_type = burghers
	max_levels = manufactory_max_level #Mass Production
	startup_ramp_target = manufactory_startup_ramp_target
	
	category = weapons_industry_category
	
	employment_size = manufactory_employment
	
	
	town = yes
	city = yes
	megalopolis = yes

	
	
	obsolete = guns_workshop

	build_time = manufactory_build_time
	
	unique_production_methods = {
		firearms_manufactory_maintenance = {
			icon_type = goods
			icon = lumber
			lumber = 0.342
			coal = 0.342
			iron = 0.9115
			
			lead = 0.1144
			saltpeter = 0.2275
			
			category = manufactory_input
			produced = firearms
			output = 2.0
			debug_max_profit = manufactory_profit_margin
		}
	}

	custom_tags = { midgame_manufactory }
	construction_demand = manufactory_construction
}

firearms_factory = {
	audio_tier = 6
	is_foreign = no
	pop_type = laborers
	is_mill = yes
	max_levels = mills_max_level
	startup_ramp_target = mills_startup_ramp_target
	
	category = weapons_industry_category
	employment_size = mills_employment

	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = mills_build_time
	
	obsolete = firearms_manufactory
	
	unique_production_methods = {
		
		firearms_factory_maintenance = {
			icon_type = goods
			icon = steel
			steel = 1.3464
			
			lead = 0.4044 #Ammunition
			
			#Gunpowder
			saltpeter = 0.674
			
			
			produced = firearms
			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
	}
}