123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370 |
- # 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
- clothingBonus = func('AppearanceSystem', 'CalcClothingBonus')
- accessoriesBonus = func('AppearanceSystem', 'CalcAccessoriesBonus', bonusZ, PShoQuality)
- groomingBonus = func('AppearanceSystem', 'CalcGroomingBonus')
- groomingPenalty = func('AppearanceSystem', 'CalcGroomingPenalty')
- pcs_apprnc = func('AppearanceSystem', 'CalcAppearance', (supnatvnesh + extra_supnatvnesh))
- Hotcat = func('AppearanceSystem', 'ConvertToHotcat')
- killvar 'clothingBonus'
- killvar 'accessoriesBonus'
- killvar 'groomingBonus'
- killvar 'groomingPenalty'
- end
- if $args[0] = 'UpdateBaseAppearance':
- !{
- 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), attributes (endurance and agility)
- }
- attributeBonus = func('AppearanceSystem', 'CalcAttributeBonus')
- skinBonus = pcs_skin / 10
- bodyShapeBonus = func('AppearanceSystem', 'SetBodyShapeBonus')
- visibleAgePenalty = func('AppearanceSystem', 'CalcVisibleAgePenalty')
- teethPenalty = func('AppearanceSystem', 'CalcTeethPenalty')
- ! Calculte base appearance
- pcs_apprncbase = skinBonus + bodyShapeBonus + attributeBonus - visibleAgePenalty - teethPenalty + supnatvnesh
- end
- if $ARGS[0] = 'CalcFaceBonus':
- !! Setting Eyelashes bonus
- if pcs_lashes <= 0:
- eyelashesBonus = 0
- elseif pcs_lashes = 1:
- eyelashesBonus = 1
- elseif pcs_lashes = 2:
- eyelashesBonus = 3
- elseif pcs_lashes = 3:
- eyelashesBonus = 4
- elseif pcs_lashes = 4:
- eyelashesBonus = 5
- elseif pcs_lashes = 5:
- eyelashesBonus = 6
- else
- eyelashesBonus = 0
- end
- eyelashesBonus = FUNC('AppearanceSystem', '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('AppearanceSystem', 'AdjustFromBMI', eyeSizeBonus)
- !! Setting the Lip size bonus
- if pcs_lip = 0:
- lipBonus = -2
- elseif pcs_lip = 1:
- lipBonus = 0
- elseif pcs_lip = 2:
- lipBonus = 1
- elseif pcs_lip = 3:
- lipBonus = 3
- else
- lipBonus = 3
- end
- lipBonus = FUNC('AppearanceSystem', 'AdjustFromBMI', lipBonus)
- result = eyelashesBonus + eyeSizeBonus + lipBonus
- end
- if $ARGS[0] = 'CalcAttributeBonus':
- tempAttributeBonus = (pcs_agil / 5) + (pcs_vital / 5)
- result = func('AppearanceSystem', 'AdjustFromBMI', tempAttributeBonus)
- killvar 'tempAttributeBonus'
- end
- if $ARGS[0] = 'CalcVisibleAgePenalty':
- if vidage < 20:
- tempAttributePenalty = func('shortgs','round_divide', (5*(20 - vidage)), 2)
- else
- tempAttributePenalty = 0
- end
- result = func('AppearanceSystem', 'AdjustFromBMI', tempAttributePenalty)
- killvar 'tempAttributePenalty'
- end
- if $ARGS[0] = 'CalcTeethPenalty':
- if pcs_teeth > 0:
- tempAttributePenalty = 10 * pcs_teeth
- elseif pcs_teeth = 0:
- tempAttributePenalty = 5
- else
- tempAttributePenalty = 0
- end
- if pcs_missing_teeth > 0:
- tempAttributePenalty += 10 * pcs_missing_teeth
- end
- result = func('AppearanceSystem', 'AdjustFromBMI', tempAttributePenalty)
- killvar 'tempAttributePenalty'
- 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
- tempBodyShapeBonus = func('body_structure', 'appearance_bonus')
- !!This modifies bodykoef for high or low pcs_mass['body'] values
- if salocatnow = 0 or salocatnow >= 7:
- tempBodyShapeBonus -= 8
- elseif salocatnow = 1 or salocatnow = 6:
- tempBodyShapeBonus -= 4
- end
- if bodyVars['vofat'] > 0: tempBodyShapeBonus -= bodyVars['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 PanQuality = 6:
- pantyBonus = 4
- elseif PanQuality = 5:
- pantyBonus = 3
- elseif PanQuality >= 3:
- pantyBonus = 2
- else
- pantyBonus = PanQuality - 1
- end
- if BraQuality = 6:
- braBonus = 4
- elseif BraQuality = 5:
- braBonus = 3
- elseif BraQuality >= 3:
- braBonus = 2
- else
- braBonus = BraQuality - 1
- end
- result = coatQualityBonus + shoesQualityBonus + pantyBonus + braBonus
- killvar 'coatQualityBonus'
- killvar 'shoesQualityBonus'
- killvar 'pantyBonus'
- killvar 'braBonus'
- end
- if $ARGS[0] = 'CalcGroomingBonus':
- makeupBonus = pcs_makupskl/5 - 5
- if pcs_makeup = 0: makeupBonus = -5
- if pcs_makeup = 1: makeupBonus = 0
- if pcs_makeup = 5: makeupBonus = 30
- breathBonus = pcs_breath * 5
- tempGroomingBonus = makeupBonus + breathBonus
- !result = tempGroomingBonus
- result = func('AppearanceSystem', 'AdjustFromBMI', tempGroomingBonus)
- end
- if $ARGS[0] = 'CalcGroomingPenalty':
- if pcs_lipbalm > 0:
- lipBalmPenalty = 0
- else
- lipBalmPenalty = 5
- end
- hairPenalty = (1 - pcs_hairbsh) * 10
- !! buzzcut penalty to pcs_apprnc
- if pcs_hairlng < 10:
- buzzCutPenalty = 10
- else
- buzzCutPenalty = 0
- end
- !!Small penalty for not wearing deodorant, if pcs_sweat is low enough
- if deodorant_on = 0 or pcs_sweat >= 20: deodorantPenalty = 5
- 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 + lipBalmPenalty + hairPenalty + deodorantPenalty
- killvar 'buzzCutPenalty'
- killvar 'deodorantPenalty'
- killvar 'glassesPenalty'
- killvar 'hairDyePenalty'
- killvar 'hairPenalty'
- killvar 'legPenalty'
- killvar 'lipBalmPenalty'
- killvar 'sweatPenalty'
- 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
- end
- if $ARGS[0] = 'ConvertToHotcat':
- if pcs_apprnc <= 40:
- result = 1
- elseif pcs_apprnc <= 60:
- result = 2
- elseif pcs_apprnc <= 80:
- result = 3
- elseif pcs_apprnc <= 100:
- result = 4
- elseif pcs_apprnc <= 125:
- result = 5
- elseif pcs_apprnc <= 150:
- result = 6
- elseif pcs_apprnc <= 165:
- result = 7
- elseif pcs_apprnc <= 180:
- result = 8
- elseif pcs_apprnc <= 199:
- result = 9
- 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 ---------------------------------
|