瀏覽代碼

Merge branch 'master' of https://git.tfgames.site/Kevin_Smarts/glife

hornguy6 10 月之前
父節點
當前提交
ae1740f4f1

+ 28 - 0
Callvalidator.bat

@@ -0,0 +1,28 @@
+@ECHO off
+
+:: The folder where the callvalidator.py can be found
+set VALIDATOR=tools
+:: The list file with the files that will be validated [optional]
+set LIST=glife-validate.qproj
+:: The qsrc file that will be validated [optional]
+:: set FILE=
+:: The folder where the LIST or the FILE can be found [optional, will use the root folder if not set]
+set FOLDER=tools
+:: The folder where the qsrc file can be found [mandatory]
+set SOURCE=locations
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+cls
+echo.
+
+echo.
+
+@ECHO ON
+:: python %VALIDATOR%\callvalidator.py source=%SOURCE%
+:: python %VALIDATOR%\callvalidator.py source=%SOURCE% file=%FILE% folder=%FOLDER%
+python %VALIDATOR%\callvalidator.py source=%SOURCE% list=%LIST% folder=%FOLDER%
+@ECHO OFF
+echo.
+echo Done.
+
+:exit

+ 1 - 1
locations/NikoMeyHome.qsrc

@@ -654,7 +654,7 @@ if $ARGS[0] = 'katjachat4':
 	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/boy/niko/nikomisc/meynold/bedroom/Katja2.jpg"></center>'
 	'You sit next to Katja and she turns to you. "Hey <<$pcs_nickname>>, it was great having you here. Feel free to pay us another visit sometime." She winks at you before turning back to the TV screen.'
 	
-	act 'Walk away':gt 'NikoMeyHome', 'Lounge'
+	act 'Walk away':gt 'NikoMeyHome', 'lounge'
 end
 
 if $ARGS[0] = 'Katja and Natalia':

+ 1 - 1
locations/Prostitute.qsrc

@@ -147,7 +147,7 @@ if $ARGS[0] = 'start':
 
 								gs 'fight','initFight'
 
-								gs 'fight_npcdata', 'prostitue2'
+								gs 'fight_npcdata', 'prostitute2'
 
 								gt 'fight', 'start'
 							end

+ 1 - 1
locations/Vika.qsrc

@@ -205,7 +205,7 @@ if $ARGS[0] = 'brothel_questions':
 				'You are taken aback by these words. Why would you not want to be her friend? "Yes, Of course we''ll still be friends."'
 				'"I will show you then," she tells you'
 
-				act 'Follow Vika': gt 'bordelv', 'start'
+				act 'Follow Vika': gt 'bordelv'
 			end
 		elseif vikaslut = 1:
 			if bordel = 0:

+ 1 - 1
locations/bedrPar.qsrc

@@ -19,7 +19,7 @@ if ml_performance['max_perform_minutes'] = 0: ml_performance['max_perform_minute
 if $ARGS[0] = '' or $ARGS[0] = 'start':
 	if locat['Mother'] = 26 and fromoutside and $home['current'] = 'parents_home':
 		'<center><img <<$set_imgh>> src="images/characters/pavlovsk/resident/mom/prost1.jpg"></center>'
-		if prezik > 0 and rand(1,3) = 1:
+		if prezik > 0 and rand(1,3) = 1 and mom['condoms'] = 0:
 			gt 'mother', 'condom_find'
 		elseif dildo + middildo + largedildo + bigdildo + extradildo + superdildo + maddildo > 0 and motherQW['seen_dildos'] ! 1 and rand(1,3) = 1:
 			gt 'mother', 'dildo_find'

+ 1 - 3
locations/booty_call.qsrc

@@ -94,12 +94,10 @@ if $ARGS[0] = 'home_links':
 	*nl
 	:loopBC_homes
 	if (npc_residence[$Fuckbuddy[i]] = 1 and $loc = 'pav_residential') or (npc_residence[$Fuckbuddy[i]] = 3 and $loc = 'city_residential')or (npc_residence[$Fuckbuddy[i]] = 4 and $loc = 'city_center'):
-	
-!!		dynamic(' ''<a href="exec: minut += 2 & gt ''''sex_ev_start'''',''''fb_npc_home_start'''',''''<<$Fuckbuddy[i]>>'''' "><<$npc_firstname[$Fuckbuddy[i]]>>''''s</a> apartment is nearby.'' ')
 		dynamic(' ''<a href="exec: minut += 2 & gt ''''sex_ev_start'''',''''initiate_pre'''',''''<<$Fuckbuddy[i]>>'''' "><<$npc_firstname[$Fuckbuddy[i]]>>''''s</a> apartment is nearby.'' ')
 		!! ''''
 	end
-	
+	!!		dynamic(' ''<a href="exec: minut += 2 & gt ''''sex_ev_start'''',''''fb_npc_home_start'''',''''<<$Fuckbuddy[i]>>'''' "><<$npc_firstname[$Fuckbuddy[i]]>>''''s</a> apartment is nearby.'' ')
 
 	i +=1
 	if i < arrsize('$Fuckbuddy') : jump 'loopBC_homes'

+ 9 - 9
locations/igorev.qsrc

@@ -77,7 +77,7 @@ qwday	igor_qwday
 $location_type = 'event'
 
 	! walk, movie
-if $ARGS[0] = '': gt 'igorhome', 'Chat'
+if $ARGS[0] = '': gt 'igorhome', 'chat'
 
 if $ARGS[0] = 'Movies':
 	act 'Walk to the theater':
@@ -105,7 +105,7 @@ if $ARGS[0] = 'Movies':
 					gs 'stat'
 					'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/boy/igor/watchmovie.jpg" ></center>'
 					'You quietly sit with Igor and watch the movie, once the credits roll the two of you leave the theater. Once back outside he turns to you and says. "<<$pcs_nickname>> would you like to come back to my place?"'
-					act 'Agree and go back to Igor''s house': gt'Igorhome','hallway'
+					act 'Agree and go back to Igor''s house': gt 'igorhome', 'hallway'
 					act 'Decline and go home': gt 'pav_residential'
 				end
 				act 'Make out':
@@ -115,7 +115,7 @@ if $ARGS[0] = 'Movies':
 					gs 'stat'
 					'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/boy/igor/kissmovie.jpg" ></center>'
 					'The movie is fairly boring and Igor strokes your thigh, you return the favor and lean in close to him. He turns to you and starts to kiss you. Soon the two of you are making out, you spend the rest of the time making out, you have no idea what the movie was even about. Once the credits roll the two of you leave the theater. Once back outside he turns to you and says. "<<$pcs_nickname>> would you like to come back to my place?"'
-					act 'Agree and go back to Igor''s house': gt'Igorhome','hallway'
+					act 'Agree and go back to Igor''s house': gt 'igorhome', 'hallway'
 					act 'Decline and go home': gt 'pav_residential'
 				end
 			end
@@ -126,7 +126,7 @@ if $ARGS[0] = 'Movies':
 				'"Let''s just keep it to a walk." you say. "I''m not that keen watching a movie."'
 				'You continue to walk. The conversation is really stale and not much is said...'
 				'After a while, you decide to go back to Igor''s house. On the way there, you keep thinking that a movie may have been more interesting.'
-				act 'Return to Igor''s house': gt'Igorhome','hallway'
+				act 'Return to Igor''s house': gt 'igorhome', 'hallway'
 			end
 		end
 	end
@@ -158,7 +158,7 @@ if $ARGS[0] = 'kiss':
 		'The two of you kiss, he starts groping your breasts and stroking your crotch. He whispers in your ear, "I want you so bad, come on baby." Igor grabs you and pushes you onto the bed.'
 		gs 'arousal', 'kiss', 5
 		gs 'stat'
-		act'Agree to have sex':IgorLove += 10 & gt 'igorEv','din_sex'
+		act'Agree to have sex':IgorLove += 10 & gt 'igorEv', 'din_sex'
 		act 'Stop him':
 			cla
 			igorsub += 1
@@ -191,7 +191,7 @@ end
 if $ARGS[0] = 'din_sex':
 	if igor_htday ! daystart:
 		*clr & cla
-		gs 'boyStat','A4'
+		gs 'boyStat', 'A4'
 		igor_htday = daystart
 		gs 'stat'
 		'Both of you quickly undress, kissing, as you pull the clothes off each other.'
@@ -1116,7 +1116,7 @@ if $ARGS[0] = 'crossdress_walk1':
 				'"Really? And when your ass was appreciated by those guys, what was it that like?" you ask playfully biting your lip.'
 				'"I think I had a little heart attack! But honestly, it was... uh... fun. I was so pumped up on adrenaline, I loved it!" he says with a huge grin on his face.'
 				'"Alright then. We will have to do this again!" you happily hug him.'
-				act 'Finish': gt'Igorhome','igorroom'
+				act 'Finish': gt 'igorhome', 'igorroom'
 			end
 		end
 	end
@@ -1472,7 +1472,7 @@ if $ARGS[0] = 'walk':
 							'"Alright then. We will have to do this again!" you happily hug him.'
 							gs 'arousal', 'end'
 							gs 'stat'
-							act 'Finish': gt'Igorhome','igorroom'
+							act 'Finish': gt 'igorhome', 'igorroom'
 						end
 					end
 				end
@@ -1989,7 +1989,7 @@ if $ARGS[0] = 'parkwalk':
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/boy/igor/crossdress/progulka_1.jpg"></center>'
 	'You and Diana go for a walk in the park. The two of you talk about many different things. You hear someone behind you calling out your names "<<$pcs_nickname>>, Diana, wait up."'
-	act 'Turn back': gt 'igorhome','hallway'
+	act 'Turn back': gt 'igorhome', 'hallway'
 end
 
 if $ARGS[0] = 'kruglov_desc':

+ 3 - 3
locations/intro_customization.qsrc

@@ -156,14 +156,14 @@ if $ARGS[0] = 'modrel_setup2':
 	dynamic 'if <<$ARGS[1]>> < 0: <<$ARGS[1]>> = 0'
 	dynamic 'if <<$ARGS[1]>> > 100: <<$ARGS[1]>> = 100'
 	dynamic 'x = <<$ARGS[1]>>'
-	$table_display += '<TR bgcolor=#ffffff><TD><<$ARGS[2]>> (<<x>>/100)</TD><TD><a href="exec:<<$ARGS[1]>> = 0 & gt ''intro_customization'', $locM_arg">zero</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>> -= 10 & gt ''intro_customization'', $locM_arg">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>>  -= 5 & gt ''intro_customization'', $locM_arg">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  += 5 & gt ''intro_customization'', $locM_arg">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  += 10 & gt ''intro_customization'', $locM_arg">plus 10</a></TD><TD><a href="exec:<<$ARGS[1]>>  = 100 & gt ''intro_customization'', $locM_arg">100</a></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD><<$ARGS[2]>> (<<x>>/100)</TD><TD><a href="exec:<<$ARGS[1]>> = 0 & gt ''intro_customization'', $locM_arg">zero</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>> -= 10 & gt ''intro_customization'', $locM_arg">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>>  -= 5 & gt ''intro_customization'', $locM_arg">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  += 5 & gt ''intro_customization'', $locM_arg">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  += 10 & gt ''intro_customization'', $locM_arg">plus 10</a></TD><TD><a href="exec:<<$ARGS[1]>>  = 100 & gt ''intro_customization'', $locM_arg">100</a></TD>'
 end
 
 if $ARGS[0] = 'modrel_setup3':
 	dynamic 'if <<$ARGS[1]>> < 50: <<$ARGS[1]>> = 50'
 	dynamic 'if <<$ARGS[1]>> > 200: <<$ARGS[1]>> = 200'
 	dynamic 'x = <<$ARGS[1]>>'
-	$table_display += '<TR bgcolor=#ffffff><TD><<$ARGS[2]>> (<<x>>/200)</TD><TD><a href="exec:<<$ARGS[1]>> = 0 & gt ''intro_customization'', $locM_arg">zero</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>> -= 10 & gt ''intro_customization'', $locM_arg">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>>  -= 5 & gt ''intro_customization'', $locM_arg">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  += 5 & gt ''intro_customization'', $locM_arg">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  += 10 & gt ''intro_customization'', $locM_arg">plus 10</a></TD><TD><a href="exec:<<$ARGS[1]>>  = 200 & gt ''intro_customization'', $locM_arg">200</a></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD><<$ARGS[2]>> (<<x>>/200)</TD><TD><a href="exec:<<$ARGS[1]>> = 0 & gt ''intro_customization'', $locM_arg">zero</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>> -= 10 & gt ''intro_customization'', $locM_arg">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>>  -= 5 & gt ''intro_customization'', $locM_arg">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  += 5 & gt ''intro_customization'', $locM_arg">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  += 10 & gt ''intro_customization'', $locM_arg">plus 10</a></TD><TD><a href="exec:<<$ARGS[1]>>  = 200 & gt ''intro_customization'', $locM_arg">200</a></TD>'
 end
 
 !!Values reversed just for inhib use
@@ -171,7 +171,7 @@ if $ARGS[0] = 'modrel_setup4':
 	dynamic 'if <<$ARGS[1]>> < 0: <<$ARGS[1]>> = 0'
 	dynamic 'if <<$ARGS[1]>> > 100: <<$ARGS[1]>> = 100'
 	dynamic 'x = 100-<<$ARGS[1]>>'
-	$table_display += '<TR bgcolor=#ffffff><TD><<$ARGS[2]>> (<<x>>/100)</TD><TD><a href="exec:<<$ARGS[1]>> = 100 & gt ''intro_customization'', $locM_arg">zero</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>> += 10 & gt ''intro_customization'', $locM_arg">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>>  += 5 & gt ''intro_customization'', $locM_arg">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  -= 5 & gt ''intro_customization'', $locM_arg">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  -= 10 & gt ''intro_customization'', $locM_arg">plus 10</a></TD><TD><a href="exec:<<$ARGS[1]>>  = 0 & gt ''intro_customization'', $locM_arg">100</a></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD><<$ARGS[2]>> (<<x>>/100)</TD><TD><a href="exec:<<$ARGS[1]>> = 100 & gt ''intro_customization'', $locM_arg">zero</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>> += 10 & gt ''intro_customization'', $locM_arg">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>>  += 5 & gt ''intro_customization'', $locM_arg">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  -= 5 & gt ''intro_customization'', $locM_arg">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  -= 10 & gt ''intro_customization'', $locM_arg">plus 10</a></TD><TD><a href="exec:<<$ARGS[1]>>  = 0 & gt ''intro_customization'', $locM_arg">100</a></TD>'
 end
 
 if $ARGS[0] = 'modite_cos':

