# Terra Nova
#
# base_price = X		base price in $.		  (default is 1.0 if not specified
# min_demand = 0.5	  	Demand is never lower than this.  (default is 0.01 if not specified)
# max_demand = 1.4		Demand is never higher than this.  (default is 2.0 if not specified)
# goldtype = yes/no		This resource works like 'gold' if yes, using prices from mine-value in province instead of supply/demand and baseprice.  Also creates gold-inflation
# Supply = { mtth def } 	Added together for every province producing it and multiplied by prod value.
# Demand = { mtth def }		added together for every province owned by someone, multiplied by 0.01 * taxvalue/10 (for size)
#
grain = {
	base_price = 10
	
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}	
		modifier = {
			factor = 0.9
			NOT = { owner = { stability = -2 } }
		}
		modifier = {
			factor = 0.9
			NOT = { owner = { stability = -1 } }
		}
		modifier = {
			factor = 0.9
			NOT = { owner = { stability = 0 } }
		}
		modifier = {
			factor = 1.2
			owner = { stability = 1 }
		}
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
	}
	demand = {
		modifier = {
			factor = 1.1
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { war = no }
		}
		modifier = {
			factor = 1.05
			has_building = regimental_camp
		}
		modifier = {
			factor = 1.05
			owner = { stability = 2 }
		}
		modifier = {
			factor = 1.1
			NOT = { owner = { grain = 1 } }
		}
		modifier = {
			factor = 0.95
			owner = { fish = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { livestock = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { grain = 1 }
		}
	}
}

wine = {
	base_price = 10
	
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}		
		modifier = {
			factor = 0.9
			NOT = { owner = { stability = -2 } }
		}
		modifier = {
			factor = 0.9
			NOT = { owner = { stability = -1 } }
		}
		modifier = {
			factor = 0.9
			NOT = { owner = { stability = -0 } }
		}
		modifier = {
			factor = 0.5
			religion_group = muslim
		}
		modifier = {
			factor = 1.3
			owner = { stability = 1 }
		}
		modifier = {
			factor = 0.9
			revolt_risk = 2
		}
		modifier = {
			factor = 0.9
			revolt_risk = 4
		}
		modifier = {
			factor = 0.9
			revolt_risk = 6
		}
		modifier = {
			factor = 0.9
			revolt_risk = 8
		}
		modifier = {
			factor = 0.9
			revolt_risk = 10
		}
		modifier = {
			factor = 1.3
			has_building = refinery
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.3 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.6 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.9 }
		}
	}
	demand = {
		modifier = {
			factor = 1.1
			has_building = refinery
		}
		modifier = {
			factor = 1.1
			has_building = university
		}
		modifier = {
			factor = 1.05
			owner = { stability = 2 }
		}
		modifier = {
			factor = 1.05
			owner = { prestige = 0.2 }
		}
		modifier = {
			factor = 1.05
			owner = { prestige = 0.4 }
		}
		modifier = {
			factor = 1.05
			owner = { prestige = 0.6 }
		}
		modifier = {
			factor = 1.05
			owner = { prestige = 0.8 }
		}
		modifier = {
			factor = 0.9
			owner = { innovative_narrowminded = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { wine = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { NOT = { prestige = 0.0 } }
		}	
	}
}

wool = {
	base_price = 5

	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.9
			is_overseas = yes
		}
		modifier = {
			factor = 1.3
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.3
			has_building = textile
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.3 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.6 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.9 }
		}
	}
	demand = {
		modifier = {
			factor = 1.1
			has_building = shipyard
		}
		modifier = {
			factor = 1.1
			has_building = textile
		}
		modifier = {
			factor = 0.95
			NOT = { has_building = textile }
		}
		modifier = {
			factor = 0.95
			owner = { wool = 1 }
		}
		modifier = {
			factor = 1.05
			has_building = regimental_camp
		}		
	}
}

cloth = {
	base_price = 15
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 1.3
			has_building = textile
		}
		modifier = {
			factor = 1.3
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.3 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.6 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.9 }
		}		
	}
	demand = {
		modifier = {
			factor = 1.1
			has_building = shipyard
		}
		modifier = {
			factor = 1.1
			has_building = textile
		}
		modifier = {
			factor = 1.1
			has_building = regimental_camp
		}
		modifier = {
			factor = 0.95
			NOT = { has_building = textile }
		}
		modifier = {
			factor = 0.95
			owner = { cloth = 1 }
		}		
	}
}

