# npcgeneratec

!! This file requires the sex, name and age for the npc to be generated
!! You can also set their approx. home location
!! All data produced is random so if you need a specific value you will have to overwrite it

!! npcgen_lastrun is a flag to help track whether npcgeneratec or npcpreservec has been run last
!! npcgeneratec is 1
!! npcpreservec is 2
npcgen_lastrun = 1

!! sets sex, 0 male, 1 female, 2 female herm, 3 male herm
npctempgsex = ARGS[0]

!! Name for npc, can just be rapist or shop assistant, etc
$npctempgn[0] = $ARGS[1]

!! npc age
npctempgage = ARGS[2]

!! npc home location area
!! 1 - Pavlovsk Residential Area
!! 2 - Student dorms in the city
!! 3 - St. Petersburg Residential Area
!! 4 - St. Petersburg City Center
temp_location = ARGS[3]


dont_know_npc_name = ARGS[4]

!! For example
!! gs 'npcgeneratec', 0, 'stranger', rand(18,45), 3, 1
!! Which would generate a male named stranger between ages of 18 and 45 who lives in the St. Petersburg Residential Area who will be remembered as ''stranger''


if temp_location = 0:
	if $region = 'city':
		temp_location = rand(3,4)
	elseif $region = 'pav':
		temp_location = 1
	end
end

!! This sets up a newly generated index number by overwriting the first blank number
!! The first check is to see if array 0 in the cleanup list is available and overwrites it if it is free
if mid($cemptyarray[0],1,1) = 'C':
	$npclastgenerated = $cemptyarray[0]
	killvar '$cemptyarray', 0
else
	:npcgencsanityloop
	i = 0
	$npclastgenerated = 'C' + '<<carraynumber>>'
	$npctemparrc = 'C' + '<<(carraynumber)-(1)>>'
	if $npc_perstype[$npctemparrc] = '' and carraynumber > 0:
		carraynumber -= 1
		i = 1
	elseif $npc_perstype[$npclastgenerated] = '':
		i = 0
	else
		carraynumber += 1
		i = 1
	end
	if i = 1: jump 'npcgencsanityloop'
end
carraynumber += 1

$npc_index[$npclastgenerated] = $npclastgenerated

!! Random birthday based on age given
npctempc1[1] = year - npctempgage
npctempc1[2] = rand(1,12)
if npctempc1[2] = 4 or npctempc1[2] = 6 or npctempc1[2] = 9 or npctempc1[2] = 11:
	npctempc1[3] = rand(1,30)
elseif npctempc1[2] = 1 or npctempc1[2] = 3 or npctempc1[2] = 5 or npctempc1[2] = 7 or npctempc1[2] = 8 or npctempc1[2] = 10  or npctempc1[2] = 12:
	npctempc1[3] = rand(1,31)
elseif ((npctempc1[1] mod 4 = 0) and (npctempc1[1] mod 100 ! 0)) or (npctempc1[1] mod 400 = 0):
	npctempc1[3] = rand(1,29)
else
	npctempc1[3] = rand(1,28)
end
npc_dob[$npclastgenerated] = npctempc1[1] * 10000
npc_dob[$npclastgenerated] += (npctempc1[2] * 100)
npc_dob[$npclastgenerated] += npctempc1[3]
! {we save the unique number of the npc, to be able to get the index of the array via arrpos}

!! Sets a seed value for the stat randomization as well as calculate chance of virginity
if npctempgage < 18:
	npctempc2[0] = 30
	npctempc2[1] = rand(0,20)
else
	npctempc2[0] = 50
	npctempc2[1] = rand(19,24)
end

!! Flag for virginity
if npctempc2[1] < 20:
	npc_sexskill[$npclastgenerated] = 0
end


!! Fill details about their sex such as cock and breast size
if npctempgsex = 0:
	! {Male}
	gs 'npcrnamefile', 'rusMale'
	gs 'npcgenext', 'dick'
	npc_gender[$npclastgenerated] = 0
	npc_spermpot[$npclastgenerated] = 10000
	$npc_thdick[$npclastgenerated] = $npctempgn[4]
	npc_dick[$npclastgenerated] = npctempgn[5]
	$npc_notes[$npclastgenerated] = 'A male.'
	npc_bust[$npclastgenerated] = 0
	lover_picrand[$npclastgenerated] = rand(1,30)
elseif npctempgsex = 1:
	! {Female}
	gs 'npcrnamefile', 'rusFemale'
	npc_gender[$npclastgenerated] = 1
	npc_spermpot[$npclastgenerated] = -1
	$npc_thdick[$npclastgenerated] = 'clitoris'
	npc_dick[$npclastgenerated] = rand(0,1)
	$npc_notes[$npclastgenerated] = 'A female.'
	!!0 - 60  curve around 22,5 (C/D cups)
	npc_bust[$npclastgenerated] = rand(0,15) + rand(0,15) + rand(0,15) & if rand(1,10) = 1: npc_bust[$npclastgenerated] += rand(0,15)