+ 19 - 19
locations/intro_sg_select.qsrc

@@ -502,7 +502,7 @@ if $ARGS[0] = 'nerdqueen':
 		gs 'grades', 'grade_award', 'school', 'his', 80
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'goodstudent':
@@ -544,7 +544,7 @@ if $ARGS[0] = 'goodstudent':
 		gs 'grades', 'grade_award', 'school', 'his', 90
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'computergeek':
@@ -587,7 +587,7 @@ if $ARGS[0] = 'computergeek':
 		gs 'grades', 'grade_award', 'school', 'his', 85
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'chessplayer':
@@ -624,7 +624,7 @@ if $ARGS[0] = 'chessplayer':
 		gs 'grades', 'grade_award', 'school', 'his', 85
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'jock':
@@ -715,7 +715,7 @@ if $ARGS[0] = 'volleyball':
 		gs 'grades', 'grade_award', 'school', 'his', 55
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'dancer':
@@ -769,7 +769,7 @@ if $ARGS[0] = 'dancer':
 		gs 'grades', 'grade_award', 'school', 'his', 55
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'runner':
@@ -808,7 +808,7 @@ if $ARGS[0] = 'runner':
 		gs 'grades', 'grade_award', 'school', 'his', 55
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'football':
@@ -851,7 +851,7 @@ if $ARGS[0] = 'football':
 		gs 'grades', 'grade_award', 'school', 'his', 55
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'cool':
@@ -933,7 +933,7 @@ if $ARGS[0] = 'socialite':
 		gs 'grades', 'grade_award', 'school', 'his', 65
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'beautiful':
@@ -994,7 +994,7 @@ if $ARGS[0] = 'beautiful':
 		gs 'grades', 'grade_award', 'school', 'his', 60
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'gopnik':
@@ -1095,7 +1095,7 @@ if $ARGS[0] = 'gopnikstart':
 		gs 'grades', 'grade_award', 'school', 'his', 25
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'troublemaker':
@@ -1152,7 +1152,7 @@ if $ARGS[0] = 'troublemaker':
 		gs 'grades', 'grade_award', 'school', 'his', 25
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'vitekgf':
@@ -1225,7 +1225,7 @@ if $ARGS[0] = 'vitekgf':
 		npc_sex['A9'] += 5
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'alternative':
@@ -1315,7 +1315,7 @@ if $ARGS[0] = 'alternative':
 		gs 'grades', 'grade_award', 'school', 'his', 25
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'outcast':
@@ -1383,7 +1383,7 @@ if $ARGS[0] = 'friendless':
 		gs 'grades', 'grade_award', 'school', 'his', 55
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'uglyduckling':
@@ -1426,7 +1426,7 @@ if $ARGS[0] = 'uglyduckling':
 		gs 'grades', 'grade_award', 'school', 'his', 55
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'goodgirl':
@@ -1484,7 +1484,7 @@ if $ARGS[0] = 'goodgirl':
 		gs 'grades', 'grade_award', 'school', 'his', 80
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'slut':
@@ -1589,7 +1589,7 @@ if $ARGS[0] = 'slut':
 		gs 'grades', 'grade_award', 'school', 'his', 55
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 if $ARGS[0] = 'goth':
@@ -1658,7 +1658,7 @@ if $ARGS[0] = 'goth':
 		gs 'grades', 'grade_award', 'school', 'his', 55
 		gt $loc, $loc_arg
 	end
-	act 'Return to starting options': gt 'intro_city_select', 'charselect'
+	act 'Return to starting options': gt 'intro_sg_select', 'charselect'
 end
 
 

+ 17 - 17
locations/intro_sg_select_custom.qsrc

@@ -302,10 +302,10 @@ if $ARGS[0] = 'modrel_fam':
 	*nl
 	*nl
 	'<center><table border=0 cellspacing=0 cellpadding=25  bgcolor=#808080><TH></TH><TH>Set to zero</TH><TH>Minus 10</TH><TH>Minus 5</TH><TH>Plus 5</TH><TH>Plus 10</TH><TH>Set to 100</TH>'
-	'<TR bgcolor=#ffffff><TD>Stepfather: <<npc_rel[''A28'']>></TD><TD><a href="exec:npc_rel[''A28''] = 0 & gt ''intro_sg_select_custom'', ''modrel_fam''">zero</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A28''] -= 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A28''] -= 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A28''] += 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A28''] += 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 10</a></TD><TD><a href="exec:npc_rel[''A28''] = 100 & gt ''intro_sg_select_custom'', ''modrel_fam''">100</a></TD>'
-	'<TR bgcolor=#ffffff><TD>Mother: <<npc_rel[''A29'']>></TD><TD><a href="exec:npc_rel[''A29''] = 0 & gt ''intro_sg_select_custom'', ''modrel_fam''">zero</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A29''] -= 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A29''] -= 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A29''] += 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A29''] += 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 10</a></TD><TD><a href="exec:npc_rel[''A29''] = 100 & gt ''intro_sg_select_custom'', ''modrel_fam''">100</a></TD>'
-	'<TR bgcolor=#ffffff><TD>Sister: <<npc_rel[''A33'']>></TD><TD><a href="exec:npc_rel[''A33''] = 0 & gt ''intro_sg_select_custom'', ''modrel_fam''">zero</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A33''] -= 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A33''] -= 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A33''] += 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A33''] += 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 10</a></TD><TD><a href="exec:npc_rel[''A33''] = 100 & gt ''intro_sg_select_custom'', ''modrel_fam''">100</a></TD>'
-	'<TR bgcolor=#ffffff><TD>Brother: <<npc_rel[''A34'']>></TD><TD><a href="exec:npc_rel[''A34''] = 0 & gt ''intro_sg_select_custom'', ''modrel_fam''">zero</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A34''] -= 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A34''] -= 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A34''] += 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A34''] += 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 10</a></TD><TD><a href="exec:npc_rel[''A34''] = 100 & gt ''intro_sg_select_custom'', ''modrel_fam''">100</a></TD>'
+	'<TR bgcolor=<<$bcolor1>>><TD>Stepfather: <<npc_rel[''A28'']>></TD><TD><a href="exec:npc_rel[''A28''] = 0 & gt ''intro_sg_select_custom'', ''modrel_fam''">zero</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A28''] -= 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A28''] -= 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A28''] += 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A28''] += 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 10</a></TD><TD><a href="exec:npc_rel[''A28''] = 100 & gt ''intro_sg_select_custom'', ''modrel_fam''">100</a></TD>'
+	'<TR bgcolor=<<$bcolor1>>><TD>Mother: <<npc_rel[''A29'']>></TD><TD><a href="exec:npc_rel[''A29''] = 0 & gt ''intro_sg_select_custom'', ''modrel_fam''">zero</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A29''] -= 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A29''] -= 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A29''] += 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A29''] += 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 10</a></TD><TD><a href="exec:npc_rel[''A29''] = 100 & gt ''intro_sg_select_custom'', ''modrel_fam''">100</a></TD>'
+	'<TR bgcolor=<<$bcolor1>>><TD>Sister: <<npc_rel[''A33'']>></TD><TD><a href="exec:npc_rel[''A33''] = 0 & gt ''intro_sg_select_custom'', ''modrel_fam''">zero</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A33''] -= 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A33''] -= 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A33''] += 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A33''] += 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 10</a></TD><TD><a href="exec:npc_rel[''A33''] = 100 & gt ''intro_sg_select_custom'', ''modrel_fam''">100</a></TD>'
+	'<TR bgcolor=<<$bcolor1>>><TD>Brother: <<npc_rel[''A34'']>></TD><TD><a href="exec:npc_rel[''A34''] = 0 & gt ''intro_sg_select_custom'', ''modrel_fam''">zero</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A34''] -= 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''A34''] -= 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A34''] += 5 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''A34''] += 10 & gt ''intro_sg_select_custom'', ''modrel_fam''">plus 10</a></TD><TD><a href="exec:npc_rel[''A34''] = 100 & gt ''intro_sg_select_custom'', ''modrel_fam''">100</a></TD>'
 	'</table></center>'
 	act 'Return': gt 'intro_sg_select_custom','modrel'
 end
@@ -314,7 +314,7 @@ end
 if $ARGS[0] = 'modrel_setup':
 	if npc_rel['<<$ARGS[1]>>'] < 0: npc_rel['<<$ARGS[1]>>'] = 0
 	if npc_rel['<<$ARGS[1]>>'] > 100: npc_rel['<<$ARGS[1]>>'] = 100
-	$table_display += '<TR bgcolor=#ffffff><TD><<$npc_firstname[''<<$ARGS[1]>>'']>> <<$npc_lastname[''<<$ARGS[1]>>'']>>: <<npc_rel[''<<$ARGS[1]>>'']>></TD><TD><a href="exec:npc_rel[''<<$ARGS[1]>>''] = 0 & gt ''intro_sg_select_custom'', $locM_arg">zero</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''<<$ARGS[1]>>''] -= 10 & gt ''intro_sg_select_custom'', $locM_arg">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''<<$ARGS[1]>>''] -= 5 & gt ''intro_sg_select_custom'', $locM_arg">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''<<$ARGS[1]>>''] += 5 & gt ''intro_sg_select_custom'', $locM_arg">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''<<$ARGS[1]>>''] += 10 & gt ''intro_sg_select_custom'', $locM_arg">plus 10</a></TD><TD><a href="exec:npc_rel[''<<$ARGS[1]>>''] = 100 & gt ''intro_sg_select_custom'', $locM_arg">100</a></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD><<$npc_firstname[''<<$ARGS[1]>>'']>> <<$npc_lastname[''<<$ARGS[1]>>'']>>: <<npc_rel[''<<$ARGS[1]>>'']>></TD><TD><a href="exec:npc_rel[''<<$ARGS[1]>>''] = 0 & gt ''intro_sg_select_custom'', $locM_arg">zero</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''<<$ARGS[1]>>''] -= 10 & gt ''intro_sg_select_custom'', $locM_arg">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:npc_rel[''<<$ARGS[1]>>''] -= 5 & gt ''intro_sg_select_custom'', $locM_arg">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''<<$ARGS[1]>>''] += 5 & gt ''intro_sg_select_custom'', $locM_arg">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:npc_rel[''<<$ARGS[1]>>''] += 10 & gt ''intro_sg_select_custom'', $locM_arg">plus 10</a></TD><TD><a href="exec:npc_rel[''<<$ARGS[1]>>''] = 100 & gt ''intro_sg_select_custom'', $locM_arg">100</a></TD>'
 end
 
 if $ARGS[0] = 'modrel_pop':
@@ -335,8 +335,8 @@ if $ARGS[0] = 'modrel_pop':
 	gs 'intro_sg_select_custom', 'modrel_setup', 'A139'
 	gs 'intro_sg_select_custom', 'modrel_setup', 'A140'
 	'<center><table border=0 cellspacing=0 cellpadding=25  bgcolor=#808080><TH></TH><TH>Set to zero</TH><TH>Minus 10</TH><TH>Minus 5</TH><TH>Plus 5</TH><TH>Plus 10</TH><TH>Set to 100</TH>'
-	$table_display += '<TR bgcolor=#ffffff><TD>Set relationship level for all boys in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 0, 1, nstat & gt ''intro_sg_select_custom'',''modrel_pop''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
-	$table_display += '<TR bgcolor=#ffffff><TD>Set relationship level for all girls in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 1, 1, nstat & gt ''intro_sg_select_custom'',''modrel_pop''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD>Set relationship level for all boys in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 0, 1, nstat & gt ''intro_sg_select_custom'',''modrel_pop''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD>Set relationship level for all girls in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 1, 1, nstat & gt ''intro_sg_select_custom'',''modrel_pop''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
 	$table_display
 	'</table></center>'
 	act 'Return': gt 'intro_sg_select_custom','modrel'
@@ -358,8 +358,8 @@ if $ARGS[0] = 'modrel_ath':
 	gs 'intro_sg_select_custom', 'modrel_setup', 'A150'
 	gs 'intro_sg_select_custom', 'modrel_setup', 'A141'
 	'<center><table border=0 cellspacing=0 cellpadding=25  bgcolor=#808080><TH></TH><TH>Set to zero</TH><TH>Minus 10</TH><TH>Minus 5</TH><TH>Plus 5</TH><TH>Plus 10</TH><TH>Set to 100</TH>'
-	$table_display += '<TR bgcolor=#ffffff><TD>Set relationship level for all boys in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 0, 2, nstat & gt ''intro_sg_select_custom'',''modrel_ath''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
-	$table_display += '<TR bgcolor=#ffffff><TD>Set relationship level for all girls in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 1, 2, nstat & gt ''intro_sg_select_custom'',''modrel_ath''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD>Set relationship level for all boys in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 0, 2, nstat & gt ''intro_sg_select_custom'',''modrel_ath''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD>Set relationship level for all girls in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 1, 2, nstat & gt ''intro_sg_select_custom'',''modrel_ath''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
 	$table_display
 	'</table></center>'
 	act 'Return': gt 'intro_sg_select_custom','modrel'
@@ -379,8 +379,8 @@ if $ARGS[0] = 'modrel_ner':
 	gs 'intro_sg_select_custom', 'modrel_setup', 'A153'
 	gs 'intro_sg_select_custom', 'modrel_setup', 'A142'
 	'<center><table border=0 cellspacing=0 cellpadding=25  bgcolor=#808080><TH></TH><TH>Set to zero</TH><TH>Minus 10</TH><TH>Minus 5</TH><TH>Plus 5</TH><TH>Plus 10</TH><TH>Set to 100</TH>'
-	$table_display += '<TR bgcolor=#ffffff><TD>Set relationship level for all boys in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 0, 3, nstat & gt ''intro_sg_select_custom'',''modrel_ner''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
-	$table_display += '<TR bgcolor=#ffffff><TD>Set relationship level for all girls in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 1, 3, nstat & gt ''intro_sg_select_custom'',''modrel_ner''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD>Set relationship level for all boys in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 0, 3, nstat & gt ''intro_sg_select_custom'',''modrel_ner''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD>Set relationship level for all girls in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 1, 3, nstat & gt ''intro_sg_select_custom'',''modrel_ner''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
 	$table_display
 	'</table></center>'
 	act 'Return': gt 'intro_sg_select_custom','modrel'
@@ -406,8 +406,8 @@ if $ARGS[0] = 'modrel_gop':
 	gs 'intro_sg_select_custom', 'modrel_setup', 'A144'
 	gs 'intro_sg_select_custom', 'modrel_setup', 'A145'
 	'<center><table border=0 cellspacing=0 cellpadding=25  bgcolor=#808080><TH></TH><TH>Set to zero</TH><TH>Minus 10</TH><TH>Minus 5</TH><TH>Plus 5</TH><TH>Plus 10</TH><TH>Set to 100</TH>'
