1
0
Pārlūkot izejas kodu

Implement code to allow studying with Anushka after computers_101 in uni_lessons_electivesev1

Insomniac 8 mēneši atpakaļ
vecāks
revīzija
c496e56855
2 mainītis faili ar 122 papildinājumiem un 53 dzēšanām
  1. 1 1
      locations/grades.qsrc
  2. 121 52
      locations/uni_lessons_electivesev1.qsrc

+ 1 - 1
locations/grades.qsrc

@@ -40,7 +40,7 @@
 !!For a class where there is optional opportunities to study outside class that can effect the characters grade ther is th following three calls.
 !! gs 'grades', 'optional_activity', 'institution', 'name', 'use of computer'
 !! gs 'grades', 'optional_activity_skill', 'institution', 'name', 'use of computer', skill
-!! gs 'grades', 'optional_activity_attributes', 'institution', 'use of computer', 'name', attribute
+!! gs 'grades', 'optional_activity_attributes', 'institution', 'name', 'use of computer', attribute
 !!The difference between the three is how it is modified. This work exactly as for gs 'grades', 'class_activity'.
 !! 'use of computer' is 'yes' if a computer use to make the activity, 'no' if not. This modifies the grade gain depending of what was choose when the class was created.
 !!These optional activities can be called as many time as one want. the are particularly made for repeatable activities.

+ 121 - 52
locations/uni_lessons_electivesev1.qsrc

@@ -188,23 +188,33 @@ if $ARGS[0] = 'computers_101':
 																			'You shake your head. "I really wanted to go have some fun and thought you might want to hang out or something..."'
 																			'She''s shaking her head before you finish. "Can''t. I need to get some studying done at the library before tonight."'
 																			'You sigh, dejected. "Oh, okay. Maybe some other time?"'
-																			'She nods. "Totally. Maybe over the weekend when I''ve got some free time? catch you later." She puts some extra sway in her hips as she walks away, really rocking her ass. You smile and shake your head before turning to leave yourself.'
+																			*nl
+																			if npc_rel['A144'] >= 60:
+																				anushkaCityQW['first_visit'] = 1
+																				'She nods. "Totally. Maybe over the weekend when I''ve got some free time? catch you later, but you should stop by my place sometime." She tells you where the apartment she shares with the boys from the band is. She puts some extra sway in her hips as she walks away, really rocking her ass. You smile and shake your head before turning to leave yourself.'
+																			else
+																				'She nods. "Totally. Maybe over the weekend when I''ve got some free time? catch you later." She puts some extra sway in her hips as she walks away, really rocking her ass. You smile and shake your head before turning to leave yourself.'
+																			end
 																			act 'Leave': gt 'uni_lessons', 'short_break'
 																		end
 																		act 'Ask if you can come along':
 																			*clr & cla
 																			gs 'npc_relationship', 'modify', 'A144', 'like'
-																			if hour = 13: minut += 285 - minut
-																			if hour = 14: minut += 225 - minut
-																			if hour = 15: minut += 165 - minut
-																			if hour = 16: minut += 105 - minut
-																			if hour = 17 and minut < 45: minut += 45 - minut
-																			gs 'stat'
+
+																			!! Evaluates time until 17:45 and grants study progress accordingly
+																			gs 'uni_lessons_electivesev1', 'study_with_friends'
+																			
 																			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big144.jpg"></center>'
 																			'You smile. "Yeah, that sounds like a good idea. Mind if I come?"'
 																			'She shrugs. "Sure, if you want, but I really do have to study." Her tone makes it clear she doesn''t have time to mess around like she did back in Pavlovsk.'
 																			'"Yeah, I understand," you reply.'
