Kaynağa Gözat

[Refactored] Added a regular update to body_shape, where it will be called from body to update some pc's body variables regularly

ADCSux 2 yıl önce
ebeveyn
işleme
c40c9e18d5

+ 2 - 0
changes from 0_8_5 to 0_8_6.txt

@@ -56,6 +56,7 @@ $lips1
 
 $pcdes_<bodypart>random
 $pcdes_<bodypart>
+bmi_calc                                  -> pcs_bmi
 
 === Added variables ===
 
@@ -64,3 +65,4 @@ $pcdes_<bodypart>
 [String variables]
 $pc_desc[] <- Hold descriptive words for PC's body parts
 $pc_descWordy[] <- Hold more descriptive words for PC's body parts
+pcs_bmi <- New variable for bmi

+ 1 - 1
locations/Cheatmenu_din.qsrc

@@ -956,7 +956,7 @@ $cheatmenu['parameters'] = {
 	'agilbuf = <<agilbuf>>'
 	'strenbuf = <<strenbuf>>'
 	'vitalbuf = <<vitalbuf>>'
-	'BMI (bmi_calc) = <<bmi_calc>>'
+	'BMI (pcs_bmi) = <<pcs_bmi>>'
 	'weight (pcs_weight) = <<pcs_weight>> kg'
 	'bust (pcs_bust) = <<pcs_bust>>'
 	'band (pcs_band) = <<pcs_band>>'

+ 20 - 20
locations/beg1.qsrc

@@ -52,10 +52,10 @@ if $ARGS[0] = 'br':
 	gs 'exercise', 'tier2', 30, 'run_exp'
 
     begminus = 0
-    if bmi_calc > 25: 
-        begminus = ((bmi_calc - 25)*4)
-    elseif bmi_calc < 18:
-        begminus = ((25 - bmi_calc)*6)
+    if pcs_bmi > 25: 
+        begminus = ((pcs_bmi - 25)*4)
+    elseif pcs_bmi < 18:
+        begminus = ((25 - pcs_bmi)*6)
     end
     begresult = pcs_run - begminus
     
@@ -104,10 +104,10 @@ if $ARGS[0] = 'kms':
 	gs 'exercise', 'tier2', 30, 'run_exp'
 
     begminus = 0
-    if bmi_calc > 25: 
-        begminus = ((bmi_calc - 25)*4)
-    elseif bmi_calc < 18:
-        begminus = ((25 - bmi_calc)*6)
+    if pcs_bmi > 25: 
+        begminus = ((pcs_bmi - 25)*4)
+    elseif pcs_bmi < 18:
+        begminus = ((25 - pcs_bmi)*6)
     end
     begresult = pcs_run - begminus
     
@@ -158,10 +158,10 @@ if $ARGS[0] = 'ross':
 	gs 'exercise', 'tier2', 30, 'run_exp'
 
 	begminus = 0
-    if bmi_calc > 25: 
-        begminus = ((bmi_calc - 25)*4)
-    elseif bmi_calc < 18:
-        begminus = ((25 - bmi_calc)*6)
+    if pcs_bmi > 25: 
+        begminus = ((pcs_bmi - 25)*4)
+    elseif pcs_bmi < 18:
+        begminus = ((25 - pcs_bmi)*6)
     end
     begresult = pcs_run - begminus
     
@@ -215,10 +215,10 @@ if $ARGS[0] = 'kval':
     minut += 60
     
     begminus = 0
-    if bmi_calc > 25: 
-        begminus = ((bmi_calc - 25)*4)
-    elseif bmi_calc < 18:
-        begminus = ((25 - bmi_calc)*6)
+    if pcs_bmi > 25: 
+        begminus = ((pcs_bmi - 25)*4)
+    elseif pcs_bmi < 18:
+        begminus = ((25 - pcs_bmi)*6)
     end
     begresult = pcs_run - begminus
     
@@ -273,10 +273,10 @@ if $ARGS[0] = 'evro':
     minut += 120
     
     begminus = 0
-    if bmi_calc > 25: 
-        begminus = ((bmi_calc - 25)*4)
-    elseif bmi_calc < 18:
-        begminus = ((25 - bmi_calc)*6)
+    if pcs_bmi > 25: 
+        begminus = ((pcs_bmi - 25)*4)
+    elseif pcs_bmi < 18:
+        begminus = ((25 - pcs_bmi)*6)
     end
     begresult = pcs_run - begminus
     

+ 15 - 34
locations/body.qsrc

@@ -35,26 +35,7 @@ if $ARGS[0] = '':
 			
 		!!BMI Calculation
 
-		bmi_calc = FUNC('body_shape', 'bmicalc', salo, pcs_hgt)
-
-		!!BMI Descriptions
-		if bmi_calc < 16:
-			$bmi_desc = 'You are severely underweight.'
-		elseif bmi_calc >= 16 and bmi_calc < 19:
-			$bmi_desc = 'You are underweight'
-		elseif bmi_calc >= 19 and bmi_calc < 25:
-			$bmi_desc = 'You have a normal, healthy weight.'
-		elseif bmi_calc >= 25 and bmi_calc < 30:
-			$bmi_desc = 'You are overweight.'
-		elseif bmi_calc >= 30 and bmi_calc < 35:
-			$bmi_desc = 'You are moderately obese.'
-		elseif bmi_calc >= 35 and bmi_calc < 40:
-			$bmi_desc = 'You are severely obese.'
-		elseif bmi_calc >= 40 and bmi_calc < 45:
-			$bmi_desc = 'You are very severely obese.'
-		elseif bmi_calc >= 45:
-			$bmi_desc = 'You are morbidly obese.'
-		end
+		pcs_bmi = FUNC('body_shape', 'bmicalc', salo, pcs_hgt)
 	end
 
 	gs 'body_desc'
@@ -94,9 +75,9 @@ if $ARGS[0] = '':
 	end
 
 	!! Calculate hotcat etc
-	tempclothingbonus = FUNC('body', 'calcClothesBonus', PXCloThinness, PXCloTopCut, PXCloBottomShortness, PCloQuality, $clothingworntype, bmi_calc)
+	tempclothingbonus = FUNC('body', 'calcClothesBonus', PXCloThinness, PXCloTopCut, PXCloBottomShortness, PCloQuality, $clothingworntype, pcs_bmi)
 	tempAccessoriesBonus = FUNC('body', 'calcAccessoriesBonus', bonusZ, PShoQuality, $pantyworntype, $braworntype)
-	tempGroomingBonus = FUNC('body', 'calcGroomingBonus', pcs_lipbalm, mopkoef, pcs_hairbsh, pcs_breath, deodorant_on, bmi_calc)
+	tempGroomingBonus = FUNC('body', 'calcGroomingBonus', pcs_lipbalm, mopkoef, pcs_hairbsh, pcs_breath, deodorant_on, pcs_bmi)
 	tempGroomingPenalty = FUNC('body', 'calcGroomingPenalty', pcs_hairlng, pcs_sweat, glassvnesh, dyevmod, legkoef)
 	Hotcat = FUNC('body', 'calcHotcat', pcs_apprncbase, (supnatvnesh + extra_supnatvnesh), tempclothingbonus, tempAccessoriesBonus, tempGroomingBonus, tempGroomingPenalty)
 	pcs_apprnc = temppcs_apprnc & killvar 'temppcs_apprnc' & killvar 'temppcs_maxapprnc'
@@ -218,9 +199,9 @@ if $ARGS[0] = 'calcClothesBonus':
 	tempPXCloBottomShortness = ARGS[3] & !! PXCloBottomShortness
 	tempPCloQuality = ARGS[4] & !! PCloQuality
 	$tempclothingworntype = $ARGS[5] & !!$clothingworntype
-	tempbmi_calc = ARGS[6] & !! bmi_calc
+	temppcs_bmi = ARGS[6] & !! pcs_bmi
 
-	if tempbmi_calc < 16:
+	if temppcs_bmi < 16:
 		!!severely underweight
 		if $tempclothingworntype = 'nude':
 			tempRevealing = 0
@@ -229,7 +210,7 @@ if $ARGS[0] = 'calcClothesBonus':
 			tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
 			tempRevealing = tempRevealing / 2
 		end
-	elseif tempbmi_calc >= 16 and tempbmi_calc < 19:
+	elseif temppcs_bmi >= 16 and temppcs_bmi < 19:
 		!!underweight
 		if $tempclothingworntype = 'nude':
 			tempRevealing = 0
@@ -238,7 +219,7 @@ if $ARGS[0] = 'calcClothesBonus':
 			tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
 			tempRevealing = tempRevealing / 2
 		end
-	elseif tempbmi_calc >= 19 and tempbmi_calc < 25:
+	elseif temppcs_bmi >= 19 and temppcs_bmi < 25:
 		!!normal, healthy weight
 		if $tempclothingworntype = 'nude':
 			tempRevealing = 405
@@ -247,7 +228,7 @@ if $ARGS[0] = 'calcClothesBonus':
 			tempRevealing = tempPXCloThinness + tempPXCloTopCut + tempPXCloBottomShortness
 			tempRevealing = tempRevealing / 2
 		end
-	elseif tempbmi_calc >= 25 and tempbmi_calc < 30:
+	elseif temppcs_bmi >= 25 and temppcs_bmi < 30:
 		!!overweight
 		if $tempclothingworntype = 'nude':
 			tempRevealing = 405
@@ -256,7 +237,7 @@ if $ARGS[0] = 'calcClothesBonus':
 			tempRevealing = tempPXCloThinness + tempPXCloTopCut + tempPXCloBottomShortness
 			tempRevealing = tempRevealing / 2
 		end
-	elseif tempbmi_calc >= 30 and tempbmi_calc < 35:
+	elseif temppcs_bmi >= 30 and temppcs_bmi < 35:
 		!!moderately obese
 		if $tempclothingworntype = 'nude':
 			tempRevealing = 0
@@ -265,7 +246,7 @@ if $ARGS[0] = 'calcClothesBonus':
 			tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
 			tempRevealing = tempRevealing * 3 / 4
 		end
-	elseif tempbmi_calc >= 35 and tempbmi_calc < 40:
+	elseif temppcs_bmi >= 35 and temppcs_bmi < 40:
 		!!severely obese
 		if $tempclothingworntype = 'nude':
 			tempRevealing = 0
@@ -274,7 +255,7 @@ if $ARGS[0] = 'calcClothesBonus':
 			tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
 			tempRevealing = tempRevealing * 3 / 4
 		end
-	elseif tempbmi_calc >= 40 and tempbmi_calc < 45:
+	elseif temppcs_bmi >= 40 and temppcs_bmi < 45:
 		!!very severely obese
 		if $tempclothingworntype = 'nude':
 			tempRevealing = 0
@@ -283,7 +264,7 @@ if $ARGS[0] = 'calcClothesBonus':
 			tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
 			tempRevealing = tempRevealing * 3 / 4
 		end
-	elseif tempbmi_calc >= 45:
+	elseif temppcs_bmi >= 45:
 		!!morbidly obese
 		if $tempclothingworntype = 'nude':
 			tempRevealing = 0
@@ -309,7 +290,7 @@ if $ARGS[0] = 'calcClothesBonus':
 	killvar '$tempclothingworntype'
 	killvar 'tempRevealing'
 	killvar 'tempCloAdjustedBeauty'
-	killvar 'tempbmi_calc'
+	killvar 'temppcs_bmi'
 end
 
 if $ARGS[0] = 'calcAccessoriesBonus':
@@ -350,7 +331,7 @@ if $ARGS[0] = 'calcGroomingBonus':
 	temppcs_hairbsh = ARGS[3] & !! pcs_hairbsh
 	temppcs_breath = ARGS[4] & !! pcs_breath
 	tempdeodorant_on = ARGS[5] & !! deodorant_on
-	tempbmi_calc = ARGS[6] & !! bmi_calc
+	temppcs_bmi = ARGS[6] & !! pcs_bmi
 
 	if temppcs_lipbalm > 0:
 		lipbalmKoef = 5
@@ -367,7 +348,7 @@ if $ARGS[0] = 'calcGroomingBonus':
 	!!Small bonus for wearing deodorant, if pcs_sweat is low enough
 	if tempdeodorant_on = 1 and temppcs_sweat < 20: tempGroomingBonus += 5
 
-	tempGroomingBonus = FUNC('body_shape', 'bmiadjust', tempGroomingBonus, tempbmi_calc)
+	tempGroomingBonus = FUNC('body_shape', 'bmiadjust', tempGroomingBonus, temppcs_bmi)
 
 	result = tempGroomingBonus
 

+ 22 - 1
locations/body_desc.qsrc

@@ -14,7 +14,7 @@ if $ARGS[0] = '':
     gs $this, 'throat'
     gs $this, 'pussy'
     gs $this, 'anus'
-	if dounspell = 0: gs $this, 'butt' & gs $this, 'breasts'
+	if dounspell = 0: gs $this, 'butt' & gs $this, 'breasts' & gs $this, 'BMI'
 	gs $this, 'lips'
 	gs $this, 'hair'
     gs $this, 'tan'
@@ -185,6 +185,27 @@ if $ARGS[0] = 'anus':
 	end
 end
 
+if $ARGS[0] = 'BMI':
+	!!BMI Descriptions
+	if bmi_calc < 16:
+		$bmi_desc = 'You are severely underweight.'
+	elseif bmi_calc >= 16 and bmi_calc < 19:
+		$bmi_desc = 'You are underweight'
+	elseif bmi_calc >= 19 and bmi_calc < 25:
+		$bmi_desc = 'You have a normal, healthy weight.'
+	elseif bmi_calc >= 25 and bmi_calc < 30:
+		$bmi_desc = 'You are overweight.'
+	elseif bmi_calc >= 30 and bmi_calc < 35:
+		$bmi_desc = 'You are moderately obese.'
+	elseif bmi_calc >= 35 and bmi_calc < 40:
+		$bmi_desc = 'You are severely obese.'
+	elseif bmi_calc >= 40 and bmi_calc < 45:
+		$bmi_desc = 'You are very severely obese.'
+	elseif bmi_calc >= 45:
+		$bmi_desc = 'You are morbidly obese.'
+	end
+end
+
 if $ARGS[0] = 'breasts':
 	!! If the PC has vastly less breast tissue than she does silicone, use a slightly more derogatory term. There is actually not a great way to calculate this; silicone counts almost the same on all body types, even though an increase of 200cc, for example, would be vastly
 	!! more noticeable on a thinner body than a heavier one. I have experimented with moving where the silicone is factored in to the body shape calculations, but ultimately there is just no better way to do it than how it is now, given the things that increase the amount

+ 134 - 32
locations/body_shape.qsrc

@@ -26,6 +26,16 @@
 !! imgset6ovr[x] and imgset7ovr[x] = a flag to indicate that an image set (x) has its own image 6 and/or 7
 !! extended lash functionality; pcs_lashes = n are: {2, largest natural size}, {3, with temporary false lashes on or basic 2D lash extensions}, {4, with ornate false lashes on or lavish 4D extensions}, {5, with extremely ornate, 6D-style extensions} - xerya
 
+$this = 'body_shape'
+
+if $ARGS[0] = 'RegularUpdate':
+	if dounspell = 0:
+		gs $this, 'UpdateBodyMeasurement'
+		pcs_weight = func($this, 'CalcWeight')
+		pcs_bmi = func($this, 'CalcBMI')
+	end
+end
+
 if $ARGS[0] = '':
 	!!This controls the gradual change in stat to -buf
 	if strenbuf > pcs_stren: strenbuf -= 1
@@ -244,7 +254,7 @@ if $ARGS[0] = '':
 	if salolast < salo: salolast += 1
 
 	!!Setting the pcs_apprnc bonus based on fat and strength
-	bmi_calc = FUNC('body_shape', 'bmicalc')
+	pcs_bmi = FUNC('body_shape', 'CalcBMI')
 	bodykoef = FUNC('body_shape', 'setbodykoef')
 
 	!!This is to clean up unused variables
@@ -253,28 +263,120 @@ if $ARGS[0] = '':
 	killvar 'koefvesbt' & killvar 'koefbt'
 end
 
+if $ARGS[0] = 'UpdateBodyMeasurement':
+	pcs_hips = (pcs_hgt * hratio) / 100 + vhips
+	pcs_waist = (pcs_hips * wratio) / 100 + vofat
+	pcs_band = (pcs_waist * bratio) / 100 + vofat
+	pcs_bust = (pcs_waist * bratio) / 100 + nbsize + magicf2b + silicone
+	pcs_butt = (pcs_hips / 10) + silicone_butt + butt_cheat
+	pcs_cupsize = pcs_bust - pcs_band
+
+	! Update tits size
+	if pcs_cupsize <= 5:
+		tits = 0
+		$titsize = 'AA cup'
+	elseif pcs_cupsize <= 10:
+		tits = 1
+		$titsize = 'A cup'
+	elseif pcs_cupsize <= 15:
+		tits = 2
+		$titsize = 'B cup'
+	elseif pcs_cupsize <= 20:
+		tits = 3
+		$titsize = 'C cup'
+	elseif pcs_cupsize <= 25:
+		tits = 4
+		$titsize = 'D cup'
+	elseif pcs_cupsize <= 30:
+		tits = 5
+		$titsize = 'E cup'
+	elseif pcs_cupsize <= 35:
+		tits = 6
+		$titsize = 'F cup'
+	elseif pcs_cupsize <= 40:
+		tits = 7
+		$titsize = 'G cup'
+	elseif pcs_cupsize <= 45:
+		tits = 8
+		$titsize = 'H cup'
+	elseif pcs_cupsize <= 50:
+		tits = 9
+		$titsize = 'I cup'
+	elseif pcs_cupsize <= 55:
+		tits = 10
+		$titsize = 'J cup'
+	else
+		tits = 11
+		$titsize = 'K cup'
+	end
+end
+
+if $ARGS[0] = 'CalcWeight':
+	!{pcs_weight: Svetas weight in kg 
+	Optimal Weight (170cm): 60kg, 60 salo
+	This is an approximation, so that a sveta with a different height has the same BMI for the same salo values.
+	The default height of 170 cm is used as a starting point. The bmi deviates by 0.06 for a deviation of 10cm and 0.4 for a deviation of 20cm.}
+	result = 30 + salo / 2 + (pcs_hgt - 170) * 7 / 10
+
+	!{Do not remove (julzor)
+	This is the old more complex function, but it doesn''t work correctly.
+	This variable is actually only used ONCE (except for the BMI calculation), when stripping, to see if you fall off the pole from being too heavy. I am reluctant to touch it, since the math is not explained. Maybe later.
+	Weight = (height in cm x bottom of average weight in kilos for a 170cm female / 170cm + (hip modifier + 2 x overrun fat)/4 + cup size}
+	
+	!result = (pcs_hgt * 62 / 170) + (vhips + (vofat * 2)) / 4 + tits
+end
+
+if $ARGS[0] = 'UpdateBodyImage':
+	if dounspell = 1:
+		salocatnow = (pcs_hips / 10) - 5
+		if bdsetlock = 0:
+			if (knowpreg = 1 or (preg = 1 and thinkpreg = 1) or (preg = 1 and PregChem > 3600)):
+				bodset = 3
+			elseif strenbuf >= 70:
+				bodset = 2
+			elseif strenbuf <= 40:
+				bodset = 0
+			else
+				bodset = 1
+			end
+		else
+			bodset = fixbodset
+		end
+	elseif (knowpreg = 1 or (preg = 1 and thinkpreg = 1) or (preg = 1 and PregChem > 3600)) and bodet ! 3 and bdsetlock = 0:
+		bodset = 3
+	elseif preg = 0 and bodset = 3 and bdsetlock = 0:
+		if strenbuf >= 70:
+			bodset = 2
+		elseif strenbuf <= 40:
+			bodset = 0
+		else
+			bodset = 1
+		end
+	end 
+end
+
 if $ARGS[0] = 'setbodykoef':
 	!!Setting the pcs_apprnc bonus based on fat and strength
 
-	if bmi_calc < 16:
+	if pcs_bmi < 16:
 		!! severely underweight
 		tempbodykoef = 30
-    elseif bmi_calc < 19:
+    elseif pcs_bmi < 19:
 		!! underweight
 		tempbodykoef = 65
-    elseif bmi_calc < 25:
+    elseif pcs_bmi < 25:
 		!! healthy weight
 		tempbodykoef = 85
-    elseif bmi_calc < 30:
+    elseif pcs_bmi < 30:
 		!! overweight
 		tempbodykoef = 75
-    elseif bmi_calc < 35:
+    elseif pcs_bmi < 35:
 		!! moderately obese
 		tempbodykoef = 45
-    elseif bmi_calc < 40:
+    elseif pcs_bmi < 40:
 		!! severely obese
 		tempbodykoef = 25
-    elseif bmi_calc < 45:
+    elseif pcs_bmi < 45:
 		!! very severely obese
 		tempbodykoef = 5
     else
@@ -308,33 +410,33 @@ if $ARGS[0] = 'setbodykoef':
 	killvar 'tempbodykoef'
 end
 
-if $ARGS[0] = 'bmicalc':
+if $ARGS[0] = 'CalcBMI':
 	result = 10000 * (30 + salo / 2 + (pcs_hgt - 170) * 7 / 10) / (pcs_hgt * pcs_hgt)
 end
 
 if $ARGS[0] = 'bmiadjust':
 	tempValue = ARGS[1] & !!value to be adjusted
-	tempadjbmi_calc = ARGS[2] & !!bmi_calc
+	tempadjpcs_bmi = ARGS[2] & !!pcs_bmi
 
-	if tempadjbmi_calc < 16:
+	if tempadjpcs_bmi < 16:
 		!! severely underweight
 		tempValue = tempValue * 50 / 100
-    elseif tempadjbmi_calc < 19:
+    elseif tempadjpcs_bmi < 19:
 		!! underweight
 		tempValue = tempValue * 95 / 100
-    elseif tempadjbmi_calc < 25:
+    elseif tempadjpcs_bmi < 25:
 		!! healthy weight
 		!! normal bonus
-    elseif tempadjbmi_calc < 30:
+    elseif tempadjpcs_bmi < 30:
 		!! overweight
 		tempValue = tempValue * 95 / 100
-    elseif tempadjbmi_calc < 35:
+    elseif tempadjpcs_bmi < 35:
 		!! moderately obese
 		tempValue = tempValue * 80 / 100
-    elseif tempadjbmi_calc < 40:
+    elseif tempadjpcs_bmi < 40:
 		!! severely obese
 		tempValue = tempValue * 55 / 100
-    elseif tempadjbmi_calc < 45:
+    elseif tempadjpcs_bmi < 45:
 		!! very severely obese
 		tempValue = tempValue * 50 / 100
     else
@@ -344,7 +446,7 @@ if $ARGS[0] = 'bmiadjust':
 
 	result = tempValue
 	killvar 'tempValue'
-	killvar 'tempadjbmi_calc'
+	killvar 'tempadjpcs_bmi'
 end
 
 if $ARGS[0] = 'softreset':
@@ -478,24 +580,24 @@ if $ARGS[0] = 'initial':
 	!!pcs_weight = (pcs_hgt * 62 / 170) + (vhips + (vofat * 2)) / 4 + tits
 	
 	!!BMI Calculation
-	bmi_calc = FUNC('body_shape', 'bmicalc')
+	pcs_bmi = FUNC('body_shape', 'CalcBMI')
 	
 	!!BMI Descriptions
-	if bmi_calc < 16:
+	if pcs_bmi < 16:
 		$bmi_desc = 'You are severely underweight.'
-	elseif bmi_calc >= 16 and bmi_calc < 19:
+	elseif pcs_bmi >= 16 and pcs_bmi < 19:
 		$bmi_desc = 'You are underweight'
-	elseif bmi_calc >= 19 and bmi_calc < 25:
+	elseif pcs_bmi >= 19 and pcs_bmi < 25:
 		$bmi_desc = 'You have a normal, healthy weight.'
-	elseif bmi_calc >= 25 and bmi_calc < 30:
+	elseif pcs_bmi >= 25 and pcs_bmi < 30:
 		$bmi_desc = 'You are overweight.'
-	elseif bmi_calc >= 30 and bmi_calc < 35:
+	elseif pcs_bmi >= 30 and pcs_bmi < 35:
 		$bmi_desc = 'You are moderately obese.'
-	elseif bmi_calc >= 35 and bmi_calc < 40:
+	elseif pcs_bmi >= 35 and pcs_bmi < 40:
 		$bmi_desc = 'You are severely obese.'
-	elseif bmi_calc >= 40 and bmi_calc < 45:
+	elseif pcs_bmi >= 40 and pcs_bmi < 45:
 		$bmi_desc = 'You are very severely obese.'
-	elseif bmi_calc >= 45:
+	elseif pcs_bmi >= 45:
 		$bmi_desc = 'You are morbidly obese.'
 	end
 end
@@ -550,7 +652,7 @@ if $ARGS[0] = 'calcHeadBonus':
 	else
 		resnicbonus = 0		
 	end
-	resnicbonus = FUNC('body_shape', 'bmiadjust', resnicbonus, bmi_calc)
+	resnicbonus = FUNC('body_shape', 'bmiadjust', resnicbonus, pcs_bmi)
 
 	!!	Setting Eye Size bonus
 	if pcs_eyesize = 1:
@@ -562,7 +664,7 @@ if $ARGS[0] = 'calcHeadBonus':
 	else
 		glarazbonus = 0
 	end
-	glarazbonus = FUNC('body_shape', 'bmiadjust', glarazbonus, bmi_calc)
+	glarazbonus = FUNC('body_shape', 'bmiadjust', glarazbonus, pcs_bmi)
 
 	!!	Setting the Lip size bonus
 	if pcs_lip = 0:
@@ -576,10 +678,10 @@ if $ARGS[0] = 'calcHeadBonus':
 	else
 		lipbonus = 3
 	end
-	lipbonus = FUNC('body_shape', 'bmiadjust', lipbonus, bmi_calc)
+	lipbonus = FUNC('body_shape', 'bmiadjust', lipbonus, pcs_bmi)
 	
 	teethcalc = (5 * pcs_teeth)
-	if teethcalc < 0: teethcalc = FUNC('body_shape', 'bmiadjust', teethcalc, bmi_calc)
+	if teethcalc < 0: teethcalc = FUNC('body_shape', 'bmiadjust', teethcalc, pcs_bmi)
 
 	result = resnicbonus + glarazbonus + lipbonus - teethcalc
 
@@ -588,7 +690,7 @@ end
 if $ARGS[0] = 'calcAttributeBonus':
 	tempAttributeBonus = (pcs_agil / 10) + (pcs_vital / 10)
 
-	result = FUNC('body_shape', 'bmiadjust', tempAttributeBonus, bmi_calc)
+	result = FUNC('body_shape', 'bmiadjust', tempAttributeBonus, pcs_bmi)
 	killvar 'tempAttributeBonus'
 end
 

+ 1 - 1
locations/din_van.qsrc

@@ -1090,7 +1090,7 @@ if $ARGS[0] = 'private':
 		dynamic $toymanage
 	end
 
-	'<a href="exec:msg ''<center>Your weight is <<pcs_weight>> kg<br>Your body mass index (BMI) is <<bmi_calc>>.<br><<$bmi_desc>></center>''">Check weight on the scales</a>'
+	'<a href="exec:msg ''<center>Your weight is <<pcs_weight>> kg<br>Your body mass index (BMI) is <<pcs_bmi>>.<br><<$bmi_desc>></center>''">Check weight on the scales</a>'
 
 	gs 'din_van', 'prvt_pee'
 

+ 10 - 10
locations/foto.qsrc

@@ -299,12 +299,12 @@ if $ARGS[0] = 'studio':
 			elseif pcs_skin < 40:
 				'"Girl, your face is covered in acne unless you improve your appearance there is no chance of working here."'
 				act 'Leave':minut += 1 & gt 'city_center'
-			elseif bmi_calc >= foto_weight and foto_weight > 0:
+			elseif pcs_bmi >= foto_weight and foto_weight > 0:
 				'You walk up to the front desk and find the same man who interviewed you previously. He looks up at you from his computer as you approach and frowns.'
 				'Before you can say anything, he sternly says, "Girl, I told you to lose weight, not put it on! Now get out of here until you slim down some!"'
 				'The comment turns your face bright red and you stop in your tracks. He stares at you angrily until you slowly start to back up and head towards the door.'
 				act 'Leave':minut += 1 & gt 'city_center'
-			elseif bmi_calc < foto_weight and foto_weight > 0:
+			elseif pcs_bmi < foto_weight and foto_weight > 0:
 				gt'foto','interview2'
 			elseif fotofakepassport = 1 and age < 18:
 				'You walk up to the front desk and find the same man who "interviewed" you previously. He looks up at you from his computer as you approach.'
@@ -489,7 +489,7 @@ if $ARGS[0] = 'interview2':
 		gs 'willpower', 'skill', 'pcs_inhib', 'hard'
 	end
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/photo/foto.jpg"></center>'
-	if bmi_calc < foto_weight:
+	if pcs_bmi < foto_weight:
 		'You walk up to the front desk and find the same man who interviewed you previously. He looks up at you from his computer as you approach.'
 		'"Hmm..." he says appraisingly. "You look like you lost some weight since the last time I saw you."'
 		'"Yes I did!" You smile brightly at him.'
@@ -539,8 +539,8 @@ if $ARGS[0] = 'interview2':
 			gs 'clothing', 'strip_all'
 			gs 'stat'
 			'<center><video autoplay loop src="images/locations/city/citycenter/photo/strip1.mp4"></video><video autoplay loop src="images/locations/city/citycenter/photo/strip2.mp4"></video></center>'
-			if bmi_calc < foto_weight and foto_weight > 0:
-				foto_weight = bmi_calc
+			if pcs_bmi < foto_weight and foto_weight > 0:
+				foto_weight = pcs_bmi
 				if foto_weight < 25: fotofit = 1
 				'You strip off your clothing for the photographer once again, holding your breath and hoping that you''ve slimmed down enough to work here now.'
 				'Just like before, he circles you, asks you to adjust your pose for him, carefully inspecting every aspect of your nude body.'
@@ -559,7 +559,7 @@ if $ARGS[0] = 'interview2':
 					'You nod in understanding.'
 				end
 				act'Continue':
-					if bmi_calc < 25 or hotcat >= 6:
+					if pcs_bmi < 25 or hotcat >= 6:
 						gt'foto','job_offer'
 					else
 						gt'foto','job_decline'
@@ -574,7 +574,7 @@ if $ARGS[0] = 'interview2':
 				'He circles you slowly, occasionally asking you to adjust your pose slightly, carefully inspecting every aspect of your nude body. Your <<$pcs_eyecol>> eyes framed by your <<$pcs_haircol>> hair, your <<$pc_desc[''lip size'']>>lip, your <<$titsize>> breasts, your <<$skin1>> <<$pcs_tan>> skin, your thighs, even your <<$pcdesc_pubes>> pussy...'
 				'He spends several minutes doing this without saying anything. Several people walk by while he does, including several beautiful and nude women who glance at you, whispering to each other before moving on.'
 				act'Continue':
-					if bmi_calc < 25 or hotcat >= 6:
+					if pcs_bmi < 25 or hotcat >= 6:
 						gt'foto','job_offer'
 					else
 						gt'foto','job_decline'
@@ -595,7 +595,7 @@ if $ARGS[0] = 'interview2':
 			'He spends several minutes doing this without saying anything. Several people walk by while he does, including several beautiful and nude women who glance at you, whispering to each other before moving on.'
 			'You blush furiously at the attention, both his and the other models.'
 			act'Continue':
-				if bmi_calc < 25 or hotcat >= 6:
+				if pcs_bmi < 25 or hotcat >= 6:
 					gt'foto','job_offer'
 				else
 					gt'foto','job_decline'
@@ -627,7 +627,7 @@ if $ARGS[0] = 'job_decline':
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/photo/foto.jpg"></center>'
 			'You glumly pick your clothes up off the floor and get dressed before leaving. As you do, you stop at the door and look back in.'
 			'<i>Is this it for me? Am I ever going to be able to lose enough weight to work here?</i>'
-			foto_weight = bmi_calc
+			foto_weight = pcs_bmi
 			foto_cupsize = tits
 			gs 'clothing', 'wear_last_worn'
 			gs 'underwear', 'wear'
@@ -640,7 +640,7 @@ if $ARGS[0] = 'job_decline':
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/photo/foto.jpg"></center>'
 			'You nod at him, feeling a bit dejected but more determined than ever. You get dressed with purpose and head to the door. As you do, you think to yourself...'
 			'<i>I will be able to do this! I''ll get in shape and I''ll work here one day! I''m not going to lose my shot at this!</i>'
-			foto_weight = bmi_calc
+			foto_weight = pcs_bmi
 			foto_cupsize = tits
 			gs 'clothing', 'wear_last_worn'
 			gs 'underwear', 'wear'

+ 1 - 1
locations/gadhouse.qsrc

@@ -305,7 +305,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>> kg<br>Your body mass index (BMI) is <<bmi_calc>>.<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>> kg<br>Your body mass index (BMI) is <<pcs_bmi>>.<br><<$bmi_desc>></center>''">scales</a>.'
 
 	if hour < 8:
 		temp = rand(0,9)

+ 8 - 8
locations/gschool_grounds.qsrc

@@ -519,10 +519,10 @@ if $ARGS[0] = 'SchoolRun':
 		wait 725
 
 		begminus = 0
-		if bmi_calc > 25: 
-			begminus = ((bmi_calc - 25)*4)
-		elseif bmi_calc < 18:
-			begminus = ((25 - bmi_calc)*6)
+		if pcs_bmi > 25: 
+			begminus = ((pcs_bmi - 25)*4)
+		elseif pcs_bmi < 18:
+			begminus = ((25 - pcs_bmi)*6)
 		end
         begresult = pcs_run - begminus
 		
@@ -631,10 +631,10 @@ if $ARGS[0] = 'SchoolRun2':
 		wait 725
 
 		begminus = 0
-		if bmi_calc > 25: 
-			begminus = ((bmi_calc - 25)*4)
-		elseif bmi_calc < 18:
-			begminus = ((25 - bmi_calc)*6)
+		if pcs_bmi > 25: 
+			begminus = ((pcs_bmi - 25)*4)
+		elseif pcs_bmi < 18:
+			begminus = ((25 - pcs_bmi)*6)
 		end
         begresult = pcs_run - begminus
 		

+ 1 - 1
locations/pav_lake.qsrc

@@ -243,7 +243,7 @@ if temper >= 15 and month >= 5 and month <= 9 and hour >= 6 and hour <= 20:
 		elseif PCloswimwear = 1:
 			if pcs_hips >= 110:
 				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/lake/lake.walk.bikini.fat0,1.jpg"></center>'
-			elseif bmi_calc > 24:
+			elseif pcs_bmi > 24:
 				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/lake/lake.walk.bikini.fat0,0.jpg"></center>'
 			else
 				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/lake/lake.walk.bikini0,'+rand(0,3)+'.jpg"></center>'