-	$table_display += '<TR bgcolor=#ffffff><TD>Set relationship level for all boys in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 0, 4, nstat & gt ''intro_sg_select_custom'',''modrel_gop''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
-	$table_display += '<TR bgcolor=#ffffff><TD>Set relationship level for all girls in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 1, 4, nstat & gt ''intro_sg_select_custom'',''modrel_gop''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD>Set relationship level for all boys in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 0, 4, nstat & gt ''intro_sg_select_custom'',''modrel_gop''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD>Set relationship level for all girls in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 1, 4, nstat & gt ''intro_sg_select_custom'',''modrel_gop''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
 	$table_display
 	'</table></center>'
 	act 'Return': gt 'intro_sg_select_custom','modrel'
@@ -422,8 +422,8 @@ if $ARGS[0] = 'modrel_out':
 	gs 'intro_sg_select_custom', 'modrel_setup', 'A7'
 	gs 'intro_sg_select_custom', 'modrel_setup', 'A159'
 	'<center><table border=0 cellspacing=0 cellpadding=25  bgcolor=#808080><TH></TH><TH>Set to zero</TH><TH>Minus 10</TH><TH>Minus 5</TH><TH>Plus 5</TH><TH>Plus 10</TH><TH>Set to 100</TH>'
-	$table_display += '<TR bgcolor=#ffffff><TD>Set relationship level for all boys in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 0, 5, nstat & gt ''intro_sg_select_custom'',''modrel_out''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
-!!	$table_display += '<TR bgcolor=#ffffff><TD>Set relationship level for all girls in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 1, 5, nstat & gt ''intro_sg_select_custom'',''modrel_out''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD>Set relationship level for all boys in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 0, 5, nstat & gt ''intro_sg_select_custom'',''modrel_out''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
+!!	$table_display += '<TR bgcolor=<<$bcolor1>>><TD>Set relationship level for all girls in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 1, 5, nstat & gt ''intro_sg_select_custom'',''modrel_out''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
 	$table_display
 	'</table></center>'
 	act 'Return': gt 'intro_sg_select_custom','modrel'
@@ -447,8 +447,8 @@ if $ARGS[0] = 'modrel_tea':
 	gs 'intro_sg_select_custom', 'modrel_setup', 'A137'
 	gs 'intro_sg_select_custom', 'modrel_setup', 'A138'
 	'<center><table border=0 cellspacing=0 cellpadding=25  bgcolor=#808080><TH></TH><TH>Set to zero</TH><TH>Minus 10</TH><TH>Minus 5</TH><TH>Plus 5</TH><TH>Plus 10</TH><TH>Set to 100</TH>'
-	$table_display += '<TR bgcolor=#ffffff><TD>Set relationship level for all men in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 0, 6, nstat & gt ''intro_sg_select_custom'',''modrel_tea''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
-	$table_display += '<TR bgcolor=#ffffff><TD>Set relationship level for all women in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 1, 6, nstat & gt ''intro_sg_select_custom'',''modrel_tea''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD>Set relationship level for all men in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 0, 6, nstat & gt ''intro_sg_select_custom'',''modrel_tea''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
+	$table_display += '<TR bgcolor=<<$bcolor1>>><TD>Set relationship level for all women in this group</TD><TD><a href="exec: gs ''intro_sg_select_custom'',''setval2'' & gs ''intro_sg_select_custom'', ''pol_grup_set'', 1, 6, nstat & gt ''intro_sg_select_custom'',''modrel_tea''">set value</a></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>'
 	$table_display
 	'</table></center>'
 	act 'Return': gt 'intro_sg_select_custom','modrel'

+ 7 - 7
locations/katja_chat.qsrc

@@ -272,7 +272,7 @@ end
 
 if $ARGS[0] = 'coffee_hole':
 	menu_off = 1
-	gs 'npc_relationship', 'modify', 'A14', 'like', 1, 'coffe_hole1'
+	gs 'npc_relationship', 'modify', 'A14', 'like', 1, 'coffee_hole1'
 	if npc_rel['A14'] < 20:
 		'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big14.jpg"></center>'
 		'You approach Katja, who seems to be studying while drinking coffee and having brunch.'
@@ -302,7 +302,7 @@ end
 
 if $ARGS[0] = 'brunch':
 	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/katja/uni/Coffe_hole2.jpg"></center>'
-	gs 'npc_relationship', 'modify', 'A14', 'like', 3, 'coffe_hole2'
+	gs 'npc_relationship', 'modify', 'A14', 'like', 3, 'coffee_hole2'
 	minut += 10
 	gs 'stat'
 	if katjaQW['QWstage'] >= 2 and pcs_makeup < 2:
@@ -730,7 +730,7 @@ if $ARGS[0] = 'coffee_hole_event_girls_night_no':
 end
 
 if $ARGS[0] = 'coffee_hole_hangout':
-	gs 'npc_relationship', 'modify', 'A14', 'like', 3, 'coffe_hole2'
+	gs 'npc_relationship', 'modify', 'A14', 'like', 3, 'coffee_hole2'
 	minut += 15
 	gs 'katja_meynold_schedule'
 	gs 'stat'
@@ -1003,7 +1003,7 @@ if $ARGS[0] = 'coffee_hole_have_fun':
 					else
 						act 'Convince her (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 					end
-					act 'Continue talking': KatjaQW['dom'] += 1 & gt 'katja_chat', 'coffe_hole_event'
+					act 'Continue talking': KatjaQW['dom'] += 1 & gt 'katja_chat', 'coffee_hole_event'
 					act 'Say goodbye and get up':  KatjaQW['dom'] += 1 & gt 'city_coffee_hole', 'inner'
 				else
 					KatjaQW['dom'] += 1
@@ -1075,7 +1075,7 @@ if $ARGS[0] = 'coffee_hole_have_fun':
 					else
 						act 'Convince her (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 					end
-					act 'Continue talking': KatjaQW['dom'] += 1 & gt 'katja_chat', 'coffe_hole_event'
+					act 'Continue talking': KatjaQW['dom'] += 1 & gt 'katja_chat', 'coffee_hole_event'
 					act 'Say goodbye and get up':  KatjaQW['dom'] += 1 & gt 'city_coffee_hole', 'inner'
 				elseif katjaQW['horny'] > 50:
 					'"No, I don''t feel like it," Katja says, but something in her voice makes you think that she can be convinced.'
@@ -1096,12 +1096,12 @@ if $ARGS[0] = 'coffee_hole_have_fun':
 					else
 						act 'Convince her (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 					end
-					act 'Continue talking': KatjaQW['dom'] += 1 & gt 'katja_chat', 'coffe_hole_event'
+					act 'Continue talking': KatjaQW['dom'] += 1 & gt 'katja_chat', 'coffee_hole_event'
 					act 'Say goodbye and get up':  KatjaQW['dom'] += 1 & gt 'city_coffee_hole', 'inner'
 				else
 					KatjaQW['dom'] += 1
 					'"No, I don''t want to," Katja responds in a stern voice. You realize that you won''t convince her otherwise.'
-					act 'Continue talking': gt 'katja_chat', 'coffe_hole_event'
+					act 'Continue talking': gt 'katja_chat', 'coffee_hole_event'
 					act 'Say goodbye and get up': gt 'city_coffee_hole', 'inner'
 				end
 			end

+ 2 - 2
locations/katja_dorm.qsrc

@@ -191,7 +191,7 @@ if $ARGS[0] = 'talk':
 	end
 	act 'Leave Katja''s dorm room':
 		if sofiaQW['know'] = 0 and university['semester_week'] > 0:
-			gt 'katja_dorm', 'soifa_meet'
+			gt 'katja_dorm', 'sofia_meet'
 		else
 			minut += 2
 			gt 'uni_dorm', 'second_floor'
@@ -1069,7 +1069,7 @@ if $ARGS[0] = 'lazar_kiss':
 			act 'Go to Lazar''s place': gt 'katja_uni_sex', 'lazar_katja_uni_3some'
 		end
 	end
-	act 'You''re not in the mood': katjaQW['horny'] -= 20 & gt 'Katja_dorm', 'Talk'
+	act 'You''re not in the mood': katjaQW['horny'] -= 20 & gt 'katja_dorm', 'talk'
 end
 
 if $ARGS[0] = 'movie_talk1':

+ 2 - 2
locations/katja_sex.qsrc

@@ -633,7 +633,7 @@ if $ARGS[0] = 'katnatsex1':
 				'Katja embraces you and lies down, so you end on top, where you lash on her gorgeous bosom. Natasha meanwhile doesn''t stand idle and her hands begin to work you, her cold tongue tasting your asshole, startling you, but Katja embraces your body so you can''t escape the nerd''s probing. They continue doing this, slowly drilling your soaking cunt, exploring your hungry mouth and caressing your burning skin.'
 				'"Oh! Katja! I mean, oh! Fuck! Natasha I''m cumming!"'
 
-				act 'Cuddle with Katja and ignore Natasha': gt 'katjaEv','katnatsex3'
+				act 'Cuddle with Katja and ignore Natasha': gt 'katja_sex','katnatsex3'
 
 				act 'Too tired for sex, so "help" Natasha in another way':
 					*clr & cla
@@ -798,7 +798,7 @@ if $ARGS[0] = 'katnatsex1':
 			'"Hm... Ok Katja. I trust... OUCH!"'
 			'One of your fingers penetrates Natasha''s hot, wet pussy a little too roughly, but it sends the correct message, and the nerd finally shuts up and ends the struggling. Now she is at your tender mercies, and Katja kneels beside you to devour the now silent girl, but that doesn''t last long, as you two pussy-hungry vixens begin to lick, bite and fingerfuck the trashing girl, whose screams of pleasure are only contained by your deep kisses, making her raise her thighs little by little until, finally, she cums.'
 
-			act 'Too tired... cuddle with the girls': gt 'katjaEv','katnatsex3'
+			act 'Too tired... cuddle with the girls': gt 'katja_sex','katnatsex3'
 
 			act 'Groaning help Katja':
 				*clr & cla

+ 2 - 2
locations/katja_uni_sex.qsrc

@@ -1212,7 +1212,7 @@ if $ARGS[0] =  'after_movie_masturbation1':
 	end
 end
 
-if $ARGs[0] =  'after_movie_masturbation2':
+if $ARGS[0] =  'after_movie_masturbation2':
 	gs 'arousal', 'foreplay_give', 2, 'lesbian'		
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/katja/uni/dorm/sex/after_movie_mastubation5.jpg"></center>'
@@ -1231,7 +1231,7 @@ if $ARGs[0] =  'after_movie_masturbation2':
 	end
 end
 
-if $ARGs[0] =  'after_movie_masturbation3':
+if $ARGS[0] =  'after_movie_masturbation3':
 	gs 'arousal', 'erotic', 1
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/katja/uni/dorm/sex/after_movie_mastubation7.jpg"></center>'

+ 2 - 2
locations/korrPar.qsrc

@@ -172,7 +172,7 @@ end
 $korrParMomHeader = '<center><h1><font color="maroon"><<$npc_nickname[''A29'']>></font></h1></center><center><img <<$set_imgh>> src="images/characters/pavlovsk/resident/mom/mother.jpg"></center><br />'
 
 if hour >= 16 and hour <= 20 and locat['Fam_inGad'] = 0:
-	if artemvbrosvid = 1 and artemhakday ! daystart and npc_QW['A29'] < 2 and mothervideotalk = 0 or BrotherNo = 1 and BrotherNoDay ! daystart:
+	if artemvbrosvid = 1 and artemhakday ! daystart and npc_QW['A29'] < 2 and mothervideotalk = 0 or BrotherNo = 1 and BrotherNoDay ! daystart and BJvideoPublic = 0:
 		*clr & cla
 		menu_off = 1
 		BJvideoPublic = 1
@@ -231,7 +231,7 @@ if hour >= 16 and hour <= 20 and locat['Fam_inGad'] = 0:
 		exit
 	end
 
-	if artemvbrosvid=1 and artemhakday ! daystart and npc_QW['A29'] >= 2 and mothervideotalk = 0:
+	if artemvbrosvid=1 and artemhakday ! daystart and npc_QW['A29'] >= 2 and mothervideotalk = 0 and BJvideoPublic = 0:
 		*clr & cla
 		menu_off = 1
 		BJvideoPublic = 1

+ 1 - 0
locations/mother.qsrc

@@ -1789,6 +1789,7 @@ if $ARGS[0] = 'condom_find':
 	'As you''re in your room, <<$npc_nickname[''A29'']>> walks in and shuts the door behind her. Without saying a word she walks over to the desk, pulls out one of the draws and takes out some condoms, "<<$pcs_nickname>>, why do you have this in your desk?!"'
 	act 'I...':
 		*clr & cla
+		mom['condoms'] = 1
 		gs 'stat'
 		!! TEMPORARY PICTURE
 		'<center><img <<$set_imgh>> src="images/characters/pavlovsk/resident/mom/mother.jpg"></center>'

+ 48 - 11
locations/salon.qsrc

@@ -2421,16 +2421,50 @@ if $ARGS[0] = 'cosmetic_tattoo_start':
 		else
 			epayments['value'] = 2000
 		end
-		$epayments['loc_arg'] = 'cosmetic_tattoo_operation'
-		$epayments['description'] = 'cosmetic tattoo operation'
 		