-																			'The two of you walk over to the library and find a quiet spot to study. Anushka seems really intent on her studies and doesn''t talk much while the two of you study. After a few hours, her phone starts beeping. "I need to get going. See you later." With that, she gathers her stuff and leaves.'
+																			*nl
+																			if npc_rel['A144'] >= 60:
+																				anushkaCityQW['first_visit'] = 1
+																				'The two of you walk over to the library and find a quiet spot to study. Anushka seems really intent on her studies and doesn''t talk much while the two of you study. After a few hours, her phone starts beeping. "I need to get going. See you later, but you should stop by my place sometime." She tells you where the apartment is she shares with the boys from the band. With that, she gathers her stuff and leaves.'
+																			else
+																				'The two of you walk over to the library and find a quiet spot to study. Anushka seems really intent on her studies and doesn''t talk much while the two of you study. After a few hours, her phone starts beeping. "I need to get going. See you later." With that, she gathers her stuff and leaves.'
+																			end
 																			act 'Get up': gt 'uni_library', 'start'
 																		end
 																	else
@@ -221,23 +231,33 @@ if $ARGS[0] = 'computers_101':
 																			'You shake your head. "I really wanted to go have some fun and thought you might want to hang out or something..."'
 																			'She''s shaking her head before you finish. "Can''t. I need to get some studying done at the library before tonight."'
 																			'You sigh, dejected. "Oh, okay. Maybe some other time?"'
-																			'She nods. "Totally. Maybe over the weekend when I''ve got some free time? catch you later." She puts some extra sway in her hips as she walks away, really rocking her ass. You smile and shake your head before turning to leave yourself.'
+																			*nl
+																			if npc_rel['A144'] >= 60:
+																				anushkaCityQW['first_visit'] = 1
+																				'She nods. "Totally. Maybe over the weekend when I''ve got some free time? catch you later, but you should stop by my place sometime." She tells you where the apartment she shares with the boys from the band is. She puts some extra sway in her hips as she walks away, really rocking her ass. You smile and shake your head before turning to leave yourself.'
+																			else
+																				'She nods. "Totally. Maybe over the weekend when I''ve got some free time? catch you later." She puts some extra sway in her hips as she walks away, really rocking her ass. You smile and shake your head before turning to leave yourself.'
+																			end
 																			act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
 																		end
 																		act 'Ask if you can come along':
 																			*clr & cla
 																			gs 'npc_relationship', 'modify', 'A144', 'like'
-																			if hour = 13: minut += 285 - minut
-																			if hour = 14: minut += 225 - minut
-																			if hour = 15: minut += 165 - minut
-																			if hour = 16: minut += 105 - minut
-																			if hour = 17 and minut < 45: minut += 45 - minut
-																			gs 'stat'
+			
+																			!! Evaluates time until 17:45 and grants study progress accordingly
+																			gs 'uni_lessons_electivesev1', 'study_with_friends'
+																
 																			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big144.jpg"></center>'
 																			'You smile. "Yeah, that sounds like a good idea. Mind if I come?"'
 																			'She shrugs. "Sure, if you want, but I really do have to study." Her tone makes it clear she doesn''t have time to mess around like she did back in Pavlovsk.'
 																			'"Yeah, I understand," you reply.'
-																			'The two of you walk over to the library and find a quiet spot to study. Anushka seems really intent on her studies and doesn''t talk much while the two of you study. After a few hours, her phone starts beeping. "I need to get going. See you later." With that, she gathers her stuff and leaves.'
+																			*nl
+																			if npc_rel['A144'] >= 60:
+																				anushkaCityQW['first_visit'] = 1
+																				'The two of you walk over to the library and find a quiet spot to study. Anushka seems really intent on her studies and doesn''t talk much while the two of you study. After a few hours, her phone starts beeping. "I need to get going. See you later, but you should stop by my place sometime." She tells you where the apartment she shares with the boys from the band is. With that, she gathers her stuff and leaves.'
+																			else
+																				'The two of you walk over to the library and find a quiet spot to study. Anushka seems really intent on her studies and doesn''t talk much while the two of you study. After a few hours, her phone starts beeping. "I need to get going. See you later." With that, she gathers her stuff and leaves.'
+																			end
 																			act 'Get up': gt 'uni_library', 'start'
 																		end
 																	end
@@ -274,27 +294,28 @@ if $ARGS[0] = 'computers_101':
 					'"Going to the library to study some before work. You want to come?" she asks while giving you a friendly smile and slowing down a little.'
 					act 'Let''s have fun instead':
 						*clr & cla
