19 Комити 911b7a7de6 ... 7c5747e714

Аутор SHA1 Порука Датум
  LinaHirata 7c5747e714 [fixed] missing `end` in `city_musicstore` пре 4 месеци
  anjuna krokus c4c7994800 [fixed] bugs related to the new body_structure file пре 4 месеци
  anjuna krokus 043d1041ad [fixed] bug due to wrong filename пре 4 месеци
  anjuna krokus 57ef478f83 Merge branch 'master' of https://git.tfgames.site/Kevin_Smarts/glife пре 4 месеци
  Kevin_Smarts 648411998c Merge branch 'master' of https://git.tfgames.site/Kevin_Smarts/glife пре 4 месеци
  anjuna krokus 1bdfdbe6c8 [added] body_structure. A file which handles the various classes that Sveta's body can be in. Centralises the descriptions, images, and appearance bonusses from bmi and strenbuf пре 4 месеци
  Vengeance_11 3b0058cc5c Text edits and (hopefully) fixed missing acts пре 4 месеци
  anjuna krokus e45f3a6817 Merge branch 'master' of https://git.tfgames.site/Kevin_Smarts/glife пре 4 месеци
  anjuna krokus f4b06743e7 [fixed] forgotten UpdateBaseAppearance in cheatmenu_din пре 4 месеци
  Kevin_Smarts 369519b1e0 Merge remote-tracking branch 'origin/master' пре 4 месеци
  anjuna krokus f8150e854d [fixed] ensured that salocatnow behaves as previously. Will eventually fully fase out salocatnow пре 4 месеци
  anjuna krokus c3dbecdd00 [changed] Rolled UpdateBaseAppearance and body_desc into the daily body update. Fixed the spelling error in the UpdateBaseAppearance function пре 4 месеци
  anjuna krokus 8ea093ec59 Merge branch 'master' of https://git.tfgames.site/Kevin_Smarts/glife пре 4 месеци
  hornguy6 a7f3affaa5 [fixed] missing exits from the church пре 4 месеци
  anjuna krokus b705e314b8 [forgot to update the "mid" function in the invert_color and color_is dark functions пре 4 месеци
  Vengeance_11 2e011901d3 Text edits пре 4 месеци
  anjuna krokus fb9e87080b [added/fixed] Invert_color now works with and without a leading #. Updated the black/white calculation and extracted it to a "color_is_dark" function пре 4 месеци
  Kevin_Smarts a82bcff3c7 Merge remote-tracking branch 'Felix/master' пре 4 месеци
  Kevin_Smarts 288240a898 [fixed] modification for large breasts making tops more risque was applied only when wearing the outfit. пре 4 месеци

+ 1 - 0
glife.qproj

@@ -93,6 +93,7 @@
 		<Location name="AppearanceSystem"/>
 		<Location name="body"/>
 		<Location name="body_desc"/>
+		<Location name="body_structure"/>
 		<Location name="lact_lib"/>
 		<Location name="lact_bp"/>
 		<Location name="body_din"/>

+ 3 - 65
locations/AppearanceSystem.qsrc

@@ -21,7 +21,7 @@ if $ARGS[0] = '':
 	killvar 'groomingPenalty'
 end
 
-if $args[0] = 'UpdateBaseAppearnce':
+if $args[0] = 'UpdateBaseAppearance':
 	!{
 		Base Appearance is updated once a day at midnight and called from cikl
 		Base Appearance is calculated from:
@@ -138,72 +138,10 @@ if $ARGS[0] = 'SetBodyShapeBonus':
 
 	!!Setting the pcs_apprnc bonus based on fat and strength
 	else
-		if pcs_bmi < 16:
-			!! severely underweight
-			tempBodyShapeBonus = -10
-		elseif pcs_bmi < 19:
-			!! underweight
-			tempBodyShapeBonus = 25
-		elseif pcs_bmi < 25:
-			!! healthy weight
-			tempBodyShapeBonus = 50
-		elseif pcs_bmi < 30:
-			!! overweight
-			tempBodyShapeBonus = 25
-		elseif pcs_bmi < 35:
-			!! moderately obese
-			tempBodyShapeBonus = 10
-		elseif pcs_bmi < 40:
-			!! severely obese
-			tempBodyShapeBonus = -15
-		elseif pcs_bmi < 45:
-			!! very severely obese
-			tempBodyShapeBonus = -40
-		else
-			!! morbidly obese
-			tempBodyShapeBonus = -80
-		end
-
 		if succubusflag = 1:
-			tempBodyShapeBonus += 10
+			temp_BodyShapeBonus = func('body_structure', 'appearance_bonus', pcs_bmi, 80)
 		else
-			if strenbuf <= 5:
-				tempBodyShapeBonus -= 30
-			elseif strenbuf <= 10:
-				tempBodyShapeBonus -= 20
-			elseif strenbuf <= 15:
-				tempBodyShapeBonus -= 15
-			elseif strenbuf <= 25:
-				tempBodyShapeBonus -= 10
-			elseif strenbuf <= 35:
-				tempBodyShapeBonus -= 5
-			elseif strenbuf <= 50:
-				tempBodyShapeBonus += 0
-			elseif strenbuf <= 70:
-				tempBodyShapeBonus += 5
-			elseif strenbuf <= 100:
-				tempBodyShapeBonus += 10
-			elseif strenbuf <= 110:
-				tempBodyShapeBonus += 5
-			elseif strenbuf <= 120:
-				tempBodyShapeBonus += 0
-			elseif strenbuf <= 130:
-				tempBodyShapeBonus -= 5
-			elseif strenbuf <= 140:
-				tempBodyShapeBonus -= 15
-			elseif strenbuf <= 150:
-				tempBodyShapeBonus -= 30
-			elseif strenbuf <= 160:
-				tempBodyShapeBonus -= 45
-			elseif strenbuf <= 170:
-				tempBodyShapeBonus -= 60
-			elseif strenbuf <= 180:
-				tempBodyShapeBonus -= 75
-			elseif strenbuf <= 190:
-				tempBodyShapeBonus -= 100
-			else
-				tempBodyShapeBonus -= 130
-			end
+			temp_BodyShapeBonus = func('body_structure', 'appearance_bonus', pcs_bmi, strenbuf)
 		end
 
 		!!This modifies bodykoef for high or low pcs_mass['body'] values

+ 3 - 3
locations/Cheatmenu_din.qsrc

@@ -209,7 +209,7 @@ $cheatmenu['bodyMod'] = {
 	'Changing body shape does not resize clothes.'
 	'May cause adverse interactions, use at your own risk!'
 	''
-	'You are currently <<$body>>.'
+	'You are currently <<$bodyVars[''desc'']>>.'
 	''
 	'You may select from the following sizes:'
 	''
@@ -873,8 +873,8 @@ $cheatmenu['looks'] = {
 	if pcs_lip > 0:'<a href="exec:pcs_lip -= 1 & dynamic $cheatmenu[''looks'']">Shrink lips</a>'
 	*nl
 	'<<$skin>>'
-	if pcs_skin < 900: '<a href="exec:pcs_skin += 200 & gs ''AppearanceSystem'', ''UpdateBaseAppearnce'' & dynamic $cheatmenu[''looks'']">Improve skin</a>'
-	if pcs_skin > 0: '<a href="exec:pcs_skin -= 200 & gs ''AppearanceSystem'', ''UpdateBaseAppearnce'' & dynamic $cheatmenu[''looks'']">Worsen skin</a>'
+	if pcs_skin < 900: '<a href="exec:pcs_skin += 200 & gs ''AppearanceSystem'', ''UpdateBaseAppearance'' & dynamic $cheatmenu[''looks'']">Improve skin</a>'
+	if pcs_skin > 0: '<a href="exec:pcs_skin -= 200 & gs ''AppearanceSystem'', ''UpdateBaseAppearance'' & dynamic $cheatmenu[''looks'']">Worsen skin</a>'
 	if pcs_tan >= 0:'<a href="exec:pcs_tan += 10 & dynamic $cheatmenu[''looks'']">Become tanned</a>'
 	if pcs_tan > 0:'<a href="exec:pcs_tan = 0 & dynamic $cheatmenu[''looks'']">Remove tan</a>'
 	*nl

+ 4 - 4
locations/MartinSex.qsrc

@@ -102,7 +102,7 @@ if $ARGS[0] = '':
 				'You don''t know when this thing with Martin went from friendly chats and idle flirts to something else, but there is a tingling in your belly, and lower, when you look at him that you would very much like to act on...'
 				'And since Martin is trying his best to hide his interest and it doesn''t look like he is gonna do you the favor of making the first step, you will have to take matters into your own hands.'
 				*nl
-				'You flirt more aggressively than you have up until now: You smile more,' + iif(pcs_hairlng>81,' play with your <<$pc_descWordy[''hair length'']>>,','') + ' touch his arm every now and then, even move and lean over in ways that give him good looks at your <<$pc_desc[''breast'']>> cleavage or <<$body>> butt - in other words, you drop about as many hints as womanly possible, short of stripping right then and there.'
+				'You flirt more aggressively than you have up until now: You smile more,' + iif(pcs_hairlng>81,' play with your <<$pc_descWordy[''hair length'']>>,','') + ' touch his arm every now and then, even move and lean over in ways that give him good looks at your <<$pc_desc[''breast'']>> cleavage or <<$bodyVars[''desc'']>> butt - in other words, you drop about as many hints as womanly possible, short of stripping right then and there.'
 				*nl
 				'Twenty minutes pass like that and you are starting to wonder if Martin is playing hard to get or if he really is oblivious to what you''re doing... when he visibly catches himself staring at your <<$pc_desc[''lip gloss'']>> lips and suddenly declares: "You shouldn''t get involved with me."'
 				'"Excuse me?" You are so astonished by what he said that you are almost sure you misheard him.'
@@ -429,7 +429,7 @@ if $ARGS[0] = '':
 			'But you decide not to indulge him today. After all, you are a respectable woman who would <b>never</b> have sex in a public place, right?'
 			*nl
 			'So instead, you just have a normal chat with Martin. Well, as normal as can be in this situation.'
-			'You catch up on the day-to-day' + iif($MartinHobby!'',', your <<$MartinHobby>>,','') + ' and talk about a few other trivial things, but this conversation is at regular intervals interrupted by double entendres, kisses, you giving Martin generous looks at your <<$pc_desc[''breast'']>> cleavage and <<$body>> ass, and other things you cannot or will not do while the bar is open.'
+			'You catch up on the day-to-day' + iif($MartinHobby!'',', your <<$MartinHobby>>,','') + ' and talk about a few other trivial things, but this conversation is at regular intervals interrupted by double entendres, kisses, you giving Martin generous looks at your <<$pc_desc[''breast'']>> cleavage and <<$bodyVars[''desc'']>> ass, and other things you cannot or will not do while the bar is open.'
 			*nl
 			'After about half an hour of talking, among other things, you decide that you should let Martin finish up for the night. After a final goodnight kiss, you leave the bar with a tingly stomach, your mind still lingering at the bulge in his pants and all the things you could do with him instead of talking...'
 			gs 'arousal', 'kiss', 5
@@ -668,7 +668,7 @@ if $ARGS[0] = 'MartinTease3':
 
 		if analplugin = 0:
 			*nl
-			'Considering how reluctant he was to let you "settle for an old man", he seems to be awfully happy about that same young <<$body>> woman stripping and exposing her privates to him.'
+			'Considering how reluctant he was to let you "settle for an old man", he seems to be awfully happy about that same young <<$bodyVars[''desc'']>> woman stripping and exposing her privates to him.'
 		else
 			analplugin = 0
 			minut += 1
@@ -826,7 +826,7 @@ if $ARGS[0] = 'MartinTease4':
 				if analplugin = 0:
 					*nl
 					'"Maybe a little better than okay," he smirks.'
-					'Considering how reluctant he was to let you "settle for an old man", he seems to be awfully happy about teasing that same young <<$body>> woman while she''s stripping and exposing her privates to him.'
+					'Considering how reluctant he was to let you "settle for an old man", he seems to be awfully happy about teasing that same young <<$bodyVars[''desc'']>> woman while she''s stripping and exposing her privates to him.'
 				else
 					analplugin = 0
 					minut += 1

+ 1 - 1
locations/MartinTalk.qsrc

@@ -121,7 +121,7 @@ if $ARGS[0] = '':
 		*nl
 		'"You''re skinny," he observes.'
 		'"Excuse me?"' 
-		'You ' + iif($body='skinny','would call yourself skinny, too, but','see yourself as <<$body>> rather than skinny, so') + ' you don''t really see why he would bring this up.'
+		'You ' + iif($bodyVars['desc']='skinny','would call yourself skinny, too, but','see yourself as <<$bodyVars[''desc'']>> rather than skinny, so') + ' you don''t really see why he would bring this up.'
 		*nl
 		'"Are you eating right, <<$pcs_firstname>>?" He inquires, completely ignoring your visible confusion.'
 		'"Uh... I guess. Wait, you didn''t, by any chance, talk to my mother, did you?"'

+ 4 - 57
locations/_body_image.qsrc

@@ -3,66 +3,13 @@
 !for example, you can   VIEW FUNC('$body_image', 'body')   to view body image in popup window, and
 !pl $body_image_msg     to display extra texts
 
-!{
-if $ARGS[0] = 'BMI':
-	!!BMI Descriptions
-	if pcs_bmi < 16:
-		$bmi_desc = 'You are severely underweight.'
-	elseif pcs_bmi < 19:
-		$bmi_desc = 'You are underweight'
-	elseif pcs_bmi < 25:
-		$bmi_desc = 'You have a normal, healthy weight.'
-	elseif pcs_bmi < 30:
-		$bmi_desc = 'You are overweight.'
-	elseif pcs_bmi < 35:
-		$bmi_desc = 'You are moderately obese.'
-	elseif pcs_bmi < 40:
-		$bmi_desc = 'You are severely obese.'
-	elseif pcs_bmi < 45:
-		$bmi_desc = 'You are very severely obese.'
-	else
-		$bmi_desc = 'You are morbidly obese.'
-	end
-end
-}
 
 $body_image_msg = ''
 if $ARGS[0] = 'body':
-!!	This displays the body image; $bodimgsets[x9] is the folder name
-	if (knowpreg = 1 or (preg = 1 and thinkpreg = 1) or (preg = 1 and PregChem > 3600)) and bodset = 3:
-		if PregChem > 6216:
-			$result = 'images/pc/body/shape/<<$bodimgsets[((bodset * 10)+9)]>>/8.jpg'
-		elseif PregChem < 2688:
-			$result = 'images/pc/body/shape/<<$bodimgsets[((bodset * 10)+9)]>>/0.jpg'
-		else
-			$result = 'images/pc/body/shape/<<$bodimgsets[((bodset * 10)+9)]>>/<<((PregChem - 2184)/504)>>.jpg'
-		end
-	elseif pcs_bmi < 15 or (pcs_bmi = 15 and pcs_bmi[1] <= 1):
-		$result = 'images/pc/body/shape/0.jpg'
-	elseif pcs_bmi < 19 or (pcs_bmi = 19 and pcs_bmi[1] = 0):
-		$result = 'images/pc/body/shape/<<$bodimgsets[((bodset * 10) + 9)]>>/1.jpg'
-	elseif pcs_bmi < 22 or (pcs_bmi = 22 and pcs_bmi[1] < 5):
-		$result = 'images/pc/body/shape/<<$bodimgsets[((bodset * 10) + 9)]>>/2.jpg'
-	elseif pcs_bmi < 26:
-		$result = 'images/pc/body/shape/<<$bodimgsets[((bodset * 10) + 9)]>>/3.jpg'
-	elseif pcs_bmi < 29 or (pcs_bmi = 29 and pcs_bmi[1] < 5):
-		$result = 'images/pc/body/shape/<<$bodimgsets[((bodset * 10) + 9)]>>/4.jpg'
-	elseif pcs_bmi < 32 or (pcs_bmi = 32 and pcs_bmi[1] < 9):
-		$result = 'images/pc/body/shape/<<$bodimgsets[((bodset * 10) + 9)]>>/5.jpg'
-	elseif pcs_bmi < 36 or (pcs_bmi = 36 and pcs_bmi[1] < 4):
-		if imgset6ovr[bodset] = 1:
-			$result = 'images/pc/body/shape/<<$bodimgsets[((bodset * 10) + 9)]>>/6.jpg'
-		else
-			$result = 'images/pc/body/shape/6.jpg'
-		end
-	else
-		if imgset7ovr[bodset] = 1:
-			$result = 'images/pc/body/shape/<<$bodimgsets[((bodset * 10) + 9)]>>/7.jpg'
-		else
-			$result = 'images/pc/body/shape/7.jpg'
-		end
-	end
-	$body_image_msg += 'You are <<pcs_hgt>>cm tall and <<$body>>'
+	!!!! $result = func('body_bmi_stren', 'body_img', pcs_bmi, 'strenbuf')
+	$bodyVars['img'] = func('body_structure', 'body_img', pcs_bmi, 'strenbuf')
+	$result = $bodyVars['img']
+	$body_image_msg += 'You are <<pcs_hgt>>cm tall and <<$bodyVars[''desc'']>>'
 end
 
 if $ARGS[0] = 'coat':

+ 28 - 56
locations/body.qsrc

@@ -129,8 +129,6 @@ if $ARGS[0] = 'DailyUpdate':
 	end
 
 	gs 'body', 'RegularUpdate'
-	gs 'body', 'UpdateBodyImage'
-
 
 	gs 'body', 'Update_daily_body_other'
 
@@ -158,13 +156,37 @@ if $ARGS[0] = 'DailyUpdate':
 
 	gs 'body', 'Update_Teeth'
 
+	gs 'body', 'Update_Appearance'
+
 	!skin variable reset
 	killvar 'moisturizerDailyCount'
 	killvar 'skinDailyGain'
 	killvar 'skinDailyPenalty'
+	
+end
+
+if $ARGS[0] = 'Update_Appearance':
+	gs 'body', 'UpdateBodyImage'
+	gs 'AppearanceSystem', 'UpdateBaseAppearance'
+	gs 'body_desc'
 end
 
 
+	!!-------------------------    UPDATE images   -------------------------!!
+
+if $ARGS[0] = 'UpdateBodyImage':
+	!Update body image set
+	if dounspell = 1:
+		salocatnow = (pcs_hips / 10) - 5
+	end
+
+	$bodyVars['desc'] = func('body_structure', 'body_desc', pcs_bmi, strenbuf)
+	$bodyVars['img'] = func('body_structure', 'body_img', pcs_bmi, strenbuf)
+	$bodyVars['bmi_desc'] = func('body_structure', 'bmi_desc', pcs_bmi, strenbuf)
+end
+
+
+
 	!!-------------------------    UPDATE eyelashes, hair, pubes, teeth   -------------------------!!
 
 if $ARGS[0] = 'Update_Eyelashes':
@@ -263,56 +285,6 @@ if $ARGS[0] = 'Update_Teeth':
 end
 
 
-	!!-------------------------    UPDATE images   -------------------------!!
-
-if $ARGS[0] = 'UpdateBodyImage':
-	!Update body image set
-	if dounspell = 1:
-		salocatnow = (pcs_hips / 10) - 5
-	end
-
-	if bdsetlock = 1:
-		bodset = fixbodset
-	else
-		if knowpreg = 1 or (preg = 1 and (thinkpreg = 1 or PregChem > 3600)):
-			bodset = 3
-		elseif strenbuf >= 100 and stren_plus_lvl > 0:
-			bodset = 2
-		elseif strenbuf <= 50:
-			bodset = 0
-		else
-			bodset = 1
-		end
-	end
-
-	! Update body description
-	if bodset = 3 and (knowpreg = 1 or (preg = 1 and (thinkpreg = 1 or PregChem > 3600))):
-		if PregChem > 6216:
-			$body = $bodimgsets[bodset * 10 + 8]
-		elseif PregChem < 2688:
-			$body = $bodimgsets[bodset * 10]
-		else
-			$body = $bodimgsets[bodset * 10 + (PregChem - 2688) / 504 + 1]
-		end
-	elseif pcs_bmi < 15 or (pcs_bmi = 15 and pcs_bmi[1] <= 1):
-		$body = $bodimgsets[bodset * 10 + 0]
-	elseif pcs_bmi < 19 or (pcs_bmi = 19 and pcs_bmi[1] = 0):
-		$body = $bodimgsets[bodset * 10 + 1]
-	elseif pcs_bmi < 22 or (pcs_bmi = 22 and pcs_bmi[1] <= 4):
-		$body = $bodimgsets[bodset * 10 + 2]
-	elseif pcs_bmi < 26:
-		$body = $bodimgsets[bodset * 10 + 3]
-	elseif pcs_bmi < 29 or (pcs_bmi = 29 and pcs_bmi[1] <= 4):
-		$body = $bodimgsets[bodset * 10 + 4]
-	elseif pcs_bmi < 32 or (pcs_bmi = 32 and pcs_bmi[1] <= 8):
-		$body = $bodimgsets[bodset * 10 + 5]
-	elseif pcs_bmi < 36 or (pcs_bmi = 36 and pcs_bmi[1] <= 3):
-		$body = $bodimgsets[bodset * 10 + 6]
-	else
-		$body = $bodimgsets[bodset * 10 + 7]
-	end
-end
-
 
 
 
@@ -566,10 +538,10 @@ end
 
 if $ARGS[0] = 'Calc_salocat':
 	!!This calculates the current pcs_mass['body'] category; ranges are 20 points, seemed to balance best if the range is x10 the hip devisor
-	if pcs_mass['body'] < 10:
+	if pcs_mass['body'] + pcs_mass['butt'] < 10:
 		result = 0
 	else
-		result = 1 + (pcs_mass['body'] - 10) / 20
+		result = (pcs_mass['body'] + pcs_mass['butt'] + 10) / 20
 	end
 end
 
@@ -863,7 +835,7 @@ if $ARGS[0] = 'softreset':
 	end
 
 	!!Updates pcs_apprncbase after a reset
-	gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+	gs 'body', 'Update_Appearance'
 
 	!!Clears the warning and reset status flags if they were set
 	bodyresetflag = 0
@@ -930,7 +902,7 @@ if $ARGS[0] = 'hardreset':
 		killvar 'dounsplkil'
 		newbdsp = 1
 		dounspell = 0
-		gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+		gs 'body', 'Update_Appearance'
 		gs 'body', 'Update_Body'
 		gs 'stat'
 	end

+ 1 - 18
locations/body_desc.qsrc

@@ -186,24 +186,7 @@ if $ARGS[0] = 'anus':
 end
 
 if $ARGS[0] = 'BMI':
-	!!BMI Descriptions
-	if pcs_bmi < 16:
-		$bmi_desc = 'You are severely underweight.'
-	elseif pcs_bmi < 19:
-		$bmi_desc = 'You are underweight'
-	elseif pcs_bmi < 25:
-		$bmi_desc = 'You have a normal, healthy weight.'
-	elseif pcs_bmi < 30:
-		$bmi_desc = 'You are overweight.'
-	elseif pcs_bmi < 35:
-		$bmi_desc = 'You are moderately obese.'
-	elseif pcs_bmi < 40:
-		$bmi_desc = 'You are severely obese.'
-	elseif pcs_bmi < 45:
-		$bmi_desc = 'You are very severely obese.'
-	else
-		$bmi_desc = 'You are morbidly obese.'
-	end
+	$bodyVars['bmi_desc'] = func('body_structure', 'bmi_desc', pcs_bmi, strenbuf)
 end
 
 if $ARGS[0] = 'breasts':

+ 344 - 0
locations/body_structure.qsrc

@@ -0,0 +1,344 @@
+# body_structure
+
+if $ARGS[0] = 'get_class':
+	if ARGS[1] <= 15:
+		result = 0
+	elseif ARGS[1] <= 18:
+		result = 100
+	elseif ARGS[1] <= 21:
+		result = 200
+	elseif ARGS[1] <= 24:
+		result = 300
+	elseif ARGS[1] <= 29:
+		result = 400
+	elseif ARGS[1] <= 34:
+		result = 500
+	elseif ARGS[1] <= 39:
+		result = 600
+	elseif ARGS[1] <= 44:
+		result = 700
+	else
+		result = 800
+	end
+
+	if ARGS[2] <= 5:
+		result += 0
+	elseif ARGS[2] <= 10:
+		result += 1
+	elseif ARGS[2] <= 15:
+		result += 2
+	elseif ARGS[2] <= 25:
+		result += 3
+	elseif ARGS[2] <= 35:
+		result += 4
+	elseif ARGS[2] <= 50:
+		result += 5
+	elseif ARGS[2] <= 70:
+		result += 6
+	elseif ARGS[2] <= 100:
+		result += 7
+	elseif ARGS[2] <= 110:
+		result += 8
+	elseif ARGS[2] <= 120:
+		result += 9
+	elseif ARGS[2] <= 130:
+		result += 10
+	elseif ARGS[2] <= 140:
+		result += 11
+	elseif ARGS[2] <= 150:
+		result += 12
+	elseif ARGS[2] <= 160:
+		result += 13
+	elseif ARGS[2] <= 170:
+		result += 14
+	elseif ARGS[2] <= 180:
+		result += 15
+	elseif ARGS[2] <= 190:
+		result += 16
+	else
+		result += 17
+	end
+end
+
+if $ARGS[0] = 'bmi_desc':
+	if arrsize('ARGS') = 1: ARGS[1] = pcs_bmi
+	if arrsize('ARGS') = 2: ARGS[2] = strenbuf
+	bs_temp_bs_class = func('body_structure', 'get_class', ARGS[1], ARGS[2])
+
+	if bs_temp_bs_class < 100:
+		$result = 'You are severely underweight.'
+	elseif bs_temp_bs_class < 200:
+		$result = 'You are underweight'
+	elseif bs_temp_bs_class < 300:
+		$result = 'You have a normal, healthy weight.'
+	elseif bs_temp_bs_class < 400:
+		$result = 'You have a normal, healthy weight.'
+	elseif bs_temp_bs_class < 500:
+		$result = 'You are overweight.'
+	elseif bs_temp_bs_class < 600:
+		$result = 'You are moderately obese.'
+	elseif bs_temp_bs_class < 700:
+		$result = 'You are severely obese.'
+	elseif bs_temp_bs_class < 800:
+		$result = 'You are very severely obese.'
+	else
+		$result = 'You are morbidly obese.'
+	end
+
+	killvar 'bs_temp_bs_class'
+end
+
+! For succubus call this as func('body_structure', pcs_bmi, 90)
+if $ARGS[0] = 'appearance_bonus':
+	if arrsize('ARGS') = 1: ARGS[1] = pcs_bmi
+	if arrsize('ARGS') = 2: ARGS[2] = strenbuf
+	bs_temp_bs_class = func('body_structure', 'get_class', ARGS[1], ARGS[2])
+
+	if bs_temp_bs_class < 100:
+		!! severely underweight
+		result = -10
+	elseif bs_temp_bs_class < 200:
+		!! underweight
+		result = 25
+	elseif bs_temp_bs_class < 300:
+		!! healthy weight
+		result = 50
+	elseif bs_temp_bs_class < 400:
+		!! healthy weight
+		result = 50
+	elseif bs_temp_bs_class < 500:
+		!! overweight
+		result = 25
+	elseif bs_temp_bs_class < 600:
+		!! moderately obese
+		result = 10
+	elseif bs_temp_bs_class < 700:
+		!! severely obese
+		result = -15
+	elseif bs_temp_bs_class < 800:
+		!! very severely obese
+		result = -40
+	else
+		!! morbidly obese
+		result = -80
+	end
+
+	bs_temp_bs_class = bs_temp_bs_class mod 100
+
+	if bs_temp_bs_class = 0:
+		result -= 30
+	elseif bs_temp_bs_class = 1:
+		result -= 20
+	elseif bs_temp_bs_class = 2:
+		result -= 15
+	elseif bs_temp_bs_class = 3:
+		result -= 10
+	elseif bs_temp_bs_class = 4:
+		result -= 5
+	elseif bs_temp_bs_class = 5:
+		result += 0
+	elseif bs_temp_bs_class = 6:
+		result += 5
+	elseif bs_temp_bs_class = 7:
+		result += 10
+	elseif bs_temp_bs_class = 8:
+		result += 5
+	elseif bs_temp_bs_class = 9:
+		result += 0
+	elseif bs_temp_bs_class = 10:
+		result -= 5
+	elseif bs_temp_bs_class = 11:
+		result -= 15
+	elseif bs_temp_bs_class = 12:
+		result -= 30
+	elseif bs_temp_bs_class = 13:
+		result -= 45
+	elseif bs_temp_bs_class = 14:
+		result -= 60
+	elseif bs_temp_bs_class = 15:
+		result -= 75
+	elseif bs_temp_bs_class = 16:
+		result -= 100
+	else
+		result -= 130
+	end
+
+	killvar 'bs_temp_bs_class'
+end
+
+
+if $ARGS[0] = 'body_img':
+	if bdsetlock = 0 and (knowpreg = 1 or (preg = 1 and (thinkpreg = 1 or PregChem > 3600))):
+		if PregChem <= 2687:
+			$result = 'images/pc/body/shape/default_preg/0.jpg'
+		elseif PregChem <= 6215:
+			$result = 'images/pc/body/shape/default_preg/<<((PregChem - 2184)/504)>>.jpg'
+		else
+			$result = 'images/pc/body/shape/default_preg/8.jpg'
+		end
+		exit
+	end
+
+	if arrsize('ARGS') = 1: ARGS[1] = pcs_bmi
+	if arrsize('ARGS') = 2: ARGS[2] = strenbuf
+	bs_temp_bs_class = func('body_structure', 'get_class', ARGS[1], ARGS[2])
+
+	if bdsetlock = 1:
+		if fixbodset = 0:
+			bs_temp_bs_class = 100 * (bs_temp_bs_class / 100) + 4
+		elseif fixbodset = 1:
+			bs_temp_bs_class = 100 * (bs_temp_bs_class / 100) + 6
+		else
+			bs_temp_bs_class = 100 * (bs_temp_bs_class / 100) + 8
+		end
+	end
+
+
+	! starving:
+	if bs_temp_bs_class <= 17:
+		$result = 'images/pc/body/shape/0.jpg'
+
+	! underweight
+	elseif bs_temp_bs_class <= 105:
+		$result = 'images/pc/body/shape/default_low/1.jpg'
+	elseif bs_temp_bs_class <= 107:
+		$result = 'images/pc/body/shape/default_mid/1.jpg'
+	elseif bs_temp_bs_class <= 117:
+		$result = 'images/pc/body/shape/default_high/1.jpg'
+
+	! slender
+	elseif bs_temp_bs_class <= 205:
+		$result = 'images/pc/body/shape/default_low/2.jpg'
+	elseif bs_temp_bs_class <= 207:
+		$result = 'images/pc/body/shape/default_mid/2.jpg'
+	elseif bs_temp_bs_class <= 217:
+		$result = 'images/pc/body/shape/default_high/2.jpg'
+
+	! healthy
+	elseif bs_temp_bs_class <= 305:
+		$result = 'images/pc/body/shape/default_low/3.jpg'
+	elseif bs_temp_bs_class <= 307:
+		$result = 'images/pc/body/shape/default_mid/3.jpg'
+	elseif bs_temp_bs_class <= 317:
+		$result = 'images/pc/body/shape/default_high/3.jpg'
+
+	! overweight
+	elseif bs_temp_bs_class <= 405:
+		$result = 'images/pc/body/shape/default_low/4.jpg'
+	elseif bs_temp_bs_class <= 407:
+		$result = 'images/pc/body/shape/default_mid/4.jpg'
+	elseif bs_temp_bs_class <= 417:
+		$result = 'images/pc/body/shape/default_high/4.jpg'
+
+	! moderately obese
+	elseif bs_temp_bs_class <= 517:
+	elseif bs_temp_bs_class <= 505:
+		$result = 'images/pc/body/shape/default_low/5.jpg'
+	elseif bs_temp_bs_class <= 507:
+		$result = 'images/pc/body/shape/default_mid/5.jpg'
+	elseif bs_temp_bs_class <= 517:
+		$result = 'images/pc/body/shape/default_high/5.jpg'
+
+	! severely obese
+	elseif bs_temp_bs_class <= 617:
+		$result = 'images/pc/body/shape/6.jpg'
+
+	! very severely obese
+	elseif bs_temp_bs_class <= 717:
+		$result = 'images/pc/body/shape/7.jpg'
+
+	! morbidly obese
+	else
+		$result = 'images/pc/body/shape/8.jpg'
+	end
+
+	killvar 'bs_temp_bs_class'
+end
+
+
+if $ARGS[0] = 'body_desc':
+	if knowpreg = 1 or (preg = 1 and (thinkpreg = 1 or PregChem > 3600)):
+		if PregChem <= 2687:
+			$result = 'pregnant, but not showing'
+		elseif PregChem <= 3191:
+			$result = 'glowing'
+		elseif PregChem <= 3695:
+			$result = 'starting to show'
+		elseif PregChem <= 4199:
+			$result = 'clearly showing'
+		elseif PregChem <= 4703:
+			$result = 'fairly pregnant'
+		elseif PregChem <= 5207:
+			$result = 'quite pregnant'
+		elseif PregChem <= 5711:
+			$result = 'very pregnant'
+		elseif PregChem <= 6215:
+			$result = 'extremely pregnant'
+		else
+			$result = 'ready to pop'
+		end
+		exit
+	end
+
+
+	if arrsize('ARGS') = 1: ARGS[1] = pcs_bmi
+	if arrsize('ARGS') = 2: ARGS[2] = strenbuf
+	bs_temp_bs_class = func('body_structure', 'get_class', ARGS[1], ARGS[2])
+
+	! starving:
+	if bs_temp_bs_class <= 17:
+		$result = 'starving'
+
+	! underweight
+	elseif bs_temp_bs_class <= 105:
+		$result = 'underweight'
+	elseif bs_temp_bs_class <= 107:
+		$result = 'slight'
+	elseif bs_temp_bs_class <= 117:
+		$result = 'wiry'
+
+	! slender
+	elseif bs_temp_bs_class <= 205:
+		$result = 'slender'
+	elseif bs_temp_bs_class <= 207:
+		$result = 'skinny'
+	elseif bs_temp_bs_class <= 217:
+		$result = 'lean'
+
+	! healthy
+	elseif bs_temp_bs_class <= 305:
+		$result = 'healthy'
+	elseif bs_temp_bs_class <= 307:
+		$result = 'toned'
+	elseif bs_temp_bs_class <= 317:
+		$result = 'ripped'
+
+	! overweight
+	elseif bs_temp_bs_class <= 405:
+		$result = 'overweight'
+	elseif bs_temp_bs_class <= 407:
+		$result = 'curvy'
+	elseif bs_temp_bs_class <= 417:
+		$result = 'heavy set'
+
+	! moderately obese
+	elseif bs_temp_bs_class <= 517:
+		$result = 'moderately obese'
+
+	! severely obese
+	elseif bs_temp_bs_class <= 617:
+		$result = 'severely obese'
+
+	! very severely obese
+	elseif bs_temp_bs_class <= 717:
+		$result = 'very severely obese'
+
+	! morbidly obese
+	else
+		$result = 'morbidly obese'
+	end
+
+	killvar 'bs_temp_bs_class'
+end
+
+--- body_structure ---------------------------------

+ 0 - 2
locations/cikl.qsrc

@@ -683,8 +683,6 @@ gs 'stat_sklattrib', 'daycall'
 
 !Update body measurements and base appearnce
 gs 'body', 'DailyUpdate'
-gs 'AppearanceSystem', 'UpdateBaseAppearnce'
-gs 'body_desc'
 
 
 if husband > 0 and husbandrink ! 11:husbandrink = rand(0, 10)

+ 6 - 6
locations/city_clinic.qsrc

@@ -221,7 +221,7 @@ if $ARGS[0] = 'start':
 				pcs_brace = 0
 				pcs_teeth -= 1
 				'The dentist spends 15 minutes taking off your brace and cleaning up. You look in the mirror afterwards and your teeth are '+iif(pcs_teeth = 0, 'now straight', 'straighter, but can still use some more work.')
-				gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+				gs 'AppearanceSystem', 'UpdateBaseAppearance'
 				gs 'stat'
 			else
 				if pcs_missing_teeth = 1:
@@ -259,7 +259,7 @@ if $ARGS[0] = 'start':
 								pcs_teeth = -1
 								'You pay the dentist to brighten and polish your teeth and an hour later, your smile is much brighter and more attractive.'
 							end
-							gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+							gs 'AppearanceSystem', 'UpdateBaseAppearance'
 							gs 'stat'
 
 							act 'Leave the clinic': minut += 5 & gt 'city_residential'
@@ -282,7 +282,7 @@ if $ARGS[0] = 'start':
 								pcs_teeth = -1
 								'You pay the dentist to brighten and polish your teeth and an hour later, your smile is much brighter and more attractive.'
 							end
-							gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+							gs 'AppearanceSystem', 'UpdateBaseAppearance'
 							gs 'stat'
 
 							act 'Leave the clinic': minut += 5 & gt 'city_residential'
@@ -335,7 +335,7 @@ if $ARGS[0] = 'start':
 							money -= 4500
 							minut += 60
 							glass = 2
-							gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+							gs 'AppearanceSystem', 'UpdateBaseAppearance'
 							gs 'stat'
 							'You buy a new, more stylish pair of glasses.'
 
@@ -348,7 +348,7 @@ if $ARGS[0] = 'start':
 							karta -= 4500
 							minut += 60
 							glass = 2
-							gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+							gs 'AppearanceSystem', 'UpdateBaseAppearance'
 							gs 'stat'
 							'You buy a new, more stylish pair of glasses.'
 
@@ -383,7 +383,7 @@ if $ARGS[0] = 'start':
 							minut += 60
 							blizoruk = 0
 							glass = 0
-							gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+							gs 'AppearanceSystem', 'UpdateBaseAppearance'
 							gs 'stat'
 							'You undergo laser eye surgery. Your eyesight is much better now.'
 							act 'Return to the entrance': gt 'city_clinic', 'start'

+ 1 - 1
locations/city_experimental_trials_events.qsrc

@@ -269,7 +269,7 @@ elseif $experimentQW['trial_active'] = 'pill_yellow':
 		pcs_tan += 2
 	end
 
-	gs 'body', 'UpdateBaseAppearnce'
+	gs 'body', 'UpdateBaseAppearance'
 
 
 !! Change butt

+ 7 - 7
locations/city_island.qsrc

@@ -44,24 +44,24 @@ if streetevent_hour + 2 < hour:gt'street_event','city_island', 'main'
 
 gs 'street_event', 'city_island', 'extras'
 
-if func('homes_properties', 'has_access', 'university_dorm') :act '<b>GO HOME</b> (University dorm)':gt 'uni_dorm', 'start'
+if func('homes_properties', 'has_access', 'university_dorm'): act 'Return to your dorm': gt 'uni_dorm', 'start'
 
-if car > 0 and cardrive = 25:'Your <a href="exec:GS ''carF'', ''start''"><<$car>></a> stands in the parking lot.'
+if car > 0 and cardrive = 25: 'Your <a href="exec:GS ''carF'', ''start''"><<$car>></a> stands in the parking lot.'
 
 if hour >= 4 and hour < 23:
 	act 'Walk to the Metro': gt 'metro', 'start'
 end
 
-act 'Wait':gs 'obj_din', 'wait'
+act 'Wait': gs 'obj_din', 'wait'
 
 gs 'taxi'
 gs 'camera', 'check_location'
 
 if hour >= 8 and hour <= 22:
 	'The <a href="exec: minut += 3 & gt ''uni_shop'', ''start''">supermarket</a> is not far from here.'
-	'You can see the <a href="exec:$loc = ''city_island'' & minut += 1 & gt ''kiosk'', ''start''">kiosk</a> selling cigarettes and magazines.'
+	'You can see a <a href="exec:$loc = ''city_island'' & minut += 1 & gt ''kiosk'', ''start''">kiosk</a> selling cigarettes and magazines.'
 else
-	'The local convenience store is closed. It will reopen at 08:00'
+	'The local convenience store is closed. It will reopen at 08:00.'
 	'You can see a closed kiosk. It''s open between 08:00 and 23:00.'
 end
 if hour >= 8 and hour < 22:
@@ -88,7 +88,7 @@ act 'Go to the university campus':
 	gt 'uni_grounds', 'main'
 end
 
-if func('homes_properties', 'has_access', 'university_dorm') or university['student'] = 1 or hour >= 6:'The <a href="exec:gt ''uni_dorm'', ''start''">University dorms</a> offers small, but cheap, living space, for university students.'
+if func('homes_properties', 'has_access', 'university_dorm') or university['student'] = 1 or hour >= 6: 'The <a href="exec:gt ''uni_dorm'', ''start''">University dorms</a> offers small, but cheap living space for university students.'
 
 if pcs_magik >= 1 and mainQW = 0 and mid($start_type,1,3) = 'uni':
 	*clr & cla
@@ -98,7 +98,7 @@ if pcs_magik >= 1 and mainQW = 0 and mid($start_type,1,3) = 'uni':
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/lab/event/main.jpg"></center>'
 	'You see Tatiana and Gustav standing in front of your dorm. Tatiana adjusts her glasses and looks around, while Gustav seems to be distracted, glancing here and there with a strange look on his face as his tattoos are not visible.'
 	'Tatiana looks at you closely. "I felt a burst of energy. Were you attacked by a magician?"'
-	act 'No':gt 'mainQW'
+	act 'No': gt 'mainQW'
 	exit
 end
 

+ 51 - 49
locations/city_musicstore.qsrc

@@ -12,7 +12,7 @@ if $ARGS[0] = 'musicshop':
 		if musicrand = 1 and yearstart >= 2 and (week > 5 and hour >= 8 and hour < 17):
 			'<center><img src="images/locations/city/citycenter/mall/musicstore/music_store.jpg"></center>'
 			'You enter the store, welcomed by the familiar mix of random notes and bits of songs screaming from the back.'
-			'At the counter you see a familiar face, Radomir. You use to go to school with him in Pavlovsk.'
+			'As you approach the counter, you see your old classmate Radomir standing behind it.'
 			act 'Approach the counter':
 				*clr & cla
 				gs 'npc_relationship', 'modify', 'A154', 'like'
@@ -20,36 +20,40 @@ if $ARGS[0] = 'musicshop':
 				'<center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big154.jpg"></center>'
 				if npc_rel['A154'] >= 60:
 					if hotcat >= 6:
-						'Radomir gives you a smile. "Come to hang out with me on my break? Maybe we can have a little fun." He says with a wink.'
-						'You tell him you just came to look around and maybe do a little shopping. After a bit he tells you about a variety of instruments, he seems to really know his stuff when it comes to musical instruments.'
+						'He gives you a smile when he sees you. "Come to hang out with me on my break? Maybe we can have a little fun?" he asks with a wink.'
+						'You smile. "No, I just came to look around and maybe do a little shopping."'
+						'He smiles and starts telling you about a variety of instruments. He seems to really know his stuff.'
 					else
 						'He gives you a slight knowing smirk when he sees you. "So what can I do for one of my fans?"'
-						'You tell him you just came to look around and maybe do a little shopping. After a bit he tells you about a variety of instruments, he seems to really know his stuff when it comes to musical instruments.'
+						'"I just came to look around and maybe do a little shopping," you reply.' 
+						'He nods and starts telling you about a variety of instruments. He seems to really know his stuff.'
 					end
 				elseif npc_rel['A154'] <= 20:
-					'Radomir visably sighs when he see''s you. He does his best to ignore you, though he will answer questions about instruments that you ask, but only with the barest amount of information.'
+					'He visibly sighs when he sees you and does his best to ignore you, though he answers any questions about instruments that you ask with the barest amount of information.'
 				else
 					if hotcat >= 6:
-						'Radomir is talking about the band''s latest gig as you approach. He sees you and looks your body up and down. "Nice to see all the working out is paying off. Looking good."'
-						'You tell him you just came to look around and maybe do a little shopping. After a bit he tells you about a variety of instruments, he seems to really know his stuff when it comes to musical instruments.'
+						'Radomir is talking about the band''s latest gig as you approach. He looks your body up and down when he sees you. "Nice to see all the working out is paying off. Looking good."'
+						'You smile. "Thanks, but I just came to look around and maybe do a little shopping."'
+						'He nods and starts telling you about a variety of instruments. He seems to really know his stuff.'
 					else
-						'He smirks when he sees you. "Come to try and butter me up before I get famous?" You ignore his comment and ask him about some of the instruments.'
-						'After a bit he tells you about a variety of instruments, he seems to really know his stuff when it comes to musical instruments.'
+						'He smirks when he sees you. "Come to try and butter me up before I get famous?"' 
+						'You ignore his comment and ask him about some of the instruments.'
+						'He nods and starts telling you about a variety of instruments. He seems to really know his stuff.'
 					end
 				end
-			end
-			act 'Shop for guitars and amps': gt 'city_musicstore_stock', 'acoustic'
-			act 'Try some guitars': 
-	!!			TODO: Better scenes here			
-				if pcs_instrmusic < 30 and pcs_perform < 10:
-					'You pick up a guitar to try it, but you are too shy and after strumming a few chords you put it back on it''s stand'
-				else
-					'Some texts here depending on music skill and performing skill'			
+				act 'Shop for guitars and amps': gt 'city_musicstore_stock', 'acoustic'
+				act 'Try some guitars': 
+					!!TO DO: Better scenes here			
+					if pcs_instrmusic < 30 and pcs_perform < 10:
+						'You pick up a guitar you like the look of, but are too shy to play it. After strumming a few chords, you put it back on it''s stand.'
+					else
+						'Some texts here depending on music skill and performing skill'			
+					end
 				end
-			end
-			act 'Leave': 
-				if ml_boughtguitar > 0 or ml_boughtamp > 0:
-					gt 'city_musicstore', 'payandtakestuff'
+				act 'Leave': 
+					if ml_boughtguitar > 0 or ml_boughtamp > 0:
+						gt 'city_musicstore', 'payandtakestuff'
+					end
 				end
 				gt 'torgcentr'
 			end
@@ -59,9 +63,9 @@ if $ARGS[0] = 'musicshop':
 			'Jimmy just nods at you, then returns his attention to the guitar laying on the counter in front of him.'
 			act 'Shop for guitars and amps': gt 'city_musicstore_stock', 'acoustic'
 			act 'Try some guitars': 
-	!!			TODO: Better scenes here			
+				!!TO DO: Better scenes here			
 				if pcs_instrmusic < 30 and pcs_perform < 10:
-					'You pick up a guitar to try it, but you are too shy and after strumming a few chords you put it back on it''s stand'
+					'You pick up a guitar you like the look of, but are too shy to play it. After strumming a few chords, you put it back on it''s stand.'
 				else
 					'Some texts here depending on music skill and performing skill'			
 				end
@@ -80,48 +84,47 @@ if $ARGS[0] = 'firstvisit':
 	musicrand = rand(1,5)
 	if musicrand = 1:
 		'<center><img src="images/locations/city/citycenter/mall/musicstore/boys_rocking.jpg"></center>'
-		'You enter the store, passing the door to be submerged in a loud, cacophony environment. The walls are filled with guitars, bass, amps, drums, even keyboards fill the shop. In the back three teenage boys try and play some of the guitars loudly and not very well.'
+		'You enter the store, passing the door to be submerged in a loud, cacophony environment. The walls are filled with guitars, bass, amps, drums and even keyboards. In the back are three teenage boys trying to play some of the guitars. They''re loud and not very good...'
 		'A tall, ginger haired man turns to you with a bored expression that turns into a perplexed smile as he takes your sight in.'
 	elseif musicrand = 2:
 		'<center><img src="images/locations/city/citycenter/mall/musicstore/nostairways.jpg"></center>'
-		'You enter the store, passing the door to be submerged in a loud, cacophony environment. The walls are filled with guitars, bass, amps, drums, even keyboards fill the shop.'
+		'You enter the store, passing the door to be submerged in a loud, cacophony environment. The walls are filled with guitars, bass, amps, drums and even keyboards.'
 		'A tall, ginger haired man turns to you with a bored expression that turns into a perplexed smile as he takes your sight in.'
-		'Suddenly he turns and throws a sponge at one of the boys playing in the back "No. Stairway. To. Heaven." he growls and points at the sign on the wall before turning back to you.'
+		'He suddenly turns and throws a sponge at one of the boys playing in the back. "No. Stairway. To. Heaven!" he growls and points at the sign on the wall before turning back to you.'
 	else
 		'<center><img src="images/locations/city/citycenter/mall/musicstore/music_store.jpg"></center>'
-		'You enter the store, passing the door to be submerged in a loud, cacophony environment. The walls are filled with guitars, bass, amps, drums, even keyboards fill the shop.'
+		'You enter the store, passing the door to be submerged in a loud, cacophony environment. The walls are filled with guitars, bass, amps, drums and even keyboards.'
 		'A tall, ginger haired man turns to you with a bored expression that turns into a perplexed smile as he takes your sight in.'
 	end
+	
 	act 'Approach the counter':
 		*clr & cla
 		'<center><img src="images/locations/city/citycenter/mall/musicstore/jimmy.jpg"></center>'
-		'A tall, ginger haired man turns to you with a bored expression that turns into a perplexed smile as he takes your sight in.'
-		'He straightens up "Hello there, I''m Jimmy" - he greets you - "Is there anything I can help you with?"'
+		'He straightens up. "Hello there, I''m Jimmy! Is there anything I can help you with?"'
 		act 'Look for a guitar':
 			*clr & cla
 			'<center><img src="images/locations/city/citycenter/mall/musicstore/cheap_acoustic_1.jpg"></center>'		
-			'You start to browse the guitars in the shop, not entirely sure what you are looking for and gladly accept the help of the store clerk. After answering his questions and chatting about music and what you are looking for he finally picks up an affordable acoustic guitar as a recommendation.'
-			'After some conversation with the store owner he offers you an affordable acoustic guitar to buy'
-			'Jimmy leaves you alone with the instrument, so you sit down to try it, strumming the chords that you know, trying to play something.'
+			'You start browsing the guitars on offer, but aren''t sure what you''re looking and gladly accept his help. After answering his questions about what you''re looking for, he finally picks up an affordable acoustic guitar as a recommendation.'
+			'He leaves you alone with the instrument, so you sit down to try it. You strum the chords that you know, trying to play something.'
 			if money > 3400 or karta > 3400:
 				if money < 14280 and karta < 14280:
-					'While the guitar is not the best sounding one it''s comfortable and looking at the price tags, the only one you can afford.'
+					'While the guitar isn''t the best sounding, it''s comfortable and looking at the price tags, the only one you can afford.'
 				else 
-					'While the guitar is not the best sounding one it''s comfortable and looking at the price tags, you are not sure you should spend too much money until you are better at playing the guitar.'
+					'The guitar isn''t the best sounding. However, looking at the price tags on the others, you''re not sure if you should spend so much money on a better one until you''re better at playing.'
 				end
 				if money > 3400: act 'Buy a cheap acoustic guitar (3,400 <b>P</b>) - pay with cash': gt 'city_musicstore', 'buycheapacoustic', 'money'
 
 				if karta > 3400: act 'Buy a cheap acoustic guitar (3,400 <b>P</b>) - pay with card': gt 'city_musicstore', 'buycheapacoustic', 'karta'						
 				act 'You have to think about it':
 					ml_didntbuyguitarthefirstvisit = 1
-					'You hesitate for a moment, unsure whether to buy it or not and finally decide to not do it, at least not now. "I will have to talk to my mum first" you say to Jimmy. '
-					'He just nods "Don''t worry <<$pcs_firstname>>. You know what, I will put it aside for you for a bit in case you change your mind". He scribbles something on a post-it note, and sticks it on the guitar "I will try to keep the price the same, 3,400 <b>₽</b>."'
+					'You hesitate before deciding not to buy it, at least not for now. "I''ll have to talk to think about it first," you tell Jimmy.'
+					'He nods. "You know what? I''ll put it aside for you in case you change your mind, but be quick before someone else beats you to it!" He scribbles something on a post-it note and sticks it on the guitar. "I''ll try to keep the price the same, 3,400 <b>₽</b>."'
 					act 'Leave': gt 'torgcentr'
 				end
 			else
 				ml_didntbuyguitarthefirstvisit = 1
-				'While the guitar is not the best sounding one it''s comfortable. Unfortunately while it''s cheaper than the rest, it still costs more than you have. With a sigh you hand it back to Jimmy "I''m sorry, but, I can''t buy it now."'
-				'He just nods "Don''t worry, I tell you what, I will put it aside for you if you change your mind." He scribbles something on a post-it note, and sticks it on the guitar "I will try to keep the price the same, 3,400 <b>₽</b>."'
+				'While the guitar isn''t the best sounding, it is comfortable. Unfortunately, while it''s cheaper than the rest, it still costs more than you have. You hand it back to Jimmy with a sigh. "Sorry, but I can''t buy it right now."'
+				'He nods. "You know what? I''ll put it aside for you in case you change your mind, but be quick before someone else beats you to it!" He scribbles something on a post-it note and sticks it on the guitar. "I''ll try to keep the price the same, 3,400 <b>₽</b>."'
 				act 'Leave': gt 'torgcentr'
 			end				
 		end
@@ -147,9 +150,9 @@ if $ARGS[0] = 'cameback':
 			cla
 			'<center><img src="images/locations/city/citycenter/mall/musicstore/jimmy.jpg"></center>'
 			'You walk up to the counter where Jimmy is busy tinkering with a guitar.'
-			'"Hi Jimmy... I was wondering if you still has that guitar..."'
-			'Jimmy looks up from the guitar "Hi <<$pcs_firstname>>, sure, I have it. Let me get it for you."'
-			'He disappears for several minutes before he brings out the guitar. "See, all in good shape. Properly set up and everything."'
+			'"Hey Jimmy, I was wondering if you still have that guitar?"'
+			'He looks up from the guitar. "Oh hey. Sure, I have it. Let me get it for you."'
+			'He disappears for a while before he brings the guitar out. "See, all in good shape. Properly set up and everything."'
 			if money > 3400: act 'Buy a cheap acoustic guitar (3,400 <b>P</b>) - pay with cash': gt 'city_musicstore', 'buycheapacoustic', 'money'
 			if karta > 3400: act 'Buy a cheap acoustic guitar (3,400 <b>P</b>) - pay with card': gt 'city_musicstore', 'buycheapacoustic', 'karta'						
 		end
@@ -157,9 +160,9 @@ if $ARGS[0] = 'cameback':
 	act 'Shop for guitars and amps': gt 'city_musicstore_stock', 'acoustic'
 	act 'Try some guitars': 
 		'<center><img src="images/locations/city/citycenter/mall/musicstore/try_guitars.jpg"></center>'
-!!			TODO: Better scenes here			
+		!! TO DO: Better scenes here			
 		if pcs_instrmusic < 30 and pcs_perform < 10:
-			'You pick up a guitar to try it, but you are too shy and after strumming a few chords you put it back on it''s stand'
+			'You pick up a guitar you like the look of, but are too shy to play it. After strumming a few chords, you put it back on it''s stand.'
 		else
 			'Some texts here depending on music skill and performing skill'			
 		end
@@ -177,12 +180,12 @@ if $ARGS[0] = 'buycheapacoustic':
 	*clr & cla
 	'<center><img src="images/locations/city/citycenter/mall/musicstore/starterkit.jpg"></center>'
 	if ml_didntbuyguitarthefirstvisit = 1:
-		'You finally decide to buy the guitar, taking it to the checkout. Jimmy throws in a gigbag to carry the gitar and a set of strings and picks. "A proper starter kit" he states and rings up the purchase.'
+		'You decide to buy the guitar and take it to the counter, where Jimmy throws in a gigbag and a set of strings and picks. "A proper starter kit," he states and rings up the purchase.'
 		killvar 'ml_didntbuyguitarthefirstvisit'
 	else
-		'Jimmy puts the guitar in a gigbag, and drops a set of strings and picks in the pocket. "A proper starter kit" he states and rings up the purchase.'
+		'Jimmy puts the guitar in a gigbag and drops a set of strings and picks in the pocket. "A proper starter kit," he states and rings up the purchase.'
 	end
-	'He looks at you thoughtfully, then drops a thick, slightly worn booklet in the bag "Some stuff to learn from" he says handing your purchase to you "Congratulations, welcome to the starving musician community."'
+	'He looks at you thoughtfully, then drops a thick, slightly worn booklet in the bag. "Some stuff to learn from," he says while handing your purchase to you. "Congratulations, welcome to the starving musician community."'
 	
 	gs 'city_musicstore', 'first_setup'
 	
@@ -195,12 +198,11 @@ end
 if $ARGS[0] = 'payandtakestuff':
 	if ml_boughtamp + ml_guitar['carried'] > 0 or ml_boughtguitar > 1:
 		minut += (ml_boughtguitar * 5) + (ml_boughtguitar * 5)
-		'Jimmy takes your details and your home address after you pay, and sets up the delivery. "It should be there tomorrow, <<$pcs_nickname>>."'
+		'Jimmy takes your details and your home address after you pay to set up the delivery. "It should be there tomorrow."'
 	else	
 		minut += 20
         ml_guitar['carried'] = 1
-		'Jimmy disappears with your chosen guitar in the back of the shop only to return after about 10 minutes. "It''s all set up, <<$pcs_nickname>>, if you need to tweak anything, just bring it in, we will do it, no charge."'
-		*nl
+		'Jimmy disappears into the back of the shop with your guitar before returning 10 minutes later. "That''s it all set up, but if you need to tweak anything, just bring it in and we''ll do it for you, free of charge."'
 		'He puts the guitar in ' + iif(ml_gigbag = 1, 'a gigbag', '') + iif(ml_hardcase = 1, 'its case', '') + ' and hands it to you. "All the best, <<$pcs_nickname>>."'
 	end
 	killvar 'ml_boughtamp'

+ 13 - 6
locations/clothing.qsrc

@@ -1384,6 +1384,13 @@ if $ARGS[0] = 'view_clothing_item':
 	cla
 	'<center><img src="<<FUNC(''$clothing_image'',  $ARGS[1], ARGS[2])>>"></center>'
 	gs 'clothing_attributes', $ARGS[1], ARGS[2]
+
+	if CloTopCut > 1:
+		if tits = 2 or tits = 3: CloTopCut += 1
+		if tits >= 4: CloTopCut += 2
+		if CloTopCut > 2 and tits >=6: CloTopCut += 1
+	end
+
 	$RESULT = FUNC('$short_description', $ARGS[1], CloStyle2)
 	$RESULT += '<<ARGS[2]>>'
 	'<<$RESULT>>'
@@ -1807,6 +1814,12 @@ if $ARGS[0] = 'wear':
 
 	gs 'clothing_attributes', $ARGS[1], ARGS[2]
 
+	if CloTopCut > 1:
+		if tits = 2 or tits = 3: CloTopCut += 1
+		if tits >= 4: CloTopCut += 2
+		if CloTopCut > 2 and tits >=6: CloTopCut += 1
+	end
+
 	dynamic '<<$ARGS[1]>>_s[<<ARGS[2]>>] = 0'
 
 	if CloStyle2 = 4:
@@ -1837,12 +1850,6 @@ if $ARGS[0] = 'wear':
 
 	gs 'clothing', 'exposure_calc'
 
-	if PCloTopCut > 1:
-		if tits = 2 or tits = 3: PCloTopCut += 1
-		if tits >= 4: PCloTopCut += 2
-		if PCloTopCut > 2 and tits >=6: PCloTopCut += 1
-	end
-
 !Calculations for clothing beauty, multiplied by natural beauty
 	if PCloThinness > 0:
 		if PCloThinness = 1:

+ 3 - 3
locations/din_van.qsrc

@@ -37,7 +37,7 @@ $showerdin = {
 			'Unfortunately, your false lashes don''t make it through the shower.'
 			false_lashes = 0
 			pcs_lashes = pcs_naturallashes
-			gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+			gs 'AppearanceSystem', 'UpdateBaseAppearance'
 		end
 	end
 }
@@ -857,7 +857,7 @@ $basin = {
 			pcs_lashes = pcs_naturallashes
 			false_lashes = 0
 			minut += 5
-			gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+			gs 'AppearanceSystem', 'UpdateBaseAppearance'
 			act 'Finish':menu_off = 0 & gt $loc, $loc_arg
 		end
 	end
@@ -1142,7 +1142,7 @@ if $ARGS[0] = 'private':
 		dynamic $toymanage
 	end
 
-	'<a href="exec:msg ''<center>Your weight is <<pcs_weight[0]>>.<<pcs_weight[1]>> kg<br>Your body mass index (BMI) is <<pcs_bmi[0]>>.<<pcs_bmi[1]>>.<br><<$bmi_desc>></center>''">Check weight on the scales</a>'
+	'<a href="exec:msg ''<center>Your weight is <<pcs_weight[0]>>.<<pcs_weight[1]>> kg<br>Your body mass index (BMI) is <<pcs_bmi[0]>>.<<pcs_bmi[1]>>.<br><<$bodyVars[''bmi_desc'']>></center>''">Check weight on the scales</a>'
 
 	gs 'din_van', 'prvt_pee'
 

+ 1 - 1
locations/gadhouse.qsrc

@@ -311,7 +311,7 @@ if $ARGS[0] = 'main':
 	*nl
 	'A fairly simple cottage in the village of Gadukino which your grandparents call home. In the main room there is a huge <a href="exec:gt ''wardrobe'', ''start''">wardrobe</a> (where you can choose outfits and organize your clothing), and a <a href="exec:gad = 1 & gt ''bed'', ''start''">bed</a> where you can rest. The bed is more comfortable than it looks.'
 	'There is an old <a href="exec:gt ''TV'',''gad''">television</a> in the living room. It''s positioned next to a body length <a href="exec:gt ''mirror'', ''start''">mirror</a>.'
-	'You can check your weight on your grandma''s old mechanical <a href="exec:msg ''<center>Your weight is <<pcs_weight[0]>>.<<pcs_weight[1]>> kg<br>Your body mass index (BMI) is <<pcs_bmi[0]>>.<<pcs_bmi[1]>>.<br><<$bmi_desc>></center>''">scales</a>.'
+	'You can check your weight on your grandma''s old mechanical <a href="exec:msg ''<center>Your weight is <<pcs_weight[0]>>.<<pcs_weight[1]>> kg<br>Your body mass index (BMI) is <<pcs_bmi[0]>>.<<pcs_bmi[1]>>.<br><<$bodyVars[''bmi_desc'']>></center>''">scales</a>.'
 
 	if hour < 8:
 		temp = rand(0,9)

+ 0 - 1
locations/intro_initialization.qsrc

@@ -525,7 +525,6 @@ killvar 'swim_start'
 
 gs 'body', 'Update_Body'
 gs 'body', 'DailyUpdate'
-gs 'AppearanceSystem', 'UpdateBaseAppearnce'
 pcs_stam = stammax
 
 --- intro_initialization ---------------------------------

+ 0 - 1
locations/intro_initialization_city.qsrc

@@ -522,7 +522,6 @@ killvar 'swim_start'
 
 gs 'body', 'Update_Body'
 gs 'body', 'DailyUpdate'
-gs 'AppearanceSystem', 'UpdateBaseAppearnce'
 pcs_stam = stammax
 
 --- intro_initialization_city ---------------------------------

+ 9 - 9
locations/obj_din.qsrc

@@ -293,7 +293,7 @@ if $ARGS[0] = 'description':
 	*nl
 	'<<$pcs_apprnc>>'
 	*nl
-	'You are <<pcs_hgt>>cm tall and <a href="exec:gs ''obj_din'', ''show_body''"><<$body>></a>.'
+	'You are <<pcs_hgt>>cm tall and <a href="exec:gs ''obj_din'', ''show_body''"><<$bodyVars[''desc'']>></a>.'
 	'Your breasts would be considered an EU <a href="exec:gs ''obj_din'', ''show_tits''"><<$titsize>></a>.'
 	'<<$nipplesize>>'
 	*nl
@@ -1644,7 +1644,7 @@ if $ARGS[0] = 'face':
 	'<center><h1>Looks</h1></center>'
 	'<center><table width="90%" cellspacing="0" cellpadding="20" valign="top"><tr>'
 	'<td cellspacing="0" cellpadding="0" valign="top">'
-	$img_temp = FUNC('$face_image')
+	$img_temp = func('$face_image')
 	'<center><img <<$set_imgh>> src="<<$img_temp>>"></a></center>'
 	killvar 'img_temp'
 	if avatar_hair = 1:
@@ -1672,7 +1672,7 @@ if $ARGS[0] = 'body':
 	'<td cellspacing="0" cellpadding="0" valign="top">'
 !!	This displays the body image; $bodimgsets[x9] is the folder name
 	!some in-game script may call this to display image, so leave it be
-	$img_temp = FUNC('$body_image','body')
+	$img_temp = func('$body_image','body')
 	if $modApi_body_image ! '':
 		$img_temp = $modApi_body_image
 	end
@@ -1695,7 +1695,7 @@ if $ARGS[0] = 'clothes':
 	'<td width="50%" cellspacing="0" cellpadding="20" valign="top">'
 	!move image define to $body_image
 	!display cloth
-	$img_temp = FUNC('$body_image','clothes')
+	$img_temp = func('$body_image','clothes')
 	if $modApi_clothes_image ! '':
 		$img_temp = $modApi_clothes_image
 	end
@@ -1707,7 +1707,7 @@ if $ARGS[0] = 'clothes':
 	end
 	'</td><td width="50%" cellpadding="20" valign="top">'
 	!display coat
-	$img_temp = FUNC('$body_image','coat')
+	$img_temp = func('$body_image','coat')
 	if $modApi_coat_image ! '':
 		$img_temp = $modApi_coat_image
 	end
@@ -1731,7 +1731,7 @@ if $ARGS[0] = 'panties':
 	'<center><h1>Panties</h1></center>'
 	'<center><table width="90%" cellspacing="0" cellpadding="20" valign="top"><tr>'
 	'<td cellspacing="0" cellpadding="0" valign="top">'
-	$img_temp = FUNC('$body_image','panties')
+	$img_temp = func('$body_image','panties')
 	if $modApi_panties_image ! '':
 		$img_temp = $modApi_panties_image
 	end
@@ -1753,7 +1753,7 @@ if $ARGS[0] = 'bra':
 	'<center><h1>Bra</h1></center>'
 	'<center><table width="90%" cellspacing="0" cellpadding="20" valign="top"><tr>'
 	'<td cellspacing="0" cellpadding="0" valign="top">'
-	$img_temp = FUNC('$body_image','bra')
+	$img_temp = func('$body_image','bra')
 	if $modApi_bra_image ! '':
 		$img_temp = $modApi_bra_image
 	end
@@ -1778,7 +1778,7 @@ if $ARGS[0] = 'show_tits':
 end
 
 if $ARGS[0] = 'show_body':
-	$img_temp = FUNC('$body_image','body')
+	$img_temp = func('$body_image','body')
 	view '<<$img_temp>>'
 	killvar 'img_temp'
 end
@@ -1807,7 +1807,7 @@ if $ARGS[0] = 'shoes':
 	'<center><h1>Shoes</h1></center>'
 	'<center><table width="90%" cellspacing="0" cellpadding="20" valign="top"><tr>'
 	'<td cellspacing="0" cellpadding="0" valign="top">'
-	$img_temp = FUNC('$body_image','shoes')
+	$img_temp = func('$body_image','shoes')
 	if $modApi_shoes_image ! '':
 		$img_temp = $modApi_shoes_image
 	end

+ 2 - 0
locations/pav_church.qsrc

@@ -260,12 +260,14 @@ if $ARGS[0] = 'liturgy':
 		church_moral += 2
 		pcs_sleep += 5
 		'You join the congregation for the Divine Liturgy. You see mostly older people around, but there are some people around your age present as well. You participate in the singing, but that''s about it. Your presence seems to go largely unnoticed and you have the chance to rest. You feel a lot better.'
+		act 'Leave the church': gt 'pav_church' , 'service_end'
 	elseif fame['pav_slut'] < 150 and Conf_Kirill >= 2:
 		Kirill += 1
 		pcs_mood += 20
 		church_moral += 2
 		pcs_sleep += 5
 		'You participate fully in the Divine Liturgy, listening to the preaching and singing along. When going to communion and receiving the ceremonial bread, you lock eyes with Father Kirill. He seems happy to see you participating in the service.'
+		act 'Leave the church': gt 'pav_church' , 'service_end'
 	else
 		gs 'fame', 'church_reduction', 'pav', -2
 		'Your presence at the Divine Liturgy does not go unnoticed. People start whispering and pointing fingers at you.'

+ 3 - 3
locations/pav_clinic.qsrc

@@ -149,7 +149,7 @@ if $ARGS[0] = '':
 					pcs_brace = 0
 					pcs_teeth -= 1
 					'The dentist spends 15 minutes taking off your brace and cleaning up. You look in the mirror afterwards and your teeth are '+iif(pcs_teeth = 0, 'now straight', 'straighter, but can still use some more work.')
-					gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+					gs 'AppearanceSystem', 'UpdateBaseAppearance'
 					gs 'stat'
 				else
 					if pcs_missing_teeth = 1:
@@ -187,7 +187,7 @@ if $ARGS[0] = '':
 									pcs_teeth = -1
 									'You pay the dentist to brighten and polish your teeth and an hour later, your smile is much brighter and more attractive.'
 								end
-								gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+								gs 'AppearanceSystem', 'UpdateBaseAppearance'
 								gs 'stat'
 
 								act 'Leave the clinic': minut += 5 & gt 'pav_commercial'
@@ -210,7 +210,7 @@ if $ARGS[0] = '':
 									pcs_teeth = -1
 									'You pay the dentist to brighten and polish your teeth and an hour later, your smile is much brighter and more attractive.'
 								end
-								gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+								gs 'AppearanceSystem', 'UpdateBaseAppearance'
 								gs 'stat'
 
 								act 'Leave the clinic': minut += 5 & gt 'pav_commercial'

+ 5 - 5
locations/salon.qsrc

@@ -1343,7 +1343,7 @@ if $ARGS[0] = 'lashTreatment':
 	if pcs_lashes < 2:pcs_lashes += 1
 	if pcs_naturallashes < 2:pcs_naturallashes += 1
 	inhib_exp += rand(1,5)
-	gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+	gs 'AppearanceSystem', 'UpdateBaseAppearance'
 	
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/mall/salon/eyelash_salon.jpg"></center>'
@@ -1368,7 +1368,7 @@ if $ARGS[0] = 'lashFalsies':
 		false_lashes = 1
 		'She spends a few minutes selecting and trimming a set of ornate, dramatically-feathered false lashes to get them to line up neatly with your own natural set, and with practiced ease she glues them delicately in place, only having to give them one or two gentle, settling nudges.'
 	end
-	gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+	gs 'AppearanceSystem', 'UpdateBaseAppearance'
 	gs 'stat'
 	'"There you go! You''re all set! Have fun with wherever you''re going!"'
 	act 'Leave':gt 'salon', 'start'
@@ -1446,7 +1446,7 @@ if $ARGS[0] = 'lashExtension':
 		killvar 'lashextensionduration'
 		killvar 'lashextensionstyle'
 	end
-	gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+	gs 'AppearanceSystem', 'UpdateBaseAppearance'
 	gs 'stat'
 	'After what seems like forever, you''re finally allowed to open your eyes and take a look.'
 	act 'Leave':gt 'salon', 'start'
@@ -1812,7 +1812,7 @@ if $ARGS[0] = 'skin_care':
 	else
 		pcs_skin = 1000
 	end
-	gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+	gs 'AppearanceSystem', 'UpdateBaseAppearance'
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/mall/salon/facialmask.jpg"></center>'
 	'You get a beauty mask treatment, afterwards your face feels smooth and your skin tight. You are told that you should wait a week before getting a new treatment.'
@@ -1824,7 +1824,7 @@ if $ARGS[0] = 'rejuvination':
 	minut += 60
 	inhib_exp += rand(1,5)
 	vidageday += 50
-	gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+	gs 'AppearanceSystem', 'UpdateBaseAppearance'
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/mall/salon/bodyscrub.jpg"></center>'
 	'You get a full body rejuvenation procedure, afterwards your skin feels soft and silky smooth.'

+ 5 - 2
locations/saveupdater.qsrc

@@ -1282,7 +1282,6 @@ if temp_current_save_version  < 00080601:
 
 	gs 'body', 'Update_Body'
 	gs 'body', 'DailyUpdate'
-	gs 'AppearanceSystem', 'UpdateBaseAppearnce'
 	gs 'stat'
 end
 
@@ -1430,7 +1429,7 @@ end
 
 if temp_current_save_version  < 00080800:
 	!!update base appearance to the new calculation
-	gs 'AppearanceSystem', 'UpdateBaseAppearnce'
+	gs 'body', 'Update_Appearance'
 	gs 'AppearanceSystem'
 
 	if $wloc = 'default': $wloc = 'default1'
@@ -2407,6 +2406,10 @@ if temp_current_save_version < 00090200:
 		katjaQW['knows_masturbation'] = katjaQW['knows_masterbation']
 		gs 'shortgs', 'remove_array_element', 'katjaQW', 'knows_masterbation'
 	end
+
+	!! body_structure introduction and variable migration:
+	if $bmi_desc	! '':		bodyVars['bmi_desc']	= $bmi_desc		& killvar '$bmi_desc'
+	if $body		! '':		bodyVars['desc']		= $body			& killvar '$body'
 end
 
 

+ 23 - 10
locations/shortgs.qsrc

@@ -954,8 +954,6 @@ if $ARGS[0] = 'setStat':
 		<<$ARGS[1]>>_flr = <<$ARGS[1]>>_lvl"
 		strenbuf = stren_lvl + stren_plus_lvl
 		gs 'body', 'DailyUpdate'
-		gs 'AppearanceSystem', 'UpdateBaseAppearnce'
-		gs 'body_desc'
 	else
 		dynamic "<<$ARGS[1]>>_lvl = temp_input
 		<<$ARGS[1]>>_exp = temp_xpnxt
@@ -1117,17 +1115,18 @@ end
 !! func('shortgs', 'invert_color', $color, 'bw')
 !! https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color
 if $ARGS[0] = 'invert_color':
-	shortgs_r = 255 - func('shortgs', 'hex_str_to_int', mid($ARGS[1], 2, 2))
-	shortgs_g = 255 - func('shortgs', 'hex_str_to_int', mid($ARGS[1], 4, 2))
-	shortgs_b = 255 - func('shortgs', 'hex_str_to_int', mid($ARGS[1], 6, 2))
-	
 	if $ARGS[2] = 'bw':
-		if (shortgs_r * 299 + shortgs_g * 587 + shortgs_b * 114) > 186000:
+		if func('shortgs', 'color_is_dark', $ARGS[1]) = 1:
 			$result = '#FFFFFF'
 		else
 			$result = '#000000'
 		end
 	else
+		$ARGS[1] = ucase(replace(trim($ARGS[1]), '#'))
+		shortgs_r = 255 - func('shortgs', 'hex_str_to_int', mid($ARGS[1], 1, 2))
+		shortgs_g = 255 - func('shortgs', 'hex_str_to_int', mid($ARGS[1], 3, 2))
+		shortgs_b = 255 - func('shortgs', 'hex_str_to_int', mid($ARGS[1], 5, 2))
+
 		$shortgs_r = func('shortgs', 'int_to_hex_str', shortgs_r)
 		$shortgs_g = func('shortgs', 'int_to_hex_str', shortgs_g)
 		$shortgs_b = func('shortgs', 'int_to_hex_str', shortgs_b)
@@ -1136,10 +1135,24 @@ if $ARGS[0] = 'invert_color':
 		$shortgs_g = mid('0' + $shortgs_g, len($shortgs_g), 2)
 		$shortgs_b = mid('0' + $shortgs_b, len($shortgs_b), 2)
 		$result = '#' + $shortgs_r + $shortgs_g + $shortgs_b
+
+		killvar 'shortgs_r'
+		killvar 'shortgs_g'
+		killvar 'shortgs_b'
 	end
-	killvar 'shortgs_r'
-	killvar 'shortgs_g'
-	killvar 'shortgs_b'
+end
+
+if $ARGS[0] = 'color_is_dark':
+	$ARGS[1] = ucase(replace(trim($ARGS[1]), '#'))
+	shortgs_cid_r = func('shortgs', 'hex_str_to_int', mid($ARGS[1], 1, 2))
+	shortgs_cid_g = func('shortgs', 'hex_str_to_int', mid($ARGS[1], 3, 2))
+	shortgs_cid_b = func('shortgs', 'hex_str_to_int', mid($ARGS[1], 5, 2))
+	result = 2126 * shortgs_r * shortgs_r + 7152 * shortgs_g * shortgs_g + 722 * shortgs_b * shortgs_b
+	result = iif(result > 136315346, 0, 1)
+
+	killvar 'shortgs_cid_r'
+	killvar 'shortgs_cid_g'
+	killvar 'shortgs_cid_b'
 end
 
 --- shortgs ---------------------------------

+ 1 - 2
locations/stat.qsrc

@@ -839,8 +839,7 @@ end
 
 !!Health, Willpower, Auto Birth Control pregnancy check
 gs 'body', 'RegularUpdate'
-gs 'AppearanceSystem'
-gs 'body_desc'
+gs 'body', 'Update_Appearance'
 
 if pcs_health >= healthmax:
 	$pcs_health = '<font color="green">You are very healthy.</font>'

+ 31 - 31
locations/stat_display.qsrc

@@ -33,7 +33,7 @@ if Enable_showstatimg = 1:
 		$stat_imgtool_msg += '<a href="exec:Enable_statimg_face = 1 & gs ''$menu_obnovit''">◇Face</a>'
 	else
 		$stat_imgtool_msg += '<a href="exec:Enable_statimg_face = 0 & gs ''$menu_obnovit''">◆Face</a>'
-		$img_temp = FUNC('$face_image')
+		$img_temp = func('$face_image')
 		if $img_temp ! '':  $stat_imgextra_msg += '<a href="exec:view ''<<$img_temp>>''"><img <<$set_statimgh>> src="<<$img_temp>>"></a> '
 	end
 
@@ -41,7 +41,7 @@ if Enable_showstatimg = 1:
 		$stat_imgtool_msg += ' <a href="exec:Enable_statimg_body = 1 & gs ''$menu_obnovit''">◇Body</a>'
 	else
 		$stat_imgtool_msg += ' <a href="exec:Enable_statimg_body = 0 & gs ''$menu_obnovit''">◆Body</a>'
-		$img_temp = FUNC('$body_image','body')
+		$img_temp = func('$body_image','body')
 		if $img_temp ! '':  $stat_imgextra_msg += '<a href="exec:view ''<<$img_temp>>''"><img <<$set_statimgh>> src="<<$img_temp>>"></a> '
 	end
 
@@ -49,7 +49,7 @@ if Enable_showstatimg = 1:
 		$stat_imgtool_msg += ' <a href="exec:Enable_statimg_coat = 1 & gs ''$menu_obnovit''">◇Coat</a>'
 	else
 		$stat_imgtool_msg += ' <a href="exec:Enable_statimg_coat = 0 & gs ''$menu_obnovit''">◆Coat</a>'
-		$img_temp = FUNC('$body_image','coat')
+		$img_temp = func('$body_image','coat')
 		if $img_temp ! '':  $stat_imgextra_msg += '<a href="exec:view ''<<$img_temp>>''"><img <<$set_statimgh>> src="<<$img_temp>>"></a> '
 	end
 
@@ -57,7 +57,7 @@ if Enable_showstatimg = 1:
 		$stat_imgtool_msg += ' <a href="exec:Enable_statimg_cloth = 1 & gs ''$menu_obnovit''">◇Clothes</a>'
 	else
 		$stat_imgtool_msg += ' <a href="exec:Enable_statimg_cloth = 0 & gs ''$menu_obnovit''">◆Clothes</a>'
-		$img_temp = FUNC('$body_image','clothes')
+		$img_temp = func('$body_image','clothes')
 		if $img_temp ! '':  $stat_imgextra_msg += '<a href="exec:view ''<<$img_temp>>''"><img <<$set_statimgh>> src="<<$img_temp>>"></a> '
 	end
 
@@ -65,7 +65,7 @@ if Enable_showstatimg = 1:
 		$stat_imgtool_msg += ' <a href="exec:Enable_statimg_bra = 1 & gs ''$menu_obnovit''">◇Bra</a>'
 	else
 		$stat_imgtool_msg += ' <a href="exec:Enable_statimg_bra = 0 & gs ''$menu_obnovit''">◆Bra</a>'
-		$img_temp = FUNC('$body_image','bra')
+		$img_temp = func('$body_image','bra')
 		if $img_temp ! '':  $stat_imgextra_msg += '<a href="exec:view ''<<$img_temp>>''"><img <<$set_statimgh>> src="<<$img_temp>>"></a> '
 	end
 
@@ -73,12 +73,12 @@ if Enable_showstatimg = 1:
 		$stat_imgtool_msg += ' <a href="exec:Enable_statimg_panties = 1 & gs ''$menu_obnovit''">◇Panties</a>'
 	else
 		$stat_imgtool_msg += ' <a href="exec:Enable_statimg_panties = 0 & gs ''$menu_obnovit''">◆Panties</a>'
-		$img_temp = FUNC('$body_image','panties')
+		$img_temp = func('$body_image','panties')
 		if $img_temp ! '':  $stat_imgextra_msg += '<a href="exec:view ''<<$img_temp>>''"><img <<$set_statimgh>> src="<<$img_temp>>"></a> '
 	end
 
 	if bodysuitwornnumber > 0 and (Enable_statimg_bra = 1 or Enable_statimg_panties = 1):
-		$img_temp = FUNC('$body_image','bodysuit')
+		$img_temp = func('$body_image','bodysuit')
 		if $img_temp ! '':  $stat_imgextra_msg += '<a href="exec:view ''<<$img_temp>>''"><img <<$set_statimgh>> src="<<$img_temp>>"></a> '
 	end
 	
@@ -86,7 +86,7 @@ if Enable_showstatimg = 1:
 		$stat_imgtool_msg += ' <a href="exec:Enable_statimg_shoes = 1 & gs ''$menu_obnovit''">◇Shoes</a>'
 	else
 		$stat_imgtool_msg += ' <a href="exec:Enable_statimg_shoes = 0 & gs ''$menu_obnovit''">◆Shoes</a>'
-		$img_temp = FUNC('$body_image','shoes')
+		$img_temp = func('$body_image','shoes')
 		if $img_temp ! '':  $stat_imgextra_msg += '<a href="exec:view ''<<$img_temp>>''"><img <<$set_statimgh>> src="<<$img_temp>>"></a> '
 	end
 	if $menu_loc ! '': $stat_imgtool_msg += ' <a href="exec:gs ''Cheatmenu_din'' & dynamic $cheatmenu[''setting'']">◎Settings</a>'
@@ -1501,16 +1501,16 @@ if enable_show_status = 0:
 		if cheatNoSleep = 0: $stat_extra_msg += '<BR><b><<$pcs_sleep>></b>'
 	elseif Enable_scalepic = 2:
 		$stat_extra_msg += '<font color="<<$fcolor>>"><TABLE cellpadding="1" cellspacing="0" width="300">'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '2', pcs_horny, pcs_horny)+'</TD><TD>&nbsp;Arousal</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '2', pain['total'], pain['total'], pain['damage'])+'</TD><TD>&nbsp;Pain</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_health * 100 / healthmax, pcs_health)+'</TD><TD>&nbsp;Health</TD></TR>'
-		if $start_type[1] ! 'nomagic': $stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_mana * 100 / manamax, pcs_mana)+'</TD><TD>&nbsp;Mana</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_willpwr * 100 / willpowermax, pcs_willpwr)+'</TD><TD>&nbsp;Willpower</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_stam * 100 / stammax, pcs_stam)+'</TD><TD>&nbsp;Stamina</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_mood, pcs_mood)+'</TD><TD>&nbsp;Mood</TD></TR>'
-		if cheatNoEat = 0: $stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_energy, pcs_energy)+'</TD><TD>&nbsp;Hunger</TD></TR>'
-		if cheatNoDrink = 0: $stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_hydra, pcs_hydra)+'</TD><TD>&nbsp;Thirst</TD></TR>'
-		if cheatNoSleep = 0: $stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_sleep, pcs_sleep)+'</TD><TD>&nbsp;Sleep</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '2', pcs_horny, pcs_horny)+'</TD><TD>&nbsp;Arousal</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '2', pain['total'], pain['total'], pain['damage'])+'</TD><TD>&nbsp;Pain</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_health * 100 / healthmax, pcs_health)+'</TD><TD>&nbsp;Health</TD></TR>'
+		if $start_type[1] ! 'nomagic': $stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_mana * 100 / manamax, pcs_mana)+'</TD><TD>&nbsp;Mana</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_willpwr * 100 / willpowermax, pcs_willpwr)+'</TD><TD>&nbsp;Willpower</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_stam * 100 / stammax, pcs_stam)+'</TD><TD>&nbsp;Stamina</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_mood, pcs_mood)+'</TD><TD>&nbsp;Mood</TD></TR>'
+		if cheatNoEat = 0: $stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_energy, pcs_energy)+'</TD><TD>&nbsp;Hunger</TD></TR>'
+		if cheatNoDrink = 0: $stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_hydra, pcs_hydra)+'</TD><TD>&nbsp;Thirst</TD></TR>'
+		if cheatNoSleep = 0: $stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_sleep, pcs_sleep)+'</TD><TD>&nbsp;Sleep</TD></TR>'
 		$stat_extra_msg += '</TABLE></font>'
 	else
 		gs 'indik', '2', pcs_horny, pcs_horny
