# saveupdater
!! This file is for updating save game when one variable have been replaced by another.

!! If you have replaced a variable for another, then you should first go to saveg.gsrc and update the version number as instructed there.
!! Then at the bottom of this file just after the last end add the following line:
!! if ((100*version_major +version_minor)*100+version_revision)*100+version_patch  < "new version number":
!! where "new version number" should be as instructed in the start of saveg.qsrc
!! Then add you replacement of variables after this line. You can see how this is done by looking through this file.

!! When you do this you should always commit this file and saveg.qsrc at the same time.


temp_current_save_version = ( (100*version_major + version_minor) * 100 + version_revision ) * 100 + version_patch



!!======================================================================================================!!
!!                                                                                                      !!
!!                                    !!Version 0.8.0!!                                                 !!
!!                                                                                                      !!
!!======================================================================================================!!

if temp_current_save_version  < 00080000:
	!!------------------------------grandparent variable clean up---for 0.8.0 release---------------------------

	!!---Grandpa
	If grandpa_bilberry > 0:        grandpaQW['chore_berry_quantity']           = grandpa_bilberry          & killvar 'grandpa_bilberry'
	If grandpa_boletus > 0:         grandpaQW['chore_mushroom_quantity']        = grandpa_boletus           & killvar 'grandpa_boletus'
	If grandpahelpday > 0:          grandpaQW['last_day_helped']                = grandpahelpday            & killvar 'grandpahelpday'
	If grandpahelping > 0:          grandpaQW['chore_type']                     = grandpahelping            & killvar 'grandpahelping'
	If grandpatalk > 0:             grandpaQW['last_hour_talked']               = grandpatalk               & killvar 'grandpatalk'
	If grandpatalkday > 0:          grandpaQW['last_day_talked']                = grandpatalkday            & killvar 'grandpatalkday'
	If grandpatalkforest > 0:       grandpaQW['talked_about_forest']            = grandpatalkforest         & killvar 'grandpatalkforest'
	If comb_horse > 0:              grandpaQW['chore_brush_horse']              = comb_horse                & killvar 'comb_horse'
	If cow_field > 0:               grandpaQW['chore_lead_cow_to_field']        = cow_field                 & killvar 'cow_field'
	If feed_boar > 0:               grandpaQW['chore_feed_boar']                = feed_boar                 & killvar 'feed_boar'
	If feed_cow > 0:                grandpaQW['chore_feed_cow']                 = feed_cow                  & killvar 'feed_cow'
	If feed_horse > 0:              grandpaQW['chore_feed_horse']               = feed_horse                & killvar 'feed_horse'
	If graze_cow > 0:               grandpaQW['chore_herd_cattle']              = graze_cow                 & killvar 'graze_cow'
	If graze_cow_exp > 0:           grandpaQW['chore_herd_cattle_experience']   = graze_cow_exp             & killvar 'graze_cow_exp'
	If haying_time > 0:             grandpaQW['chore_bale_hay']                 = haying_time               & killvar 'haying_time'
	If horse_field > 0:             grandpaQW['chore_lead_horse_to_field']      = horse_field               & killvar 'horse_field'
	If horse_river > 0:             grandpaQW['chore_bathe_horse']              = horse_river               & killvar 'horse_river'
	If go_in_bilberry > 0:          grandpaQW['chore_gather_berries']           = go_in_bilberry            & killvar 'go_in_bilberry'
	If go_in_boletus > 0:           grandpaQW['chore_gather_mushrooms']         = go_in_boletus             & killvar 'go_in_boletus'
	If go_in_boletus_bilberry > 0:  grandpaQW['chore_gather_both']              = go_in_boletus_bilberry    & killvar 'go_in_boletus_bilberry'

	!!---Grandma
	If grandma_trouble > 0:         grandmaQW['nudity_trouble']                 = grandma_trouble           & killvar 'grandma_trouble'
	If grandmastory > 0:            grandmaQW['last_day_asked_for_story']       = grandmastory              & killvar 'grandmastory'
	If grandmatalk > 0:             grandmaQW['last_hour_talked']               = grandmatalk               & killvar 'grandmatalk'
	If grandmatalkday > 0:          grandmaQW['last_day_talked']                = grandmatalkday            & killvar 'grandmatalkday'
	If grandmatalkgad > 0:          grandmaQW['talked_about_gadukino']          = grandmatalkgad            & killvar 'grandmatalkgad'
	If monthbabkapay > 0:           grandmaQW['last_month_paid']                = monthbabkapay             & killvar 'monthbabkapay'
	If grandmahelpday > 0:          grandmaQW['last_day_helped']                = grandmahelpday            & killvar 'grandmahelpday'
	If grandmahelp > 0:             grandmaQW['help_amount']                    = grandmahelp               & killvar 'grandmahelp'
	If grandmahelping > 0:          grandmaQW['chore_type']                     = grandmahelping            & killvar 'grandmahelping'
	If collect_strawberries > 0:    grandmaQW['chore_collect_strawberries']     = collect_strawberries      & killvar 'collect_strawberries'
	If feed_chickens > 0:           grandmaQW['chore_feed_chickens']            = feed_chickens             & killvar 'feed_chickens'
	If fruit_collect > 0:           grandmaQW['chore_collect_fruit']            = fruit_collect             & killvar 'fruit_collect'
	If harvest_garden > 0:          grandmaQW['chore_harvest_garden']           = harvest_garden            & killvar 'harvest_garden'
	If milk_cow > 0:                grandmaQW['chore_milk_cow']                 = milk_cow                  & killvar 'milk_cow'
	If water_garden > 0:            grandmaQW['chore_water_garden']             = water_garden              & killvar 'water_garden'
	If work_garden > 0:             grandmaQW['chore_work_in_garden']           = work_garden               & killvar 'work_garden'
	!!---------------------------end of grandparent variable clean up---for 0.8.0 release-----------------------

	!! ----- Natasha story variables migrated to array ----- 0.8.0
	! Natasha''s mom NPC data for existing saves
	if $npc_firstname['A191'] ! 'Isabella':
		gs 'npc_standard_preferences', 'A191'
		$npc_dna['A<<npctemp>>'] = '1614037462 1959746313 1085890273 0326112989 0869737602 6676723523 3590292041'
		$npc_firstname['A<<npctemp>>'] = 'Isabella'
		$npc_nickname['A<<npctemp>>'] = 'Bella'
		$npc_lastname['A<<npctemp>>'] = 'Belova'
		$npc_usedname['A<<npctemp>>'] = 'Isabella'
		$npc_notes['A<<npctemp>>'] = 'Your classmate Natasha''s mother, Isabella Belova.'
		npc_dob['A<<npctemp>>'] = 19820922
		npc_gender['A<<npctemp>>'] = 1
		gs 'npcstaticdefaults', 'defaults'
		npc_bust['A<<npctemp>>'] = 23
	end
	killvar '$NatashaMotherName' & killvar '$NatashaMotherNickname'

	if NatashaQW > 0: 				NatbelQW['QWstage']                = NatashaQW               & killvar 'NatashaQW'
	if natbelXP > 0: 				NatbelQW['natbelXP']               = natbelXP                & killvar 'natbelXP'
	if NatBelBestFrend > 0: 		NatbelQW['BestFriend']             = NatBelBestFrend         & killvar 'NatBelBestFrend'
	if BeInNatBelHome > 0: 			NatbelQW['VisitedHome']            = BeInNatBelHome          & killvar 'BeInNatBelHome'
	if natashaFirstvisit > 0: 		NatbelQW['FirstVisit']             = natashaFirstvisit       & killvar 'natashaFirstvisit'
	if NatNoTV > 0: 				NatbelQW['NoTV']                   = NatNoTV                 & killvar 'NatNoTV'
	if ShowRand > 0: 				NatbelQW['TVshow']                 = ShowRand                & killvar 'ShowRand'
	if $ShowMsg ! '': 			   $NatbelQW['TVmsg']                  = $ShowMsg                & killvar '$ShowMsg'
	if NatashaWatchedYourPorn > 0: 	NatbelQW['WatchedYourPorn']        = NatashaWatchedYourPorn  & killvar 'NatashaWatchedYourPorn'
	if NatDolg > 0: 				NatbelQW['Debt']                   = NatDolg                 & killvar 'NatDolg'
	if NatDolgDay > 0: 				NatbelQW['DebtDay']                = NatDolgDay              & killvar 'NatDolgDay'
	if nattimeleft > 0: 			NatbelQW['DebtTimeLeft']           = nattimeleft             & killvar 'nattimeleft'
	if NatashaMoneyGivenTimes > 0: 	NatbelQW['MoneyGivenTimes']        = NatashaMoneyGivenTimes  & killvar 'NatashaMoneyGivenTimes'
	if NatashaHW > 0: 				NatbelQW['homework']               = NatashaHW               & killvar 'NatashaHW'
	if natdoingHW > 0: 				NatbelQW['doingHW']                = natdoingHW              & killvar 'natdoingHW'
	if NatashaNakedHW > 0: 			NatbelQW['nakedHW']                = NatashaNakedHW          & killvar 'NatashaNakedHW'
	if natunderwear > 0: 			NatbelQW['underwear']              = natunderwear            & killvar 'natunderwear'
	if natund > 0: 					NatbelQW['underwearShop']          = natund                  & killvar 'natund'
	if natseethrough > 0: 			NatbelQW['seethrough']             = natseethrough           & killvar 'natseethrough'
	if natseethroughwearing > 0: 	NatbelQW['seethroughwearing']      = natseethroughwearing    & killvar 'natseethroughwearing'
	if natseethroughworn > 0: 		NatbelQW['seethroughworn']         = natseethroughworn       & killvar 'natseethroughworn'
	if natseehtroughkitchen > 0: 	NatbelQW['seethroughkitchen']      = natseehtroughkitchen    & killvar 'natseehtroughkitchen'
	if natmomrobe > 0: 				NatbelQW['momrobe']                = natmomrobe              & killvar 'natmomrobe'
	if nattraining > 0:				NatbelQW['training']               = nattraining             & killvar 'nattraining'
	if natlesb > 0:					NatbelQW['lesbian']                = natlesb                 & killvar 'natlesb'
	if natpee > 0:					NatbelQW['pee']                    = natpee                  & killvar 'natpee'
	if HaveCucumber > 0:			NatbelQW['cucumber']               = HaveCucumber            & killvar 'HaveCucumber'
	if natkolkatease > 0:			NatbelQW['KolkaTease']             = natkolkatease           & killvar 'natkolkatease'
	if kolkawantsnat > 0:			NatbelQW['KolkaWantsNat']          = kolkawantsnat           & killvar 'kolkawantsnat'
	if natfuckday > 0:				NatbelQW['KolkaFuckDay']           = natfuckday              & killvar 'natfuckday'
	if NatKolkaSex > 0: 			NatbelQW['KolkaSex']               = NatKolkaSex             & killvar 'NatKolkaSex'
	if natbj > 0: 					NatbelQW['bj']                     = natbj                   & killvar 'natbj'
	if NatKolkaFootjob > 0: 		NatbelQW['KolkaFootjob']           = NatKolkaFootjob         & killvar 'NatKolkaFootjob'
	if natcp > 0: 					NatbelQW['KolkaCP']                = natcp                   & killvar 'natcp'

		! Adding all previous creampies to the new vaginal sex tracker so it can start above 0 if possible
	if NatbelQW['KolkaCP'] > 0 and NatbelQW['vaginal'] = 0:
		NatbelQW['vaginal'] = NatbelQW['KolkaCP']
	end

	if natanal > 0: 				NatbelQW['anal']                   = natanal                 & killvar 'natanal'
	if natpregday > 0: 				NatbelQW['pregday']                = natpregday              & killvar 'natpregday'
	if nataskedbaby > 0: 			NatbelQW['askedbaby']              = nataskedbaby            & killvar 'nataskedbaby'
	if natbabycount > 0: 			NatbelQW['babycount']              = natbabycount            & killvar 'natbabycount'

	if MetNatMother > 0: 			NatbelQW['MetMother']              = MetNatMother            & killvar 'MetNatMother'
		! These can be set to 0, so wiping them in any case to get rid of them
									NatbelQW['MotherHome']             = NatashaMotherHome       & killvar 'NatashaMotherHome'
									NatbelQW['MotherDoor']             = DoorOpenBy              & killvar 'DoorOpenBy'
									NatbelQW['MotherState']            = NatashaMotherState      & killvar 'NatashaMotherState'
									NatbelQW['MotherStateMsg']         = NatashaMotherStateMsg   & killvar 'NatashaMotherStateMsg'
									NatbelQW['MotherStateKeep']        = NatashaMotherStateKeep  & killvar 'NatashaMotherStateKeep'

	if SeenNatMomHitachi > 0:       NatbelQW['SeenNatMomHitachi']      = SeenNatMomHitachi       & killvar 'SeenNatMomHitachi'
	if CaughtByNatMomHitachi > 0:   NatbelQW['CaughtByNatMomHitachi']  = CaughtByNatMomHitachi   & killvar 'CaughtByNatMomHitachi'
	if $NatMomVibName ! '':        $NatbelQW['NatMomVibName']         = $NatMomVibName          & killvar '$NatMomVibName'

		! typos found in the natasha files & other cleaning up
	if nhib_exp > 0: inhib_exp += nhib_exp & killvar 'nhib_exp'
	killvar 'natsleeprand'
	killvar 'imgrand'
	!! ----- Natasha story variables migrated to array ----- 0.8.0


	! ----- Parrot story variables migrated to array
	if saveparQW > 0:        ParrotQW['Level']                    = saveparQW           & killvar 'saveparQW'
	if popugai > 0:          ParrotQW['Owned1']                   = popugai             & killvar 'popugai'
	if popugai2 > 0:         ParrotQW['Owned2']                   = popugai2            & killvar 'popugai2'
	if saveparjourQW > 0:    ParrotQW['Day']                      = saveparjourQW       & killvar 'saveparjourQW'
	if parbuydate > 0:       ParrotQW['BuyDate']                  = parbuydate          & killvar 'parbuydate'
	if sisrelparday > 0:     ParrotQW['SisterReleaseParrotDay']   = sisrelparday        & killvar 'sisrelparday'
	if saveparQWfailed > 0:  ParrotQW['Failed']                   = saveparQWfailed     & killvar 'saveparQWfailed'
	If sispopconf > 0:       ParrotQW['SisKeepParrot']            = sispopconf          & killvar 'sispopconf'
	if $namepopu ! '':      $ParrotQW['Name1']                    = $namepopu           & killvar '$namepopu'
	if $namepopu2 ! '':     $ParrotQW['Name2']                    = $namepopu2          & killvar '$namepopu2'
	! ----- Parrot story variables migrated to array


	! ----- Diner Bystroeshka (burger) story variables migrated to array
	if BankPapper > 0:          BurgerQW['BankTask']                = BankPapper            & killvar 'BankPapper'
	if BistroBoss > 0:          BurgerQW['BossSlut']                = BistroBoss            & killvar 'BistroBoss'
	if BistroBossDay > 0:       BurgerQW['BossSlutLastServed']      = BistroBossDay         & killvar 'BistroBossDay'
	if bistroQW > 0:            BurgerQW['Level']                   = bistroQW              & killvar 'bistroQW'
	if $burgerIvanText ! '':   $BurgerQW['IvanSecurityCamDesc']     = $burgerIvanText       & killvar '$burgerIvanText'
	if BuSWworkEnd > 0:         BurgerQW['SaunaWhoreKnown']         = BuSWworkEnd           & killvar 'BuSWworkEnd'
	if dayBankPapper > 0:       BurgerQW['BankTaskDay']             = dayBankPapper         & killvar 'dayBankPapper'
	if DayTerminalPapper > 0:   BurgerQW['TerminalTaskDay']         = DayTerminalPapper     & killvar 'DayTerminalPapper'
	if gossipBU > 0:            BurgerQW['SlutReputation']          = gossipBU              & killvar 'gossipBU'
	if IvanEvidence > 0:        BurgerQW['IlyQWEvidence']           = IvanEvidence          & killvar 'IvanEvidence'
	if ivanFilmBJ > 0:          BurgerQW['IlyQWBJFilmed']           = ivanFilmBJ            & killvar 'ivanFilmBJ'
	if IvanKvartira > 0:        BurgerQW['IlyQWTatianaHelp']        = IvanKvartira          & killvar 'IvanKvartira'
	if IvanPodstavaDay > 0:     BurgerQW['IlyQWDay']                = IvanPodstavaDay       & killvar 'IvanPodstavaDay'
	if IvanPodstavaQW > 0:      BurgerQW['IlyQW']                   = IvanPodstavaQW        & killvar 'IvanPodstavaQW'
	if kompromatBlackMail > 0:  BurgerQW['IlyQWBlackmail']          = kompromatBlackMail    & killvar 'kompromatBlackMail'
	if $kompromatFoto ! '':    $BurgerQW['IlyQWBlackmailPhoto']     = $kompromatFoto        & killvar '$kompromatFoto'
	if NoBistroWork > 0:        BurgerQW['WorkBlocked']             = NoBistroWork          & killvar 'NoBistroWork'
	if PersSecWork > 0:         BurgerQW['Secretary']               = PersSecWork           & killvar 'PersSecWork'
	if PersSecWorkTimes > 0:    BurgerQW['SecretaryTimesWorked']    = PersSecWorkTimes      & killvar 'PersSecWorkTimes'
	if PodpiskaNeviezd > 0:     BurgerQW['IlyQWPoliceDayCount']     = PodpiskaNeviezd       & killvar 'PodpiskaNeviezd'
	if posuda > 0:              BurgerQW['WashDishesCount']         = posuda                & killvar 'posuda'
	if posudaA > 0:             BurgerQW['WashFloorCount']          = posudaA               & killvar 'posudaA'
	if posudaday > 0:           BurgerQW['WashedDishesLastDay']     = posudaday             & killvar 'posudaday'
	if posudaAday > 0:          BurgerQW['WashFloorLastDay']        = posudaAday            & killvar 'posudaAday'
	if PSBBtimes > 0:           BurgerQW['WorkShift']               = PSBBtimes             & killvar 'PSBBtimes'
	if sergeyPQW > 0:           BurgerQW['sergeyQW']                = sergeyPQW             & killvar 'sergeyPQW'
	if soplakTimes > 0:         BurgerQW['sergeyQWServiced1']       = soplakTimes           & killvar 'soplakTimes'
	if soplakTimes1 > 0:        BurgerQW['sergeyQWServiced2']       = soplakTimes1          & killvar 'soplakTimes1'
	if TerminalPapper > 0:      BurgerQW['TerminalTask']            = TerminalPapper        & killvar 'TerminalPapper'
	! ----- Diner Bystroeshka (burger) story variables migrated to array

	! ----- Albina story variables migrated to array
	if AlbFather > 0:          AlbinaQW['AlbFatherQW']          = AlbFather             & killvar 'AlbFather'
	if AlbFrend > 0:           AlbinaQW['Friends']              = AlbFrend              & killvar 'AlbFrend'
	if ZvezdEnd > 0:           AlbinaQW['StarletsShutDown']     = ZvezdEnd              & killvar 'ZvezdEnd'
	if DanceWhore > 0:         AlbinaQW['StarletsWhore']        = DanceWhore            & killvar 'DanceWhore'
	if beinalbinahome > 0:     AlbinaQW['KnowsHouse']           = beinalbinahome        & killvar 'beinalbinahome'
	if albsportday > 0:        AlbinaQW['SportDay']             = albsportday           & killvar 'albsportday'
	if albsporthome > 0:       AlbinaQW['SportHome']            = albsporthome          & killvar 'albsporthome'
	if gamebet > 0:            AlbinaQW['gamebet']              = gamebet               & killvar 'gamebet'
	if stardance > 0:          AlbinaQW['ShowTriggerCount']     = stardance             & killvar 'stardance'
	if albrideday > 0:         AlbinaQW['albrideday']           = albrideday            & killvar 'albrideday'
	if albinaQWdance > 0:      AlbinaQW['StarletsJoined']       = albinaQWdance         & killvar 'albinaQWdance'
	if AlbZverHelp > 0:        AlbinaQW['ChristinaHelp']        = AlbZverHelp           & killvar 'AlbZverHelp'
	if alb_father_meeting > 0: AlbinaQW['ParkRally']            = alb_father_meeting    & killvar 'alb_father_meeting'
	if alb_father_day > 0:     AlbinaQW['ParkRallyDay']         = alb_father_day        & killvar 'alb_father_day'
	if AlbFaterBlackTime > 0:  AlbinaQW['ElectionCampaignTime'] = AlbFaterBlackTime     & killvar 'AlbFaterBlackTime'
	if startletsday > 0:       AlbinaQW['startletsday']         = startletsday          & killvar 'startletsday'
	if AlbVsNiko > 0:		   AlbinaQW['niko_help']            = AlbVsNiko             & killvar 'AlbVsNiko'
	if AlbinaBlockHumiliation > 0: AlbinaQW['Protect']			= AlbinaBlockHumiliation & killvar 'AlbinaBlockHumiliation'
	! ----- Albina story variables migrated to array


	!! Updating npc_bust[] array to the new values ----- 0.8.0
	if npc_bust['A12']  = 9: npc_bust['A12']  = 23
	if npc_bust['A13']  = 9: npc_bust['A13']  =  8
	if npc_bust['A14']  = 9: npc_bust['A14']  = 20
	if npc_bust['A15']  = 9: npc_bust['A15']  = 18
	if npc_bust['A16']  = 9: npc_bust['A16']  = 26
	if npc_bust['A17']  = 9: npc_bust['A17']  = 34
	if npc_bust['A18']  = 9: npc_bust['A18']  = 21
	if npc_bust['A19']  = 9: npc_bust['A19']  = 14
	if npc_bust['A20']  = 9: npc_bust['A20']  = 22
	if npc_bust['A21']  = 9: npc_bust['A21']  = 18
	if npc_bust['A22']  = 9: npc_bust['A22']  = 27
	if npc_bust['A23']  = 9: npc_bust['A23']  = 14
	if npc_bust['A24']  = 9: npc_bust['A24']  = 20
	if npc_bust['A25']  = 9: npc_bust['A25']  = 21
	if npc_bust['A29']  = 9: npc_bust['A29']  = 25
	if npc_bust['A30']  = 9: npc_bust['A30']  = 18
	if npc_bust['A33']  = 9: npc_bust['A33']  = 19
	if npc_bust['A134'] = 9: npc_bust['A134'] = 20
	if npc_bust['A135'] = 9: npc_bust['A135'] = 13
	if npc_bust['A136'] = 9: npc_bust['A136'] = 30
	if npc_bust['A137'] = 9: npc_bust['A137'] = 34
	if npc_bust['A138'] = 9: npc_bust['A138'] = 18
	if npc_bust['A139'] = 9: npc_bust['A139'] = 22
	if npc_bust['A140'] = 9: npc_bust['A140'] = 13
	if npc_bust['A141'] = 9: npc_bust['A141'] = 20
	if npc_bust['A142'] = 9: npc_bust['A142'] = 13
	if npc_bust['A143'] = 9: npc_bust['A143'] =  7
	if npc_bust['A144'] = 9: npc_bust['A144'] = 24
	if npc_bust['A145'] = 9: npc_bust['A145'] = 31
	!! Updating npc_bust[] array to the new values ----- 0.8.0


	!!-----------Adding pube colours for 0.8.0-----------

	if pcs_pubecol[1] = 0: 
		pcs_pubecol = pcs_haircol 
		pcs_pubecol[1] = 1 
		pcs_pubecol[2] = pcs_haircol
	end

	!!-----------Adding pube colours for 0.8.0-----------


	!! ----- Mom, Luda & Olu stuff ----- 0.8.0
	killvar 'olufirst'
	killvar 'tetyafirst'
	killvar 'oluuosegunday_count'
	killvar 'oluuosegunday_day'
	!! ----- Mom, Luda & Olu stuff ----- 0.8.0


	!!trait update
	if pcs_traits['update_1'] = 0:
		pcs_traits['update_1'] = 1

		pcs_traits['alko_day']    = alko_trait_day
		pcs_traits['alko_points'] = alko_trait_counter
		pcs_traits['alko_status'] = alko_trait

		killvar 'alko_trait_day'
		killvar 'alko_trait_counter'
		killvar 'alko_trait'
	end

	if trt_cumeater = 1: pcs_traits['cumeater'] = 1 & trt_cumeater = 7


	!! ----- Other bug fixes and cleanup ----- 0.8.0
	if pcs_gaming_exp > 0:      gs 'exp_gain', 'gaming', pcs_gaming_exp & killvar 'pcs_gaming_exp'
	if nerd_night_game ! 0:     killvar 'nerd_night_game'
	if nerd_night_game_day ! 0: nerd_game['game_day'] = nerd_night_game_day & killvar 'nerd_night_game_day'

	!!Masturbation check wasn''t being cleared
	mastrOnce = 0
	!! ----- Other bug fixes and cleanup ----- 0.8.0