+						anushkaCityQW['first_visit'] = 1
 						'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big144.jpg"></center>'
 						'You shake your head. "I really wanted to go have some fun and thought you might want to hang out or something..."'
 						'She''s shaking her head before you finish. "Can''t. I need to get some studying done at the library before tonight."'
 						'You sigh, dejected. "Oh, okay. Maybe some other time?"'
-						'She nods. "Totally. Maybe over the weekend when I''ve got some free time? catch you later." She puts some extra sway in her hips as she walks away, really rocking her ass. You smile and shake your head before turning to leave yourself.'
+						'She nods. "Totally. Maybe over the weekend when I''ve got some free time? catch you later, but you should stop by my place sometime." She tells you where the apartment is she shares with the boys from the band. She puts some extra sway in her hips as she walks away, really rocking her ass. You smile and shake your head before turning to leave yourself.'
 						act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
 					end
 					act 'Agree to go':
 						*clr & cla
 						gs 'npc_relationship', 'modify', 'A144', 'like'
-						if hour = 13: minut += 285 - minut
-						if hour = 14: minut += 225 - minut
-						if hour = 15: minut += 165 - minut
-						if hour = 16: minut += 105 - minut
-						if hour = 17 and minut < 45: minut += 45 - minut
+			
+						!! Evaluates time until 17:45 and grants study progress accordingly
+						gs 'uni_lessons_electivesev1', 'study_with_friends'
+
+						anushkaCityQW['first_visit'] = 1
 						gs 'stat'
 						'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big144.jpg"></center>'
 						'You smile. "Yeah, that sounds like a good idea. Mind if I come?"'
 						'She shrugs. "Sure, if you want, but I really do have to study." Her tone makes it clear she doesn''t have time to mess around like she did back in Pavlovsk.'
 						'"Yeah, I understand," you reply.'
-						'The two of you walk over to the library and find a quiet spot to study. Anushka seems really intent on her studies and doesn''t talk much while the two of you study. After a few hours, her phone starts beeping. "I need to get going. See you later." With that, she gathers her stuff and leaves.'
+						'The two of you walk over to the library and find a quiet spot to study. Anushka seems really intent on her studies and doesn''t talk much while the two of you study. After a few hours, her phone starts beeping. "I need to get going. See you later, but you should stop by my place sometime." She tells you where the apartment she shares with the boys from the band is. With that, she gathers her stuff and leaves.'
 						act 'Get up': gt 'uni_library', 'start'
 					end
 				elseif npc_rel['A144'] <= 20:
@@ -322,11 +343,10 @@ if $ARGS[0] = 'computers_101':
 					act 'Ask if you can come along':
 						*clr & cla
 						gs 'npc_relationship', 'modify', 'A144', 'like'
-						if hour = 13: minut += 285 - minut
-						if hour = 14: minut += 225 - minut
-						if hour = 15: minut += 165 - minut
-						if hour = 16: minut += 105 - minut
-						if hour = 17 and minut < 45: minut += 45 - minut
+			
+						!! Evaluates time until 17:45 and grants study progress accordingly
+						gs 'uni_lessons_electivesev1', 'study_with_friends'
+
 						gs 'stat'
 						'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big144.jpg"></center>'
 						'You smile. "Yeah, that sounds like a good idea. Mind if I come?"'
@@ -364,27 +384,28 @@ if $ARGS[0] = 'computers_101':
 					'"Going to the library to study some before work. You want to come?" she asks while giving you a friendly smile and slowing down a little.'
 					act 'Let''s have fun instead':
 						*clr & cla
+						anushkaCityQW['first_visit'] = 1
 						'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big144.jpg"></center>'
 						'You shake your head. "I really wanted to go have some fun and thought you might want to hang out or something..."'
 						'She''s shaking her head before you finish. "Can''t. I need to get some studying done at the library before tonight."'
 						'You sigh, dejected. "Oh, okay. Maybe some other time?"'
-						'She nods. "Totally. Maybe over the weekend when I''ve got some free time? catch you later." She puts some extra sway in her hips as she walks away, really rocking her ass. You smile and shake your head before turning to leave yourself.'
+						'She nods. "Totally. Maybe over the weekend when I''ve got some free time? catch you later, but you should stop by my place sometime." She tells you where the apartment is she shares with the boys from the band. She puts some extra sway in her hips as she walks away, really rocking her ass. You smile and shake your head before turning to leave yourself.'
 						act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
 					end
 					act 'Ask if you can come along':
 						*clr & cla
 						gs 'npc_relationship', 'modify', 'A144', 'like'