fish = {
	base_price = 10
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.1
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}	
		modifier = {
			factor = 0.9
			NOT = { owner = { stability = -2 } }
		}
		modifier = {
			factor = 0.9
			NOT = { owner = { stability = -1 } }
		}
		modifier = {
			factor = 0.9
			NOT = { owner = { stability = -0 } }
		}
		modifier = {
			factor = 0.1
			NOT = { owner= { num_of_ports = 1 } }
		}
		modifier = {
			factor = 1.2
			has_building = shipyard
		}
		modifier= {
			factor = 0.7
			NOT = { owner = { land_naval = 1 } }
		}
		modifier = {
			factor = 1.2
			has_building = wharf
		}		
	}
	demand = {	
		modifier = {
			factor = 1.05
			port = yes
		}
		modifier = {
			factor = 0.95
			port = no
		}
		modifier = {
			factor = 0.95
			owner = { grain = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { livestock = 1 }
		}
		modifier = {
			factor = 1.05
			has_building = wharf
		}	
		modifier = {
			factor = 1.05
			owner = { stability = 2 }
		}
		modifier = {
			factor = 1.05
			has_building = shipyard
		}
		modifier = {
			factor = 0.95
			owner = { fish = 1 }
		}
	}
}

fur = {
	base_price = 10
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.2
			owner = { war = yes }
		}
		modifier = {
			factor = 0.1
			owner = { government = revolutionary_republic }
		}
		modifier = {
			factor = 1.3
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			has_building = workshop
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.3 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.6 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.9 }
		}		
	}
	demand = {
		modifier = {
			factor = 1.1
			has_building = workshop
		}
		modifier = {
			factor = 0.95
			NOT = { has_building = workshop }
		}
		modifier = {
			factor = 0.95
			owner = { fur = 1 }
		}
		modifier = {
			factor = 1.1
			has_building = regimental_camp
		}
	}
}

salt = {
	base_price = 15
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.8
			port = yes
		}
		modifier = {
			factor = 1.3
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.05
			owner = { copper = 1 }
		}
		modifier = {
			factor = 1.1
			owner = { iron = 1 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.3 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.6 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.9 }
		}	
	}
	demand = {
		modifier = {
			factor = 1.1
			owner = { stability = 2 }
		}	
		modifier = {
			factor = 1.1
			has_building = regimental_camp
		}
		modifier = {
			factor = 0.95
			NOT = { has_building = regimental_camp }
		}
		modifier = {
			factor = 0.95
			owner = { salt = 1 }
		}	
	}
}

naval_supplies = {
	base_price = 5
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.4
			owner = { NOT = { land_naval = 1 } }
		}
		modifier = {
			factor = 0.5
			owner = {
				land_naval = 1
				war = yes
			}
		}
		modifier = {
			factor = 1.2
			has_building = shipyard
		}
		modifier = {
			factor = 1.2
			has_building = wharf
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.3 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.6 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.9 }
		}
	}
	demand = {
		modifier = {
			factor = 1.1
			has_building = wharf
		}	
		modifier = {
			factor = 1.1
			has_building = shipyard
		}
		modifier = {
			factor = 1.1
			owner = {
				land_naval = 1
				war = yes
			}
		}
		modifier = {
			factor = 0.95
			owner = {
				NOT = { land_naval = 1 }
				war = no
			}
		}	
		modifier = {
			factor = 1.1
			has_building = admiralty
		}
		modifier = {
			factor = 1.05
			port = yes
		}
		modifier = {
			factor = 0.95
			owner = { naval_supplies = 1 }
		}
	}
}

# metals
copper = {
	base_price = 15
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 1.5
			has_building = weapons
		}
		modifier = {
			factor = 0.1
			owner = {
				OR = {
					technology_group = african
					technology_group = new_world
				}
			}
		}
		modifier = {
			factor = 0.5
			owner = { war = yes }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 1 }
		}			
	}
	demand = {
		modifier  = {
			factor = 1.1
			owner = { artillery = 1 }
		}
		modifier = {
			factor = 1.1
			owner = { land_tech = 30 }
		}
		modifier = {
			factor = 0.7
			NOT = { owner = { war = yes } }
		}
		modifier = {
			factor = 1.1
			has_building = regimental_camp
		}
		modifier = {
			factor = 1.1
			has_building = weapons
		}
		modifier = {
			factor = 0.95
			owner = { copper = 1 }
		}
	}
}