end


!!------------------------------------!!Version 0.8.0.1!!-----------------------------------------------!!

if temp_current_save_version  < 00080001:
	!!--------0.8.0.1---school social group adjustment
	if gruptipe[9000] = 0:
		gruptipe[9000] = 1
		grupvalue[1] = grupvalue[1] * 10
		grupvalue[2] = grupvalue[2] * 10
		grupvalue[3] = grupvalue[3] * 10
		grupvalue[4] = grupvalue[4] * 10
	end
	!!--------0.8.0.1---school social group adjustment
end



!!------------------------------------------------------------------------------------------------------!!
!!                                    !!Version 0.8.1!!                                                 !!
!!------------------------------------------------------------------------------------------------------!!

if temp_current_save_version  < 00080100:
	!!--------0.8.1--- Music variable names changed
	if ml_update_1 = 0:
		ml_guitar['hasguitar'] = ml_guitar
		ml_guitar['carried']   = ml_guitarWithMe
		ml_guitar['chordbook'] = ml_chordbook

		ml_performance['performed_minutes']   = ml_performed_minutes
		ml_performance['max_perform_minutes'] = ml_max_perform_minutes

		ml_guitarlesson['lessoncount']   = ml_lessoncount
		ml_guitarlesson['lessonday']     = ml_lessonday
		$ml_guitarlesson['lessonday']    = $ml_lessonday
		ml_guitarlesson['lessonhour']    = 15
		ml_guitarlesson['nextlesson']    = daystart + (ml_guitarlesson['lessonday'] + 7 - week)
		ml_guitarlesson['advertisement'] = ml_guitarlessonadv
		ml_guitarlesson['enquired']      = ml_enquired

		if age < 18:
			ml_guitarlesson['lessoncost'] = 300
		else
			ml_guitarlesson['lessoncost'] = 500
		end

		killvar 'ml_guitarWithMe'
		killvar 'ml_performed_minutes'
		killvar 'ml_max_perform_minutes'
		killvar 'ml_guitarlessonadv'
		killvar 'ml_enquired'
		killvar 'ml_lessonday'
		killvar '$ml_lessonday'
		killvar 'ml_lessoncost'
		!!--------0.8.1--- Music variable names changed

		ml_update_1 = 1
	end


	!! changed $metkaM to $locM_arg and $metka to $loc_arg in the code - needed for correction saves saved prior to version 0.8.1
	if arrsize('$metkaM') > 0 or arrsize('$metka') > 0:
		$locM_arg = $metkaM
		$loc_arg = $metka

		killvar '$metkaM'
		killvar '$metka'
	end
	!!---------------------------------------------------------------


	!! fixes the variable for Christina getting outcasted, so she will show up in the journal correctly
	if zverSlutQW = 2:
		npc_grupTipe['A18'] = 5
	end

	!!---------------------------------------------------------------

	!!model variable updates
	if anastasia > 0 and anastasia['status'] = 0 and anastasia['saveupdate'] = 0:
		anastasia['status']     = anastasia
		anastasia['escort_ask'] = anastasia_escort_ask
		anastasia['model_exp']  = anastasia_mode_exp
		anastasia['sex']        = anastasiasex
		anastasia['saveupdate'] = 1
	end

	if foto_models['emily'] > 0 and emily['status'] = 0 and emily['saveupdate'] = 0:
		emily['status']     = foto_models['emily']
		emily['hate']       = emily_hate
		emily['model_exp']  = emily_model_exp
		emily['saveupdate'] = 1
	end

	if jeff > 0 and jeff['status'] = 0 and jeff['saveupdate'] = 0:
		jeff['status']     = jeff
		jeff['grope']      = jeff_grope
		jeff['movies']     = jeff_movies
		jeff['model_exp']  = jeff_model_exp
		jeff['saveupdate'] = 1
	end

	if krystal > 0 and krystal['status'] = 0 and krystal['saveupdate'] = 0:
		krystal['status']     = krystal['talk']

		krystal['saveupdate'] = 1
	end
	
	if $model['firstname'] = '':
		$model['firstname'] = $pcs_firstname
		$model['nickname']  = $pcs_nickname
		$model['lastname']  = $pcs_lastname
	end
	
	if $model['pay_method'] = '': $model['pay_method'] = 'cash_envelope'

	!! Fixing Katja and Natasha relationship
	if npc_sex['A14'] > 1: npc_sex['A14'] = 1
	if npc_sex['A16'] > 1: npc_sex['A16'] = 1

	!! University related vars update
	if student >= 0:
		gs 'uniutil', 'transfer_legacy_vars'
	end

	!!---------------------------------------------------------------

	!! Lariska story variables migrated to array
	if KotovZverHelp > 0:    LariskaQW['VitekHelp']      = KotovZverHelp   & killvar 'KotovZverHelp'
	if IvanZverHelp > 0:     LariskaQW['IvanHelp']       = IvanZverHelp    & killvar 'IvanZverHelp'
	if FyodorZverHelp > 0:   LariskaQW['FedorHelp']      = FyodorZverHelp  & killvar 'FyodorZverHelp'
	if lariskaHelp > 0:      LariskaQW['LariskaHelp']    = lariskaHelp     & killvar 'lariskaHelp'
	if lariskaHelp_end > 0:  LariskaQw['LariskaHelpEnd'] = lariskaHelp_end & killvar 'lariskaHelp_end'
	!!---------------------------------------------------------------


	!! Shave updater
	if shave_update ! 1:
		if pubestyle = 1:
			shave_length  = 2
			shave_trigger = 4

		elseif pubestyle = 10:
			shave_length  = 26
			shave_trigger = 31

		elseif pubestyle = 11:
			shave_length  = 2
			shave_trigger = 10
		
		!elseif (pubestyle >= 2 and pubestyle <= 9) or pubestyle >= 12:
		else
			shave_length  = 16
			shave_trigger = 21
		end

		shave_update = 1
	end
end



!!------------------------------------------------------------------------------------------------------!!
!!                                    !!Version 0.8.2!!                                                 !!
!!------------------------------------------------------------------------------------------------------!!