-						if hour = 13: minut += 285 - minut
-						if hour = 14: minut += 225 - minut
-						if hour = 15: minut += 165 - minut
-						if hour = 16: minut += 105 - minut
-						if hour = 17 and minut < 45: minut += 45 - minut
+			
+						!! Evaluates time until 17:45 and grants study progress accordingly
+						gs 'uni_lessons_electivesev1', 'study_with_friends'
+
+						anushkaCityQW['first_visit'] = 1
 						gs 'stat'
 						'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big144.jpg"></center>'
 						'You smile. "Yeah, that sounds like a good idea. Mind if I come?"'
 						'She shrugs. "Sure, if you want, but I really do have to study." Her tone makes it clear she doesn''t have time to mess around like she did back in Pavlovsk.'
 						'"Yeah, I understand," you reply.'
-						'The two of you walk over to the library and find a quiet spot to study. Anushka seems really intent on her studies and doesn''t talk much while the two of you study. After a few hours, her phone starts beeping. "I need to get going. See you later." With that, she gathers her stuff and leaves.'
+						'The two of you walk over to the library and find a quiet spot to study. Anushka seems really intent on her studies and doesn''t talk much while the two of you study. After a few hours, her phone starts beeping. "I need to get going. See you later, but you should stop by my place sometime." She tells you where the apartment she shares with the boys from the band is. With that, she gathers her stuff and leaves.'
 						act 'Get up': gt 'uni_library', 'start'
 					end
 				elseif npc_rel['A144'] <= 20:
@@ -417,11 +438,10 @@ if $ARGS[0] = 'computers_101':
 					act 'Ask if you can come along':
 						*clr & cla
 						gs 'npc_relationship', 'modify', 'A144', 'like'
-						if hour = 13: minut += 285 - minut
-						if hour = 14: minut += 225 - minut
-						if hour = 15: minut += 165 - minut
-						if hour = 16: minut += 105 - minut
-						if hour = 17 and minut < 45: minut += 45 - minut
+			
+						!! Evaluates time until 17:45 and grants study progress accordingly
+						gs 'uni_lessons_electivesev1', 'study_with_friends'
+
 						gs 'stat'
 						'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big144.jpg"></center>'
 						'You smile. "Yeah, that sounds like a good idea. Mind if I come?"'
@@ -458,27 +478,28 @@ if $ARGS[0] = 'comp_nush':
 		'"Going to the library to study some before work. You want to come?" she asks while giving you a friendly smile and slowing down a little.'
 		act 'Let''s have fun instead':
 			*clr & cla
+			anushkaCityQW['first_visit'] = 1
 			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big144.jpg"></center>'
 			'You shake your head. "I really wanted to go have some fun and thought you might want to hang out or something..."'
 			'She''s shaking her head before you finish. "Can''t. I need to get some studying done at the library before tonight."'
 			'You sigh, dejected. "Oh, okay. Maybe some other time?"'
-			'She nods. "Totally. Maybe over the weekend when I''ve got some free time? catch you later." She puts some extra sway in her hips as she walks away, really rocking her ass. You smile and shake your head before turning to leave yourself.'
+			'She nods. "Totally. Maybe over the weekend when I''ve got some free time? catch you later, but you should stop by my place sometime." She tells you where the apartment is she shares with the boys from the band. She puts some extra sway in her hips as she walks away, really rocking her ass. You smile and shake your head before turning to leave yourself.'
 			act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
 		end
 		act 'Agree to go':
 			*clr & cla
 			gs 'npc_relationship', 'modify', 'A144', 'like'
