npcgeneratec.qsrc 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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. ! {Now we need a random birthday based on the rough age given.}
  30. npctempc1[1] = year - npctempgage
  31. npctempc1[2] = rand(1,12)
  32. if npctempc1[2] = 4 or npctempc1[2] = 6 or npctempc1[2] = 9 or npctempc1[2] = 11:
  33. npctempc1[3] = rand(1,30)
  34. 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:
  35. npctempc1[3] = rand(1,31)
  36. elseif ((npctempc1[1] mod 4 = 0) and (npctempc1[1] mod 100 ! 0)) or (npctempc1[1] mod 400 = 0):
  37. npctempc1[3] = rand(1,29)
  38. else
  39. npctempc1[3] = rand(1,28)
  40. end
  41. npc_dob[$npclastgenerated] = npctempc1[1] * 10000
  42. npc_dob[$npclastgenerated] += (npctempc1[2] * 100)
  43. npc_dob[$npclastgenerated] += npctempc1[3]
  44. ! {Now, we set the variable for the stat randomization as well as calculate chance of virginity.}
  45. if npctempgage < 18:
  46. npctempc2[0] = 30
  47. npctempc2[1] = rand(0,20)
  48. else
  49. npctempc2[0] = 50
  50. npctempc2[1] = rand(19,24)
  51. end
  52. ! {We flag virginity based on the results of the check. Overwrite it after generation if you want to be sure of status.}
  53. if npctempc2[1] >= 20:
  54. $npc_firstpart[$npclastgenerated] = 'U'
  55. $npc_lastpart[$npclastgenerated] = 'U'
  56. $npc_kidpater[$npclastgenerated] = 'N'
  57. else
  58. $npc_firstpart[$npclastgenerated] = 'V'
  59. $npc_lastpart[$npclastgenerated] = 'V'
  60. $npc_kidpater[$npclastgenerated] = 'N'
  61. npc_sexskill[$npclastgenerated] = 0
  62. end
  63. ! {Then we need to give them a name, and establish their official gender}
  64. if npctempgsex = 0:
  65. ! {Male}
  66. gs 'npcrnamefile', 'rusMale'
  67. gs 'npcgenext', 'dick'
  68. npc_gender[$npclastgenerated] = 0
  69. npc_cyc[$npclastgenerated] = -1
  70. npc_fert[$npclastgenerated] = -1
  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. npc_nips[$npclastgenerated] = 1
  77. if npctempc2[1] >= 20:
  78. npc_hymen[$npclastgenerated] = -1
  79. end
  80. elseif npctempgsex = 1:
  81. ! {Female}
  82. gs 'npcrnamefile', 'rusFemale'
  83. npc_gender[$npclastgenerated] = 1
  84. npc_cyc[$npclastgenerated] = rand(0,29)
  85. npc_fert[$npclastgenerated] = 1
  86. npc_spermpot[$npclastgenerated] = -1
  87. $npc_thdick[$npclastgenerated] = 'clitoris'
  88. npc_dick[$npclastgenerated] = rand(0,1)
  89. $npc_notes[$npclastgenerated] = 'A female.'
  90. npc_bust[$npclastgenerated]= rand(1,12)
  91. npc_nips[$npclastgenerated] = rand(2,6)
  92. if npctempc2[1] >= 20:
  93. npc_hymen[$npclastgenerated] = rand(4,6)
  94. else
  95. npc_hymen[$npclastgenerated] = 0
  96. end
  97. elseif npctempgsex = 2:
  98. ! {HermFemale}
  99. gs 'npcrnamefile', 'rusFemale'
  100. gs 'npcgenext', 'dick'
  101. npc_gender[$npclastgenerated] = 1
  102. npc_cyc[$npclastgenerated] = rand(0,29)
  103. npc_fert[$npclastgenerated] = 1
  104. npc_spermpot[$npclastgenerated] = -1
  105. $npc_thdick[$npclastgenerated] = 'clitoris'
  106. npc_dick[$npclastgenerated] = npctempgn[5]
  107. $npc_notes[$npclastgenerated] = 'A female Hermaphrodite.'
  108. npc_bust[$npclastgenerated]= rand(1,10)
  109. npc_nips[$npclastgenerated] = rand(1,5)
  110. if npctempc2[1] >= 20:
  111. npc_hymen[$npclastgenerated] = rand(0,6)
  112. if npc_hymen[$npclastgenerated] < 4 and npc_hymen[$npclastgenerated] > 0: npc_hymen[$npclastgenerated] = 4
  113. else
  114. npc_hymen[$npclastgenerated] = 0
  115. end
  116. else
  117. ! {HermMale}
  118. gs 'npcrnamefile', 'rusMale'
  119. gs 'npcgenext', 'dick'
  120. npc_gender[$npclastgenerated] = 0
  121. npc_cyc[$npclastgenerated] = -1
  122. npc_fert[$npclastgenerated] = -1
  123. npc_spermpot[$npclastgenerated] = 10000
  124. $npc_thdick[$npclastgenerated] = $npctempgn[4]
  125. npc_dick[$npclastgenerated] = npctempgn[5]
  126. $npc_notes[$npclastgenerated] = 'A male Hermaphrodite.'
  127. npc_bust[$npclastgenerated]= rand(0,1)
  128. npc_nips[$npclastgenerated] = rand(1,3)
  129. if npctempc2[1] >= 20:
  130. npc_hymen[$npclastgenerated] = rand(0,6)
  131. if npc_hymen[$npclastgenerated] < 4 and npc_hymen[$npclastgenerated] > 0: npc_hymen[$npclastgenerated] = 4
  132. else
  133. npc_hymen[$npclastgenerated] = 0
  134. end
  135. end
  136. ! {Then we set the names, and the stat high ends as determined earlier.}
  137. gs 'npcrnamefile', 'rusSur'
  138. $npc_firstname[$npclastgenerated] = $npctempgn[1]
  139. $npc_nickname[$npclastgenerated] = $npctempgn[2]
  140. $npc_lastname[$npclastgenerated] = $npctempgn[3]
  141. $npc_usedname[$npclastgenerated] = $npctempgn[0]
  142. npc_vit[$npclastgenerated] = rand(1,npctempc2)
  143. npc_str[$npclastgenerated] = rand(1,npctempc2)
  144. npc_int[$npclastgenerated] = rand(1,npctempc2)
  145. npc_agil[$npclastgenerated] = rand(1,npctempc2)
  146. npc_spirit[$npclastgenerated] = rand(1,npctempc2)
  147. ! {Then we call out other stats}
  148. npc_mag[$npclastgenerated] = 0
  149. npc_drunk[$npclastgenerated] = 0
  150. npc_undies[$npclastgenerated] = 0
  151. npc_vag[$npclastgenerated] = 0
  152. npc_ass[$npclastgenerated] = 0
  153. ! {NPCs start with random horniness}
  154. npc_horny[$npclastgenerated] = rand(0,60)
  155. npc_Pavrep[$npclastgenerated] = 0
  156. npc_Godrep[$npclastgenerated] = 0
  157. ! {Random attractiveness}
  158. npc_app[$npclastgenerated] = rand(30,60)
  159. npc_lipstick[$npclastgenerated] = 0
  160. npc_makeup[$npclastgenerated] = 0
  161. npc_sweat[$npclastgenerated] = 0
  162. npc_dye[$npclastgenerated] = 0
  163. npc_hair[$npclastgenerated] = 0
  164. ! {Random skin quality and body hair}
  165. npc_skin[$npclastgenerated] = rand(30,70)
  166. npc_bodyhair[$npclastgenerated] = rand(0,4)
  167. npc_breath[$npclastgenerated] = 0
  168. npc_hipcurv[$npclastgenerated] = 0
  169. npc_hgt[$npclastgenerated] = 0
  170. npc_fat[$npclastgenerated] = 0
  171. ! {Random pubic hair}
  172. npc_pubes[$npclastgenerated] = rand(0,1)
  173. npc_hairlng[$npclastgenerated] = 0
  174. npc_haircol[$npclastgenerated] = 0
  175. npc_haircurl[$npclastgenerated] = 0
  176. npc_tan[$npclastgenerated] = 0
  177. npc_lip[$npclastgenerated] = 0
  178. npc_lashes[$npclastgenerated] = 0
  179. npc_eyesize[$npclastgenerated] = 0
  180. npc_eyecol[$npclastgenerated] = 0
  181. npc_dom[$npclastgenerated] = 0
  182. npc_sub[$npclastgenerated] = 0
  183. ! {Random glasses, grades, and other skills, based on age established above.}
  184. npc_glasses[$npclastgenerated] = rand(0,1)
  185. npc_grades[$npclastgenerated] = rand(40,100)
  186. npc_run[$npclastgenerated] = rand(0,(npctempc2 + 10))
  187. npc_vball[$npclastgenerated] = rand(0,(npctempc2 + 10))
  188. npc_nerd[$npclastgenerated] = rand(0,(npctempc2 + 10))
  189. npc_shoot[$npclastgenerated] = rand(0,(npctempc2 + 10))
  190. npc_sew[$npclastgenerated] = rand(0,(npctempc2 + 10))
  191. npc_serve[$npclastgenerated] = rand(0,(npctempc2 + 10))
  192. npc_chess[$npclastgenerated] = rand(0,(npctempc2 + 10))
  193. npc_dnc[$npclastgenerated] = rand(0,(npctempc2 + 10))
  194. npc_erodnc[$npclastgenerated] = rand(0,(npctempc2 + 10))
  195. npc_jab[$npclastgenerated] = rand(0,(npctempc2 + 10))
  196. npc_punch[$npclastgenerated] = rand(0,(npctempc2 + 10))
  197. npc_kick[$npclastgenerated] = rand(0,(npctempc2 + 10))
  198. npc_def[$npclastgenerated] = rand(0,(npctempc2 + 10))
  199. npc_sing[$npclastgenerated] = rand(0,(npctempc2 + 10))
  200. npc_teach[$npclastgenerated] = rand(0,(npctempc2 + 10))
  201. ! {Starting at 0 quest state and love for the character, and slightly disliked.}
  202. npc_Qstlvl[$npclastgenerated]= 0
  203. npc_rel[$npclastgenerated] = 40
  204. npc_love[$npclastgenerated] = 0
  205. ! {Start unemployed and unspecified location}
  206. npc_job[$npclastgenerated] = 0
  207. npc_cloc[$npclastgenerated] = 0
  208. ! {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...}
  209. $npc_dad[$npclastgenerated] = 'U'
  210. $npc_mom[$npclastgenerated] = 'U'
  211. $npc_pic[$npclastgenerated] = 'xPICx'
  212. ! {STDs are not randomly given here. For characters with a STD, you need to gs npcgenext rstd. It will be expecting an npclastgeneratedn variable.}
  213. npc_herpes[$npclastgenerated] = 0
  214. npc_syph[$npclastgenerated] = 0
  215. npc_gon[$npclastgenerated] = 0
  216. npc_chlam[$npclastgenerated] = 0
  217. npc_Hiv[$npclastgenerated] = 0
  218. npc_genwart[$npclastgenerated] = 0
  219. npc_Thrush[$npclastgenerated] = 0
  220. npc_Malen[$npclastgenerated] = 0
  221. ! {Chemestry and clothing preference are unspecified}
  222. npc_Chem[$npclastgenerated] = 0
  223. npc_Clothpref[$npclastgenerated] = 0
  224. ! {Personality is called up}
  225. gs 'npcgenext', 'pers'
  226. $npc_PersType[$npclastgenerated] = $npctempgn[6]
  227. npclastgeneratedn = mid($npclastgenerated, 2)
  228. ! {Creating the DNA of the character. If it is someone specific, like father, mother, daughter, sone, etc. then should be overwritten.}
  229. $npc_dna[$npclastgenerated] = func('DNA','create')
  230. ! {Variables are cleaned up.}
  231. killvar '$npctempgn'
  232. killvar 'npctempc1'
  233. killvar 'npctempc2'
  234. killvar 'npctempgsex'
  235. killvar '$npctempgn'
  236. killvar 'npctempgage'
  237. killvar '$npctemparrc'
  238. --- npcgeneratec ---------------------------------