123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994 |
- # body
- !!bodyVars['wratio'] = waist to hips ratio set in body_shape
- !!bodyVars['bratio'] = band to waist ratio set in body_shape
- !!bodyVars['hratio'] = hip to height ratio set in body_shape
- !!bodyVars['vofat'] = used as a place to put extra pcs_mass['body'] at extreme high values (i.e. really, really fat) set in body_shape
- !!
- !!pcs_mass['butt'] = starts at a set genetic butt size, but can be adjusted down if pcs_mass['body'] drops too low
- !!pcs_mass['butt_gen'] = the set genetic bust size
- !!bodyVars['vhips'] = derived from pcs_mass['body'] and pcs_mass['butt'] in body_shape
- !!vhtmp = slows the change to vhips in body_shape
- !!
- !!pcs_mass['bust'] = starts at a set genetic bust size, but can be adjusted down if pcs_mass['body'] drops too low
- !!pcs_mass['bust_gen'] = the set genetic bust size
- !!bodyVars['bust_magic'] = set in body_shape for the fat moved to bust
- !!bodyVars['bust_other'] = other additions to bust-size, including breast creams
- !!
- !!salocatnow = the current category of pcs_mass['body']
- !!salocatlast = the previous category of pcs_mass['body']
- !!magf2bdo = flag for magic bust increase; 0, ready; 1, do it; 2, ask; 3, no
- !!mgf2bnocnt = used to count the number of times a bust increase was turned down and stop asking after 3
- !!magtarcup = set in the dream code as the target cup size
- !!bodyVars['weight_warning'] = used to flag if to display the gaining/losing weight message when bathing
- !!salolast = used when doing a soft rest to control the cycling of the main code
- !!bodyresetflag = used to prevent a code chunk from firing on a soft or hard reset
- !!Image set variables
- !! bodset = body image and descriptor control variable, used to indicate which image and descriptor set is in use
- !! $bodimgsets[x] = body shape descriptors, tens place is the set (using bodset), 0 - 7 the descriptors (using salocatnow), 8 filler, 9 is the folder name
- !! bdsetlock = flag to indicate set control override, 0 is use the formula to pick a set, 1 is use a fixed set
- !! fixbodset = the identification number of the fixed image set
- !! bodsetcnt = the number of sets present
- !! 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
- if $ARGS[0] = 'RegularUpdate':
- if dounspell = 0:
- gs 'body', 'UpdateBodyMeasurement'
- temp_weight = func('body', 'CalcWeight2')
- pcs_weight[0] = temp_weight / 10
- pcs_weight[1] = temp_weight mod 10
- temp_bmi = func('body', 'CalcBMI2')
- pcs_bmi[0] = temp_bmi / 10
- pcs_bmi[1] = temp_bmi mod 10
- killvar 'temp_weight'
- killvar 'temp_bmi'
- end
- if pcs_skin > 1000:
- pcs_skin = 1000
- elseif pcs_skin < 0:
- pcs_skin = 0
- end
- end
- if $ARGS[0] = 'UpdateBodyMeasurement':
- pcs_hips = (pcs_hgt * bodyVars['hratio']) / 100 + bodyVars['vhips']
- pcs_waist = (pcs_hips * bodyVars['wratio']) / 100 + bodyVars['vofat']
- pcs_band = (pcs_waist * bodyVars['bratio']) / 100 + bodyVars['vofat']
- pcs_bust = (pcs_waist * bodyVars['bratio']) / 100 + pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone'] + max(-10, min(bodyVars['bust_other'], 10))
- pcs_butt = (pcs_hips * 10 ) / 100 + bodyVars['butt_bonus'] + bodyVars['butt_silicone'] + bodyVars['butt_cheat'] + pcs_butt_tr + max(-5, min(bodyVars['butt_other'], 5))
- !! pcs_cupsize = pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone'] - bodyVars['vofat']
- pcs_cupsize = pcs_bust - pcs_band
- end
- if $ARGS[0] = 'CalcWeight':
- !{pcs_weight: Svetas weight in kg
- Optimal Weight (170cm): 60kg, 60 pcs_mass['body']
- 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
- !{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 + (bodyVars['vofat'] * 2)) / 4 + tits
- 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 = (pcs_hgt * 62 / 17) + (10 * (vhips + (bodyVars['vofat'] * 2))) / 4 + 10 * tits
- end
- if $ARGS[0] = 'CalcBMI':
- !! BMI = weight [kg] / (height [m])^2 = 100^2 * weight [kg] / (height [cm])^2
- result = (1000 * (10 * pcs_weight[0] + pcs_weight[1])) / (pcs_hgt * pcs_hgt)
- end
- if $ARGS[0] = 'CalcBMI2':
- !! BMI2 = 10 * BMI
- result = (10000 * (10 * pcs_weight[0] + pcs_weight[1])) / (pcs_hgt * pcs_hgt)
- end
- !!===================================================!!
- !! !!
- !! Daily Update !!
- !! !!
- !!===================================================!!
- if $ARGS[0] = 'DailyUpdate':
- !!Update once a day and called from cikl
- if dounspell ! 1:
- gs 'body', 'Update_Body'
- else
- if strenbuf > 90:
- strenbuf -= 2
- elseif strenbuf > 80:
- strenbuf -= 1
- end
- if vitalbuf > 90:
- vitalbuf -= 2
- elseif vitalbuf > 80:
- vitalbuf -= 1
- end
- gs 'body', 'Update_StatBuffs'
- end
- gs 'body', 'RegularUpdate'
- gs 'body', 'Update_daily_body_other'
- gs 'body', 'Update_Eyelashes'
- gs 'body', 'Update_Hair'
- gs 'body', 'Update_Pubes_and_leghair'
- if mc_inventory['scrunchies'] > 0 and rand(1, 100) <= 8:
- mc_inventory['scrunchies'] -= 1
- end
- if pcs_skin <= 300:
- pcs_skin += min(skinDailyGain * 2, 20) - skinDailyPenalty - 1
- elseif pcs_skin <= 600:
- pcs_skin += min(skinDailyGain, 10) - skinDailyPenalty - 1
- elseif pcs_skin <= 800:
- pcs_skin += min(skinDailyGain / 2, 5) - skinDailyPenalty - 1
- elseif pcs_skin <= 900:
- pcs_skin += min(skinDailyGain / 3, 3) - skinDailyPenalty - 1
- elseif pcs_skin <= 1000:
- pcs_skin += min(skinDailyGain / 5, 2) - skinDailyPenalty - 1
- end
- gs 'body', 'Update_Teeth'
- gs 'AppearanceSystem', 'UpdateBaseAppearance'
- gs 'body', 'Update_Appearance'
- !skin variable reset
- killvar 'moisturizerDailyCount'
- killvar 'skinDailyGain'
- killvar 'skinDailyPenalty'
-
- end
- if $ARGS[0] = 'Update_Appearance':
- gs 'body', 'UpdateBodyImage'
- gs 'AppearanceSystem'
- gs 'body_desc'
- end
- !!------------------------- UPDATE images -------------------------!!
- if $ARGS[0] = 'UpdateBodyImage':
- !Update body image set
- if dounspell = 1:
- salocatnow = (pcs_hips / 10) - 5
- end
- $bodyVars['desc'] = func('body_structure', 'body_desc')
- $bodyVars['img'] = func('body_structure', 'body_img')
- $bodyVars['bmi_desc'] = func('body_structure', 'bmi_desc')
- end
- !!------------------------- UPDATE eyelashes, hair, pubes, teeth -------------------------!!
- if $ARGS[0] = 'Update_Eyelashes':
- !!---- Calculation of lash extension degradation and false lash removal
- if pcs_lashes > 2:
- if lashextensionstyle >= 1:
- lashextensionduration -= 1
- if lashextensionduration >= 1 and lashextensionduration <= 4:
- 'It''s time for you to do your maintenance on your lash extensions; you should go to the salon or you risk growing them all out.'
- end
- if lashextensionduration <= 0:
- 'You waited too long to do maintenance on your lash extensions; there''s too little there to notice or work with at this point.'
- pcs_lashes = pcs_naturallashes
- killvar 'lashextensionstyle'
- killvar 'lashextensionduration'
- killvar 'lashextensionnew'
- end
- end
- if false_lashes > 0:
- false_lashes -= 1
- if false_lashes = 0:
- 'Your false lashes came off in the night; there''s no recovering them now.'
- pcs_lashes = pcs_naturallashes
- else
- 'Somehow, your lashes managed to stay attached throughout the night. You might be able to get away with wearing them another day straight.'
- end
- end
- end
- end
- if $ARGS[0] = 'Update_Hair':
- !! Max. Hair length 600mm, or 60cm, which should be somewhere in the lower back area.
- !! Hair grows 1mm each day, it takes 20 months (1 month = 30 days) to regrow the hair from 0.
- if pcs_hairlng <= 1000 and hairgrowcht = 0: pcs_hairlng += 1
- ! Hair colour change
- if pcs_haircol ! nathcol and dyefade > 0:
- dyefade -= 1
- end
-
- !! daily reduction of braids
- if hbraids > 0: hbraids -= 1
- !! loss of updo if hair too long
- if pcs_hairlng > 400 and hpingripw = 1:
- hpingripw = 0
- end
- !! loss of pigtails if hair too long
- if pcs_hairlng > 800 and hscrunchw = 2 = 1:
- hpigtail = 0
- hscrunchw = 0
- end
- end
- if $ARGS[0] = 'Update_Pubes_and_leghair':
- !!pubic hair colouring
- !! pcs_pubecol[0] = natural colour
- !! pcs_pubecol[1] = flag for saveupdate
- !! pcs_pubecol[2] = actual colour
- !! pcs_pubecol[3] = countdown timer for dye
- if pcs_pubecol[2] ! pcs_pubecol[0]:
- if pcs_pubecol[3] > 0: pcs_pubecol[3] -= 1
- if pcs_pubecol[3] = 0: pcs_pubecol[2] = pcs_pubecol[0]
- end
- if pcs_pubes < 2: pcs_pubecol[2] = pcs_pubecol[0]
- !! 33% change to shrink leghair if underage? Simulate slower growth?
- if age < 18 and rand(0, 2) = 0 and pcs_leghair > 0:
- pcs_leghair -= 1
- end
- ! Leg and pubes hair growth
- ! disabled for testing hourly growth instead
- !!{if lashair ! 1:
- pcs_leghair += 1
- !!Pubic hair growth at 1/2 per night
- if pcs_pubes['growth'] > 1:
- pcs_pubes['growth'] = 0
- pcs_pubes += 1
- end
- pcs_pubes['growth'] += 1
- gs 'body_desc', 'pube_desc_update'
- end}
- end
- if $ARGS[0] = 'Update_Teeth':
- if pcs_teeth < 0:
- !! Daly degradation of perfect white teeth
- tempteeth = 1
- if teeth['caffe_or_tea'] > 8: tempteeth += 1
- if teeth['smoked'] > 1: tempteeth += 1
- tempteeth -= min(teeth['brushed'], 3)
- teeth['degradation'] += max(0, tempteeth)
- killvar 'tempteeth'
- teeth['caffe_or_tea'] = 0
- teeth['smoked'] = 0
- teeth['brushed'] = 0
- if teeth['degradation'] > 60:
- !! After a certain time of not taking care of your teeth you will loose you perfect white smile.
- teeth['degradation'] = 0
- pcs_teeth = 0
- elseif teeth['degradation'] < 0:
- teeth['degradation'] = 0
- end
- end
- end
- !!===================================!!
- !! !!
- !! Update Body !!
- !! !!
- !!===================================!!
- if $ARGS[0] = 'Update_Body':
- gs 'body', 'Update_StatBuffs'
- !!pcs_mass['body'] Handling; the first part is because during a reset fat is not used and should be cleared
- if bodyresetflag = 1 or cheatNoFat = 1:
- fat = 0
- else
- if fat > (17 + vitalbuf / 25):
- pcs_mass['body'] += 1
- fat = 0
- elseif fat < -(2 + vitalbuf / 10):
- pcs_mass['body'] -= 1
- fat = 0
- else
- fat = fat / 4
- end
- end
- !!This is the pcs_mass['body'] cap for the weight approximation
- if pcs_mass['body'] > 200: pcs_mass['body'] = 200
- !! All the ratios were rounded to 2 digits and there are divide 100s at the final calc points
- gs 'body', 'Find_waist_to_hip_ratio'
- gs 'body', 'Find_band_to_waist_ratio'
- gs 'body', 'Find_hip_to_height_ratio'
- salocatnow = func('body', 'Calc_salocat')
- gs 'body', 'Redistribute_Mass'
- !!This is if a Succubus has pcs_mass['body'] < 1
- if succubusflag = 1 and pcs_mass['body'] < 1:
- sucexcess -= 1
- pcs_mass['body'] += 3
- end
- !!This is if pcs_mass['body'] is still < 1
- if pcs_mass['body'] < 1:
- if fat >= 1:
- pcs_mass['body'] = 1
- fat -= 1
- elseif fat <= 0 and pcs_stren + pcs_vital > 0:
- stren_deg -= 1000
- vital_deg -= 1000
- pcs_mass['body'] = 1
- else
- if Enable_nogameover = 0:
- over = 3
- gt 'gameover'
- exit
- else
- pl '<font color=red><B>You starved to death, but Cheat Mode keeps you Alive.</B></font>'
- pcs_mass['body'] = 1
- end
- end
- end
- gs 'body', 'Update_vhips'
- salocatnow = func('body', 'Calc_salocat')
- !!This will trigger the warning notices in the bathing code (the +/- 12 should always be +/- 11 + the max change to pcs_mass['body'] w/ fat)
- ! if salolast > pcs_mass['body'] and pcs_mass['body'] <= (20 * (salocatnow - 1)) + 12:
- ! bodyVars['weight_warning'] = 1
- ! elseif salolast < pcs_mass['body'] and pcs_mass['body'] >= (20 * (salocatnow + 1)) - 12:
- ! bodyVars['weight_warning'] = 2
- ! end
- if pcs_mass['body'] < pcs_mass['body_message'] - 5:
- bodyVars['weight_warning'] = 1
- pcs_mass['body_message'] = pcs_mass['body']
- elseif pcs_mass['body'] > pcs_mass['body_message'] + 5:
- bodyVars['weight_warning'] = 2
- pcs_mass['body_message'] = pcs_mass['body']
- end
- !!This will trigger the dream for the option to use magic to increase bust
- !!Three nos at the dream will lock it out (1 yes resets the count)
- if pcs_magik >= 5 and MagikDostup = 0 and magf2bdo = 0:
- if tits < 10 and salolast < pcs_mass['body'] and pcs_mass['body'] >= (20 * (salocatnow + 1)) - 11:
- if mgf2bnocnt < 3:
- magf2bdo = 2
- else
- magf2bdo = 3 & killvar 'mgf2bnocnt'
- end
- end
- end
- !!This is to deal with the possibility that salocatnow changed by more than 1 (fat burners, vitamins, plastic surgery, etc.)
- if salocatnow < salocatlast: salocatlast -= 1
- if salocatnow > salocatlast: salocatlast += 1
- !!This is for use in the warning code and as part of the reset routines
- if salolast > pcs_mass['body']: salolast -= 1
- if salolast < pcs_mass['body']: salolast += 1
- !!Setting the pcs_apprnc bonus based on fat and strength
- temp_bmi = func('body', 'CalcBMI2')
- pcs_bmi[0] = temp_bmi / 10
- pcs_bmi[1] = temp_bmi mod 10
- killvar 'temp_bmi'
- !!This is to clean up unused variables
- killvar 'normbuffpick'
- killvar 'nrmbfpckct'
- killvar 'vmeat'
- killvar 'vfat'
- killvar 'Kves'
- killvar 'krost'
- killvar 'koefvesbt'
- killvar 'koefbt'
- end
- !!------------------------- BUFFS -------------------------!!
- if $ARGS[0] = 'Update_StatBuffs':
- !! This controls the gradual change in stat to -buf
- if strenbuf > pcs_stren:
- strenbuf -= 1
- elseif strenbuf < pcs_stren:
- strenbuf += 1
- end
- if vitalbuf > pcs_vital:
- vitalbuf -= 1
- elseif vitalbuf < pcs_vital:
- vitalbuf += 1
- end
- if agilbuf > pcs_agil:
- agilbuf -= 1
- elseif agilbuf < pcs_agil:
- agilbuf += 1
- end
- end
- if $ARGS[0] = 'Update_daily_body_other':
- if bodyVars['bust_other'] ! 0:
- if daystart mod 10 = 0:
- if bodyVars['bust_other'] > 0:
- bodyVars['bust_other'] -= 1
- else
- bodyVars['bust_other'] += 1
- end
- end
- end
- if bodyVars['butt_other'] ! 0:
- if daystart mod 15 = 0:
- if bodyVars['butt_other'] > 0:
- bodyVars['butt_other'] -= 1
- else
- bodyVars['butt_other'] += 1
- end
- end
- end
- if bcream_used >= 1:
- bcream_used = 0
- temp = pcs_mass['bust'] - pcs_mass['bust_gen']
- temp = rand(0, 5 + max(0, temp)) / max(1, temp)
- if temp > 0:
- bodyVars['bust_other'] += 1
- 'Feels like your breasts have grown slightly.'
- end
- killvar 'temp'
- end
-
- if steroid_dose >= 1:
- if lashair < 1:
- pcs_pubes += steroid_dose
- pcs_leghair += steroid_dose
- end
- steroid_dose = 0
- end
- end
- !!------------------------- RATIOS -------------------------!!
- !! All the ratios were rounded to 2 digits and there are divide 100s at the final calc points
- ! Lies between 65 and 96
- if $ARGS[0] = 'Find_waist_to_hip_ratio':
- temp_wratio = (2 * vitalbuf + strenbuf + agilbuf) / 4
- !! Primary bodyVars['wratio'] handling
- if temp_wratio < 11:
- bodyVars['wratio'] = 85 + (11 - (vitalbuf + strenbuf + agilbuf) / 3)
- elseif temp_wratio < 20:
- bodyVars['wratio'] = 85
- elseif temp_wratio < 35:
- bodyVars['wratio'] = 85 - (temp_wratio - 20) / 3
- elseif temp_wratio < 55:
- bodyVars['wratio'] = 80 - (temp_wratio - 35) / 4
- elseif temp_wratio < 80:
- bodyVars['wratio'] = 75 - (temp_wratio - 55) / 5
- elseif temp_wratio >= 80:
- bodyVars['wratio'] = 70
- end
- !! High stat value edge case handling
- if (vitalbuf + strenbuf + agilbuf) / 3 > 100:
- bodyVars['wratio'] += (2 * agilbuf - vitalbuf - strenbuf) / 10
- end
- !! This is the oops and high stat gone overboard handling
- if bodyVars['wratio'] < 65: bodyVars['wratio'] = 65
- killvar 'temp_wratio'
- ! Lies between 105 and 125
- elseif $ARGS[0] = 'Find_band_to_waist_ratio':
- temp_bratio = (2 * strenbuf + vitalbuf + agilbuf) / 4
- if temp_bratio < 10:
- bodyVars['bratio'] = 105
- elseif temp_bratio <= 23:
- bodyVars['bratio'] = 106
- elseif temp_bratio <= 80:
- bodyVars['bratio'] = 106 + (temp_bratio - 23) / 3
- else
- bratio = 125
- end
- killvar 'temp_bratio'
- ! Lies between 56 and 60
- elseif $ARGS[0] = 'Find_hip_to_height_ratio':
- temp_hratio = (2 * agilbuf + vitalbuf + strenbuf) / 4
- if temp_hratio < 35:
- bodyVars['hratio'] = 60
- elseif temp_hratio < 45:
- bodyVars['hratio'] = 59
- elseif temp_hratio < 60:
- bodyVars['hratio'] = 58
- elseif temp_hratio < 80:
- bodyVars['hratio'] = 57
- else
- bodyVars['hratio'] = 56
- end
- killvar 'temp_hratio'
- end
- if $ARGS[0] = 'Calc_salocat':
- !!This calculates the current pcs_mass['body'] category; ranges are 20 points, seemed to balance best if the range is x10 the hip devisor
- if pcs_mass['body'] + pcs_mass['butt'] < 10:
- result = 0
- else
- result = (pcs_mass['body'] + pcs_mass['butt'] + 10) / 20
- end
- end
- if $ARGS[0] = 'Redistribute_Mass':
- !!This resets the genetic bust size (pcs_mass['bust_gen']) when the cheat is used to reduce breast size (maybe other things later)
- if titreduc = 1:
- killvar 'titreduc'
- if pcs_mass['bust_gen'] > pcs_mass['bust']:
- pcs_mass['bust_gen'] = pcs_mass['bust'] + 2 - pcs_mass['bust'] mod 5
- end
- end
- if assreduc = 1:
- killvar 'assreduc'
- if pcs_mass['butt_gen'] > pcs_mass['butt']:
- pcs_mass['butt_gen'] = pcs_mass['butt'] + 2 - pcs_mass['butt'] mod 5
- end
- end
- if salobustdo = 0:
- !!This controls the movement of pcs_mass['body'] to/from bust in order of precedence
- !!=============== MAGIC ===============!!
- if magikDostup = 0 and magf2bdo = 1 and daystart > pcs_mass['magic_day'] and pcs_mana >= manamax / 2:
- bodyVars['bust_magic'] += 1
- if pcs_mass['body'] >= 80: pcs_mass['body'] -= 3
- pcs_mass['magic_day'] = daystart + rand(7, 14)
- if bodyVars['bust_magic'] >= 2 + magtarcup * 5: magf2bdo = 0
- pcs_mana -= max(100, 2000 / pcs_magik)
-
- !! Old content
- !{
- elseif salocatnow < salocatlast:
- if magikDostup = 0 and bodyVars['bust_magic'] > 0 and salocatnow < 2:
- bodyVars['bust_magic'] -= 1
- pcs_mass['body'] += 3
- magf2bdo = 1
- end
- }
- end
-
- !!=============== Low Weight ===============!!
- if pcs_mass['body'] < 10:
- if pcs_mass['bust'] > 0:
- temp_diff = min(pcs_mass['bust'], 3)
- pcs_mass['bust'] -= temp_diff
- pcs_mass['body'] += temp_diff
- end
- if pcs_mass['butt'] > 0:
- temp_diff = min(pcs_mass['butt'], 3)
- pcs_mass['butt'] -= temp_diff
- pcs_mass['body'] += temp_diff
- end
- else
- temp_total_mass = pcs_mass['body'] + pcs_mass['bust'] + pcs_mass['butt']
- temp_tot_gen_mass = 60 + pcs_mass['bust_gen'] + pcs_mass['butt_gen']
- !!=============== Bust ===============!!
- temp_mass_bust = (pcs_mass['bust_gen'] * temp_total_mass) / temp_tot_gen_mass
- !!----------- Small -----------!!
- if pcs_mass['body'] >= 50 and pcs_mass['bust'] < pcs_mass['bust_gen']:
- if pcs_mass['bust'] < pcs_mass['bust_gen']:
- temp_diff = min(pcs_mass['bust_gen'] - pcs_mass['bust'], 3)
- pcs_mass['bust'] += temp_diff
- pcs_mass['body'] -= temp_diff
- end
- !!----------- Growth -----------!!
- elseif temp_mass_bust > pcs_mass['bust']:
- pcs_mass['bust'] += 1
- pcs_mass['body'] -= 1
- !!----------- Shrink -----------!!
- elseif temp_mass_bust < pcs_mass['bust'] and pcs_mass['bust'] > 0:
- pcs_mass['bust'] -= 1
- pcs_mass['body'] += 1
- end
- !!=============== Ass ===============!!
- temp_mass_ass = (pcs_mass['butt_gen'] * temp_total_mass) / temp_tot_gen_mass
- !!----------- Small -----------!!
- if pcs_mass['body'] >= 50 and pcs_mass['butt'] < pcs_mass['butt_gen']:
- temp_diff = min(pcs_mass['butt_gen'] - pcs_mass['butt'], 3)
- pcs_mass['butt'] += temp_diff
- pcs_mass['body'] -= temp_diff
- !!----------- Rest -----------!!
- elseif temp_mass_ass > pcs_mass['butt']:
- !if pcs_mass['butt'] < 2 * pcs_mass['butt_gen'] + 40:
- pcs_mass['butt'] += 1
- pcs_mass['body'] -= 1
- !end
- elseif temp_mass_ass < pcs_mass['butt'] and pcs_mass['butt'] > 0:
- pcs_mass['butt'] -= 1
- pcs_mass['body'] += 1
- end
- killvar 'temp_total_mass'
- killvar 'temp_tot_gen_mass'
- killvar 'temp_mass_bust'
- killvar 'temp_mass_ass'
- killvar 'temp_diff'
- end
- if bodyresetflag = 0:
- if pcs_mass['bust'] > pcs_mass['bust_message'] + 3:
- pcs_mass['bust_message'] = pcs_mass['bust']
- if pcs_mass['butt'] > pcs_mass['butt_message'] + 3:
- pcs_mass['butt_message'] = pcs_mass['butt']
- '<b>Your breasts and ass seem fuller</b>'
- elseif pcs_mass['butt'] < pcs_mass['butt_message'] - 3:
- pcs_mass['butt_message'] = pcs_mass['butt']
- '<b>Your breasts seem fuller and ass seems to be getting smaller</b>'
- else
- '<b>Your breasts seem fuller</b>'
- end
- elseif pcs_mass['bust'] < pcs_mass['bust_message'] - 3:
- pcs_mass['bust_message'] = pcs_mass['bust']
- if pcs_mass['butt'] > pcs_mass['butt_message'] + 3:
- pcs_mass['butt_message'] = pcs_mass['butt']
- '<b>Your breasts seem to be getting smaller and your ass seems fuller</b>'
- elseif pcs_mass['butt'] < pcs_mass['butt_message'] - 3:
- pcs_mass['butt_message'] = pcs_mass['butt']
- '<b>Your breasts and ass seem to be getting smaller</b>'
- else
- '<b>Your breasts seem to be getting smaller</b>'
- end
- else
- if pcs_mass['butt'] > pcs_mass['butt_message'] + 3:
- pcs_mass['butt_message'] = pcs_mass['butt']
- '<b>Your ass seems fuller</b>'
- elseif pcs_mass['butt'] < pcs_mass['butt_message'] - 3:
- pcs_mass['butt_message'] = pcs_mass['butt']
- '<b>Your ass seem to be getting smaller</b>'
- end
- end
- else
- pcs_mass['bust_message'] = pcs_mass['bust']
- pcs_mass['butt_message'] = pcs_mass['butt']
- end
- end
- gs 'body', 'Update_vhips'
- killvar 'salobustdo'
- killvar 'temp_massbustchange'
- killvar 'temp_massasschange'
- end
- if $ARGS[0] = 'Reset_mass_distribution':
- total_mass = pcs_mass['body'] + pcs_mass['bust'] + pcs_mass['butt']
- total_gen_mass = 60 + pcs_mass['bust_gen'] + pcs_mass['butt_gen']
- pcs_mass['bust'] = (pcs_mass['bust_gen'] * total_mass) / total_gen_mass
- pcs_mass['butt'] = (pcs_mass['butt_gen'] * total_mass) / total_gen_mass
- pcs_mass['body'] = total_mass - pcs_mass['bust'] - pcs_mass['butt']
- pcs_mass['bust_last'] = pcs_mass['body']
- pcs_mass['butt_last'] = pcs_mass['body']
- killvar 'total_mass'
- killvar 'total_gen_mass'
- gs 'body', 'Update_vhips'
- end
- if $ARGS[0] = 'Set_mass_distribution_using_body':
- pcs_mass['body'] = ARGS[1]
- pcs_mass['bust'] = (pcs_mass['bust_gen'] * ARGS[1]) / 60
- pcs_mass['butt'] = (pcs_mass['butt_gen'] * ARGS[1]) / 60
- gs 'body', 'Reset_mass_distribution'
-
- pcs_mass['bust_message'] = pcs_mass['bust']
- pcs_mass['butt_message'] = pcs_mass['butt']
-
- bodyVars['vhips'] = (pcs_mass['body'] + pcs_mass['butt'] - 80) / 2
- end
- !!------------------------- UPDATE vhips -------------------------!!
- if $ARGS[0] = 'Update_vhips':
- vhtmp = (pcs_mass['body'] + pcs_mass['butt'] - 80) / 2
- ! Because a reset should be updating hip size instantly (this set is a bit redundant anyway)
- if bodyresetflag = 1:
- bodyVars['vhips'] = vhtmp
- else
- if vhtmp < bodyVars['vhips']:
- bodyVars['vhips'] -= 1
- elseif vhtmp > bodyVars['vhips']:
- bodyVars['vhips'] += 1
- end
- end
- killvar 'vhtmp'
- !! Varies between 0 and 25 to 30 ish range
- !bodyVars['butt_bonus'] = max(0, pcs_mass['butt'] - max(0, bodyVars['vhips']))
- bodyVars['butt_bonus'] = (pcs_mass['butt'] - 20) / 3
-
- !! temp_vhips2 = vhips + (pcs_hgt * bodyVars['hratio'])/100 - (pcs_hgt * 72)/100
- !! temp_vhips2 = pcs_hips - (pcs_hgt * 72) / 1000
- temp_vhips2 = vhips - (pcs_hgt * (72 - bodyVars['hratio'])) / 100
- bodyVars['vofat'] = max(0, temp_vhips2 / 2)
- bodyVars['vhips'] -= 2 * bodyVars['vofat']
-
- !! vhips = vhips - max(0, temp_vhips2)
- !! vhips = vhips || vhips = (pcs_hgt * (72 - bodyVars['hratio'])) / 100
- killvar 'temp_vhips2'
- end
- !!==================================!!
- !! !!
- !! Skin Gain & Loss !!
- !! !!
- !!==================================!!
- if $ARGS[0] = 'SkinGain':
- if $ARGS[1] = 'CleanSelf' and lastShowerSkinGain ! daystart:
- lastShowerSkinGain = daystart
- skinDailyGain += 5
- !!needs to be changet to +3 when the bathLuffa in added.
- !!if bathLuffa = 1: skinDailyGain += 2
- elseif $ARGS[1] = 'Moisturizer':
- moisturizerDailyCount += 1
- if moisturizerDailyCount <= 2: skinDailyGain += 2
- end
- end
- if $ARGS[0] = 'SkinLoss':
- if $ARGS[1] = 'Smoke' and lastSmokeSkinPenalty ! daystart:
- lastSmokeSkinPenalty = daystart
- skinDailyPenalty += 1
- elseif $ARGS[1] = 'MakeUpSleep':
- skinDailyPenalty += 10
- end
- end
- !!==================================!!
- !! !!
- !! RESETS !!
- !! !!
- !!==================================!!
- if $ARGS[0] = 'softreset':
- !!This is for use in immediately updating shape if something has caused a large change in pcs_mass['body'], primarily fat burners and plastic surgery
- bodyresetflag = 1
- :resetloop
- if pcs_mass['body'] ! salolast:
- if gamestartflag = 1:
- salobustdo = 1
- end
- gs 'body', 'Update_Body'
- jump 'resetloop'
- end
- !!Updates pcs_apprncbase after a reset
- gs 'body', 'UpdateBodyMeasurement'
- gs 'body', 'Update_Appearance'
- !!Clears the warning and reset status flags if they were set
- bodyresetflag = 0
- bodyVars['weight_warning'] = 0
- end
- if $ARGS[0] = 'hardreset':
- !!This is primarily for canceling out "dounspell" and setting pcs_mass['body'] to whatever value will result in the current hip size then balancing everything out.
- !!Also could be built in as a means to in-game undo "dounspell", other than the cheat.
- if dounspell ! 1 or dounsplkil = 0:
- 'If you''re seeing this, something odd happened. Please make a bug report that the body shape hard reset improperly triggered and what you were doing.'
- else
- pcs_mass['body'] = 12
- fat = 0
- agilbuf = pcs_agil
- strenbuf = pcs_stren
- vitalbuf = pcs_vital
- salobustdo = 1
- bodyresetflag = 1
- normbuffpick = -1
- gs 'body', 'Update_Body'
- pcs_mass['body'] = 60 + (2 * pcs_hips) - (pcs_hgt * bodyVars['hratio']) / 50
- if pcs_mass['body'] < 10:
- salocatnow = 0
- else
- salocatnow = 1 + (pcs_mass['body'] - 10) / 20
- end
- salocatlast = salocatnow
- salolast = pcs_mass['body']
- if pcs_mass['butt_gen'] = 0:
- pcs_mass['butt_gen'] = 20
- end
- bodyVars['vhips'] = (pcs_mass['body'] + pcs_mass['butt'] - 80) / 2
- if pcs_mass['bust_gen'] = 0:
- if pcs_mass['bust'] >= 27:
- pcs_mass['bust_gen'] = 27
- elseif pcs_mass['bust'] > 0:
- pcs_mass['bust_gen'] = 2 + pcs_mass['bust'] - pcs_mass['bust'] mod 5
- elseif bodyVars['bust_silicone'] >= 20:
- pcs_mass['bust_gen'] = 12
- pcs_mass['bust'] = 12
- bodyVars['bust_silicone'] -= 10
- end
- end
- pcs_mass['body_message'] = pcs_mass['body']
- pcs_mass['bust_message'] = pcs_mass['bust']
- pcs_mass['butt_message'] = pcs_mass['butt']
- bodyresetflag = 0
- normbuffpick = 0
- bodyVars['weight_warning'] = 0
- magf2bdo = 0
- killvar 'dounsplkil'
- newbdsp = 1
- dounspell = 0
- gs 'body', 'Update_Appearance'
- gs 'body', 'Update_Body'
- gs 'stat'
- end
- end
- !!==================================!!
- !! !!
- !! INITIAL !!
- !! !!
- !!==================================!!
- if $ARGS[0] = 'initial':
- !! Sets the genetic bust size if it was not set in the start routines
- if pcs_mass['bust_gen'] = 0: pcs_mass['bust_gen'] = 12
- if pcs_mass['butt_gen'] = 0: pcs_mass['butt_gen'] = 20
- if pcs_mass['body'] >= 50 and pcs_mass['body'] <= 60:
- pcs_mass['bust'] = pcs_mass['bust_gen']
- pcs_mass['butt'] = pcs_mass['butt_gen']
- else
- gs 'body', 'Set_mass_distribution_using_body', pcs_mass['body']
- end
- strenbuf = pcs_stren
- agilbuf = pcs_agil
- vitalbuf = pcs_vital
- normbuffpick = -1
- gamestartflag = 1
- !! Calling soft reset will cause the main code to cycle up to the starting value of pcs_mass['body']
- gs 'body', 'softreset'
- !! This sets/resets the controler variables
- salocatnow = func('body', 'Calc_salocat')
- salocatlast = salocatlast
- normbuffpick = 0
- magf2bdo = 0
- killvar 'gamestartflag'
- newbdsp = 1
- !! This does all the body shape setting before the first stat call
- temp_bmi = func('body', 'CalcBMI2')
- pcs_bmi[0] = temp_bmi / 10
- pcs_bmi[1] = temp_bmi mod 10
- killvar 'temp_bmi'
- gs 'body', 'UpdateBodyImage'
- gs 'body', 'Update_Appearance'
- end
- --- body ---------------------------------
|