body.qsrc 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. # body
  2. !!vhips = derived from salo in body_shape
  3. !!vhtmp = slows the change to vhips in body_shape
  4. !!wratio = waist to hips ratio set in body_shape
  5. !!bratio = band to waist ratio set in body_shape
  6. !!hratio = hip to height ratio set in body_shape
  7. !!vofat = used as a place to put extra salo at extreme high values (i.e. really, really fat) set in body_shape
  8. !!nbsize = starts at a set genetic bust size, but can be adjusted down if salo drops too low
  9. !!magicf2b = set in body_shape for the fat moved to bust
  10. !!genbsize = the set genetic bust size
  11. !!salocatnow = the current category of salo
  12. !!salocatlast = the previous category of salo
  13. !!magf2bdo = flag for magic bust increase; 0, ready; 1, do it; 2, ask; 3, no
  14. !!mgf2bnocnt = used to count the number of times a bust increase was turned down and stop asking after 3
  15. !!magtarcup = set in the dream code as the target cup size
  16. !!btwarn = used to flag if to display the gaining/losing weight message when bathing
  17. !!salolast = used when doing a soft rest to control the cycling of the main code
  18. !!sftrstflag = used to prevent a code chunk from firing on a soft reset
  19. !!Image set variables
  20. !! bodset = body image and descriptor control variable, used to indicate which image and descriptor set is in use
  21. !! $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
  22. !! bdsetlock = flag to indicate set control override, 0 is use the formula to pick a set, 1 is use a fixed set
  23. !! fixbodset = the identification number of the fixed image set
  24. !! bodsetcnt = the number of sets present
  25. !! imgset6ovr[x] and imgset7ovr[x] = a flag to indicate that an image set (x) has its own image 6 and/or 7
  26. !! 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
  27. $this = 'body'
  28. if $ARGS[0] = 'RegularUpdate':
  29. if dounspell = 0:
  30. gs $this, 'UpdateBodyMeasurement'
  31. pcs_weight = func($this, 'CalcWeight')
  32. pcs_bmi = func($this, 'CalcBMI')
  33. end
  34. if pcs_skin > 1000: pcs_skin = 1000
  35. if pcs_skin < 0: pcs_skin = 0
  36. end
  37. if $ARGS[0] = 'DailyUpdate':
  38. !{
  39. Update once a day and called from cikl
  40. }
  41. if dounspell = 1:
  42. if strenbuf > 90:
  43. strenbuf -= 2
  44. elseif strenbuf > 80:
  45. strenbuf -= 1
  46. end
  47. if vitalbuf > 90:
  48. vitalbuf -= 2
  49. elseif vitalbuf > 80:
  50. vitalbuf -= 1
  51. end
  52. if strenbuf > pcs_stren: strenbuf -= 1
  53. if strenbuf < pcs_stren: strenbuf += 1
  54. if vitalbuf > pcs_vital: vitalbuf -= 1
  55. if vitalbuf < pcs_vital: vitalbuf += 1
  56. if agilbuf > pcs_agil: agilbuf -= 1
  57. if agilbuf < pcs_agil: agilbuf += 1
  58. else
  59. gs $this
  60. end
  61. gs $this, 'UpdateBodyImage'
  62. !!---- Calculation of lash extension degradation and false lash removal
  63. if pcs_lashes > 2:
  64. if lashextensionstyle >= 1:
  65. lashextensionduration -= 1
  66. if lashextensionduration >= 1 and lashextensionduration <= 4:
  67. '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.'
  68. end
  69. if lashextensionduration <= 0:
  70. 'You waited too long to do maintenance on your lash extensions; there''s too little there to notice or work with at this point.'
  71. pcs_lashes = pcs_naturallashes
  72. killvar 'lashextensionstyle'
  73. killvar 'lashextensionduration'
  74. killvar 'lashextensionnew'
  75. end
  76. end
  77. if false_lashes > 0:
  78. false_lashes -= 1
  79. if false_lashes = 0:
  80. 'Your false lashes came off in the night; there''s no recovering them now.'
  81. pcs_lashes = pcs_naturallashes
  82. else
  83. 'Somehow, your lashes managed to stay attached throughout the night. You might be able to get away with wearing them another day straight.'
  84. end
  85. end
  86. end
  87. !! Max. Hair length 600mm, or 60cm, which should be somewhere in the lower back area.
  88. !! Hair grows 1mm each day, it takes 20 months (1 month = 30 days) to regrow the hair from 0.
  89. if pcs_hairlng < 1001 and hairgrowcht = 0:pcs_hairlng += 1
  90. ! Hair colour change
  91. if pcs_haircol ! nathcol:
  92. dyefade -=1
  93. if dyefade < 0: dyefade = 0
  94. end
  95. !!pubic hair colouring
  96. !! pcs_pubecol = natural colour
  97. !! pcs_pubecol[1] = flag for saveupdate
  98. !! pcs_pubecol[2] = actual colour
  99. !! pcs_pubecol[3] = countdown timer for dye
  100. if pcs_pubecol[2] ! pcs_pubecol:
  101. pcs_pubecol[3] -=1
  102. if pcs_pubecol[3] < 0: pcs_pubecol[3] = 0
  103. if pcs_pubecol[3] = 0: pcs_pubecol[2] = pcs_pubecol
  104. end
  105. if pcs_pubes < 2: pcs_pubecol[2] = pcs_pubecol
  106. if mc_inventory['scrunchies'] > 0:
  107. hscrunchrand = rand(1, 100)
  108. if hscrunchrand <= 8:mc_inventory['scrunchies'] -= 1
  109. end
  110. ! Leg and pubes hair growth
  111. if lashair ! 1:
  112. pcs_leghair += 1
  113. !!Pubic hair growth at 1/2 per night
  114. if pcs_pubes['growth'] > 1:
  115. pcs_pubes['growth'] = 0
  116. pcs_pubes += 1
  117. end
  118. pcs_pubes['growth'] += 1
  119. end
  120. if age < 18 and rand (0,2) = 0 and pcs_leghair > 0: pcs_leghair -= 1
  121. if pcs_skin <= 300:
  122. pcs_skin += min(skinDailyGain * 2, 20) - skinDailyPenalty - 1
  123. elseif pcs_skin <= 600:
  124. pcs_skin += min(skinDailyGain, 10) - skinDailyPenalty - 1
  125. elseif pcs_skin <= 800:
  126. pcs_skin += min(skinDailyGain/2, 5) - skinDailyPenalty - 1
  127. elseif pcs_skin <= 900:
  128. pcs_skin += min(skinDailyGain/3, 3) - skinDailyPenalty - 1
  129. elseif pcs_skin <= 1000:
  130. pcs_skin += min(skinDailyGain/5, 2) - skinDailyPenalty - 1
  131. end
  132. if pcs_teeth < 0:
  133. !! Daly degradation of perfect white teeth
  134. tempteeth = 1
  135. if teeth['caffe_or_tea'] > 8: tempteeth += 1
  136. if teeth['smoked'] > 1: tempteeth += 1
  137. tempteeth -= min(3, teeth['brushed'])
  138. teeth['degradation'] += max(tempteeth, 0)
  139. killvar 'tempteeth'
  140. teeth['brushed'] = 0
  141. teeth['smoked'] = 0
  142. teeth['caffe_or_tea'] = 0
  143. if teeth['degradation'] > 60:
  144. !! After a certain time of not taking care of your teeth you will loose you perfect whit smile.
  145. teeth['degradation'] = 0
  146. pcs_teeth = 0
  147. elseif teeth['degradation'] < 0:
  148. teeth['degradation'] = 0
  149. end
  150. end
  151. !skin variable reset
  152. killvar 'moisturizerDailyCount'
  153. killvar 'skinDailyGain'
  154. killvar 'skinDailyPenalty'
  155. end
  156. if $ARGS[0] = '':
  157. !!This controls the gradual change in stat to -buf
  158. if strenbuf > pcs_stren: strenbuf -= 1
  159. if strenbuf < pcs_stren: strenbuf += 1
  160. if vitalbuf > pcs_vital: vitalbuf -= 1
  161. if vitalbuf < pcs_vital: vitalbuf += 1
  162. if agilbuf > pcs_agil: agilbuf -= 1
  163. if agilbuf < pcs_agil: agilbuf += 1
  164. !!All the ratios were rounded to 2 digits and there are divide 100s at the final calc points
  165. !!Waist to hip ratio
  166. wrtemp = ((2 * vitalbuf + strenbuf + agilbuf) /4)
  167. !! Primary wratio handling
  168. if wrtemp < 11:
  169. wratio = 85 + (11 - (vitalbuf + strenbuf + agilbuf)/3)
  170. elseif wrtemp < 20:
  171. wratio = 85
  172. elseif wrtemp < 35:
  173. wratio = 85 - (wrtemp - 20) / 3
  174. elseif wrtemp < 55:
  175. wratio = 80 - (wrtemp - 35) / 4
  176. elseif wrtemp < 80:
  177. wratio = 75 - (wrtemp - 55) / 5
  178. elseif wrtemp >= 80:
  179. wratio = 70
  180. end
  181. !! High stat value edge case handling
  182. if (vitalbuf + strenbuf + agilbuf) /3 > 100: wratio -= ((vitalbuf + strenbuf)/2 - agilbuf)/5
  183. !! This is the oops and high stat gone overboard handling
  184. if wratio < 65: wratio = 65
  185. killvar 'wrtemp'
  186. !!For band to waist ratio
  187. brtemp = (2 * strenbuf + vitalbuf + agilbuf) /4
  188. if brtemp < 10:
  189. bratio = 105
  190. elseif brtemp =< 23:
  191. bratio = 106
  192. elseif brtemp =< 80:
  193. bratio = 106 + (brtemp - 23) / 3
  194. else
  195. bratio = 125
  196. end
  197. killvar 'brtemp'
  198. !!For hip to height ratio which is used to set the center point
  199. hrtemp = (2 * agilbuf + vitalbuf + strenbuf) /4
  200. if hrtemp < 35:
  201. hratio = 60
  202. elseif hrtemp < 45:
  203. hratio = 59
  204. elseif hrtemp < 60:
  205. hratio = 58
  206. elseif hrtemp < 80:
  207. hratio = 57
  208. else
  209. hratio = 56
  210. end
  211. killvar 'hrtemp'
  212. !!Salo Handling; the first part is because during a reset fat is not used and should be cleared
  213. if sftrstflag = 1 or cheatNoFat = 1:
  214. fat = 0
  215. else
  216. if fat > (17 + vitalbuf / 25): salo += 1 & fat = 0
  217. if fat < (-2 - (vitalbuf / 10)): salo -= 1 & fat = 0
  218. fat = fat/4
  219. end
  220. !!This is the salo cap for the weight approximation
  221. if salo > 250: salo = 250
  222. !!This calculates the current salo category; ranges are 20 points, seemed to balance best if the range is x10 the hip devisor
  223. :salocatloop
  224. if salo < 10:
  225. salocatnow = 0
  226. else
  227. salocatnow = 1 + (salo - 10) / 20
  228. end
  229. !!This resets the genetic bust size (genbsize) when the cheat is used to reduce breast size (maybe other things later)
  230. if titreduc = 1:
  231. killvar 'titreduc'
  232. if genbsize > nbsize:
  233. genbsize = 2 + nbsize - nbsize mod 5
  234. end
  235. end
  236. !!This controls the movement of salo to/from bust in order of precedence
  237. if salobustdo = 0 and nbsize < genbsize and salocatnow > 2:
  238. if sftrstflag = 0:'<b>Your breasts seem fuller.</b>'
  239. nbsize += 1
  240. salo -= 3
  241. salobustdo = 1
  242. jump 'salocatloop'
  243. end
  244. if salobustdo = 0 and magf2bdo = 1 and salocatnow > salocatlast and pcs_mana >= manamax / 2 and magikDostup = 0:
  245. if sftrstflag = 0:'<b>Your breasts seem fuller.</b>'
  246. magicf2b += 1
  247. salo -= 3
  248. salobustdo = 1
  249. if magicf2b >= 2 + magtarcup * 5: magf2bdo = 0
  250. if pcs_magik < 20:
  251. pcs_mana -= 2000 / pcs_magik
  252. else
  253. mana -= 100
  254. end
  255. jump 'salocatloop'
  256. end
  257. if salobustdo = 0 and salocatnow < 2 and salocatlast >= 2 and magicf2b > 0 and magikDostup = 0:
  258. if sftrstflag = 0:'<b>Your breasts seem to be getting smaller.</b>'
  259. magicf2b -= 1
  260. salo += 3
  261. salobustdo = 1
  262. magf2bdo = 1
  263. jump 'salocatloop'
  264. end
  265. if salobustdo = 0 and salocatnow < 1 and salocatlast >= 1 and nbsize > 0:
  266. if sftrstflag = 0:'<b>Your breasts seem to be getting smaller.</b>'
  267. nbsize -= 1
  268. salo += 3
  269. salobustdo = 1
  270. jump 'salocatloop'
  271. end
  272. !!This is if a Succubus has salo < 1
  273. if succubusflag = 1 and salo < 1:
  274. sucexcess -= 1
  275. salo += 3
  276. end
  277. !!This is if salo is still < 1
  278. if salo < 1:
  279. if fat >= 1:
  280. salo = 1
  281. fat -= 1
  282. elseif fat <= 0 and pcs_stren + pcs_vital > 0:
  283. stren_deg -= 1000
  284. vital_deg -= 1000
  285. salo = 1
  286. else
  287. if Enable_nogameover = 0:
  288. over = 3
  289. gt 'gameover'
  290. exit
  291. else
  292. pl '<font color=red><B>You starved to death, but Cheat Mode keeps you Alive.</B></font>'
  293. salo = 1
  294. end
  295. end
  296. end
  297. killvar 'tempvct' & killvar 'salobustdo'
  298. !!This is the hip calcs, 80 is the center of the current max-min range (10 - 130)
  299. vhtmp = (salo - 80) / 2
  300. if vhips > vhtmp: vhips -= 1
  301. if vhips < vhtmp: vhips += 1
  302. !! Because a reset should be updating hip size instantly (this set is a bit redundant anyway)
  303. if sftrstflag = 1: vhips = vhtmp
  304. if (pcs_hgt * hratio) / 100 + vhips > (pcs_hgt * 72) / 100:
  305. vofat = ((pcs_hgt * hratio) / 100 + vhips - (pcs_hgt * 72) / 100) / 2
  306. vhips -= vofat * 2
  307. end
  308. !!This will trigger the warning notices in the bathing code (the +/- 12 should always be +/- 11 + the max change to salo w/ fat)
  309. if salolast > salo and salo <= 12 + (20 * (salocatnow - 1)): btwarn = 1
  310. if salolast < salo and salo >= (20 * (salocatnow + 1)) - 12: btwarn = 2
  311. !!This will trigger the dream for the option to use magic to increase bust
  312. !!Three nos at the dream will lock it out (1 yes resets the count)
  313. if pcs_magik >= 5 and MagikDostup = 0 and magf2bdo = 0:
  314. if salolast < salo and salo >= (20 * (salocatnow + 1)) - 11 and tits < 10:
  315. if mgf2bnocnt < 3:
  316. magf2bdo = 2
  317. else
  318. magf2bdo = 3 & killvar 'mgf2bnocnt'
  319. end
  320. end
  321. end
  322. !!This is to deal with the possibility that salocatnow changed by more than 1 (fat burners, vitamins, plastic surgery, etc.)
  323. if salocatnow < salocatlast: salocatlast -= 1
  324. if salocatnow > salocatlast: salocatlast += 1
  325. !!This is for use in the warning code and as part of the reset routines
  326. if salolast > salo: salolast -= 1
  327. if salolast < salo: salolast += 1
  328. !!Setting the pcs_apprnc bonus based on fat and strength
  329. pcs_bmi = FUNC($this, 'CalcBMI')
  330. !!This is to clean up unused variables
  331. killvar 'normbuffpick' & killvar 'nrmbfpckct'
  332. killvar 'vmeat' & killvar 'vfat' & killvar 'Kves' & killvar 'krost'
  333. killvar 'koefvesbt' & killvar 'koefbt'
  334. end
  335. if $ARGS[0] = 'UpdateBodyMeasurement':
  336. pcs_hips = (pcs_hgt * hratio) / 100 + vhips
  337. pcs_waist = (pcs_hips * wratio) / 100 + vofat
  338. pcs_band = (pcs_waist * bratio) / 100 + vofat
  339. pcs_bust = (pcs_waist * bratio) / 100 + nbsize + magicf2b + silicone
  340. pcs_butt = (pcs_hips / 10) + silicone_butt + butt_cheat + pcs_butt_tr
  341. pcs_cupsize = pcs_bust - pcs_band
  342. end
  343. if $ARGS[0] = 'CalcWeight':
  344. !{pcs_weight: Svetas weight in kg
  345. Optimal Weight (170cm): 60kg, 60 salo
  346. This is an approximation, so that a sveta with a different height has the same BMI for the same salo values.
  347. 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.}
  348. result = 30 + salo / 2 + (pcs_hgt - 170) * 7 / 10
  349. !{Do not remove (julzor)
  350. This is the old more complex function, but it doesn''t work correctly.
  351. 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.
  352. 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}
  353. !result = (pcs_hgt * 62 / 170) + (vhips + (vofat * 2)) / 4 + tits
  354. end
  355. if $ARGS[0] = 'UpdateBodyImage':
  356. !Update body image set
  357. if dounspell = 1:
  358. salocatnow = (pcs_hips / 10) - 5
  359. if bdsetlock = 0:
  360. if (knowpreg = 1 or (preg = 1 and thinkpreg = 1) or (preg = 1 and PregChem > 3600)):
  361. bodset = 3
  362. elseif strenbuf >= 100 and stren_plus_lvl > 0:
  363. bodset = 2
  364. elseif strenbuf <= 50:
  365. bodset = 0
  366. else
  367. bodset = 1
  368. end
  369. else
  370. bodset = fixbodset
  371. end
  372. elseif (knowpreg = 1 or (preg = 1 and thinkpreg = 1) or (preg = 1 and PregChem > 3600)) and bodet ! 3 and bdsetlock = 0:
  373. bodset = 3
  374. elseif preg = 0 and bdsetlock = 0:
  375. if strenbuf >= 100 and stren_plus_lvl > 0:
  376. bodset = 2
  377. elseif strenbuf <= 50:
  378. bodset = 0
  379. else
  380. bodset = 1
  381. end
  382. end
  383. ! Update body description
  384. if (knowpreg = 1 or (preg = 1 and thinkpreg = 1) or (preg = 1 and PregChem > 3600)) and bodset = 3:
  385. if PregChem > 6216:
  386. $body = $bodimgsets[((bodset * 10) + 8)]
  387. elseif PregChem < 2688:
  388. $body = $bodimgsets[(bodset * 10)]
  389. else
  390. $body = $bodimgsets[((bodset * 10)+((PregChem - 2184)/504))]
  391. end
  392. elseif salocatnow <= 7:
  393. $body = $bodimgsets[((bodset * 10) + salocatnow)]
  394. else
  395. $body = $bodimgsets[((bodset * 10) + 7)]
  396. end
  397. end
  398. if $ARGS[0] = 'CalcBMI':
  399. result = 10000 * (30 + salo / 2 + (pcs_hgt - 170) * 7 / 10) / (pcs_hgt * pcs_hgt)
  400. end
  401. if $ARGS[0] = 'SkinGain':
  402. if $ARGS[1] = 'CleanSelf' and lastShowerSkinGain ! daystart:
  403. lastShowerSkinGain = daystart
  404. skinDailyGain += 5
  405. !!needs to be changet to +3 when the bathLuffa in added.
  406. !!if bathLuffa = 1: skinDailyGain += 2
  407. end
  408. if $ARGS[1] = 'Moisturizer':
  409. moisturizerDailyCount += 1
  410. if moisturizerDailyCount <= 2: skinDailyGain += 2
  411. end
  412. end
  413. if $ARGS[0] = 'SkinLoss':
  414. if $ARGS[1] = 'Smoke' and lastSmokeSkinPenalty ! daystart:
  415. lastSmokeSkinPenalty = daystart
  416. skinDailyPenalty += 1
  417. end
  418. if $ARGs[1] = 'MakeUpSleep':
  419. skinDailyPenalty += 10
  420. end
  421. end
  422. if $ARGS[0] = 'softreset':
  423. !!This is for use in immediately updating shape if something has caused a large change in salo, primarily fat burners and plastic surgery
  424. sftrstflag = 1
  425. :resetloop
  426. if salo ! salolast:
  427. if gmstrtflag = 1: salobustdo = 1
  428. gs 'body'
  429. jump 'resetloop'
  430. end
  431. !!Updates pcs_apprncbase after a reset
  432. gs 'AppearanceSystem', 'UpdateBaseAppearnce'
  433. !!Clears the warning and reset status flags if they were set
  434. sftrstflag = 0
  435. btwarn = 0
  436. end
  437. if $ARGS[0] = 'hardreset':
  438. !!This is primarily for canceling out "dounspell" and setting salo to whatever value will result in the current hip size then balancing everything out.
  439. !!Also could be built in as a means to in-game undo "dounspell", other than the cheat.
  440. if dounspell = 1 and dounsplkil > 0:
  441. salo = 12
  442. fat = 0
  443. agilbuf = pcs_agil & strenbuf = pcs_stren & vitalbuf = pcs_vital
  444. salobustdo = 1 & sftrstflag = 1 & normbuffpick = -1
  445. gs 'body'
  446. salo = (pcs_hips * 2) - ((pcs_hgt * hratio) / 50) + 80
  447. if salo < 10:
  448. salocatnow = 0
  449. else
  450. salocatnow = 1 + (salo - 10) / 20
  451. end
  452. salocatlast = salocatnow
  453. salolast = salo
  454. vhtmp = (salo - 80) / 2
  455. vhips = vhtmp
  456. if genbsize = 0 and nbsize > 0:
  457. If nbsize >= 27:
  458. genbsize = 27
  459. else
  460. genbsize = 2 + nbsize - nbsize mod 5
  461. end
  462. elseif genbsize = 0 and nbsize = 0 and silicone >= 20:
  463. genbsize = 12 & nbsize = 12 & silicone -= 10
  464. end
  465. sftrstflag = 0 & normbuffpick = 0 & btwarn = 0 & magf2bdo = 0
  466. killvar 'dounsplkil'
  467. newbdsp = 1
  468. dounspell = 0
  469. gs 'AppearanceSystem', 'UpdateBaseAppearnce'
  470. gs 'body'
  471. gs 'stat'
  472. else
  473. '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.'
  474. end
  475. end
  476. if $ARGS[0] = 'initial':
  477. !! Sets the genetic bust size if it was not set in the start routines
  478. if genbsize = 0:
  479. genbsize = 12 & nbsize = 12
  480. else
  481. nbsize = genbsize
  482. end
  483. agilbuf = pcs_agil & strenbuf = pcs_stren & vitalbuf = pcs_vital
  484. normbuffpick = -1 & gmstrtflag = 1
  485. !! Calling soft reset will cause the main code to cycle up to the starting value of salo
  486. gs 'body', 'softreset'
  487. !! This sets/resets the controler variables
  488. salocatlast = salocatnow
  489. normbuffpick = 0 & magf2bdo = 0
  490. killvar 'gmstrtflag'
  491. newbdsp = 1
  492. !! This does all the body shape setting before the first stat call
  493. gs 'body', 'UpdateBodyMeasurement'
  494. pcs_weight = func($this, 'CalcWeight')
  495. pcs_bmi = func($this, 'CalcBMI')
  496. gs 'body', 'UpdateBodyImage'
  497. gs 'body_desc', 'BMI'
  498. end
  499. --- body ---------------------------------