123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378 |
- # AppearanceSystem
- $this = 'AppearanceSystem'
- if $ARGS[0] = '':
- !{
- PC's appearance is updated regularly in stat.qsrc.
- Note: A huge part of PC's appearance is from base appearance, which is updated once a day. Because it's
- a global variable, it does not show in this function in particular, but it's used in 'CalcAppearance'
- }
- if pcs_makeup = 6 and bimbolevel >= 2: extra_supnatvnesh = 2*bimbolevel - 2
- !STD check. STD will make appearance automatically -10
- if Gerpes >= 3 or Sifilis >= 21 or Triper > 2:
- pcs_apprnc = -10
- else:
- clothingBonus = func($this, 'CalcClothingBonus')
- accessoriesBonus = func($this, 'CalcAccessoriesBonus', bonusZ, PShoQuality)
- groomingBonus = func($this, 'CalcGroomingBonus')
- groomingPenalty = func($this, 'CalcGroomingPenalty')
- pcs_apprnc = func($this, 'CalcAppearance', (supnatvnesh + extra_supnatvnesh))
- Hotcat = func($this, 'ConvertToHotcat')
- end
- killvar 'clothingBonus'
- killvar 'accessoriesBonus'
- killvar 'groomingBonus'
- killvar 'groomingPenalty'
- end
- if $args[0] = 'UpdateBaseAppearnce':
- !{
- Base Appearance is updated once a day at midnight and called from cikl
- Base Appearance is calculated from:
- vidage, skin, body shape (fat and strength), face (lip size, eyes size, and eyelashes)
- attributes (endurance and agility)
- }
- faceBonus = func($this, 'CalcFaceBonus')
- attributeBonus = func($this, 'CalcAttributeBonus')
- !! Setting vidageBonus
- if vidage < 20:
- vidageBonus = 60 + (2 * vidage)
- elseif vidage > 30:
- vidageBonus = 160 - (2 * vidage)
- else
- vinageBonus = 100
- end
- skinBonus = (pcs_skin * 2 / 5)
- bodyShapeBonus = func($this, 'SetBodyShapeBonus')
- ! Calculte base appearance
- pcs_apprncbase = (vidageBonus * (skinBonus + bodyShapeBonus + faceBonus + attributeBonus) / 100) + supnatvnesh
- killvar 'vidageBonus'
- killvar 'skinBonus'
- killvar 'bodyShapeBonus'
- killvar 'faceBonus'
- killvar 'attributeBonus'
- end
- if $ARGS[0] = 'CalcFaceBonus':
- !! Setting Eyelashes bonus
- if pcs_lashes <= 0:
- eyelashesBonus = 0
- elseif pcs_lashes = 1:
- eyelashesBonus = 2
- elseif pcs_lashes = 2:
- eyelashesBonus = 5
- elseif pcs_lashes = 3:
- eyelashesBonus = 7
- elseif pcs_lashes = 4:
- eyelashesBonus = 8
- elseif pcs_lashes = 5:
- eyelashesBonus = 10
- else
- eyelashesBonus = 0
- end
- eyelashesBonus = FUNC($this, 'AdjustFromBMI', eyelashesBonus)
- !! Setting Eye Size bonus
- if pcs_eyesize = 1:
- eyeSizeBonus = 1
- elseif pcs_eyesize = 2:
- eyeSizeBonus = 3
- elseif pcs_eyesize = 3:
- eyeSizeBonus = 2
- else
- eyeSizeBonus = 0
- end
- eyeSizeBonus = FUNC($this, 'AdjustFromBMI', eyeSizeBonus)
- !! Setting the Lip size bonus
- if pcs_lip = 0:
- lipBonus = -2
- elseif pcs_lip = 1:
- lipBonus = 0
- elseif pcs_lip = 2:
- lipBonus = 3
- elseif pcs_lip = 3:
- lipBonus = 5
- else
- lipBonus = 3
- end
- lipBonus = FUNC($this, 'AdjustFromBMI', lipBonus)
- result = eyelashesBonus + eyeSizeBonus + lipBonus
- killvar 'eyelashesBonus'
- killvar 'eyeSizeBonus'
- killvar 'lipBonus'
- end
- if $ARGS[0] = 'CalcAttributeBonus':
- tempAttributeBonus = (pcs_agil / 10) + (pcs_vital / 10)
- result = func($this, 'AdjustFromBMI', tempAttributeBonus)
- killvar 'tempAttributeBonus'
- end
- if $ARGS[0] = 'SetBodyShapeBonus':
- ! Magic uses a different calculation
- if dounspell = 1:
- bodytipe = pcs_hips - pcs_waist
- if bodytipe < 20:
- result = 0
- elseif bodytipe >= 20 and bodytipe < 25:
- result = 2
- elseif (bodytipe >= 25 and bodytipe < 30) or bodytipe >=35:
- result = 4
- elseif bodytipe >= 30 and bodytipe < 35:
- result = 8
- end
- !!Setting the pcs_apprnc bonus based on fat and strength
- else
- if pcs_bmi < 16:
- !! severely underweight
- tempBodyShapeBonus = 30
- elseif pcs_bmi < 19:
- !! underweight
- tempBodyShapeBonus = 65
- elseif pcs_bmi < 25:
- !! healthy weight
- tempBodyShapeBonus = 85
- elseif pcs_bmi < 30:
- !! overweight
- tempBodyShapeBonus = 75
- elseif pcs_bmi < 35:
- !! moderately obese
- tempBodyShapeBonus = 45
- elseif pcs_bmi < 40:
- !! severely obese
- tempBodyShapeBonus = 25
- elseif pcs_bmi < 45:
- !! very severely obese
- tempBodyShapeBonus = 5
- else
- !! morbidly obese
- tempBodyShapeBonus = 0
- end
- if (strenbuf >= 40 and strenbuf < 60) or strenbuf >= 80:
- tempBodyShapeBonus += 8
- elseif strenbuf >= 60:
- tempBodyShapeBonus += 10
- elseif strenbuf >= 20:
- tempBodyShapeBonus += 5
- end
- !!This modifies bodykoef for high or low salo values
- if salocatnow = 0 or salocatnow >= 7:
- tempBodyShapeBonus -= 8
- elseif salocatnow = 1 or salocatnow = 6:
- tempBodyShapeBonus -= 4
- end
- if vofat > 0: tempBodyShapeBonus -= vofat
- result = tempBodyShapeBonus
- killvar 'tempBodyShapeBonus'
- end
- end
- if $ARGS[0] = 'CalcClothingBonus':
- if $clothingworntype = 'nude':
- if pcs_bmi >= 19 and pcs_bmi < 30:
- ! Healthy and overweight
- tempRevealing = 405
- PCloQuality = 3
- else
- tempRevealing = 0
- PCloQuality = 1
- end
- else
- if pcs_bmi < 19:
- !Skinny and severely skinny
- tempRevealing = ((400 - PXCloThinness) + (500 - PXCloTopCut) + (400 - PXCloBottomShortness))/2
- elseif pcs_bmi >= 19 and pcs_bmi < 30:
- !Healthy and overweight
- tempRevealing = (PXCloThinness + PXCloTopCut + PXCloBottomShortness)/2
- elseif pcs_bmi >= 30:
- !Moderately overweight and above
- tempRevealing = ((400 - PXCloThinness) + (500 - PXCloTopCut) + (400 - PXCloBottomShortness)) * 3/4
- end
- end
- result = tempRevealing/ 76 * PCloQuality
- killvar 'tempRevealing'
- end
- if $ARGS[0] = 'CalcAccessoriesBonus':
- coatQualityBonus = ARGS[1] & !! bonusZ
- shoesQualityBonus = ARGS[2] & !! PShoQuality
-
- !!bonuses for certain underwear
- if $pantyworntype = 'boutique':
- pantyBonus = 4
- elseif $pantyworntype = 'fashionista':
- pantyBonus = 2
- end
- if $braworntype = 'boutique':
- braBonus = 4
- elseif $braworntype = 'fashionista':
- braBonus = 2
- end
- result = coatQualityBonus + shoesQualityBonus + pantyBonus + braBonus
- killvar 'coatQualityBonus'
- killvar 'shoesQualityBonus'
- killvar 'pantyBonus'
- killvar 'braBonus'
- end
- if $ARGS[0] = 'CalcGroomingBonus':
- if pcs_lipbalm > 0:
- lipBalmBonus = 5
- else
- lipBalmBonus = 0
- end
- makeupBonus = pcs_makupskl / 5
- if pcs_makeup = 0: makeupBonus = -5
- if pcs_makeup = 1: makeupBonus = 0
- if pcs_makeup = 5: makeupBonus = 30
- hairBonus = pcs_hairbsh * 10
- breathBonus = pcs_breath * 5
- tempGroomingBonus = makeupBonus + hairBonus + lipBalmBonus + breathBonus
- !!Small bonus for wearing deodorant, if pcs_sweat is low enough
- if deodorant_on = 1 and pcs_sweat < 20: tempGroomingBonus += 5
- !result = tempGroomingBonus
- result = func($this, 'AdjustFromBMI', tempGroomingBonus)
- killvar 'lipBalmBonus'
- killvar 'makeupBonus'
- killvar 'hairBonus'
- killvar 'breathBonus'
- killvar 'tempGroomingBonus'
- end
- if $ARGS[0] = 'CalcGroomingPenalty':
- !! buzzcut penalty to pcs_apprnc
- if pcs_hairlng < 10:
- buzzCutPenalty = 10
- else
- buzzCutPenalty = 0
- end
- if pcs_sweat < 22:
- sweatPenalty = 0
- elseif temppcs_sweat < 38:
- sweatPenalty = (pcs_sweat - 10) / 4
- elseif temppcs_sweat < 54:
- sweatPenalty = (pcs_sweat - 10) / 2
- else
- sweatPenalty = 3 * (pcs_sweat - 10) / 4
- end
- !Glasses Penalty
- if glass >= 2 or glass = 0:
- glassesPenalty = 0
- elseif glass = 1:
- glassesPenalty = 10
- end
- !hair color fade penalty
- if pcs_haircol ! nathcol:
- if dyefade > 0 and dyefade < 7: hairDyePenalty = 5
- if dyefade = 0: hairDyePenalty = 15
- end
- ! Leg hair penalty
- if pcs_leghair <= 0:
- legPenalty = 0
- elseif pcs_leghair <= 3:
- legPenalty = 3
- elseif pcs_leghair <= 6:
- legPenalty = 6
- else
- legPenalty = 9
- end
- result = sweatPenalty + glassesPenalty + hairDyePenalty + buzzCutPenalty + legPenalty
- killvar 'sweatPenalty'
- killvar 'glassesPenalty'
- killvar 'hairDyePenalty'
- killvar 'buzzCutPenalty'
- killvar 'legPenalty'
- end
- if $ARGS[0] = 'CalcAppearance':
- superNaturalBonus = ARGS[1] & !! supnatvnesh
- temp_apprnc = pcs_apprncbase + clothingBonus + accessoriesBonus + groomingBonus - groomingPenalty
- if temp_apprnc >= 200: temp_apprnc = 200
- if temp_apprnc < 0: temp_apprnc = 0
- !Any super natural bonuses are allowed to go above the max scale
- result = temp_apprnc + superNaturalBonus
-
- killvar 'superNaturalBonus'
- killvar 'temp_apprnc'
- end
- if $ARGS[0] = 'ConvertToHotcat':
- if pcs_apprnc <= 200:
- result = pcs_apprnc / 20
- else
- result = 10
- end
- end
- if $ARGS[0] = 'AdjustFromBMI':
- tempValue = ARGS[1] & !!value to be adjusted
- if pcs_bmi < 16:
- !! severely underweight
- tempValue = tempValue * 50 / 100
- elseif pcs_bmi < 19:
- !! underweight
- tempValue = tempValue * 95 / 100
- elseif pcs_bmi < 25:
- !! healthy weight
- !! normal bonus
- elseif pcs_bmi < 30:
- !! overweight
- tempValue = tempValue * 95 / 100
- elseif pcs_bmi < 35:
- !! moderately obese
- tempValue = tempValue * 80 / 100
- elseif pcs_bmi < 40:
- !! severely obese
- tempValue = tempValue * 55 / 100
- elseif pcs_bmi < 45:
- !! very severely obese
- tempValue = tempValue * 50 / 100
- else
- !!morbidly obese
- tempValue = tempValue * 40 / 100
- end
- result = tempValue
- killvar 'tempValue'
- end
- --- AppearanceSystem ---------------------------------
|