############################
##Created by Aaron Seltzer##
##   The Safavid Heresy   ##
############################

event = {

	id = 3999
	trigger = {
				exists = PER
		}

	random = no
         country = UZB
	name = "EVENTNAME3999"
	desc = "EVENTHIST3999"
	style = 2

	date = { day = 1 month = january year = 1480 }
	offset = 30
	deathdate = { day = 1 month = january year = 1800 }

         action_a ={				#The Safavid Heresy#
                 name = "ACTIONNAME3999A"
                 command = { type = secedeprovince which = PER value = 530 }
                 command = { type = secedeprovince which = PER value = 525 }
                 command = { type = secedeprovince which = PER value = 531 }
                 command = { type = secedeprovince which = PER value = 529 }
                 command = { type = secedeprovince which = PER value = 526 }
                 command = { type = secedeprovince which = PER value = 528 }
                 command = { type = secedeprovince which = PER value = 534 }
                 command = { type = secedeprovince which = PER value = 527 }
                 command = { type = secedeprovince which = PER value = 532 }
                 command = { type = secedeprovince which = PER value = 533 }
                 command = { type = secedeprovince which = PER value = 1530 }
                 command = { type = secedeprovince which = PER value = 535 }
                 command = { type = secedeprovince which = PER value = 1529 }
  command = { type = secedeprovince which = PER value = 1327 }
      }
     action_b = {				#Crush Them#
                 name = "ACTIONNAME3999B"
                 command = { type = stability value = -6 }
                 command = { type = cash value = -1000 }
	}

}

#########################
####  Uzbek Events   ####
####    by Crook     ####
#########################


#Danial Ataliq Regency#
event = {

	id = 65020
	random = no
	country = UZB
	name = "EVENTNAME65020"
	desc = "EVENTHIST65020"
	style = 4

	date = { day = 1 month = january year = 1758 }


	action_a ={
		name = "ACTIONNAME65020A"
		command = { type = DIP which = 3 value = 324 }
		command = { type = ADM which = 3 value = 324 }
		command = { type = MIL which = 4 value = 324 }
		command = { type = stability value = 1 }
		command = { type = domestic which = centralization value = 1 }
	}
}

#Rahim Bi Regency#
event = {

	id = 65021
	random = no
	country = UZB
	name = "EVENTNAME65021"
	desc = "EVENTHIST65021"
	style = 4

	date = { day = 1 month = january year = 1747 }


	action_a ={
		name = "ACTIONNAME65021A"
		command = { type = DIP which = 4 value = 72 }
		command = { type = ADM which = 3 value = 72 }
		command = { type = MIL which = 6 value = 72 }
		command = { type = stability value = 2 }
		command = { type = domestic which = centralization value = 1 } 
	}
}
#Qazaqs and Uzbegs Split#
event = {
	id = 65003
	random = no
	country = UZB
	trigger = {	owned = { province = 1592 data = -1 }
			
			OR = { 
			       owned = { province = 1532 data = -1 }
			       owned = { province = 1599 data = -1 }
                               owned = { province = 1598 data = -1 }
			       owned = { province = 1600 data = -1 }
                               owned = { province = 1534 data = -1 }
			       owned = { province = 522 data = -1 }
                               owned = { province = 1533 data = -1 }
                               owned = { province = 1594 data = -1 }
			}
			NOT = { exists = KZK }
}
	name = "EVENTNAME65003"
	desc = "EVENTHIST65003"
	style = 1

	date = { day = 1 month = january year = 1425 }
	offset = 150
	deathdate = { day = 1 month = january year = 1820 }

	action_a ={
		name = "ACTIONNAME65003A"					
		command = { type = independence which = KZK }
		command = { type = addcore which = 1592 }
		command = { type = addcore which = 1599 }
                command = { type = addcore which = 1598 }
                command = { type = addcore which = 1600 }
		command = { type = addcore which = 1532 }
                command = { type = addcore which = 522 }
command = { type = addcore which = 1594 }
                command = { type = addcore which = 1533 }
		command = { type = capital which = 1592 }
		command = { type = removecore which = 580 }
		command = { type = removecore which = 579 }
		command = { type = removecore which = 1535 }
		command = { type = removecore which = 519 }
		command = { type = removecore which = 584 }
		command = { type = removecore which = 517 }
                command = { type = removecore which = 520 }
command = { type = removecore which = 850 }
		command = { type = stability value = -4 }
		command = { type = trigger which = 65004 }
		}
	}