@@ -1564,18 +1564,18 @@ else
 	if $stat_extra_msg ! '': $stat_extra_msg += '<br><a href="exec:Enable_showattr = 0 & gs ''$menu_obnovit''">▲Attributes:</a>'
 	if Enable_scalepic = 2:
 		$stat_extra_msg += '<font color="<<$fcolor>>"><TABLE cellpadding="1" cellspacing="0" width="300">'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', 100 - pcs_inhib, 100 - pcs_inhib)+'</TD><TD>&nbsp;Inhibition</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_stren, pcs_stren)+'</TD><TD>&nbsp;Strength</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_agil, pcs_agil)+'</TD><TD>&nbsp;Agility</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_vital, pcs_vital)+'</TD><TD>&nbsp;Endurance</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_intel, pcs_intel)+'</TD><TD>&nbsp;Intelligence</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_sprt, pcs_sprt)+'</TD><TD>&nbsp;Spirit</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_react, pcs_react)+'</TD><TD>&nbsp;Reaction</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_chrsm, pcs_chrsm)+'</TD><TD>&nbsp;Charisma</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_prcptn, pcs_prcptn)+'</TD><TD>&nbsp;Perception</TD></TR>'
-		if $start_type[1] ! 'nomagic': $stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_magik, pcs_magik)+'</TD><TD>&nbsp;Magic</TD></TR>'
-		if succubusflag = 1: $stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', sucexcess, sucexcess)+'</TD><TD>&nbsp;Succubus Energy</TD></TR>'
-		$stat_extra_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_apprnc / 2, pcs_apprnc)+'</TD><TD>&nbsp;Attractiveness</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', 100 - pcs_inhib, 100 - pcs_inhib)+'</TD><TD>&nbsp;Inhibition</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_stren, pcs_stren)+'</TD><TD>&nbsp;Strength</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_agil, pcs_agil)+'</TD><TD>&nbsp;Agility</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_vital, pcs_vital)+'</TD><TD>&nbsp;Endurance</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_intel, pcs_intel)+'</TD><TD>&nbsp;Intelligence</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_sprt, pcs_sprt)+'</TD><TD>&nbsp;Spirit</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_react, pcs_react)+'</TD><TD>&nbsp;Reaction</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_chrsm, pcs_chrsm)+'</TD><TD>&nbsp;Charisma</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_prcptn, pcs_prcptn)+'</TD><TD>&nbsp;Perception</TD></TR>'
+		if $start_type[1] ! 'nomagic': $stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_magik, pcs_magik)+'</TD><TD>&nbsp;Magic</TD></TR>'
+		if succubusflag = 1: $stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', sucexcess, sucexcess)+'</TD><TD>&nbsp;Succubus Energy</TD></TR>'
+		$stat_extra_msg += '<TR><TD width="85%">'+func('indiktab', '1', pcs_apprnc / 2, pcs_apprnc)+'</TD><TD>&nbsp;Attractiveness</TD></TR>'
 		$stat_extra_msg += '</TABLE></font>'
 	else
 		gs 'indik', '1', 100 - pcs_inhib, 100 - pcs_inhib
@@ -2459,7 +2459,7 @@ killvar 'stat_imgtool_msg'
 killvar 'stat_imgextra_msg'
 
 if Enable_statfsize > 0: $stat_msg += '</font>' & !disable this, all texts comes from pl will have the same font size, like[time]
-if Enable_faceturn = 1:	view FUNC('$face_image')
+if Enable_faceturn = 1:	view func('$face_image')
 if $git_hash ! '': $stat_msg = '<center><<$git_hash>></center><<$stat_msg>>'
 if Enable_Android = 0:
 	pl '<<$stat_msg>>'