gold = {
	base_price = 0
	goldtype = yes
	supply = {
	}
	demand = {
	}
}

iron = {
	base_price = 15
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.1
			owner = {
				OR = {
					technology_group = african
					technology_group = new_world
				}
			}
		}
		modifier = {
			factor = 0.5
			owner = { war = yes }
		}
		modifier = {
			factor = 1.5
			has_building = weapons
		}
		modifier = {
			factor = 1.1
			owner = { stability = 1 }
		}
	}
	demand = {
		modifier  = {
			factor = 1.1
			owner = { infantry = 20 }
		}
		modifier = {
			factor = 1.1
			owner = { land_tech = 30 }
		}
		modifier = {
			factor = 0.7
			NOT = { owner = { war = yes } }
		}
		modifier = {
			factor = 1.1
			has_building = regimental_camp
		}
		modifier = {
			factor = 1.1
			has_building = weapons
		}
		modifier = {
			factor = 0.95
			owner = { iron = 1 }
		}		
	}
}

#African Resources
slaves = {
	base_price = 15
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}	
		modifier = {
			factor = 0.0
			owner = { has_country_flag = Emancipated }
		}
		modifier = {
			factor = 2.0
			owner = { has_country_flag = Slave_Surplus }
		}
		modifier = {
			factor = 1.2
			owner = { NOT = { serfdom_freesubjects = 0 } }
		}
	}
	demand = {
		modifier = {
			factor = 0.8
			owner = { has_country_flag = Emancipated }
		}		
		modifier = {
			factor = 1.1
			is_overseas = yes
		}
		modifier = {
			factor = 1.2
			owner = { has_country_flag = Slave_Surplus }
		}
		modifier = {
			factor = 0.95
			owner = { slaves = 1 }
		}
	}
}

ivory = {
	base_price = 10
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.5
			revolt_risk = 2
		}
		modifier = {
			factor = 1.2
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			has_building = workshop
		}
	}
	demand = {
		modifier = {
			factor = 0.95
			NOT = { has_building = marketplace }
		}
		modifier = {
			factor = 1.1
			has_building = customs_house
		}
		modifier = {
			factor = 1.1
			has_building = constable
		}
		modifier = {
			factor = 1.1
			has_building = tax_assessor
		}
		modifier = {
			factor = 0.95
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { num_of_trade_embargos = 2 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.2 }
		}
		modifier = {
			factor = 0.95
			owner = { ivory = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { NOT = { prestige = 0.0 } }
		}
	}
}

#Eastern Resources
tea = {
	base_price = 10
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}		
		modifier = {
			factor = 0.5
			revolt_risk = 2
		}
		modifier = {
			factor = 1.2
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			has_building = workshop
		}
	}
	demand = {
		modifier = {
			factor = 0.95
			NOT = { has_building = marketplace }
		}
		modifier = {
			factor = 1.1
			has_building = customs_house
		}
		modifier = {
			factor = 1.1
			has_building = constable
		}
		modifier = {
			factor = 1.1
			has_building = tax_assessor
		}
		modifier = {
			factor = 0.95
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { num_of_trade_embargos = 2 }
		}
		modifier = {
			factor = 0.95
			owner = { tea = 1 }
		}
	}
}

chinaware = {
	base_price = 15
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.5
			revolt_risk = 2
		}
		modifier = {
			factor = 1.2
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			has_building = workshop
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.3 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.6 }
		}
		modifier = {
			factor = 1.2
			owner = { production_efficiency = 0.9 }
		}
	}
	demand = {
		modifier = {
			factor = 0.95
			NOT = { has_building = marketplace }
		}
		modifier = {
			factor = 1.1
			has_building = customs_house
		}
		modifier = {
			factor = 1.1
			has_building = constable
		}
		modifier = {
			factor = 1.1
			has_building = tax_assessor
		}
		modifier = {
			factor = 0.95
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { num_of_trade_embargos = 2 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.2 }
		}
		modifier = {
			factor = 1.05
			continent = europe
		}
		modifier = {
			factor = 0.95
			owner = { chinaware = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { NOT = { prestige = 0.0 } }
		}	
	}
}

