
### Factories #####################################################################################

factory_template = {
	efficiency = {
		cement = 0.5 #if no cement, work at 75% efficiency
		machine_parts = 0.01
	}
	
	owner =
	{
		poptype = capitalists 
		effect = input
		effect_multiplier = -2.5
	}
	
	employees = {		
		{ 
			poptype = craftsmen
			effect = throughput
			amount = 0.8
		}		
		{ 
			poptype = clerks 
			effect = output
			effect_multiplier = 2.0
			amount = 0.2
		}
	
	}
	type = factory
	workforce = 10000 
}


############# LATE GAME FACTORIES

aeroplane_factory = {       
	template = factory_template
	input_goods = {
		machine_parts = 1.6
		electric_gear = 1.6
		rubber = 0.8  
		lumber = 2.4
	}
	output_goods = aeroplanes
	value = 1.0
}

barrel_factory = {       
	template = factory_template
	input_goods = {   
		automobiles = 0.8
		machine_parts = 0.1	
		electric_gear = 0.1	
		rubber = 0.8
	}
	output_goods = barrels 
	value = 1.0
}

automobile_factory = {       
	template = factory_template
	input_goods = {     
		machine_parts = 1.6
		electric_gear = 0.8
		rubber = 0.8
		steel = 0.8
	}
	
	output_goods = automobiles 
	value = 1.0
}

radio_factory = {       
	template = factory_template
	input_goods = {      
		glass = 1.8
		electric_gear = 0.8
	}
	output_goods = radio 
	value = 1.0
}

telephone_factory = {       
	template = factory_template
	input_goods = {       
		glass = 1.8
		electric_gear = 0.8
	}
	output_goods = telephones 
	value = 1.0
}

############# STRATEGIC FACTORIES

electric_gear_factory = {       
	template = factory_template
	input_goods = { 
		rubber = 0.8
		coal = 0.8
		iron = 0.8
	}
	output_goods = electric_gear 
	value = 1.05
}

machine_parts_factory = {       
	template = factory_template
	input_goods = {    
		steel = 0.4
		coal = 1.8		
		iron = 0.8	
	}
	output_goods = machine_parts 
	value = 3
}

synthetic_oil_factory = {       
	template = factory_template
	input_goods = { 
		coal = 1.6
	}
	output_goods = oil 
	value = 1.05
}

############# ADVANCED FACTORIES

fuel_refinery = {       
	template = factory_template
	input_goods = { 
		oil = 1.6
	}
	output_goods = fuel
	value = 0.8
}

steamer_shipyard = {       
	template = factory_template
	input_goods = { 
		steel = 6.8
		coal = 8
	}
	output_goods = steamer_convoy 
	is_coastal = yes
	value = 2.8
}

############# LUXURY GOODS FACTORIES

luxury_clothes_factory = {       
	template = factory_template
	input_goods = {   
		regular_clothes = 0.8
		silk = 3.8
	}
	output_goods = luxury_clothes 
	value = 1.0
}

luxury_furniture_factory = {       
	template = factory_template
	input_goods = { 
		furniture = 0.1
		tropical_wood = 0.9
	}
	output_goods = luxury_furniture 
	value = 0.25
}

############# MEDIUM FACTORIES

steel_factory = {       
	template = factory_template
	input_goods = { 
		iron = 16
		coal = 9.0
	}
	limit_by_local_supply = yes
	output_goods = steel 
	value = 26.0
}

artillery_factory = {       
	template = factory_template
	input_goods = { 
		explosives = 1.7
		steel = 1.7
	}
	output_goods = artillery 
	value = 1.38
}

clipper_shipyard = {       
	template = factory_template
	input_goods = {         
		fabric = 66.5
		lumber = 66.5
		timber = 66.5
	}
	output_goods = clipper_convoy 
	is_coastal = yes
	value = 14.0
}

small_arms_factory = {       
	template = factory_template
	input_goods = {        
		ammunition = 1.0
		steel = 1.0
	}
	output_goods = small_arms 
	value = 1.0
}

############# COMMON FACTORIES

furniture_factory = {       
	template = factory_template
	input_goods = { 
		lumber = 20
		timber = 3
	}
	output_goods = furniture 
	value = 12
}

paper_mill = {       
	template = factory_template
	input_goods = { 
		lumber = 165.75
	}
	output_goods = paper 
	value = 93.5
}

regular_clothes_factory = {       
	template = factory_template
	input_goods = {  
		fabric = 10
		dye = 6
	}
	output_goods = regular_clothes 
	value = 20
}
       
explosives_factory = {       
	template = factory_template
	input_goods = {   
		fertilizer = 3.1
		ammunition = 1.2
	}
	output_goods = explosives 
	value = 3
}

############# CHEAP FACTORIES

ammunition_factory = {       
	template = factory_template
	input_goods = {      
		sulphur = 5.5
		coal = 0.4	
		iron = 0.4	
	}
	output_goods = ammunition 
	value = 4.2
}