if temp_current_save_version  < 00080200:
	!! 0.8.2 clothing package for old saves ---------------------------------------

	if ARRSIZE('cheapH') > 0 or ARRSIZE('averageH') > 0 or ARRSIZE('expensiveH') > 0 or ARRSIZE('formalH') > 0 or ARRSIZE('officeH') > 0 or ARRSIZE('schoolH') > 0 or ARRSIZE('exerciseH') > 0 or ARRSIZE('uniformH') > 0 or ARRSIZE('exhibitH') > 0 or ARRSIZE('alternativeH') > 0 or ARRSIZE('fetishH') > 0 or ARRSIZE('burlesqueH') > 0:


		$batch_sell = {
			poshvalldrop += 1
			dynamic 'RESULT = <<$ARGS[0]>>H[<<ARGS[1]>>]'
			if RESULT > 100:
				dynamic '<<$ARGS[0]>>[<<ARGS[1]>>] = 0'
				dynamic '<<$ARGS[0]>>S[<<ARGS[1]>>] = 0'
				money += 750
				selltot += 750
			elseif RESULT > 45:
				dynamic '<<$ARGS[0]>>[<<ARGS[1]>>] = 0'
				dynamic '<<$ARGS[0]>>S[<<ARGS[1]>>] = 0'
				money += 500
				selltot += 500
			elseif RESULT > 30:
				dynamic '<<$ARGS[0]>>[<<ARGS[1]>>] = 0'
				dynamic '<<$ARGS[0]>>S[<<ARGS[1]>>] = 0'
				money += 300
				selltot += 300
			elseif RESULT > 0:
				dynamic '<<$ARGS[0]>>[<<ARGS[1]>>] = 0'
				dynamic '<<$ARGS[0]>>S[<<ARGS[1]>>] = 0'
				money += 100
				selltot += 100
			else
				dynamic '<<$ARGS[0]>>[<<ARGS[1]>>] = 0'
				dynamic '<<$ARGS[0]>>S[<<ARGS[1]>>] = 0'
			end
			dynamic '<<$ARGS[0]>>H[<<ARGS[1]>>] = 0'
		}


		poshvalldrop = 0
		selltot = 0

		!!-----------------------------------------------------------------------------------------
		i = 1
		:cheapmet
			if cheap[i] = 1 and cheapH[i] > 0: dynamic($batch_sell, 'cheap', i)
			i += 1
			if i <= 419: jump 'cheapmet'

		i = 1
		:averagemet
			if average[i] = 1 and averageH[i] > 0: dynamic($batch_sell, 'average', i)
			i += 1
			if i <= 541: jump 'averagemet'

		i = 1
		:expensivemet
			if expensive[i] = 1 and expensiveH[i] > 0: dynamic($batch_sell, 'expensive', i)
			i += 1
			if i <= 442: jump 'expensivemet'

		i = 1
		:formalmet
			if formal[i] = 1 and formalH[i] > 0: dynamic($batch_sell, 'formal', i)
			i += 1
			if i <= 185: jump 'formalmet'

		i = 1
		:officemet
			if office[i] = 1 and officeH[i] > 0: dynamic($batch_sell, 'office', i)
			i += 1
			if i <= 140: jump 'officemet'

		i = 1
		:schoolmet
			if school[i] = 1 and schoolH[i] > 0: dynamic($batch_sell, 'school', i)
			i += 1
			if i <= 80: jump 'schoolmet'

		i = 1
		:exercisemet
			if exercise[i] = 1 and exerciseH[i] > 0: dynamic($batch_sell, 'exercise', i)
			i += 1
			if i <= 260: jump 'exercisemet'

		i = 1
		:fetishmet
			if fetish[i] = 1 and fetishH[i] > 0: dynamic($batch_sell, 'fetish', i)
			i += 1
			if i <= 240: jump 'fetishmet'

		i = 1
		:burlesquemet
			if burlesque[i] = 1 and burlesqueH[i] > 0: dynamic($batch_sell, 'burlesque', i)
			i += 1
			if i <= 22: jump 'burlesquemet'

		i = 1
		:exhibitmet
			if exhibit[i] = 1 and exhibitH[i] > 0: dynamic($batch_sell, 'exhibit', i)
			i += 1
			if i <= 125: jump 'exhibitmet'

		i = 1
		:uniformmet
			if uniform[i] = 1 and uniformH[i] > 0: dynamic($batch_sell, 'uniform', i)
			i += 1
			if i <= 60: jump 'uniformmet'

		i = 1
		:swimwearmet
			if swimwear[i] = 1 and swimwearH[i] > 0: dynamic($batch_sell, 'swimwear', i)
			i += 1
			if i <= 213: jump 'swimwearmet'

		i = 1
		:beachmet
			if beach[i] = 1 and beachH[i] > 0: dynamic($batch_sell, 'beach', i)
			i += 1
			if i <= 103: jump 'beachmet'

		i = 1
		:alternativemet
			if alternative[i] = 1 and alternativeH[i] > 0: dynamic($batch_sell, 'alternativer', i)
			i += 1
			if i <= 129: jump 'alternativemet'
		!!-----------------------------------------------------------------------------------------



		killvar 'batch_sell'

		killvar 'alternativeH' & killvar 'alternativeS' & killvar 'alternative'
		killvar 'averageH'     & killvar 'averageS'     & killvar 'average'
		killvar 'burlesqueH'   & killvar 'burlesqueS'   & killvar 'burlesque'
		killvar 'cheapH'       & killvar 'cheapS'       & killvar 'cheap'
		killvar 'exerciseH'    & killvar 'exerciseS'
		killvar 'exhibitH'     & killvar 'exhibitS'
		killvar 'expensiveH'   & killvar 'expensiveS'   & killvar 'expensive'
		killvar 'fetishH'      & killvar 'fetishS'
		killvar 'formalH'      & killvar 'formalS'      & killvar 'formal'
		killvar 'officeH'      & killvar 'officeS'      & killvar 'office'
		killvar 'schoolH'      & killvar 'schoolS'      & killvar 'school'
		killvar 'uniformH'     & killvar 'uniformS'     & killvar 'uniform'
		killvar 'beachH'       & killvar 'beachS'       & killvar 'beachB'
		killvar 'swimwearH'    & killvar 'swimwearS'    & killvar 'swimwearB'
		killvar 'coatH'        & killvar 'coatS'

		gm_outfits[50] = 1
		gm_outfits_h[50] = 100
		gm_outfits_b[50] = pcs_hips
		gs 'clothing', 'wear', 'gm_outfits', 50
	end
	
		!! Shave updater
	if shave_update ! 1:
		if pubestyle = 1:
			shave_length  = 2
			shave_trigger = 4

		elseif pubestyle = 10:
			shave_length  = 26
			shave_trigger = 31

		elseif pubestyle = 11:
			shave_length  = 2
			shave_trigger = 8
		
		!elseif (pubestyle >= 2 and pubestyle <= 9) or pubestyle >= 12:
		else
			shave_length  = 16
			shave_trigger = 21
		end

		shave_update = 1
	end
end


!!------------------------------------!!Version 0.8.2.3!!-----------------------------------------------!!

if temp_current_save_version  < 00080203:

	!! Lariska variables removed, no longer needed - 2020/11/30 - Alaratt
	!! Edited - 2021/01/19 - Alaratt
	if beInLariskaHome = 1 or LariskaHomeIn >= 1:
		if LariskaHomeIn = 1:
			LariskaQW['story'] = 4
		else
			LariskaQW['story'] = 5
		end
		killvar 'LariskaHomeIn'
		killvar 'beInLariskaHome'
	end

	if doorlocked > 0:  killvar 'doorlocked'
	if doorpeek > 0:    killvar 'doorpeek'
	if lariskaBDSM > 0: killvar 'lariskaBDSM'

	if lariskaMotherKnown = 1:
		LariskaQW['metAnna'] = 1
		killvar 'lariskaMotherKnown'
	end

	if LariskaProfi = 1:
		LariskaQW['volleyball'] = 1
		killvar 'LariskaProfi'
	end
	!!---------------------------------------------------------------


	!! Migrates Christina variables into an array, removes unneeded variables, and fixes the outcast issue if still needed
	!! 2021/01/19 - Alaratt
	if zverSlutQW > 0:
		if zverSlutQW = 2:
			!! Christina lost the fight and is outcasted
			christinaQW['fight']   = 1
			christinaQW['dompath'] = 7
			npc_grupTipe['A18']    = 5
		else
			!! Christina lost the fight and is prepped for outcasting
			christinaQW['fight']   = 1
			christinaQW['dompath'] = 6
		end
		killvar 'zverSlutQW'
	end

	if zverRageQW > 0:
		if zverRageQW = 10:
			!! Christina won the fight
			christinaQW['fight']   = -1
			christinaQW['subpath'] = 2
		elseif zverRageQW = 2:
			!! Christina lost the fight
			christinaQW['fight']   = 1
			christinaQW['dompath'] = 6
		else
			!! You spread rumors about Christina and she preps for fight
			christinaQW['dompath'] = 4
		end
		killvar 'zverRageQW'
	end

	if socialchg['christina_dont_care'] = 1: socialchg['christina_dont_care'] = 0

	if zverevaQW > 0:   killvar 'zverevaQW'
	if LinaSlut > 0:    killvar 'LinaSlut'
	if fizrukSex > 0:   killvar 'fizrukSex'
	if kristinaSex > 0: killvar 'kristinaSex'

	if christinaphotos > 0:
		if christinaphotos = 3:
			!! Christina won the fight and you have not had a shower scene with her yet
			christinaQW['fight']   = -1
			christinaQW['subpath'] = 2
		elseif christinaphotos = 4:
			!! Christina won the fight and you had first shower scene with her
			christinaQW['fight']   = -1
			christinaQW['subpath'] = 3
		elseif christinaphotos = 2:
			!! You submitted to Christina and you had first shower scene with her
			christinaQW['submit']  = 1
			christinaQW['subpath'] = 3
		else
			!! You submitted to Christina but not had a shower scene with her yet
			christinaQW['submit']  = 1
			christinaQW['subpath'] = 2
		end
		killvar 'christinaphotos'
	end

	!!---------------------------------------------------------------

	!!Albina variables no longer needed, no sense in having them run in the background for nothing
	if AlbinaQW['ParkRallyDay'] > 0:         AlbinaQW['ParkRallyDay'] = 0
	if AlbinaQW['ElectionCampaignTime'] > 0: AlbinaQW['ElectionCampaignTime'] = 0
	if AlbinaQW['AlbFatherQW']  > 1:         AlbinaQW['AlbFatherQW']  = 1

	!!---------------------------------------------------------------
end


!!------------------------------------!!Version 0.8.2.4!!-----------------------------------------------!!

if temp_current_save_version  < 00080204:

	!! Migrates kikboxing variables into an array, removes unneeded variables.
	if razradKik > 0:   kickbox['sash']          = razradKik   & killvar 'razradKik'
	if amatReit > 0:    kickbox['advancement']   = amatReit    & killvar 'amatReit'
	if kikmoney > 0:    kickbox['money']         = kikmoney    & killvar 'kikmoney'
	if KikWinAm > 0:    kickbox['amateurWin']    = KikWinAm    & killvar 'KikWinAm'
	if KikWinAmKO > 0:  kickbox['amateurWinKO']  = KikWinAmKO  & killvar 'KikWinAmKO'
	if KikLossAm > 0:   kickbox['amateurLoss']   = KikLossAm   & killvar 'KikLossAm'
	if KikLossAmKO > 0: kickbox['amateurLossKO'] = KikLossAmKO & killvar 'KikLossAmKO'
	if KikDrawAm > 0:   kickbox['amateurDraw']   = KikDrawAm   & killvar 'KikDrawAm'
	if amateur > 0:     kickbox['amateur']       = amateur     & killvar 'amateur'
	killvar 'razrand'

end


!!------------------------------------!!Version 0.8.2.5!!-----------------------------------------------!!

if temp_current_save_version  < 00080205:

	!! Migrates Anushka''s brother''s quest into a array.
	if maksimQW > 0: maksimQW['QWstage'] = maksimQW

end


!!------------------------------------!!Version 0.8.2.6!!-----------------------------------------------!!

	!! 0.8.3 shoe package for old saves ---------------------------------------

if temp_current_save_version  < 00080206:


	i = 1
	:sfetishmet
		if sfetish[i] = 1: money += 300
		i += 1
		if i <= 27: jump 'sfetishmet'

	i = 1
	:scatsmet
		if scats[i] = 1: money += 300
		i += 1
		if i <= 38: jump 'scatsmet'

	i = 1
	:sgandmsmet
		if sgandm[i] = 1: money += 300
		i += 1
		if i <= 40: jump 'sgandmsmet'

	i = 1
	:trainersmet
		if trainers[i] = 1: money += 300
		i += 1
		if i <= 30: jump 'trainersmet'

	i = 1
	:sboutiquemet
		if sboutique[i] = 1: money += 300
		i += 1
		if i <= 37: jump 'sboutiquemet'


	killvar 'sfetish'   & killvar 'sfetishS'
	killvar 'scats'     & killvar 'scatsS'
	killvar 'sgandm'    & killvar 'sgandmS'
	killvar 'trainers'  & killvar 'trainersS'
	killvar 'sboutique' & killvar 'sboutiqueS'


	sgm[5] = 1
	sgm_s[5] = 0
	gs 'shoes', 'wear', 'sgm', 5
end



!!------------------------------------------------------------------------------------------------------!!
!!                                    !!Version 0.8.3!!                                                 !!
!!------------------------------------------------------------------------------------------------------!!

!!------------------------------------!!Version 0.8.3.4!!-----------------------------------------------!!

if temp_current_save_version  < 00080304:

	$fametown = 'pav'

	:fametownloop

	$fameact = 'acting'

	:fameactloop

	if dyneval('RESULT = <<$fametown>>_<<$fameact>>') < 400:
		dynamic 'fame[''<<$fametown>>_<<$fameact>>_core''] = <<$fametown>>_<<$fameact>>'
		
	elseif dyneval('RESULT = <<$fametown>>_<<$fameact>>') < 1100:
		dynamic 'fame[''<<$fametown>>_<<$fameact>>_core''] = 400 + (<<$fametown>>_<<$fameact>>-400)/3'
		
	elseif dyneval('RESULT = <<$fametown>>_<<$fameact>>') < 2900:
		dynamic 'fame[''<<$fametown>>_<<$fameact>>_core''] = 700 + (<<$fametown>>_<<$fameact>>-1100)/6'
		
	else
		dynamic 'fame[''<<$fametown>>_<<$fameact>>_core''] = 1000 +(<<$fametown>>_<<$fameact>> -2900)/10'
	end

	killvar '<<$fametown>>_<<$fameact>>'


	if $fameact = 'acting':
		$fameact = 'dance'
		jump 'fameactloop'
		
	elseif $fameact = 'dance':
		$fameact = 'painting'
		jump 'fameactloop'
		
	elseif $fameact = 'painting':
		$fameact = 'music'
		jump 'fameactloop'
		
	elseif $fameact = 'music':
		$fameact = 'ballet'
		jump 'fameactloop'
		
	elseif $fameact = 'ballet':
		$fameact = 'modelling'
		jump 'fameactloop'
		
	elseif $fameact = 'modelling':
		$fameact = 'porn'
		jump 'fameactloop'
		
	elseif $fameact = 'porn':
		$fameact = 'stripping'
		jump 'fameactloop'
		
	elseif $fameact = 'stripping':
		$fameact = 'kickboxing'
		jump 'fameactloop'
		
	elseif $fameact = 'kickboxing':
		$fameact = 'running'
		jump 'fameactloop'
		
	elseif $fameact = 'running':
		$fameact = 'volleyball'
		jump 'fameactloop'
		
	elseif $fameact = 'volleyball':
		$fameact = 'chess'
		jump 'fameactloop'
		
	elseif $fameact = 'chess':
		$fameact = 'teaching'
		jump 'fameactloop'
		
	elseif $fameact = 'teaching':
		$fameact = 'media'
		jump 'fameactloop'
	end


	$fameact = 'sex'

	:fameactloop2

	if dyneval('RESULT = <<$fametown>>_<<$fameact>>') < 400:
		dynamic 'fame[''<<$fametown>>_<<$fameact>>''] = <<$fametown>>_<<$fameact>>'
		
	elseif dyneval('RESULT = <<$fametown>>_<<$fameact>>') < 1100:
		dynamic 'fame[''<<$fametown>>_<<$fameact>>''] = 400 + (<<$fametown>>_<<$fameact>>-400)/3'
		
	elseif dyneval('RESULT = <<$fametown>>_<<$fameact>>') < 2900:
		dynamic 'fame[''<<$fametown>>_<<$fameact>>''] = 700 + (<<$fametown>>_<<$fameact>>-1100)/6'
		
	else
		dynamic 'fame[''<<$fametown>>_<<$fameact>>''] = 1000 +(<<$fametown>>_<<$fameact>> -2900)/10'
	end
	
	killvar '<<$fametown>>_<<$fameact>>'

	if $fameact = 'sex':
		$fameact = 'prostitute'
		jump 'fameactloop2'
	end

	if $fametown = 'pav':
		$fametown = 'city'
		jump 'fametownloop'
	elseif $fametown = 'city':
		$fametown = 'village'
		jump 'fametownloop'
	elseif $fametown = 'village':
		$fametown = 'pushkin'
		jump 'fametownloop'
	end

	gs 'fame', 'calculate', 'acting'
	gs 'fame', 'calculate', 'dance'
	gs 'fame', 'calculate', 'painting'
	gs 'fame', 'calculate', 'music'
	gs 'fame', 'calculate', 'ballet'
	gs 'fame', 'calculate', 'modelling'
	gs 'fame', 'calculate', 'porn'
	gs 'fame', 'calculate', 'stripping'
	gs 'fame', 'calculate', 'kickboxing'
	gs 'fame', 'calculate', 'running'
	gs 'fame', 'calculate', 'volleyball'
	gs 'fame', 'calculate', 'chess'
	gs 'fame', 'calculate', 'teaching'
	gs 'fame', 'calculate', 'media'
	gs 'fame', 'calculateSlut'



	if modelfoto > 0 and modelfoto['saveupdater'] = 0:
		!! changing modelling variables to arrays
		if modelfoto > 0:             modelfoto['shoots']      = modelfoto
		if modelfotomoney > 0:        modelfoto['earnings']    = modelfotomoney
		if modelfoto_catalog > 0:     modelfoto['catalog']     = modelfoto_catalog
		if modelfoto_fashion > 0:     modelfoto['fashion']     = modelfoto_fashion
		if modelfoto_ero_clo > 0:     modelfoto['sexy']        = modelfoto_ero_clo
		if modelfoto_bikini > 0:      modelfoto['bikini']      = modelfoto_bikini
		if modelfoto_lingerie > 0:    modelfoto['lingerie']    = modelfoto_lingerie
		if modelfoto_trans_ling > 0:  modelfoto['trans_ling']  = modelfoto_trans_ling
		if modelfoto_transparent > 0: modelfoto['transparent'] = modelfoto_transparent
		if modelfoto_fitness > 0:     modelfoto['fitness']     = modelfoto_fitness
		if modelfoto_glamour > 0:     modelfoto['glamour']     = modelfoto_glamour
		if modelfoto_topless > 0:     modelfoto['topless']     = modelfoto_topless
		if modelfoto_nude > 0:        modelfoto['nude']        = modelfoto_nude
		if modelfoto_tastenude > 0:   modelfoto['tastenude']   = modelfoto_tastenude
		if modelfoto_toplessnude > 0: modelfoto['toplessnude'] = modelfoto_toplessnude
		if modelfoto_fullnude > 0:    modelfoto['fullnude']    = modelfoto_fullnude
		if modelfoto_erotic > 0:      modelfoto['erotic']      = modelfoto_erotic
		if modelfoto_nip > 0:         modelfoto['nip']         = modelfoto_nip
		if modelfoto_pussy > 0:       modelfoto['pussy']       = modelfoto_pussy
		if modelfoto_asshole > 0:     modelfoto['asshole']     = modelfoto_asshole

		modelfoto['saveupdater'] = 1

	end