-		if bimbolevel > 0 or inhib_lvl >= 10:
-			if cosmetic_tattoo < 1: act 'Get light cosmetic tattoo':cosmetic_tattoo = 1 & gs 'shortgs', 'payments'
-			if cosmetic_tattoo < 2: act 'Get vibrant cosmetic tattoo':cosmetic_tattoo = 2 & gs 'shortgs', 'payments'
-			if cosmetic_tattoo < 3: act 'Get sultry cosmetic tattoo':cosmetic_tattoo = 3 & gs 'shortgs', 'payments'
-			if cosmetic_tattoo < 4: act 'Get professional cosmetic tattoo':cosmetic_tattoo = 4 & gs 'shortgs', 'payments'
-			if cosmetic_tattoo < 5: act 'Get celebrity(bimbo) cosmetic tattoo':cosmetic_tattoo = 5 & gs 'shortgs', 'payments'
-			if cosmetic_tattoo = 5: 'You already have the heaviest cosmetic tattoo that is on offer.'
+		if cosmetic_tattoo = 5:
+			'You already have the heaviest cosmetic tattoo that is on offer.'
+		elseif bimbolevel > 0 or inhib_lvl >= 10:
+			if cosmetic_tattoo < 1:
+				act 'Get light cosmetic tattoo':
+					$epayments['loc_arg'] = 'cosmetic_tattoo_operation'
+					$epayments['description'] = 'Light cosmetic tattoo'
+					temp_tattoo = 1
+					gs 'shortgs', 'payments'
+				end
+			end
+			if cosmetic_tattoo < 2:
+				act 'Get vibrant cosmetic tattoo':
+					$epayments['loc_arg'] = 'cosmetic_tattoo_operation'
+					$epayments['description'] = 'Vibrant cosmetic tattoo'
+					temp_tattoo = 2
+					gs 'shortgs', 'payments'
+				end
+			end
+			if cosmetic_tattoo < 3:
+				act 'Get sultry cosmetic tattoo':
+					$epayments['loc_arg'] = 'cosmetic_tattoo_operation'
+					$epayments['description'] = 'Sultry cosmetic tattoo'
+					temp_tattoo = 3
+					gs 'shortgs', 'payments'
+				end
+			end
+			if cosmetic_tattoo < 4:
+				act 'Get professional cosmetic tattoo':
+					$epayments['loc_arg'] = 'cosmetic_tattoo_operation'
+					$epayments['description'] = 'Professional cosmetic tattoo'
+					temp_tattoo = 4
+					gs 'shortgs', 'payments'
+				end
+			end
+			if cosmetic_tattoo < 5:
+				act 'Get celebrity(bimbo) cosmetic tattoo':
+					$epayments['loc_arg'] = 'cosmetic_tattoo_operation'
+					$epayments['description'] = 'Celebrity(bimbo) cosmetic tattoo'
+					temp_tattoo = 5
+					gs 'shortgs', 'payments'
+				end
+			end
 		else 
 			'<br>You dont feel confident enough to get one of these.'
 		end
@@ -2443,9 +2477,12 @@ end
 if $ARGS[0] = 'cosmetic_tattoo_operation':
 	cla & *clr
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/mall/salon/ct<<cosmetic_tattoo>>.jpg"></center>'
-	minut += 45
+	'The technician works away with the needle for 45 minutes until your <<$epayments[''description'']>> is completed.'
+	cosmetic_tattoo = temp_tattoo
+	killvar 'temp_tattoo'
+	minut += 45	
 	gs 'stat'
-	act 'End':gt 'salon', 'cosmetic_tattoo_start'
+	act 'Continue':gt 'salon', 'services'
 end
 
 if $ARGS[0] = 'mom':

+ 1 - 1
locations/saveg.qsrc

@@ -16,6 +16,6 @@
 version_major = 0
 version_minor = 9
 version_revision = 0
-version_patch = 0
+version_patch = 1
 --- saveg ---------------------------------
 

+ 14 - 0
locations/saveupdater.qsrc

@@ -1689,6 +1689,20 @@ if ((100*version_major +version_minor)*100+version_revision)*100+version_patch <
 	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
 end
 
 

+ 3 - 3
locations/sexshop.qsrc

@@ -218,7 +218,7 @@ if $ARGS[0] = 'dress':
 
 				!!sort by filter
 				if (clothingfilter['quality'] = 0 and CloQuality = clo_i) or (clothingfilter['inhibition'] = 0 and CloInhibit = clo_i) or clothingfilter['number'] = 0:
-					if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''sexshop'', ''eroto_dress''"><img <<$set_imgh>> src="images/pc/items/eroto/dress/<<i>>.jpg"	height="250" /></a>'
+					if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''sexshop'', ''eroto_dress''"><img src="images/pc/items/eroto/dress/<<i>>.jpg"	height="250" /></a>'
 				end
 			end
 			i += 2
@@ -266,7 +266,7 @@ if $ARGS[0] = 'outfits':
 
 				!!sort by filter
 				if (clothingfilter['quality'] = 0 and CloQuality = clo_i) or (clothingfilter['inhibition'] = 0 and CloInhibit = clo_i) or clothingfilter['number'] = 0:
-					if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''sexshop'', ''eroto_outfits''"><img <<$set_imgh>> src="images/pc/items/eroto/outfits/<<i>>.jpg"	height="250" /></a>'
+					if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''sexshop'', ''eroto_outfits''"><img src="images/pc/items/eroto/outfits/<<i>>.jpg"	height="250" /></a>'
 				end
 			end
 			i += 2
@@ -310,7 +310,7 @@ if $ARGS[0] = 'strip':
 
 				!!sort by filter
 				if (clothingfilter['quality'] = 0 and CloQuality = clo_i) or (clothingfilter['inhibition'] = 0 and CloInhibit = clo_i) or clothingfilter['number'] = 0:
-					if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''sexshop'', ''eroto_strip''"><img <<$set_imgh>> src="images/pc/items/eroto/strip/<<i>>.jpg"	height="250" /></a>'
+					if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''sexshop'', ''eroto_strip''"><img src="images/pc/items/eroto/strip/<<i>>.jpg"	height="250" /></a>'
 				end
 			end
 			i += 1

+ 12 - 43
locations/soniahome.qsrc

@@ -13,16 +13,11 @@
 !! soniaQW['vitek_bj_watched'] = 1 - means you watched Sonia give Vitek a blowjob at the disco
 
 if $ARGS[0] = 'home':
-	$menu_loc = 'soniahome'
-	$menu_arg = 'home'
 	menu_off = 0
 	$track_loop = ''
 	CLOSE ALL
 	if sound = 0:PLAY 'sound/korr.mp3',30
-	$locM_arg = 'home'
-	$locM = 'soniahome'
-	$loc_arg = 'home'
-	$loc = 'soniahome'
+	gs 'shortgs', 'setloc', 'soniahome', $ARGS[0]
 	$location_type = 'private'
 	*clr & cla
 	gs 'stat'
@@ -100,10 +95,7 @@ if $ARGS[0] = 'home':
 end
 
 if $ARGS[0] = 'hallway':	
-	$loc = 'soniahome'
-	$loc_arg = 'hallway'
-	$locM_arg = 'hallway'
-	$locM = 'soniahome'
+	gs 'shortgs', 'setloc', 'soniahome', $ARGS[0]
 	$location_type = 'private'
 	$menu_arg = $ARGS[0]
 	menu_off = 0
@@ -114,18 +106,17 @@ if $ARGS[0] = 'hallway':
 	'<center><b><font color = maroon>Hallway</font></b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/soniaHome/hall.jpg"></center>'
 	'You enter a small bright hallway with a door to the lounge on your right and a staircase at the end leading to the bedrooms and bathroom upstairs. There''s also a door to the kitchen in front of you.'
+	act 'Leave': gt 'pav_residential'
 	act 'Go to Sonia''s bedroom': gt 'soniahome','sonia_room'
-	act 'Go to the bathroom': gt 'soniahome','bathroom'
-	act 'Go to the kitchen': gt 'soniahome','kitchen'
-	act 'Living Room': gt 'soniahome','livingroom'
 	act 'Brother''s Room': gt 'soniahome','soniabrother'
 	act 'Parents Room': gt 'soniahome','soniaparents'
-	act 'Leave': gt 'pav_residential'
+	act 'Living Room': gt 'soniahome','livingroom'
+	act 'Go to the bathroom': gt 'soniahome','bathroom'
+	act 'Go to the kitchen': gt 'soniahome','kitchen'
 end
 
 if $ARGS[0] = 'bathroom':
-	$loc = 'soniahome'
-	$loc_arg = 'bathroom'
+	gs 'shortgs', 'setloc', 'soniahome', $ARGS[0]
 	$location_type = 'bathroom'
 	$menu_arg = $ARGS[0]
 	menu_off = 0
@@ -161,10 +152,7 @@ if $ARGS[0] = 'bathroom':
 end
 
 if $ARGS[0] = 'kitchen':
-	$loc = 'soniahome'
-	$loc_arg = 'kitchen'
-	$locM_arg = 'kitchen'
-	$locM = 'soniahome'
+	gs 'shortgs', 'setloc', 'soniahome', $ARGS[0]
 	$menu_arg = $ARGS[0]
 	menu_off = 0
 	*clr & cla
@@ -310,12 +298,7 @@ if $ARGS[0] = 'fridge':
 end
 
 if $ARGS[0] = 'livingroom':
-	$loc = 'soniahome'
-	$loc_arg = 'livingroom'
-	$menu_loc = 'soniahome'
-	$menu_arg = 'livingroom'
-	$locM = 'soniahome'	
-	$locM_arg = 'livingroom'
+	gs 'shortgs', 'setloc', 'soniahome', $ARGS[0]
 
 	menu_off = 0
 	CLOSE ALL
@@ -335,12 +318,7 @@ if $ARGS[0] = 'livingroom':
 end
 
 if $ARGS[0] = 'soniaparents':	
-	$loc = 'soniahome'	
-	$loc_arg = 'soniaparents'
-	$menu_loc = 'soniahome'
-	$menu_arg = 'soniaparents'
-	$locM_arg = 'soniaparents'
-	$locM = 'soniahome'
+	gs 'shortgs', 'setloc', 'soniahome', $ARGS[0]
 	menu_off = 0
 	CLOSE ALL
 	*clr & cla
@@ -373,12 +351,7 @@ if $ARGS[0] = 'soniaparents':
 end
 
 if $ARGS[0] = 'soniabrother':	
-	$loc = 'soniahome'	
-	$loc_arg = 'soniabrother'
-	$menu_loc = 'soniahome'
-	$menu_arg = 'soniabrother'
-	$locM = 'soniahome'
-	$locM_arg = 'soniabrother'
+	gs 'shortgs', 'setloc', 'soniahome', $ARGS[0]
 
 	menu_off = 0
 	CLOSE ALL
@@ -392,11 +365,7 @@ if $ARGS[0] = 'soniabrother':
 end
 
 if $ARGS[0] = 'sonia_room':
-	$loc = 'soniahome'
-	$loc_arg = 'sonia_room'
-	$locM = 'soniahome'
-	$locM_arg = 'sonia_room'
-	$locclass = 'bedr'
+	gs 'shortgs', 'setloc', 'soniahome', $ARGS[0]
 	$menu_arg = $ARGS[0]
 	menu_off = 0
 	*clr & cla

+ 1 - 1
locations/start.qsrc

@@ -18,7 +18,7 @@ $fname = 'Tahoma'
 fsize = 12
 gs 'saveg'
 gs 'addbuilddate'
-$version = '<<version_major>>.<<version_minor>>.<<version_revision>>.<<version_patch>> built on <<$builddate>> for the so late I should have called it the 0.9.5 version'
+$version = '<<version_major>>.<<version_minor>>.<<version_revision>>.<<version_patch>> built on <<$builddate>> for the 10 days late even with the extra month version'
 opPRE = 1
 
 *nl

+ 3 - 4
locations/tour_guide.qsrc

@@ -18,7 +18,7 @@ if $ARGS[0] = 'tourstart':
 		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/palace/office/tour_office.jpg"></center>'
 		'You see an ad posted in the park for summer only tour guides needed and decide to inquire about it at an office outside the old Imperial Palace.'
 		*nl
-		'You answer a few questions the management team asks you and are offered a summer position at 100 <b>₽</b> an hour, 8 hours a day. Fresh uniforms are provided daily and training will be you shadowing another guide for the first couple of days to make sure you know the details required to lead your groups.'
+		'You answer a few questions the management team asks you and are offered a summer position at 1000 <b>₽</b> per shift of 8 hours during day time. Fresh uniforms are provided daily and training will be you shadowing another guide for the first couple of days to make sure you know the details required to lead your groups.'
 		'Like any teenager your only questions are about breaks and days off. The manager smiles, not surprised, and tells you that working is voluntary. If you do not show up then obviously you will not make any money that day, but otherwise no daily commitment is required from you. Breaks will be allowed if there are no groups to lead at that time and you will be given a small lunch everyday that you choose to work.'
 		act 'Accept the position':
 			gs 'emp_job_array', 'emp_tourist_guide'
@@ -80,12 +80,11 @@ if $ARGS[0] = 'tourran2':
 	*nl
 	'Should you suggest slipping away for a swim or just try and finish the tour quickly so they can get to the beach sooner and let you get back to work?'
 	if pcs_horny >= 40:
-		gs 'willpower', 'easy'
+		gs 'willpower', 'misc', 'self', 'easy'
 		if will_cost <= pcs_willpwr:
 			act 'Slip away to the beach (<<will_cost>> Willpower)':
 				*clr & cla
-				gs 'willpower', 'easy'
-				gs 'willpower', 'pay'
+				gs 'willpower', 'pay', 'self'
 				gs 'exp_gain', 'persuas', rand(1,2)
 				gs 'stat'
 				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/lake/lake.summer.jpg"></center>'

+ 10 - 5
locations/traits.qsrc

@@ -224,11 +224,16 @@ if $ARGS[0] = 'overnight':
 	
 	!! The effect of homework on the nerd trait is handle along with the grade calculations in gschool.qsrc
 	if kanikuli = 0 and week = 6:
-		!!This check has to be changed if the number of non-sport lessons ever changes (27 right now)
-		if pcs_traits['nerd_lessons'] > 20:
-			pcs_traits['nerd_points'] += pcs_traits['nerd_lessons'] - 17
-		elseif pcs_traits['nerd_lessons'] < 14:
-			pcs_traits['nerd_points'] -= iif(pcs_traits['nerd_status'] > 0, 5, 10)
+		if pcs_traits['nerd_point_gain_start'] = 1:
+			!!This check has to be changed if the number of non-sport lessons ever changes (27 right now)
+			if pcs_traits['nerd_lessons'] > 20:
+				pcs_traits['nerd_points'] += pcs_traits['nerd_lessons'] - 17
+			elseif pcs_traits['nerd_lessons'] < 14:
+				pcs_traits['nerd_points'] -= iif(pcs_traits['nerd_status'] > 0, 5, 10)
+			end
+		else
+			!! This is here such that you don''t get the point the first week, since it is only two days long.
+			pcs_traits['nerd_point_gain_start'] = 1
 		end
 		pcs_traits['nerd_lessons'] = 0
 	elseif university['semester_week'] > 0 and university['student'] = 1 and week = 5:

+ 14 - 14
locations/uni_lessons_electives1.qsrc

@@ -13,7 +13,7 @@ if $ARGS[0] = 'Computers 101':
 	!!gs 'grades', 'attend_class', 'uni_teaching_studies_semester_1', 'Computers 101'
 	gs 'exp_gain', 'intel', rand(0,1)
 	gs 'stat'
