body.qsrc 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. # body
  2. !! I have gone through and added a new category of string variables, standardised to be used for descriptive writing. You will notice some duplication here -- this is for purposes of backwards compatibility, as if I completely rename and discard some of these strings,
  3. !! extant saved games will irreparably break, and this would be Bad. One day down the line, most of the duplicated variables here can be culled, when there is a new release that warrants new saves being used, but until then the duplication needs to stay. Use of
  4. !! strings for descriptions that do not begin with $pcdesc_ should be avoided, as it would be best to have everything standardised when moving forward into the present and future.
  5. !! Available strings follow this format: $pcdesc_type, $pcdesc_typewordy, and $pcdesc_typerandom. The last will give a new string each time, to allow for repeatedly referencing something accurately without it becoming repetitive. Not EVERYTHING has a wordy
  6. !! or even random variation, but these should work regardless -- they just may use a non-wordy, or non-random version, if it is something that does not really warrant such.
  7. !! There is also a special string, $pcdesc_typeinsertive, that follows the format " , descriptive text" as in, " , invitingly-glossed". Please check the master string document to see if this exists for the string you need. - xerya, July 2017
  8. if $ARGS[0] = '':
  9. !!!!!!!!!!!!!!!!
  10. !!!!!SIZE AND WEIGHT!!!
  11. !!!!!!!!!!!!!!!!
  12. if dounspell = 0:
  13. pcs_hips = (pcs_hgt * hratio) / 100 + vhips
  14. pcs_waist = (pcs_hips * wratio) / 100 + vofat
  15. pcs_band = (pcs_waist * bratio) / 100 + vofat
  16. pcs_bust = (pcs_waist * bratio) / 100 + nbsize + magicf2b + silicone
  17. pcs_butt = (pcs_hips / 10) + silicone_butt + butt_cheat
  18. pcs_cupsize = pcs_bust - pcs_band
  19. !!pcs_weight: Svetas weight in kg
  20. !!Optimal Weight (170cm): 60kg, 60 salo
  21. !!This is an approximation, so that a sveta with a different height has the same BMI for the same salo values.
  22. !!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.
  23. pcs_weight = 30 + salo / 2 + (pcs_hgt - 170) * 7 / 10
  24. !!Do not remove (julzor)
  25. !!This is the old more complex function, but it doesn''t work correctly.
  26. !!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.
  27. !!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
  28. !!pcs_weight = (pcs_hgt * 62 / 170) + (vhips + (vofat * 2)) / 4 + tits
  29. !!BMI Calculation
  30. pcs_bmi = FUNC('body_shape', 'bmicalc', salo, pcs_hgt)
  31. end
  32. gs 'body_desc'
  33. !! Skin1 is only used in the foto location, and can be replaced at a later date. From here on out, do not use it.
  34. if pcs_skin > 100:
  35. pcs_skin = 100
  36. elseif pcs_skin < 0:
  37. pcs_skin = 0
  38. end
  39. mopkoef = pcs_makupskl / 5
  40. if pcs_makeup = 0: mopkoef = -5
  41. if pcs_makeup = 1: mopkoef = 0
  42. if pcs_makeup = 5: mopkoef = 30
  43. if pcs_makeup = 6 and bimbolevel >= 2: extra_supnatvnesh = 2*bimbolevel - 2
  44. if dounspell = 1:
  45. bodytipe = pcs_hips - pcs_waist
  46. if bodytipe < 20:
  47. bodykoef = 0
  48. elseif bodytipe >= 20 and bodytipe < 25:
  49. bodykoef = 2
  50. elseif bodytipe >= 25 and bodytipe < 30:
  51. bodykoef = 4
  52. elseif bodytipe >= 30 and bodytipe < 35:
  53. bodykoef = 8
  54. elseif bodytipe >= 35:
  55. bodykoef = 4
  56. end
  57. end
  58. !!This is to force a base update if teeth changed since that is immediate
  59. if zublast ! pcs_teeth:
  60. gs 'body_shape', 'basebeautycalc', 1
  61. zublast = pcs_teeth
  62. end
  63. !! Calculate hotcat etc
  64. tempclothingbonus = FUNC('body', 'calcClothesBonus', PXCloThinness, PXCloTopCut, PXCloBottomShortness, PCloQuality, $clothingworntype, pcs_bmi)
  65. tempAccessoriesBonus = FUNC('body', 'calcAccessoriesBonus', bonusZ, PShoQuality, $pantyworntype, $braworntype)
  66. tempGroomingBonus = FUNC('body', 'calcGroomingBonus', pcs_lipbalm, mopkoef, pcs_hairbsh, pcs_breath, deodorant_on, pcs_bmi)
  67. tempGroomingPenalty = FUNC('body', 'calcGroomingPenalty', pcs_hairlng, pcs_sweat, glassvnesh, dyevmod, legkoef)
  68. Hotcat = FUNC('body', 'calcHotcat', pcs_apprncbase, (supnatvnesh + extra_supnatvnesh), tempclothingbonus, tempAccessoriesBonus, tempGroomingBonus, tempGroomingPenalty)
  69. pcs_apprnc = temppcs_apprnc & killvar 'temppcs_apprnc' & killvar 'temppcs_maxapprnc'
  70. if StrongNarkota <= 0:
  71. if SNarkTimes >= 3 and SLomka = 0:SLomka = 1
  72. if Gerpes >= 3 or Sifilis >= 21 or Triper > 2:pcs_apprnc = -10
  73. end
  74. if amphCount > 3 and amphHigh <= 0:
  75. addictChance = rand(1,10)
  76. if addictChance > 8:
  77. amphWithdrawl = 2
  78. end
  79. end
  80. if StrongNarkota > 0:
  81. if SLomka > 0:SLomka = 0
  82. pcs_mood = 100
  83. end
  84. if pcs_apprnc = -10:
  85. $pcs_apprnc = 'Your looks are even worse than terrible. It''s god-awful. No one wants to see or talk to you and people avoid you at any cost.'
  86. elseif pcs_apprnc < 20:
  87. $pcs_apprnc = 'Your looks are terrible. People try to avoid looking and talking to you.'
  88. elseif pcs_apprnc < 60:
  89. $pcs_apprnc = 'You''re a wallflower. Hardly anyone notices you.'
  90. elseif pcs_apprnc < 120:
  91. $pcs_apprnc = 'You have good looks. Men and women check you out when they think you aren''t looking.'
  92. elseif pcs_apprnc < 160:
  93. $pcs_apprnc = 'You''re unquestionably gorgeous. Men constantly get caught staring at you by their girlfriends.'
  94. elseif pcs_apprnc < 200:
  95. $pcs_apprnc = 'You have a simply stunning appearance. Other girls are a bit jealous and guys constantly check you out.'
  96. else
  97. $pcs_apprnc = 'Your appearance is divine! No one is able to take his or her eyes off of you.'
  98. end
  99. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  100. !!!!!!!!BODY
  101. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  102. if dounspell = 1:
  103. salocatnow = (pcs_hips / 10) - 5
  104. if bdsetlock = 0:
  105. if (knowpreg = 1 or (preg = 1 and thinkpreg = 1) or (preg = 1 and PregChem > 3600)):
  106. bodset = 3
  107. elseif strenbuf >= 70:
  108. bodset = 2
  109. elseif strenbuf <= 40:
  110. bodset = 0
  111. else
  112. bodset = 1
  113. end
  114. else
  115. bodset = fixbodset
  116. end
  117. elseif (knowpreg = 1 or (preg = 1 and thinkpreg = 1) or (preg = 1 and PregChem > 3600)) and bodet ! 3 and bdsetlock = 0:
  118. bodset = 3
  119. elseif preg = 0 and bodset = 3 and bdsetlock = 0:
  120. if strenbuf >= 70:
  121. bodset = 2
  122. elseif strenbuf <= 40:
  123. bodset = 0
  124. else
  125. bodset = 1
  126. end
  127. end
  128. if (knowpreg = 1 or (preg = 1 and thinkpreg = 1) or (preg = 1 and PregChem > 3600)) and bodset = 3:
  129. if PregChem > 6216:
  130. $body = $bodimgsets[((bodset * 10) + 8)]
  131. elseif PregChem < 2688:
  132. $body = $bodimgsets[(bodset * 10)]
  133. else
  134. $body = $bodimgsets[((bodset * 10)+((PregChem - 2184)/504))]
  135. end
  136. elseif salocatnow <= 7:
  137. $body = $bodimgsets[((bodset * 10) + salocatnow)]
  138. else
  139. $body = $bodimgsets[((bodset * 10) + 7)]
  140. end
  141. !!Since "musle" is used all over the place
  142. musle = strenbuf
  143. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  144. !! kill temporary variables
  145. killvar 'rand_breasts'
  146. killvar 'rand_hairmess'
  147. killvar 'rand_hairword'
  148. killvar 'rand_bangs'
  149. killvar 'rand_hair'
  150. killvar 'rand_hairstyle'
  151. killvar 'rand_hairobject'
  152. killvar 'rand_hairlength'
  153. killvar 'rand_tongue'
  154. killvar 'rand_eyecol'
  155. killvar 'rand_lashes'
  156. killvar 'rand_vision'
  157. killvar 'rand_eyesize'
  158. killvar 'rand_makeup'
  159. killvar 'rand_legs'
  160. killvar 'rand_clit'
  161. killvar 'rand_pubes'
  162. killvar 'rand_nipples'
  163. killvar 'tempclothingbonus'
  164. killvar 'tempAccessoriesBonus'
  165. killvar 'tempGroomingBonus'
  166. killvar 'tempGroomingPenalty'
  167. end
  168. if $ARGS[0] = 'calcClothesBonus':
  169. !! Note there is a limit of 9 args
  170. tempPXCloThinness = ARGS[1] & !! PXCloThinness
  171. tempPXCloTopCut = ARGS[2] & !! PXCloTopCut
  172. tempPXCloBottomShortness = ARGS[3] & !! PXCloBottomShortness
  173. tempPCloQuality = ARGS[4] & !! PCloQuality
  174. $tempclothingworntype = $ARGS[5] & !!$clothingworntype
  175. temppcs_bmi = ARGS[6] & !! pcs_bmi
  176. if temppcs_bmi < 16:
  177. !!severely underweight
  178. if $tempclothingworntype = 'nude':
  179. tempRevealing = 0
  180. tempPCloQuality = 1
  181. else
  182. tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
  183. tempRevealing = tempRevealing / 2
  184. end
  185. elseif temppcs_bmi >= 16 and temppcs_bmi < 19:
  186. !!underweight
  187. if $tempclothingworntype = 'nude':
  188. tempRevealing = 0
  189. tempPCloQuality = 1
  190. else
  191. tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
  192. tempRevealing = tempRevealing / 2
  193. end
  194. elseif temppcs_bmi >= 19 and temppcs_bmi < 25:
  195. !!normal, healthy weight
  196. if $tempclothingworntype = 'nude':
  197. tempRevealing = 405
  198. tempPCloQuality = 3
  199. else
  200. tempRevealing = tempPXCloThinness + tempPXCloTopCut + tempPXCloBottomShortness
  201. tempRevealing = tempRevealing / 2
  202. end
  203. elseif temppcs_bmi >= 25 and temppcs_bmi < 30:
  204. !!overweight
  205. if $tempclothingworntype = 'nude':
  206. tempRevealing = 405
  207. tempPCloQuality = 3
  208. else
  209. tempRevealing = tempPXCloThinness + tempPXCloTopCut + tempPXCloBottomShortness
  210. tempRevealing = tempRevealing / 2
  211. end
  212. elseif temppcs_bmi >= 30 and temppcs_bmi < 35:
  213. !!moderately obese
  214. if $tempclothingworntype = 'nude':
  215. tempRevealing = 0
  216. tempPCloQuality = 1
  217. else
  218. tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
  219. tempRevealing = tempRevealing * 3 / 4
  220. end
  221. elseif temppcs_bmi >= 35 and temppcs_bmi < 40:
  222. !!severely obese
  223. if $tempclothingworntype = 'nude':
  224. tempRevealing = 0
  225. tempPCloQuality = 1
  226. else
  227. tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
  228. tempRevealing = tempRevealing * 3 / 4
  229. end
  230. elseif temppcs_bmi >= 40 and temppcs_bmi < 45:
  231. !!very severely obese
  232. if $tempclothingworntype = 'nude':
  233. tempRevealing = 0
  234. tempPCloQuality = 1
  235. else
  236. tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
  237. tempRevealing = tempRevealing * 3 / 4
  238. end
  239. elseif temppcs_bmi >= 45:
  240. !!morbidly obese
  241. if $tempclothingworntype = 'nude':
  242. tempRevealing = 0
  243. tempPCloQuality = 1
  244. else
  245. tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
  246. tempRevealing = tempRevealing * 3 / 4
  247. end
  248. end
  249. tempRevealing = tempRevealing / 76
  250. tempCloAdjustedBeauty = tempRevealing * tempPCloQuality
  251. !!if $tempclothingworntype = 'danilovich_outfits': tempCloAdjustedBeauty = tempCloAdjustedBeauty * 2 / 3
  252. result = tempCloAdjustedBeauty
  253. killvar 'tempPXCloThinness'
  254. killvar 'tempPXCloTopCut'
  255. killvar 'tempPXCloBottomShortness'
  256. killvar 'tempPCloQuality'
  257. killvar '$tempclothingworntype'
  258. killvar 'tempRevealing'
  259. killvar 'tempCloAdjustedBeauty'
  260. killvar 'temppcs_bmi'
  261. end
  262. if $ARGS[0] = 'calcAccessoriesBonus':
  263. tempcoatbonus = ARGS[1] & !! bonusZ
  264. tempPShoQuality = ARGS[2] & !! PShoQuality
  265. $temppantyworntype = $ARGS[3] & !! $pantyworntype
  266. $tempbraworntype = $ARGS[4] & !! $braworntype
  267. !!bonuses for certain underwear
  268. if $temppantyworntype = 'boutique':
  269. temppantybounus = 4
  270. elseif $temppantyworntype = 'fashionista':
  271. temppantybounus = 2
  272. end
  273. if $tempbraworntype = 'boutique':
  274. tempbrabounus = 4
  275. elseif $tempbraworntype = 'fashionista':
  276. tempbrabounus = 2
  277. end
  278. tempAccessoriesBonus = tempcoatbonus + tempPShoQuality + temppantybounus + tempbrabounus
  279. result = tempAccessoriesBonus
  280. killvar 'tempcoatbonus'
  281. killvar 'tempPShoQuality'
  282. killvar 'temppantybounus'
  283. killvar 'tempbrabounus'
  284. killvar '$temppantyworntype'
  285. killvar '$tempbraworntype'
  286. killvar 'tempAccessoriesBonus'
  287. end
  288. if $ARGS[0] = 'calcGroomingBonus':
  289. !! Note there is a limit of 9 args
  290. temppcs_lipbalm = ARGS[1] & !! pcs_lipbalm
  291. tempmakeupkoef = ARGS[2] & !! mopkoef
  292. temppcs_hairbsh = ARGS[3] & !! pcs_hairbsh
  293. temppcs_breath = ARGS[4] & !! pcs_breath
  294. tempdeodorant_on = ARGS[5] & !! deodorant_on
  295. temppcs_bmi = ARGS[6] & !! pcs_bmi
  296. if temppcs_lipbalm > 0:
  297. lipbalmKoef = 5
  298. else
  299. lipbalmKoef = 0
  300. end
  301. tempHairBonus = temppcs_hairbsh * 10
  302. tempBreathBonus = temppcs_breath * 5
  303. tempGroomingBonus = tempmakeupkoef + tempHairBonus + lipbalmKoef + tempBreathBonus
  304. !!Small bonus for wearing deodorant, if pcs_sweat is low enough
  305. if tempdeodorant_on = 1 and temppcs_sweat < 20: tempGroomingBonus += 5
  306. tempGroomingBonus = FUNC('body_shape', 'bmiadjust', tempGroomingBonus, temppcs_bmi)
  307. result = tempGroomingBonus
  308. killvar 'temppcs_lipbalm'
  309. killvar 'tempmakeupkoef'
  310. killvar 'temppcs_hairbsh'
  311. killvar 'temppcs_breath'
  312. killvar 'tempdeodorant_on'
  313. killvar 'tempHairBonus'
  314. killvar 'tempBreathBonus'
  315. killvar 'tempGroomingBonus'
  316. !! commented out as not used in the original calc
  317. !!Removed as primary appearance factors; will be eventually used in an NPC preference system instead; tanKoef = suntan
  318. !! if temppcs_tan > 0:
  319. !! tanKoef = 1
  320. !! else
  321. !! tanKoef = 0
  322. !! end
  323. end
  324. if $ARGS[0] = 'calcGroomingPenalty':
  325. temppcs_hairlng = ARGS[1] & !! pcs_hairlng
  326. temppcs_sweat = ARGS[2] & !! pcs_sweat
  327. tempglassvnesh = ARGS[3] & !! glassvnesh
  328. tempdyevmod = ARGS[4] & !! dyevmod
  329. templegkoef = ARGS[5] & !! legkoef
  330. !! buzzcut penalty to pcs_apprnc
  331. if temppcs_hairlng < 10:
  332. hairkoef = 10
  333. else
  334. hairkoef = 0
  335. end
  336. if temppcs_sweat < 22:
  337. sweatKoef = 0
  338. elseif temppcs_sweat < 38:
  339. sweatKoef = (temppcs_sweat - 10) / 4
  340. elseif temppcs_sweat < 54:
  341. sweatKoef = (temppcs_sweat - 10) / 2
  342. else
  343. sweatKoef = 3 * (temppcs_sweat - 10) / 4
  344. end
  345. tempGroomingPenalty = sweatKoef + tempglassvnesh + tempdyevmod + hairkoef + templegkoef
  346. result = tempGroomingPenalty
  347. killvar 'temppcs_hairlng'
  348. killvar 'temppcs_sweat'
  349. killvar 'tempglassvnesh'
  350. killvar 'tempdyevmod'
  351. killvar 'templegkoef'
  352. killvar 'tempGroomingPenalty'
  353. end
  354. if $ARGS[0] = 'calcHotcat':
  355. !!Appearance factors; hairkoef = very short hair / mopkoef = makeup bonus / legkoef = shaved legs / CloAdjustedBeauty = clothes / pcs_hairbsh = Hair brushed / lipbalmKoef = lip balm / pcs_breath = freash breath / sweatKoef = pcs_sweat / glassvnesh = glasses / dyevmod = hair dye fading
  356. !!Moved to base calculation in "body_shape"; bimbobeauty = Bimbo bonus; pcs_lip = lip size; skin = skin condition; pcs_lashes = eyelashes; pcs_eyesize = eyes; bodykoef = hips:waist ratio; pcs_teeth = missing teeth; vidagebonus = youth
  357. temppcs_apprncbase = ARGS[1] & !! pcs_apprncbase
  358. tempsupnatvnesh = ARGS[2] & !! supnatvnesh
  359. tempCloAdjustedBeauty = ARGS[3] & !! result of calcClothesBonus
  360. tempAccessoriesBonus = ARGS[4] & !! result of calcAccessoriesBonus
  361. tempGroomingBonus = ARGS[5] & !! result of calcGroomingBonus
  362. tempGroomingPenalty = ARGS[6] & !! result of calcGroomingPenalty
  363. temppcs_apprnc = temppcs_apprncbase + tempCloAdjustedBeauty + tempAccessoriesBonus + tempGroomingBonus - tempGroomingPenalty
  364. !!adjustment to make max achievable
  365. !!temppcs_maxapprnc = temppcs_apprnc*200/170
  366. temppcs_maxapprnc = temppcs_apprnc
  367. if temppcs_maxapprnc >= 200:
  368. temppcs_apprnc = 200
  369. else
  370. temppcs_apprnc = temppcs_maxapprnc
  371. end
  372. temppcs_apprnc = temppcs_apprnc + tempsupnatvnesh
  373. if temppcs_apprnc < 0: temppcs_apprnc = 0
  374. !!This sets the "hotness catagory" varibale for use in checks
  375. if temppcs_apprnc <= 200:
  376. temphotcat = temppcs_apprnc / 20
  377. else
  378. temphotcat = 10
  379. end
  380. result = tempHotcat
  381. !! do not kill temppcs_apprnc this is used as a second returned variable set pcs_apprnc = temppcs_apprnc and kill temppcs_apprnc after calling it
  382. killvar 'tempsupnatvnesh'
  383. killvar 'temppcs_apprncbase'
  384. killvar 'tempCloAdjustedBeauty'
  385. killvar 'tempGroomingBonus'
  386. killvar 'tempGroomingBonus'
  387. killvar 'tempGroomingPenalty'
  388. end
  389. --- body ---------------------------------