canned_food_factory = {       
	template = factory_template
	input_goods = { 
		iron = 13
		cattle = 6.6
		grain = 6.6
		fish = 6.6
	}
	output_goods = canned_food 
	value = 13
}
       
dye_factory = {       
	template = factory_template
	input_goods = {     
		coal = 0.6   
	}
	output_goods = dye 
	value = 0.5
}
     

liquor_distillery = {       
	template = factory_template
	input_goods = {        
		grain = 7
		glass = 2.0
	}
	output_goods = liquor 
	value = 10
}

winery = {       
	template = factory_template
	input_goods = {  
		fruit = 30
		glass = 4.5
	}
	output_goods = wine 
	value = 20
}

############# BASIC FACTORIES 

lumber_mill = {       
	template = factory_template
	input_goods = {       
		timber = 100
	}
	output_goods = lumber 
	limit_by_local_supply = yes
	value = 100
}

fabric_factory = {       
	template = factory_template
	input_goods = {     
		cotton = 53.95
	}
	output_goods = fabric 
	value = 73.57
}

cement_factory = {       
	template = factory_template
	input_goods = {           
		coal = 4
	} 
	output_goods = cement 
	value = 2
}

glass_factory = {       
	template = factory_template
	input_goods = {            
		coal = 4.51
	}
	output_goods = glass 
	value = 10.5
}

fertilizer_factory = {       
	template = factory_template
	input_goods = {   
		sulphur = 12
	}
	output_goods = fertilizer 
	value = 10
}


### RGOs #####################################################################################

RGO_template_farmers = {
	owner =
	{
		poptype = aristocrats 
		effect = output
	}
		
	employees = {
		{ 
			poptype = farmers 
			effect = throughput
			amount = 0.9
		}
		{ 
			poptype = slaves 
			effect = throughput
			amount = 0.1
		}
	}
	
	type = rgo
	workforce = 40000
}

RGO_template_labourers = {
	owner =
	{
		poptype = aristocrats 
		effect = output
	}
		
	employees = {
		{ 
			poptype = labourers 
			effect = throughput
			amount = 0.9
		}
		{ 
			poptype = slaves 
			effect = throughput
			amount = 0.1
		}
	}
	
	type = rgo
	workforce = 40000
}


cattle_ranch = {
	template = RGO_template_farmers
	output_goods = cattle 
	value = 2.05
	farm = yes
}

coal_mine = {
	template = RGO_template_labourers
	output_goods = coal 
	value = 4.28
	mine = yes
}

coffee_plantation = {
	template = RGO_template_farmers
	output_goods = coffee 
	value = 13.34
	farm = yes
}

cotton_plantation = {
	template = RGO_template_farmers
	output_goods = cotton 
	value = 3.7
	farm = yes
}

dye_plantation = {
	template = RGO_template_farmers
	output_goods = dye 
	value = 0.65
	farm = yes
}

fishing_wharf = {
	template = RGO_template_farmers
	output_goods = fish 
	value = 3.8
	farm = yes
}

grain_farm = {
	template = RGO_template_farmers
	output_goods = grain 
	value = 2.11
	farm = yes
}

iron_mine = {
	template = RGO_template_labourers
	output_goods = iron
	value = 3.6
	mine = yes
}

oil_rig = {
	template = RGO_template_labourers
	output_goods = oil 
	value = 1.25
	mine = yes
}

opium_plantation = {
	template = RGO_template_farmers
	output_goods = opium 
	value = 5.9
	farm = yes
}

orchard = {
	template = RGO_template_farmers
	output_goods = fruit 
	value = 4.3
	farm = yes
}

precious_metal_mine = {
	template = RGO_template_labourers
	output_goods = precious_metal 
	value = 1.9
	farm = yes
}

rubber_lodge = {
	template = RGO_template_labourers
	output_goods = rubber 
	value = 1.25
	farm = yes
}

sheep_ranch = {
	template = RGO_template_farmers
	output_goods = wool 
	value = 8.15
	farm = yes
}

silkworm_ranch = {
	template = RGO_template_farmers
	output_goods = silk 
	value = 1.0
	farm = yes
}

sulphur_mine = {
	template = RGO_template_labourers
	output_goods = sulphur 
	value = 2.0
	mine = yes
}

tea_plantation = {
	template = RGO_template_farmers
	output_goods = tea 
	value = 3.18
	farm = yes
}

timber_lodge = {
	template = RGO_template_labourers
	output_goods = timber 
	value = 3.4
	farm = yes
}

tobacco_plantation = {
	template = RGO_template_farmers
	output_goods = tobacco 
	value = 14.6
	farm = yes
}

tropical_wood_lodge = {
	template = RGO_template_labourers
	output_goods = tropical_wood 
	value = 10.2
	farm = yes
}

### Artisans #####################################################################################

