1
0

npcgeneratec.qsrc 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  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. !! {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.}
  4. npctempgsex = ARGS[0]
  5. $npctempgn[0] = $ARGS[1]
  6. npctempgage = ARGS[2]
  7. !! {First we set the newly generated index number or overwrite the first blank number}
  8. !! {Checks to see if array 0 in the cleanup list is available for overwrite and makes the overwrite as that if so.}
  9. if mid($cemptyarray[0],1,1) = 'C':
  10. $npclastgenerated = $cemptyarray[0]
  11. killvar '$cemptyarray', 0
  12. else
  13. :npcgencsanityloop
  14. i = 0
  15. $npclastgenerated = 'C' + '<<carraynumber>>'
  16. $npctemparrc = 'C' + '<<(carraynumber)-(1)>>'
  17. if $npc_persType[$npctemparrc] = '' and carraynumber > 0:
  18. carraynumber -= 1
  19. i = 1
  20. elseif $npc_persType[$npclastgenerated] = '':
  21. i = 0
  22. else
  23. carraynumber += 1
  24. i = 1
  25. end
  26. if i = 1: jump 'npcgencsanityloop'
  27. end
  28. carraynumber += 1
  29. ! {moved up to here}
  30. npclastgeneratedn = mid($npclastgenerated, 2)
  31. ! {Now we need a random birthday based on the rough age given.}
  32. npctempc1[1] = year - npctempgage
  33. npctempc1[2] = rand(1,12)
  34. if npctempc1[2] = 4 or npctempc1[2] = 6 or npctempc1[2] = 9 or npctempc1[2] = 11:
  35. npctempc1[3] = rand(1,30)
  36. 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:
  37. npctempc1[3] = rand(1,31)
  38. elseif ((npctempc1[1] mod 4 = 0) and (npctempc1[1] mod 100 ! 0)) or (npctempc1[1] mod 400 = 0):
  39. npctempc1[3] = rand(1,29)
  40. else
  41. npctempc1[3] = rand(1,28)
  42. end
  43. npc_dob[$npclastgenerated] = npctempc1[1] * 10000
  44. npc_dob[$npclastgenerated] += (npctempc1[2] * 100)
  45. npc_dob[$npclastgenerated] += npctempc1[3]
  46. ! {we save the unique number of the npc, to be able to get the index of the array via arrpos}
  47. $npc_dob[$npclastgenerated] = '<<npclastgeneratedn>>'
  48. ! {Now, we set the variable for the stat randomization as well as calculate chance of virginity.}
  49. if npctempgage < 18:
  50. npctempc2[0] = 30
  51. npctempc2[1] = rand(0,20)
  52. else
  53. npctempc2[0] = 50
  54. npctempc2[1] = rand(19,24)
  55. end
  56. ! {We flag virginity based on the results of the check. Overwrite it after generation if you want to be sure of status.}
  57. if npctempc2[1] >= 20:
  58. $npc_firstpart[$npclastgenerated] = 'U'
  59. $npc_lastpart[$npclastgenerated] = 'U'
  60. $npc_kidpater[$npclastgenerated] = 'N'
  61. else
  62. $npc_firstpart[$npclastgenerated] = 'V'
  63. $npc_lastpart[$npclastgenerated] = 'V'
  64. $npc_kidpater[$npclastgenerated] = 'N'
  65. npc_sexskill[$npclastgenerated] = 0
  66. end
  67. ! {index}
  68. npc_firstpart[$npclastgenerated] = npclastgeneratedn
  69. npc_lastpart[$npclastgenerated] = npclastgeneratedn
  70. npc_kidpater[$npclastgenerated] = npclastgeneratedn
  71. $npc_sexskill[$npclastgenerated] = '<<npclastgeneratedn>>'
  72. ! {Then we need to give them a name, and establish their official gender}
  73. if npctempgsex = 0:
  74. ! {Male}
  75. gs 'npcrnamefile', 'rusMale'
  76. gs 'npcgenext', 'dick'
  77. npc_gender[$npclastgenerated] = 0
  78. npc_cyc[$npclastgenerated] = -1
  79. npc_fert[$npclastgenerated] = -1
  80. npc_spermpot[$npclastgenerated] = 10000
  81. $npc_thdick[$npclastgenerated] = $npctempgn[4]
  82. npc_dick[$npclastgenerated] = npctempgn[5]
  83. $npc_notes[$npclastgenerated] = 'A male.'
  84. npc_bust[$npclastgenerated] = 0
  85. npc_nips[$npclastgenerated] = 1
  86. if npctempc2[1] >= 20:
  87. npc_hymen[$npclastgenerated] = -1
  88. end
  89. elseif npctempgsex = 1:
  90. ! {Female}
  91. gs 'npcrnamefile', 'rusFemale'
  92. npc_gender[$npclastgenerated] = 1
  93. npc_cyc[$npclastgenerated] = rand(0,29)
  94. npc_fert[$npclastgenerated] = 1
  95. npc_spermpot[$npclastgenerated] = -1
  96. $npc_thdick[$npclastgenerated] = 'clitoris'
  97. npc_dick[$npclastgenerated] = rand(0,1)
  98. $npc_notes[$npclastgenerated] = 'A female.'
  99. npc_bust[$npclastgenerated]= rand(1,12)
  100. npc_nips[$npclastgenerated] = rand(2,6)
  101. if npctempc2[1] >= 20:
  102. npc_hymen[$npclastgenerated] = rand(4,6)
  103. else
  104. npc_hymen[$npclastgenerated] = 0
  105. end
  106. elseif npctempgsex = 2:
  107. ! {HermFemale}
  108. gs 'npcrnamefile', 'rusFemale'
  109. gs 'npcgenext', 'dick'
  110. npc_gender[$npclastgenerated] = 1
  111. npc_cyc[$npclastgenerated] = rand(0,29)
  112. npc_fert[$npclastgenerated] = 1
  113. npc_spermpot[$npclastgenerated] = -1
  114. $npc_thdick[$npclastgenerated] = 'clitoris'
  115. npc_dick[$npclastgenerated] = npctempgn[5]
  116. $npc_notes[$npclastgenerated] = 'A female Hermaphrodite.'
  117. npc_bust[$npclastgenerated]= rand(1,10)
  118. npc_nips[$npclastgenerated] = rand(1,5)
  119. if npctempc2[1] >= 20:
  120. npc_hymen[$npclastgenerated] = rand(0,6)
  121. if npc_hymen[$npclastgenerated] < 4 and npc_hymen[$npclastgenerated] > 0: npc_hymen[$npclastgenerated] = 4
  122. else
  123. npc_hymen[$npclastgenerated] = 0
  124. end
  125. else
  126. ! {HermMale}
  127. gs 'npcrnamefile', 'rusMale'
  128. gs 'npcgenext', 'dick'
  129. npc_gender[$npclastgenerated] = 0
  130. npc_cyc[$npclastgenerated] = -1
  131. npc_fert[$npclastgenerated] = -1
  132. npc_spermpot[$npclastgenerated] = 10000
  133. $npc_thdick[$npclastgenerated] = $npctempgn[4]
  134. npc_dick[$npclastgenerated] = npctempgn[5]
  135. $npc_notes[$npclastgenerated] = 'A male Hermaphrodite.'
  136. npc_bust[$npclastgenerated]= rand(0,1)
  137. npc_nips[$npclastgenerated] = rand(1,3)
  138. if npctempc2[1] >= 20:
  139. npc_hymen[$npclastgenerated] = rand(0,6)
  140. if npc_hymen[$npclastgenerated] < 4 and npc_hymen[$npclastgenerated] > 0: npc_hymen[$npclastgenerated] = 4
  141. else
  142. npc_hymen[$npclastgenerated] = 0
  143. end
  144. end
  145. ! {index}
  146. $npc_gender[$npclastgenerated] = '<<npclastgeneratedn>>'
  147. $npc_cyc[$npclastgenerated] = '<<npclastgeneratedn>>'
  148. $npc_fert[$npclastgenerated] = '<<npclastgeneratedn>>'
  149. $npc_spermpot[$npclastgenerated] = '<<npclastgeneratedn>>'
  150. npc_thdick[$npclastgenerated] = npclastgeneratedn
  151. $npc_dick[$npclastgenerated] = '<<npclastgeneratedn>>'
  152. npc_notes[$npclastgenerated] = npclastgeneratedn
  153. $npc_bust[$npclastgenerated] = '<<npclastgeneratedn>>'
  154. $npc_nips[$npclastgenerated] = '<<npclastgeneratedn>>'
  155. $npc_hymen[$npclastgenerated] = '<<npclastgeneratedn>>'
  156. ! {Then we set the names, and the stat high ends as determined earlier.}
  157. gs 'npcrnamefile', 'rusSur'
  158. $npc_firstname[$npclastgenerated] = $npctempgn[1]
  159. $npc_nickname[$npclastgenerated] = $npctempgn[2]
  160. $npc_lastname[$npclastgenerated] = $npctempgn[3]
  161. $npc_usedname[$npclastgenerated] = $npctempgn[0]
  162. npc_vital[$npclastgenerated] = rand(1,npctempc2)
  163. npc_stren[$npclastgenerated] = rand(1,npctempc2)
  164. npc_intel[$npclastgenerated] = rand(1,npctempc2)
  165. npc_agil[$npclastgenerated] = rand(1,npctempc2)
  166. npc_sprt[$npclastgenerated] = rand(1,npctempc2)
  167. ! {index}
  168. npc_firstname[$npclastgenerated] = npclastgeneratedn
  169. npc_nickname[$npclastgenerated] = npclastgeneratedn
  170. npc_lastname[$npclastgenerated] = npclastgeneratedn
  171. npc_usedname[$npclastgenerated] = npclastgeneratedn
  172. $npc_vital[$npclastgenerated] = '<<npclastgeneratedn>>'
  173. $npc_stren[$npclastgenerated] = '<<npclastgeneratedn>>'
  174. $npc_intel[$npclastgenerated] = '<<npclastgeneratedn>>'
  175. $npc_agil[$npclastgenerated] = '<<npclastgeneratedn>>'
  176. $npc_sprt[$npclastgenerated] = '<<npclastgeneratedn>>'
  177. ! {Then we call out other stats}
  178. npc_magik[$npclastgenerated] = 0
  179. npc_drunk[$npclastgenerated] = 0
  180. npc_pantys[$npclastgenerated] = 0
  181. npc_vag[$npclastgenerated] = 0
  182. npc_ass[$npclastgenerated] = 0
  183. ! {index}
  184. $npc_magik[$npclastgenerated] = '<<npclastgeneratedn>>'
  185. $npc_drunk[$npclastgenerated] = '<<npclastgeneratedn>>'
  186. $npc_pantys[$npclastgenerated] = '<<npclastgeneratedn>>'
  187. $npc_vag[$npclastgenerated] = '<<npclastgeneratedn>>'
  188. $npc_ass[$npclastgenerated] = '<<npclastgeneratedn>>'
  189. ! {NPCs start with random horniness}
  190. npc_horny[$npclastgenerated] = rand(0,60)
  191. npc_Pavrep[$npclastgenerated] = 0
  192. npc_Godrep[$npclastgenerated] = 0
  193. ! {index}
  194. $npc_horny[$npclastgenerated] = '<<npclastgeneratedn>>'
  195. $npc_Pavrep[$npclastgenerated] = '<<npclastgeneratedn>>'
  196. $npc_Godrep[$npclastgenerated] = '<<npclastgeneratedn>>'
  197. ! {Random attractiveness}
  198. npc_apprnc[$npclastgenerated] = rand(30,60)
  199. npc_lipbalm[$npclastgenerated] = 0
  200. npc_makeup[$npclastgenerated] = 0
  201. npc_sweat[$npclastgenerated] = 0
  202. npc_dye[$npclastgenerated] = 0
  203. npc_hairbsh[$npclastgenerated] = 0
  204. ! {index}
  205. $npc_apprnc[$npclastgenerated] = '<<npclastgeneratedn>>'
  206. $npc_lipbalm[$npclastgenerated] = '<<npclastgeneratedn>>'
  207. $npc_makeup[$npclastgenerated] = '<<npclastgeneratedn>>'
  208. $npc_sweat[$npclastgenerated] = '<<npclastgeneratedn>>'
  209. $npc_dye[$npclastgenerated] = '<<npclastgeneratedn>>'
  210. $npc_hairbsh[$npclastgenerated] = '<<npclastgeneratedn>>'
  211. ! {Random skin quality and body hair}
  212. npc_skin[$npclastgenerated] = rand(30,70)
  213. npc_bodyhair[$npclastgenerated] = rand(0,4)
  214. npc_breath[$npclastgenerated] = 0
  215. npc_hipcurv[$npclastgenerated] = 0
  216. npc_hgt[$npclastgenerated] = 0
  217. npc_fat[$npclastgenerated] = 0
  218. ! {index}
  219. $npc_skin[$npclastgenerated] = '<<npclastgeneratedn>>'
  220. $npc_bodyhair[$npclastgenerated] = '<<npclastgeneratedn>>'
  221. $npc_breath[$npclastgenerated] = '<<npclastgeneratedn>>'
  222. $npc_hipcurv[$npclastgenerated] = '<<npclastgeneratedn>>'
  223. $npc_hgt[$npclastgenerated] = '<<npclastgeneratedn>>'
  224. $npc_fat[$npclastgenerated] = '<<npclastgeneratedn>>'
  225. ! {Random pubic hair}
  226. npc_pubes[$npclastgenerated] = rand(0,1)
  227. npc_hairlng[$npclastgenerated] = 0
  228. npc_haircol[$npclastgenerated] = 0
  229. npc_haircurl[$npclastgenerated] = 0
  230. npc_tan[$npclastgenerated] = 0
  231. npc_lip[$npclastgenerated] = 0
  232. npc_lashes[$npclastgenerated] = 0
  233. npc_eyesize[$npclastgenerated] = 0
  234. npc_eyecol[$npclastgenerated] = 0
  235. npc_dom[$npclastgenerated] = 0
  236. npc_sub[$npclastgenerated] = 0
  237. ! {index}
  238. $npc_pubes[$npclastgenerated] = '<<npclastgeneratedn>>'
  239. $npc_hairlng[$npclastgenerated] = '<<npclastgeneratedn>>'
  240. $npc_haircol[$npclastgenerated] = '<<npclastgeneratedn>>'
  241. $npc_haircurl[$npclastgenerated] = '<<npclastgeneratedn>>'
  242. $npc_tan[$npclastgenerated] = '<<npclastgeneratedn>>'
  243. $npc_lip[$npclastgenerated] = '<<npclastgeneratedn>>'
  244. $npc_lashes[$npclastgenerated] = '<<npclastgeneratedn>>'
  245. $npc_eyesize[$npclastgenerated] = '<<npclastgeneratedn>>'
  246. $npc_eyecol[$npclastgenerated] = '<<npclastgeneratedn>>'
  247. $npc_dom[$npclastgenerated] = '<<npclastgeneratedn>>'
  248. $npc_sub[$npclastgenerated] = '<<npclastgeneratedn>>'
  249. ! {Random glasses, grades, and other skills, based on age established above.}
  250. npc_glasses[$npclastgenerated] = rand(0,1)
  251. npc_grades[$npclastgenerated] = rand(40,100)
  252. npc_run[$npclastgenerated] = rand(0,(npctempc2 + 10))
  253. npc_vball[$npclastgenerated] = rand(0,(npctempc2 + 10))
  254. npc_shoot[$npclastgenerated] = rand(0,(npctempc2 + 10))
  255. npc_sewing[$npclastgenerated] = rand(0,(npctempc2 + 10))
  256. npc_serving[$npclastgenerated] = rand(0,(npctempc2 + 10))
  257. npc_chess[$npclastgenerated] = rand(0,(npctempc2 + 10))
  258. npc_dance[$npclastgenerated] = rand(0,(npctempc2 + 10))
  259. npc_danceero[$npclastgenerated] = rand(0,(npctempc2 + 10))
  260. npc_jab[$npclastgenerated] = rand(0,(npctempc2 + 10))
  261. npc_punch[$npclastgenerated] = rand(0,(npctempc2 + 10))
  262. npc_kick[$npclastgenerated] = rand(0,(npctempc2 + 10))
  263. npc_def[$npclastgenerated] = rand(0,(npctempc2 + 10))
  264. npc_vokal[$npclastgenerated] = rand(0,(npctempc2 + 10))
  265. npc_teach[$npclastgenerated] = rand(0,(npctempc2 + 10))
  266. ! {index}
  267. $npc_glasses[$npclastgenerated] = '<<npclastgeneratedn>>'
  268. $npc_grades[$npclastgenerated] = '<<npclastgeneratedn>>'
  269. $npc_run[$npclastgenerated] = '<<npclastgeneratedn>>'
  270. $npc_vball[$npclastgenerated] = '<<npclastgeneratedn>>'
  271. $npc_shoot[$npclastgenerated] = '<<npclastgeneratedn>>'
  272. $npc_sewing[$npclastgenerated] = '<<npclastgeneratedn>>'
  273. $npc_serving[$npclastgenerated] = '<<npclastgeneratedn>>'
  274. $npc_chess[$npclastgenerated] = '<<npclastgeneratedn>>'
  275. $npc_dance[$npclastgenerated] = '<<npclastgeneratedn>>'
  276. $npc_danceero[$npclastgenerated] = '<<npclastgeneratedn>>'
  277. $npc_jab[$npclastgenerated] = '<<npclastgeneratedn>>'
  278. $npc_punch[$npclastgenerated] = '<<npclastgeneratedn>>'
  279. $npc_kick[$npclastgenerated] = '<<npclastgeneratedn>>'
  280. $npc_def[$npclastgenerated] = '<<npclastgeneratedn>>'
  281. $npc_vokal[$npclastgenerated] = '<<npclastgeneratedn>>'
  282. $npc_teach[$npclastgenerated] = '<<npclastgeneratedn>>'
  283. ! {Starting at 0 quest state and love for the character, and slightly disliked.}
  284. npc_QW[$npclastgenerated]= 0
  285. npc_rel[$npclastgenerated] = 40
  286. npc_love[$npclastgenerated] = 0
  287. ! {index}
  288. $npc_QW[$npclastgenerated] = '<<npclastgeneratedn>>'
  289. $npc_rel[$npclastgenerated] = '<<npclastgeneratedn>>'
  290. $npc_love[$npclastgenerated] = '<<npclastgeneratedn>>'
  291. ! {Start unemployed and unspecified location}
  292. npc_job[$npclastgenerated] = 0
  293. npc_cloc[$npclastgenerated] = 0
  294. ! {index}
  295. $npc_job[$npclastgenerated] = '<<npclastgeneratedn>>'
  296. $npc_cloc[$npclastgenerated] = '<<npclastgeneratedn>>'
  297. ! {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...}
  298. $npc_dad[$npclastgenerated] = 'U'
  299. $npc_mom[$npclastgenerated] = 'U'
  300. $npc_pic[$npclastgenerated] = 'xPICx'
  301. ! {index}
  302. npc_dad[$npclastgenerated] = npclastgeneratedn
  303. npc_mom[$npclastgenerated] = npclastgeneratedn
  304. npc_pic[$npclastgenerated] = npclastgeneratedn
  305. ! {STDs are not randomly given here. For characters with a STD, you need to gs npcgenext rstd. It will be expecting an npclastgeneratedn variable.}
  306. npc_herpes[$npclastgenerated] = 0
  307. npc_syth[$npclastgenerated] = 0
  308. npc_gon[$npclastgenerated] = 0
  309. npc_chlam[$npclastgenerated] = 0
  310. npc_genwart[$npclastgenerated] = 0
  311. npc_Thrush[$npclastgenerated] = 0
  312. npc_Malen[$npclastgenerated] = 0
  313. ! {index}
  314. $npc_herpes[$npclastgenerated] = '<<npclastgeneratedn>>'
  315. $npc_syth[$npclastgenerated] = '<<npclastgeneratedn>>'
  316. $npc_gon[$npclastgenerated] = '<<npclastgeneratedn>>'
  317. $npc_chlam[$npclastgenerated] = '<<npclastgeneratedn>>'
  318. $npc_genwart[$npclastgenerated] = '<<npclastgeneratedn>>'
  319. $npc_Thrush[$npclastgenerated] = '<<npclastgeneratedn>>'
  320. $npc_Malen[$npclastgenerated] = '<<npclastgeneratedn>>'
  321. ! {Chemestry and clothing preference are unspecified}
  322. npc_Chem[$npclastgenerated] = 0
  323. npc_Clothpref[$npclastgenerated] = 0
  324. ! {index}
  325. $npc_Chem[$npclastgenerated] = '<<npclastgeneratedn>>'
  326. $npc_Clothpref[$npclastgenerated] = '<<npclastgeneratedn>>'
  327. ! {Personality is called up}
  328. gs 'npcgenext', 'pers'
  329. $npc_PersType[$npclastgenerated] = $npctempgn[6]
  330. ! {index}
  331. npc_PersType[$npclastgenerated] = npclastgeneratedn
  332. ! {Creating the DNA of the character. If it is someone specific, like father, mother, daughter, sone, etc. then should be overwritten.}
  333. $npc_dna[$npclastgenerated] = func('DNA','create')
  334. ! {index}
  335. npc_dna[$npclastgenerated] = npclastgeneratedn
  336. ! {Variables are cleaned up.}
  337. killvar '$npctempgn'
  338. killvar 'npctempc1'
  339. killvar 'npctempc2'
  340. killvar 'npctempgsex'
  341. killvar '$npctempgn'
  342. killvar 'npctempgage'
  343. killvar '$npctemparrc'
  344. --- npcgeneratec ---------------------------------