Browse Source

[added/changed] Updated the weight function to now be centered around 165 cm (as requested). New function which calculates the optimal `pcs_mass['body']` (bmi = 22.5). Expect a shift in bmi when loading an old save.

anjuna krokus 1 month ago
parent
commit
a247eaaa62
1 changed files with 6 additions and 2 deletions
  1. 6 2
      locations/body.qsrc

+ 6 - 2
locations/body.qsrc

@@ -71,7 +71,7 @@ if $ARGS[0] = 'CalcWeight':
 	This is an approximation, so that a sveta with a different height has the same BMI for the same pcs_mass['body'] 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 = (600 + 7 * (pcs_mass['body'] + pcs_mass['bust'] + pcs_mass['butt']) + 14 * (pcs_hgt - 170)) / 20
+	result = (2700 + 33 * (pcs_mass['body'] + pcs_mass['bust'] + pcs_mass['butt']) + 70 * (pcs_hgt - 165)) / 100
 
 	!{Do not remove (julzor)
 	This is the old more complex function, but it doesn''t work correctly.
@@ -83,7 +83,7 @@ end
 
 if $ARGS[0] = 'CalcWeight2':
 	!! weight2 = 10 * weight
-	result = (600 + 7 * (pcs_mass['body'] + pcs_mass['bust'] + pcs_mass['butt']) + 14 * (pcs_hgt - 170)) / 2
+	result = (2700 + 33 * (pcs_mass['body'] + pcs_mass['bust'] + pcs_mass['butt']) + 70 * (pcs_hgt - 165)) / 10
 	!result = (pcs_hgt * 62 / 17) + (10 * (vhips + (bodyVars['vofat'] * 2))) / 4 + 10 * tits
 end
 
@@ -98,6 +98,10 @@ if $ARGS[0] = 'CalcBMI2':
 end
 
 
+if $ARGS[0] = 'CalcOptBodyMass':
+	result = ((pcs_hgt * pcs_hgt * 225) - 2700000 - 70000 * (pcs_hgt - 165)) / (550 * (60 + pcs_mass['bust_gen'] + pcs_mass['butt_gen']))
+end
+
 
 
 	!!===================================================!!