artisan_aeroplane = {       
	input_goods = {
		machine_parts = 1.6
		electric_gear = 1.6
		rubber = 0.8 
		lumber = 2.4
	}
	output_goods = aeroplanes
	value = 0.8
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_barrel = {       
	input_goods = {   
		automobiles = 0.8
		machine_parts = 0.1	
		electric_gear = 0.1	
		rubber = 0.8
	}
	output_goods = barrels 
	value = 0.8
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_automobile = {       
	input_goods = {     
		machine_parts = 1.6
		electric_gear = 0.8
		rubber = 0.8
		steel = 0.8
	}
	output_goods = automobiles 
	value = 0.8
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_radio = {       
	input_goods = {      
		glass = 1.8
		electric_gear = 0.8
	}
	output_goods = radio 
	value = 0.8
	
	owner = {
		poptype = artisan  
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_telephone = {       
	input_goods = {       
		glass = 1.8
		electric_gear = 0.8
	}
	output_goods = telephones 
	value = 0.8
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

############# STRATEGIC FACTORIES

artisan_electric_gear = {       
	input_goods = { 
		rubber = 0.8
		coal = 0.8
		iron = 0.8
	}
	output_goods = electric_gear 
	value = 1.05
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_machine_parts = {       
	input_goods = {    
		steel = 0.1
		coal = 0.2	
		iron = 0.2	
	}
	output_goods = machine_parts 
	value = 0.25
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

############# ADVANCED FACTORIES

artisan_fuel = {       
	input_goods = { 
		oil = 1.6
	}
	output_goods = fuel
	value = 0.8
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_steamer = {       
	input_goods = { 
		steel = 1.2
		coal = 1.2
	}
	output_goods = steamer_convoy 
	value = 0.4
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	is_coastal = yes
	
	workforce = 10000
}

############# LUXURY GOODS FACTORIES

artisan_luxury_clothes = {       
	input_goods = {   
		regular_clothes = 0.8
		silk = 0.4
	}
	output_goods = luxury_clothes 
	value = 0.3
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_luxury_furniture = {       
	input_goods = { 
		furniture = 0.4
		tropical_wood = 0.4
	}
	output_goods = luxury_furniture 
	value = 0.2
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

############# MEDIUM FACTORIES

artisan_steel = {       
	input_goods = { 
		iron = 17
		coal = 4	
	}
	output_goods = steel 
	value = 22
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	limit_by_local_supply = yes	
	type = artisan
	
	workforce = 10000
}

artisan_artillery = {       
	input_goods = { 
		explosives = 0.25
		steel = 0.25
	}
	output_goods = artillery 
	value = 0.32
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_clipper = {       
	input_goods = {         
		fabric = 6.0
		lumber = 6.0
		timber = 6.0
	}
	output_goods = clipper_convoy 
	value = 1.4
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	is_coastal = yes
	workforce = 10000
}

artisan_small_arms = {       
	input_goods = {        
		ammunition = 0.20
		steel = 0.20
	}
	output_goods = small_arms 
	value = 0.20
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

############# COMMON FACTORIES
       
artisan_furniture = {       
	input_goods = { 
		lumber = 7
		timber = 1.5
	}
	output_goods = furniture 
	value = 6.0
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_paper = {       
	input_goods = { 
		lumber = 10
	}
	output_goods = paper 
	value = 15
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_regular_clothes = {       
	input_goods = {  
		fabric = 8
		dye = 2.0
	}
	output_goods = regular_clothes 
	value = 14.0
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_explosives = {       
	input_goods = {   
		fertilizer = 1.3
		ammunition = 0.07	 
	}
	output_goods = explosives 
	value = 0.9
	
	owner = {
		poptype = artisan
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

############# CHEAP FACTORIES

artisan_ammunition = {       
	input_goods = {      
		sulphur = 0.3
		coal = 0.03		
		iron = 0.03
	}
	output_goods = ammunition
	value = 0.15
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_canned_food = {       
	input_goods = { 
		iron = 0.85
		cattle = 0.33
		grain = 0.33
		fish = 0.33
	}
	output_goods = canned_food 
	value = 1.15
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_liquor = {       
	input_goods = {        
		grain = 6.2
		glass = 1.0
	}
	output_goods = liquor 
	value = 6.6
	
	owner = {
		poptype = artisan  
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_winery = {       

	input_goods = {  
		fruit = 4.0
		glass = 0.9
	}
	output_goods = wine 
	value = 3.5
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

############# BASIC FACTORIES 

artisan_lumber = {       
	input_goods = {       
		timber = 50
	}
	output_goods = lumber 
	value = 150
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	limit_by_local_supply = yes
	type = artisan
	
	workforce = 10000
}

artisan_fabric = {       
	input_goods = {     
		cotton = 18
	}
	output_goods = fabric 
	value = 28.1
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_cement = {       
	input_goods = {           
		coal = 1.9
	}
	output_goods = cement 
	value = 0.5
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_glass = {       
	input_goods = {            
		coal = 4.4
	}
	output_goods = glass 
	value = 7
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}

artisan_fertilizer = {       
	input_goods = {   
		sulphur = 3.75
	}
	output_goods = fertilizer 
	value = 7.5
	
	owner = {
		poptype = artisan 
		effect = output
	}
	
	type = artisan
	
	workforce = 10000
}