#Uzbegs on Offensive#
event = {
	id = 65006
	random = no
	country = UZB
	trigger = {	NOT = { war = { country = UZB country = TIM } }
			NOT = { alliance = { country = UZB country = TIM } }
			exists = TIM
}
	name = "EVENTNAME65006"
	desc = "EVENTHIST65006"
	style = 1

	date = { day = 1 month = january year = 1425 }
	offset = 500
	deathdate = { day = 1 month = january year = 1488 }

	action_a ={
		name = "ACTIONNAME65006A"					
		command = { type = CAV which = -1 value = 20000 }
		command = { type = war which = TIM }
		command = { type = domestic which = quality value = 1 }
		command = { type = domestic which = offensive value = 1 }
		command = { type = domestic which = centralization value = 1 }
		command = { type = stability value = 4 }
		}
	action_b ={
		name = "ACTIONNAME65006B"					
		command = { type = domestic which = aristocracy value = 1 }
		command = { type = domestic which = offensive value = -1 }
		command = { type = infra value = 400 }
		command = { type = vp value = -20 }
		}
	}

#Uzbegs on Offensive#
event = {

	id = 65007
	random = no
	country = UZB
	trigger = {
			       owned = { province = 1592 data = -1 }
			       owned = { province = 1532 data = -1 }
			       owned = { province = 1599 data = -1 }
                               owned = { province = 1598 data = -1 }
			       owned = { province = 1600 data = -1 }
                               
			       owned = { province = 522 data = -1 }
                                owned = { province = 1533 data = -1 }
                               owned = { province = 1594 data = -1 }
}
	name = "EVENTNAME65007"
	desc = "EVENTHIST65007"
	style = 1

	date = { day = 1 month = january year = 1460 }
	offset = 500
	deathdate = { day = 1 month = january year = 1820 }

	action_a ={
		name = "ACTIONNAME65007A"					
		command = { type = add_countryculture which = uzbehk }
		command = { type = remove_countryculture which = mongol }
		command = { type = provinceculture which = 1532 value = uzbehk }
		command = { type = provinceculture which = 1599 value = uzbehk }
		command = { type = provinceculture which = 1598 value = uzbehk }
		
		command = { type = provinceculture which = 1592 value = uzbehk }
                command = { type = provinceculture which = 1600 value = uzbehk }
		command = { type = provinceculture which = 522 value = uzbehk }
command = { type = provinceculture which = 1533 value = uzbehk }
		command = { type = provinceculture which = 1594 value = uzbehk }
		command = { type = addcore which = 1534 }
		command = { type = addcore which = 1592 }
		command = { type = addcore which = 1600 }
		command = { type = addcore which = 1599 }
                command = { type = addcore which = 1532 }
		command = { type = addcore which = 1600 }
		command = { type = addcore which = 522 }
command = { type = addcore which = 1594 }
		command = { type = addcore which = 1533 }
		command = { type = domestic which = centralization value = 3 }
		command = { type = domestic which = serfdom value = 2 }
		command = { type = domestic which = offensive value = 1 }
		command = { type = stability value = 2 }
		command = { type = population which = -1 value = 2000 }
		command = { type = population which = -1 value = 2000 }
		command = { type = provincetax which = -1 value = 1}
		command = { type = provincetax which = -1 value = 1}
		command = { type = provincetax which = -1 value = 1}
		}
	action_b ={
		name = "ACTIONNAME65007B"					
		command = { type = domestic which = aristocracy value = 1 }
		command = { type = domestic which = quality value = -1 }
		command = { type = vp value = -50 }
		}
	}