elseif npctempgsex = 2:
	! {HermFemale}
	gs 'npcrnamefile', 'rusFemale'
	gs 'npcgenext', 'dick'
	npc_gender[$npclastgenerated] = 1
	npc_spermpot[$npclastgenerated] = -1
	$npc_thdick[$npclastgenerated] = 'clitoris'
	npc_dick[$npclastgenerated] = npctempgn[5]
	$npc_notes[$npclastgenerated] = 'A female Hermaphrodite.'
	!!0 - 60  curve around 22,5 (C/D cups)
	npc_bust[$npclastgenerated] = rand(0,15) + rand(0,15) + rand(0,15)
else
	! {HermMale}
	gs 'npcrnamefile', 'rusMale'
	gs 'npcgenext', 'dick'
	npc_gender[$npclastgenerated] = 0
	npc_spermpot[$npclastgenerated] = 10000
	$npc_thdick[$npclastgenerated] = $npctempgn[4]
	npc_dick[$npclastgenerated] = npctempgn[5]
	$npc_notes[$npclastgenerated] = 'A male Hermaphrodite.'
	npc_bust[$npclastgenerated]= rand(0,10)
end

!!	$npc_dick_desc is set here
!!	this variable is to set a shorthand method of checking dick size without looking for specific numbers
!!	it is organized by length and then ascending girth

!! short dicks
if npc_dick[$npclastgenerated] < 9:
	if $npc_thdick[$npclastgenerated] = 'skinny' or $npc_thdick[$npclastgenerated] = 'slim':
	
		$npc_dick_desc[$npclastgenerated] = 'tiny'
		
	elseif $npc_thdick[$npclastgenerated] = 'well proportioned' or $npc_thdick[$npclastgenerated] = 'thicker than average':
	
		$npc_dick_desc[$npclastgenerated] = 'short'
		
	elseif $npc_thdick[$npclastgenerated] = 'thick' or $npc_thdick[$npclastgenerated] = 'massive' or $npc_thdick[$npclastgenerated] = 'monstrous':
	
		$npc_dick_desc[$npclastgenerated] = 'chode'
		
	end
	
!! average length dicks
elseif npc_dick[$npclastgenerated] < 13:
	if $npc_thdick[$npclastgenerated] = 'skinny' or $npc_thdick[$npclastgenerated] = 'slim':
	
		$npc_dick_desc[$npclastgenerated] = 'skinny'
		
	elseif $npc_thdick[$npclastgenerated] = 'well proportioned' or $npc_thdick[$npclastgenerated] = 'thicker than average':
	
		$npc_dick_desc[$npclastgenerated] = 'normal'
		
	elseif $npc_thdick[$npclastgenerated] = 'thick' or $npc_thdick[$npclastgenerated] = 'massive' or $npc_thdick[$npclastgenerated] = 'monstrous':
	
		$npc_dick_desc[$npclastgenerated] = 'thick'
		
	end
!! long dicks
elseif npc_dick[$npclastgenerated] < 18:
	if $npc_thdick[$npclastgenerated] = 'skinny' or $npc_thdick[$npclastgenerated] = 'slim':
	
		$npc_dick_desc[$npclastgenerated] = 'long'
	elseif $npc_thdick[$npclastgenerated] = 'well proportioned' or $npc_thdick[$npclastgenerated] = 'thicker than average':
	
		$npc_dick_desc[$npclastgenerated] = 'huge'
	elseif $npc_thdick[$npclastgenerated] = 'thick' or $npc_thdick[$npclastgenerated] = 'massive' or $npc_thdick[$npclastgenerated] = 'monstrous':
	
		$npc_dick_desc[$npclastgenerated] = 'enormous'
		
	end
!! extremely long dicks
else
	if $npc_thdick[$npclastgenerated] = 'skinny' or $npc_thdick[$npclastgenerated] = 'slim':
	
		$npc_dick_desc[$npclastgenerated] = 'lengthy'
		
	elseif $npc_thdick[$npclastgenerated] = 'well proportioned' or $npc_thdick[$npclastgenerated] = 'thicker than average':
	
		$npc_dick_desc[$npclastgenerated] = 'gigantic'
		
	elseif $npc_thdick[$npclastgenerated] = 'thick' or $npc_thdick[$npclastgenerated] = 'massive' or $npc_thdick[$npclastgenerated] = 'monstrous':
	
		$npc_dick_desc[$npclastgenerated] = 'monster'
	end
end

!! Set the names, and the stat high ends as determined by seed set earlier
gs 'npcrnamefile', 'rusSur'
$npc_firstname[$npclastgenerated] = $npctempgn[1]
$npc_nickname[$npclastgenerated] = $npctempgn[2]
$npc_lastname[$npclastgenerated] = $npctempgn[3]
if dont_know_npc_name = 0 or $npctempgn[0] = '':
	$npc_usedname[$npclastgenerated] = $npctempgn[1]
else
	$npc_usedname[$npclastgenerated] = $npctempgn[0]
end
npc_intel[$npclastgenerated] = rand(1,npctempc2)

!! set them to sober
npc_drunk[$npclastgenerated] = 0

!! Horniness
npc_horny[$npclastgenerated] = rand(0,60)

!! Attractiveness
npc_apprnc[$npclastgenerated] = rand(30,60)

