1
0

npcgeneratec 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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 use 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. npclastgeneratedn = arrsize('$Cstat_PersType')
  9. if npclastgeneratedn > 0: npclastgeneratedn = arrpos('$Cstat_PersType', '')
  10. if npclastgeneratedn < 0 or $Cstat_PersType[npclastgeneratedn] ! '': npclastgeneratedn = arrsize('$Cstat_PersType')
  11. ! {Now we need a random birthday based on the rough age given.}
  12. npctempc1[1] = year - npctempgage
  13. npctempc1[2] = rand(1,12)
  14. if npctempc1[2] = 4 or npctempc1[2] = 6 or npctempc1[2] = 9 or npctempc1[2] = 11:
  15. npctempc1[3] = rand(1,30)
  16. 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:
  17. npctempc1[3] = rand(1,31)
  18. elseif ((npctempc1[1] mod 4 = 0) and (npctempc1[1] mod 100 ! 0)) or (npctempc1[1] mod 400 = 0):
  19. npctempc1[3] = rand(1,29)
  20. else
  21. npctempc1[3] = rand(1,28)
  22. end
  23. Cstat_dob[npclastgeneratedn] = npctempc1[1] * 10000
  24. Cstat_dob[npclastgeneratedn] += (npctempc1[2] * 100)
  25. Cstat_dob[npclastgeneratedn] += npctempc1[3]
  26. ! {Now, we set the variable for the stat randomization as well as calculate chance of virginity.}
  27. if npctempgage < 18:
  28. npctempc2[0] = 30
  29. npctempc2[1] = rand(0,20)
  30. else
  31. npctempc2[0] = 50
  32. npctempc2[1] = rand(19,24)
  33. end
  34. ! {We flag virginity based on the results of the check. Overwrite it after generation if you want to be sure of status.}
  35. if npctempc2[1] >= 20:
  36. $Cstat_firstpart[npclastgeneratedn] = 'U'
  37. $Cstat_lastpart[npclastgeneratedn] = 'U'
  38. $Cstat_kidpater[npclastgeneratedn] = 'N'
  39. else
  40. $Cstat_firstpart[npclastgeneratedn] = 'V'
  41. $Cstat_lastpart[npclastgeneratedn] = 'V'
  42. $Cstat_kidpater[npclastgeneratedn] = 'N'
  43. Cstat_sexskill[npclastgeneratedn] = 0
  44. end
  45. ! {Then we need to give it a name, and establish it''s official gender}
  46. if npctempgsex = 0:
  47. ! {Male}
  48. gs 'npcrnamefile', 'rusMale'
  49. gs 'npcgenext', 'dick'
  50. Cstat_gender[npclastgeneratedn] = 1
  51. Cstat_cyc[npclastgeneratedn] = -1
  52. Cstat_fert[npclastgeneratedn] = -1
  53. Cstat_spermpot[npclastgeneratedn] = 10000
  54. $Cstat_thdick[npclastgeneratedn] = npctempgn[4]
  55. Cstat_dick[npclastgeneratedn] = npctempgn[5]
  56. $Cstat_notes[npclastgeneratedn] = 'A male.'
  57. Cstat_bust[npclastgeneratedn] = 0
  58. Cstat_nips[npclastgeneratedn] = 1
  59. if npctempc2[1] >= 20:
  60. Cstat_hymen[npclastgeneratedn] = -1
  61. end
  62. elseif npctempgsex = 1:
  63. ! {Female}
  64. gs 'npcrnamefile', 'rusFemale'
  65. Cstat_gender[npclastgeneratedn] = 1
  66. Cstat_cyc[npclastgeneratedn] = rand(0,29)
  67. Cstat_fert[npclastgeneratedn] = 1
  68. Cstat_spermpot[npclastgeneratedn] = -1
  69. $Cstat_thdick[npclastgeneratedn] = 'clitoris'
  70. Cstat_dick[npclastgeneratedn] = rand(0,1)
  71. $Cstat_notes[npclastgeneratedn] = 'A female.'
  72. Cstat_bust[npclastgeneratedn]= rand(1,12)
  73. Cstat_nips[npclastgeneratedn] = rand(2,6)
  74. if npctempc2[1] >= 20:
  75. Cstat_hymen[npclastgeneratedn] = rand(4,6)
  76. else
  77. Cstat_hymen[npclastgeneratedn] = 0
  78. end
  79. elseif npctempgsex = 2:
  80. ! {HermFemale}
  81. gs 'npcrnamefile', 'rusFemale'
  82. gs 'npcgenext', 'dick'
  83. Cstat_gender[npclastgeneratedn] = 1
  84. Cstat_cyc[npclastgeneratedn] = rand(0,29)
  85. Cstat_fert[npclastgeneratedn] = 1
  86. Cstat_spermpot[npclastgeneratedn] = -1
  87. $Cstat_thdick[npclastgeneratedn] = 'clitoris'
  88. Cstat_dick[npclastgeneratedn] = npctempgn[5]
  89. $Cstat_notes[npclastgeneratedn] = 'A female Hermaphrodite.'
  90. Cstat_bust[npclastgeneratedn]= rand(1,10)
  91. Cstat_nips[npclastgeneratedn] = rand(1,5)
  92. if npctempc2[1] >= 20:
  93. Cstat_hymen[npclastgeneratedn] = rand(0,6)
  94. if Cstat_hymen[npclastgeneratedn] < 4 and Cstat_hymen[npclastgeneratedn] > 0: Cstat_hymen[npclastgeneratedn] = 4
  95. else
  96. Cstat_hymen[npclastgeneratedn] = 0
  97. end
  98. else
  99. ! {HermMale}
  100. gs 'npcrnamefile', 'rusMale'
  101. gs 'npcgenext', 'dick'
  102. Cstat_gender[npclastgeneratedn] = 0
  103. Cstat_cyc[npclastgeneratedn] = -1
  104. Cstat_fert[npclastgeneratedn] = -1
  105. Cstat_spermpot[npclastgeneratedn] = 10000
  106. $Cstat_thdick[npclastgeneratedn] = npctempgn[4]
  107. Cstat_dick[npclastgeneratedn] = npctempgn[5]
  108. $Cstat_notes[npclastgeneratedn] = 'A male Hermaphrodite.'
  109. Cstat_bust[npclastgeneratedn]= rand(0,1)
  110. Cstat_nips[npclastgeneratedn] = rand(1,3)
  111. if npctempc2[1] >= 20:
  112. Cstat_hymen[npclastgeneratedn] = rand(0,6)
  113. if Cstat_hymen[npclastgeneratedn] < 4 and Cstat_hymen[npclastgeneratedn] > 0: Cstat_hymen[npclastgeneratedn] = 4
  114. else
  115. Cstat_hymen[npclastgeneratedn] = 0
  116. end
  117. end
  118. ! {Then we set the names, and the stat high ends as determined earlier.}
  119. gs 'npcrnamefile', 'rusSur'
  120. $Cstat_firstname[npclastgeneratedn] = $npctempgn[1]
  121. $Cstat_nickname[npclastgeneratedn] = $npctempgn[2]
  122. $Cstat_lastname[npclastgeneratedn] = $npctempgn[3]
  123. $Cstat_usedname[npclastgeneratedn] = $npctempgn[0]
  124. Cstat_vit[npclastgeneratedn] = rand(1,npctempc2)
  125. Cstat_str[npclastgeneratedn] = rand(1,npctempc2)
  126. Cstat_int[npclastgeneratedn] = rand(1,npctempc2)
  127. Cstat_agil[npclastgeneratedn] = rand(1,npctempc2)
  128. Cstat_spirit[npclastgeneratedn] = rand(1,npctempc2)
  129. ! {Then we call out other stats}
  130. Cstat_mag[npclastgeneratedn] = 0
  131. Cstat_drunk[npclastgeneratedn] = 0
  132. Cstat_undies[npclastgeneratedn] = 0
  133. Cstat_vag[npclastgeneratedn] = 0
  134. Cstat_ass[npclastgeneratedn] = 0
  135. ! {NPCs start with random horniness}
  136. Astat_horny[npclastgeneratedn] = rand(0,60)
  137. Cstat_Pavrep[npclastgeneratedn] = 0
  138. Cstat_Godrep[npclastgeneratedn] = 0
  139. ! {Random attractiveness}
  140. Cstat_app[npclastgeneratedn] = rand(30,60)
  141. Cstat_lipstick[npclastgeneratedn] = 0
  142. Cstat_makeup[npclastgeneratedn] = 0
  143. Cstat_sweat[npclastgeneratedn] = 0
  144. Cstat_dye[npclastgeneratedn] = 0
  145. Cstat_hair[npclastgeneratedn] = 0
  146. ! {Random skin quality and body hair}
  147. Cstat_skin[npclastgeneratedn] = rand(30,70)
  148. Cstat_bodyhair[npclastgeneratedn] = rand(0,4)
  149. Cstat_breath[npclastgeneratedn] = 0
  150. Cstat_hipcurv[npclastgeneratedn] = 0
  151. Cstat_hgt[npclastgeneratedn] = 0
  152. Cstat_fat[npclastgeneratedn] = 0
  153. ! {Random pubic hair}
  154. Cstat_pubes[npclastgeneratedn] = rand(0,1)
  155. Cstat_hairlng[npclastgeneratedn] = 0
  156. Cstat_haircol[npclastgeneratedn] = 0
  157. Cstat_haircurl[npclastgeneratedn] = 0
  158. Cstat_tan[npclastgeneratedn] = 0
  159. Cstat_lip[npclastgeneratedn] = 0
  160. Cstat_lashes[npclastgeneratedn] = 0
  161. Cstat_eyesize[npclastgeneratedn] = 0
  162. Cstat_eyecol[npclastgeneratedn] = 0
  163. Cstat_dom[npclastgeneratedn] = 0
  164. Cstat_sub[npclastgeneratedn] = 0
  165. ! {Random glasses, grades, and other skills, based on age established above.}
  166. Cstat_glasses[npclastgeneratedn] = rand(0,1)
  167. Cstat_grades[npclastgeneratedn] = rand(40,100)
  168. Cstat_run[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  169. Cstat_vball[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  170. Cstat_nerd[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  171. Cstat_shoot[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  172. Cstat_sew[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  173. Cstat_serve[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  174. Cstat_chess[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  175. Cstat_dnc[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  176. Cstat_erodnc[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  177. Cstat_jab[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  178. Cstat_punch[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  179. Cstat_kick[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  180. Cstat_def[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  181. Cstat_sing[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  182. Cstat_teach[npclastgeneratedn] = rand(0,(npctempc2 + 10))
  183. ! {Starting at 0 quest state and love for the character, and slightly disliked.}
  184. Cstat_Qstlvl[npclastgeneratedn]= 0
  185. Cstat_rel[npclastgeneratedn] = 40
  186. Cstat_love[npclastgeneratedn] = 0
  187. ! {Start unemployed and unspecified location}
  188. Cstat_job[npclastgeneratedn] = 0
  189. Cstat_cloc[npclastgeneratedn] = 0
  190. ! {Unspecified dad and mom, and picture. We could have a stock group of pictures and have it pick based on certain attribute types, but...}
  191. $Cstat_dad[npclastgeneratedn] = 'U'
  192. $Cstat_mom[npclastgeneratedn] = 'U'
  193. $Cstat_pic[npclastgeneratedn] = 'xPICx'
  194. ! {STDs are not randomly given here. For characters with a STD, you need to gs npcgenext rstd. It will be expecting an npclastgeneratedn variable.}
  195. Cstat_herpes[npclastgeneratedn] = 0
  196. Cstat_syph[npclastgeneratedn] = 0
  197. Cstat_gon[npclastgeneratedn] = 0
  198. Cstat_chlam[npclastgeneratedn] = 0
  199. Cstat_Hiv[npclastgeneratedn] = 0
  200. Cstat_genwart[npclastgeneratedn] = 0
  201. Cstat_Thrush[npclastgeneratedn] = 0
  202. Cstat_Malen[npclastgeneratedn] = 0
  203. ! {Chemestry and clothing preference are unspecified}
  204. Cstat_Chem[npclastgeneratedn] = 0
  205. Cstat_Clothpref[npclastgeneratedn] = 0
  206. ! {Personality is called up}
  207. gs 'npcgenext', 'pers'
  208. $Cstat_PersType[npclastgeneratedn] = $npctempgn[6]
  209. $npclastgenerated = 'C' + npclastgeneratedn
  210. ! {Variables are cleaned up.}
  211. killvar '$npctempgn'
  212. killvar 'npctempc1'
  213. killvar 'npctempc2'
  214. killvar 'npctempgsex'
  215. killvar '$npctempgn'
  216. killvar 'npctempgage'
  217. --- npcgeneratec ---------------------------------