spices = {
	base_price = 15
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.5
			revolt_risk = 2
		}
		modifier = {
			factor = 1.2
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			has_building = workshop
		}
	}
	demand = {
		modifier = {
			factor = 0.9
			NOT = { has_building = marketplace }
		}
		modifier = {
			factor = 1.1
			has_building = customs_house
		}
		modifier = {
			factor = 1.1
			has_building = constable
		}
		modifier = {
			factor = 1.1
			has_building = tax_assessor
		}
		modifier = {
			factor = 0.95
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { num_of_trade_embargos = 2 }
		}
		modifier = {
			factor = 0.95
			owner = { spices = 1 }
		}
	}
}

coffee = {
	base_price = 15
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.9
			revolt_risk = 2
		}
		modifier = {
			factor = 0.9
			revolt_risk = 4
		}
		modifier = {
			factor = 0.9
			revolt_risk = 6
		}
		modifier = {
			factor = 0.9
			revolt_risk = 8
		}
		modifier = {
			factor = 0.9
			revolt_risk = 10
		}
		modifier = {
			factor = 1.2
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			owner = { has_country_flag = Slave_Surplus }
		}
		modifier = {
			factor = 1.2
			owner = {
				OR = {
					has_country_flag = coffee_spreads
					has_country_flag = coffee_introduced
				}
			}
		}
	}
	demand = {
		modifier = {
			factor = 0.95
			NOT = { has_building = marketplace }
		}
		modifier = {
			factor = 1.1
			has_building = customs_house
		}
		modifier = {
			factor = 1.1
			has_building = constable
		}
		modifier = {
			factor = 1.1
			has_building = tax_assessor
		}
		modifier = {
			factor = 0.95
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { num_of_trade_embargos = 2 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.2 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.4 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.6 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.8 }
		}
		modifier = {
			factor = 0.95
			owner = { coffee = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { NOT = { prestige = 0.0 } }
		}
		modifier = {
			factor = 1.1
			owner = {
				OR = {
					has_country_flag = coffee_spreads
					has_country_flag = coffee_introduced
				}
			}
		}
		modifier = {
			factor = 0.95
			owner = {
				NOT = {
					has_country_flag = coffee_spreads
					has_country_flag = coffee_introduced
				}
			}
		}
	}
}

cotton = {
	base_price = 10
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.5
			revolt_risk = 2
		}
		modifier = {
			factor = 1.5
			has_building = textile
		}
		modifier = {
			factor = 1.2
			owner = { has_country_flag = Slave_Surplus }
		}
	}
	demand = {
		modifier = {
			factor = 0.95
			NOT = { has_building = marketplace }
		}
		modifier = {
			factor = 1.1
			has_building = customs_house
		}
		modifier = {
			factor = 1.1
			has_building = constable
		}
		modifier = {
			factor = 1.1
			has_building = tax_assessor
		}
		modifier = {
			factor = 0.95
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { num_of_trade_embargos = 2 }
		}	
		modifier = {
			factor = 1.1
			has_building = textile
		}
		modifier = {
			factor = 0.95
			owner = { cotton = 1 }
		}	
	}
}

sugar = {
	base_price = 10
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.5
			revolt_risk = 2
		}
		modifier = {
			factor = 1.5
			has_building = refinery
		}
		modifier = {
			factor = 1.2
			owner = { has_country_flag = Slave_Surplus }
		}
	}
	demand = {
		modifier = {
			factor = 0.95
			NOT = { has_building = marketplace }
		}	
		modifier = {
			factor = 1.1
			has_building = customs_house
		}
		modifier = {
			factor = 1.1
			has_building = constable
		}
		modifier = {
			factor = 1.1
			has_building = tax_assessor
		}
		modifier = {
			factor = 0.95
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { num_of_trade_embargos = 2 }
		}
		modifier = {
			factor = 1.1
			has_building = refinery
		}
		modifier = {
			factor = 0.95
			owner = { sugar = 1 }
		}
	}
}

