﻿TREATIES = {
	# Treaty of Hünkâr İskelesi / Unkiar Skelessi
	create_treaty = {
		name = treaty_name_hunkar_iskelesi
		first_country = c:RUS
		second_country = c:TUR

		is_draft = no
		entered_into_force_on = 1833.7.8
		binding_period = { years = 8 } # Initially to last for 8 years, generally held to have ended in 1840

		articles_to_create = {
			{ # To sort of model Turkish Straits Access (secret clause)
				article = military_access
				source_country = c:TUR
				target_country = c:RUS
			}
		}
	}
	### Holy Alliance - Russia, Austria, Prussia
	# Holy Alliance - RUS/AUS
	create_treaty = {
		name = treaty_name_holy_alliance
		first_country = c:RUS
		second_country = c:AUS

		is_draft = no
		entered_into_force_on = 1815.10.26
		binding_period = { years = 35 } # 14 years to cover the Revolutions of 1848

		articles_to_create = {
			{ # Defensive Pact
				article = defensive_pact
			}
		}
	}
	# Holy Alliance - PRU/AUS
	create_treaty = {
		name = treaty_name_holy_alliance
		first_country = c:PRU
		second_country = c:AUS

		is_draft = no
		entered_into_force_on = 1815.10.26
		binding_period = { years = 35 } # 14 years to cover the Revolutions of 1848

		articles_to_create = {
			{ # Defensive Pact
				article = defensive_pact
			}
		}
	}
	# Holy Alliance - PRU/RUS
	create_treaty = {
		name = treaty_name_holy_alliance
		first_country = c:PRU
		second_country = c:RUS

		is_draft = no
		entered_into_force_on = 1815.10.26
		binding_period = { years = 35 } # 14 years to cover the Revolutions of 1848

		articles_to_create = {
			{ # Defensive Pact
				article = defensive_pact
			}
		}
	}
	### Quadruple Alliance
	# Quadruple Alliance - GBR/POR
	if = {
		limit = {
			OR = {
				has_dlc_feature = foreign_investment
				has_dlc_feature = mp1_treaties
			}
		}
		create_treaty = {
			name = treaty_name_quadruple_alliance
			first_country = c:GBR
			second_country = c:POR

			is_draft = no
			entered_into_force_on = 1834.4.22
			binding_period = { years = 10 } # 8 years

			articles_to_create = {
				{ # Anglo-Portuguese Alliance
					article = defensive_pact
				}
				{ # British Military Assistance to Portugal
					article = military_assistance
					source_country = c:GBR
					target_country = c:POR
				}
				{ # British Economic interests in Portugal
					article = foreign_investment_rights
					source_country = c:POR
					target_country = c:GBR
				}
				{ # British Portuguese Trade Agreement
					article = trade_privilege
					source_country = c:GBR
					target_country = c:POR
				}
				{ # Port wine trade
					article = goods_transfer
					source_country = c:POR
					target_country = c:GBR
					inputs = {
						{ goods = g:wine }
						{ quantity = 20 }
					}
				}
			}
		}
	}
	else = {
		create_treaty = {
			name = treaty_name_quadruple_alliance
			first_country = c:GBR
			second_country = c:POR

			is_draft = no
			entered_into_force_on = 1834.4.22
			binding_period = { years = 10 } # 8 years

			articles_to_create = {
				{ # Anglo-Portuguese Alliance
					article = defensive_pact
				}
				{ # British Military Assistance to Portugal
					article = military_assistance
					source_country = c:GBR
					target_country = c:POR
				}
				{ # British Portuguese Trade Agreement
					article = trade_privilege
					source_country = c:GBR
					target_country = c:POR
				}
				{ # Port wine trade
					article = goods_transfer
					source_country = c:POR
					target_country = c:GBR
					inputs = {
						{ goods = g:wine }
						{ quantity = 20 }
					}
				}
			}
		}
	}
	# Quadruple Alliance - GBR/SPA
	create_treaty = {
		name = treaty_name_quadruple_alliance
		first_country = c:GBR
		second_country = c:SPA

		is_draft = no
		entered_into_force_on = 1834.4.22
		binding_period = { years = 10 } # 8 years

		articles_to_create = {
			{ # Defensive Pact
				article = defensive_pact
			}
			{ # British Military Assistance to Spain
				article = military_assistance
				source_country = c:GBR
				target_country = c:SPA
			}
		}
	}
	# Quadruple Alliance - FRA/SPA
	create_treaty = {
		name = treaty_name_quadruple_alliance
		first_country = c:FRA
		second_country = c:SPA

		is_draft = no
		entered_into_force_on = 1834.4.22
		binding_period = { years = 10 } # 8 years

		articles_to_create = {
			{ # Defensive Pact
				article = defensive_pact
			}
			{ # French Military Support to Spanish government
				article = military_assistance
				source_country = c:FRA
				target_country = c:SPA
			}
		}
	}
	# Quadruple Alliance - FRA/POR
	create_treaty = {
		name = treaty_name_quadruple_alliance
		first_country = c:FRA
		second_country = c:POR

		is_draft = no
		entered_into_force_on = 1834.4.22
		binding_period = { years = 10 } # 8 years

		articles_to_create = {
			{ # Defensive Pact
				article = defensive_pact
			}
		}
	}
	# Quadruple Alliance - POR/SPA
	create_treaty = {
		name = treaty_name_quadruple_alliance
		first_country = c:SPA
		second_country = c:POR

		is_draft = no
		entered_into_force_on = 1834.4.22
		binding_period = { years = 10 } # 8 years

		articles_to_create = {
			{ # Defensive Pact
				article = defensive_pact
			}
		}
	}

	# French Guarantee of Belgian Independence / Not official treaty
	create_treaty = {
		first_country = c:FRA
		second_country = c:BEL

		is_draft = no
		entered_into_force_on = 1831.8.8 # Date of French intervention during the Ten Days' Campaign
		binding_period = { years = 15 } # 10 years Treaty of London

		articles_to_create = {
			{ # French Guarantee of Belgian Independence
				article = guarantee_independence
				source_country = c:FRA
				target_country = c:BEL
			}
		}
	}

	# French Military Mission to Egypt
	if = {
		limit = {
			OR = {
				has_dlc_feature = foreign_investment
				has_dlc_feature = mp1_treaties
			}
		}
		create_treaty = {
			name = treaty_name_french_military_mission_to_egypt
			first_country = c:FRA
			second_country = c:EGY

			is_draft = no
			entered_into_force_on = 1824.11.24 # Date of arrival of first French military mission under Boyer
			binding_period = { years = 20 } # 8 years to cover the duration of the Orient Crisis

			articles_to_create = {
				{ # French Military Support to Egypt
					article = military_assistance
					source_country = c:FRA
					target_country = c:EGY
				}
				{ # Small arms aid
					article = goods_transfer
					source_country = c:FRA
					target_country = c:EGY
					inputs = {
						{ goods = g:small_arms }
						{ quantity = 10 }
					}
				}
				{ # Artillery aid
					article = goods_transfer
					source_country = c:FRA
					target_country = c:EGY
					inputs = {
						{ goods = g:artillery }
						{ quantity = 5 }
					}
				}
				{ # French Economic interests in Egypt
					article = foreign_investment_rights
					source_country = c:EGY
					target_country = c:FRA
				}
				{ # Cotton trade
					article = goods_transfer
					source_country = c:EGY
					target_country = c:FRA
					inputs = {
						{ goods = g:fabric }
						{ quantity = 120 }
					}
				}
			}
		}
	}
	else = {
		create_treaty = {
			name = treaty_name_french_military_mission_to_egypt
			first_country = c:FRA
			second_country = c:EGY

			is_draft = no
			entered_into_force_on = 1824.11.24 # Date of arrival of first French military mission under Boyer
			binding_period = { years = 20 } # 8 years to cover the duration of the Orient Crisis

			articles_to_create = {
				{ # French Military Support to Egypt
					article = military_assistance
					source_country = c:FRA
					target_country = c:EGY
				}
				{ # Small arms aid
					article = goods_transfer
					source_country = c:FRA
					target_country = c:EGY
					inputs = {
						{ goods = g:small_arms }
						{ quantity = 10 }
					}
				}
				{ # Artillery aid
					article = goods_transfer
					source_country = c:FRA
					target_country = c:EGY
					inputs = {
						{ goods = g:artillery }
						{ quantity = 5 }
					}
				}
				{ # Cotton trade
					article = goods_transfer
					source_country = c:EGY
					target_country = c:FRA
					inputs = {
						{ goods = g:fabric }
						{ quantity = 120 }
					}
				}
			}
		}
	}

	# US Military Assistance to Texas (unofficial, but substantial)
	create_treaty = {
		name = treaty_name_us_military_mission_to_texas
		first_country = c:USA
		second_country = c:TEX

		is_draft = no
		entered_into_force_on = 1835.10.2 # Start of Texas Revolt
		binding_period = { years = 5 } # about 5 years

		articles_to_create = {
			{
				article = military_assistance
				source_country = c:USA
				target_country = c:TEX
			}
			{ # Small arms aid
				article = goods_transfer
				source_country = c:USA
				target_country = c:TEX
				inputs = {
					{ goods = g:small_arms }
					{ quantity = 10 }
				}
			}
			{ # Naval aid
				article = goods_transfer
				source_country = c:USA
				target_country = c:TEX
				inputs = {
					{ goods = g:manowars }
					{ quantity = 1 }
				}
			}
		}
	}

	# British Guarantee of Maldivan Independence / Not official treaty
	create_treaty = {
		first_country = c:GBR
		second_country = c:MLD

		is_draft = no
		entered_into_force_on = 1796.5.3 # Capture of Dutch Ceylon
		binding_period = { years = 45 } # 5 years

		articles_to_create = {
			{ # British Guarantee of Maldivan Independence
				article = guarantee_independence
				source_country = c:GBR
				target_country = c:MLD
			}
		}
	}

	# Austrian Guarantee of Sicilian Independence / Not official treaty
	create_treaty = {
		first_country = c:AUS
		second_country = c:SIC

		is_draft = no
		entered_into_force_on = 1815.6.9 # Final Act of the Congress of Vienna
		binding_period = { years = 35 } # 14 years to cover the Revolutions of 1848

		articles_to_create = {
			{ # Austrian Guarantee of Sicilian Independence
				article = guarantee_independence
				source_country = c:AUS
				target_country = c:SIC
			}
			{ # Austrian-Sicilian Trade Agreement
				article = trade_privilege
				source_country = c:AUS
				target_country = c:SIC
			}
			{ # Austrian-Sicilian Trade Agreement
				article = trade_privilege
				source_country = c:SIC
				target_country = c:AUS
			}
		}
	}

	# Austrian Guarantee of Tuscan Independence / Not official treaty
	create_treaty = {
		first_country = c:AUS
		second_country = c:TUS

		is_draft = no
		entered_into_force_on = 1815.6.9 # Final Act of the Congress of Vienna
		binding_period = { years = 35 } # 14 years to cover the Revolutions of 1848

		articles_to_create = {
			{ # Austrian Guarantee of Tuscan Independence
				article = guarantee_independence
				source_country = c:AUS
				target_country = c:TUS
			}
			{ # Austrian-Tuscan Trade Agreement
				article = trade_privilege
				source_country = c:AUS
				target_country = c:TUS
			}
			{ # Austrian-Tuscan Trade Agreement
				article = trade_privilege
				source_country = c:TUS
				target_country = c:AUS
			}
		}
	}

	# Austrian Guarantee of Parmese Independence / Not official treaty
	create_treaty = {
		first_country = c:AUS
		second_country = c:PAR

		is_draft = no
		entered_into_force_on = 1815.6.9 # Final Act of the Congress of Vienna
		binding_period = { years = 35 } # 14 years to cover the Revolutions of 1848

		articles_to_create = {
			{ # Austrian Guarantee of Parmese Independence
				article = guarantee_independence
				source_country = c:AUS
				target_country = c:PAR
			}
		}
	}

	# Austrian Guarantee of Modenan Independence / Not official treaty
	create_treaty = {
		first_country = c:AUS
		second_country = c:MOD

		is_draft = no
		entered_into_force_on = 1815.6.9 # Final Act of the Congress of Vienna
		binding_period = { years = 35 } # 14 years to cover the Revolutions of 1848

		articles_to_create = {
			{ # Austrian Guarantee of Modenan Independence
				article = guarantee_independence
				source_country = c:AUS
				target_country = c:MOD
			}
		}
	}

	# Anglo-Belgian Trade relationship / Not official treaty
	if = {
		limit = {
			OR = {
				has_dlc_feature = foreign_investment
				has_dlc_feature = mp1_treaties
			}
		}
		create_treaty = {
			first_country = c:GBR
			second_country = c:BEL

			is_draft = no
			entered_into_force_on = 1831.8.12 # End of the Ten Days' Campaign
			binding_period = { years = 15 } # 10 years

			articles_to_create = {
				{ # Anglo-Belgian Trade Agreement
					article = trade_privilege
					source_country = c:GBR
					target_country = c:BEL
				}
				{ # Anglo-Belgian Trade Agreement
					article = trade_privilege
					source_country = c:BEL
					target_country = c:GBR
				}
				{ # British economic interests in Belgium
					article = foreign_investment_rights
					source_country = c:BEL
					target_country = c:GBR
				}
			}
		}
	}
	else = {
		create_treaty = {
			first_country = c:GBR
			second_country = c:BEL

			is_draft = no
			entered_into_force_on = 1831.8.12 # End of the Ten Days' Campaign
			binding_period = { years = 15 } # 10 years

			articles_to_create = {
				{ # Anglo-Belgian Trade Agreement
					article = trade_privilege
					source_country = c:GBR
					target_country = c:BEL
				}
				{ # Anglo-Belgian Trade Agreement
					article = trade_privilege
					source_country = c:BEL
					target_country = c:GBR
				}
			}
		}
	}

	# Hamburg-Prussian Trade relationship / Not official treaty
	create_treaty = {
		name = treaty_name_ham_pru_trade
		first_country = c:HAM
		second_country = c:PRU

		is_draft = no
		entered_into_force_on = 1815.6.9 # Final Act of the Congress of Vienna
		binding_period = { years = 25 } # 4 years

		articles_to_create = {
			{ # Hamburg-Prussian Trade Agreement
				article = trade_privilege
				source_country = c:HAM
				target_country = c:PRU
			}
			{ # Hamburg-Prussian Trade Agreement
				article = trade_privilege
				source_country = c:PRU
				target_country = c:HAM
			}
		}
	}

	# Swedish-Prussian Trade relationship / Not official treaty
	create_treaty = {
		name = treaty_name_swe_pru_trade
		first_country = c:SWE
		second_country = c:PRU

		is_draft = no
		entered_into_force_on = 1834.1.1 # Formal formation of the Zollverein with which Sweden traded
		binding_period = { years = 10 } # 8 years

		articles_to_create = {
			{ # Swedish-Prussian Trade Agreement
				article = trade_privilege
				source_country = c:SWE
				target_country = c:PRU
			}
			{ # Swedish-Prussian Trade Agreement
				article = trade_privilege
				source_country = c:PRU
				target_country = c:SWE
			}
		}
	}

	create_treaty = {
		name = treaty_name_prussian_military_mission_to_turkey
		first_country = c:PRU
		second_country = c:TUR

		is_draft = no
		entered_into_force_on = 1835.11.29 # von Moltkes arrival in Constantinople
		binding_period = { years = 15 } # 14 years from game start

		articles_to_create = {
			{ # Prussian Military Mission in Turkey
				article = military_assistance
				source_country = c:PRU
				target_country = c:TUR
			}
		}
	}

	# Transit Rights Agreement for Switzerland
	create_treaty = {
		name = treaty_name_swi_transit_rights
		first_country = c:SWI
		second_country = c:FRA

		is_draft = no
		entered_into_force_on = 1836.1.1
		binding_period = { years = 10 } # 10 years

		articles_to_create = {
			{
				article = transit_rights
				source_country = c:FRA
				target_country = c:SWI
			}
		}
	}

	# Transit Rights Agreement for Luxemburg
	create_treaty = {
		name = treaty_name_lux_transit_rights
		first_country = c:PRU # Luxemburg was a part of the German Confederation and Zollverein but we cant represent it in-game (for now)
		second_country = c:LUX

		is_draft = no
		entered_into_force_on = 1836.1.1
		binding_period = { years = 10 } # 10 years

		articles_to_create = {
			{
				article = transit_rights
				source_country = c:PRU
				target_country = c:LUX
			}
		}
	}

	# Macau Treaty Port
	create_treaty = {
		name = treaty_name_luso_chinese_agreement
		first_country = c:POR
		second_country = c:CHI

		is_draft = no
		entered_into_force_on = 1554.1.1 # Establishment of Portugese Macau
		binding_period = { years = 381 } # 99 year binding period after start of game

		articles_to_create = {
			{
				article = treaty_port
				source_country = c:CHI
				target_country = c:POR
				inputs = {
					{ state = s:STATE_GUANGDONG.region_state:CHI }
				}
			}
			{
				article = money_transfer
				source_country = c:POR
				target_country = c:CHI
				inputs = {
					{ quantity = 150 } # The rent of Macau was 500 taels, about 700 spanish dollars or 145 pounds in 1840 (based on silver prices)
				}
			}
		}
	}

	# Singapore Treaty Port
	create_treaty = {
		name = treaty_name_singapore_treaty
		first_country = c:JOH
		second_country = c:BIC

		is_draft = no
		entered_into_force_on = 1819.1.1 # Establishment of Singapore as a british trading port
		binding_period = { years = 116 } # 99 year binding period after start of game

		articles_to_create = {
			{
				article = treaty_port
				source_country = c:JOH
				target_country = c:BIC
				inputs = {
					{ state = s:STATE_MALAYA.region_state:JOH }
				}
			}
			{
				article = money_transfer
				source_country = c:BIC
				target_country = c:JOH
				inputs = {
					{ quantity = 100 }
				}
			}
		}
	}

	# Hormuz Treaty Port
	create_treaty = {
		name = treaty_name_firman_of_1793
		first_country = c:OMA
		second_country = c:PER

		is_draft = no
		entered_into_force_on = 1793.1.1
		binding_period = { years = 142 } # 99 year binding period after start of game

		articles_to_create = {
			{
				article = treaty_port
				source_country = c:PER
				target_country = c:OMA
				inputs = {
					{ state = s:STATE_LARISTAN.region_state:PER }
				}
			}
			{
				article = money_transfer
				source_country = c:OMA
				target_country = c:PER
				inputs = {
					{ quantity = 100 } # Loose estimate, the rent was 'thousands of tomans per year' (1 toman was roughly equal to a pound in 1815)
				}
			}
		}
	}

	# Prussia Military Access
	create_treaty = {
		first_country = c:PRU
		second_country = c:HAN

		is_draft = no
		entered_into_force_on = 1836.1.1
		binding_period = { years = 10 } # 10 year binding period after start of game

		articles_to_create = {
			{
				article = military_access
				source_country = c:HAN
				target_country = c:PRU
			}
			{
				article = military_access
				source_country = c:PRU
				target_country = c:HAN
			}
		}
	}
	create_treaty = {
		first_country = c:PRU
		second_country = c:BAV

		is_draft = no
		entered_into_force_on = 1836.1.1
		binding_period = { years = 10 } # 10 year binding period after start of game

		articles_to_create = {
			{
				article = military_access
				source_country = c:PRU
				target_country = c:BAV
			}
			{
				article = military_access
				source_country = c:BAV
				target_country = c:PRU
			}
		}
	}

	# Dutch-Japanese Trade relationship / Dejima, Nagasaki / Not official treaty
	create_treaty = {
		name = treaty_name_dejima_trade
		first_country = c:NET
		second_country = c:JAP

		is_draft = no
		entered_into_force_on = 1799.12.31 # Date of VOC dissolution
		binding_period = { years = 60 } # 23 years until the Opening of Japan

		articles_to_create = {
			{ # Glasswares
				article = goods_transfer
				source_country = c:JAP
				target_country = c:NET
				inputs = {
					{ goods = g:glass }
					{ quantity = 20 }
				}
			}
			{ # Porcelain Trade
				article = goods_transfer
				source_country = c:JAP
				target_country = c:NET
				inputs = {
					{ goods = g:porcelain }
					{ quantity = 20 }
				}
			}
			{ # Silk Trade
				article = goods_transfer
				source_country = c:JAP
				target_country = c:NET
				inputs = {
					{ goods = g:silk }
					{ quantity = 40 }
				}
			}
			{ # Spirits Trade
				article = goods_transfer
				source_country = c:NET
				target_country = c:JAP
				inputs = {
					{ goods = g:liquor }
					{ quantity = 30 }
				}
			}
		}
	}

	# Sino-Japanese Trade relationship / Nagasaki / Not official treaty
	create_treaty = {
		name = treaty_name_nagasaki_trade
		first_country = c:CHI
		second_country = c:JAP

		is_draft = no
		entered_into_force_on = 1604.1.15 # Year when Tokugawa Ieyasu authorized formal trade with China in Nagasaki
		binding_period = { years = 250 } # 18 years

		articles_to_create = {
			{ # Copper (-isch.) trade
				article = goods_transfer
				source_country = c:JAP
				target_country = c:CHI
				inputs = {
					{ goods = g:lead }
					{ quantity = 20 }
				}
			}
			{
				article = goods_transfer
				source_country = c:CHI
				target_country = c:JAP
				inputs = {
					{ goods = g:tools }
					{ quantity = 20 }
				}
			}
		}
	}

	create_treaty = {
		name = treaty_name_bav_transit_rights
		first_country = c:BAV
		second_country = c:PRU

		is_draft = no
		entered_into_force_on = 1836.1.1
		binding_period = { years = 20 } 

		articles_to_create = {
			{
				article = transit_rights
				source_country = c:PRU
				target_country = c:BAV
			}
		}
	}

	create_treaty = {
		name = treaty_name_bad_transit_rights
		first_country = c:BAD
		second_country = c:PRU

		is_draft = no
		entered_into_force_on = 1836.1.1
		binding_period = { years = 20 } 

		articles_to_create = {
			{
				article = transit_rights
				source_country = c:PRU
				target_country = c:BAD
			}
		}
	}

	create_treaty = {
		name = treaty_name_wur_transit_rights
		first_country = c:WUR
		second_country = c:PRU

		is_draft = no
		entered_into_force_on = 1836.1.1
		binding_period = { years = 20 } 

		articles_to_create = {
			{
				article = transit_rights
				source_country = c:PRU
				target_country = c:WUR
			}
		}
	}
}
