123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410 |
- # body_shape
- !!vhips = derived from salo in body_shape
- !!vhtmp = slows the change to vhips in body_shape
- !!wratio = waist to hips ratio set in body_shape
- !!bratio = band to waist ratio set in body_shape
- !!hratio = hip to height ratio set in body_shape
- !!vofat = used as a place to put extra salo at extreme high values (i.e. really, really fat) set in body_shape
- !!nbsize = starts at a set genetic bust size, but can be adjusted down if salo drops too low
- !!magicf2b = set in body_shape for the fat moved to bust
- !!genbsize = the set genetic bust size
- !!salocatnow = the current category of salo
- !!salocatlast = the previous category of salo
- !!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
- !!normbuffpick = sets the status of using normal or buff body images and calculation
- !!nrmbfpckct = used to count the number of times a switch to buff was turned down and stop asking after 3
- !!btwarn = 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
- !!sftrstflag = used to prevent a code chunk from firing on a soft reset
- if $ARGS[0] = '':
- !!Fall of muscularity over time
- if stren >= 26 and vital >= 26 and sftrstflag = 0:
- if downmusl >= 5:
- downmusl = 0
- stren -= 1
- vital -= 1
- agil -= 1
- fat += 5
- else
- downmusl += rand (0,1)
- end
- end
- !!This controls the gradual change in stat to -buf
- if strenbuf > stren: strenbuf -= 1
- if strenbuf < stren: strenbuf += 1
- if vitalbuf > vital: vitalbuf -= 1
- if vitalbuf < vital: vitalbuf += 1
- if agilbuf > agil: agilbuf -= 1
- if agilbuf < agil: agilbuf += 1
- !!All the ratios were rounded to 2 digits and there are divide 100s at the final calc points
- !!Waist to hip ratio
- wrtemp = ((2 * vitalbuf + strenbuf + agilbuf) /4)
- !! Primary wratio handling
- if wrtemp < 11:
- wratio = 85 + (11 - (vitalbuf + strenbuf + agilbuf)/3)
- elseif wrtemp < 20:
- wratio = 85
- elseif wrtemp < 35:
- wratio = 85 - (wrtemp - 20) / 3
- elseif wrtemp < 55:
- wratio = 80 - (wrtemp - 35) / 4
- elseif wrtemp < 80:
- wratio = 75 - (wrtemp - 55) / 5
- elseif wrtemp >= 80:
- wratio = 70
- end
- !! High stat value edge case handling
- if (vitalbuf + strenbuf + agilbuf) /3 > 100: wratio -= ((vitalbuf + strenbuf)/2 - agilbuf)/5
- !! This is the oops and high stat gone overboard handling
- if wratio < 65: wratio = 65
- killvar 'wrtemp'
- !!Setting the vnesh bonus based on wratio
- if wratio >= 85:
- bodykoef = 0
- elseif wratio >= 80:
- bodykoef = 2
- elseif wratio >= 75:
- bodykoef = 4
- elseif wratio >= 70:
- bodykoef = 8
- else
- bodykoef = 4
- end
- !!For band to waist ratio
- brtemp = (2 * strenbuf + vitalbuf + agilbuf) /4
- if brtemp < 10:
- bratio = 105
- elseif brtemp =< 23:
- bratio = 106
- elseif brtemp =< 80:
- bratio = 106 + (brtemp - 23) / 3
- else
- bratio = 125
- end
- killvar 'brtemp'
- !!For hip to height ratio which is used to set the center point
- hrtemp = (2 * agilbuf + vitalbuf + strenbuf) /4
- if hrtemp < 35:
- hratio = 60
- elseif hrtemp < 45:
- hratio = 59
- elseif hrtemp < 60:
- hratio = 58
- elseif hrtemp < 80:
- hratio = 57
- else
- hratio = 56
- end
- killvar 'hrtemp'
- !!Salo Handling
- if salo > fat: salo -= 1
- if salo < fat: salo += 1
- !!This calculates the current salo category; ranges are 20 points, seemed to balance best if the range is x10 the hip devisor
- :salocatloop
- if salo < 10:
- salocatnow = 0
- else
- salocatnow = 1 + (salo - 10) / 20
- end
- !!This controls the movement of salo to/from bust in order of precedence
- if salobustdo = 0 and nbsize < genbsize and salocatnow > 2:
- if sftrstflag = 0:'<b>Your breasts seem fuller.</b>'
- nbsize += 1
- salo -= 3
- salobustdo = 1
- jump 'salocatloop'
- end
- if salobustdo = 0 and magf2bdo = 1 and salocatnow > salocatlast and manna >= mannamax / 2:
- if sftrstflag = 0:'<b>Your breasts seem fuller.</b>'
- magicf2b += 1
- salo -= 3
- salobustdo = 1
- if magicf2b >= 2 + magtarcup * 5: magf2bdo = 0
- if magik < 20:
- manna -= 2000 / magik
- else
- mana -= 100
- end
- jump 'salocatloop'
- end
- if salobustdo = 0 and salocatnow < 2 and salocatlast >= 2 and magicf2b > 0:
- if sftrstflag = 0:'<b>Your breasts seem to be getting smaller.</b>'
- magicf2b -= 1
- salo += 3
- salobustdo = 1
- magf2bdo = 1
- jump 'salocatloop'
- end
- if salobustdo = 0 and salocatnow < 2 and salocatlast >= 2 and nbsize > 0:
- if sftrstflag = 0:'<b>Your breasts seem to be getting smaller.</b>'
- nbsize -= 1
- salo += 3
- salobustdo = 1
- jump 'salocatloop'
- end
- !!This is for switching to and from the normal and buff image sets (& vital resisting salo w/ buff set)
- if normbuffpick = 0 and salocatnow <= 2 and (strenbuf + agilbuf) >= 50: normbuffpick = 1
- if normbuffpick = 1 and nrmbfpckct >= 3: normbuffpick = -1
- if normbuffpick >= 1 and salocatnow > 2 and vitalbuf >= 25:
- if vitalbuf / 25 > tempvct:
- tempvct += 1
- salo -= 1
- jump 'salocatloop'
- else
- normbuffpick = 0
- end
- end
- !!Note: normbuffpick = 1 will trigger the bathing option scene and three nos there will set normbuffpick = -1; until a choice is made, will behave as =2
- !!This is if salo is still < 1 (will add code for Succubus here later)
- if salo < 1:
- if fat >= 1:
- salo = 1
- if fat > 1: fat -= 1
- elseif fat <= 0 and stren + vital > 0:
- stren -= 1
- vital -= 1
- salo = 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>'
- salo = 1
- end
- end
- end
- killvar 'tempvct' & killvar 'salobustdo'
- !!This is the hip calcs, 80 is the center of the current max-min range (10 - 130)
- if normbuffpick = 2:
- vhtmp = (strenbuf - agilbuf) / 2
- else
- vhtmp = (salo - 80) / 2
- end
- if vhips > vhtmp: vhips -= 1
- if vhips < vhtmp: vhips += 1
- if (rost * hratio) / 100 + vhips > (rost * 72) / 100:
- vofat = ((rost * hratio) / 100 + vhips - (rost * 72) / 100) / 2
- vhips -= vofat * 2
- end
- !!This will trigger the warning notices in the bathing code (the +/- 12 should always be +/- 11 + the max change to salo w/ fat)
- if salolast > salo and salo <= 12 + (20 * (salocatnow - 1)): btwarn = 1
- if salolast < salo and salo >= (20 * (salocatnow + 1)) - 12: btwarn = 2
- !!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 magik >= 5 and MagikDostup = 0 and magf2bdo = 0:
- if salolast < salo and salo >= (20 * (salocatnow + 1)) - 11 and tits < 10:
- 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
- if salolast > salo: salolast -= 1
- if salolast < salo: salolast += 1
- !!This accounts for higher Stats keeping the body shape stable and a bypass for resets (the plus/minus 5 is to give some working room)
- if salo + 5 < fat and sftrstflag = 0:
- if salo + 5 < fat - ((agilbuf + strenbuf + vitalbuf)/30):
- fat -= (agilbuf + strenbuf + vitalbuf)/30
- else
- fat = salo + 5
- end
- elseif salo - 5 > fat and sftrstflag = 0:
- if salo - 5 > fat + ((agilbuf + strenbuf + vitalbuf)/30):
- fat += (agilbuf + strenbuf + vitalbuf)/30
- else
- fat = salo - 5
- end
- end
- killvar 'vmeat' & killvar 'vfat' & killvar 'Kves' & killvar 'krost'
- killvar 'koefvesbt' & killvar 'koefbt'
- end
- if $ARGS[0] = 'softreset':
- !!This is for use in immediately updating shape if something has forced salo = fat by
- !!cycling the main code the number of times it would have normally w/ a change in fat
- sftrstflag = 1
- :resetloop
- if fat ! salo:
- if gmstrtflag = 1: salobustdo = 1
- gs 'body_shape'
- jump 'resetloop'
- end
- !!Updates vneshbase after a reset
- gs 'body_shape', 'basebeautycalc', 1
- !!Clears the warning and reset status flags if they were set
- sftrstflag = 0
- btwarn = 0
- end
- if $ARGS[0] = 'hardreset':
- !!This is primarily for canceling out "dounspell" and setting salo 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 and dounsplkil > 0:
- fat = 12 & salo = 12
- agilbuf = agil & strenbuf = stren & vitalbuf = vital
- salobustdo = 1 & sftrstflag = 1 & normbuffpick = -1
- gs 'body_shape'
- salo = (bedra * 2) - ((rost * hratio) / 50) + 80
- fat = salo
- if salo < 10:
- salocatnow = 0
- else
- salocatnow = 1 + (salo - 10) / 20
- end
- salocatlast = salocatnow
- salolast = salo
- vhtmp = (salo - 80) / 2
- vhips = vhtmp
- if genbsize = 0 and nbsize > 0:
- If nbsize >= 27:
- genbsize = 27
- else
- genbsize = 2 + nbsize - nbsize mod 5
- end
- elseif genbsize = 0 and nbsize = 0 and silicone >= 20:
- genbsize = 12 & nbsize = 12 & silicone -= 10
- end
- sftrstflag = 0 & normbuffpick = 0 & btwarn = 0 & magf2bdo = 0
- killvar 'dounsplkil'
- newbdsp = 1
- dounspell = 0
- gs 'body_shape', 'basebeautycalc', 1
- gs 'body_shape'
- gs 'stat'
- else
- 'If you''re seeing this, something odd happened.'
- end
- end
- if $ARGS[0] = 'initial':
- if fat ! salo: fat = salo
- if fat <= 0: fat = 80
- if genbsize = 0:
- genbsize = 12 & nbsize = 12
- else
- nbsize = genbsize
- end
- agilbuf = agil & strenbuf = stren & vitalbuf = vital
- normbuffpick = -1 & gmstrtflag = 1
- salo = 0
- gs 'body_shape', 'softreset'
- salocatlast = salocatnow
- normbuffpick = 0 & magf2bdo = 0
- killvar 'gmstrtflag'
- newbdsp = 1
- gs 'stat'
- end
- !!This is the calculation for the base appearance
- if $args[0] = 'basebeautycalc':
- !! Setting vidagebonus
- vidagebonus = 100
- if vidage < 20: vidagebonus = 100 - 2 * (20 - vidage)
- if vidage > 30: vidagebonus = 100 - 2 * (vidage - 30)
- !! Setting Eyelashes bonus
- if resnic = 1:
- resnicbonus = 2
- elseif resnic = 2:
- resnicbonus = 5
- else
- resnicbonus = 0
- end
- !! Setting Eye Size bonus
- if glaraz = 1:
- glarazbonus = 1
- elseif glaraz = 2:
- glarazbonus = 3
- elseif glaraz = 3:
- glarazbonus = 2
- else
- glarazbonus = 0
- end
- !! Setting the Lip size bonus
- if lip = 0:
- lipbonus = -2
- elseif lip = 1:
- lipbonus = 0
- elseif lip = 2:
- lipbonus = 3
- elseif lip = 3:
- lipbonus = 5
- else
- lipbonus = 3
- end
- !! Preforming the calculation
- vneshtemp = vidagebonus * ((skinvan * 2 / 5) + (3 * (2 + bodykoef)) + (agil / 10) + (vital / 10) + resnicbonus + glarazbonus + lipbonus - (5 * zub)) / 100
- !! skinvan = skin condition, corrected to a 0 to 40 range; bodykoef set in main body_shape; zub is missing teeth or cosmetically improved teeth (-1)
- !! This is the first limiter
- if vneshtemp > 100: vneshtemp = 100
- !! This adds the supernatural vnesh bonus; currently Bimbo and Succubus
- vneshtemp += supnatvnesh
- !! This is the rate of change limiter
- if vneshbase > vneshtemp: vneshbase -= 1
- if vneshbase < vneshtemp: vneshbase += 1
- !! This is for use when a reset is called for by setting args[1] = 1
- if args[1] = 1: vneshbase = vneshtemp
- !! This is to clean up variables only used here
- killvar 'vidagebonus'
- killvar 'resnicbonus'
- killvar 'glarazbonus'
- killvar 'lipbonus'
- killvar 'vneshtemp'
- !! This is to unload old variables
- killvar 'CloNaturalBeauty'
- killvar 'CloBaseBeauty'
- killvar 'skin'
- killvar 'bimbobeauty'
- end
- --- body_shape ---------------------------------
|