tobacco = {
	base_price = 15
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.9
			revolt_risk = 2
		}
		modifier = {
			factor = 0.9
			revolt_risk = 4
		}
		modifier = {
			factor = 0.9
			revolt_risk = 6
		}
		modifier = {
			factor = 0.9
			revolt_risk = 8
		}
		modifier = {
			factor = 0.9
			revolt_risk = 10
		}
		modifier = {
			factor = 1.3
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			owner = { has_country_flag = Slave_Surplus }
		}
		modifier = {
			factor = 1.2
			owner = {
				OR = {
					has_country_flag = Tobacco_Secret
					has_country_flag = Tobacco_Sell
					has_country_flag = Tobacco_Buy
				}
			}
		}
	}
	demand = {
		modifier = {
			factor = 0.95
			NOT = { has_building = marketplace }
		}
		modifier = {
			factor = 1.1
			has_building = customs_house
		}
		modifier = {
			factor = 1.1
			has_building = constable
		}
		modifier = {
			factor = 1.1
			has_building = tax_assessor
		}
		modifier = {
			factor = 0.95
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { num_of_trade_embargos = 2 }
		}
		modifier = {
			factor = 1.05
			owner = { prestige = 0.2 }
		}
		modifier = {
			factor = 1.05
			owner = { prestige = 0.4 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.6 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.8 }
		}
		modifier = {
			factor = 0.95
			owner = { tobacco = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { NOT = { prestige = 0.0 } }
		}
		modifier = {
			factor = 1.1
			owner = {
				OR = {
					has_country_flag = Tobacco_Secret
					has_country_flag = Tobacco_Sell
					has_country_flag = Tobacco_Buy
				}
			}
		}
		modifier = {
			factor = 0.95
			owner = {
				NOT = {
					has_country_flag = Tobacco_Secret
					has_country_flag = Tobacco_Sell
					has_country_flag = Tobacco_Buy
				}
			}
		}		
	}
}

#TN and IN
cocoa = {
	base_price = 17
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.9
			revolt_risk = 2
		}
		modifier = {
			factor = 0.9
			revolt_risk = 4
		}
		modifier = {
			factor = 0.9
			revolt_risk = 6
		}
		modifier = {
			factor = 0.9
			revolt_risk = 8
		}
		modifier = {
			factor = 0.9
			revolt_risk = 10
		}
		modifier = {
			factor = 1.2
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			owner = { has_country_flag = Slave_Surplus }
		}
		modifier = {
			factor = 1.2
			owner = {
				OR = {
					has_country_flag = Cocoa_Secret
					has_country_flag = Cocoa_Sell
					has_country_flag = Cocoa_Buy
				}
			}
		}
	}
	demand = {
		modifier = {
			factor = 0.95
			NOT = { has_building = marketplace }
		}
		modifier = {
			factor = 1.1
			has_building = customs_house
		}
		modifier = {
			factor = 1.1
			has_building = constable
		}
		modifier = {
			factor = 1.1
			has_building = tax_assessor
		}
		modifier = {
			factor = 0.95
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { num_of_trade_embargos = 2 }
		}
		modifier = {
			factor = 1.05
			owner = { prestige = 0.2 }
		}
		modifier = {
			factor = 1.05
			owner = { prestige = 0.4 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.6 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.8 }
		}
		modifier = {
			factor = 0.95
			owner = { cocoa = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { NOT = { prestige = 0.0 } }
		}
		modifier = {
			factor = 1.1
			owner = {
				OR = {
					has_country_flag = Cocoa_Secret
					has_country_flag = Cocoa_Sell
					has_country_flag = Cocoa_Buy
				}
			}
		}
		modifier = {
			factor = 0.95
			owner = {
				NOT = {
					has_country_flag = Cocoa_Secret
					has_country_flag = Cocoa_Sell
					has_country_flag = Cocoa_Buy
				}
			}
		}
	}
}

