npcgeneratec.qsrc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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. ! {Chemestry and clothing preference are unspecified}
  140. npc_style[$npclastgenerated] = 0
  141. npc_sex[$npclastgenerated] = 0
  142. npc_perv[$npclastgenerated] = 0
  143. ! {Personality is called up}
  144. gs 'npcgenext', 'pers'
  145. $npc_perstype[$npclastgenerated] = $npctempgn[6]
  146. ! {Creating the DNA of the character. If it is someone specific, like father, mother, daughter, sone, etc. then should be overwritten.}
  147. $npc_dna[$npclastgenerated] = func('DNA','create')
  148. ! npc_apt_type = 1: student dorm (only available in the city for obvious reasons)
  149. ! npc_apt_type = 2: studio apartment
  150. ! npc_apt_type = 3: one bedroom apartment (or 2 bedroom by UK/european definition, an apartment that has a separate bedroom unlike a studio)
  151. ! npc_apt_type = 4: multi-bedroom apartment with roommates
  152. ! npc_apt_type = 5: multi-bedroom apartment living alone
  153. ! npc_apt_type = 6: high rise apartment (for rich people only)
  154. ! boyfriend attributes
  155. !! temp_location
  156. !! 1 - Pavlovsk Residential Area
  157. !! 2 - Student dorms in the city
  158. !! 3 - St. Petersburg Residential Area
  159. !! 4 - St. Petersburg City Center
  160. npc_residence[$npclastgenerated] = temp_location
  161. if temp_location = 1:
  162. npc_finance[$npclastgenerated] = 0
  163. elseif temp_location = 2:
  164. npc_finance[$npclastgenerated] = 0
  165. elseif temp_location = 3:
  166. npc_finance[$npclastgenerated] = rand(1,2)
  167. elseif temp_location = 4:
  168. npc_finance[$npclastgenerated] = 2
  169. end
  170. if npc_finance[$npclastgenerated] = 0:
  171. if npc_residence[$npclastgenerated] ! 0 and npctempgage < 22:
  172. npc_student = rand(0,1)
  173. npc_apt_type[$npclastgenerated] = rand(1,4)
  174. else
  175. npc_apt_type[$npclastgenerated] = rand(2,4)
  176. end
  177. npc_occupation[$npclastgenerated] = rand(1,7)
  178. elseif npc_finance[$npclastgenerated] = 1:
  179. npc_apt_type[$npclastgenerated] = rand(2,5)
  180. npc_occupation[$npclastgenerated] = rand(7,15)
  181. elseif npc_finance[$npclastgenerated] = 2:
  182. npc_apt_type[$npclastgenerated] = rand(5,6)
  183. npc_occupation[$npclastgenerated] = rand(14,18)
  184. end
  185. if npc_apt_type = 2:
  186. npc_apt_number[$npclastgenerated] = rand(1,2)
  187. $npc_apt_bedroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  188. $npc_apt_kitchen[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  189. $npc_apt_livingroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  190. $npc_apt_bathroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  191. $npc_apt_hall[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  192. else
  193. npc_apt_number[$npclastgenerated] = rand(1,3)
  194. $npc_apt_bedroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/bedroom.jpg"></center>'
  195. $npc_apt_kitchen[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/kitchen.jpg"></center>'
  196. $npc_apt_livingroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
  197. $npc_apt_bathroom[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/1bedroom/<<npc_apt_number[$npclastgenerated]>>/bath.jpg"></center>'
  198. $npc_apt_hall[$npclastgenerated] = '<center><img <<$set_imgh>> src="images/shared/romance/lovers/homes/studio/<<npc_apt_number[$npclastgenerated]>>/living.jpg"></center>'
  199. end
  200. ! if npc_occupation = 1: $npc_occupation = cashier at supermarket
  201. ! if npc_occupation = 2: $npc_occupation = cashier at liquor store
  202. ! if npc_occupation = 3: $npc_occupation = cashier at coffee shop
  203. ! if npc_occupation = 4: $npc_occupation = barista
  204. ! if npc_occupation = 5: $npc_occupation = cheap restaurant job
  205. ! if npc_occupation = 6: $npc_occupation = taxi driver
  206. ! if npc_occupation = 7: $npc_occupation = masseuse
  207. ! if npc_occupation = 8: $npc_occupation = sexual masseuse
  208. ! if npc_occupation = 9: $npc_occupation = factory job
  209. ! if npc_occupation = 10: $npc_occupation = bartender
  210. ! if npc_occupation = 11: $npc_occupation = mechanic
  211. ! if npc_occupation = 12: $npc_occupation = line cook
  212. ! if npc_occupation = 13: $npc_occupation = waiter
  213. ! if npc_occupation = 14: $npc_occupation = personal trainer
  214. ! if npc_occupation = 15: $npc_occupation = programmer
  215. ! if npc_occupation = 16: $npc_occupation = businessman
  216. ! if npc_occupation = 17: $npc_occupation = lawyer
  217. ! if npc_occupation = 18: $npc_occupation = investment banker
  218. npc_humor[$npclastgenerated] = rand(0,3)
  219. npc_fav_pos[$npclastgenerated] = rand(1,7)
  220. npc_tit_pref[$npclastgenerated] = rand(0,3)
  221. npc_style[$npclastgenerated] = rand(1,6)
  222. npc_smoker[$npclastgenerated] = rand(0,2)
  223. ! we will skip addit for now, have a variable just for smoking
  224. npc_addit[$npclastgenerated] = rand(0,1)
  225. npc_doors[$npclastgenerated] = rand(0,2)
  226. npc_goal[$npclastgenerated] = rand(1,3)
  227. npc_fidelity[$npclastgenerated] = rand(1,10)
  228. npc_lover_days[$npclastgenerated] = 0
  229. npc_lover_keys[$npclastgenerated] = 0
  230. npc_residence[$npclastgenerated] = temp_location
  231. ! {Variables are cleaned up.}
  232. killvar '$npctempgn'
  233. killvar 'npctempc1'
  234. killvar 'npctempc2'
  235. killvar 'npctempgsex'
  236. killvar '$npctempgn'
  237. killvar 'npctempgage'
  238. killvar '$npctemparrc'
  239. killvar 'temp_location'
  240. --- npcgeneratec ---------------------------------