end


!!------------------------------------!!Version 0.8.3.5!!-----------------------------------------------!!

if temp_current_save_version  < 00080305:

	!!Defines the high school classes using the new grade system
	gs 'grades', 'createclass', 'school', 'math', 3, 2, 'yes', 'yes', 0, 0
	gs 'grades', 'createclass', 'school', 'rus',  3, 2, 'yes', 'yes', 0, 0
	gs 'grades', 'createclass', 'school', 'lit',  2, 2, 'yes', 'yes', 0, 0
	gs 'grades', 'createclass', 'school', 'art',  2, 2, 'yes', 'no',  0, 0
	gs 'grades', 'createclass', 'school', 'bio',  2, 2, 'yes', 'yes', 0, 0
	gs 'grades', 'createclass', 'school', 'pe',   3, 1, 'yes', 'no',  0, 0
	gs 'grades', 'createclass', 'school', 'eng',  2, 2, 'yes', 'yes', 0, 0
	gs 'grades', 'createclass', 'school', 'geo',  2, 2, 'yes', 'yes', 0, 0
	gs 'grades', 'createclass', 'school', 'sci',  2, 2, 'yes', 'yes', 0, 0
	gs 'grades', 'createclass', 'school', 'shop', 2, 2, 'yes', 'no',  0, 0
	gs 'grades', 'createclass', 'school', 'comp', 3, 2, 'yes', 'yes', 0, 0
	gs 'grades', 'createclass', 'school', 'mus',  2, 2, 'yes', 'no',  0, 0
	gs 'grades', 'createclass', 'school', 'his',  2, 2, 'yes', 'yes', 0, 0

	!!Convert the old grade attribute into the new individual grades.
	gs 'grades', 'grade_award', 'school', 'math', pcs_grades
	gs 'grades', 'grade_award', 'school', 'rus',  pcs_grades
	gs 'grades', 'grade_award', 'school', 'lit',  pcs_grades
	gs 'grades', 'grade_award', 'school', 'art',  pcs_grades
	gs 'grades', 'grade_award', 'school', 'bio',  pcs_grades
	gs 'grades', 'grade_award', 'school', 'pe',   pcs_grades
	gs 'grades', 'grade_award', 'school', 'eng',  pcs_grades
	gs 'grades', 'grade_award', 'school', 'geo',  pcs_grades
	gs 'grades', 'grade_award', 'school', 'sci',  pcs_grades
	gs 'grades', 'grade_award', 'school', 'shop', pcs_grades
	gs 'grades', 'grade_award', 'school', 'comp', pcs_grades
	gs 'grades', 'grade_award', 'school', 'mus',  pcs_grades
	gs 'grades', 'grade_award', 'school', 'his',  pcs_grades

	!!Assign a grado on the 1 to 5 russina grade scale from the grade variable
	gs 'grades', 'assing_grade_description', 'school'

	if month > 9 or (month = 9 and day > 5 and hour > 8) or year > 2016: class['first_grade_check'] = 1

end


!!------------------------------------!!Version 0.8.3.6!!-----------------------------------------------!!

if temp_current_save_version  < 00080306:
	!!Moving Djibril old variables into his array

	if meet_djibril > 0:     DjibrilQW['meet']             = meet_djibril     & killvar 'meet_djibril'
	if djibril_invite > 0:   DjibrilQW['invite']           = djibril_invite   & killvar 'djibril_invite'
	if african_gangbang > 0: DjibrilQW['african_gangbang'] = african_gangbang & killvar 'african_gangbang'

	if djibril_sex > 0: npc_sex['A82'] = djibril_sex & killvar 'djibril_sex'

	if npc_sex['A82'] > 0 or DjibrilQW['african_gangbang'] > 0: DjibrilQW['invite'] = 1

end


!!------------------------------------!!Version 0.8.3.7!!-----------------------------------------------!!

if temp_current_save_version  < 00080307:
	!!Moving some string variables to more appropriate numerical variables in the camera files.

	i = 0
	:camera_update_loop
		camera_found[i] = 1
		i += 1
		if ARRSIZE('camera_found') > i: jump 'camera_update_loop'


	!!Moved Igor''s quest to use daystart.
	if igor_DimaNos = 2 or igor_DimaNos = 3:
		if $igor_DimaNos_day > 5:
			igor_DimaNos_day = daystart
		else
			igor_DimaNos_day = daystart + 6 - $igor_DimaNos_day
		end
	end
end


if temp_current_save_version  < 00080402:
	!!Setting the count of generic girlfirends.

	pcs_girlfriends = 0
	i = 0
	:girlfriend_looop
	if loverGender[i] = 1: pcs_girlfriends += 1
	i +=1
	if i < ARRSIZE('lover'): jump 'girlfriend_looop'
	Killvar 'i'

	if analorgasm > 0: orgasm_anal += analorgasm
end



!!------------------------------------------------------------------------------------------------------!!
!!                                    !!Version 0.8.4!!                                                 !!
!!------------------------------------------------------------------------------------------------------!!

!!------------------------------------!!Version 0.8.4.3!!-----------------------------------------------!!

if temp_current_save_version  < 00080403:
	!!Updating the variables for the Katja Quest line.

	if meynoldQW = 1 or meynoldQW = 2:
		katjaQW['QWstage'] = meynoldQW
		killvar 'meynoldQW'
	end
	if katjaFirstKiss > 0 or KatjaOTN > 0:
		katjaQW['QWstage'] = 3
		killvar 'katjaFirstKiss'
		killvar 'KatjaOTN'
	end

	if katjaTanga > 0:       katjaQW['pantiesQWstage']          = katjaTanga      & killvar 'katjaTanga'
	if katja_tanga_end > 0:  katjaQW['pantiesQWstage']          = 5               & killvar 'katja_tanga_end'
	if katjaSlut > 0:        katjaQW['slut']                    = katjaSlut       & killvar 'katjaSlut'
	if katjaHorny > 0:       katjaQW['horny']                   = katjaHorny      & killvar 'katjaHorny'
	if katjaSex = 1:         katjaQW['park_sex']                = 1               & killvar 'katjaSex'
	if katjaSex = 2:         katjaQW['park_sex']                = 2               & killvar 'katjaSex'
	if katjaSex > 2:         katjaQW['park_sex']                = 3               & killvar 'katjaSex'
	if KatjaMastr > 0:       katjaQW['masturbates']             = KatjaMastr      & killvar 'KatjaMastr'

	if KatjaThroat > 0:      npc_throat['A14'] = KatjaThroat & killvar 'KatjaThroat'
	if KatjaAnus > 0:        npc_ass['A14']    = KatjaAnus   & killvar 'KatjaAnus'

	if KatjaOrgasm > 0:      katjaQW['orgasm_day']              = KatjaOrgasm     & killvar 'KatjaOrgasm'
	if katjaMeynoldday > 0:  katjaQW['afterschool_hangout_day'] = katjaMeynoldday & killvar 'katjaMeynoldday'
	if tangaday > 0:         katjaQW['no_panties_day']          = tangaday        & killvar 'tangaday'
	if KatjaKnowMastr > 0:   katjaQW['knows_masterbation']      = 1               & killvar 'KatjaKnowMastr'
	if SelfFistingKnow > 0:  katjaQW['knows_self_fisting']      = 1               & killvar 'SelfFistingKnow'
	if KatjaKnowBJ > 0:      katjaQW['knows_BJ']                = 1               & killvar 'KatjaKnowBJ'
	if KatjaKnowSex > 0:     katjaQW['knows_sex']               = 1               & killvar 'KatjaKnowSex'
	if KatjaKnowAnal > 0:    katjaQW['knows_anal']              = 1               & killvar 'KatjaKnowAnal'
	if KatjaKnowKuni > 0:    katjaQW['knows_cuni']              = 1               & killvar 'KatjaKnowKuni'
	if KatjaKnowPirsA > 0:   katjaQW['know_Pirced_tongue']      = 1               & killvar 'KatjaKnowPirsA'
	if katschoolsex > 0:     katjaQW['school_sex']              = 1               & killvar 'katschoolsex'
	if katja_disco_Foto > 0: katjaQW['disco_Foto']              = 1               & killvar 'katja_disco_Foto'
	if meynoldQW = 3:        katjaQW['drunk_help']              = 1               & killvar 'meynoldQW'
	if katja_disco_end > 0:  katjaQW['no_panties_at_disco']     = 1               & killvar 'katja_disco_end'
	if KatjaOhrenet > 0:     KatjaQW['sex_in_the_park_comment'] = KatjaOhrenet    & killvar 'KatjaOhrenet'
	if flag_start_parc > 0:  katjaQW['school_kiss']             = flag_start_parc & killvar 'flag_start_parc'

end



!!------------------------------------------------------------------------------------------------------!!
!!                                    !!Version 0.8.5!!                                                 !!
!!------------------------------------------------------------------------------------------------------!!

if temp_current_save_version  < 00080500:
	if $loc = 'dorm':      $loc = 'uni_dorm'                                        & $menu_loc = 'uni_dorm'
	if $loc = 'HotelWork': $loc = 'hotel_work'                                      & $menu_loc = 'hotel_work'
	if $loc = 'ParChurch': $loc = 'pav_church'                                      & $menu_loc = 'pav_church'
	if $loc = 'pav_train': $loc = 'pav_market'                                      & $menu_loc = 'pav_market'
	if $loc = 'univer':    $loc = 'uni_admin'                                       & $menu_loc = 'uni_admin'
	if $loc = 'youplace':  $loc = 'city_mansion_entrance'                           & $menu_loc = 'city_mansion_entrance'
	if $loc = 'ykamin':    $loc = 'city_mansion_residence_2' & $loc_arg='ylounge'   & $menu_loc ='city_mansion_residence_2' & $menu_arg='ylounge'
	if $loc = 'ykuh':      $loc = 'city_mansion_residence_1' & $loc_arg='ykitchen'  & $menu_loc ='city_mansion_residence_1' & $menu_arg='ykitchen'
	if $loc = 'ydet':      $loc = 'city_mansion_residence_2' & $loc_arg='ynursery'  & $menu_loc ='city_mansion_residence_2' & $menu_arg='ynursery'
	if $loc = 'ybib':      $loc = 'city_mansion_residence_2' & $loc_arg='ylibrary'  & $menu_loc ='city_mansion_residence_2' & $menu_arg='ylibrary'
	if $loc = 'ybedr':     $loc = 'city_mansion_residence_1' & $loc_arg='ybedroom'  & $menu_loc ='city_mansion_residence_1' & $menu_arg='ybedroom'
	if $loc = 'ybass':     $loc = 'city_mansion_residence_3' & $loc_arg='ypool'     & $menu_loc ='city_mansion_residence_3' & $menu_arg='ypool'
	if $loc = 'yban':      $loc = 'city_mansion_residence_3' & $loc_arg='ysauna'    & $menu_loc ='city_mansion_residence_3' & $menu_arg='ysauna'
	if $loc = 'yvan':      $loc = 'city_mansion_residence_1' & $loc_arg='ybathroom' & $menu_loc ='city_mansion_residence_1' & $menu_arg='ybathroom'
	if $loc = 'ymans':     $loc = 'city_mansion_residence_1' & $loc_arg='yfoyer'    & $menu_loc ='city_mansion_residence_1' & $menu_arg='yfoyer'
	if $loc = 'yzal':      $loc = 'city_mansion_residence_2' & $loc_arg='yliving'   & $menu_loc ='city_mansion_residence_2' & $menu_arg='yliving'
	if $loc = 'ysport':    $loc = 'city_mansion_residence_3' & $loc_arg='ygym'      & $menu_loc ='city_mansion_residence_3' & $menu_arg='ygym'
	if $loc = 'ykabinet':  $loc = 'city_mansion_residence_2' & $loc_arg='yoffice'   & $menu_loc ='city_mansion_residence_2' & $menu_arg='yoffice'


	!!updater for sports clothing variable to unify it and fix bug
	i = 1
	:danilovichfix
		if danilovich[i] = 1:
			danilovich_outfits[i] = 1
			danilovich_outfits_s[i] = danilovich_s[i]
			danilovich_outfits_h[i] = danilovich_h[i]
			danilovich_outfits_b[i] = danilovich_b[i]
		end
		i += 1
		if i <= 170: jump 'danilovichfix'

	killvar 'danilovich'
	killvar 'danilovich_s'
	killvar 'danilovich_h'
	killvar 'danilovich_b'

	!! New setting for gaping time per stage in minutes that can be made user definable
	if agape[4] = 0: agape[4] = 10
	if vgape[4] = 0: vgape[4] = 10
end


!!------------------------------------!!Version 0.8.5.2!!-----------------------------------------------!!

if temp_current_save_version  < 00080502:
	i = 0
	:saveupdaterloop852_1
		$text = 'C' + str(i)
		temp1 = func('shortgs', 'get_me_index', '$npc_firstname', $text)
		if temp1 >= 0: $npc_index[$text] = $text

		i += 1
		if i < carraynumber: jump 'saveupdaterloop852_1'

	i = 0
	:saveupdaterloop852_2
		$text = 'B' + str(i)
		temp1 = func('shortgs', 'get_me_index', '$npc_firstname', $text)
		if temp1 >= 0: $npc_index[$text] = $text

		i += 1
		if i < barraynumber: jump 'saveupdaterloop852_2'

end


!!------------------------------------!!Version 0.8.5.3!!-----------------------------------------------!!