opium = {
	base_price = 19
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}
		modifier = {
			factor = 0.9
			revolt_risk = 2
		}
		modifier = {
			factor = 0.9
			revolt_risk = 4
		}
		modifier = {
			factor = 0.9
			revolt_risk = 6
		}
		modifier = {
			factor = 0.9
			revolt_risk = 8
		}
		modifier = {
			factor = 0.9
			revolt_risk = 10
		}
		modifier = {
			factor = 1.2
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			owner = { has_country_flag = Slave_Surplus }
		}
		modifier = {
			factor = 1.2
			owner = {
				OR = {
					has_country_flag = AntiC_Opium
					has_country_flag = Corrupt_Opium
				}
			}
		}
	}
	demand = {
		modifier = {
			factor = 0.95
			NOT = { has_building = marketplace }
		}
		modifier = {
			factor = 1.1
			has_building = customs_house
		}
		modifier = {
			factor = 1.1
			has_building = constable
		}
		modifier = {
			factor = 1.1
			has_building = tax_assessor
		}
		modifier = {
			factor = 0.95
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { num_of_trade_embargos = 2 }
		}
		modifier = {
			factor = 1.05
			owner = { prestige = 0.2 }
		}
		modifier = {
			factor = 1.05
			owner = { prestige = 0.4 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.6 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.8 }
		}
		modifier = {
			factor = 0.95
			owner = { opium = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { NOT = { prestige = 0.0 } }
		}
		modifier = {
			factor = 1.1
			owner = {
				OR = {
					has_country_flag = AntiC_Opium
					has_country_flag = Corrupt_Opium
				}
			}
		}
		modifier = {
			factor = 0.95
			owner = {
				NOT = {
					has_country_flag = AntiC_Opium
					has_country_flag = Corrupt_Opium
				}
			}
		}
	}
}

livestock = {
	base_price = 13
	
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}	
		modifier = {
			factor = 0.9
			NOT = { owner = { stability = -2 } }
		}
		modifier = {
			factor = 0.9
			NOT = { owner = { stability = -1 } }
		}
		modifier = {
			factor = 0.9
			NOT = { owner = { stability = -0 } }
		}
		modifier = {
			factor = 0.5
			units_in_province = 1
		}
		modifier = {
			factor = 0.9
			revolt_risk = 2
		}
		modifier = {
			factor = 0.9
			revolt_risk = 4
		}
		modifier = {
			factor = 0.9
			revolt_risk = 6
		}
		modifier = {
			factor = 0.9
			revolt_risk = 8
		}
		modifier = {
			factor = 0.9
			revolt_risk = 10
		}
		modifier = {
			factor = 1.2
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			has_building = marketplace
		}
	}
	demand = {
		modifier = {
			factor = 1.1
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { war = no }
		}
		modifier = {
			factor = 1.05
			has_building = regimental_camp
		}	
		modifier = {
			factor = 1.05
			owner = { stability = 2 }
		}
		modifier = {
			factor = 0.95
			NOT = { has_building = regimental_camp }
		}
		modifier = {
			factor = 0.95
			owner = { fish = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { livestock = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { grain = 1 }
		}
	}
}

diamonds = {
	base_price = 50
	supply = {
		modifier = {
			factor = 0.2
			looted = yes
		}
		modifier = {
			factor = 0.5
			is_blockaded = yes
		}				
		modifier = {
			factor = 0.5
			NOT = { controlled_by = owner } 
		}		
		modifier = {
			factor = 0.9
			revolt_risk = 2
		}
		modifier = {
			factor = 0.9
			revolt_risk = 4
		}
		modifier = {
			factor = 0.9
			revolt_risk = 6
		}
		modifier = {
			factor = 0.9
			revolt_risk = 8
		}
		modifier = {
			factor = 0.9
			revolt_risk = 10
		}
		modifier = {
			factor = 1.2
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			owner = { has_country_flag = Slave_Surplus }
		}
	}
	demand = {
		modifier = {
			factor = 0.95
			NOT = { has_building = marketplace }
		}
		modifier = {
			factor = 1.1
			has_building = customs_house
		}
		modifier = {
			factor = 1.1
			has_building = constable
		}
		modifier = {
			factor = 1.1
			has_building = tax_assessor
		}
		modifier = {
			factor = 0.95
			owner = { war = yes }
		}
		modifier = {
			factor = 0.95
			owner = { num_of_trade_embargos = 2 }
		}
		modifier = {
			factor = 1.05
			owner = { prestige = 0.2 }
		}
		modifier = {
			factor = 1.05
			owner = { prestige = 0.4 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.6 }
		}
		modifier = {
			factor = 1.1
			owner = { prestige = 0.8 }
		}
		modifier = {
			factor = 0.95
			owner = { diamonds = 1 }
		}
		modifier = {
			factor = 0.95
			owner = { NOT = { prestige = 0.0 } }
		}
	}
}

unknown = {
	base_price = 0
}