-	'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/computer/class.jpg"></center>'
+	'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/computer/class.jpg"></center>'
 	'You walk into the classroom and take a seat at one of the computer lab stations. The rest of your classmates walk in one by one before Mr. Blagov enters the classroom and closes the door. He turns to the class and starts today''s lecture.'
 	gs 'willpower', 'chore', 'self', iif(grupTipe = 4 and pcs_traits['nerd_status'] = 0, 'hard', iif(pcs_traits['nerd_status'] > 0, 'easy', 'medium'))
 	if pcs_traits['nerd_status'] = 2: will_cost = will_cost / 2
@@ -146,7 +146,7 @@ if $ARGS[0] = 'Art 101':
 	gs 'exp_gain', 'agil', rand(0,1)
 	gs 'exp_gain', 'artskls', rand(0,1)
 	gs 'stat'
-	'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+	'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 	'You walk into the classroom and see Mr. Ilyushin standing by his desk as the rest of your classmates walk in one by one under his watchful eye. You notice his eyes linger a bit longer on some of the prettier girls that are dressed in revealing clothes. Once everyone is seated, he starts talking about art and what it means while being his usual friendly and overly chatty self. He seems very passionate about art and not only loves to draw and paint, but discuss what art means and it''s history in the world.'
 	act 'Pay attention in class':
 		*clr & cla
@@ -235,11 +235,11 @@ if $ARGS[0] = 'art_101_model':
 	if university['semester_week'] < 8:
 		temprand = rand(1,5)
 		if temprand = 1:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'Today is a lesson about the history of art and the effects it has had on society throughout the ages. Mr. Ilyushin focuses on one time period where art made a real difference, as he puts it, in the world. The lecture goes by fairly quickly.'
 			act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
 		else
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point.' 
 			'He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. The class goes by fairly quickly.'
 			act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
@@ -247,7 +247,7 @@ if $ARGS[0] = 'art_101_model':
 	else
 		temprand = rand(1,10)
 		if temprand <= 3:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point.' 
 			'He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. The class goes by fairly quickly.'
 		elseif temprand <= 5:
@@ -276,17 +276,17 @@ if $ARGS[0] = 'art_101_model_igor':
 	if university['semester_week'] < 8:
 		temprand = rand(1,5)
 		if temprand = 1:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'Today is a lesson about the history of art and the effects it has had on society throughout the ages. Mr. Ilyushin focuses on one time period where art made a real difference, as he puts it, in the world. The lecture goes by fairly quickly and Igor seems really engrossed by it.'
 		else
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point.' 
 			'He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. Igor seems to do fairly decent and ends up asking more questions than most. The class goes by fairly quickly.'
 		end
 	else
 		temprand = rand(1,10)
 		if temprand <= 3:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point.' 
 			'He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. Igor seems to do fairly decent and ends up asking more questions than most.' 
 			'The class goes by fairly quickly.'
@@ -318,18 +318,18 @@ if $ARGS[0] = 'art_101_model_feofan':
 	if university['semester_week'] < 8:
 		temprand = rand(1,5)
 		if temprand = 1:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'Today is a lesson about the history and art and the effects it has had on society throughout the ages. Mr. Ilyushin focuses on one time period where art made a real difference, as he puts it, in the world. Feofan seems semi bored with the class and keeps doodling instead of listening, but the lecture goes by fairly quickly.'
 			act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
 		else
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point. Feofan mutters something about how he didn''t take art class to draw a bowl of fruit as Mr. Ilyushin walks around the class checking on each student, stopping to give pointers or answer questions as needed. The class goes by fairly quickly.'
 			act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
 		end
 	else
 		temprand = rand(1,10)
 		if temprand <= 3:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point. Feofan mutters something about he didn''t take art class to draw a bowl of fruit as Mr. Ilyushin walks around the class checking on each student, stopping to give pointers or answer questions as needed.' 
 			'The class goes by fairly quickly.'
 		elseif temprand <= 5:
@@ -359,12 +359,12 @@ if $ARGS[0] = 'art_101_model_natasha':
 	if university['semester_week'] < 8:
 		temprand = rand(1,5)
 		if temprand = 1:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'Today is a lesson about the history and art and the effects it has had on society throughout the ages. Mr. Ilyushin focuses on one time period where art made a real difference, as he puts it, in the world. The lecture goes by fairly quickly.'
 			'You notice that Natasha appears to like this lecture as she appears very comfortable with theory.'
 			act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
 		else
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point. He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. The class goes by fairly quickly.'
 			'You notice that Natasha really concentrates on the subject and seems to be very comfortable with the lesson.'
 			act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
@@ -372,7 +372,7 @@ if $ARGS[0] = 'art_101_model_natasha':
 	else
 		temprand = rand(1,10)
 		if temprand <= 3:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point. He then walks around the class checking on each student, stopping to give pointers or answer questions as needed.'
 			'You notice that Natasha seems happy drawing the object and gets on with it, rarely needing guidance from the professor, but the class goes by fairly quickly.'
 		elseif temprand <= 5:

+ 10 - 10
locations/uni_lessons_electives2.qsrc

@@ -12,7 +12,7 @@ if $ARGS[0] = 'Computers 102':
 	!!gs 'grades', 'attend_class', 'uni_teaching_studies_semester_2', 'Computers 102'
 	gs 'exp_gain', 'intel', rand(0,1)
 	gs 'stat'
-	'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/computer/class.jpg"></center>'
+	'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/computer/class.jpg"></center>'
 	'You walk into the classroom and take a seat at one of the computer lab stations. The rest of your classmates walk in one by one before Mr. Blagov enters the classroom and closes the door. He turns to the class and starts today''s lecture.'
 	gs 'willpower', 'chore', 'self', iif(grupTipe = 4 and pcs_traits['nerd_status'] = 0, 'hard', iif(pcs_traits['nerd_status'] > 0, 'easy', 'medium'))
 	if pcs_traits['nerd_status'] = 2: will_cost = will_cost / 2
@@ -146,7 +146,7 @@ if $ARGS[0] = 'Art 102':
 	gs 'exp_gain', 'agil', rand(0,1)
 	gs 'exp_gain', 'artskls', rand(0,1)
 	gs 'stat'
-	'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+	'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 	'You walk into the classroom and see Mr. Ilyushin standing by his desk as the rest of your classmates walk in one by one under his watchful eye. You notice his eyes linger a bit longer on some of the prettier girls that are dressed in revealing clothes. Once everyone is seated, he starts talking about art and what it means while being his usual friendly and overly chatty self. He seems very passionate about art and not only loves to draw and paint, but discuss what art means and it''s history in the world.'
 	act 'Pay attention in class':
 		*clr & cla
@@ -235,7 +235,7 @@ if $ARGS[0] = 'art_102_model':
 	if university['semester_week'] < 8:
 		temprand = rand(1,10)
 		if temprand <= 3:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point.' 
 			'He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. The class goes by fairly quickly.'
 		elseif temprand <= 5:
@@ -255,7 +255,7 @@ if $ARGS[0] = 'art_102_model':
 	else
 		temprand = rand(1,10)
 		if temprand <= 3:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point.' 
 			'He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. The class goes by fairly quickly.'
 		elseif temprand <= 5:
@@ -282,7 +282,7 @@ if $ARGS[0] = 'art_102_model_igor':
 	if university['semester_week'] < 8:
 		temprand = rand(1,10)
 		if temprand <= 3:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point.' 
 			'He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. Igor seems to do fairly decent and ends up asking more questions than most. The class goes by fairly quickly.'
 		elseif temprand <= 5:
@@ -303,7 +303,7 @@ if $ARGS[0] = 'art_102_model_igor':
 	else
 		temprand = rand(1,10)
 		if temprand <= 3:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point.' 
 			'He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. Igor seems to do fairly decent and ends up asking more questions than most. The class goes by fairly quickly.'
 		elseif temprand <= 5:
@@ -330,7 +330,7 @@ if $ARGS[0] = 'art_102_model_feofan':
 	if university['semester_week'] < 8:
 		temprand = rand(1,10)
 		if temprand <= 3:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point.' 
 			'He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. Feofan mutters something about he didn''t take art class to draw a bowl of fruit as Mr. Ilyushin walks around the class checking on each student, stopping to give pointers or answer questions as needed. The class goes by fairly quickly.'
 		elseif temprand <= 5:
@@ -352,7 +352,7 @@ if $ARGS[0] = 'art_102_model_feofan':
 	else
 		temprand = rand(1,10)
 		if temprand <= 3:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point.' 
 			'He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. Feofan mutters something about he didn''t take art class to draw a bowl of fruit as Mr. Ilyushin walks around the class checking on each student, stopping to give pointers or answer questions as needed. The class goes by fairly quickly.'
 		elseif temprand <= 5:
@@ -380,7 +380,7 @@ if $ARGS[0] = 'art_102_model_natasha':
 	if university['semester_week'] < 8:
 		temprand = rand(1,10)
 		if temprand <= 3:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point.' 
 			'He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. This is a theory lesson which Natasha is clearly comfortable with and she doesn''t require any assistance from the lecturer. The class goes by fairly quickly.'
 		elseif temprand <= 5:
@@ -401,7 +401,7 @@ if $ARGS[0] = 'art_102_model_natasha':
 	else
 		temprand = rand(1,10)
 		if temprand <= 3:
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/class.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 			'After he finishes his lecture, Mr. Ilyushin brings out a fairly mundane everyday object and places it on the raised platform. He slides the platform to the center of the room so it''s easy for everyone to see, then asks everyone to draw the object from their vantage point.' 
 			'He then walks around the class checking on each student, stopping to give pointers or answer questions as needed. Natasha concentrates hard on the lecture and is clearly comfortable with a theory lesson. The lecturer didn''t need to come over to her and could concentrate on helping some of the other students. The class goes by fairly quickly.'
 		elseif temprand <= 5:

+ 12 - 12
locations/uni_lessons_electivesev1.qsrc

@@ -13,29 +13,29 @@ if $ARGS[0] = 'computers_101':
 	uni_event_hour = 1
 	temp = rand(1,15)
 	if temp <= 2:
-		'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/computer/eatme.jpg"></center>'
+		'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/computer/eatme.jpg"></center>'
 		'As Mr. Blagov continues his lecture, you notice a boy sitting next to you looking past you. You turn your head and glance over to see a girl making the ''eat me'' sign with her fingers and tongue at him. You shake your head and go back to focusing on the lecture.'
 		act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
-		act 'Wait for Anushka': gt 'uni_lessons_electives1', 'comp_nush'
+		act 'Wait for Anushka': gt 'uni_lessons_electivesev1', 'comp_nush'
 	elseif temp <= 4:
-		'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/computer/girl_wedgie.jpg"></center>'
+		'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/computer/girl_wedgie.jpg"></center>'
 		'During the short break in the middle of class, you hear a girl squeal and glance over in time to see her get a massive front and back wedgie from her friends as they pull her panty straps almost up to her shoulders. She laughs and promises dire consequences to them, which they just laugh off. Mr. Blagov then asks everyone to take their seats again and the rest of class flies by with nothing else of interest happening.'
 		act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
-		act 'Wait for Anushka': gt 'uni_lessons_electives1', 'comp_nush'
+		act 'Wait for Anushka': gt 'uni_lessons_electivesev1', 'comp_nush'
 	elseif temp <= 6:
-		'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/computer/side_nipple.jpg"></center>'
+		'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/computer/side_nipple.jpg"></center>'
 		'As Mr. Blagov continues his lecture, you glance over and notice the girl just ahead of you wearing a loose shirt that''s open at the side, with no bra. As she leans forward in her seat, you can see her bare breast and nipple. You hear a few other whispers and can tell you''re not the only one to have noticed as you quickly focus back on the lecture.'
 		gs 'arousal', 'erotic', 1
 		gs 'stat'
 		act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
-		act 'Wait for Anushka': gt 'uni_lessons_electives1', 'comp_nush'
+		act 'Wait for Anushka': gt 'uni_lessons_electivesev1', 'comp_nush'
 	elseif temp <= 8:
-		'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/computer/thong_exposed.jpg"></center>'
+		'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/computer/thong_exposed.jpg"></center>'
 		'During the short break in the middle of class, many of the students gather around one of the desks. One of the students seems to have found something of interest, but you never find out what as a girl in front of you pulls up the back of her skirt to show off her thong clad ass and everyone is soon more interested in her antics. After spending a few minutes basking in the attention, she pulls her skirt back down and returns to her seat. Mr. Blagov soon asks everyone to take their seats again and the rest of class flies by with nothing else of interest happening.'
 		gs 'arousal', 'erotic', 1
 		gs 'stat'
 		act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
-		act 'Wait for Anushka': gt 'uni_lessons_electives1', 'comp_nush'
+		act 'Wait for Anushka': gt 'uni_lessons_electivesev1', 'comp_nush'
 	elseif temp = 9:
 		'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril1.jpg"></center>'
 		if anushkaQW['djibril_sex'] >= 1:
@@ -425,7 +425,7 @@ if $ARGS[0] = 'computers_101':
 		'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/lecture<<rand(1,5)>>.jpg"></center>'
 		'As you sit listening to the lesson, you look around hoping something interesting will happen, but nothing does.'
 		act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
-		act 'Wait for Anushka': gt 'uni_lessons_electives1', 'comp_nush'
+		act 'Wait for Anushka': gt 'uni_lessons_electivesev1', 'comp_nush'
 	end
 end
 
@@ -509,15 +509,15 @@ if $ARGS[0] = 'art_101':
 	uni_event_hour = 1
 	!!temp = rand(1,10)
 	!!if temp = 1:
-		!!'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/girl_goofing.jpg"></center>'
+		!!'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/girl_goofing.jpg"></center>'
 		!!'Placeholder text'
 		!!act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
 	!!elseif temp = 2:
-		!!'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/art/girls_dryhump.jpg"></center>'
+		!!'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/girls_dryhump.jpg"></center>'
 		!!'Text for future events'
 		!!act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
 	!!else
-		'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom/class.jpg"></center>'
+		'<center><img <<$set_imgh>> src="images/locations/island/university/classroom/electives/art/class.jpg"></center>'
 		'As you sit listening to the lesson, you look around hoping something interesting will happen, but nothing does.'
 		act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
 	!!end

+ 1 - 1
locations/vanrPar.qsrc

@@ -49,7 +49,7 @@ if $ARGS[0] = '':
 			act '<b>Return to the hallway</b>': gt 'korrPar'
 		end
 	elseif vanr_lock = 1:
-		act 'Unlatch the door and leave': vanr_lock = 0 & gt 'kuhrPar'
+		act 'Unlatch the door and leave': vanr_lock = 0 & gt 'korrPar'
 	end
 
 	gs 'din_van', 'private'

