npcgeneratec.qsrc 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. # npcgeneratec
  2. ! {This file expects npctempgsex which is the desired sex of the NPC to be generated, $npctempgn[0], which is the used name of the generated NPC. Rapist or Red Headed Stranger, for example. And npctempgage, which is the approximate age of the NPC in years. Everything is then randomly generated, and you are expected to fix the generated NPC yourself with any special items you need from it after it completes running. So sex, what you call them until they introduce themselves, and age.}
  3. ! The fourth parameters indicates what area the npc''s home is in
  4. !! 1 - Pavlovsk Residential Area
  5. !! 2 - Student dorms in the city
  6. !! 3 - St. Petersburg Residential Area
  7. !! 4 - St. Petersburg City Center
  8. !! {A example to use this would be gs 'npcgeneratec', 0, 'stranger', rand(18,45) which would generate a male with a used name of stranger between 18 and 45.}
  9. npctempgsex = ARGS[0]
  10. $npctempgn[0] = $ARGS[1]
  11. npctempgage = ARGS[2]
  12. temp_location = ARGS[3]
  13. !! {First we set the newly generated index number or overwrite the first blank number}
  14. !! {Checks to see if array 0 in the cleanup list is available for overwrite and makes the overwrite as that if so.}
  15. if mid($cemptyarray[0],1,1) = 'C':
  16. $npclastgenerated = $cemptyarray[0]
  17. killvar '$cemptyarray', 0
  18. else
  19. :npcgencsanityloop
  20. i = 0
  21. $npclastgenerated = 'C' + '<<carraynumber>>'
  22. $npctemparrc = 'C' + '<<(carraynumber)-(1)>>'
  23. if $npc_perstype[$npctemparrc] = '' and carraynumber > 0:
  24. carraynumber -= 1
  25. i = 1
  26. elseif $npc_perstype[$npclastgenerated] = '':
  27. i = 0
  28. else
  29. carraynumber += 1
  30. i = 1
  31. end
  32. if i = 1: jump 'npcgencsanityloop'
  33. end
  34. carraynumber += 1
  35. ! {moved up to here}
  36. npclastgeneratedn = mid($npclastgenerated, 2)
  37. ! {Now we need a random birthday based on the rough age given.}
  38. npctempc1[1] = year - npctempgage
  39. npctempc1[2] = rand(1,12)
  40. if npctempc1[2] = 4 or npctempc1[2] = 6 or npctempc1[2] = 9 or npctempc1[2] = 11:
  41. npctempc1[3] = rand(1,30)
  42. elseif npctempc1[2] = 1 or npctempc1[2] = 3 or npctempc1[2] = 5 or npctempc1[2] = 7 or npctempc1[2] = 8 or npctempc1[2] = 10 or npctempc1[2] = 12:
  43. npctempc1[3] = rand(1,31)
  44. elseif ((npctempc1[1] mod 4 = 0) and (npctempc1[1] mod 100 ! 0)) or (npctempc1[1] mod 400 = 0):
  45. npctempc1[3] = rand(1,29)
  46. else
  47. npctempc1[3] = rand(1,28)
  48. end
  49. npc_dob[$npclastgenerated] = npctempc1[1] * 10000
  50. npc_dob[$npclastgenerated] += (npctempc1[2] * 100)
  51. npc_dob[$npclastgenerated] += npctempc1[3]
  52. ! {we save the unique number of the npc, to be able to get the index of the array via arrpos}
  53. ! {Now, we set the variable for the stat randomization as well as calculate chance of virginity.}
  54. if npctempgage < 18:
  55. npctempc2[0] = 30
  56. npctempc2[1] = rand(0,20)
  57. else
  58. npctempc2[0] = 50
  59. npctempc2[1] = rand(19,24)
  60. end
  61. ! {We flag virginity based on the results of the check. Overwrite it after generation if you want to be sure of status.}
  62. if npctempc2[1] < 20:
  63. npc_sexskill[$npclastgenerated] = 0
  64. end
  65. ! {Then we need to give them a name, and establish their official gender}
  66. if npctempgsex = 0:
  67. ! {Male}
  68. gs 'npcrnamefile', 'rusMale'
  69. gs 'npcgenext', 'dick'
  70. npc_gender[$npclastgenerated] = 0
  71. npc_spermpot[$npclastgenerated] = 10000
  72. $npc_thdick[$npclastgenerated] = $npctempgn[4]
  73. npc_dick[$npclastgenerated] = npctempgn[5]
  74. $npc_notes[$npclastgenerated] = 'A male.'
  75. npc_bust[$npclastgenerated] = 0
  76. elseif npctempgsex = 1:
  77. ! {Female}
  78. gs 'npcrnamefile', 'rusFemale'
  79. npc_gender[$npclastgenerated] = 1
  80. npc_spermpot[$npclastgenerated] = -1
  81. $npc_thdick[$npclastgenerated] = 'clitoris'
  82. npc_dick[$npclastgenerated] = rand(0,1)
  83. $npc_notes[$npclastgenerated] = 'A female.'
  84. !!0 - 60 curve around 22,5 (C/D cups)
  85. npc_bust[$npclastgenerated] = rand(0,15) + rand(0,15) + rand(0,15) & if rand(1,10) = 1: npc_bust[$npclastgenerated] += rand(0,15)
  86. elseif npctempgsex = 2:
  87. ! {HermFemale}
  88. gs 'npcrnamefile', 'rusFemale'
  89. gs 'npcgenext', 'dick'
  90. npc_gender[$npclastgenerated] = 1
  91. npc_spermpot[$npclastgenerated] = -1
  92. $npc_thdick[$npclastgenerated] = 'clitoris'
  93. npc_dick[$npclastgenerated] = npctempgn[5]
  94. $npc_notes[$npclastgenerated] = 'A female Hermaphrodite.'
  95. !!0 - 60 curve around 22,5 (C/D cups)
  96. npc_bust[$npclastgenerated] = rand(0,15) + rand(0,15) + rand(0,15)
  97. else
  98. ! {HermMale}
  99. gs 'npcrnamefile', 'rusMale'
  100. gs 'npcgenext', 'dick'
  101. npc_gender[$npclastgenerated] = 0
  102. npc_spermpot[$npclastgenerated] = 10000
  103. $npc_thdick[$npclastgenerated] = $npctempgn[4]
  104. npc_dick[$npclastgenerated] = npctempgn[5]
  105. $npc_notes[$npclastgenerated] = 'A male Hermaphrodite.'
  106. npc_bust[$npclastgenerated]= rand(0,10)
  107. end
  108. ! {Then we set the names, and the stat high ends as determined earlier.}
  109. gs 'npcrnamefile', 'rusSur'
  110. $npc_firstname[$npclastgenerated] = $npctempgn[1]
  111. $npc_nickname[$npclastgenerated] = $npctempgn[2]
  112. $npc_lastname[$npclastgenerated] = $npctempgn[3]
  113. $npc_usedname[$npclastgenerated] = $npctempgn[0]
  114. npc_intel[$npclastgenerated] = rand(1,npctempc2)
  115. ! {Then we call out other stats}
  116. npc_drunk[$npclastgenerated] = 0
  117. ! {NPCs start with random horniness}
  118. npc_horny[$npclastgenerated] = rand(0,60)
  119. ! {Random attractiveness}
  120. npc_apprnc[$npclastgenerated] = rand(30,60)
  121. ! {Random skin quality and body hair}
  122. npc_height[$npclastgenerated] = 0
  123. ! {Random pubic hair}
  124. npc_haircol[$npclastgenerated] = 0
  125. ! {Starting at 0 quest state and love for the character, and slightly disliked.}
  126. npc_QW[$npclastgenerated]= 0
  127. npc_rel[$npclastgenerated] = 40
  128. npc_love[$npclastgenerated] = 0
  129. ! {Start unemployed and unspecified location}
  130. npc_occupation[$npclastgenerated] = 0
  131. npc_outfit[$npclastgenerated] = 0
  132. ! {Unspecified dad and <<$npc_nickname[''A29'']>>, and picture. We could have a stock group of pictures and have it pick based on certain attribute types, but...}
  133. $npc_pic[$npclastgenerated] = 'xPICx'
  134. ! {STDs are not randomly given here. For characters with a STD, you need to gs npcgenext rstd. It will be expecting an npclastgeneratedn variable.}
  135. npc_herpes[$npclastgenerated] = 0
  136. npc_syth[$npclastgenerated] = 0
  137. npc_gon[$npclastgenerated] = 0
  138. npc_thrush[$npclastgenerated] = 0
  139. npc_sex[$npclastgenerated] = 0
  140. npc_perv[$npclastgenerated] = 0
  141. ! {Personality is called up}
  142. gs 'npcgenext', 'pers'
  143. $npc_perstype[$npclastgenerated] = $npctempgn[6]
  144. ! {Creating the DNA of the character. If it is someone specific, like father, mother, daughter, sone, etc. then should be overwritten.}
  145. $npc_dna[$npclastgenerated] = func('DNA','create')
  146. ! npc_apt_type = 1: student dorm (only available in the city for obvious reasons)
  147. ! npc_apt_type = 2: studio apartment
  148. ! npc_apt_type = 3: one bedroom apartment (or 2 bedroom by UK/european definition, an apartment that has a separate bedroom unlike a studio)
  149. ! npc_apt_type = 4: multi-bedroom apartment with roommates
  150. ! npc_apt_type = 5: multi-bedroom apartment living alone
  151. ! npc_apt_type = 6: high rise apartment (for rich people only)
  152. ! boyfriend attributes
  153. !! temp_location
  154. !! 1 - Pavlovsk Residential Area
  155. !! 2 - Student dorms in the city
  156. !! 3 - St. Petersburg Residential Area
  157. !! 4 - St. Petersburg City Center
  158. npc_residence[$npclastgenerated] = temp_location
  159. if temp_location = 1:
  160. npc_finance[$npclastgenerated] = 0
  161. elseif temp_location = 2:
  162. npc_finance[$npclastgenerated] = 0
  163. elseif temp_location = 3:
  164. npc_finance[$npclastgenerated] = rand(1,2)
  165. elseif temp_location = 4:
  166. npc_finance[$npclastgenerated] = 2
  167. end
  168. if npc_finance[$npclastgenerated] = 0:
  169. if npc_residence[$npclastgenerated] ! 1 and npc_residence[$npclastgenerated] ! 4 and npctempgage < 22:
  170. npc_student[$npclastgenerated] = rand(0,1)
  171. npc_apt_type[$npclastgenerated] = rand(1,4)
  172. elseif npc_residence[$npclastgenerated] = 2:
  173. npc_student[$npclastgenerated] = 1
  174. npc_apt_type[$npclastgenerated] = 2
  175. else
  176. npc_apt_type[$npclastgenerated] = rand(2,4)
  177. end
  178. npc_occupation[$npclastgenerated] = rand(1,7)
  179. elseif npc_finance[$npclastgenerated] = 1:
  180. npc_apt_type[$npclastgenerated] = rand(2,5)
  181. npc_occupation[$npclastgenerated] = rand(7,15)
  182. elseif npc_finance[$npclastgenerated] = 2:
  183. npc_apt_type[$npclastgenerated] = rand(5,6)
  184. npc_occupation[$npclastgenerated] = rand(14,18)
  185. end
  186. ! npc_style determines generally how they dress and what their "persona" is
  187. ! 1 - "normal"
  188. ! 2 - Gopnik
  189. ! 3 - nerdy
  190. ! 4 - sporty
  191. ! 5 - fashionable
  192. ! 6 - businessman
  193. if npc_occupation < 15:
  194. npc_style[$npclastgenerated] = rand(1,5)
  195. else
  196. npc_style[$npclastgenerated] = (rand(2,6) mod 6) + 1
  197. end
  198. if npc_apt_type = 6:
  199. !! high rise
  200. !! this is to determine what their spare room is used for based on their personality type
  201. if npc_style = 3:
  202. npc_apt_spare = 1
  203. elseif npc_style = 2 or npc_style = 4:
  204. npc_apt_spare = 2
  205. else
  206. npc_apt_spare = rand(1,2)
  207. end
  208. if npc_apt_spare = 1:
  209. $npc_apt_spare = 'gaming'
  210. elseif npc_apt_spare = 2:
  211. $npc_apt_spare = 'gym'
  212. end
  213. npc_apt_number[$npclastgenerated] = rand(1,2)
  214. $npc_apt_bedroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/high_rise/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  215. $npc_apt_kitchen[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/high_rise/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  216. $npc_apt_livingroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/high_rise/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  217. $npc_apt_bathroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/high_rise/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  218. $npc_apt_hall[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/high_rise/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  219. elseif npc_apt_type = 4 or npc_apt_type = 5:
  220. !! multi-bedroom
  221. !! npc_apt_type = 4 will one day be living with roommates but for now we''re just making it easy on ourselves. No roommates until later.
  222. !! this is to determine what their spare room is used for based on their personality type
  223. if npc_style = 3:
  224. npc_apt_spare = 1
  225. elseif npc_style = 2 or npc_style = 4:
  226. npc_apt_spare = 2
  227. else
  228. npc_apt_spare = rand(1,2)
  229. end
  230. if npc_apt_spare = 1:
  231. $npc_apt_spare = 'gaming'
  232. elseif npc_apt_spare = 2:
  233. $npc_apt_spare = 'gym'
  234. end
  235. npc_apt_number[$npclastgenerated] = rand(1,2)
  236. $npc_apt_bedroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/multibedroom/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  237. $npc_apt_kitchen[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/multibedroom/<<npc_apt_number[$npclastgenerated]>>/kitchen.jpg"></center>'
  238. $npc_apt_livingroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/multibedroom/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
  239. $npc_apt_bathroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/multibedroom/<<npc_apt_number[$npclastgenerated]>>/bath.jpg"></center>'
  240. $npc_apt_hall[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/multibedroom/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
  241. $npc_apt_spare[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/multibedroom/<<npc_apt_number[$npclastgenerated]>>/<<$npc_apt_spare[$npclastgenerated]>>.jpg"></center>'
  242. elseif npc_apt_type = 3:
  243. !! one bedroom
  244. npc_apt_number[$npclastgenerated] = rand(1,3)
  245. $npc_apt_bedroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  246. $npc_apt_kitchen[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/kitchen.jpg"></center>'
  247. $npc_apt_livingroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
  248. $npc_apt_bathroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/bath.jpg"></center>'
  249. $npc_apt_hall[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
  250. elseif npc_apt_type = 2:
  251. !! studio apartment
  252. npc_apt_number[$npclastgenerated] = rand(1,2)
  253. $npc_apt_bedroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  254. $npc_apt_kitchen[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  255. $npc_apt_livingroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  256. $npc_apt_bathroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  257. $npc_apt_hall[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  258. elseif npc_apt_type = 1:
  259. !! student dorm
  260. npc_apt_number[$npclastgenerated] = rand(1,3)
  261. $npc_apt_bedroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  262. $npc_apt_kitchen[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/kitchen.jpg"></center>'
  263. $npc_apt_livingroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
  264. $npc_apt_bathroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/bath.jpg"></center>'
  265. $npc_apt_hall[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
  266. end
  267. ! if npc_occupation = 1: $npc_occupation = cashier at supermarket
  268. ! if npc_occupation = 2: $npc_occupation = cashier at liquor store
  269. ! if npc_occupation = 3: $npc_occupation = cashier at coffee shop
  270. ! if npc_occupation = 4: $npc_occupation = barista
  271. ! if npc_occupation = 5: $npc_occupation = cheap restaurant job
  272. ! if npc_occupation = 6: $npc_occupation = taxi driver
  273. ! if npc_occupation = 7: $npc_occupation = masseuse
  274. ! if npc_occupation = 8: $npc_occupation = sexual masseuse
  275. ! if npc_occupation = 9: $npc_occupation = factory job
  276. ! if npc_occupation = 10: $npc_occupation = bartender
  277. ! if npc_occupation = 11: $npc_occupation = mechanic
  278. ! if npc_occupation = 12: $npc_occupation = line cook
  279. ! if npc_occupation = 13: $npc_occupation = waiter
  280. ! if npc_occupation = 14: $npc_occupation = personal trainer
  281. ! if npc_occupation = 15: $npc_occupation = programmer
  282. ! if npc_occupation = 16: $npc_occupation = businessman
  283. ! if npc_occupation = 17: $npc_occupation = lawyer
  284. ! if npc_occupation = 18: $npc_occupation = investment banker
  285. npc_humor[$npclastgenerated] = rand(0,3)
  286. !! npc_fav_pos = 1: missionary
  287. !! npc_fav_pos = 2: doggy
  288. !! npc_fav_pos = 3: cowgirl
  289. !! npc_fav_pos = 4: blowjobs
  290. !! npc_fav_pos = 5: titjobs
  291. !! npc_fav_pos = 6: 69
  292. !! npc_fav_pos = 7: anal
  293. npc_fav_pos[$npclastgenerated] = rand(1,7)
  294. npc_tit_pref[$npclastgenerated] = rand(0,3)
  295. npc_style[$npclastgenerated] = rand(1,6)
  296. npc_smoker[$npclastgenerated] = rand(0,2)
  297. ! we will skip addit for now, have a variable just for smoking
  298. !! npc_addit[$npclastgenerated] = rand(0,1)
  299. npc_doors[$npclastgenerated] = rand(0,2)
  300. npc_goal[$npclastgenerated] = rand(1,3)
  301. npc_fidelity[$npclastgenerated] = rand(1,10)
  302. npc_lover_days[$npclastgenerated] = 0
  303. npc_lover_keys[$npclastgenerated] = 0
  304. npc_residence[$npclastgenerated] = temp_location
  305. !! traits
  306. if rand(0,2) > 0:
  307. if rand(0,1) = 1:
  308. npc_earlyriser[$npclastgenerated] = 1
  309. else
  310. npc_latesleeper[$npclastgenerated] = 1
  311. end
  312. end
  313. if rand(0,2) > 0:
  314. if rand(0,1) = 1:
  315. npc_generous[$npclastgenerated] = 1
  316. else
  317. npc_selfish[$npclastgenerated] = 1
  318. end
  319. end
  320. npc_argumentative[$npclastgenerated] = rand(0,2)
  321. npc_competitive[$npclastgenerated] = rand(0,2)
  322. npc_insecure[$npclastgenerated] = rand(0,2)
  323. npc_condom_conscious[$npclastgenerated] = rand(0,1)
  324. npc_childfree[$npclastgenerated] = rand(0,2)
  325. npc_abusive[$npclastgenerated] = rand(0,2)
  326. npc_sexdrive[$npclastgenerated] = rand(1,10)
  327. ! {Variables are cleaned up.}
  328. killvar '$npctempgn'
  329. killvar 'npctempc1'
  330. killvar 'npctempc2'
  331. killvar 'npctempgsex'
  332. killvar '$npctempgn'
  333. killvar 'npctempgage'
  334. killvar '$npctemparrc'
  335. killvar 'temp_location'
  336. --- npcgeneratec ---------------------------------