#Bukhara#
event = {
	id = 65008
	random = no
	trigger = { 
			owned = { province = 1532 data = -1 } }
	country = UZB
	name = "EVENTNAME65008"
	desc = "EVENTHIST65008"
	style = 2
	date = { day = 1 month = january year = 1419 }
	offset = 500
	deathdate = { day = 1 month = january year = 1821 }
	action_a ={
		name = "ACTIONNAME65008A"	
                command = { type = provinceculture which = 1532 value = uzbehk }				
		command = { type = capital which = 1532 }
		command = { type = addcore which = 1532 }
		command = { type = stability value = 2 }
		command = { type = population which = 1532 value = 1000 }
		command = { type = provincetax which = 1532 value = 2 }
		}
}

#Death Of Ubaid'Allah#
event = {
	id = 65009
	random = no
	trigger = { event = 65007
		}
	country = UZB
	name = "EVENTNAME65009"
	desc = "EVENTHIST65009"
	style = 2
	date = { day = 1 month = january year = 1539 }
	offset = 200
	deathdate = { day = 1 month = january year = 1556 }
	action_a ={
		name = "ACTIONNAME65009A"					
		command = { type = stability value = -1 }
		command = { type = domestic which = centralization value = -2 }
		command = { type = domestic which = quality value = -1 }
		command = { type = domestic which = offensive value = -2 }
		command = { type = ai which = "uzbek_1492.ai" }
		}
}

#The succession of 1550#
event = {
	id = 65010
	random = no
	country = UZB
	name = "EVENTNAME65010"
	desc = "EVENTHIST65010"
	style = 2
	date = { day = 1 month = january year = 1549 }
	offset = 30
	deathdate = { day = 1 month = january year = 1556 }
	action_a ={
		name = "ACTIONNAME65010A"					
		command = { type = stability value = -2 }
		command = { type = revoltrisk which = 72 value = 7 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = wakeleader which = 08612 }
		command = { type = wakeleader which = 08629 }
		command = { type = wakemonarch which = 05218 }
		command = { type = sleepmonarch which = 05217 }
		command = { type = domestic which = offensive value = -2 }
		}
	action_b ={
		name = "ACTIONNAME65010B"					
		command = { type = stability value = -4 }
		command = { type = domestic which = centralization value = -1 }
		command = { type = revoltrisk which = 84 value = 9 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = wakeleader which = 08613 }
		command = { type = wakemonarch which = 05219 }
		command = { type = sleepmonarch which = 05217 }
		command = { type = wakeleader which = 16003 }
		}
}

#The succession of 1561#
event = {
	id = 65011
	random = no
	country = UZB
	name = "EVENTNAME65011"
	desc = "EVENTHIST65011"
	style = 2
	date = { day = 1 month = january year = 1561 }
	offset = 30
	deathdate = { day = 1 month = january year = 1562 }
	action_a ={
		name = "ACTIONNAME65011A"					
		command = { type = wakemonarch which = 05220 }
		command = { type = sleepmonarch which = 05219 }
		command = { type = domestic which = centralization value = 1 }
		}
	action_b ={
		name = "ACTIONNAME65011B"	
		command = { type = domestic which = offensive value = -1 }
		command = { type = stability value = -1 }				
		}
}

#The Muscowy Trade Company#
event = {
	id = 65012
	trigger = { exists = RUS }
	random = no
	country = UZB
	name = "EVENTNAME65012"
	desc = "EVENTHIST65012"
	style = 2
	date = { day = 1 month = april year = 1558 }
	offset = 23
	deathdate = { day = 1 month = may year = 1558 }

	action_a ={
		name = "ACTIONNAME65012A"
		command = { type = treasury value = 100 }
		command = { type = merchants value = 3 }
		command = { type = trade value = 500 }
		command = { type = domestic which = mercantilism value = -1 }
		command = { type = relation which = RUS value = 50 }
	}
}