+ 28 - 6
locations/version.qsrc

@@ -2,27 +2,49 @@
 
 act 'Return': gt 'start'
 
+'0.9.0.1'
+'- Anushka and the boys living in the city so their story can be started in the city or picked up again in the city content by nutluck with code from HotMike'
+'- New sauna scene for Vicky''s house invite, to replace the beach scene during the winter.(Virgin/Lesbian Safe) - Derryth_Love'
+'- Tit fucking scenes added to porn studio - Vengeance_11'
+'- Minor sex event between Marcus and Irina added to school - Vengeance_11'
+'- Sugarcube conversion being built entirely by steuchs, has its own IGDB entry for current demo build'
+'- new code testing program built and tested by netuttki'
+'- You can now select electives on uni starts text for them from nutluck and code by bgkjdgbizgblzdgbr'
+'- Generic reactions for chats at school linked after pending for some time, worked on by whole team but special mention to bg for the code.'
+'- fixed the underwear filters and added shop filters for underwear - KS'
+'- Heritage museum from BBZ01 with code from KS'
+'- Filters for shoes from KS'
+'- More modelling and porn talk options with Albina from hornguy6'
+'- Comments to the school chats for the new sub categories of uniform from BBZ01'
+'- Photography shop code overhaul from VOS/Hooded Silence'
+'- Big Katja nightclub content. Plus system for Katja doing things with out the player being there (sex/drugs), and changes to allow start of Katja''s quest in different states of her sexual progression, from bgkjdgbizgblzdgbr'
+'- Tanya dates revamped by BBZ01 with code from KS'
+'- Christina shower humiliation is now linear until her house unlocks, then resumes random thanks to Anya'
+'- Text edits from Vengeange_11, HotMike and hornguy6'
+'- Bug fixes from Kevin Smarts, hornguy6, Anya, bgkjdgbizgblzdgbr, HotMike, hornguy6, VOS, and netuttki'
+'- Image pack from Anya'
+
 '0.9'
-'- Stamina reworked to have meaning and work as limitor for exercising from bgkjdgbizgblzdgbr'
+'- Stamina reworked to have meaning and work as limiter for exercising from bgkjdgbizgblzdgbr'
 '- New 2023 splash screens at game start from Gwen'
 '- Random photo event added to park by HotMike'
 '- Small update on the City Nightclub. A full bar with menu, nomore prostitution but you can be picked up by a couple on the dance floor from bgkjdgbizgblzdgbr'
 '- Music store a bit more organic with some new bits from nutluck, coded by bgkjdgbizgblzdgbr'
 '- Sonia content relating to her fail from nutluck with code from bgkjdgbizgblzdgbr'
-'- Minor dilogue scenes added to pharmacy by BBZ01 with code from Hooded Silence'
+'- Minor dialogue scenes added to pharmacy by BBZ01 with code from Hooded Silence'
 '- Sleep should set to 100 if you have enough sleep now, and thousands of number separators added by Hooded Silence'
 '- various small things from hornguy6 (Idk)'
 '- New exercises for butt training and heavy weights to use the code below from Kevin Smarts'
 '- Code to allow training of butt and strength beyond 100 for bodybuilder Sveta from bgkjdgbizgblzdgbr'
 '- View bodysuit in stat window thanks to jeep91'
-'- The Uni Cafe now uses the system for bying food introduced with The Coffee Hole - bgkjdgbizgblzdgbr'
-'- new Katya events at Coffe hole and Uni from bgkjdgbizgblzdgbr'
-'- Clothing now tracks exposure of pussy, butt and nipples with extention to inhib range for them and school uniform checks now include skimpy tops by Kevin Smarts'
+'- The Uni Café now uses the system for bying food introduced with The Coffee Hole - bgkjdgbizgblzdgbr'
+'- new Katya events at Coffee hole and Uni from bgkjdgbizgblzdgbr'
+'- Clothing now tracks exposure of pussy, butt and nipples with extension to inhib range for them and school uniform checks now include skimpy tops by Kevin Smarts'
 '- small QoL fix to the stats display to add a date suffix based on the event generator system from Hooded Silence'
 '- Default school and sports uniforms now set by button in wardrobe and short cut to change into sports in suitable locations by Kevin Smarts'
 '- Can now end the rental agreement in shared apartment from Kevin Smarts'
 '- Starting willpower adjustment to fit lower max for various school groups from nutluck'
-'- filters for underwear and disposal for unwanted boidysuits from Kevin Smarts'
+'- filters for underwear and disposal for unwanted bodysuits from Kevin Smarts'
 '- Text edits from Vengeange_11, HotMike and nutluck'
 '- Bug fixes from Kevin Smarts, hornguy6, Derryth_Love, maankamara, Hooded Silence, Sword, bgkjdgbizgblzdgbr, noobtrain, 3xpurt, jeep91, Unstable.Egghead, HotMike and Anya.'
 '- Image pack from Anya (dev pack 0.9.0)'

+ 384 - 236
tools/callvalidator.py

@@ -10,14 +10,255 @@ from io import open
 from time import perf_counter_ns
 import xml.etree.ElementTree as ET
 from textwrap import wrap
+from typing import List
+from threading import Thread
+from difflib import SequenceMatcher
 
-runtime = [0,0,0,0,0,0,0,0,0,0]
+
+def createcallFileList(callFileList: List) -> None:
+    validationTarget = ''
+    if len(sys.argv) > 2 and "file=" in str(sys.argv[2]):
+        validationTarget = sys.argv[2].replace("file=", "")
+        callFileList = [join(vdir, sys.argv[2].replace("file=", ""))]
+        validate = 'file'
+        
+    if len(sys.argv) > 2 and "list=" in str(sys.argv[2]):
+        validationTarget = sys.argv[2].replace("list=", "")
+        validationListFile = join(sys.argv[3].replace("folder=", ""), sys.argv[2].replace("list=", ""))
+        try:
+            tree = ET.parse(validationListFile)
+            root = tree.getroot()
+            for file in root.iter('Location'):
+                callFileList.append(join(file.attrib['folder'] if "folder" in file.attrib.keys() else idir, "%s.qsrc" % file.attrib['name'].replace('$', '_')))
+        except:
+            try: 
+                with open(validationListFile, 'r', encoding='utf-8') as ifile:
+                    lines = ifile.readlines()
+                    for index, line in enumerate(lines):
+                        temp = line.strip(" \r\n\t").split(";")
+                        file = temp[0].strip(" \t")
+                        if ".qsrc" not in file:
+                            raise SyntaxError()
+                            raise SyntaxError("Incorrect file content: '<filename>[; <folder>] expected, found %s." % line,(validationListFile, index, 1, 'if ".qsrc" not in temp[0].strip(" \t"):', index, len(line)))
+                        if len(temp) == 2:
+                            callFileList.append(join(temp[1].strip(" \t"),file))
+                        else:
+                            callFileList.append(join(idir,file))
+                    #endfor
+                #endwith
+            except SyntaxError as e:
+                raise SystemExit("Invalid list filed: %s" % e.msg)
+            #endtry   
+        #endtry  
+        validate = 'list'
+    #endif <- "list="
+
+    if validate == 'all':
+        validationTarget = idir
+        callFileList = [join(idir,f) for f in listdir(idir) if ".qsrc" in f]
+    #endif
+#enddef createValidationList()
+
+def buildValidCallsList(locationFileList) -> None:
+    # Build the list of valid calls
+    linecount = []
+    for file in locationFileList:
+        with open(join(idir, file), 'rt', encoding='utf-8', newline="\n") as ifile:
+            lines = ifile.readlines()
+            linecount.append({"file": file, "lc": len(lines)})
+            location = lines[0].strip(' #\r\n').strip(' ')
+            if location not in locationList: 
+                locationList.append(location)
+                lcLocationList.append(location.lower())
+            blockComment = False
+
+            for line in lines:
+                #getting locations
+                workline = line.strip(' \t\r\n')
+                locationsInLine = []
+                isCommentedLine = blockComment
+                
+                match = re.search(calledLinePattern, workline)
+                if match != None:
+                    potLine = re.findall(findLocationValues, workline)
+                    if not blockComment and re.search(blockCommentStart, workline) != None: 
+                        blockComment = True
+                        isCommentedLine = True
+                    if not blockComment and re.search(commentLine, workline) != None: isCommentedLine = True
+                    if potLine != None: locationsInLine = potLine
+                    if blockComment and re.search(blockCommentEnd, workline) != None: blockComment = False                    
+                #endif
+
+                for match in locationsInLine: 
+                    record = {"location": location.lower(), "function": match, "isCommentLine": isCommentedLine}
+                    recordInv = {"location": location.lower(), "function": match, "isCommentLine": not isCommentedLine}
+                    if record not in validLocationCalls and recordInv not in validLocationCalls: 
+                        validLocationCalls.append({"location": location, 
+                                                "function": match, 
+                                                "isCommentLine": isCommentedLine})
+                        lcValidLocationCalls.append({"location": location.lower(), "function": match.lower()})
+                    elif recordInv in validLocationCalls:
+                        # if commentLine of recordInv is TRUE then set it to false.
+                        # if commentLine of recordInv is FALSE then leave it alone
+                        if recordInv["isCommentLine"]:
+                            index = validLocationCalls.index(recordInv)
+                            validLocationCalls[index]['isCommentLine'] = False
+                    #endif
+                #endfor <- match in locationsInLine
+            #endfor <- lineNo, line
+        #endwith
+    #endfor
+#enddef buildValidCallsList()
+
+def validCallsByLocationTXT(validLocationCalls: List) -> None:
+    with open('valid-calls-by-location.txt', 'w', encoding='utf-8') as ofile:
+        currLoc = ''
+        ofile.write("---- List of valid calls by location\n")
+        for call in validLocationCalls:
+            if call['location'] != currLoc:
+                ofile.write("\n")
+                ofile.write("  ---- %s -------------\n" % call['location'])
+                currLoc = call['location']
+            ofile.write("    '%s': Commented Line: %s\n" % (call['function'], call['isCommentLine']))
+#enddef validCallsByLocationTXT
+
+def validCallsByLocationMD(validLocationCalls: List) -> None:
+    with open('valid-calls-by-location.md', 'w', encoding='utf-8') as ofile:
+        ofile.write("## Valid Calls per Location")
+        currLoc = ''
+        for call in validLocationCalls:
+            if call['location'] != currLoc:
+                currLoc = call['location']
+                ofile.write("\n")
+                ofile.write("### %s" % currLoc)
+                ofile.write("\n")
+                ofile.write('| "Function" | Is Comment |\n')
+                ofile.write("| ---------- | ---------- |\n")
+            ofile.write("| `'%s'` | %s |\n" % (call['function'], call['isCommentLine']))
+        ofile.write("\n")
+#enddef validCallsByLocationMD
+def validCallsForTest(validLocationCalls) -> None:
+    with open('validcallsfortesting.txt', 'w', encoding='utf-8') as ofile:
+        for call in validLocationCalls:
+            if not call['isCommentLine']: ofile.write("%s:%s\n" % (call['location'], call['function'])) 
+#enddef validCallsForTest
+
+def invalidCallsMissingLocationsTXT(invalidLocations: List, callsWithTypos: List, missingLocations: List) -> None:
+    with open('invalid-calls-missing-locations.txt', 'w', encoding='utf-8') as ofile:
+        
+        ofile.write("----- Summary ------------------------------------------\n")
+        ofile.write("  Locations called incorrectly         : {:>4}\n".format(len(invalidLocations)))
+        ofile.write("    Location/File doesn't exist        : {:>4} [{:>3.2f}%%]\n".format(invalidLocationMissing,(invalidLocationMissing/len(invalidLocations))*100))
+        ofile.write("    Commented out code                 : {:>4} [{:>3.2f}%%]\n".format(invalidCommentLine, (invalidCommentLine/len(invalidLocations))*100))
+        ofile.write("    Value not expected/handled         : {:>4} [{:>3.2f}%%]\n".format(invalidFunctionMissing, (invalidFunctionMissing/len(invalidLocations))*100))
+        ofile.write("--------------------------------------------------------\n")
+        ofile.write("  Locations making incorrect calls     : {:>4}\n".format(locationsMakingInvalidCalls))
+        ofile.write("  Total number of invalid calls        : {:>4}\n".format(len(invalidCallsMade)))
+        ofile.write("    Calls made to non-existing location: {:>4} [{:>3.2f}%%]\n".format(invalidCallsToMissingLocation, (invalidCallsToMissingLocation/len(invalidCallsMade))*100))
+        ofile.write("    Location or File name has typo     : {:>4} [{:>3.2f}%%]\n".format(invalidCallsToDueToTypos,(invalidCallsToDueToTypos/len(invalidLocations))*100))
+        ofile.write("    Calls made to commented location   : {:>4} [{:>3.2f}%%]\n".format(invalidCallsToCommentedCode, (invalidCallsToCommentedCode/len(invalidCallsMade))*100))
+        ofile.write("    Calls made with unexpected value   : {:>4} [{:>3.2f}%%]\n".format(invalidCallsToMissingFunction, (invalidCallsToMissingFunction/len(invalidCallsMade))*100))
+        ofile.write("\n")
+        ofile.write("    Valid calls with typos             : {:>4} [{:>3.2f}%%]\n".format(validCallsWithTypos, (validCallsWithTypos/(len(locationCallList)-len(invalidCallsMade)))*100))
+        ofile.write("--------------------------------------------------------\n")
+        ofile.write("  Missing locations called             : {:>4}\n".format(len(missingLocations)))
+        ofile.write("--------------------------------------------------------\n")
+        ofile.write("\n")
+        ofile.write("\n")
+        ofile.write("{:^80}\n".format("---------- List of Invalid Calls by location ----------"))
+        currLoc = ''
+        for call in invalidLocations:
+            if call['location'] != currLoc:
+                ofile.write("\n")
+                ofile.write("  ---- %s -------------\n" % call['location'])
+                currLoc = call['location']
+            wrapis = wrap("  {:<34}: {}\n".format("'%s'" % call['function'], call['reason']), 125, subsequent_indent="{:<31}".format(' '), break_long_words=True)
+            for line in wrapis:           
+                ofile.write("%s\n" % line)
+        #endfor <- call in invalidLocations
+
+        ofile.write("\n")
+        ofile.write("{:^125}\n".format("---------- Invalid Calls made by location ----------"))
+        currLoc = ''
+        for call in invalidCallsMade:
+            if call['callinglocation'] != currLoc:
+                ofile.write("\n")
+                ofile.write("  ---- %s [%s]-------------\n" % (call['callinglocation'], call['file']))
+                currLoc = call['callinglocation']
+            ofile.write("Line {:>4}: {} '{}', '{}'\n".format(call['lineNo'], call['calltype'], call['location'], call['function']))
+            for line in wrap("%s%s" % (call['reason'].replace("`", "'"), " %s" % call['typo_msg'] if call['func_typo'] else ''), 120, initial_indent='    ', subsequent_indent='    ', break_long_words=True):
+                ofile.write("%s\n"%line)
+        #endfor <- call in invalidCallsMade
+
+        ofile.write("\n")
+        ofile.write("{:^125}\n".format("---------- Calls with typos made by location ----------"))
+        currLoc = ''
+        for call in callsWithTypos:
+            if call['callinglocation'] != currLoc:
+                ofile.write("\n")
+                ofile.write("  ---- %s [%s]-------------\n" % (call['callinglocation'], call['file']))
+                currLoc = call['callinglocation']
+            ofile.write("Line {:>4}: {}\n".format(call['lineNo'], call['typo_msg']))
+        #endfor <- call in callsWithTypos
+
+        ofile.write("\n")
+        ofile.write("{:^80}\n".format("---------- List of Missing Locations ----------"))
+        
+        ofile.write("\n")
+        for location in missingLocations:
+            ofile.write("  {:<25} [{}] \n".format(location, join(idir, "%s.qsrc" % location)))
+    #endwith
+#enddef invalidCallsMissingLocationsTXT
+
+def invalidCallsMissingLocationsMD(invalidLocations: List, callsWithTypos: List, missingLocations: List) -> None:
+    with open('invalid-calls-missing-locations.md', 'w', encoding='utf-8') as ofile:
+        ofile.write("## List of Invalid Calls\n")    
+        currLoc = ''
+        for call in invalidLocations:            
+            if call['location'] != currLoc:
+                currLoc = call['location']
+                ofile.write("\n")
+                ofile.write("### %s" % currLoc)
+                ofile.write("\n")
+                ofile.write('| "Function" | Is Comment |\n')
+                ofile.write("| ---------- | ---------- |\n")
+            ofile.write("| `%s` | %s |\n" % (call['function'], call['reason']))
+        ofile.write("\n")
+        ofile.write("---\n")
+        ofile.write("\n")
+        ofile.write("## Calls made by locations\n")
+        currLoc = ''
+        for call in invalidCallsMade:
+            if call['callinglocation'] != currLoc:
+                currLoc = call['callinglocation']
+                ofile.write("\n")
+                ofile.write("### %s\n" % call['callinglocation'])
+                ofile.write("\n")
+                ofile.write("| File | Line No. | Call | Reason |\n")
+                ofile.write("| ---- | -------- | ---- | ------ |\n")
+            ofile.write("| {} | {:>4} | `{} '{}', '{}'` | {} |\n".format(call['file'], call['lineNo'], call['calltype'], call['location'], call['function'], call['reason']))
+        ofile.write("\n")
+        ofile.write("---\n")
+        ofile.write("\n")
+        ofile.write("## List of Missing Locations\n")
+        ofile.write("\n")
+        ofile.write ("| Location | File |\n")
+        ofile.write ("| -------- | ---- |\n")
+        for location in missingLocations:
+            ofile.write("| %s | %s |\n" % (location, join(idir, "%s.qsrc" % location)))
+    #endwith
+#enddef invalidCallsMissingLocationsMD
+
+
+runtime = [0,0,0,0,0,0,0,0,0,0,0,0,0,0]
 runtime[0] = perf_counter_ns()
 
 idir = ''
 validLocationCalls = []