if temp_current_save_version  < 00080503:

	i = 0
	:saveupdaterloop853_1
		if 	npc_grupTipe['A<<i>>'] = 5:
			$npcGoSchool['A<<i>>'] = '<a href="exec:gt ''gschool_outcast_chats'', ''' + $lcase($npc_usedname['A<<i>>']) + '''"><<$npc_usedname["A<<i>>"]>></a>'

		elseif npc_grupTipe['A<<i>>'] = 4:
			$npcGoSchool['A<<i>>'] = '<a href="exec:gt ''gschool_gopnik_chats'', ''' + $lcase($npc_usedname['A<<i>>']) + '''"><<$npc_usedname["A<<i>>"]>></a>'

		elseif npc_grupTipe['A<<i>>'] = 3:
			$npcGoSchool['A<<i>>'] = '<a href="exec:gt ''gschool_nerd_chats'', ''' + $lcase($npc_usedname['A<<i>>']) + '''"><<$npc_usedname["A<<i>>"]>></a>'

		elseif npc_grupTipe['A<<i>>'] = 2:
			$npcGoSchool['A<<i>>'] = '<a href="exec:gt ''gschool_jock_chats'', ''' + $lcase($npc_usedname['A<<i>>']) + '''"><<$npc_usedname["A<<i>>"]>></a>'

		elseif npc_grupTipe['A<<i>>'] = 1:
			$npcGoSchool['A<<i>>'] = '<a href="exec:gt ''gschool_coolkid_chats'', ''' + $lcase($npc_usedname['A<<i>>']) + '''"><<$npc_usedname["A<<i>>"]>></a>'
		end
		i += 1
		if i < 250: jump 'saveupdaterloop853_1'

	if hotelroom1day ! 0:
		hotelRoomDays['pav_hotel'] = hotelroom1day
		hotelRoom['pav_hotel'] = hotelroom
		
		killvar 'hotelroom1day'
		hotelroom = 0
	end
end


!!------------------------------------!!Version 0.8.5.4!!-----------------------------------------------!!

if temp_current_save_version  < 00080504:

	!!Christinas chat have to stay in the jocks file even if she is an outcast
	$npcGoSchool['A18'] = '<a href="exec:gt ''gschool_jock_chats'', ''' + $lcase($npc_usedname['A18']) + '''"><<$npc_usedname["A18"]>></a>'

	if storyline = 1 and MagikDostup = 1:
		$start_type      = 'sg'
		$start_type[1]   = 'nomagic'
		
	elseif $start_type = 'csb':
		$start_type      = 'sg_tg'
		$start_type[1]   = 'tg'
		
	elseif storyline = 1:
		$start_type      = 'sg_m'
		
	elseif MagikDostup = 1:
		$start_type      = 'city'
		$start_type[1]   = 'nomagic'
		
	else
		$start_type = 'city_tg'
		$start_type[1]   = 'tg'
	end
end



!!------------------------------------------------------------------------------------------------------!!
!!                                    !!Version 0.8.6!!                                                 !!
!!------------------------------------------------------------------------------------------------------!!

!!------------------------------------!!Version 0.8.6.1!!-----------------------------------------------!!

if temp_current_save_version  < 00080601:

	if pcs_skin < 150: pcs_skin = 7 * pcs_skin

	gs 'body', 'Update_Body'
	gs 'body', 'DailyUpdate'
	gs 'stat'
end



!!------------------------------------------------------------------------------------------------------!!
!!                                    !!Version 0.8.7!!                                                 !!
!!------------------------------------------------------------------------------------------------------!!

if temp_current_save_version  < 00080700:

	!!name fix from kats to cats
	i = 1
	:loopcatsbrassave
		if kats_bras[i] = 1:
			cats_brasS[i] = kats_brasS[i]
			cats_bras[i] = kats_bras[i]
		end
		i += 1
		if i <= ARRSIZE('kats_bras'): jump 'loopcatsbrassave'

	killvar 'kats_brasS'
	killvar 'kats_bras'

	i = 1
	:loopcatspantiessave
		if kats_panties[i] = 1:
			cats_pantiesS[i] = kats_pantiesS[i]
			cats_panties[i] = kats_panties[i]
		end
		i += 1
		if i <= ARRSIZE('kats_panties'): jump 'loopcatspantiessave'

	killvar 'kats_pantiesS'
	killvar 'kats_panties'


	!!Christina variable update
	if AvelinaQW['encourage'] = 1: AvelinaQW['encourage'] = 0

	if lariskaQwestDay < 0 or lariskaQwestDay > 0: killvar 'lariskaQwestDay'
	if LariskaQW['LariskaHelp'] < 0 or LariskaQW['LariskaHelp'] > 0: LariskaQW['LariskaHelp'] = 0
	if LariskaQW['LariskaHelpEnd'] = 1: LariskaQW['LariskaHelpEnd'] = 0


	if npc_grupTipe['A18'] = 5: npc_grupTipe['A18'] = 2

	if christinaQW['dompath'] >= 1:
		if christinaQW['dompath'] >= 6:
			christinaQW['fight']     = 1
			christinaQW['dompath']   = 0
		else
			christinaQW['dompath']   = 0
		end
	end

	if christinaQW['set_bully'] = 0:
		if (christinaQW['blackmail'] > 0 or christinaQW['pre_bm'] > 0 or christinaQW['pre_fight'] > 0 or christinaQW['fight'] > 0) and christinaQW['set_bully'] = 0:
			christinaQW['set_bully']   = 1
			christinaQW['bully']       = 40
		end
		if christinaQW['subpath'] > 0:
			christinaQW['set_bully']   = 1
			christinaQW['bully']       = 60
		end
	end

	!!Schedule migrated to the array, no need to change first
	killvar 'chrisloc'
	killvar 'lariloc'
	killvar 'anyaloc'
	killvar 'kolloc'
	killvar 'sdadloc'
	killvar 'father_go'
	killvar 'momloc'
	killvar 'momclean1'
	killvar 'momclean2'
	
	if mother_go > 0:
		locat['Mom_cafe_sex'] = mother_go
	end

	killvar 'm_day'
	killvar 'mother_go'
	killvar 'ocpd_room'

	if indorf > 0:
		locat['Fam_inGad'] = indorf
	end
	if indorf_month = month:
		locat['Fam_month_inGad'] = indorf_month
	end
	if dostupindorf > 0:
		locat['Fam_set_month_inGad'] = dostupindorf
	end

	killvar 'indorf'
	killvar 'indorf_month'
	killvar 'dostupindorf'

	if sister_indorf > 0:
		locat['Anya_Gad'] = sister_indorf
	end
	if sister_opr_indorf > 0:
		locat['Anya_check_Gad'] = sister_opr_indorf
	end
	killvar 'sister_indorf'
	killvar 'sister_opr_indorf'

	if workKafe = 1:
		workKafe = 0
		workKafe['job'] = 1
	end
	if moisturiser['time'] > 0:
		moisturiser_time = moisturiser['time']
		gs 'shortgs', 'remove_array_element', '<<moisturiser>>', 'time'
	end
end



killvar 'hypnoHairStyle'

if mod_list > 0:
	mod_i = 1
	:mod_data_updater
		if $mod_name[mod_i] ! '':
			$mod_su_name = 'mod_<<$mod_name[mod_i]>>_saveupdater'
			if LOC($mod_su_name): gs $mod_su_name
		end
		if mod_list > mod_i:
			mod_i += 1
			jump 'mod_data_updater'
		end

	killvar '$mod_su_name'
	killvar 'mod_i'
end



!!------------------------------------------------------------------------------------------------------!!
!!                                    !!Version 0.8.8!!                                                 !!
!!------------------------------------------------------------------------------------------------------!!

if temp_current_save_version  < 00080800:
	!!update base appearance to the new calculation
	gs 'body', 'Update_Appearance'
	gs 'AppearanceSystem'

	if $wloc = 'default': $wloc = 'default1'

	!! new teeth variables
	if pcs_teeth >= 0:
		pcs_missing_teeth = pcs_teeth
		pcs_teeth = 0
	end


	!! udate of Artem quest variables to an array.
	if artembj > 0:          artemQW['bj']          = artembj          & killvar 'artembj'
	if artemsex > 0:         artemQW['sex']         = artemsex         & killvar 'artemsex'
	if artemanal > 0:        artemQW['anal']        = artemanal        & killvar 'artemanal'
	if artemhj > 0:          artemQW['hj']          = artemhj          & killvar 'artemhj'
	if artembrokenheart > 0: artemQW['brokenheart'] = artembrokenheart & killvar 'artembrokenheart'
	if artemStripSee > 0:    artemQW['stripsee']    = artemStripSee    & killvar 'artemStripSee'
	if artemlove > 0:        artemQW['artemlove']   = artemlove        & killvar 'artemlove'
	if artemblok > 0:        artemQW['artemblok']   = artemblok        & killvar 'artemblok'
	if artembf > 0:          artemQW['bf']          = artembf          & killvar 'artembf'
	if artdryhump > 0:       artemQW['dryhump']     = artdryhump       & killvar 'artdryhump'
	if artlie > 0:           artemQW['artlie']      = artlie           & killvar 'artlie'
	if artfall > 0:          artemQW['artfall']     = artfall          & killvar 'artfall'
	if artdate > 0:          artemQW['date']        = artdate          & killvar 'artdate'
	if artdim > 0:           artemQW['dimka']       = artdim           & killvar 'artdim'
	if artslutlove > 0:      artemQW['slutlove']    = artslutlove      & killvar 'artslutlove'
	if artsveslut > 0:       artemQW['sveslut']     = artsveslut       & killvar 'artsveslut'
	if metArtemMom > 0:      artemQW['metArtemMom'] = metArtemMom      & killvar 'metArtemMom'
	if artdimhelp > 0:       artemQW['dimkahelp']   = artdimhelp       & killvar 'artdimhelp'


	!! update Julia to an array
	if JulMilBestFrend > 0: juliaQW['JulMilBestFrend'] = JulMilBestFrend & killvar 'JulMilBestFrend'
	if eatJulMilDay:        juliaQW['eatJulMilDay']    = eatJulMilDay    & killvar 'eatJulMilDay'
	if SexTalkJulia:        juliaQW['SexTalkJulia']    = SexTalkJulia    & killvar 'SexTalkJulia'
	if BeInJulMilHome:      juliaQW['home_unlocked']   = BeInJulMilHome  & killvar 'BeInJulMilHome'
	if JuliaMilLernQW:      juliaQW['study_unlocked']  = JuliaMilLernQW  & killvar 'JuliaMilLernQW'

end


!!------------------------------------!!Version 0.8.8.2!!-----------------------------------------------!!

if temp_current_save_version < 00080802:

	!!--------------------------------------------------------------------
	!! Prostitution related changes
	!!--------------------------------------------------------------------

	!! Gadukino prostitution
	gs 'prostitution_functions', 'set_gadukion_prostitute'

	!! Anuahka''s variables put in an array.

	if anushkaFirstvisit > 0:   anushkaQW['first_visit']        = anushkaFirstvisit   & killvar 'anushkaFirstvisit'
	if Anush_lunch > 0:         anushkaQW['lunch']              = Anush_lunch         & killvar 'Anush_lunch'
	if nush_model > 0:          anushkaQW['model']              = nush_model          & killvar 'nush_model'
	if foto_anush_referral > 0: anushkaQW['model_referral']     = foto_anush_referral & killvar 'foto_anush_referral'
	if AnushkaCompUse > 0:      anushkaQW['computer_use']       = AnushkaCompUse      & killvar 'AnushkaCompUse'
	if marspyknow > 0:          anushkaQW['marspyknow']         = marspyknow          & killvar 'marspyknow'
	if nushstrapanalpain > 0:   anushkaQW['strapon_anal_pain']  = nushstrapanalpain   & killvar 'nushstrapanalpain'
	if nushstrapon > 0:         anushkaQW['strapon']            = nushstrapon         & killvar 'nushstrapon'
	if domnush > 0:             anushkaQW['dom_nush']           = domnush             & killvar 'domnush'
	if seenEd > 0:              anushkaQW['seen_ed']            = seenEd              & killvar 'seenEd'
	if valeriaIntroduced > 0:   anushkaQw['valeria_introduced'] = valeriaIntroduced   & killvar 'valeriaIntroduced'
	if showerphotos > 0:        anushkaQW['shower_photos']      = showerphotos        & killvar 'showerphotos'
	if anushka_tv_day > 0:      anushkaQW['tv_day']             = anushka_tv_day      & killvar 'anushka_tv_day'
	if anushka_shower_day > 0:  anushkaQW['shower_day']         = anushka_shower_day  & killvar 'anushka_shower_day'
	if AnushkaHomeDay > 0:      anushkaQW['home_day']           = AnushkaHomeDay      & killvar 'AnushkaHomeDay'
	if nush_photoshoot > 0:     anushkaQW['photoshoot']         = nush_photoshoot     & killvar 'nush_photoshoot'
	if NushVsNiko > 0:          anushkaQW['vs_niko']            = NushVsNiko          & killvar 'NushVsNiko'
	if nushaboutalyona > 0:     anushkaQW['about_alyona']       = nushaboutalyona     & killvar 'nushaboutalyona'
	if valspy > 0:              anushkaQW['valspy']             = valspy              & killvar 'valspy'
	if radnushdate > 0:         anushkaQW['rad_date']           = radnushdate         & killvar 'radnushdate'
	if radspy > 0:              anushkaQW['radspy']             = radspy              & killvar ' radspy'
	if nushfedor3s > 0:         anushkaQW['fedor_3some']        = nushfedor3s         & killvar 'nushfedor3s'
	if Anush_sex > 0:           anushkaQW['sex']                = Anush_sex           & killvar 'Anush_sex'
	if Anush_dolls > 0:         anushkaQW['dolls']              = Anush_dolls         & killvar 'Anush_dolls'
	if anushka_toilet > 0:      anushkaQW['toilet']             = anushka_toilet      & killvar 'anushka_toilet'
	if marspy > 0:              anushkaQW['marspy']             = marspy              & killvar 'marspy'
	if bandpracticeinvite > 0: gopnikbandQW['practice_invite']  = bandpracticeinvite  & killvar 'bandpracticeinvite'

end


!!------------------------------------!!Version 0.8.8.2!!-----------------------------------------------!!

if temp_current_save_version < 00080804:

	!!--------------------------------------------------------------------
	!! Homes, Properties and Internet Update
	!!--------------------------------------------------------------------

	!! Transferring the owned, rented, accessible properties
	! city apartment
	if home_owned[1] = 1 or owned_property['city_apartment'] = 1:
		gs 'homes_properties', 'rent_property', 'city_apartment', ArendHouseSL
		
	elseif home_owned[1] = 2 or owned_property['city_apartment'] = 2:
		gs 'homes_properties', 'buy_property', 'city_apartment'

	elseif home_owned[1] = 3 or owned_property['city_apartment'] = 3:
		gs 'homes_properties', 'tenants_move_in', 'city_apartment', sdaday, sdamonth
	end

	!! Checking for renovation
	if home_owned[1] > 0 or owned_property['city_apartment'] = 1:
		if rembedr = 1: gs 'homes_properties', 'renovate_property', 'city_apartment', 50000, 'bedroom'
		if remsitr = 1: gs 'homes_properties', 'renovate_property', 'city_apartment', 50000, 'living room'
		if remkorr = 1: gs 'homes_properties', 'renovate_property', 'city_apartment', 50000, 'hallway'
		if remvanr = 1: gs 'homes_properties', 'renovate_property', 'city_apartment', 50000, 'bathroom'
		if remkuhr = 1: gs 'homes_properties', 'renovate_property', 'city_apartment', 50000, 'kitchen'
	end

	! parents home
	if home_owned[2]  > 0 or owned_property['parents_home']              > 0: gs 'homes_properties', 'give_access',       'parents_home'

	! cottage in the village
	if home_owned[3]  > 0 or owned_property['village_cottage']           > 0: gs 'homes_properties', 'buy_property',      'village_cottage'
	if home_owned[3]  > 1 or owned_property['village_cottage-renovated'] = 1: gs 'homes_properties', 'renovate_property', 'village_cottage', 200000

	! Pushking old town apartment
	if home_owned[4]  = 1 or owned_property['old_town_apartment']        = 1: gs 'homes_properties', 'rent_property',     'old_town_apartment', ArendHouseSL4

	! Matryona mansion
	if home_owned[5]  > 0 or owned_property['matryona_mansion']                     > 0: gs 'homes_properties', 'buy_property',                 'matryona_mansion'
	if home_owned[5]  > 1 or owned_property['matryona_mansion-construction-status'] = 1: gs 'homes_properties', 'progress_construction_status', 'matryona_mansion'
	if home_owned[5]  > 2 or owned_property['matryona_mansion-construction-status'] = 2: gs 'homes_properties', 'progress_construction_status', 'matryona_mansion'

	! Pavlovsk hotel room
	if home_owned[6]  > 0 or owned_property['pavlovsk_hotel']     > 0:  gs 'homes_properties', 'give_access', 'pavlovsk_hotel'

	! Live in maid bedroom
	if home_owned[7]  > 0 or owned_property['maid_bedroom']       > 0:  gs 'homes_properties', 'give_access', 'maid_bedroom'

	! Niko apartment
	if home_owned[8]  > 0 or owned_property['niko_apartment']     > 0:  gs 'homes_properties', 'give_access', 'niko_apartment'

	! Shulga apartment
	if home_owned[9]  > 0 or owned_property['shulga_apartment']   > 0:  gs 'homes_properties', 'give_access', 'shulga_apartment'

	! Lyceum dorm room
	if home_owned[10] > 0 or owned_property['lyceum_dorm']        > 0:  gs 'homes_properties', 'give_access', 'lyceum_dorm'

	! University dorm room
	if home_owned[11] > 0 or owned_property['university_dorm']    > 0:  gs 'homes_properties', 'give_access', 'university_dorm'

	! Hunters lodge
	if home_owned[12] > 0 or owned_property['hunters_lodge']      > 0:  gs 'homes_properties', 'give_access', 'hunters_lodge'

	! Shared apartment in Pavlovsk
	if home_owned[13] > 0 or owned_property['shared_apartment']   > 0:  gs 'homes_properties', 'give_access', 'shared_apartment'

	! Grandparents house
	if home_owned[14] > 0 or owned_property['grandparents_house'] > 0:  gs 'homes_properties', 'give_access', 'grandparents_house'

	! City residential house
	if home_owned[15] > 0 or owned_property['city_house']         > 0:  gs 'homes_properties', 'buy_property', 'city_house'

	! Meynold household
	if home_owned[16] > 0 or owned_property['meynold_household']  > 0:  gs 'homes_properties', 'give_access', 'meynold_household'



	!! Setting the current home and fixing potential missing access issues
	if curr_home > 0 and $home['current'] = '': 
		gs 'homes_properties', 'set_home', '', STR(curr_home)
	end
	if $home['current'] = 'parents_home' and accessible_property['parents_home'] = 0: 
		gs 'homes_properties', 'give_access', 'parents_home'
	end

	killvar 'home_owned'
	killvar 'curr_home'
	killvar 'ArendHouseSL' & killvar 'ArendHouseSL4'
	killvar 'home_rent_txt'
	killvar 'home_value'   & killvar 'home_value_txt'
	killvar 'sdaday'       & killvar 'sdamonth'
	killvar 'owned_property'


	if $home['current'] = '':
		if mid($start_type, 1, 2) = 'sg':
			gs 'homes_properties', 'give_access', 'parents_home'
			gs 'homes_properties', 'set_home',    'parents_home'

		elseif mid($start_type, 1, 4) = 'city':
			gs 'homes_properties', 'give_access', 'city_apartment'
			gs 'homes_properties', 'set_home',    'city_apartment'

		elseif mid($start_type, 1, 3) = 'uni':
			gs 'homes_properties', 'give_access', 'university_dorm'
			gs 'homes_properties', 'set_home',    'university_dorm'
		end
	end


	!! Setting the internet
	if internet > 0:
		old_internet_value = 10*internet
		if $home['internet_enabled'] = 1:
			gs 'internet_mobile', 'buy_subscription', $home['current'], 900

			if (old_internet_value - 900) >= 0: money += (old_internet_value - 900)
		else
			if old_internet_value >= 1200:
				gs 'internet_mobile', 'buy_subscription', 'mobile', 1200

				if (old_internet_value - 1200) > 0: money += (old_internet_value - 1200)
			else
				gs 'internet_mobile', 'top_up_metered', 'metered_mobile', internet * 60
			end
		end
		killvar 'internet'
	end

	!! Setting the mobile phone calls and texts
	if balans > 0:
		if (balans - 800) >= 0:
			gs 'internet_mobile', 'buy_subscription', 'monthly_calls', 800
			money += (balans - 800)
		else
			if balans >= 225:
				temp_phone_mult = balans / 225
				temp_phone_rem  = balans mod 225
				new_balans      = temp_phone_mult * 240

				gs 'internet_mobile', 'top_up_metered', 'metered_calls', new_balans

				if temp_phone_rem > 0: money += temp_phone_rem

			elseif balans >= 170:
				 temp_phone_rem = balans mod 170
				 gs 'internet_mobile', 'top_up_metered', 'metered_calls', 180
				 if temp_phone_rem > 0: money += temp_phone_rem

			elseif balans >= 115:
				 temp_phone_rem = balans mod 115
				 gs 'internet_mobile', 'top_up_metered', 'metered_calls', 120
				 if temp_phone_rem > 0: money += temp_phone_rem

			elseif balans >= 60:
				 temp_phone_rem = balans mod 60
				 gs 'internet_mobile', 'top_up_metered', 'metered_calls', 60
				 if temp_phone_rem > 0: money += temp_phone_rem
			else
				gs 'internet_mobile', 'top_up_metered', 'metered_calls', balans
			end
		end

		killvar 'balans' & killvar 'temp_phone_rem' & killvar 'temp_phone_mult' & killvar 'new_balans'
	end


	!! ------------ NPC Stat Updater ------------------------

	if $ARGS[0] = 'npc_stat_update':
		if npc_start_free_time[$boy] = 0 or npc_day_off[$boy] = 0:
			if npc_finance[$boy] = 0:
				if rand(1,3) = 1:
					npc_start_free_time[$boy] = 9
					npc_end_free_time[$boy] = 12

				elseif rand(1,2) = 1:
					npc_start_free_time[$boy] = 16
					npc_end_free_time[$boy] = 20
				else
					npc_start_free_time[$boy] = 20
					npc_end_free_time[$boy] = 23
				end

			elseif npc_finance[$boy] = 1:
				if rand(1,2) = 1:
					npc_start_free_time[$boy] = 9
					npc_end_free_time[$boy] = 12
				else
					npc_start_free_time[$boy] = 20
					npc_end_free_time[$boy] = 23
				end

			elseif npc_finance[$npclastgenerated] = 2:
				npc_apt_type[$npclastgenerated] = 5
				!!npc_apt_type[$npclastgenerated] = rand(5,6)
				!! apt_type 6 is disabled until pictures are added
				npc_occupation[$npclastgenerated] = rand(14,18)
				npc_car[$npclastgenerated] = rand(0,1)
			end

			npc_day_off = rand(1,7)
		end
	end
end



!!------------------------------------------------------------------------------------------------------!!
!!                                    !!Version 0.8.9!!                                                 !!
!!------------------------------------------------------------------------------------------------------!!

if temp_current_save_version < 00080900:
	if $wardrobeDefaultPagePref = 'savedOutfits':$wardrobeDefaultPagePref = 'default1'

	if nichTanyaKnown = 1:
		nichTanya['Known']               = nichTanyaKnown               & killvar 'nichTanyaKnown'
		nichTanya['Relationship']        = nichTanyaRelationship        & killvar 'nichTanyaRelationship'
		nichTanya['RelationshipState']   = nichTanyaRelationshipState   & killvar 'nichTanyaRelationshipState'
		nichTanya['RelationshipBreakup'] = nichTanyaRelationshipBreakup & killvar 'nichTanyaRelationshipBreakup'
		nichTanya['BF']                  = nichTanyaBF                  & killvar 'nichTanyaBF'
		nichTanya['Date']                = nichTanyaDate                & killvar 'nichTanyaDate'
		nichTanya['DateCounter']         = nichTanyaDateCounter         & killvar 'nichTanyaDateCounter'
		nichTanya['DateLast']            = nichTanyaDateLast            & killvar 'nichTanyaDateLast'
		nichTanya['DateShopping']        = nichTanyaDateShopping        & killvar 'nichTanyaDateShopping'
		nichTanya['FuckCounter']         = nichTanyaFuckCounter         & killvar 'nichTanyaFuckCounter'
		nichTanya['FuckLast']            = nichTanyaFuckLast            & killvar 'nichTanyaFuckLast'
		nichTanya['FuckToday']           = nichTanyaFuckToday           & killvar 'nichTanyaFuckToday'
		nichTanya['FuckPositions']       = nichTanyaFuckPositions       & killvar 'nichTanyaFuckPositions'
		nichTanya['Strapon']             = nichTanyaStrapon             & killvar 'nichTanyaStrapon'
		nichTanya['Dominance']           = nichTanyaDominance           & killvar 'nichTanyaDominance'
		nichTanya['Uni']                 = nichTanyaUni                 & killvar 'nichTanyaUni'
		nichTanya['UniStart']            = nichTanyaUniStart            & killvar 'nichTanyaUniStart'
		nichTanya['Room']                = nichTanyaRoom                & killvar 'nichTanyaRoom'
		nichTanya['PropSex']             = nichTanyaPropSex             & killvar 'nichTanyaPropSex'
		nichTanya['PropDate']            = nichTanyaPropDate            & killvar 'nichTanyaPropDate'

		killvar 'nichTanyaBFState'
		killvar 'nichTanyaFuckDom'
		killvar 'nichTanyaFuckSub'
		
	end
end


!!------------------------------------!!Version 0.8.9.1!!-----------------------------------------------!!

if temp_current_save_version < 00080901:
	if $wardrobeDefaultPagePref = 'savedOutfits':$wardrobeDefaultPagePref = 'default1'

	i = 0
	:loopboutiquepanties
		i += 1
		if boutique_panties[i] = 1:
			dynamic 'lusso_panties[i] = 1'
			dynamic 'lusso_pantiesS[i] = boutique_pantiesS[i]'
		end
		if i <= ARRSIZE('boutique_panties'): jump 'loopboutiquepanties'

	killvar 'boutique_panties'

	i = 0
	:loopboutiquebras
		i += 1
		if boutique_bras[i] = 1:
			dynamic 'lusso_bras[i] = 1'
			dynamic 'lusso_brasS[i] = boutique_brasS[i]'
		end
		if i <= ARRSIZE('boutique_bras'): jump 'loopboutiquebras'

	killvar 'boutique_bras'

	i = 0
	:loopcheappanties
		i += 1
		if cheap_panties[i] = 1:
			dynamic 'gm_panties[i] = 1'
			dynamic 'gm_pantiesS[i] = cheap_pantiesS[i]'
		end
		if i <= ARRSIZE('cheap_panties'): jump 'loopcheappanties'

	killvar 'cheap_panties'

	i = 0
	:loopcheapbras
		i += 1
		if cheap_bras[i] = 1:
			dynamic 'gm_bras[i] = 1'
			dynamic 'gm_brasS[i] = cheap_brasS[i]'
		end
		if i <= ARRSIZE('cheap_bras'): jump 'loopcheapbras'

	killvar 'cheap_bras'

	i = 0
	:loopexhibitionistpanties
		i += 1
		if exhibitionist_panties[i] = 1:
			dynamic 'salacious_panties[i] = 1'
			dynamic 'salacious_pantiesS[i] = exhibitionist_pantiesS[i]'
		end
		if i <= ARRSIZE('exhibitionist_panties'): jump 'loopexhibitionistpanties'

	killvar 'exhibitionist_panties'

	i = 0
	:loopexhibitionistbras
		i += 1
		if exhibitionist_bras[i] = 1:
			dynamic 'salacious_bras[i] = 1'
			dynamic 'salacious_brasS[i] = exhibitionist_brasS[i]'
		end
		if i <= ARRSIZE('exhibitionist_bras'): jump 'loopexhibitionistbras'

	killvar 'exhibitionist_bras'

	i = 0
	:loopsexshoppanties
		i += 1
		if sexshop_panties[i] = 1:
			dynamic 'eroto_panties[i] = 1'
			dynamic 'eroto_pantiesS[i] = sexshop_pantiesS[i]'
		end
		if i <= ARRSIZE('sexshop_panties'): jump 'loopsexshoppanties'

	killvar 'sexshop_panties'

	i = 0
	:loopsexshopbras
		i += 1
		if sexshop_bras[i] = 1:
			dynamic 'eroto_bras[i] = 1'
			dynamic 'eroto_brasS[i] = sexshop_brasS[i]'
		end
		if i <= ARRSIZE('sexshop_bras'): jump 'loopsexshopbras'

	killvar 'sexshop_bras'

	i = 0
	:loopsportpanties
		i += 1
		if sport_panties[i] = 1:
			dynamic 'danilovich_panties[i] = 1'
			dynamic 'danilovich_pantiesS[i] = sport_pantiesS[i]'
		end
		if i <= ARRSIZE('sport_panties'): jump 'loopsportpanties'

	killvar 'sport_panties'

	i = 0
	:loopsportbras
		i += 1
		if sport_bras[i] = 1:
			dynamic 'danilovich_bras[i] = 1'
			dynamic 'danilovich_brasS[i] = sport_brasS[i]'
		end
		if i <= ARRSIZE('sport_bras'): jump 'loopsportbras'

	killvar 'sport_bras'
	
	if metmira = 1: npc_known['A60'] = 1 & killvar 'metmira'

end


!!------------------------------------!!Version 0.8.8.2!!-----------------------------------------------!!

if temp_current_save_version < 00080903:
	if $wardrobeDefaultPagePref = 'savedOutfits': $wardrobeDefaultPagePref = 'default1'

	if mid($start_type,1,4) = 'city' or $start_type = 'uni':
		gs 'homes_properties', 'give_access', 'parents_home'
		SchoolAtestat = 1
	end

	if teh > 0:
		car['new_condition'] = tehcar
		car['current_condition'] = teh
		killvar 'teh'
		killvar 'tehcar'
	end

	i = 0
	:loopboys
		if $npc_rel_type[i] ! '':$npc_rel_type[i] = 'fuckbuddy'
		i += 1
		if i <= ARRSIZE('$boys'): jump 'loopboys'


	if traits > 0 or trait > 0:
		pcs_traits['nerd_status']   = traits['nerd_status']
		pcs_traits['alko_status']   = traits['alko_status']
		pcs_traits['alko_points']   = traits['alko_points']
		pcs_traits['buttslut_lvl']  = traits['buttslut_lvl']
		pcs_traits['buttslut_exp']  = traits['buttslut_exp']
		pcs_traits['nerd_lernHome'] = traits['nerd_lernHome']
		pcs_traits['nerd_points']   = traits['nerd_points']
		pcs_traits['nerd_lessons']  = traits['nerd_lessons']

		pcs_traits['cumeater']      = trait['cumeater']
		pcs_traits['commando_lvl']  = trait['commando_lvl']
		pcs_traits['commando_exp']  = trait['commando_exp']

		killvar 'traits'
		killvar 'trait'
	end
end




!!======================================================================================================!!
!!                                                                                                      !!
!!                                    !!Version 0.9.0!!                                                 !!
!!                                                                                                      !!
!!======================================================================================================!!

if temp_current_save_version < 00090000:
	if photography_job >0:
		photography['experience'] = photography_job & killvar 'photography_job'
	end

	! Deduplication in $fuckbuddy
	if arrsize('$fuckbuddy') > 0:
		! Loop over the array, check if the value already exists in the temp array. If not copy.
		i_fb = 0
		:loopFuckbuddies
			if arrpos('$_fuckbuddies', '$fuckbuddy[i_fb]') = -1:
				copyarr('$_fuckbuddies', '$fuckbuddy', i_fb, 1)
				i_fb +=1
			end
			if i_fb < arrsize('$fuckbuddy') : jump 'loopFuckbuddies'

		killvar '$fuckbuddy'

		$fuckbuddy = $_fuckbuddies
		killvar '$_fuckbuddies' & killvar 'i_fb'
	end
	
	if stat['virgin'] > 0:
		stat['think_virgin'] = stat['virgin']
		gs 'shortgs', 'remove_array_element', 'stat', 'virgin'
	end
end


!!------------------------------------!!Version 0.9.0.1!!-----------------------------------------------!!

if temp_current_save_version < 00090001:
	if futa > 0:               shemale =        futa   & killvar 'futa'
	if hidden_futa > 0: hidden_shemale = hidden_futa   & killvar 'hidden_futa'

end


!!------------------------------------!!Version 0.9.0.3!!-----------------------------------------------!!

if temp_current_save_version < 00090003:


	if $home['current'] ! '' and $home['bathroom'] = '':
		gs 'homes_properties', 'set_home',  $home['current']
	end

	!! Makeup Refactor
	if makeup['base'] < 1: makeup['base'] = 1
	makeup_routine_update_index = 1
	:makeup_routine_update_loop
	$temp_makeup_routine = str(dyneval('$result = $routine<<makeup_routine_update_index>>'))
	$temp_makeup_routine_name = str(dyneval('$result = $routine<<makeup_routine_update_index>>custname'))
	if $temp_makeup_routine ! '':
		makeup['routine_<<makeup_routine_update_index>>_makeup'] = mid($temp_makeup_routine,1,1)
		makeup['routine_<<makeup_routine_update_index>>_lipbalm'] = mid($temp_makeup_routine,2,1)
		makeup['routine_<<makeup_routine_update_index>>_lashes'] = mid($temp_makeup_routine,3,1)
		$makeup['routine_<<makeup_routine_update_index>>'] = $temp_makeup_routine
		$makeup['routine_<<makeup_routine_update_index>>_name'] = $temp_makeup_routine_name
		killvar '$routine<<makeup_routine_update_index>>'
		killvar '$routine<<makeup_routine_update_index>>custname'
	end
	makeup_routine_update_index += 1
	if makeup_routine_update_index <= 4: jump 'makeup_routine_update_loop'
	killvar 'makeup_routine_update_index' & killvar '$temp_makeup_routine' & killvar '$temp_makeup_routine_name'

!! Temporary functions, can be removed once all variables are migrated, workaround for SaveUpdater not transferring data or as a quick fix.
	if kosmetica > 0:			mc_inventory['cosmetics']			= kosmetica				& killvar 'kosmetica'
	if item_moisturizer > 0:	mc_inventory['moisturiser']			= item_moisturizer		& killvar 'item_moisturizer'
	if lipbalm > 0:				mc_inventory['lipbalm']				= lipbalm				& killvar 'lipbalm'
	if falselashesplain > 0:	mc_inventory['eyelash_fake']		= falselashesplain		& killvar 'falselashesplain'
	if falselashesmink > 0:		mc_inventory['eyelash_mink']		= falselashesmink		& killvar 'falselashesmink'
	if stanok > 0:				mc_inventory['razor']				= stanok				& killvar 'stanok'
	if krem > 0:				mc_inventory['suncream']			= krem					& killvar 'krem'
	if deodorant > 0:			mc_inventory['deodorant']			= deodorant				& killvar 'deodorant'
	if tampon > 0:				mc_inventory['tampons']				= tampon				& killvar 'tampon'
	if sanpad > 0:				mc_inventory['sanitary_pads']		= sanpad				& killvar 'sanpad'
	if shampoo > 0:				mc_inventory['shampoo']				= shampoo				& killvar 'shampoo'
	if hscrunch > 0:			mc_inventory['scrunchies']			= hscrunch				& killvar 'hscrunch'
	if hpingrip > 0:			mc_inventory['kirbygrips']			= hpingrip				& killvar 'hpingrip'
	if salfetka > 0:			mc_inventory['makeup_wipes']		= salfetka				& killvar 'salfetka'
	if mouthwash > 0:			mc_inventory['mouthwash']			= mouthwash				& killvar 'mouthwash'
	if greben > 0:				mc_inventory['comb']				= greben				& killvar 'greben'
	if kosmetitka > 0:			mc_inventory['travel_makeup']		= kosmetitka			& killvar 'kosmetitka'
	if compact_mirror > 0:		mc_inventory['travel_mirror']		= compact_mirror		& killvar 'compact_mirror'
	if eda > 0:					mc_inventory['food_basic']			= eda					& killvar 'eda'
	if edaD > 0:				mc_inventory['food_diet']			= edaD					& killvar 'edaD'
	if pranik > 0:				mc_inventory['food_biscuits']		= pranik				& killvar 'pranik'
	if buterbrod > 0:			mc_inventory['food_sandwich']		= buterbrod				& killvar 'buterbrod'
	if wine > 0:				mc_inventory['food_wine']			= wine					& killvar 'wine'
	if bottle > 0:				mc_inventory['food_water']			= bottle				& killvar 'bottle'
	if pregtest > 0: 			mc_inventory['pregnancy_test']		= pregtest				& killvar 'pregtest'
	if lekarstvo > 0:			mc_inventory['antibiotics']			= lekarstvo				& killvar 'lekarstvo'
	if vitamin > 0: 			mc_inventory['vitamins']			= vitamin				& killvar 'vitamin'
	if painkiller > 0:			mc_inventory['painkillers']			= painkiller			& killvar 'painkiller'
	if mosolmaz > 0:			mc_inventory['chaffing_cream']		= mosolmaz				& killvar 'mosolmaz'
	if lubri > 0:				mc_inventory['lubricant']			= lubri					& killvar 'lubri'
	if klisma > 0:				mc_inventory['enema_kit']			= klisma				& killvar 'klisma'
	if breastpump > 0:			mc_inventory['breast_pump']			= breastpump			& killvar 'breastpump'
	if bpbottles > 0:			mc_inventory['bottle_s']			= bpbottles				& killvar 'bpbottles'
	if bpbottlem > 0:			mc_inventory['bottle_m']			= bpbottlem				& killvar 'bpbottlem'
	if bpnipplebalm > 0:		mc_inventory['nipple_cream']		= bpnipplebalm			& killvar 'bpnipplebalm'
!	if Kandidoz > 0:			mc_inventory['thrush_meds']			= Kandidoz				& killvar 'Kandidoz' ! No clue what to do with this 
	if fatdel > 0:				mc_inventory['weight_loss_pill']	= fatdel				& killvar 'fatdel'
	if morning_after_pill > 0:	mc_inventory['morning_after_pill']	= morning_after_pill	& killvar 'morning_after_pill'
	if prezik > 0:				mc_inventory['equipped_condoms']	= prezik				& killvar 'prezik'
	if prezikcount > 0:			mc_inventory['normal_condoms']		= prezikcount			& killvar 'prezikcount'
	if preziksabo > 0: 			mc_inventory['sabotaged_condoms']	= preziksabo			& killvar 'preziksabo'
	if badprezik > 0:			mc_inventory['bad_condoms']			= badprezik				& killvar 'badprezik'
	if tabletki > 0:			mc_inventory['contraceptive_pill']	= tabletki				& killvar 'tabletki' 
	if siga > 0:				mc_inventory['cigarettes']			= siga					& killvar 'siga' 
	if fashmag > 0:				mc_inventory['mag_fashion']			= fashmag				& killvar 'fashmag' 
	if compmag > 0:				mc_inventory['mag_computer']		= compmag				& killvar 'compmag' 
	if biomag > 0:				mc_inventory['mag_biography']		= biomag				& killvar 'biomag' 
	if cookmag > 0:				mc_inventory['mag_cooking']			= cookmag				& killvar 'cookmag' 
	if knitmag > 0:				mc_inventory['mag_knitting']		= knitmag				& killvar 'knitmag' 
	if fitmag > 0:				mc_inventory['mag_fitness']			= fitmag				& killvar 'fitmag' 
	if umbrella > 0:			mc_inventory['umbrella']			= umbrella				& killvar 'umbrella'
	if pornMagazine > 0:		mc_inventory['mag_porn']			= pornMagazine			& killvar 'pornMagazine'
	if vibrator > 0:			mc_inventory['vibe']				= vibrator				& killvar 'vibrator'
	if analplug > 0:			mc_inventory['buttplug']			= analplug				& killvar 'analplug'
	if suction_dildo > 0:		mc_inventory['dildo_suction']		= suction_dildo			& killvar 'suction_dildo'
	if strapon > 0:				mc_inventory['strapon']				= strapon				& killvar 'strapon'
	if dildo > 0:				mc_inventory['dildo_small']			= dildo					& killvar 'dildo'
	if middildo > 0:			mc_inventory['dildo_normal']		= middildo				& killvar 'middildo'
	if largedildo > 0:			mc_inventory['dildo_big']			= largedildo			& killvar 'largedildo'
	if bigdildo > 0:			mc_inventory['dildo_large']			= bigdildo				& killvar 'bigdildo'
	if extradildo > 0:			mc_inventory['dildo_huge']			= extradildo			& killvar 'extradildo'
	if superdildo > 0:			mc_inventory['dildo_enormous']		= superdildo			& killvar 'superdildo'
	if maddildo > 0:			mc_inventory['dildo_gigantic']		= maddildo				& killvar 'maddildo'
	if skak > 0:				mc_inventory['skipping_rope']		= skak					& killvar 'skak'
	if obruch > 0:				mc_inventory['hula_hoop']			= obruch				& killvar 'obruch'
	if bookyog > 0:				mc_inventory['book_yoga']			= bookyog				& killvar 'bookyog'
	if konki > 0:				mc_inventory['ice_skates']			= konki					& killvar 'konki'
	if pcs_ski_owned > 0:		mc_inventory['ski'] 				= pcs_ski_owned			& killvar 'pcs_ski_owned'
	if refillable_bottle > 0:	mc_inventory['refill_bottle']		= refillable_bottle		& killvar 'refillable_bottle'
	if fairy > 0:				mc_inventory['dish_soap']			= fairy 				& killvar 'fairy'
	if poroshok > 0:			mc_inventory['laundry_soap']		= poroshok 				& killvar 'poroshok'
	if cltarelka > 0:			mc_inventory['dish_plates']			= cltarelka 			& killvar 'cltarelka'
	if tkan > 0:				mc_inventory['sewing_fabric']		= tkan 					& killvar 'tkan'
	if sewing_kit > 0:			mc_inventory['sewing_kit']			= sewing_kit			& killvar 'sewing_kit'
	if TV = 1:					mc_inventory['tech_tv']				= 1						& killvar 'TV'
	if TV >= 2:					mc_inventory['plasma_tv']			= 1						& killvar 'TV'

	if mc_inventory['tech_tv'] >= 2:	mc_inventory['plasma_tv']	= 1 & mc_inventory['tech_tv'] = 1

	if komp > 0:			mc_inventory['tech_computer']			= komp			& killvar 'komp'
	if GameCD2 > 0:			mc_inventory['tech_game_ds']			= GameCD2		& killvar 'GameCD2'
	if posudomashina > 0:	mc_inventory['tech_dishwasher']			= posudomashina	& killvar 'posudomashina'
	if stiralka > 0:		mc_inventory['tech_washing_machine']	= stiralka		& killvar 'stiralka'
	if zenit > 0:			mc_inventory['tech_camera']				= zenit			& killvar 'zenit'
	if minifoto > 0:		mc_inventory['tech_hidden_cam']			= minifoto		& killvar 'minifoto'
	if webcamera > 0:		mc_inventory['tech_webcam']				= webcamera		& killvar 'webcamera'
	if ms_pill > 0:			mc_inventory['meds_morning_sick']		= ms_pill		& killvar 'ms_pill'
	if preg_ball > 0:		mc_inventory['preg_ball']				= preg_ball		& killvar 'preg_ball'
	if preg_brace > 0:		mc_inventory['preg_brace']				= preg_brace	& killvar 'preg_brace'
	if preg_pillow > 0:		mc_inventory['preg_pillow']				= preg_pillow	& killvar 'preg_pillow'
!	if  > 0:		mc_inventory['']		=	&killvar ''

	!! Preferences update.
	killvar 'npc_preferences'
	pref_update_index = 1
	:update_standard_preferences_loop
		gs 'npc_standard_preferences', 'A<<pref_update_index>>'
		pref_update_index += 1
	if pref_update_index <= 263: jump 'update_standard_preferences_loop'

	killvar 'pref_update_index'

	!! policeQW
	!! policeQW_courtletter_dates[]
	!! policeQW_courtletter_subjects[]
	!! policeQW_courthearing_dates[]
	!! policeQW_courthearing_subjects[]

	if shplft_booked		> 0:	policeQW['shoplift_booked']			= shplft_booked			& killvar 'shplft_booked'
	if prst_booked			> 0:	policeQW['prostitution_booked']		= prst_booked			& killvar 'prst_booked'
	if shplft_counter		> 0:	policeQW['shoplift_counter']		= shplft_counter		& killvar 'shplft_counter'
	if prst_counter			> 0:	policeQW['prostitution_counter']	= prost_counter			& killvar 'prst_counter'
	if prst_bribe			> 0:	policeQW['prostitution_bribe']		= prst_bribe			& killvar 'prst_bribe'
	if shplft_value			> 0:	policeQW['shoplift_value']			= shplft_value			& killvar 'shplft_value'
	killvar 'book_response'

	if bookingofficer_rel	> 0:	policeQW['bookingofficer_rel']		= bookingofficer_rel	& killvar 'bookingofficer_rel'
	if toldonguard			> 0:	policeQW['toldonguard']				= toldonguard			& killvar 'toldonguard'

	if courtletter_date > 0:
		policeQW_courtletter_dates[0] = courtletter_date & killvar 'courtletter_date'
		if shplft_tmp > 0:
			$policeQW_courtletter_subjects[0] = 'shoplift_<<$detec_type>>'
		else
			$policeQW_courtletter_subjects[0] = 'prostitution_<<$detec_type>>'
		end
	end

	if courthearing_date > 0:
		policeQW_courthearing_dates[0] = courthearing_date & killvar 'courthearing_date'
		if shplft_tmp > 0:
			$policeQW_courthearing_subjects[0] = 'shoplift_<<$detec_type>>'
		else
			$policeQW_courthearing_subjects[0] = 'prostitution_<<$detec_type>>'
		end
	end

	killvar 'shplft_tmp'
	killvar 'prst_tmp'
	killvar '$detec_type'


	if legal_fine > 0: policeQW['legal_fine'] = legal_fine & killvar 'legal_fine'
	
	
	!! Sleep update.
	killvar 'varsleep'

	if bedPanty       > 0: sleepVars['bedPanty']             = bedPanty       & killvar 'bedPanty'
	if bedAnal        > 0: sleepVars['bedAnal']              = bedAnal        & killvar 'bedAnal'
	if bedVibrator    > 0: sleepVars['bedVibrator']          = bedVibrator    & killvar 'bedVibrator'
	if cheatVib       > 0: sleepVars['cheatVib']             = cheatVib       & killvar 'cheatVib'
	if notathomesleep > 0: sleepVars['notathomesleep']       = notathomesleep & killvar 'notathomesleep'
	if Enable_nodream > 0: sleepVars['cheat_nodream_chance'] = Enable_nodream & killvar 'Enable_nodream'
	
	sleepVars['events_active'] = 1
	sleepVars['dreams_active'] = 1

	if budilnikOn       > 0: alarmVars['alarmOn']       = budilnikOn    & killvar 'budilnikOn'
	if timer            > 0: alarmVars['timerH']        = timer         & killvar 'timer'
	if timerM           > 0: alarmVars['timerM']        = timerM        & killvar 'timerM'
	if timerEnd         > 0: alarmVars['timerEndH']     = timerEnd      & killvar 'timerEnd'
	if timerEndM        > 0: alarmVars['timerEndM']     = timerEndM     & killvar 'timerEndM'
	if alarm_holiday    > 0: alarmVars['alarm_holiday'] = alarm_holiday & killvar 'alarm_holiday'

	!! Pav shared apartment update
	if updated_pav_shared_apt = 0:
		npctemp = 264
		$npc_dna['A<<npctemp>>'] = '1290130369 1043654233 5049908515 3153411713 0721993774 2486220839 0288719745'
		$npc_firstname['A<<npctemp>>'] = 'Yakov'
		$npc_nickname['A<<npctemp>>'] = 'Yakov'
		$npc_lastname['A<<npctemp>>'] = ''
		$npc_usedname['A<<npctemp>>'] = 'Yakov'
		npc_dob['A<<npctemp>>'] = 19961215
		$npc_notes['A<<npctemp>>'] = 'Yakov is a fitness-focused sports enthusiast with blond hair and a tanned complexion.'
		npc_gender['A<<npctemp>>'] = 0
		
		gs 'npcstaticdefaults', 'defaults'
		
		$npc_thdick['A<<npctemp>>'] = 'well proportioned'
		npc_dick['A<<npctemp>>'] = 14
		npc_sexskill['A<<npctemp>>'] = 1
		$npc_occupation['A<<npctemp>>'] = 'personal_trainer'
		npc_style['A<<npctemp>>'] = 5
		
		
		npctemp = 265
		$npc_dna['A<<npctemp>>'] = '1085950303 4348731991 6618084127 9067996922 8669859044 9431283301 0673267503'
		$npc_firstname['A<<npctemp>>'] = 'Nestor'
		$npc_nickname['A<<npctemp>>'] = 'Nestor'
		$npc_lastname['A<<npctemp>>'] = ''
		$npc_usedname['A<<npctemp>>'] = 'Nestor'
		npc_dob['A<<npctemp>>'] = 19930127
		$npc_notes['A<<npctemp>>'] = 'Nestor is a gopnik with a reputation for being rude and aggressive. His motto seems to be "the younger, the better," which can be concerning. He has a tough demeanor, with dark hair and dark skin, giving off an intimidating presence.'
		npc_gender['A<<npctemp>>'] = 0
		
		gs 'npcstaticdefaults', 'defaults'
		
		$npc_thdick['A<<npctemp>>'] = 'massive'
		npc_dick['A<<npctemp>>'] = 22
		npc_sexskill['A<<npctemp>>'] = 1
		npc_style['A<<npctemp>>'] = 2
		
		
		
		npctemp = 266
		$npc_dna['A<<npctemp>>'] = '5654106058 6395942483 3363408422 7113656738 1111862818 8859290040 7960339191'
		$npc_firstname['A<<npctemp>>'] = 'Oleg'
		$npc_nickname['A<<npctemp>>'] = 'Oleg'
		$npc_lastname['A<<npctemp>>'] = ''
		$npc_usedname['A<<npctemp>>'] = 'Oleg'
		npc_dob['A<<npctemp>>'] = 19950712
		$npc_notes['A<<npctemp>>'] = 'Oleg is a shy, young-looking guy with thick glasses, a slim frame, and very pale skin.'
		npc_gender['A<<npctemp>>'] = 0
		
		gs 'npcstaticdefaults', 'defaults'
		
		$npc_thdick['A<<npctemp>>'] = 'thick'
		npc_dick['A<<npctemp>>'] = 17
		npc_sexskill['A<<npctemp>>'] = 1
		$npc_occupation['A<<npctemp>>'] = 'programmer'
		npc_style['A<<npctemp>>'] = 3
		updated_pav_shared_apt = 1
	end

	if sp_rel                  > 0: npc_rel['A264']             = sp_rel                  &killvar 'sp_rel'
	if gp_rel                  > 0: npc_rel['A265']             = gp_rel                  &killvar 'gp_rel'
	if nd_rel                  > 0: npc_rel['A266']             = nd_rel                  &killvar 'nd_rel'
	if nd_hj                   > 0: oleg_hj                     = nd_hj                   &killvar 'nd_hj'
	if nd_bj                   > 0: oleg_bj                     = nd_bj                   &killvar 'nd_bj'
	if nd_bjFail               > 0: oleg_bjFail                 = nd_bjFail               &killvar 'nd_bjFail'
	if nd_bjDeep               > 0: oleg_bjDeep                 = nd_bjDeep               &killvar 'nd_bjDeep'
	if nd_bjFailPuke           > 0: oleg_bjFailPuke             = nd_bjFailPuke           &killvar 'nd_bjFailPuke'
	if nd_bjFailFaint          > 0: oleg_bjFailFaint            = nd_bjFailFaint          &killvar 'nd_bjFailFaint'
	if nd_swall                > 0: oleg_swall                  = nd_swall                &killvar 'nd_swall'
	if nd_vagCumInsideUnwanted > 0: oleg_vagCumInsideUnwanted   = nd_vagCumInsideUnwanted &killvar 'nd_vagCumInsideUnwanted'
	if nd_vag                  > 0: oleg_vag                    = nd_vag                  &killvar 'nd_vag'
	if nd_vagCumInside         > 0: oleg_vagCumInside           = nd_vagCumInside         &killvar 'nd_vagCumInside'
	if nd_anal                 > 0: oleg_anal                   = nd_anal                 &killvar 'nd_anal'
	if nd_analCumInside        > 0: oleg_analCumInside          = nd_analCumInside        &killvar 'nd_analCumInside'
	if nd_vagCumInsideUnwanted > 0: oleg_vagCumInsideUnwanted   = nd_vagCumInsideUnwanted &killvar 'nd_vagCumInsideUnwanted'
	if nd_piss                 > 0: oleg_piss                   = nd_piss                 &killvar 'nd_piss'
	if nd_doPornpos            > 0: oleg_doPornpos              = nd_doPornpos            &killvar 'nd_doPornpos'
	if nd_pornPos              > 0: oleg_pornPos                = nd_pornPos              &killvar 'nd_pornPos'
	if gp_bj                   > 0: nestor_bj                   = gp_bj                   &killvar 'gp_bj'
	if gp_bjFail               > 0: nestor_bjFail               = gp_bjFail               &killvar 'gp_bjFail'
	if gp_bjDeep               > 0: nestor_bjDeep               = gp_bjDeep               &killvar 'gp_bjDeep'
	if gp_bjFailPuke           > 0: nestor_bjFailPuke           = gp_bjFailPuke           &killvar 'gp_bjFailPuke'
	if gp_bjFailFaint          > 0: nestor_bjFailFaint          = gp_bjFailFaint          &killvar 'gp_bjFailFaint'
	if gp_swall                > 0: nestor_swall                = gp_swall                &killvar 'gp_swall'
	if gp_vagCumInsideUnwanted > 0: nestor_vagCumInsideUnwanted = gp_vagCumInsideUnwanted &killvar 'gp_vagCumInsideUnwanted'
	if gp_vag                  > 0: nestor_vag                  = gp_vag                  &killvar 'gp_vag'
	if gp_vagCumInside         > 0: nestor_vagCumInside         = gp_vagCumInside         &killvar 'gp_vagCumInside'
	if gp_anal                 > 0: nestor_anal                 = gp_anal                 &killvar 'gp_anal'
	if gp_analCumInside        > 0: nestor_analCumInside        = gp_analCumInside        &killvar 'gp_analCumInside'
	if gp_vagCumInsideUnwanted > 0: nestor_vagCumInsideUnwanted = gp_vagCumInsideUnwanted &killvar 'gp_vagCumInsideUnwanted'
	if gp_doPornpos            > 0: nestor_doPornpos            = gp_doPornpos            &killvar 'gp_doPornpos'
	if gp_pornPos              > 0: nestor_pornPos              = gp_pornPos              &killvar 'gp_pornPos'
	if sp_bj                   > 0: yakov_bj                    = sp_bj                   &killvar 'sp_bj'
	if sp_bjFail               > 0: yakov_bjFail                = sp_bjFail               &killvar 'sp_bjFail'
	if sp_bjDeep               > 0: yakov_bjDeep                = sp_bjDeep               &killvar 'sp_bjDeep'
	if sp_bjFailPuke           > 0: yakov_bjFailPuke            = sp_bjFailPuke           &killvar 'sp_bjFailPuke'
	if sp_bjFailFaint          > 0: yakov_bjFailFaint           = sp_bjFailFaint          &killvar 'sp_bjFailFaint'
	if sp_swall                > 0: yakov_swall                 = sp_swall                &killvar 'sp_swall'
	if sp_vagCumInsideUnwanted > 0: yakov_vagCumInsideUnwanted  = sp_vagCumInsideUnwanted &killvar 'sp_vagCumInsideUnwanted'
	if sp_vag                  > 0: yakov_vag                   = sp_vag                  &killvar 'sp_vag'
	if sp_vagCumInside         > 0: yakov_vagCumInside          = sp_vagCumInside         &killvar 'sp_vagCumInside'
	if sp_anal                 > 0: yakov_anal                  = sp_anal                 &killvar 'sp_anal'
	if sp_analCumInside        > 0: yakov_analCumInside         = sp_analCumInside        &killvar 'sp_analCumInside'
	if sp_vagCumInsideUnwanted > 0: yakov_vagCumInsideUnwanted  = sp_vagCumInsideUnwanted &killvar 'sp_vagCumInsideUnwanted'
	if sp_doPornpos            > 0: yakov_doPornpos             = sp_doPornpos            &killvar 'sp_doPornpos'
	if sp_pornPos              > 0: yakov_pornPos               = sp_pornPos              &killvar 'sp_pornPos'
	if sp_hj                   > 0: yakov_hj                    = sp_hj                   &killvar 'sp_hj'
	if sp_dildo                > 0: yakov_dildo                 = sp_dildo                &killvar'sp_dildo'
	
	if oleg_analCumInside           > 0: oleg_cumAnal                  = oleg_analCumInside
	if oleg_analCumInside           > 0: oleg_analCumInside           -= oleg_analCumInsideUnwanted
	if oleg_analCumInsideUnwanted   > 0: oleg_analCumInsideUnwanted   -= oleg_analCumInside
	if nestor_analCumInside         > 0: nestor_cumAnal                = nestor_analCumInside
	if nestor_analCumInside         > 0: nestor_analCumInside         -= nestor_analCumInsideUnwanted
	if nestor_analCumInsideUnwanted > 0: nestor_analCumInsideUnwanted -= nestor_analCumInside
	if yakov_analCumInside          > 0: yakov_cumAnal                 = yakov_analCumInside
	if yakov_analCumInside          > 0: yakov_analCumInside          -= yakov_analCumInsideUnwanted
	if yakov_analCumInsideUnwanted  > 0: yakov_analCumInsideUnwanted  -= yakov_analCumInside
	if oleg_vagCumInside            > 0: oleg_cumVag                   = oleg_vagCumInside
	if oleg_vagCumInside            > 0: oleg_vagCumInside            -= oleg_vagCumInsideUnwanted
	if oleg_vagCumInsideUnwanted    > 0: oleg_vagCumInsideUnwanted    -= oleg_vagCumInside
	if nestor_vagCumInside          > 0: nestor_cumVag                 = nestor_vagCumInside
	if nestor_vagCumInside          > 0: nestor_vagCumInside          -= nestor_vagCumInsideUnwanted
	if nestor_vagCumInsideUnwanted  > 0: nestor_vagCumInsideUnwanted  -= nestor_vagCumInside
	if yakov_vagCumInside           > 0: yakov_cumVag                  = yakov_vagCumInside
	if yakov_vagCumInside           > 0: yakov_vagCumInside           -= yakov_vagCumInsideUnwanted
	if yakov_vagCumInsideUnwanted   > 0: yakov_vagCumInsideUnwanted   -= yakov_vagCumInside

	killvar 'gp_horny'
	killvar 'sp_horny'
	killvar 'nd_horny'
	killvar 'milkPause'
	killvar 'gp_cumVol'
	killvar 'sp_cumVol'
	killvar 'nd_cumVol'

	!! Prostitution blocking variable changes
	prostitute['wl_block'] = prostitute['blocked']
	prostitute['full_block'] = 0

	!! New variables to manage a homeless Sveta and travel.
	gs 'homes_properties_attr'
	if accessible_property['accessible_home_count'] < 1: 
		gs 'homes_properties', 'set_homeless'
	else
		gs 'homes_properties', 'set_home', $home['current']
	end
end

!!------------------------------------!!Version 0.9.1.1!!-----------------------------------------------!!
if temp_current_save_version < 00090101:

	if pornstudio > 1: pornstudio = 1

	if nichTanya['RelationshipBreakup'] ! 0 or nichTanya['RelationshipState'] ! 0:
		if nichTanya['RelationshipBreakup'] = 1: nichTanya['Relationship'] = 2
		if nichTanya['RelationshipState'] = 10: nichTanya['Relationship'] = 1
		if nichTanya['RelationshipState'] = 20: nichTanya['Relationship'] = 3
		if nichTanya['RelationshipState'] = 1000: nichTanya['Relationship'] = 4
		if nichTanya['RelationshipState'] = 1010: nichTanya['Relationship'] = 5
		if nichTanya['RelationshipState'] = 1011: nichTanya['Relationship'] = 6
		gs 'shortgs', 'remove_array_element', 'nichTanya','RelationshipBreakup'
		gs 'shortgs', 'remove_array_element', 'nichTanya','RelationshipState'
	end

	killvar '_n_timer'

	if $theme['name'] = '':
		if night_mode = 1:
			gs 'themes', 'set_black'
		elseif night_mode = 2:
			gs 'themes', 'set_gray'
		elseif night_mode = 3:
			gs 'themes', 'set_white'
		elseif night_mode = 4:
			gs 'themes', 'set_custom'
		else
			gs 'themes', 'set_dynamic'
		end

		if $theme['type'] = 'static':
			gs 'themes', 'apply_static'
		else
			if $location_type = 'public_outdoors' or $location_type = 'secluded' or $location_type = 'event_outdoors':
				gs 'themes', 'apply_dynamic', 'outdoors'
			else
				gs 'themes', 'apply_dynamic', 'indoors'
			end
		end

		killvar 'night_mode'
		killvar '$bgcolor'
		killvar '$bgcolor1'
		killvar '$bgcolor2'
		killvar '$bgcolor3'
		killvar '$fgcolor'
		killvar '$fgcolor1'
	end
end

!!------------------------------------!!Version 0.9.2.0!!-----------------------------------------------!!
if temp_current_save_version < 00090200:

	! Body update -- By Anjuna
	if genbsize			! 0:		pcs_mass['bust_gen']		= genbsize		& killvar 'genbsize'
	if nbsize			! 0:		pcs_mass['bust']			= nbsize		& killvar 'nbsize'

	if pcs_mass['butt_gen'] = 0:
		pcs_mass['butt_gen']	= 20
		pcs_mass['butt']		= (20 * salo) / 60
	end
	if salo ! 0:
		pcs_mass['body'] = salo - pcs_mass['butt']
		killvar 'salo'
	end

	if vofat			! 0:		bodyVars['vofat']			= vofat				& killvar 'vofat'
	if vhips			! 0:		bodyVars['vhips']			= vhips				& killvar 'vhips'
	if wratio			! 0:		bodyVars['wratio']			= wratio			& killvar 'wratio'
	if bratio			! 0:		bodyVars['bratio']			= bratio			& killvar 'bratio'
	if hratio			! 0:		bodyVars['hratio']			= hratio			& killvar 'hratio'
	if magicf2b			! 0:		bodyVars['bust_magic']		= magicf2b			& killvar 'magicf2b'
	if silicone_butt	! 0:		bodyVars['butt_silicone']	= silicone_butt		& killvar 'silicone_butt'
	if silicone			! 0:		bodyVars['bust_silicone']	= silicone			& killvar 'silicone'
	if butt_cheat		! 0:		bodyVars['butt_cheat']		= butt_cheat		& killvar 'butt_cheat'

	if pcs_mass['bust_message'] = 0: pcs_mass['bust_message'] = pcs_mass['bust']
	if pcs_mass['butt_message'] = 0: pcs_mass['butt_message'] = pcs_mass['butt']

	!!update_clothing
	!! Do not think we need this anymore. Since pcs_hips should now be basically unchanged.
	!!gs 'tailor2'
	
	!! Typo Correction -- By Derryth_Love
	if katjaQW['knows_masterbation'] > 0:
		katjaQW['knows_masturbation'] = katjaQW['knows_masterbation']
		gs 'shortgs', 'remove_array_element', 'katjaQW', 'knows_masterbation'
	end

	!! body_structure introduction and variable migration:
	if $bmi_desc	! '':		$bodyVars['bmi_desc']	= $bmi_desc		& killvar '$bmi_desc'
	if $body		! '':		$bodyVars['desc']		= $body			& killvar '$body'

	!! Migration of alterstrtimg and start_type
	if arrsize('start_type') ! 4 and alterstrtimg ! 0:
		if mid($start_type[0], 1, 2) = 'sg':
			$temp_st[0] = 'sg'
		elseif mid($start_type[0], 1, 3) = 'uni':
			$temp_st[0] = 'uni'
		else
			$temp_st[0] = 'city'
		end

		$temp_st[1] = $start_type[1]
		if $temp_st[1] = '': $temp_st[1] = 'magic'

		if alterstrtimg >= 8 and alterstrtimg <= 11:
			$temp_st[2] = 'nerd'
			if alterstrtimg = 8:
				$temp_st[3] = 'nerdqueen'
			elseif alterstrtimg = 9:
				$temp_st[3] = 'goodstudent'
			elseif alterstrtimg = 10:
				$temp_st[3] = 'computergeek'
			else
				$temp_st[3] = 'chessplayer'
			end
		elseif alterstrtimg >= 12 and alterstrtimg <= 15:
			$temp_st[2] = 'jock'
			if alterstrtimg = 12:
				$temp_st[3] = 'volleyball'
			elseif alterstrtimg = 13:
				$temp_st[3] = 'dancer'
			elseif alterstrtimg = 14:
				$temp_st[3] = 'runner'
			else
				$temp_st[3] = 'football'
			end
		elseif alterstrtimg >= 16 and alterstrtimg <= 17:
			$temp_st[2] = 'cool'
			if alterstrtimg = 16:
				$temp_st[3] = 'socialite'
			elseif alterstrtimg = 17:
				$temp_st[3] = 'beautiful'
			end
		elseif alterstrtimg >= 18 and alterstrtimg <= 21:
			$temp_st[2] = 'gopnik'
			if alterstrtimg = 18:
				$temp_st[3] = 'gopnikstart'
			elseif alterstrtimg = 19:
				$temp_st[3] = 'troublemaker'
			elseif alterstrtimg = 20:
				$temp_st[3] = 'vitekgf'
			else
				$temp_st[3] = 'alternative'
			end
		elseif alterstrtimg >= 22 and alterstrtimg <= 28:
			$temp_st[2] = 'outcast'
			if alterstrtimg = 22:
				$temp_st[3] = 'friendless'
			elseif alterstrtimg = 23:
				$temp_st[3] = 'uglyduckling'
			elseif alterstrtimg = 24:
				$temp_st[3] = 'goodgirl'
			elseif alterstrtimg = 25:
				$temp_st[3] = 'slut'
			else
				$temp_st[3] = 'goth'
			end
		elseif alterstrtimg = 31:
			$temp_st[2] = 'cool'
			$temp_st[3] = 'anorexic'
		else
			$temp_st[2] = 'outcast'
			$temp_st[3] = 'friendless'
		end

		killvar 'start_type'
		killvar 'alterstrtimg'

		$start_type['loc']		= $temp_st[0]
		$start_type['magic']	= $temp_st[1]
		$start_type['group']	= $temp_st[2]
		$start_type['cat']		= $temp_st[3]

		killvar 'temp_st'
	end
	if $start_type['loc']	= '':	$start_type['loc']		= 'city'
	if $start_type['magic']	= '':	$start_type['magic']	= 'magic'
	if $start_type['group'] = '':	$start_type['group']	= 'outcast'
	if $start_type['cat']	= '':	$start_type['cat']		= 'friendless'

	!update fashionista to fashionista_dress\
	if arrsize('fashionista') > 0:
		:loopfashionista2
			if fashionista[i] = 1:
				fashionista_dress[i] = 1
				fashionista_dress_h[i] = fashionista_h[i]
				fashionista_dress_b[i] = fashionista_b[i]
				fashionista_dress_s[i] = fashionista_s[i]
			end
			i += 4
		if i <= 200:jump 'loopfashionista2'
		killvar 'fashionista'
		killvar 'fashionista_h'
		killvar 'fashionista_b'
		killvar 'fashionista_s'
	end


	! Transport update
	if arrsize('transportVars') < 70:
		killvar 'transportVars'
		gs 'transport_functions', 'init_all'
	end
	if Trainpass_day ! 0:	transportVars['trainpass_day'] = Trainpass_day	& killvar 'Trainpass_day'
	killvar 'train_event'

	! Therapist
	if therapist_key[1] > 0:	therapistQW['hotel_day'] = therapist_key[1]	& killvar 'therapist_key', 1
	if therapist_key > 0:		therapistQW['hotel_key'] = therapist_key	& killvar 'therapist_key'

	! Ballet Dorm
	if arrsize('homes') = 16:	$homes[] = 'hotel_therapist'
	if $home_name['hotel_therapist'] = '':
		$home_name['hotel_therapist'] = 'hotel_therapist'
		$home_name['17'] = 'hotel_therapist'
	end
	if arrsize('homes') = 17:	$homes[] = 'pushkin_ballet_dorm'
	if $home_name['pushkin_ballet_dorm'] = '':
		$home_name['pushkin_ballet_dorm'] = 'pushkin_ballet_dorm'
		$home_name['18'] = 'pushkin_ballet_dorm'
	end

	! Call Trace update
	killvar 'call_trace_enabled'
	killvar 'call_trace_shown'
	killvar 'call_trace_manual'
	killvar '$call_trace'
end


!!------------------------------------!!Version 0.9.3.0!!-----------------------------------------------!!


killvar 'temp_current_save_version'
gs 'saveg'

--- saveupdater ---------------------------------

