123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- # npcgeneratec
- ! {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.}
- !! {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.}
- npctempgsex = $ARGS[0]
- $npctempgn[0] = $ARGS[1]
- npctempgage = $ARGS[2]
- ! {First we set the newly generated index number or overwrite the first blank number}
- npclastgeneratedn = arrsize('$Cstat_PersType')
- if npclastgeneratedn > 0: npclastgeneratedn = arrpos('$Cstat_PersType', '')
- if npclastgeneratedn < 0 or $Cstat_PersType[npclastgeneratedn] ! '': npclastgeneratedn = arrsize('$Cstat_PersType')
- ! {Now we need a random birthday based on the rough age given.}
- npctempc1[1] = year - npctempgage
- npctempc1[2] = rand(1,12)
- if npctempc1[2] = 4 or npctempc1[2] = 6 or npctempc1[2] = 9 or npctempc1[2] = 11:
- npctempc1[3] = rand(1,30)
- 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:
- npctempc1[3] = rand(1,31)
- elseif ((npctempc1[1] mod 4 = 0) and (npctempc1[1] mod 100 ! 0)) or (npctempc1[1] mod 400 = 0):
- npctempc1[3] = rand(1,29)
- else
- npctempc1[3] = rand(1,28)
- end
- Cstat_dob[npclastgeneratedn] = npctempc1[1] * 10000
- Cstat_dob[npclastgeneratedn] += (npctempc1[2] * 100)
- Cstat_dob[npclastgeneratedn] += npctempc1[3]
- ! {Now, we set the variable for the stat randomization as well as calculate chance of virginity.}
- if npctempgage < 18:
- npctempc2[0] = 30
- npctempc2[1] = rand(0,20)
- else
- npctempc2[0] = 50
- npctempc2[1] = rand(19,24)
- end
- ! {We flag virginity based on the results of the check. Overwrite it after generation if you want to be sure of status.}
- if npctempc2[1] >= 20:
- $Cstat_firstpart[npclastgeneratedn] = 'U'
- $Cstat_lastpart[npclastgeneratedn] = 'U'
- $Cstat_kidpater[npclastgeneratedn] = 'N'
- else
- $Cstat_firstpart[npclastgeneratedn] = 'V'
- $Cstat_lastpart[npclastgeneratedn] = 'V'
- $Cstat_kidpater[npclastgeneratedn] = 'N'
- Cstat_sexskill[npclastgeneratedn] = 0
- end
- ! {Then we need to give it a name, and establish it''s official gender}
- if npctempgsex = 0:
- ! {Male}
- gs 'npcrnamefile', 'rusMale'
- gs 'npcgenext', 'dick'
- Cstat_gender[npclastgeneratedn] = 1
- Cstat_cyc[npclastgeneratedn] = -1
- Cstat_fert[npclastgeneratedn] = -1
- Cstat_spermpot[npclastgeneratedn] = 10000
- $Cstat_thdick[npclastgeneratedn] = npctempgn[4]
- Cstat_dick[npclastgeneratedn] = npctempgn[5]
- $Cstat_notes[npclastgeneratedn] = 'A male.'
- Cstat_bust[npclastgeneratedn] = 0
- Cstat_nips[npclastgeneratedn] = 1
- if npctempc2[1] >= 20:
- Cstat_hymen[npclastgeneratedn] = -1
- end
- elseif npctempgsex = 1:
- ! {Female}
- gs 'npcrnamefile', 'rusFemale'
- Cstat_gender[npclastgeneratedn] = 1
- Cstat_cyc[npclastgeneratedn] = rand(0,29)
- Cstat_fert[npclastgeneratedn] = 1
- Cstat_spermpot[npclastgeneratedn] = -1
- $Cstat_thdick[npclastgeneratedn] = 'clitoris'
- Cstat_dick[npclastgeneratedn] = rand(0,1)
- $Cstat_notes[npclastgeneratedn] = 'A female.'
- Cstat_bust[npclastgeneratedn]= rand(1,12)
- Cstat_nips[npclastgeneratedn] = rand(2,6)
- if npctempc2[1] >= 20:
- Cstat_hymen[npclastgeneratedn] = rand(4,6)
- else
- Cstat_hymen[npclastgeneratedn] = 0
- end
- elseif npctempgsex = 2:
- ! {HermFemale}
- gs 'npcrnamefile', 'rusFemale'
- gs 'npcgenext', 'dick'
- Cstat_gender[npclastgeneratedn] = 1
- Cstat_cyc[npclastgeneratedn] = rand(0,29)
- Cstat_fert[npclastgeneratedn] = 1
- Cstat_spermpot[npclastgeneratedn] = -1
- $Cstat_thdick[npclastgeneratedn] = 'clitoris'
- Cstat_dick[npclastgeneratedn] = npctempgn[5]
- $Cstat_notes[npclastgeneratedn] = 'A female Hermaphrodite.'
- Cstat_bust[npclastgeneratedn]= rand(1,10)
- Cstat_nips[npclastgeneratedn] = rand(1,5)
- if npctempc2[1] >= 20:
- Cstat_hymen[npclastgeneratedn] = rand(0,6)
- if Cstat_hymen[npclastgeneratedn] < 4 and Cstat_hymen[npclastgeneratedn] > 0: Cstat_hymen[npclastgeneratedn] = 4
- else
- Cstat_hymen[npclastgeneratedn] = 0
- end
- else
- ! {HermMale}
- gs 'npcrnamefile', 'rusMale'
- gs 'npcgenext', 'dick'
- Cstat_gender[npclastgeneratedn] = 0
- Cstat_cyc[npclastgeneratedn] = -1
- Cstat_fert[npclastgeneratedn] = -1
- Cstat_spermpot[npclastgeneratedn] = 10000
- $Cstat_thdick[npclastgeneratedn] = npctempgn[4]
- Cstat_dick[npclastgeneratedn] = npctempgn[5]
- $Cstat_notes[npclastgeneratedn] = 'A male Hermaphrodite.'
- Cstat_bust[npclastgeneratedn]= rand(0,1)
- Cstat_nips[npclastgeneratedn] = rand(1,3)
- if npctempc2[1] >= 20:
- Cstat_hymen[npclastgeneratedn] = rand(0,6)
- if Cstat_hymen[npclastgeneratedn] < 4 and Cstat_hymen[npclastgeneratedn] > 0: Cstat_hymen[npclastgeneratedn] = 4
- else
- Cstat_hymen[npclastgeneratedn] = 0
- end
- end
- ! {Then we set the names, and the stat high ends as determined earlier.}
- gs 'npcrnamefile', 'rusSur'
- $Cstat_firstname[npclastgeneratedn] = $npctempgn[1]
- $Cstat_nickname[npclastgeneratedn] = $npctempgn[2]
- $Cstat_lastname[npclastgeneratedn] = $npctempgn[3]
- $Cstat_usedname[npclastgeneratedn] = $npctempgn[0]
- Cstat_vit[npclastgeneratedn] = rand(1,npctempc2)
- Cstat_str[npclastgeneratedn] = rand(1,npctempc2)
- Cstat_int[npclastgeneratedn] = rand(1,npctempc2)
- Cstat_agil[npclastgeneratedn] = rand(1,npctempc2)
- Cstat_spirit[npclastgeneratedn] = rand(1,npctempc2)
- ! {Then we call out other stats}
- Cstat_mag[npclastgeneratedn] = 0
- Cstat_drunk[npclastgeneratedn] = 0
- Cstat_undies[npclastgeneratedn] = 0
- Cstat_vag[npclastgeneratedn] = 0
- Cstat_ass[npclastgeneratedn] = 0
- ! {NPCs start with random horniness}
- Astat_horny[npclastgeneratedn] = rand(0,60)
- Cstat_Pavrep[npclastgeneratedn] = 0
- Cstat_Godrep[npclastgeneratedn] = 0
- ! {Random attractiveness}
- Cstat_app[npclastgeneratedn] = rand(30,60)
- Cstat_lipstick[npclastgeneratedn] = 0
- Cstat_makeup[npclastgeneratedn] = 0
- Cstat_sweat[npclastgeneratedn] = 0
- Cstat_dye[npclastgeneratedn] = 0
- Cstat_hair[npclastgeneratedn] = 0
- ! {Random skin quality and body hair}
- Cstat_skin[npclastgeneratedn] = rand(30,70)
- Cstat_bodyhair[npclastgeneratedn] = rand(0,4)
- Cstat_breath[npclastgeneratedn] = 0
- Cstat_hipcurv[npclastgeneratedn] = 0
- Cstat_hgt[npclastgeneratedn] = 0
- Cstat_fat[npclastgeneratedn] = 0
- ! {Random pubic hair}
- Cstat_pubes[npclastgeneratedn] = rand(0,1)
- Cstat_hairlng[npclastgeneratedn] = 0
- Cstat_haircol[npclastgeneratedn] = 0
- Cstat_haircurl[npclastgeneratedn] = 0
- Cstat_tan[npclastgeneratedn] = 0
- Cstat_lip[npclastgeneratedn] = 0
- Cstat_lashes[npclastgeneratedn] = 0
- Cstat_eyesize[npclastgeneratedn] = 0
- Cstat_eyecol[npclastgeneratedn] = 0
- Cstat_dom[npclastgeneratedn] = 0
- Cstat_sub[npclastgeneratedn] = 0
- ! {Random glasses, grades, and other skills, based on age established above.}
- Cstat_glasses[npclastgeneratedn] = rand(0,1)
- Cstat_grades[npclastgeneratedn] = rand(40,100)
- Cstat_run[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_vball[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_nerd[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_shoot[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_sew[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_serve[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_chess[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_dnc[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_erodnc[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_jab[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_punch[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_kick[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_def[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_sing[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- Cstat_teach[npclastgeneratedn] = rand(0,(npctempc2 + 10))
- ! {Starting at 0 quest state and love for the character, and slightly disliked.}
- Cstat_Qstlvl[npclastgeneratedn]= 0
- Cstat_rel[npclastgeneratedn] = 40
- Cstat_love[npclastgeneratedn] = 0
- ! {Start unemployed and unspecified location}
- Cstat_job[npclastgeneratedn] = 0
- Cstat_cloc[npclastgeneratedn] = 0
- ! {Unspecified dad and mom, and picture. We could have a stock group of pictures and have it pick based on certain attribute types, but...}
- $Cstat_dad[npclastgeneratedn] = 'U'
- $Cstat_mom[npclastgeneratedn] = 'U'
- $Cstat_pic[npclastgeneratedn] = 'xPICx'
- ! {STDs are not randomly given here. For characters with a STD, you need to gs npcgenext rstd. It will be expecting an npclastgeneratedn variable.}
- Cstat_herpes[npclastgeneratedn] = 0
- Cstat_syph[npclastgeneratedn] = 0
- Cstat_gon[npclastgeneratedn] = 0
- Cstat_chlam[npclastgeneratedn] = 0
- Cstat_Hiv[npclastgeneratedn] = 0
- Cstat_genwart[npclastgeneratedn] = 0
- Cstat_Thrush[npclastgeneratedn] = 0
- Cstat_Malen[npclastgeneratedn] = 0
- ! {Chemestry and clothing preference are unspecified}
- Cstat_Chem[npclastgeneratedn] = 0
- Cstat_Clothpref[npclastgeneratedn] = 0
- ! {Personality is called up}
- gs 'npcgenext', 'pers'
- $Cstat_PersType[npclastgeneratedn] = $npctempgn[6]
- $npclastgenerated = 'C' + npclastgeneratedn
- ! {Variables are cleaned up.}
- killvar '$npctempgn'
- killvar 'npctempc1'
- killvar 'npctempc2'
- killvar 'npctempgsex'
- killvar '$npctempgn'
- killvar 'npctempgage'
- --- npcgeneratec ---------------------------------
|