!! Height
if npc_gender[$npclastgenerated] = 0:
	npc_height[$npclastgenerated] = rand(160,190)
else
	npc_height[$npclastgenerated] = rand(150,180)
end

!! Hair colour
npc_haircol[$npclastgenerated] = rand(0, 3)

!! Quest stage, relationship and love initialised
npc_QW[$npclastgenerated]= 0

!! hornguy6 commentary: I don''t know why relationship automatically starts at 40? I didn''t code this part so maybe someone can explain the reasoning behind it.
npc_rel[$npclastgenerated] = 40
npc_love[$npclastgenerated] = 0

!! initialise occupation and outfit
npc_occupation[$npclastgenerated] = 0
npc_outfit[$npclastgenerated] = 0

!! Unspecified dad and <<$npc_nickname[''A29'']>>.
if npctempgsex = 1 or npctempgsex = 2:
   !! A female face
   $npc_pic[$npclastgenerated] = 'icon_bf' + rand(31, 60) + '.png'
else
   !! A male face
   $npc_pic[$npclastgenerated] = 'icon_bf' + rand(1, 30) + '.png'
end

!! STDs set to 0. For characters with a STD, you need to gs npcgenext rstd
npc_herpes[$npclastgenerated] = 0
npc_syth[$npclastgenerated] = 0
npc_gon[$npclastgenerated] = 0
npc_thrush[$npclastgenerated] = 0

!! times you have had sex with and pervert level of npc
npc_sex[$npclastgenerated] = 0
npc_perv[$npclastgenerated] = 0

!! Personality generated
gs 'npcgenext', 'pers'
$npc_perstype[$npclastgenerated] = $npctempgn[6]
!! hornguy6 commentary: the above code sets a Myers Briggs personality type?
!! Seems overly complex. Up to others whether we keep it or just use the quirks I''ve added to this file

! {Creating the DNA of the character. If it is someone specific, like father, mother, daughter, sone, etc. then should be overwritten.}
$npc_dna[$npclastgenerated] = func('DNA','create')


!!	Set home details

!!	npc_apt_type = 1: student dorm (only available in the city for obvious reasons)
!!	npc_apt_type = 2: studio apartment
!!	npc_apt_type = 3: one bedroom apartment
!!	npc_apt_type = 4: multi-bedroom apartment with roommates
!!	npc_apt_type = 5: multi-bedroom apartment living alone
!!	npc_apt_type = 6: high rise apartment (for rich people only)

!!	temp_location
!!	1 - Pavlovsk Residential Area
!!	2 - Student dorms in the city
!!	3 - St. Petersburg Residential Area
!!	4 - St. Petersburg City Center

!!	occupation set, list below

	npc_residence[$npclastgenerated] = temp_location
	if npc_residence[$npclastgenerated] = 1:
		npc_finance[$npclastgenerated] = 0
		$npc_residence[$npclastgenerated] = 'pav_res'
	elseif npc_residence[$npclastgenerated] = 2:
		npc_finance[$npclastgenerated] = 0
		$npc_residence[$npclastgenerated] = 'student_dorms'
	elseif npc_residence[$npclastgenerated] = 2:
		npc_finance[$npclastgenerated] = rand(1,2)
		$npc_residence[$npclastgenerated] = 'city_res'
	elseif npc_residence[$npclastgenerated] = 2:
		npc_finance[$npclastgenerated] = 2
		$npc_residence[$npclastgenerated] = 'city_center'
	end

	
	if npc_finance[$npclastgenerated] = 0:
		if npc_residence[$npclastgenerated] ! 1 and npc_residence[$npclastgenerated] ! 4 and npctempgage < 22:
			npc_student[$npclastgenerated] = rand(0,1)
			npc_apt_type[$npclastgenerated] = rand(1,4)
		elseif npc_residence[$npclastgenerated] = 2:
			npc_student[$npclastgenerated] = 1
			npc_apt_type[$npclastgenerated] = 2
		else
			npc_apt_type[$npclastgenerated] = rand(2,4)
		end
		npc_occupation[$npclastgenerated] = rand(1,7)
		if rand(1,3) = 1:
			npc_start_free_time[$npclastgenerated] = 8
			npc_end_free_time[$npclastgenerated] = 12
			
			npc_work_start[$npclastgenerated] = 13
			npc_work_end[$npclastgenerated] = 21
			
		elseif rand(1,2) = 1:
			npc_start_free_time[$npclastgenerated] = 15
			npc_end_free_time[$npclastgenerated] = 20
			
			npc_work_start[$npclastgenerated] = 6
			npc_work_end[$npclastgenerated] = 14
		else
			npc_start_free_time[$npclastgenerated] = 18
			npc_end_free_time[$npclastgenerated] = 22
			
			npc_work_start[$npclastgenerated] = 9
			npc_work_end[$npclastgenerated] = 17
		end
		npc_day_off[$npclastgenerated] = rand(1,7)
	elseif npc_finance[$npclastgenerated] = 1:
		npc_apt_type[$npclastgenerated] = rand(2,5)
		npc_occupation[$npclastgenerated] = rand(7,15)
		
		if rand(1,2) = 1:
			npc_start_free_time[$npclastgenerated] = 8
			npc_end_free_time[$npclastgenerated] = 12
			
			npc_work_start[$npclastgenerated] = 13
			npc_work_end[$npclastgenerated] = 21
		else
			npc_start_free_time[$npclastgenerated] = 18
			npc_end_free_time[$npclastgenerated] = 22
			
			npc_work_start[$npclastgenerated] = 9
			npc_work_end[$npclastgenerated] = 17
		end
		
		if npc_car[$npclastgenerated] = 0: npc_car[$npclastgenerated] = rand(-3,1)
	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[$npclastgenerated] = rand(1,7)
	
	