#Kazakh Honeymoon#
event = {
	id = 65013
	random = no
	trigger = { exists = KZK
			owned = { province = 1534 data = -1 }
		}
	country = UZB
	name = "EVENTNAME65013"
	desc = "EVENTHIST65013"
	style = 2
	date = { day = 1 month = january year = 1580 }
	offset = 30
	deathdate = { day = 1 month = january year = 1581 }
	action_a ={
		name = "ACTIONNAME65013A"					
		command = { type = relation which = KZK value = 150 }
		command = { type = secedeprovince which = KZK value = 1534 }
		command = { type = stability value = 1 }
		command = { type = alliance which = KZK }
		}
	action_b ={
		name = "ACTIONNAME65013B"	
		command = { type = relation which = KZK value = -250 }
		command = { type = stability value = -2 }	
		command = { type = revoltrisk which = 24 value = 3 }		
		command = { type = sleepevent which = 65014 }	
		}
}

#Prince Tawakkul and Abd'Allah#
event = {
	id = 65014
	random = no
	trigger = { event = 65013
		}
	country = UZB
	name = "EVENTNAME65014"
	desc = "EVENTHIST65014"
	style = 2
	date = { day = 1 month = january year = 1584 }
	offset = 30
	deathdate = { day = 1 month = january year = 1585 }
	action_a ={
		name = "ACTIONNAME65014A"					
		command = { type = relation which = KZK value = -350 }
		command = { type = stability value = -1 }
		command = { type = domestic which = aristocracy value = -1 }
		}
	action_b ={
		name = "ACTIONNAME65014B"	
		command = { type = relation which = KZK value = 50 }
		command = { type = domestic which = aristocracy value = 1 }
		command = { type = stability value = -1 }
		}
}

#Abd'Allah's Military policies#
event = {
	id = 65017
	random = no
	country = UZB
	name = "EVENTNAME65017"
	desc = "EVENTHIST65017"
	style = 2
	date = { day = 1 month = january year = 1580 }
	offset = 500
	deathdate = { day = 1 month = january year = 1590 }
	action_a ={
		name = "ACTIONNAME65017A"					
		command = { type = land value = 750 }
		command = { type = INF which = -1 value = 5000 }
		command = { type = CAV which = -3 value = 5000 }
		command = { type = domestic which = quality value = 1 }
		command = { type = domestic which = offensive value = 1 }
		}
	}

#Abd'Allah's Economic policies#
event = {
	id = 65016
	random = no
	country = UZB
	name = "EVENTNAME65016"
	desc = "EVENTHIST65016"
	style = 2
	date = { day = 1 month = january year = 1582 }
	offset = 1000
	deathdate = { day = 1 month = january year = 1590 }
	action_a ={
		name = "ACTIONNAME65016A"					
		command = { type = trade value = 750 }
		command = { type = stability value = 1 }
		command = { type = infra value = 1000 }
		command = { type = merchants value = 2 }
		command = { type = provincetax which = -1 value = 1 }
		command = { type = provincetax which = -1 value = 1 }
		command = { type = provincetax which = -1 value = 1 }
		command = { type = domestic which = centralization value = 3 }
		command = { type = domestic which = innovative value = 1 }
		}
	}

#Abd'Allah's International policies#
event = {
	id = 65018
	random = no
	country = UZB
	name = "EVENTNAME65018"
	desc = "EVENTHIST65018"
	style = 2
	date = { day = 1 month = january year = 1582 }
	offset = 90
	deathdate = { day = 1 month = january year = 1586 }
	action_a ={
		name = "ACTIONNAME65018"					
		command = { type = relation which = RUS value = 50 }
		command = { type = relation which = TUR value = 50 }
		command = { type = relation which = NOG value = 50 }
		command = { type = relation which = CHG value = 20 }
		command = { type = relation which = MOG value = 50 }
		}
	}