-			if hour = 13: minut += 285 - minut
-			if hour = 14: minut += 225 - minut
-			if hour = 15: minut += 165 - minut
-			if hour = 16: minut += 105 - minut
-			if hour = 17 and minut < 45: minut += 45 - minut
+			
+			!! Evaluates time until 17:45 and grants study progress accordingly
+			gs 'uni_lessons_electivesev1', 'study_with_friends'
+
+			anushkaCityQW['first_visit'] = 1
 			gs 'stat'
 			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big144.jpg"></center>'
 			'You smile. "Yeah, that sounds like a good idea. Mind if I come?"'
 			'She shrugs. "Sure, if you want, but I really do have to study." Her tone makes it clear she doesn''t have time to mess around like she did back in Pavlovsk.'
 			'"Yeah, I understand," you reply.'
-			'The two of you walk over to the library and find a quiet spot to study. Anushka seems really intent on her studies and doesn''t talk much while the two of you study. After a few hours, her phone starts beeping. "I need to get going. See you later." With that, she gathers her stuff and leaves.'
+			'The two of you walk over to the library and find a quiet spot to study. Anushka seems really intent on her studies and doesn''t talk much while the two of you study. After a few hours, her phone starts beeping. "I need to get going. See you later, but you should stop by my place sometime." She tells you where the apartment she shares with the boys from the band is. With that, she gathers her stuff and leaves.'
 			act 'Get up': gt 'uni_library', 'start'
 		end
 	elseif npc_rel['A144'] <= 20:
@@ -500,11 +521,10 @@ if $ARGS[0] = 'comp_nush':
 		act 'Ask if you can come along':
 			*clr & cla
 			gs 'npc_relationship', 'modify', 'A144', 'like'
-			if hour = 13: minut += 285 - minut
-			if hour = 14: minut += 225 - minut
-			if hour = 15: minut += 165 - minut
-			if hour = 16: minut += 105 - minut
-			if hour = 17 and minut < 45: minut += 45 - minut
+			
+			!! Evaluates time until 17:45 and grants study progress accordingly
+			gs 'uni_lessons_electivesev1', 'study_with_friends'
+
 			gs 'stat'
 			'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big144.jpg"></center>'
 			'You smile. "Yeah, that sounds like a good idea. Mind if I come?"'
@@ -804,5 +824,54 @@ if $ARGS[0] = 'obey_kendra_takecum':
 	end
 end
 
+!! This is a modified copy of the regular study code from uni_library. 
+!! It will go down the list of classes to study, and determine if there is benefit from studying it
+!! If there isn''t, it will go down the list. If there are none left, it will give intel exp
+if $ARGS[0] = 'study_with_friends':
+
+	temp_hours_studied_with_friend = 1
+	if hour <= 13: 
+		minut += 285 - minut
+		temp_hours_studied_with_friend = 5
+	elseif hour = 14: 
+		minut += 225 - minut
+		temp_hours_studied_with_friend = 4
+	elseif hour = 15: 
+		minut += 165 - minut
+		temp_hours_studied_with_friend = 3
+	elseif hour = 16: 
+		minut += 105 - minut
+		temp_hours_studied_with_friend = 2
+	elseif hour = 17 and minut < 45: 
+		minut += 45 - minut
+		temp_hours_studied_with_friend = 1
+	end
+
+	if university['semester_week'] > 0:
+		i = 0
+		:study_with_friends_loop
+		if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>':
+
+			if dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_grade_gain'']') < dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_max'']'):
+				gs 'grades', 'optional_activity_attribute', '<<$class_list_institution[i]>>', '<<$class_list_name[i]>>', 'yes', '<<temp_hours_studied_with_friend>>'
+				
+			else
+				i += 1
+				if ARRSIZE('class_list_institution') >= i: jump 'study_with_friends_loop'
+				killvar 'i'
+				gs 'exp_gain', 'intel', rand(temp_hours_studied_with_friend - 1, (temp_hours_studied_with_friend + 1))
+			end
+
+		else 
+			i += 1
+			if ARRSIZE('class_list_institution') >= i: jump 'study_with_friends_loop'
+			killvar 'i'
+			gs 'exp_gain', 'intel', rand(temp_hours_studied_with_friend - 1, (temp_hours_studied_with_friend + 1))
+		end
+	end
+	
+	gs 'stat'
+	killvar 'temp_hours_studied_with_friend'
+end
 --- uni_lessons_electivesev1 ---------------------------------