body.qsrc 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  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 > 900: pcs_skin = 900
  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 hscrunch > 0:
  107. hscrunchrand = rand(1, 100)
  108. if hscrunchrand <= 8:hscrunch -= 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 <= 200:
  122. pcs_skin += min(skinDailyGain * 2, 20) - skinDailyPenalty - 1
  123. elseif pcs_skin <= 400:
  124. pcs_skin += min(skinDailyGain, 10) - skinDailyPenalty - 1
  125. elseif pcs_skin <= 600:
  126. pcs_skin += min(skinDailyGain/2, 5) - skinDailyPenalty - 1
  127. elseif pcs_skin <= 800:
  128. pcs_skin += min(skinDailyGain/3, 3) - skinDailyPenalty - 1
  129. elseif pcs_skin <= 900:
  130. pcs_skin += min(skinDailyGain/5, 2) - skinDailyPenalty - 1
  131. end
  132. !skin variable reset
  133. killvar 'moisturizerDailyCount'
  134. killvar 'skinDailyGain'
  135. killvar 'skinDailyPenalty'
  136. end
  137. if $ARGS[0] = '':
  138. !!This controls the gradual change in stat to -buf
  139. if strenbuf > pcs_stren: strenbuf -= 1
  140. if strenbuf < pcs_stren: strenbuf += 1
  141. if vitalbuf > pcs_vital: vitalbuf -= 1
  142. if vitalbuf < pcs_vital: vitalbuf += 1
  143. if agilbuf > pcs_agil: agilbuf -= 1
  144. if agilbuf < pcs_agil: agilbuf += 1
  145. !!All the ratios were rounded to 2 digits and there are divide 100s at the final calc points
  146. !!Waist to hip ratio
  147. wrtemp = ((2 * vitalbuf + strenbuf + agilbuf) /4)
  148. !! Primary wratio handling
  149. if wrtemp < 11:
  150. wratio = 85 + (11 - (vitalbuf + strenbuf + agilbuf)/3)
  151. elseif wrtemp < 20:
  152. wratio = 85
  153. elseif wrtemp < 35:
  154. wratio = 85 - (wrtemp - 20) / 3
  155. elseif wrtemp < 55:
  156. wratio = 80 - (wrtemp - 35) / 4
  157. elseif wrtemp < 80:
  158. wratio = 75 - (wrtemp - 55) / 5
  159. elseif wrtemp >= 80:
  160. wratio = 70
  161. end
  162. !! High stat value edge case handling
  163. if (vitalbuf + strenbuf + agilbuf) /3 > 100: wratio -= ((vitalbuf + strenbuf)/2 - agilbuf)/5
  164. !! This is the oops and high stat gone overboard handling
  165. if wratio < 65: wratio = 65
  166. killvar 'wrtemp'
  167. !!For band to waist ratio
  168. brtemp = (2 * strenbuf + vitalbuf + agilbuf) /4
  169. if brtemp < 10:
  170. bratio = 105
  171. elseif brtemp =< 23:
  172. bratio = 106
  173. elseif brtemp =< 80:
  174. bratio = 106 + (brtemp - 23) / 3
  175. else
  176. bratio = 125
  177. end
  178. killvar 'brtemp'
  179. !!For hip to height ratio which is used to set the center point
  180. hrtemp = (2 * agilbuf + vitalbuf + strenbuf) /4
  181. if hrtemp < 35:
  182. hratio = 60
  183. elseif hrtemp < 45:
  184. hratio = 59
  185. elseif hrtemp < 60:
  186. hratio = 58
  187. elseif hrtemp < 80:
  188. hratio = 57
  189. else
  190. hratio = 56
  191. end
  192. killvar 'hrtemp'
  193. !!Salo Handling; the first part is because during a reset fat is not used and should be cleared
  194. if sftrstflag = 1 or cheatNoFat = 1:
  195. fat = 0
  196. else
  197. if fat > (17 + vitalbuf / 25): salo += 1 & fat = 0
  198. if fat < (-2 - (vitalbuf / 10)): salo -= 1 & fat = 0
  199. end
  200. !!This is the salo cap for the weight approximation
  201. if salo > 250: salo = 250
  202. !!This calculates the current salo category; ranges are 20 points, seemed to balance best if the range is x10 the hip devisor
  203. :salocatloop
  204. if salo < 10:
  205. salocatnow = 0
  206. else
  207. salocatnow = 1 + (salo - 10) / 20
  208. end
  209. !!This resets the genetic bust size (genbsize) when the cheat is used to reduce breast size (maybe other things later)
  210. if titreduc = 1:
  211. killvar 'titreduc'
  212. if genbsize > nbsize:
  213. genbsize = 2 + nbsize - nbsize mod 5
  214. end
  215. end
  216. !!This controls the movement of salo to/from bust in order of precedence
  217. if salobustdo = 0 and nbsize < genbsize and salocatnow > 2:
  218. if sftrstflag = 0:'<b>Your breasts seem fuller.</b>'
  219. nbsize += 1
  220. salo -= 3
  221. salobustdo = 1
  222. jump 'salocatloop'
  223. end
  224. if salobustdo = 0 and magf2bdo = 1 and salocatnow > salocatlast and pcs_mana >= manamax / 2 and magikDostup = 0:
  225. if sftrstflag = 0:'<b>Your breasts seem fuller.</b>'
  226. magicf2b += 1
  227. salo -= 3
  228. salobustdo = 1
  229. if magicf2b >= 2 + magtarcup * 5: magf2bdo = 0
  230. if pcs_magik < 20:
  231. pcs_mana -= 2000 / pcs_magik
  232. else
  233. mana -= 100
  234. end
  235. jump 'salocatloop'
  236. end
  237. if salobustdo = 0 and salocatnow < 2 and salocatlast >= 2 and magicf2b > 0 and magikDostup = 0:
  238. if sftrstflag = 0:'<b>Your breasts seem to be getting smaller.</b>'
  239. magicf2b -= 1
  240. salo += 3
  241. salobustdo = 1
  242. magf2bdo = 1
  243. jump 'salocatloop'
  244. end
  245. if salobustdo = 0 and salocatnow < 1 and salocatlast >= 1 and nbsize > 0:
  246. if sftrstflag = 0:'<b>Your breasts seem to be getting smaller.</b>'
  247. nbsize -= 1
  248. salo += 3
  249. salobustdo = 1
  250. jump 'salocatloop'
  251. end
  252. !!This is if a Succubus has salo < 1
  253. if succubusflag = 1 and salo < 1:
  254. sucexcess -= 1
  255. salo += 3
  256. end
  257. !!This is if salo is still < 1
  258. if salo < 1:
  259. if fat >= 1:
  260. salo = 1
  261. fat -= 1
  262. elseif fat <= 0 and pcs_stren + pcs_vital > 0:
  263. stren_deg -= 1000
  264. vital_deg -= 1000
  265. salo = 1
  266. else
  267. if Enable_nogameover = 0:
  268. over = 3
  269. gt 'gameover'
  270. exit
  271. else
  272. pl '<font color=red><B>You starved to death, but Cheat Mode keeps you Alive.</B></font>'
  273. salo = 1
  274. end
  275. end
  276. end
  277. killvar 'tempvct' & killvar 'salobustdo'
  278. !!This is the hip calcs, 80 is the center of the current max-min range (10 - 130)
  279. vhtmp = (salo - 80) / 2
  280. if vhips > vhtmp: vhips -= 1
  281. if vhips < vhtmp: vhips += 1
  282. !! Because a reset should be updating hip size instantly (this set is a bit redundant anyway)
  283. if sftrstflag = 1: vhips = vhtmp
  284. if (pcs_hgt * hratio) / 100 + vhips > (pcs_hgt * 72) / 100:
  285. vofat = ((pcs_hgt * hratio) / 100 + vhips - (pcs_hgt * 72) / 100) / 2
  286. vhips -= vofat * 2
  287. end
  288. !!This will trigger the warning notices in the bathing code (the +/- 12 should always be +/- 11 + the max change to salo w/ fat)
  289. if salolast > salo and salo <= 12 + (20 * (salocatnow - 1)): btwarn = 1
  290. if salolast < salo and salo >= (20 * (salocatnow + 1)) - 12: btwarn = 2
  291. !!This will trigger the dream for the option to use magic to increase bust
  292. !!Three nos at the dream will lock it out (1 yes resets the count)
  293. if pcs_magik >= 5 and MagikDostup = 0 and magf2bdo = 0:
  294. if salolast < salo and salo >= (20 * (salocatnow + 1)) - 11 and tits < 10:
  295. if mgf2bnocnt < 3:
  296. magf2bdo = 2
  297. else
  298. magf2bdo = 3 & killvar 'mgf2bnocnt'
  299. end
  300. end
  301. end
  302. !!This is to deal with the possibility that salocatnow changed by more than 1 (fat burners, vitamins, plastic surgery, etc.)
  303. if salocatnow < salocatlast: salocatlast -= 1
  304. if salocatnow > salocatlast: salocatlast += 1
  305. !!This is for use in the warning code and as part of the reset routines
  306. if salolast > salo: salolast -= 1
  307. if salolast < salo: salolast += 1
  308. !!Setting the pcs_apprnc bonus based on fat and strength
  309. pcs_bmi = FUNC($this, 'CalcBMI')
  310. !!This is to clean up unused variables
  311. killvar 'normbuffpick' & killvar 'nrmbfpckct'
  312. killvar 'vmeat' & killvar 'vfat' & killvar 'Kves' & killvar 'krost'
  313. killvar 'koefvesbt' & killvar 'koefbt'
  314. end
  315. if $ARGS[0] = 'UpdateBodyMeasurement':
  316. pcs_hips = (pcs_hgt * hratio) / 100 + vhips
  317. pcs_waist = (pcs_hips * wratio) / 100 + vofat
  318. pcs_band = (pcs_waist * bratio) / 100 + vofat
  319. pcs_bust = (pcs_waist * bratio) / 100 + nbsize + magicf2b + silicone
  320. pcs_butt = (pcs_hips / 10) + silicone_butt + butt_cheat
  321. pcs_cupsize = pcs_bust - pcs_band
  322. ! Update tits size
  323. if pcs_cupsize <= 5:
  324. tits = 0
  325. $titsize = 'AA cup'
  326. elseif pcs_cupsize <= 10:
  327. tits = 1
  328. $titsize = 'A cup'
  329. elseif pcs_cupsize <= 15:
  330. tits = 2
  331. $titsize = 'B cup'
  332. elseif pcs_cupsize <= 20:
  333. tits = 3
  334. $titsize = 'C cup'
  335. elseif pcs_cupsize <= 25:
  336. tits = 4
  337. $titsize = 'D cup'
  338. elseif pcs_cupsize <= 30:
  339. tits = 5
  340. $titsize = 'E cup'
  341. elseif pcs_cupsize <= 35:
  342. tits = 6
  343. $titsize = 'F cup'
  344. elseif pcs_cupsize <= 40:
  345. tits = 7
  346. $titsize = 'G cup'
  347. elseif pcs_cupsize <= 45:
  348. tits = 8
  349. $titsize = 'H cup'
  350. elseif pcs_cupsize <= 50:
  351. tits = 9
  352. $titsize = 'I cup'
  353. elseif pcs_cupsize <= 55:
  354. tits = 10
  355. $titsize = 'J cup'
  356. else
  357. tits = 11
  358. $titsize = 'K cup'
  359. end
  360. end
  361. if $ARGS[0] = 'CalcWeight':
  362. !{pcs_weight: Svetas weight in kg
  363. Optimal Weight (170cm): 60kg, 60 salo
  364. This is an approximation, so that a sveta with a different height has the same BMI for the same salo values.
  365. 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.}
  366. result = 30 + salo / 2 + (pcs_hgt - 170) * 7 / 10
  367. !{Do not remove (julzor)
  368. This is the old more complex function, but it doesn''t work correctly.
  369. 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.
  370. 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}
  371. !result = (pcs_hgt * 62 / 170) + (vhips + (vofat * 2)) / 4 + tits
  372. end
  373. if $ARGS[0] = 'UpdateBodyImage':
  374. !Update body image set
  375. if dounspell = 1:
  376. salocatnow = (pcs_hips / 10) - 5
  377. if bdsetlock = 0:
  378. if (knowpreg = 1 or (preg = 1 and thinkpreg = 1) or (preg = 1 and PregChem > 3600)):
  379. bodset = 3
  380. elseif strenbuf >= 70:
  381. bodset = 2
  382. elseif strenbuf <= 40:
  383. bodset = 0
  384. else
  385. bodset = 1
  386. end
  387. else
  388. bodset = fixbodset
  389. end
  390. elseif (knowpreg = 1 or (preg = 1 and thinkpreg = 1) or (preg = 1 and PregChem > 3600)) and bodet ! 3 and bdsetlock = 0:
  391. bodset = 3
  392. elseif preg = 0 and bdsetlock = 0:
  393. if strenbuf >= 70:
  394. bodset = 2
  395. elseif strenbuf <= 40:
  396. bodset = 0
  397. else
  398. bodset = 1
  399. end
  400. end
  401. ! Update body description
  402. if (knowpreg = 1 or (preg = 1 and thinkpreg = 1) or (preg = 1 and PregChem > 3600)) and bodset = 3:
  403. if PregChem > 6216:
  404. $body = $bodimgsets[((bodset * 10) + 8)]
  405. elseif PregChem < 2688:
  406. $body = $bodimgsets[(bodset * 10)]
  407. else
  408. $body = $bodimgsets[((bodset * 10)+((PregChem - 2184)/504))]
  409. end
  410. elseif salocatnow <= 7:
  411. $body = $bodimgsets[((bodset * 10) + salocatnow)]
  412. else
  413. $body = $bodimgsets[((bodset * 10) + 7)]
  414. end
  415. end
  416. if $ARGS[0] = 'CalcBMI':
  417. result = 10000 * (30 + salo / 2 + (pcs_hgt - 170) * 7 / 10) / (pcs_hgt * pcs_hgt)
  418. end
  419. if $ARGS[0] = 'SkinGain':
  420. if $ARGS[1] = 'CleanSelf' and lastShowerSkinGain ! daystart:
  421. lastShowerSkinGain = daystart
  422. skinDailyGain += 5
  423. if bathLuffa = 1: skinDailyGain += 3
  424. end
  425. if $ARGS[1] = 'Moisturizer':
  426. moisturizerDailyCount += 1
  427. if moisturizerDailyCount <= 2: skinDailyGain += 3
  428. end
  429. end
  430. if $ARGS[0] = 'SkinLoss':
  431. if $ARGS[1] = 'Smoke' and lastSmokeSkinPenalty ! daystart:
  432. lastSmokeSkinPenalty = daystart
  433. skinDailyPenalty += 1
  434. end
  435. if $ARGs[1] = 'MakeUpSleep':
  436. skinDailyPenalty += 10
  437. end
  438. end
  439. if $ARGS[0] = 'softreset':
  440. !!This is for use in immediately updating shape if something has caused a large change in salo, primarily fat burners and plastic surgery
  441. sftrstflag = 1
  442. :resetloop
  443. if salo ! salolast:
  444. if gmstrtflag = 1: salobustdo = 1
  445. gs 'body'
  446. jump 'resetloop'
  447. end
  448. !!Updates pcs_apprncbase after a reset
  449. gs 'AppearanceSystem', 'UpdateBaseAppearnce'
  450. !!Clears the warning and reset status flags if they were set
  451. sftrstflag = 0
  452. btwarn = 0
  453. end
  454. if $ARGS[0] = 'hardreset':
  455. !!This is primarily for canceling out "dounspell" and setting salo to whatever value will result in the current hip size then balancing everything out.
  456. !!Also could be built in as a means to in-game undo "dounspell", other than the cheat.
  457. if dounspell = 1 and dounsplkil > 0:
  458. salo = 12
  459. fat = 0
  460. agilbuf = pcs_agil & strenbuf = pcs_stren & vitalbuf = pcs_vital
  461. salobustdo = 1 & sftrstflag = 1 & normbuffpick = -1
  462. gs 'body'
  463. salo = (pcs_hips * 2) - ((pcs_hgt * hratio) / 50) + 80
  464. if salo < 10:
  465. salocatnow = 0
  466. else
  467. salocatnow = 1 + (salo - 10) / 20
  468. end
  469. salocatlast = salocatnow
  470. salolast = salo
  471. vhtmp = (salo - 80) / 2
  472. vhips = vhtmp
  473. if genbsize = 0 and nbsize > 0:
  474. If nbsize >= 27:
  475. genbsize = 27
  476. else
  477. genbsize = 2 + nbsize - nbsize mod 5
  478. end
  479. elseif genbsize = 0 and nbsize = 0 and silicone >= 20:
  480. genbsize = 12 & nbsize = 12 & silicone -= 10
  481. end
  482. sftrstflag = 0 & normbuffpick = 0 & btwarn = 0 & magf2bdo = 0
  483. killvar 'dounsplkil'
  484. newbdsp = 1
  485. dounspell = 0
  486. gs 'AppearanceSystem', 'UpdateBaseAppearnce'
  487. gs 'body'
  488. gs 'stat'
  489. else
  490. '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.'
  491. end
  492. end
  493. if $ARGS[0] = 'initial':
  494. !! Sets the genetic bust size if it was not set in the start routines
  495. if genbsize = 0:
  496. genbsize = 12 & nbsize = 12
  497. else
  498. nbsize = genbsize
  499. end
  500. agilbuf = pcs_agil & strenbuf = pcs_stren & vitalbuf = pcs_vital
  501. normbuffpick = -1 & gmstrtflag = 1
  502. !! Calling soft reset will cause the main code to cycle up to the starting value of salo
  503. gs 'body', 'softreset'
  504. !! This sets/resets the controler variables
  505. salocatlast = salocatnow
  506. normbuffpick = 0 & magf2bdo = 0
  507. killvar 'gmstrtflag'
  508. newbdsp = 1
  509. !! This does all the body shape setting before the first stat call
  510. gs 'body', 'UpdateBodyMeasurement'
  511. pcs_weight = func($this, 'CalcWeight')
  512. pcs_bmi = func($this, 'CalcBMI')
  513. gs 'body', 'UpdateBodyImage'
  514. gs 'body_desc', 'BMI'
  515. end
  516. --- body ---------------------------------