#Abd'Allah's International policies#
event = {
	id = 65019
	random = no
	country = UZB
	trigger = { exists = SIB
		    exists = RUS }
	name = "EVENTNAME65019"
	desc = "EVENTHIST65019"
	style = 2
	date = { day = 1 month = january year = 1595 }
	offset = 90
	deathdate = { day = 1 month = january year = 1598 }
	action_a ={
		name = "ACTIONNAME65019A"					
		command = { type = relation which = RUS value = -100 }
		command = { type = relation which = TUR value = 20 }
		command = { type = relation which = NOG value = 20 }
		command = { type = relation which = KZK value = 20 }
		command = { type = relation which = SIB value = 100 }
		}
	action_b ={
		name = "ACTIONNAME65019B"					
		command = { type = relation which = RUS value = 50 }
		command = { type = relation which = TUR value = -20 }
		command = { type = relation which = NOG value = -20 }
		command = { type = relation which = KZK value = -20 }
		command = { type = relation which = SIB value = -100 }
		}
	}

#Bukhara-Khivan tensions#
event = {
	id = 65022
	random = no
	country = UZB
	trigger = { exists = U00 }
	name = "EVENTNAME65022"
	desc = "EVENTHIST65022"
	style = 2
	date = { day = 1 month = january year = 1576 }
	offset = 90
	deathdate = { day = 1 month = january year = 1586 }
	action_a ={
		name = "ACTIONNAME65022A"					
		command = { type = relation which = U00 value = -150 }
		command = { type = casusbelli which = U00 value = 36 }
		}
	action_b ={
		name = "ACTIONNAME65022B"					
		command = { type = relation which = U00 value = 50 }
		command = { type = stability value = -1 }
		}
	}

#Bukhara-Khivan tensions#
event = {
	id = 65023
	random = no
	country = UZB
	trigger = { exists = U00 }
	name = "EVENTNAME65023"
	desc = "EVENTHIST65023"
	style = 2
	date = { day = 1 month = january year = 1511 }
	offset = 200
	deathdate = { day = 1 month = january year = 1820 }
	action_a ={
		name = "ACTIONNAME65023A"					
		command = { type = relation which = U00 value = 50 }
		command = { type = removecore which = 1533 }
		command = { type = removecore which = 1594 }
command = { type = removecore which = 524 }
		command = { type = removecore which = 523 }
		}
	action_b ={
		name = "ACTIONNAME65023B"					
		command = { type = relation which = U00 value = -100 }
		command = { type = stability value = -1 }
		command = { type = trigger which = 65024 }
		}
	}

#Bukhara-Khivan tensions#
event = {
	id = 65024
	random = no
	country = U00
	name = "EVENTNAME65024"
	desc = "EVENTHIST65023"
	style = 2
	action_a ={
		name = "ACTIONNAME65024A"					
		command = { type = inf which = -1 value = 5000 }
		command = { type = cav which = -3 value = 8000 }
		command = { type = domestic which = centralization value = 1 }
		}
	}

#Death of Abd'al Mum'in#
event = {
	id = 65025
	random = no
	country = UZB
	name = "EVENTNAME65025"
	desc = "EVENTHIST65025"
	style = 2
	date = { day = 22 month = july year = 1599 }
	action_a ={
		name = "ACTIONNAME65025A"					
		command = { type = domestic which = centralization value = -3 }
		command = { type = domestic which = aristocracy value = 1 }
		command = { type = domestic which = quality value = -1 }
		command = { type = domestic which = offensive value = -2 }
		command = { type = revoltrisk which = 60 value = 3 }
		command = { type = stability value = -3 }
		}
	action_b ={
		name = "ACTIONNAME65025B"					
		command = { type = domestic which = offensive value = -2 }
		command = { type = domestic which = centralization value = -1 }
		command = { type = stability value = -5 }
		command = { type = sleepmonarch which = 05239 }
		command = { type = sleepmonarch which = 03781 }
		command = { type = wakemonarch which = 05224 }
		command = { type = domestic which = aristocracy value = -1 }
		command = { type = revoltrisk which = 60 value = 5 }
		command = { type = domestic which = quality value = -1 }
		command = { type = sleepevent which = 65026 }
		}
	}