!!	npc_style[$npclastgenerated] determines generally how they dress and what their "persona" is
!!	Each style is limited by their financial status and occupation
!!	e.g. You can''t have someone who dresses like a businessman but works as a line cook
!!	1 - "normal"
!!	2 - Gopnik
!!	3 - nerdy
!!	4 - sporty
!!	5 - fashionable
!!	6 - businessman

	if npc_occupation[$npclastgenerated] < 15:
		npc_style[$npclastgenerated] = rand(1,5)
	else
		npc_style[$npclastgenerated] = (rand(2,6) mod 6) + 1
	end
	
	if npc_apt_type[$npclastgenerated] = 6:
		!! high rise
		
		!! this is to determine what their spare room is used for based on their personality type
		if npc_style[$npclastgenerated] = 3:
			npc_apt_spare[$npclastgenerated] = 1
		elseif npc_style[$npclastgenerated] = 2 or npc_style[$npclastgenerated] = 4:
			npc_apt_spare[$npclastgenerated] = 2
		else
			npc_apt_spare[$npclastgenerated] = rand(1,2)
		end
		if npc_apt_spare[$npclastgenerated] = 1:
			$npc_apt_spare[$npclastgenerated] = 'gaming'
		elseif npc_apt_spare[$npclastgenerated] = 2:
			$npc_apt_spare[$npclastgenerated] = 'gym'
		end
		npc_apt_number[$npclastgenerated] = rand(1,2)
		$npc_apt_bedroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/high_rise/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
		$npc_apt_kitchen[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/high_rise/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
		$npc_apt_livingroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/high_rise/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
		$npc_apt_bathroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/high_rise/<<npc_apt_number[$npclastgenerated]>>/bath.jpg"></center>'
		$npc_apt_hall[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/high_rise/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'		
	elseif npc_apt_type[$npclastgenerated] = 4 or npc_apt_type[$npclastgenerated] = 5:
		!! multi-bedroom
		!! npc_apt_type[$npclastgenerated] = 4 will one day be living with roommates but for now we''re just making it easy on ourselves. No roommates until later.
		
		!! this is to determine what their spare room is used for based on their personality type
		if npc_style[$npclastgenerated] = 3:
			npc_apt_spare[$npclastgenerated] = 1
		elseif npc_style[$npclastgenerated] = 2 or npc_style[$npclastgenerated] = 4:
			npc_apt_spare[$npclastgenerated] = 2
		else
			npc_apt_spare[$npclastgenerated] = rand(1,2)
		end
		if npc_apt_spare[$npclastgenerated] = 1:
			$npc_apt_spare[$npclastgenerated] = 'gaming'
		elseif npc_apt_spare[$npclastgenerated] = 2:
			$npc_apt_spare[$npclastgenerated] = 'gym'
		end
		
		npc_apt_number[$npclastgenerated] = rand(1,2)
		$npc_apt_bedroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/multibedroom/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
		$npc_apt_kitchen[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/multibedroom/<<npc_apt_number[$npclastgenerated]>>/kitchen.jpg"></center>'
		$npc_apt_livingroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/multibedroom/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
		$npc_apt_bathroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/multibedroom/<<npc_apt_number[$npclastgenerated]>>/bath.jpg"></center>'
		$npc_apt_hall[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/multibedroom/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
		$npc_apt_spare[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/multibedroom/<<npc_apt_number[$npclastgenerated]>>/<<$npc_apt_spare[$npclastgenerated]>>.jpg"></center>'
	elseif npc_apt_type[$npclastgenerated] = 3:
		!! one bedroom
		npc_apt_number[$npclastgenerated] = rand(1,3)
		$npc_apt_bedroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
		$npc_apt_kitchen[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/kitchen.jpg"></center>'
		$npc_apt_livingroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
		$npc_apt_bathroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/bath.jpg"></center>'
		$npc_apt_hall[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
	elseif npc_apt_type[$npclastgenerated] = 2:
		!! studio apartment
		npc_apt_number[$npclastgenerated] = rand(1,2)
		$npc_apt_bedroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
		$npc_apt_kitchen[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
		$npc_apt_livingroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
		$npc_apt_bathroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bath.jpg"></center>'
		$npc_apt_hall[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
	elseif npc_apt_type[$npclastgenerated] = 1:
		!! student dorm
		npc_apt_number[$npclastgenerated] = rand(1,3)
		$npc_apt_bedroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
		$npc_apt_kitchen[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/kitchen.jpg"></center>'
		$npc_apt_livingroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
		$npc_apt_bathroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/bath.jpg"></center>'
		$npc_apt_hall[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
	end
	
	if npc_occupation[$npclastgenerated] = 1: 
		$npc_occupation[$npclastgenerated] = 'cashier_supermarket'
	elseif npc_occupation[$npclastgenerated] = 2: 
		$npc_occupation[$npclastgenerated] = 'cashier_liquor'
	elseif npc_occupation[$npclastgenerated] = 3: 
		$npc_occupation[$npclastgenerated] = 'cashier_coffee'
	elseif npc_occupation[$npclastgenerated] = 4: 
		$npc_occupation[$npclastgenerated] = 'barista'
	elseif npc_occupation[$npclastgenerated] = 5: 
		$npc_occupation[$npclastgenerated] = 'fast_food'
	elseif npc_occupation[$npclastgenerated] = 6: 
		$npc_occupation[$npclastgenerated] = 'taxi_driver'
		npc_car[$npclastgenerated] = 1
	elseif npc_occupation[$npclastgenerated] = 7: 
		$npc_occupation[$npclastgenerated] = 'masseuse'
	elseif npc_occupation[$npclastgenerated] = 8: 
		$npc_occupation[$npclastgenerated] = 'masseuse_sexual'
	elseif npc_occupation[$npclastgenerated] = 9: 
		$npc_occupation[$npclastgenerated] = 'factory'
	elseif npc_occupation[$npclastgenerated] = 10: 
		$npc_occupation[$npclastgenerated] = 'bartender'
	elseif npc_occupation[$npclastgenerated] = 11: 
		$npc_occupation[$npclastgenerated] = 'mechanic'
	elseif npc_occupation[$npclastgenerated] = 12: 
		$npc_occupation[$npclastgenerated] = 'line_cook'
	elseif npc_occupation[$npclastgenerated] = 13: 
		$npc_occupation[$npclastgenerated] = 'waiter'
	elseif npc_occupation[$npclastgenerated] = 14: 
		$npc_occupation[$npclastgenerated] = 'personal_trainer'
	elseif npc_occupation[$npclastgenerated] = 15: 
		$npc_occupation[$npclastgenerated] = 'programmer'
	elseif npc_occupation[$npclastgenerated] = 16: 
		$npc_occupation[$npclastgenerated] = 'criminal'
		!! npc_criminal_open determines whether or not they will hide their criminality from the player
		npc_criminal_open[$npclastgenerated] = rand(0,1)
		if rand(1,3) = 1:
			$npc_crime_type[$npclastgenerated] = 'drug_dealer'
		elseif rand(1,2) = 1:
			$npc_crime_type[$npclastgenerated] = 'enforcer'
		else
			$npc_crime_type[$npclastgenerated] = 'thief'
		end
	elseif npc_occupation[$npclastgenerated] = 17: 
		$npc_occupation[$npclastgenerated] = 'businessman'
	elseif npc_occupation[$npclastgenerated] = 18: 
		$npc_occupation[$npclastgenerated] = 'lawyer'
	elseif npc_occupation[$npclastgenerated] = 19: 
		$npc_occupation[$npclastgenerated] = 'investment_banker'
	end

	
!! ------------------------- lifestyle and personality choices ----------------------------------


!!	type of humour
!!	1 - childish
!!	2 - perverted
!!	3 - intellectual/clever
	npc_humor[$npclastgenerated] = rand(0,3)

!! 	if npc_smoker > 0: they smoke cigarettes
	npc_smoker[$npclastgenerated] = rand(0,2)
!! 	if npc_mj = 1: they smoke weed
!! 	if npc_mj = 2: they are a stoner
!!	10% chance they will smoke weed at all, 5% chance total of being either kind of weed smoker
	if rand(1,10) = 10:
		npc_mj[$npclastgenerated] = rand(1,2)
	end

!! we will skip addit for now, have a variable just for smoking
!!	npc_addit[$npclastgenerated] = rand(0,1)

	npc_door_pref[$npclastgenerated] = rand(0,2)
	if npc_door_pref[$npclastgenerated] = 1:
		!! they like going out for things and doing things outside
		$npc_door_pref[$npclastgenerated] = 'outdoor'
	elseif npc_door_pref[$npclastgenerated] = 2: 
		!! they like more quiet activities and staying at home
		$npc_door_pref[$npclastgenerated] = 'indoor'
	end
	
	
!!	npc_goal is what they want out of a relationship
!!	1 = just sex 
!!	2 = casual relationship 
!!	3 = serious relationship
	npc_goal[$npclastgenerated] = rand(1,3)

!!	npc_fidelity is how they will behave in a relationship
!!	1-3 = will cheat on you 
!!	4-6 = will cheat on others with you
!!		4 = cheats on them with you for the first time
!!		5 = has been cheating and feels guilty
!!		6 = is a serial cheater with no guilt
!!	7 = is fine with open relationship
!!	8-10 = will be faithful
	if npc_fidelity[$npclastgenerated] >= 8:
		$npc_fidelity[$npclastgenerated] = 'faithful'
	elseif npc_fidelity[$npclastgenerated] = 7:
		$npc_fidelity[$npclastgenerated] = 'open'
	elseif npc_fidelity[$npclastgenerated] >= 4:
		$npc_fidelity[$npclastgenerated] = 'seduced'
	elseif npc_fidelity[$npclastgenerated] >= 1:
		$npc_fidelity[$npclastgenerated] = 'cheater'
	end

!!	4 = is a serial cheater with no guilt
!!	5 = has been cheating and feels guilty
!!	6 = cheats on them with you for the first time

	if npc_fidelity[$npclastgenerated] >= 4 and npc_fidelity[$npclastgenerated] <= 6: npc_girlfriend[$npclastgenerated] = rand(0,1)

!! initialise lover length in days
	npc_lover_days[$npclastgenerated] = 0

!!	if npc_lover_keys = 1: the player has keys to their apartment and can access it whenever they want
	npc_lover_keys[$npclastgenerated] = 0
	
!!	quirk/trait generation
	if rand(0,2) > 0:
		if rand(0,1) = 1:
			npc_earlyriser[$npclastgenerated] = 1
			npc_latesleeper[$npclastgenerated] = 0
		else
			npc_latesleeper[$npclastgenerated] = 1
			npc_earlyriser[$npclastgenerated] = 0
		end
	end
	
	if rand(0,2) > 0:
		if rand(0,1) = 1:
			npc_generous[$npclastgenerated] = 1
			npc_selfish[$npclastgenerated] = 0
		else
			npc_selfish[$npclastgenerated] = 1
			npc_generous[$npclastgenerated] = 0
		end
	end
	
	if rand(0,2) > 0:
		if rand(0,1) = 1:
			npc_neat[$npclastgenerated] = 1
			npc_messy[$npclastgenerated] = 0
		else
			npc_messy[$npclastgenerated] = 1
			npc_neat[$npclastgenerated] = 0
		end
	end
	
	!! npc_gentle = 1: npc is likely to have a soft emotional and physical touch outside of sex
	!! npc_rough = 1: npc is likely to have a rough/aggressive emotional and physical touch outside of sex
	if rand(0,2) > 0:
		if rand(0,1) = 1:
			npc_gentle[$npclastgenerated] = 1
			npc_rough[$npclastgenerated] = 0
		else
			npc_gentle[$npclastgenerated] = 1
			npc_rough[$npclastgenerated] = 0
		end
	end
	!! npc_diligent = 1: npc is more methodical, doesn''t like to skip steps, and usuallly plays it safe
	!! npc_risktaker = 1: npc is more likely to take risks, such as never using a condom
	if rand(0,2) > 0:
		if rand(0,1) = 1:
			npc_diligent[$npclastgenerated] = 0
			npc_risktaker[$npclastgenerated] = 1
		else
			npc_diligent[$npclastgenerated] = 1
			npc_risktaker[$npclastgenerated] = 0
		end
	end
	
	!! if npc_argumentative = 1: they will get into more arguments with you about things
	!! it is also harder to persuade them
	npc_argumentative[$npclastgenerated] = rand(0,2)
	
	!! if npc_assertive = 1: they will know what they want
	!! if npc_assertive = -1: they will often ask what the player wants
	!! it is also harder to persuade them
	npc_assertive[$npclastgenerated] = rand(-1,1)
	
	!! how easy or difficult it is to persuade them into doing something
	npc_willpwr[$npclastgenerated] = rand(1,50)
	npc_willpwr[$npclastgenerated] += npc_argumentative[$npclastgenerated] * 10
	
	!! if npc_arrogant = 1: they will act arrogantly
	npc_arrogant[$npclastgenerated] = rand(-1,1)
	
	!! if npc_competitive = 1: they are overly competitive in contests against you or others
	npc_competitive[$npclastgenerated] = rand(-1,1)
	
	
	!! if npc_insecure = 1: they are insecure in their masculinity and won''t respond well to teasing
	npc_insecure[$npclastgenerated] = rand(-1,1)
	
	!! if npc_gymrat = 1: they like working out
	npc_gymrat[$npclastgenerated] = rand(-1,1)
	
	!! if npc_abusive = 1: the npc will be abusive
	npc_abusive[$npclastgenerated] = rand(-3,1)
	
	
	!! if npc_caretaker = 1: they will frequently show love through acts of service
	!! example: making you breakfast in bed
	if npc_selfish[$npclastgenerated] ! 1: npc_caretaker[$npclastgenerated] = rand(-3,1)
	
!! ------------------------- sex related preferences ----------------------------------

	if rand(0,1) >= 1 and npc_risktaker[$npclastgenerated] ! 1:
!!		if npc_condom_conscious = 1: they will use condoms but can be talked out of it
!!		if npc_condom_conscious = 2: they will always insist on using condoms unless you are in a committed relationship 
		if npc_diligent[$npclastgenerated] = 1:
			npc_condom_conscious[$npclastgenerated] = rand(-1,2)
		else
			npc_condom_conscious[$npclastgenerated] = rand(-2,2)
		end
	elseif npc_diligent[$npclastgenerated] ! 1:
!!		if npc_no_condoms = 1: they have a preference for skipping condoms but can be talked into using one
!!		if npc_no_condoms = 2: they will never use a condom no matter what
		if npc_risktaker[$npclastgenerated] = 1:
			npc_no_condoms[$npclastgenerated] = rand(-1,2)
		else
			npc_no_condoms[$npclastgenerated] = rand(-2,2)
		end
	end

!! Preferred sexual position
	npc_fav_pos[$npclastgenerated] = rand(1,7)
	
	if npc_fav_pos[$npclastgenerated] = 1:
		$npc_fav_pos[$npclastgenerated] = 'miss'
	elseif npc_fav_pos[$npclastgenerated] = 2:
		$npc_fav_pos[$npclastgenerated] = 'doggy'
	elseif npc_fav_pos[$npclastgenerated] = 3:
		$npc_fav_pos[$npclastgenerated] = 'cowgirl'
	elseif npc_fav_pos[$npclastgenerated] = 4:
		$npc_fav_pos[$npclastgenerated] = 'blowjob'
	elseif npc_fav_pos[$npclastgenerated] = 5:
		$npc_fav_pos[$npclastgenerated] = 'titjob'
	elseif npc_fav_pos[$npclastgenerated] = 6:
		$npc_fav_pos[$npclastgenerated] = '69'
	elseif npc_fav_pos[$npclastgenerated] = 7:
		$npc_fav_pos[$npclastgenerated] = 'anal'
	end
	
	!! npc_sex_speed determines whether they like it slow, steady, or fast and will cause them to select that speed more frequently
	!! 1 is slow, 2 is steady, 3 is fast/rough
	npc_sex_speed[$npclastgenerated] = rand(1,3)
	if npc_sex_speed[$npclastgenerated] = 1 and rand(1,3) = 1:
		!! npc has a tendency to be overly gentle and cautious
		npc_gentle_lover[$npclastgenerated] = 1
	elseif rand(1,3) = 1:
		!! npc prefers sex with dirty talk and perverted acts
		!! example: using spit instead of lube
		npc_dirty_lover[$npclastgenerated] = 1
	elseif rand(1,3) = 1:
		!! npc prefers romantic and sensual sex
		npc_sensual_lover[$npclastgenerated] = 1
	end

!! Preferred cumming location
!!	0 = no preference
	npc_cum_pref[$npclastgenerated] = rand(0,5)
	
	if npc_cum_pref[$npclastgenerated] = 1:
		$npc_cum_pref[$npclastgenerated] = 'creampie'
	elseif npc_cum_pref[$npclastgenerated] = 2:
		$npc_cum_pref[$npclastgenerated] = 'mouth'
	elseif npc_cum_pref[$npclastgenerated] = 3:
		$npc_cum_pref[$npclastgenerated] = 'facial'
	elseif npc_cum_pref[$npclastgenerated] = 4:
		$npc_cum_pref[$npclastgenerated] = 'tits'
	elseif npc_cum_pref[$npclastgenerated] = 5:
		$npc_cum_pref[$npclastgenerated] = 'pullout'
	end
	
	if rand(-3,1) = 1: npc_bukakke_fetish[$npclastgenerated] = 1
	
	
!!	npc_tit_pref determines an npcs preference for breast size
!!	if npc_tit_pref = 0: they don''t care
!!	if npc_tit_pref = 1: they like small tits (A or smaller)
!!	if npc_tit_pref = 2: they like medium sized tits (B to C)
!!	if npc_tit_pref = 3: they like busty girls (D to E)
!!	if npc_tit_pref = 4: they like oversized breasts (F+)
	npc_tit_pref[$npclastgenerated] = rand(0,4)
	
!!	npc_bush_pref determines an npcs preference for the player''s shaving habits
!!	if npc_bush_pref = 0: they don''t care
!!	if npc_bush_pref = 1: they prefer it cleanshaven
!!	if npc_bush_pref = 2: they like it trimmed or cleanshaven
!!	if npc_bush_pref = 3: they like it bushy
	npc_bush_pref[$npclastgenerated] = rand(0,3)
	
!! $npc_fav_body_part
	if rand(1,4) = 1:
		$npc_fav_body_part[$npclastgenerated] = 'pussy'
	elseif rand(1,3) = 1:
		$npc_fav_body_part[$npclastgenerated] = 'tits'
	elseif rand(1,2) = 2:
		$npc_fav_body_part[$npclastgenerated] = 'ass'
	else
		$npc_fav_body_part[$npclastgenerated] = 'thighs'
	end
	

	!! if npc_sexdrive determines how likely the npc will be to engage in sexual behavior and how many times they can orgasm in a single sexual encounter
	if rand(1,10) <= 4:
		npc_sexdrive[$npclastgenerated] = rand(3,5)
	elseif rand(1,10) <= 3:
		npc_sexdrive[$npclastgenerated] = rand(1,3)
!!	elseif rand(1,10) <= 3:
!!		npc_sexdrive[$npclastgenerated] = rand(1,10)
!!	elseif rand(1,10) <= 2:
!!		npc_sexdrive[$npclastgenerated] = rand(7,10)
	else
		!!failsafe
		npc_sexdrive[$npclastgenerated] = rand(1,10)
	end
	
	!! if npc_sex_stamina determines how long they can last in bed without cumming
	
	if rand(1,10) <= 4:
		npc_sex_stamina[$npclastgenerated] = rand(3,5)
	elseif rand(1,10) <= 3:
		npc_sex_stamina[$npclastgenerated] = rand(1,3)
!!	elseif rand(1,10) <= 3:
!!		npc_sex_stamina[$npclastgenerated] = rand(1,10)
!!	elseif rand(1,10) <= 2:
!!		npc_sex_stamina[$npclastgenerated] = rand(7,10)
	else
		!!failsafe
		npc_sex_stamina[$npclastgenerated] = rand(1,10)
	end

	!! npc_spanker determines whether or not they''re into spanking during sex
	npc_sex_spanker[$npclastgenerated] = rand(-1,1)
	
	!! npc_childfree determines that they never want to have kids and will react poorly to pregnancy related topics
	npc_childfree[$npclastgenerated] = rand(-3,1)
	
	!! if npc_pussyeater = 1: they have a fetish for eating pussy
	!! if npc_pussyeater = -1: they refuse to eat pussy
	npc_pussyeater[$npclastgenerated] = rand(-1,1)
	
	!! if npc_cuddler = 1: the npc likes to cuddle
	npc_cuddler[$npclastgenerated] = rand(-1,1)
	
	!! if npc_cum_cannon = 1: the npc ejaculates particularly large loads
	npc_cum_cannon[$npclastgenerated] = rand(-3,1)
	
	!! if npc_two_pump = 1: the npc will always cum immediately in the first penetration act of sex
	npc_two_pump[$npclastgenerated] = rand(-5,1)
	
!! ------------------------- date preferences ----------------------------------
	!! favorite kind of date
	if $npc_door_pref[$npclastgenerated] = 'indoor' and rand(1,3) < 3:
		if rand(1,5) = 1:
			$npc_fav_date[$npclastgenerated] = 'takeout_date'
		elseif rand(1,4) = 1:
			$npc_fav_date[$npclastgenerated] = 'coffee_date'
		elseif rand(1,3) = 1:
			$npc_fav_date[$npclastgenerated] = 'casual_meal'
		elseif rand(1,2) = 1:
			$npc_fav_date[$npclastgenerated] = 'netflix_chill'
		elseif rand(1,1) = 1:
			$npc_fav_date[$npclastgenerated] = 'movie_date'
		end
	elseif $npc_door_pref[$npclastgenerated] = 'outdoor' and rand(1,3) < 3:
		if rand(1,6) = 1:
			$npc_fav_date[$npclastgenerated] = 'picnic_date'
		elseif rand(1,5) = 1:
			$npc_fav_date[$npclastgenerated] = 'beach_date'
		elseif rand(1,4) = 1:
			$npc_fav_date[$npclastgenerated] = 'casual_meal'
		elseif rand(1,3) = 1:
			$npc_fav_date[$npclastgenerated] = 'fancy_meal'
		elseif rand(1,2) = 1:
			$npc_fav_date[$npclastgenerated] = 'amusement_park'
		elseif rand(1,1) = 1:
			$npc_fav_date[$npclastgenerated] = 'shopping_date'
		end
	else
		if rand(1,4) = 1:
			$npc_fav_date[$npclastgenerated] = 'picnic_date'
		elseif rand(1,4) = 1:
			$npc_fav_date[$npclastgenerated] = 'beach_date'
		elseif rand(1,3) = 1:
			$npc_fav_date[$npclastgenerated] = 'shopping_date'
		elseif rand(1,2) = 1:
			$npc_fav_date[$npclastgenerated] = 'fancy_meal'
		elseif rand(1,1) = 1:
			$npc_fav_date[$npclastgenerated] = 'amusement_park'
		elseif rand(1,4) = 1:
			$npc_fav_date[$npclastgenerated] = 'takeout_date'
		elseif rand(1,3) = 1:
			$npc_fav_date[$npclastgenerated] = 'casual_meal'
		elseif rand(1,2) = 1:
			$npc_fav_date[$npclastgenerated] = 'netflix_chill'
		elseif rand(1,1) = 1:
			$npc_fav_date[$npclastgenerated] = 'movie_date'
		end
	end
	
	!! npc_fav_genre determines what kind of media they like to consume
	if rand(1,10) > 7:
		$npc_fav_genre[$npclastgenerated] = 'action'
	elseif rand(1,7) > 4:
		$npc_fav_genre[$npclastgenerated] = 'horror'
	elseif rand(1,5) > 2:
		if rand(1,10) < npc_sexdrive[$npclastgenerated]:
			$npc_fav_genre[$npclastgenerated] = 'raunchy_comedy'
		else
			$npc_fav_genre[$npclastgenerated] = 'comedy'
		end
	elseif rand(1,2) = 1:
		$npc_fav_genre[$npclastgenerated] = 'drama'
	else
		$npc_fav_genre[$npclastgenerated] = 'romance'
	end

!! Variable clean up
killvar '$npctempgn'
killvar 'npctempc1'
killvar 'npctempc2'
killvar 'npctempgsex'
killvar '$npctempgn'
killvar 'npctempgage'
killvar '$npctemparrc'
killvar 'temp_location'

--- npcgeneratec ---------------------------------