-locationFileList = []
+lcValidLocationCalls = []
 locationList = []
+lcLocationList = []
+locationFileList = []
 missingLocations = []
 locationCallList = []
 callFileList = []
@@ -34,9 +275,24 @@ callLinePattern = "(gt|gs|xgt|xgs)(?:\s*(?:'|\"))(\w+)(?:'|\")(?:(?:,\s*)(?:'|\"
 findCallLine = "(?:^\s*!+.*{)|(?:^[^!]*)(gt|gs|xgt|xgs)\s*(?:'|\")(\w+)(?:'|\")(?:(?:,\s*)(?:'|\")(\w+)(?:'|\"))?|(?:}[^{]*$)"
 calledLinePattern = "(?:^\s*!+.*{)|(?:(?:if|elseif)?\s*\(?\$?(?:ARGS|args)\[(?:0|i)\])(?:\s*(?:=|!|<|>|>=|=>|<=|=<)\s*(?:'|\"))(\w+)(?:'|\")|(?:}[^{]*$)"
 findLocationValues = "(?:(?:if|elseif)?\s*\(?\$?(?:ARGS|args)\[(?:0|i)\])(?:\s*(?:=|!|<|>|>=|=>|<=|=<)\s*(?:'|\"))(\w+)(?:'|\")"
+runtime_text = ['Initialising "global" variables',                      #0
+                "Initialise with Arguments",                            #1
+                "Build call file list and valid calls list (%d files)", #2
+                "Building call list [%d files]",                        #3
+                "Sorting and ordering the lists for the files",         #4
+                "Creating error type list [invalidLocations]",          #5
+                "Creating error type list [callsWithTypos]",            #6
+                "Generating file output",                               #7
+                "All is finished",                                      #8
+                "",                                                     #9
+                "",                                                     #10
+                "",                                                     #11
+                "",                                                     #12
+                ""]                                                     #13
 
-runtime_text = ["Setup started","Started callfile build","","","Sorting and ordering the lists for the files","","All is finished"]
 
+runtime[1] =  perf_counter_ns()
+print("0. %s: %d : %d: %d" % (runtime_text[0], runtime[0], runtime[1], runtime[1]-runtime[0] ))
 assert (len(sys.argv) == 2 or len(sys.argv) == 3 or len(sys.argv) == 4), "usage:\ncallvalidator.py source=<src_input_dir> [file=<filename> | list=<listfilename>] [folder=<folder>]"
 
 idir = str(sys.argv[1].replace("source=", ""))
@@ -46,100 +302,23 @@ if len(sys.argv) == 4:
 else:
     vdir = idir
 
-validationTarget = ''
-runtime[1] = perf_counter_ns()
-print("%s: %d: %d" % (runtime_text[0], runtime[1], runtime[1]-runtime[0] ))
-if len(sys.argv) > 2 and "file=" in str(sys.argv[2]):
-    validationTarget = sys.argv[2].replace("file=", "")
-    callFileList = [join(vdir, sys.argv[2].replace("file=", ""))]
-    validate = 'file'
-    
-if len(sys.argv) > 2 and "list=" in str(sys.argv[2]):
-    validationTarget = sys.argv[2].replace("list=", "")
-    validationListFile = join(sys.argv[3].replace("folder=", ""), sys.argv[2].replace("list=", ""))
-    try:
-        tree = ET.parse(validationListFile)
-        root = tree.getroot()
-        for file in root.iter('Location'):
-            callFileList.append(join(file.attrib['folder'] if "folder" in file.attrib.keys() else idir, "%s.qsrc" % file.attrib['name'].replace('$', '_')))
-    except:
-        try: 
-            with open(validationListFile, 'r', encoding='utf-8') as ifile:
-                lines = ifile.readlines()
-                for index, line in enumerate(lines):
-                    temp = line.strip(" \r\n\t").split(";")
-                    file = temp[0].strip(" \t")
-                    if ".qsrc" not in file:
-                        raise SyntaxError()
-                        raise SyntaxError("Incorrect file content: '<filename>[; <folder>] expected, found %s." % line,(validationListFile, index, 1, 'if ".qsrc" not in temp[0].strip(" \t"):', index, len(line)))
-                    if len(temp) == 2:
-                        callFileList.append(join(temp[1].strip(" \t"),file))
-                    else:
-                        callFileList.append(join(idir,file))
-                #endfor
-            #endwith
-        except SyntaxError as e:
-            raise SystemExit("Invalid list filed: %s" % e.msg)
-        #endtry   
-    #endtry  
-    validate = 'list'
-#endif <- "list="
-
-if validate == 'all':
-    validationTarget = idir
-    callFileList = [join(idir,f) for f in listdir(idir) if ".qsrc" in f]
-#endif
-
-# Build the list of valid calls
 locationFileList = [f for f in listdir(idir) if ".qsrc" in f and f not in fileToIgnore]
+
+callFileListThread = Thread(target=createcallFileList(callFileList), args=(callFileList,))
+validCallsListThread = Thread(buildValidCallsList(locationFileList), args=(locationFileList))
+
 runtime[2] = perf_counter_ns()
-runtime_text[2] = "Building valid calls list [%d files]" % len(locationFileList)
-print("%s: %d: %d" % (runtime_text[1], runtime[2], runtime[2]-runtime[1] ))
-for file in locationFileList:
-    with open(join(idir, file), 'rt', encoding='utf-8', newline="\n") as ifile:
-        lines = ifile.readlines()
-        location = lines[0].strip(' #\r\n').strip(' ')
-        if location not in locationList: locationList.append(location)
-        blockComment = False
-        for lineNo, line in enumerate(lines):
-            #getting locations
-            workline = line.strip(' \t\r\n')
-            locationsInLine = []
-            isCommentedLine = blockComment
-            match = re.search(calledLinePattern, workline)
-            if match != None:
-                potLine = re.findall(findLocationValues, workline)
-                if not blockComment and re.search(blockCommentStart, workline) != None: 
-                    blockComment = True
-                    isCommentedLine = True
-                if not blockComment and re.search(commentLine, workline) != None: isCommentedLine = True
-                if potLine != None: locationsInLine = potLine
-                if blockComment and re.search(blockCommentEnd, workline) != None: blockComment = False                    
-            #endif
+print("1. %s: %d : %d: %d" % (runtime_text[1], runtime[1], runtime[2], runtime[2]-runtime[1] ))
 
-            for match in locationsInLine: 
-                record = {"location": location, "function": match, "isCommentLine": isCommentedLine}
-                recordInv = {"location": location, "function": match, "isCommentLine": not commentLine}
-                if record not in validLocationCalls and recordInv not in validLocationCalls: 
-                    validLocationCalls.append({"location": location, 
-                                            "function": match, 
-                                            "isCommentLine": isCommentedLine})
-                elif recordInv in validLocationCalls:
-                    # if commentLine of recordInv is TRUE then set it to false.
-                    # if commentLine of recordInv is FALSE then leave it alone
-                    if recordInv["isCommentLine"]:
-                        index = validLocationCalls.index(recordInv)
-                        validLocationCalls[index]['isCommentLine'] = False
-                #endif
-            #endfor <- match in locationsInLine
-        #endfor <- lineNo, line
-    #endwith
-#endfor
+callFileListThread.start()
+validCallsListThread.start()
 
-# build a list of all the calls happening
+callFileListThread.join()
+validCallsListThread.join()
 runtime[3] = perf_counter_ns()
-runtime_text[3] = "Building call list [%d files]" % len(callFileList)  
-print("%s: %d: %d" % (runtime_text[2], runtime[3], runtime[3]-runtime[2] ))
+print("2. %s: %d : %d: %d" % (runtime_text[2] % len(locationFileList), runtime[2], runtime[3], runtime[3]-runtime[2] ))
+
+# build a list of all the calls happening
 for file in callFileList:
     with open(file, 'rt', encoding='utf-8', newline="\n") as ifile:
         lines = ifile.readlines()
@@ -148,6 +327,7 @@ for file in callFileList:
         for lineNo, line in enumerate(lines):
             workline = line.strip(' \t\n\r')
             match = None
+            msg = ''
             temp_match = re.search(findCallLine, workline)
             if temp_match != None and not [res for res in locationsToIgnore if res in workline.lower()]:
                 potLine = re.search(callLinePattern, workline)
@@ -158,66 +338,125 @@ for file in callFileList:
             
             if match != None:
                 valid = 0
-                reason = ""
-                searchRecordF = {"location": match.group(2), "function": '' if match.group(3) == None else match.group(3), "isCommentLine": False}
-                searchRecordT = {"location": match.group(2), "function": '' if match.group(3) == None else match.group(3), "isCommentLine": True}
-                if searchRecordF['function'] == '':
-                    if searchRecordF not in validLocationCalls: validLocationCalls.append(searchRecordF)
-                    valid = 1
-                    reason = ""
-                elif searchRecordF['location'] not in locationList:
+                func_typo = 0
+                loc_typo = 0
+                typo_msg = ""
+                loc_msg = ""
+                func_msg = "."
+                reason = ""            
+                loc = match.group(2)   
+                func = '' if match.group(3) == None else match.group(3) 
+                searchRecord = {"location": loc.lower(), "function": func.lower()}
+                if searchRecord['location'] not in lcLocationList:
                     valid = -1
-                    reason = "Location `%s` doesn't exist - No file containing this location was found in the specified folder." % (searchRecordF['location'])
-                    if searchRecordF['location'] not in missingLocations: missingLocations.append(searchRecordF['location'])
-                elif searchRecordT in validLocationCalls:
-                    valid = -2
-                    reason = "`%s, %s` exists but is either commented out or is in a comment block" % (searchRecordT['location'], searchRecordT['function'])
-                elif searchRecordF in validLocationCalls:
-                    valid = 1
-                    reason = ""
+                    reason = "Location `%s` doesn't exist - No file containing this location was found in the specified folder." % (loc)
+                    if loc not in missingLocations: missingLocations.append(loc)
                 else:
-                    valid = -3 
-                    reason = "Location `%s` exists but couldn't find any entrypoint expecting `%s` as $ARGS[0]. Please confirm whether this is a bug or not." % (searchRecordF['location'], searchRecordF['function'])
+                    if loc not in locationList:
+                        index = lcLocationList.index(searchRecord['location'])
+                        loc_typo = 1
+                        loc_msg = "The location name is '%s' not '%s'" % (locationList[index], loc) 
+                    #endif
+                    if searchRecord['function'] == '' and searchRecord not in lcValidLocationCalls:
+                        validLocationCalls.append({"location": loc, "function": '', "isCommentLine": False })
+                        lcValidLocationCalls.append(searchRecord)
+                    elif searchRecord in lcValidLocationCalls:
+                        index = lcValidLocationCalls.index(searchRecord)
+                        validL = validLocationCalls[index]
+                        if validL['function'] == func:
+                            if not validL['isCommentLine']:
+                                valid = 1
+                                reason = ""
+                            else:
+                                valid = -2
+                                reason = "`%s, %s` exists but is either commented out or is in a comment block" % (loc, func)                    
+                            #endif
+                        else:
+                            valid = -3
+                            reason = "Location `%s` exists but couldn't find any entrypoint expecting `%s` as $ARGS[0]. Please confirm whether this is a bug or not." % (loc, func)
+                            func_typo = 1
+                            if validL['isCommentLine']: 
+                                if loc_typo:
+                                    func_msg = " and $AGRS[0] has a case typo, it is '%s' not '%s'. Also, the correct call is a comment line or in a comment block." % (validL['function'], func)
+                                else:
+                                    func_msg = "$AGRS[0] has a case typo, it should be '%s' not '%s'. Also, the correct call is a comment line or in a comment block." % (validL['function'], func)
+                            else:
+                                if loc_typo:
+                                    func_msg = " and $AGRS[0] has a case typo, it is '%s' not '%s'." % (validL['function'], func)
+                                else:
+                                    func_msg = "$AGRS[0] has a case typo, it should be '%s' not '%s'." % (validL['function'], func)
+                            #endif
+                        #endif
+                    else:              
+                        strictness = 0.75       
+                        possible_funcs = []
+                        for f in (f['function'] for f in validLocationCalls if f['location'] == loc.lower() and 
+                                  f['function'] not in possible_funcs and 
+                                  f['function'] != func and 
+                                  ("%s_" % func) not in f['function'] and 
+                                  ("%s_" % f['function']) not in func):
+                            similarity = SequenceMatcher(None, func, f, strictness)
+                            if similarity.ratio() >= strictness:
+                                possible_funcs.append("'%s'" % f)
+
+                        valid = -3
+                        reason = "Location `%s` exists but couldn't find any entrypoint expecting `%s` as $ARGS[0]. Please confirm whether this is a bug or not." % (loc, func)
+                        if len(possible_funcs) > 0:
+                            reason += "\nThere may be a typo in the $ARGS[0] value passed. Some similar expected $ARGS[0] values are: %s" % ", ".join(possible_funcs)
+                    #endif
                 #endif    
+                if loc_typo or func_typo: typo_msg = "The call has %s. %s%s [%s]" % ("a typo" if func_typo != loc_typo else "typos", loc_msg, func_msg, "The call will fail" if func_typo else "The call will work")
 
                 locationCallList.append({"callinglocation": location, 
                                         "file": ifile.name, 
                                         "lineNo": lineNo+1, 
                                         "calltype": match.group(1), 
-                                        "location": match.group(2), 
-                                        "function": '' if match.group(3) == None else match.group(3), 
+                                        "location": loc, 
+                                        "function": func, 
                                         "valid": valid, 
-                                        "reason": reason})    
+                                        "reason": reason,
+                                        "loc_typo": loc_typo,
+                                        "func_typo": func_typo,
+                                        "typo_msg": typo_msg})   
+                i = 0 
             #endif# <- Match != None
         #endfor <- line in lines
     #endwith
 #endfor
 
 runtime[4] = perf_counter_ns()
-print("%s: %d: %d" % (runtime_text[3], runtime[4], runtime[4]-runtime[3] ))
+print("3. %s: %d : %d: %d" % (runtime_text[3] % len(callFileList), runtime[3],runtime[4], runtime[4]-runtime[3] ))
 
 missingLocations = sorted(missingLocations)
 validLocationCalls = sorted(validLocationCalls, key=lambda k: (k['location'].lower(), k['function']))
 invalidCallsMade = [call for call in locationCallList if call['valid'] < 0]
 invalidCallsMade = sorted(invalidCallsMade, key = lambda k: (k['callinglocation'].lower(), k['lineNo']))
 invalidLocations = []
+callsWithTypos = []
 invalidCallsToMissingLocation = 0
 invalidCallsToCommentedCode = 0
 invalidCallsToMissingFunction = 0
+invalidCallsToDueToTypos = 0
 invalidLocationMissing = 0
 invalidCommentLine = 0
 invalidFunctionMissing = 0
 locationsMakingInvalidCalls = 0
+validCallsWithTypos = 0
+
+runtime[5] = perf_counter_ns()
+print("4. %s: %d : %d: %d" % (runtime_text[4], runtime[4], runtime[5], runtime[5]-runtime[4] ))
 
 currLoc = ''
 for call in invalidCallsMade:
-    record = {"location": call['location'], "function": call['function'], "valid": call['valid'], "reason": call['reason']}
+    record = {"location": call['location'], "function": call['function'], "valid": call['valid'], "reason": call['reason'], "func_type": call['func_typo'], "loc_typo": call['loc_typo'], "typo_msg": call['typo_msg']}
     if call['callinglocation'] != '':
         locationsMakingInvalidCalls += 1
         currLoc = call['callinglocation']
     if call['valid'] == -1: invalidCallsToMissingLocation += 1
     if call['valid'] == -2: invalidCallsToCommentedCode += 1
     if call['valid'] == -3: invalidCallsToMissingFunction += 1
+    if call['func_typo']  : invalidCallsToDueToTypos += 1
+
     if record not in invalidLocations: 
         invalidLocations.append(record)
         if record['valid'] == -1: invalidLocationMissing += 1
@@ -225,126 +464,35 @@ for call in invalidCallsMade:
         if record['valid'] == -3: invalidFunctionMissing += 1
 invalidLocations = sorted(invalidLocations, key=lambda k: (k['location'].lower(), k['function'])) 
 
-runtime[5] = perf_counter_ns()
-print("%s: %d: %d" % (runtime_text[4], runtime[5], runtime[5]-runtime[4] ))
-
-with open('valid-calls-by-location.txt', 'w', encoding='utf-8') as ofile:
-    currLoc = ''
-    ofile.write("---- List of valid calls by location\n")
-    for call in validLocationCalls:
-        if call['location'] != currLoc:
-            ofile.write("\n")
-            ofile.write("  ---- %s -------------\n" % call['location'])
-            currLoc = call['location']
-        ofile.write("    '%s': Commented Line: %s\n" % (call['function'], call['isCommentLine']))
-
-with open('validcallsfortesting.txt', 'w', encoding='utf-8') as ofile:
-    for call in validLocationCalls:
-        if not call['isCommentLine']: ofile.write("%s:%s\n" % (call['location'], call['function'])) 
-
-with open('valid-calls-by-location.md', 'w', encoding='utf-8') as ofile:
-    ofile.write("## Valid Calls per Location")
-    currLoc = ''
-    for call in validLocationCalls:
-        if call['location'] != currLoc:
-            currLoc = call['location']
-            ofile.write("\n")
-            ofile.write("### %s" % currLoc)
-            ofile.write("\n")
-            ofile.write('| "Function" | Is Comment |\n')
-            ofile.write("| ---------- | ---------- |\n")
-        ofile.write("| `'%s'` | %s |\n" % (call['function'], call['isCommentLine']))
-    ofile.write("\n")
-
-with open('invalid-calls-missing-locations.txt', 'w', encoding='utf-8') as ofile:
-    
-    ofile.write("----- Summary ------------------------------------------\n")
-    ofile.write("  Locations called incorrectly         : {:>3}\n".format(len(invalidLocations)))
-    ofile.write("    Location/File doesn't exist        : {:>3} [{:>3.2f}%%]\n".format(invalidLocationMissing,(invalidLocationMissing/len(invalidLocations))*100))
-    ofile.write("    Commented out code                 : {:>3} [{:>3.2f}%%]\n".format(invalidCommentLine, (invalidCommentLine/len(invalidLocations))*100))
-    ofile.write("    Value not expected/handled         : {:>3} [{:>3.2f}%%]\n".format(invalidFunctionMissing, (invalidFunctionMissing/len(invalidLocations))*100))
-    ofile.write("--------------------------------------------------------\n")
-    ofile.write("  Locations making incorrect calls     : {:>3}\n".format(locationsMakingInvalidCalls))
-    ofile.write("  Total number of invalid calls        : {:>3}\n".format(len(invalidCallsMade)))
-    ofile.write("    Calls made to non-existing location: {:>3} [{:>3.2f}%%]\n".format(invalidCallsToMissingLocation, (invalidCallsToMissingLocation/len(invalidCallsMade))*100))
-    ofile.write("    Calls made to commented location   : {:>3} [{:>3.2f}%%]\n".format(invalidCallsToCommentedCode, (invalidCallsToCommentedCode/len(invalidCallsMade))*100))
-    ofile.write("    Calls made with unexpected value   : {:>3} [{:>3.2f}%%]\n".format(invalidCallsToMissingFunction, (invalidCallsToMissingFunction/len(invalidCallsMade))*100))
-    ofile.write("--------------------------------------------------------\n")
-    ofile.write("  Missing locations called             : {:>3}\n".format(len(missingLocations)))
-    ofile.write("--------------------------------------------------------\n")
-    ofile.write("\n")
-    ofile.write("\n")
-    ofile.write("{:^80}\n".format("---------- List of Invalid Calls by location ----------"))
-    currLoc = ''
-    for call in invalidLocations:
-        if call['location'] != currLoc:
-            ofile.write("\n")
-            ofile.write("  ---- %s -------------\n" % call['location'])
-            currLoc = call['location']
-        wrapis = wrap("  {:<34}: {}\n".format("'%s'" % call['function'], call['reason']), 125, subsequent_indent="{:<31}".format(' '), break_long_words=True)
-        for line in wrapis:           
-            ofile.write("%s\n" % line)
-    #endfor <- call in invalidLocations
-
-    ofile.write("\n")
-    ofile.write("{:^125}\n".format("---------- Calls made by location ----------"))
-    currLoc = ''
-    for call in invalidCallsMade:
-        if call['callinglocation'] != currLoc:
-            ofile.write("\n")
-            ofile.write("  ---- %s [%s]-------------\n" % (call['callinglocation'], call['file']))
-            currLoc = call['callinglocation']
-        ofile.write("Line {:>4}: {} '{}', '{}'\n".format(call['lineNo'], call['calltype'], call['location'], call['function']))
-        for line in wrap(call['reason'].replace("`", "'"), 90, initial_indent='    ', subsequent_indent='    ', break_long_words=True):
-            ofile.write("%s\n"%line)
-    #endfor <- call in invalidCallsMade
-
-    ofile.write("\n")
-    ofile.write("{:^80}\n".format("---------- List of Missing Locations ----------"))
-    
-    ofile.write("\n")
-    for location in missingLocations:
-        ofile.write("  {:<25} [{}] \n".format(location, join(idir, "%s.qsrc" % location)))
-#endwith
-
-with open('invalid-calls-missing-locations.md', 'w', encoding='utf-8') as ofile:
-    ofile.write("## List of Invalid Calls\n")    
-    currLoc = ''
-    for call in invalidLocations:            
-        if call['location'] != currLoc:
-            currLoc = call['location']
-            ofile.write("\n")
-            ofile.write("### %s" % currLoc)
-            ofile.write("\n")
-            ofile.write('| "Function" | Is Comment |\n')
-            ofile.write("| ---------- | ---------- |\n")
-        ofile.write("| `%s` | %s |\n" % (call['function'], call['reason']))
-    ofile.write("\n")
-    ofile.write("---\n")
-    ofile.write("\n")
-    ofile.write("## Calls made by locations\n")
-    currLoc = ''
-    for call in invalidCallsMade:
-        if call['callinglocation'] != currLoc:
-            currLoc = call['callinglocation']
-            ofile.write("\n")
-            ofile.write("### %s\n" % call['callinglocation'])
-            ofile.write("\n")
-            ofile.write("| File | Line No. | Call | Reason |\n")
-            ofile.write("| ---- | -------- | ---- | ------ |\n")
-        ofile.write("| {} | {:>4} | `{} '{}', '{}'` | {} |\n".format(call['file'], call['lineNo'], call['calltype'], call['location'], call['function'], call['reason']))
-    ofile.write("\n")
-    ofile.write("---\n")
-    ofile.write("\n")
-    ofile.write("## List of Missing Locations\n")
-    ofile.write("\n")
-    ofile.write ("| Location | File |\n")
-    ofile.write ("| -------- | ---- |\n")
-    for location in missingLocations:
-        ofile.write("| %s | %s |\n" % (location, join(idir, "%s.qsrc" % location)))
-#end
-
 runtime[6] = perf_counter_ns()
-print("%s: %d: %d" % (runtime_text[5], runtime[6], runtime[6]-runtime[5] ))
-print(runtime_text[6])
+print("5. %s: %d : %d: %d" % (runtime_text[5], runtime[5], runtime[6], runtime[6]-runtime[5] ))
+
+##endfor for call in locationCallList
+callsWithTypos = [call for call in locationCallList if call['loc_typo'] or call['func_typo']]
+validCallsWithTypos = len(callsWithTypos)
+callsWithTypos = sorted(callsWithTypos, key=lambda k: (k['callinglocation'].lower(), k['lineNo'])) 
+
+runtime[7] = perf_counter_ns()
+print("6. %s: %d : %d: %d" % (runtime_text[6], runtime[6], runtime[7], runtime[7]-runtime[6] ))
+
+fileThread1 = Thread(target=validCallsByLocationTXT(validLocationCalls), args=(validLocationCalls,))
+#fileThread2 = Thread(target=validCallsByLocationMD(validLocationCalls), args=(validLocationCalls,))
+fileThread3 = Thread(target=validCallsForTest(validLocationCalls), args=(validLocationCalls,))
+fileThread4 = Thread(target=invalidCallsMissingLocationsTXT(invalidLocations, callsWithTypos, missingLocations), args=(invalidLocations, callsWithTypos, missingLocations))
+#fileThread5 = Thread(target=invalidCallsMissingLocationsMD(invalidLocations, callsWithTypos, missingLocations), args=(invalidLocations, callsWithTypos, missingLocations))
+
+fileThread1.start()
+#fileThread2.start()
+fileThread3.start()
+fileThread4.start()
+#fileThread5.start()
+
+fileThread1.join()
+#fileThread2.join()
+fileThread3.join()
+fileThread4.join()
+#fileThread5.join()
 
+runtime[8] = perf_counter_ns()
+print("7. %s: %d : %d: %d" % (runtime_text[7], runtime[7], runtime[8], runtime[8]-runtime[7] ))
+print("8. %s: %d : %d: %d" % (runtime_text[8], runtime[0], runtime[8], runtime[8]-runtime[0] ))

+ 1 - 1
tools/glife-validate.qproj

@@ -74,7 +74,7 @@
 		<Location name="internet_mobile"/>
 	</Folder>
 	<Folder name="Body">
-		<Location name="ApperanceSystem"/>
+		<Location name="AppearanceSystem"/>
 		<Location name="body"/>
 		<Location name="body_desc"/>
 		<Location name="lact_lib"/>