|
@@ -244,8 +244,8 @@ if $ARGS[0] = '':
|
|
if salolast < salo: salolast += 1
|
|
if salolast < salo: salolast += 1
|
|
|
|
|
|
!!Setting the pcs_apprnc bonus based on fat and strength
|
|
!!Setting the pcs_apprnc bonus based on fat and strength
|
|
- bmi_calc = FUNC('body_shape', 'bmicalc', salo, pcs_hgt)
|
|
|
|
- bodykoef = FUNC('body_shape', 'setbodykoef', bmi_calc, strenbuf, salocatnow, vofat)
|
|
|
|
|
|
+ bmi_calc = FUNC('body_shape', 'bmicalc')
|
|
|
|
+ bodykoef = FUNC('body_shape', 'setbodykoef')
|
|
|
|
|
|
!!This is to clean up unused variables
|
|
!!This is to clean up unused variables
|
|
killvar 'normbuffpick' & killvar 'nrmbfpckct'
|
|
killvar 'normbuffpick' & killvar 'nrmbfpckct'
|
|
@@ -255,30 +255,26 @@ end
|
|
|
|
|
|
if $ARGS[0] = 'setbodykoef':
|
|
if $ARGS[0] = 'setbodykoef':
|
|
!!Setting the pcs_apprnc bonus based on fat and strength
|
|
!!Setting the pcs_apprnc bonus based on fat and strength
|
|
- tempbmi_calc = ARGS[1] & !! result of bmicalc
|
|
|
|
- tempstrenbuf = ARGS[2] & !!strenbuf
|
|
|
|
- tempsalocatnow = ARGS[3] & !! salocatnow
|
|
|
|
- tempvofat = ARGS[4] & !! vofat
|
|
|
|
|
|
|
|
- if tempbmi_calc < 16:
|
|
|
|
|
|
+ if bmi_calc < 16:
|
|
!! severely underweight
|
|
!! severely underweight
|
|
tempbodykoef = 30
|
|
tempbodykoef = 30
|
|
- elseif tempbmi_calc < 19:
|
|
|
|
|
|
+ elseif bmi_calc < 19:
|
|
!! underweight
|
|
!! underweight
|
|
tempbodykoef = 65
|
|
tempbodykoef = 65
|
|
- elseif tempbmi_calc < 25:
|
|
|
|
|
|
+ elseif bmi_calc < 25:
|
|
!! healthy weight
|
|
!! healthy weight
|
|
tempbodykoef = 85
|
|
tempbodykoef = 85
|
|
- elseif tempbmi_calc < 30:
|
|
|
|
|
|
+ elseif bmi_calc < 30:
|
|
!! overweight
|
|
!! overweight
|
|
tempbodykoef = 75
|
|
tempbodykoef = 75
|
|
- elseif tempbmi_calc < 35:
|
|
|
|
|
|
+ elseif bmi_calc < 35:
|
|
!! moderately obese
|
|
!! moderately obese
|
|
tempbodykoef = 45
|
|
tempbodykoef = 45
|
|
- elseif tempbmi_calc < 40:
|
|
|
|
|
|
+ elseif bmi_calc < 40:
|
|
!! severely obese
|
|
!! severely obese
|
|
tempbodykoef = 25
|
|
tempbodykoef = 25
|
|
- elseif tempbmi_calc < 45:
|
|
|
|
|
|
+ elseif bmi_calc < 45:
|
|
!! very severely obese
|
|
!! very severely obese
|
|
tempbodykoef = 5
|
|
tempbodykoef = 5
|
|
else
|
|
else
|
|
@@ -286,44 +282,34 @@ if $ARGS[0] = 'setbodykoef':
|
|
tempbodykoef = 0
|
|
tempbodykoef = 0
|
|
end
|
|
end
|
|
|
|
|
|
- if tempstrenbuf >= 80:
|
|
|
|
|
|
+ if strenbuf >= 80:
|
|
tempbodykoef += 8
|
|
tempbodykoef += 8
|
|
- elseif tempstrenbuf >= 60:
|
|
|
|
|
|
+ elseif strenbuf >= 60:
|
|
tempbodykoef += 10
|
|
tempbodykoef += 10
|
|
- elseif tempstrenbuf >= 40:
|
|
|
|
|
|
+ elseif strenbuf >= 40:
|
|
tempbodykoef += 8
|
|
tempbodykoef += 8
|
|
- elseif tempstrenbuf >= 20:
|
|
|
|
|
|
+ elseif strenbuf >= 20:
|
|
tempbodykoef += 5
|
|
tempbodykoef += 5
|
|
else
|
|
else
|
|
tempbodykoef += 2
|
|
tempbodykoef += 2
|
|
end
|
|
end
|
|
|
|
|
|
!!This modifies bodykoef for high or low salo values
|
|
!!This modifies bodykoef for high or low salo values
|
|
- if tempsalocatnow = 0 or tempsalocatnow >= 7:
|
|
|
|
|
|
+ if salocatnow = 0 or salocatnow >= 7:
|
|
tempbodykoef -= 8
|
|
tempbodykoef -= 8
|
|
- elseif tempsalocatnow = 1 or tempsalocatnow = 6:
|
|
|
|
|
|
+ elseif salocatnow = 1 or salocatnow = 6:
|
|
tempbodykoef -= 4
|
|
tempbodykoef -= 4
|
|
end
|
|
end
|
|
|
|
|
|
- if tempvofat > 0: tempbodykoef -= tempvofat
|
|
|
|
|
|
+ if vofat > 0: tempbodykoef -= vofat
|
|
|
|
|
|
result = tempbodykoef
|
|
result = tempbodykoef
|
|
|
|
|
|
- killvar 'tempbmi_calc'
|
|
|
|
killvar 'tempbodykoef'
|
|
killvar 'tempbodykoef'
|
|
- killvar 'tempbodyFat'
|
|
|
|
- killvar 'temppcs_hgt'
|
|
|
|
- killvar 'tempstrenbuf'
|
|
|
|
- killvar 'tempsalocatnow'
|
|
|
|
- killvar 'tempvofat'
|
|
|
|
end
|
|
end
|
|
|
|
|
|
if $ARGS[0] = 'bmicalc':
|
|
if $ARGS[0] = 'bmicalc':
|
|
- !! ARGS[1] salo
|
|
|
|
- !! ARGS[2] pcs_hgt
|
|
|
|
- tempbmi_calc = 10000 * (30 + ARGS[1] / 2 + (ARGS[2] - 170) * 7 / 10) / (ARGS[2] * ARGS[2])
|
|
|
|
- result = tempbmi_calc
|
|
|
|
- killvar 'tempbmi_calc'
|
|
|
|
|
|
+ result = 10000 * (30 + salo / 2 + (pcs_hgt - 170) * 7 / 10) / (pcs_hgt * pcs_hgt)
|
|
end
|
|
end
|
|
|
|
|
|
if $ARGS[0] = 'bmiadjust':
|
|
if $ARGS[0] = 'bmiadjust':
|
|
@@ -492,7 +478,7 @@ if $ARGS[0] = 'initial':
|
|
!!pcs_weight = (pcs_hgt * 62 / 170) + (vhips + (vofat * 2)) / 4 + tits
|
|
!!pcs_weight = (pcs_hgt * 62 / 170) + (vhips + (vofat * 2)) / 4 + tits
|
|
|
|
|
|
!!BMI Calculation
|
|
!!BMI Calculation
|
|
- bmi_calc = FUNC('body_shape', 'bmicalc', salo, pcs_hgt)
|
|
|
|
|
|
+ bmi_calc = FUNC('body_shape', 'bmicalc')
|
|
|
|
|
|
!!BMI Descriptions
|
|
!!BMI Descriptions
|
|
if bmi_calc < 16:
|
|
if bmi_calc < 16:
|
|
@@ -516,9 +502,9 @@ end
|
|
|
|
|
|
if $args[0] = 'basebeautycalc':
|
|
if $args[0] = 'basebeautycalc':
|
|
if pcs_lashes <= 0: pcs_lashes = 0
|
|
if pcs_lashes <= 0: pcs_lashes = 0
|
|
- pcs_HeadBonus = FUNC('body_shape', 'calcHeadBonus', pcs_lashes, pcs_eyesize, pcs_lip, pcs_teeth, bmi_calc)
|
|
|
|
- tempAttributeBonus = FUNC('body_shape', 'calcAttributeBonus', pcs_agil, pcs_vital, bmi_calc)
|
|
|
|
- pcs_apprncbase = FUNC('body_shape', 'basebeautycalc2', ARGS[1], vidage, pcs_skin, bodykoef, pcs_HeadBonus, tempAttributeBonus, pcs_apprncbase)
|
|
|
|
|
|
+ pcs_HeadBonus = FUNC('body_shape', 'calcHeadBonus')
|
|
|
|
+ tempAttributeBonus = FUNC('body_shape', 'calcAttributeBonus')
|
|
|
|
+ pcs_apprncbase = FUNC('body_shape', 'basebeautycalc2', ARGS[1])
|
|
|
|
|
|
if ARGS[1] = 0:
|
|
if ARGS[1] = 0:
|
|
!! This is the rate of change limiter
|
|
!! This is the rate of change limiter
|
|
@@ -547,105 +533,80 @@ if $args[0] = 'basebeautycalc':
|
|
end
|
|
end
|
|
|
|
|
|
if $ARGS[0] = 'calcHeadBonus':
|
|
if $ARGS[0] = 'calcHeadBonus':
|
|
- temppcs_lashes = ARGS[1] & !! pcs_lashes
|
|
|
|
- temppcs_eyesize = ARGS[2] & !! pcs_eyesize
|
|
|
|
- temppcs_lip = ARGS[3] & !! pcs_lip
|
|
|
|
- temppcs_teeth = ARGS[4] & !! pcs_teeth (missing teeth)
|
|
|
|
- tempbmi_calc = ARGS[5] & !! bmi_calc
|
|
|
|
|
|
|
|
!! Setting Eyelashes bonus
|
|
!! Setting Eyelashes bonus
|
|
- if temppcs_lashes <= 0:
|
|
|
|
|
|
+ if pcs_lashes <= 0:
|
|
resnicbonus = 0
|
|
resnicbonus = 0
|
|
- elseif temppcs_lashes = 1:
|
|
|
|
|
|
+ elseif pcs_lashes = 1:
|
|
resnicbonus = 2
|
|
resnicbonus = 2
|
|
- elseif temppcs_lashes = 2:
|
|
|
|
|
|
+ elseif pcs_lashes = 2:
|
|
resnicbonus = 5
|
|
resnicbonus = 5
|
|
- elseif temppcs_lashes = 3:
|
|
|
|
|
|
+ elseif pcs_lashes = 3:
|
|
resnicbonus = 7
|
|
resnicbonus = 7
|
|
- elseif temppcs_lashes = 4:
|
|
|
|
|
|
+ elseif pcs_lashes = 4:
|
|
resnicbonus = 8
|
|
resnicbonus = 8
|
|
- elseif temppcs_lashes = 5:
|
|
|
|
|
|
+ elseif pcs_lashes = 5:
|
|
resnicbonus = 10
|
|
resnicbonus = 10
|
|
else
|
|
else
|
|
resnicbonus = 0
|
|
resnicbonus = 0
|
|
end
|
|
end
|
|
- resnicbonus = FUNC('body_shape', 'bmiadjust', resnicbonus, tempbmi_calc)
|
|
|
|
|
|
+ resnicbonus = FUNC('body_shape', 'bmiadjust', resnicbonus, bmi_calc)
|
|
|
|
|
|
!! Setting Eye Size bonus
|
|
!! Setting Eye Size bonus
|
|
- if temppcs_eyesize = 1:
|
|
|
|
|
|
+ if pcs_eyesize = 1:
|
|
glarazbonus = 1
|
|
glarazbonus = 1
|
|
- elseif temppcs_eyesize = 2:
|
|
|
|
|
|
+ elseif pcs_eyesize = 2:
|
|
glarazbonus = 3
|
|
glarazbonus = 3
|
|
- elseif temppcs_eyesize = 3:
|
|
|
|
|
|
+ elseif pcs_eyesize = 3:
|
|
glarazbonus = 2
|
|
glarazbonus = 2
|
|
else
|
|
else
|
|
glarazbonus = 0
|
|
glarazbonus = 0
|
|
end
|
|
end
|
|
- glarazbonus = FUNC('body_shape', 'bmiadjust', glarazbonus, tempbmi_calc)
|
|
|
|
|
|
+ glarazbonus = FUNC('body_shape', 'bmiadjust', glarazbonus, bmi_calc)
|
|
|
|
|
|
!! Setting the Lip size bonus
|
|
!! Setting the Lip size bonus
|
|
- if temppcs_lip = 0:
|
|
|
|
|
|
+ if pcs_lip = 0:
|
|
lipbonus = -2
|
|
lipbonus = -2
|
|
- elseif temppcs_lip = 1:
|
|
|
|
|
|
+ elseif pcs_lip = 1:
|
|
lipbonus = 0
|
|
lipbonus = 0
|
|
- elseif temppcs_lip = 2:
|
|
|
|
|
|
+ elseif pcs_lip = 2:
|
|
lipbonus = 3
|
|
lipbonus = 3
|
|
- elseif temppcs_lip = 3:
|
|
|
|
|
|
+ elseif pcs_lip = 3:
|
|
lipbonus = 5
|
|
lipbonus = 5
|
|
else
|
|
else
|
|
lipbonus = 3
|
|
lipbonus = 3
|
|
end
|
|
end
|
|
- lipbonus = FUNC('body_shape', 'bmiadjust', lipbonus, tempbmi_calc)
|
|
|
|
|
|
+ lipbonus = FUNC('body_shape', 'bmiadjust', lipbonus, bmi_calc)
|
|
|
|
|
|
- teethcalc = (5 * temppcs_teeth)
|
|
|
|
- if teethcalc < 0: teethcalc = FUNC('body_shape', 'bmiadjust', teethcalc, tempbmi_calc)
|
|
|
|
-
|
|
|
|
- tempHeadBonus = resnicbonus + glarazbonus + lipbonus - teethcalc
|
|
|
|
|
|
+ teethcalc = (5 * pcs_teeth)
|
|
|
|
+ if teethcalc < 0: teethcalc = FUNC('body_shape', 'bmiadjust', teethcalc, bmi_calc)
|
|
|
|
|
|
- result = tempHeadBonus + 10
|
|
|
|
|
|
+ result = resnicbonus + glarazbonus + lipbonus - teethcalc + 10
|
|
|
|
|
|
- killvar 'temppcs_lashes'
|
|
|
|
- killvar 'temppcs_eyesize'
|
|
|
|
- killvar 'temppcs_lip'
|
|
|
|
- killvar 'temppcs_teeth'
|
|
|
|
- killvar 'tempHeadBonus'
|
|
|
|
- killvar 'tempbmi_calc'
|
|
|
|
end
|
|
end
|
|
|
|
|
|
if $ARGS[0] = 'calcAttributeBonus':
|
|
if $ARGS[0] = 'calcAttributeBonus':
|
|
- temppcs_agil = ARGS[1] & !! pcs_agil
|
|
|
|
- temppcs_vital = ARGS[2] & !! pcs_vital
|
|
|
|
- tempbmi_calc = ARGS[3] & !! bmi_calc
|
|
|
|
|
|
+ tempAttributeBonus = (pcs_agil / 10) + (pcs_vital / 10)
|
|
|
|
|
|
- tempAttributeBonus = (temppcs_agil / 10) + (temppcs_vital / 10)
|
|
|
|
- tempAttributeBonus = FUNC('body_shape', 'bmiadjust', tempAttributeBonus, tempbmi_calc)
|
|
|
|
-
|
|
|
|
- result = tempAttributeBonus
|
|
|
|
- killvar 'temppcs_agil'
|
|
|
|
- killvar 'temppcs_vital'
|
|
|
|
|
|
+ result = FUNC('body_shape', 'bmiadjust', tempAttributeBonus, bmi_calc)
|
|
killvar 'tempAttributeBonus'
|
|
killvar 'tempAttributeBonus'
|
|
- killvar 'tempbmi_calc'
|
|
|
|
end
|
|
end
|
|
|
|
|
|
!!This is the calculation for the base appearance if calling for testing always set ARGS[1] to 1
|
|
!!This is the calculation for the base appearance if calling for testing always set ARGS[1] to 1
|
|
if $args[0] = 'basebeautycalc2':
|
|
if $args[0] = 'basebeautycalc2':
|
|
!!ARGS[1] reset pcs_apprncbase
|
|
!!ARGS[1] reset pcs_apprncbase
|
|
- tempvidage = ARGS[2] & !! vidage
|
|
|
|
- temppcs_skin = ARGS[3] & !! pcs_skin
|
|
|
|
- tempbodykoef = ARGS[4] & !! bodykoef
|
|
|
|
- tempHeadBonus = ARGS[5] & !! result of calcHeadBonus
|
|
|
|
- tempAttributeBonus = ARGS[6] & !! result of calcAttributeBonus
|
|
|
|
- temppcs_apprncbase = ARGS[7] & !! pcs_apprncbase
|
|
|
|
|
|
+ !! result of pcs_HeadBonus
|
|
|
|
+ !! result of calcAttributeBonus
|
|
|
|
|
|
|
|
|
|
!! Setting vidagebonus
|
|
!! Setting vidagebonus
|
|
vidagebonus = 100
|
|
vidagebonus = 100
|
|
- if tempvidage < 20: vidagebonus = 60 + (2 * tempvidage)
|
|
|
|
- if tempvidage > 30: vidagebonus = 160 - (2 * tempvidage)
|
|
|
|
|
|
+ if vidage < 20: vidagebonus = 60 + (2 * vidage)
|
|
|
|
+ if vidage > 30: vidagebonus = 160 - (2 * vidage)
|
|
|
|
|
|
!! Preforming the calculation
|
|
!! Preforming the calculation
|
|
- skincalc = (temppcs_skin * 2 / 5)
|
|
|
|
- vneshtemp = vidagebonus * (skincalc + tempbodykoef + tempAttributeBonus + tempHeadBonus) / 100
|
|
|
|
|
|
+ skincalc = (pcs_skin * 2 / 5)
|
|
|
|
+ vneshtemp = vidagebonus * (skincalc + bodykoef + tempAttributeBonus + pcs_HeadBonus) / 100
|
|
|
|
|
|
!! pcs_skin = skin condition, corrected to a 0 to 40 range; bodykoef set in main body_shape; pcs_teeth is missing teeth or cosmetically improved teeth (-1)
|
|
!! pcs_skin = skin condition, corrected to a 0 to 40 range; bodykoef set in main body_shape; pcs_teeth is missing teeth or cosmetically improved teeth (-1)
|
|
|
|
|
|
@@ -656,17 +617,13 @@ if $args[0] = 'basebeautycalc2':
|
|
vneshtemp += supnatvnesh
|
|
vneshtemp += supnatvnesh
|
|
|
|
|
|
!! This is for use when a reset is called for by setting args[1] = 1
|
|
!! This is for use when a reset is called for by setting args[1] = 1
|
|
- if args[1] = 1: temppcs_apprncbase = vneshtemp & killvar 'vneshtemp'
|
|
|
|
|
|
+ if args[1] = 1: pcs_apprncbase = vneshtemp & killvar 'vneshtemp'
|
|
|
|
|
|
- result = temppcs_apprncbase
|
|
|
|
|
|
+ result = pcs_apprncbase
|
|
|
|
|
|
!! This is to clean up variables only used here
|
|
!! This is to clean up variables only used here
|
|
!!do not kill vneshtemp here it gets killed in basebeautycalc
|
|
!!do not kill vneshtemp here it gets killed in basebeautycalc
|
|
- killvar 'temppcs_apprncbase'
|
|
|
|
killvar 'skincalc'
|
|
killvar 'skincalc'
|
|
- killvar 'tempvidage'
|
|
|
|
- killvar 'temppcs_skin'
|
|
|
|
- killvar 'tempbodykoef'
|
|
|
|
killvar 'vidagebonus'
|
|
killvar 'vidagebonus'
|
|
killvar 'tempHeadBonus'
|
|
killvar 'tempHeadBonus'
|
|
killvar 'tempAttributeBonus'
|
|
killvar 'tempAttributeBonus'
|