#Ascension of Baqi Muhammad#
event = {
	id = 65026
	random = no
	country = UZB
	name = "EVENTNAME65026"
	desc = "EVENTHIST65026"
	style = 2
	date = { day = 16 month = november year = 1603 }
	action_a ={
		name = "ACTIONNAME65026A"					
		command = { type = wakemonarch which = 05224 }
		command = { type = stability value = 1 }
		}
	}

#Death of Sa'id Subhan Quli Bahadur#
event = {
	id = 65027
	random = no
	country = UZB
	name = "EVENTNAME65027"
	desc = "EVENTHIST65027"
	style = 2
	date = { day = 4 month = september year = 1702 }
	action_a ={
		name = "ACTIONNAME65027A"					
		command = { type = domestic which = centralization value = -2 }
		command = { type = domestic which = aristocracy value = 2 }
		command = { type = revoltrisk which = 36 value = 3 }
		command = { type = domestic which = quality value = -1 }
		command = { type = domestic which = offensive value = -1 }
		command = { type = domestic which = serfdom value = 1 }
		command = { type = infra value = -400 }
		}
	}

event = {
      id = 62003
      random = no
	country = UZB
      name = "EVENTNAME62003"
      desc = "EVENTHIST62003"
      style = 2

      action_a = {
            name = "ACTIONNAME62003A"
		command = { type = inherit which = U01 }
		command = { type = stability value = 1 }
		command = { type = cash value = -100 }
		command = { type = vp value = 25 }
		command = { type = relation which = PER value = -80 }
		command = { type = relation which = MOG value = -80 }
		}
      action_b = {
            name = "ACTIONNAME62003B"
		command = { type = vassal which = U01 }
		command = { type = cash value = 50 }
		command = { type = vp value = 15 }
		}
      action_c = {
            name = "ACTIONNAME62003C"
		command = { type = stability value = -1 }
		command = { type = vp value = -15 }
		command = { type = relation which = PER value = 50 }
		command = { type = relation which = MOG value = 50 }
		}
	}

event = {
      id = 62004
      random = no
	country = UZB
      name = "EVENTNAME62004"
      desc = "EVENTHIST62004"
      style = 2

      action_a = {
            name = "ACTIONNAME62004A"
		command = { type = casusbelli which = PER value = 240 }
		command = { type = stability value = 1 }
		command = { type = cash value = -60 }
		command = { type = cav which = -1 value = 8000 }
		}
      action_b = {
            name = "ACTIONNAME62004B"
		command = { type = stability value = -1 }
		command = { type = vp value = -15 }
		}
	}

event = {
      id = 62007
      random = no
	country = UZB
      name = "EVENTNAME62007"
      desc = "EVENTHIST62007"
      style = 2

      action_a = {
            name = "ACTIONNAME62004A"
		command = { type = casusbelli which = MOG value = 240 }
		command = { type = stability value = 1 }
		command = { type = cash value = -60 }
		command = { type = cav which = -1 value = 8000 }
		}
      action_b = {
            name = "ACTIONNAME62004B"
		command = { type = stability value = -1 }
		command = { type = vp value = -15 }
		}
	}

#Death of Abu'l Khair#
event = {
	id = 65030
	random = no
	trigger = { OR = { event = 65003
			exists = KZK }
}
	country = UZB
	name = "EVENTNAME65030"
	desc = "EVENTHIST65030"
	style = 2
	date = { day = 1 month = january year = 1468 }
	action_a ={
		name = "ACTIONNAME10025A"					
		command = { type = stability value = -6 }
		command = { type = revoltrisk which = 36 value = 6 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = desertion which = -1 value = 5000 }
		}
	}
#Death of Shaibani#
event = {
	id = 65031
	random = no
	country = UZB
	name = "EVENTNAME65031"
	desc = "EVENTHIST65031"
	style = 2
	date = { day = 1 month = december year = 1510 }
	action_a ={
		name = "ACTIONNAME10025A"					
		command = { type = stability value = -3 }
		command = { type = domestic which = centralization value = -1 }
		command = { type = revoltrisk which = 36 value = 6 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = desertion which = -1 value = 5000 }
		}
	}


