Jump to content

Sexout Modder Support


Recommended Posts

Posted

Thanks for the help UDLR! Now it wrks like a charm.

Now I only ave to add an afterSexEffect and a percentage chance for them to approach and the first gang will be available for Sexout!

  • 2 weeks later...
Posted (edited)

Hi UDLR,

You may have noticed I'm currently working on a Sexout Pregnancy mod, it seems to be going well so far and I haven'd had to change any existing scripts, my issue at the moment seems to be detecting that sex in the vagina has occured. I've attached a bit of the main code so I can get your thoughts on whether you see any issues with doing it the way I have, any comments you have are welcome :)

This threads been a great help for information too :)

scn SexoutPregQuestScript

;***Calculates Fertility and Pregnancy Chance and Stages

short iPeakFertLevel ; Linked to Player Age, Endurance, Arousal & Contraceptive/ Morning after Drugs.
short iFertLength ; 1 day to 2 months?
short iFertPercInfertile ; When in cycle pregnancy possibility is only 1%
short iFertPeakHour ; Time of day cycle peaks fertility curve based to and from this point
float fFertLevelPerc ; Fertility Level Percentage
float fFertStagePercBase ; Fertility Stage Percentage Base
float fFertStagePerc ; Fertility Stage Percentage
short iPillPerc
short iJabPerc
short iProtection

short iSemenFertility ; Is Dad a Stud or Dud?
short iSemenAmount ; Was it a Dripping Tap or Firehose event?
short iSemenLifeTimer ; How long they are potent, 0 - 24 hours?
short iSemenRace ;
short iSemenMaleChance ; Male or Female Modifier
short iSemenPregDuration ; Microwave or oven baked? Depandant on SpermRace ranging from an hour to maybe 50 days?

short iChildRace ; Probably whatever the Father was, maybe Alien stomach bursting animations required.
short iChildSize ; How damned big is it?
short iChildHealth ; Is it Ok, linked to Mothers Health, Starvation & Thirst.
short iChildMaxHealth ; Is it sick affected by Radiation, Poison, Drugs, Combat Damage etc.
short iChildGender ; 1-Male 2-Female
short iChildFaction ; Will it try to eat mommy?

short fPregPerc ; Pregnancy Stage percentage
short iBirthDamage ; Dependant on how big it is and what it is.
short iNumPreg ; Number of Times Pregnant

float fCurrentTime
short iCurrentHour
;float fLastRunTime
;short iScansMissed
short iFertLengthSeconds
;float fFertStepInc
short iPregChance
float fInc
short iNumVag
float fFertSeconds

ref self
ref male
ref raper

Begin GameMode

;***Setup

Set self to player

If fCurrentTime == 0
self.AddItem SexoutPregBook 1 1
self.AddItem SexoutPregBirthControlShot 1 1
self.AddItem SexoutPregBunAway 1 1
self.AddItem SexoutPregContraceptivePill 10 1
Set iPeakFertLevel to 20
Set iFertLength to 72
Set iFertPercInfertile to 70
Set iFertPeakHour to 12
Set fInc to .5
Set iNumVag to Sexout.numVaginal
;Set fLastRunTime to GetCurrentTime
endif

;***Calculate time missed since last run

Set fCurrentTime to GetCurrentTime
;if fCurrentTime < fLastRunTime
; Set fCurrentTime to fCurrentTime + 24
;endif
;If iScansMissed == 0
; Set iScansMissed to (fCurrentTime - fLastRunTime) * 360
;endif
;if iScansMissed > 0

Set iFertLengthSeconds to iFertLength * 24 * 360
Set fFertStagePerc to fFertSeconds / iFertLengthSeconds * 100
Set fFertSeconds to fFertSeconds + .5

;*** If Not Pregnant Ferctility Cycle Calculations

if fPregPerc <= 0
;ShowMessage SexoutPregDebug iScansMissed fFertStepInc fFertStagePerc fFertLevelPerc

;***Fertility Cycle

If fFertStagePerc > iFertPercInfertile
Set fFertSeconds to fFertSeconds + .5
endif
if fFertStagePerc > 100
Set fFertStagePerc to 0
Set fFertLevelPerc to 1
endif

if self.IsSpellTarget SexoutPregBunAway
Set fFertLevelPerc to fFertLevelPerc - 70
endif
if self.IsSpellTarget SexoutPregBirthControlShot
Set fFertLevelPerc to fFertLevelPerc - 50
endif
if self.IsSpellTarget SexoutPregContraceptivePill
Set fFertLevelPerc to fFertLevelPerc - 40
endif
if fFertLevelPerc < 0 || fFertStagePerc < iFertPercInfertile
Set fFertLevelPerc to .1
endif
Set iCurrentHour to GetCurrentTime
if iCurrentHour == iFertPeakHour
Set fFertLevelPerc to fFertLevelPerc + 1
endif
if fFertLevelPerc > 20
player.AddSpell SexoutPregFertile
endif
if fFertLevelPerc > 100
Set fFertLevelPerc to 100
endif
if fFertLevelPerc > iPeakFertLevel
Set fFertLevelPerc to iPeakFertLevel
endif

;***Ejaculate Check

if self.GetItemCount 00SexoutRapee
Set raper to Sexout.raper
endif
if self.GetItemCount 00SexoutRecovering && Sexout.numVaginal > iNumVag
Set iNumVag to Sexout.numVaginal
if raper.IsSpellTarget SexoutCondom
Set iProtection to (Sexout.pctprotection + 20) / 100
endif

if raper.GetIsSex male
; Human 'Male' Female raping
self.AddSpell SexoutPregEjaculateHuman
Set iSemenFertility to 80
Set iSemenAmount to iProtection * 50
Set iSemenLifeTimer to 6
Set iSemenRace to 1
Set iSemenMaleChance to 50
Set iSemenPregDuration to 120

elseif raper.GetInFaction CentaurFaction == 1 && GetRandomPercent > 10
; Sex with centaur
self.AddSpell SexoutPregEjaculateCentaur
Set iSemenFertility to 1
Set iSemenAmount to iProtection * 30
Set iSemenLifeTimer to 4
Set iSemenRace to 1
Set iSemenMaleChance to 50
Set iSemenPregDuration to 1200

elseif raper.GetIsCreatureType 4 && GetRandomPercent > 10
; Sex with super mutant
self.AddSpell SexoutPregEjaculateSMutant
Set iSemenFertility to 1
Set iSemenAmount to iProtection * 100
Set iSemenLifeTimer to 6
Set iSemenRace to 1
Set iSemenMaleChance to 60
Set iSemenPregDuration to 1800

elseif raper.GetInFaction DeathClawFaction == 1 && GetRandomPercent > 10
; Sex with Deathclaw
self.AddSpell SexoutPregEjaculateDeathclaw
Set iSemenFertility to 10
Set iSemenAmount to iProtection * 100
Set iSemenLifeTimer to 8
Set iSemenRace to 1
Set iSemenMaleChance to 80
Set iSemenPregDuration to 2400

elseif (raper.GetInFaction DogFaction || male.GetInFaction VCrCoyoteFaction) &&

GetRandomPercent > 20
; Sex with dog
self.AddSpell SexoutPregEjaculateDog
Set iSemenFertility to 10
Set iSemenAmount to iProtection * 20
Set iSemenLifeTimer to 2
Set iSemenRace to 1
Set iSemenMaleChance to 70
Set iSemenPregDuration to 800

elseif raper.GetIsCreatureType 5 && GetRandomPercent > 50
; Sex with feral ghoul
self.AddSpell SexoutPregEjaculateGhoul
Set iSemenFertility to 1
Set iSemenAmount to iProtection * 10
Set iSemenLifeTimer to 4
Set iSemenRace to 1
Set iSemenMaleChance to 50
Set iSemenPregDuration to 1000

elseif raper.GetInFaction SporePlantFaction == 1
; Sex with spore carrier
self.AddSpell SexoutPregEjaculateSpore
Set iSemenFertility to 80
Set iSemenAmount to iProtection * 100
Set iSemenLifeTimer to 24
Set iSemenRace to 1
Set iSemenMaleChance to 30
Set iSemenPregDuration to 400
endif
endif

;***Semen Life Cycle

If iSemenAmount > 0
Set iSemenLifeTimer to iSemenLifeTimer - 1
if iSemenLifeTimer < 1
Set iSemenAmount to iSemenAmount * GetRandomPercent / 100
endif
else
Set iSemenAmount to 0
endif

;***Chance for Pregnancy

set iPregChance to (iSemenFertility * iSemenAmount/100) * (GetRandomPercent / 100)
if iPregChance > 100 - fFertLevelPerc
ShowMessage SexoutPregDebugPregnant
Set fPregPerc to 1
Set fFertStagePerc to 0
Set fFertLevelPerc to 0
Set iChildRace to iSemenRace
if GetRandomPercent < iSemenMaleChance
Set iChildGender to 1
else
Set iChildGender to 2
endif
Set iNumPreg to iNumPreg + 1
Set iSemenAmount to 0
endif
endif

;*** If Pregnant Pregnancy Code

if fPregPerc > 1
Set fPregPerc to fPregPerc + .01
If fPregPerc < 31
self.EquipItem SexoutPregToken1stTriM
self.AddSpell SexoutPreg1stTriM
elseif fPregPerc > 30 && fPregPerc <61
self.EquipItem SexoutPregToken2ndTriM
self.AddSpell SexoutPreg2ndTriM
if self.GetEquipped SexoutPregTightClothesLIST
self.AddSpell SexoutPregTightClothes
endif
elseif fPregPerc > 60
self.EquipItem SexoutPregToken3rdTriM
self.AddSpell SexoutPreg3rdTriM
if self.GetEquipped SexoutPregTightClothesLIST
self.AddSpell SexoutPregReallyTightClothes
endif
endif
If fPregPerc > 100
self.AddSpell SexoutPregContractions
Set fPregPerc to 100
endif
endif

;****Pregnancy Code Delay by one Scan

if fPregPerc == 1
Set fPregPerc to 2
endif
;endif
End
[/php] Edited by Halstrom
Posted

Hi UDLR' date='

 

You may have noticed I'm currently working on a Sexout Pregnancy mod, it seems to be going well so far and I haven'd had to change any existing scripts, my issue at the moment seems to be detecting that sex in the vagina has occured. I've attached a bit of the main code so I can get your thoughts on whether you see any issues with doing it the way I have, any comments you have are welcome :)

 

This threads been a great help for information too :)

 

scn SexoutPregQuestScript

;***Calculates Fertility and Pregnancy Chance and Stages

short iPeakFertLevel ; Linked to Player Age, Endurance, Arousal & Contraceptive/ Morning after Drugs. 
short iFertLength ; 1 day to 2 months?
short iFertPercInfertile ; When in cycle pregnancy possibility is only 1%
short iFertPeakHour ; Time of day cycle peaks fertility curve based to and from this point
float fFertLevelPerc ; Fertility Level Percentage
float fFertStagePercBase ; Fertility Stage Percentage Base
float fFertStagePerc ; Fertility Stage Percentage
short iPillPerc
short iJabPerc
short iProtection

short iSemenFertility ; Is Dad a Stud or Dud?
short iSemenAmount ; Was it a Dripping Tap or Firehose event?
short iSemenLifeTimer ; How long they are potent, 0 - 24 hours?
short iSemenRace ; 
short iSemenMaleChance ; Male or Female Modifier
short iSemenPregDuration ; Microwave or oven baked? Depandant on SpermRace ranging from an hour to maybe 50 days?

short iChildRace ; Probably whatever the Father was, maybe Alien stomach bursting animations required.
short iChildSize ; How damned big is it?
short iChildHealth ; Is it Ok, linked to Mothers Health, Starvation & Thirst. 
short iChildMaxHealth ; Is it sick affected by Radiation, Poison, Drugs, Combat Damage etc.
short iChildGender ;  1-Male 2-Female
short iChildFaction ; Will it try to eat mommy?

short fPregPerc ; Pregnancy Stage percentage
short iBirthDamage ; Dependant on how big it is and what it is.
short iNumPreg ; Number of Times Pregnant

float fCurrentTime
short iCurrentHour
;float fLastRunTime
;short iScansMissed
short iFertLengthSeconds
;float fFertStepInc
short iPregChance
float fInc
short iNumVag
float fFertSeconds

ref self
ref male
ref raper

Begin GameMode

;***Setup

Set self to player

If fCurrentTime == 0
	self.AddItem SexoutPregBook 1 1
	self.AddItem SexoutPregBirthControlShot 1 1
	self.AddItem SexoutPregBunAway 1 1
	self.AddItem SexoutPregContraceptivePill 10 1
	Set iPeakFertLevel to 20 
	Set iFertLength to 72
	Set iFertPercInfertile to 70
	Set iFertPeakHour to 12
	Set fInc to .5
	Set iNumVag to Sexout.numVaginal
	;Set fLastRunTime to GetCurrentTime
endif

;***Calculate time missed since last run

Set fCurrentTime to GetCurrentTime
;if fCurrentTime < fLastRunTime
;	Set fCurrentTime to fCurrentTime + 24
;endif
;If iScansMissed == 0	
;	Set iScansMissed to (fCurrentTime - fLastRunTime) * 360
;endif
;if iScansMissed > 0

	Set iFertLengthSeconds to iFertLength * 24 * 360
	Set fFertStagePerc to fFertSeconds / iFertLengthSeconds * 100
	Set fFertSeconds to fFertSeconds + .5

;*** If Not Pregnant Ferctility Cycle Calculations

	if fPregPerc <= 0
		;ShowMessage SexoutPregDebug iScansMissed fFertStepInc fFertStagePerc fFertLevelPerc

;***Fertility Cycle		

		If fFertStagePerc > iFertPercInfertile
			Set fFertSeconds to fFertSeconds + .5
		endif
		if fFertStagePerc > 100
			Set fFertStagePerc to 0
			Set fFertLevelPerc to 1
		endif

		if self.IsSpellTarget SexoutPregBunAway 
			Set fFertLevelPerc to fFertLevelPerc - 70
		endif
		if self.IsSpellTarget SexoutPregBirthControlShot 
			Set fFertLevelPerc to fFertLevelPerc - 50
		endif
		if self.IsSpellTarget SexoutPregContraceptivePill
			Set fFertLevelPerc to fFertLevelPerc - 40
		endif
		if fFertLevelPerc < 0 || fFertStagePerc < iFertPercInfertile
			Set fFertLevelPerc to .1
		endif
		Set iCurrentHour to GetCurrentTime
		if iCurrentHour == iFertPeakHour
			Set fFertLevelPerc to fFertLevelPerc + 1
		endif				
		if fFertLevelPerc > 20
			player.AddSpell SexoutPregFertile
		endif
		if fFertLevelPerc > 100
			Set fFertLevelPerc to 100
		endif
		if fFertLevelPerc > iPeakFertLevel
			Set fFertLevelPerc to iPeakFertLevel		
		endif

;***Ejaculate Check

		if self.GetItemCount 00SexoutRapee
			Set raper to Sexout.raper
		endif
		if self.GetItemCount 00SexoutRecovering && Sexout.numVaginal > iNumVag
			Set iNumVag to Sexout.numVaginal
			if raper.IsSpellTarget SexoutCondom
				Set iProtection to (Sexout.pctprotection + 20) / 100
			endif

			if raper.GetIsSex male
				; Human 'Male' Female raping
				self.AddSpell SexoutPregEjaculateHuman
				Set iSemenFertility to 80
				Set iSemenAmount to iProtection * 50
				Set iSemenLifeTimer to 6
				Set iSemenRace to 1 
				Set iSemenMaleChance to 50
				Set iSemenPregDuration to 120

			elseif raper.GetInFaction CentaurFaction == 1 && GetRandomPercent > 10
				; Sex with centaur
				self.AddSpell SexoutPregEjaculateCentaur
				Set iSemenFertility to 1
				Set iSemenAmount to iProtection * 30
				Set iSemenLifeTimer to 4
				Set iSemenRace to 1 
				Set iSemenMaleChance to 50
				Set iSemenPregDuration to 1200

			elseif raper.GetIsCreatureType 4 && GetRandomPercent > 10
				; Sex with super mutant
				self.AddSpell SexoutPregEjaculateSMutant
				Set iSemenFertility to 1
				Set iSemenAmount to iProtection * 100
				Set iSemenLifeTimer to 6
				Set iSemenRace to 1 
				Set iSemenMaleChance to 60
				Set iSemenPregDuration to 1800

			elseif raper.GetInFaction DeathClawFaction == 1 && GetRandomPercent > 10
				; Sex with Deathclaw
				self.AddSpell SexoutPregEjaculateDeathclaw
				Set iSemenFertility to 10
				Set iSemenAmount to iProtection * 100
				Set iSemenLifeTimer to 8
				Set iSemenRace to 1 
				Set iSemenMaleChance to 80
				Set iSemenPregDuration to 2400

			elseif (raper.GetInFaction DogFaction || male.GetInFaction VCrCoyoteFaction)  && 

GetRandomPercent > 20
				; Sex with dog
				self.AddSpell SexoutPregEjaculateDog
				Set iSemenFertility to 10
				Set iSemenAmount to iProtection * 20
				Set iSemenLifeTimer to 2
				Set iSemenRace to 1 
				Set iSemenMaleChance to 70
				Set iSemenPregDuration to 800

			elseif raper.GetIsCreatureType 5 && GetRandomPercent > 50
				; Sex with feral ghoul
				self.AddSpell SexoutPregEjaculateGhoul
				Set iSemenFertility to 1
				Set iSemenAmount to iProtection * 10
				Set iSemenLifeTimer to 4
				Set iSemenRace to 1 
				Set iSemenMaleChance to 50
				Set iSemenPregDuration to 1000

			elseif raper.GetInFaction SporePlantFaction == 1
				; Sex with spore carrier
				self.AddSpell SexoutPregEjaculateSpore
				Set iSemenFertility to 80
				Set iSemenAmount to iProtection * 100
				Set iSemenLifeTimer to 24
				Set iSemenRace to 1 
				Set iSemenMaleChance to 30
				Set iSemenPregDuration to 400
			endif
		endif

;***Semen Life Cycle

		If iSemenAmount > 0
			Set iSemenLifeTimer to iSemenLifeTimer - 1
			if iSemenLifeTimer < 1
				Set iSemenAmount to iSemenAmount * GetRandomPercent / 100
			endif
		else
			Set iSemenAmount to 0
		endif

;***Chance for Pregnancy

		set iPregChance to (iSemenFertility * iSemenAmount/100) * (GetRandomPercent / 100)
		if iPregChance > 100 - fFertLevelPerc
			ShowMessage SexoutPregDebugPregnant
			Set fPregPerc to 1
			Set fFertStagePerc to 0
			Set fFertLevelPerc to 0
			Set iChildRace to iSemenRace
			if GetRandomPercent < iSemenMaleChance
				Set iChildGender to 1
			else
				Set iChildGender to 2
			endif
			Set iNumPreg to iNumPreg + 1
			Set iSemenAmount to 0
		endif
	endif

;*** If Pregnant Pregnancy Code

	if fPregPerc > 1
		Set fPregPerc to fPregPerc + .01
		If fPregPerc < 31
			self.EquipItem SexoutPregToken1stTriM
			self.AddSpell SexoutPreg1stTriM
		elseif fPregPerc > 30 && fPregPerc <61
			self.EquipItem SexoutPregToken2ndTriM
			self.AddSpell SexoutPreg2ndTriM
			if self.GetEquipped SexoutPregTightClothesLIST
				self.AddSpell SexoutPregTightClothes
			endif
		elseif fPregPerc > 60
			self.EquipItem SexoutPregToken3rdTriM
			self.AddSpell SexoutPreg3rdTriM
			if self.GetEquipped SexoutPregTightClothesLIST
				self.AddSpell SexoutPregReallyTightClothes
			endif
		endif
		If fPregPerc > 100
			self.AddSpell SexoutPregContractions
			Set fPregPerc to 100
		endif
	endif

;****Pregnancy Code Delay by one Scan

	if fPregPerc  == 1
		Set fPregPerc to 2
	endif
;endif
End

[/php']

 

 

***Setup

It's possible for GetCurrentTime to return 0, which would cause that block to run again the next time the script runs if you leave it the way it is. Also, there's no need to set self to player each time, just needs to be done once.

If init == 0
	set init to 1
	set self to player
	self.AddItem SexoutPregBook 1 1
	self.AddItem SexoutPregBirthControlShot 1 1
	self.AddItem SexoutPregBunAway 1 1
	self.AddItem SexoutPregContraceptivePill 10 1
	Set iPeakFertLevel to 20 
	Set iFertLength to 72
	Set iFertPercInfertile to 70
	Set iFertPeakHour to 12
	Set fInc to .5
	Set iNumVag to Sexout.numVaginal
	;Set fLastRunTime to GetCurrentTime
endif

You would also, obviously, have to declare short init at the top somewhere.

 

 

 

***Calculate time missed since last run

You can just call GetSecondsPassed, which will give you this value.

 

 

 

***Ejaculate Check

if self.GetItemCount 00SexoutRapee
  Set raper to Sexout.raper
endif

This will not work. It will just give you the value of 0. As soon as the sex system starts two people, it resets all relevant Sexout variables to 0, so that it's ready for another pair.

 

Due to limitations of GECK and NVSE, there is currently no way to retrieve the partner of someone engaged in sex.

 

Since it is 0, all later things like raper.GetIsSex male will cause the script to error and stop execution.

 

 

Next, this line wont work reliably:

if self.GetItemCount 00SexoutRecovering && Sexout.numVaginal > iNumVag

The recovering state is only 2 seconds long. Quest scripts run every 5 seconds. This means there is ample opportunity for the script to entirely miss the recovering state. Instead, I would just do

if Sexout.numVaginal > iNumVag
  set iNumVag to Sexout.numVaginal
  ...

The counters aren't updated until the recovering state begins, so you don't have to worry about this happening while they're still going at it.

 

 

 

Since, by the looks of it, knowing who the parter is is important, this is the only way I can think of to find out.

ref scan
ref partner
short isRape
short scanLoop
set partner to 0
set isRape to 0
set scanLoop to 1
set scan to GetFirstRef 200

label scanLoop

if scan
  if scan.GetDistance player < 100 && scan.getItemCount 00SexoutActor
     set partner to scan
     if scan.GetItemCount 00SexoutRaper
        is isRape to 1
     endif
  else
     set scan to GetNextRef
     Goto scanLoop
  endif
endif

if partner
  ; partner was found, is in variable 'partner'
else
  ; partner could not be found
endif

This isn't perfect, its possible for another pair to be very close.

 

 

Also, as a general note, you should check both participants for 00SexoutCondom. For simplicity reasons, the effect can be on either / both participant.

if partner.IsSpellTarget SexoutCondom || self.IsSpellTarget SexoutCondom
  Set iProtection to (Sexout.pctprotection + 20) / 100
endif

 

 

 

 

Hope that helps.

Posted

Hope that helps.

 

Thanks heaps those little snippets have probably saved me hours of headbanging, hopefully will hit beta this week :)

 

I was hoping to get around the 5 second quest script thing by setting the quest script to .5 or 1 second, less laggy the better of course, I'll give it a go :)

  • 3 weeks later...
Posted

Hi again UDLR,

 

Another quick question, I've had a quick look, but it's eluding me and I have bigger fish to fry in this mod.

 

I have an abortion script I want to add to the Sexout Doctors options as a surgical proceedure and perhaps other doctors, can you give me a quick hint on how to do it, I'm not so crash hot with dialogue stuff, but should be able to work it out when I know where to start :)

 

I'm also looking at replacing the item used by F to F Rapists with something the Impregnivibe 3000 as soon as someone gets me a model for it :)

 

BTW I have no problems if you wished to move any of my sperm Effects for different creatures into the main Sexout, so they could be used by others for things like SMutant sex damage etc. I'm currently toying with them as part of my mod but then it's really more a basic core effect or Rapers thing , but I also don't want a pregnancy mod to be dependant on other plugins or others to be reliant on my plugin so the main file may best.

 

And I'm ready for any other creatures you may add too, a couple of Robots or Insects perhaps if we can get someone to do the animations you need?

Posted

As most of you have heard or experienced by now I am having some problems with the scripts I use to get the PC approached in the tryout plugins. I am going to post them here now and hope that you all can have a look at it so we might figure out what the problem is.

 

Here is the quests script:

scn 00SexoutKhansQuestScript

short init
short while
short restrictwhile
short emptywhile
short empty2while
short populatewhile

; Fuckable Followers
short pcass
short pveronica

; Settings
short useGangers
short stalkrate
short stalkplayer
short stalkfollowers
short restricted

; Stalking rates
short rateMM
short rateMF
short rateFM
short rateFF

Begin GameMode

; if player hasn't finished intro quest
if GetStage VCG01 < 200
	return
endif

if init == 0
	set init to 1

	set while to 0
	set restrictwhile to 2
	set emptywhile to 3
	set populatewhile to 4
	set empty2while to 5

	set useGangers to 1
	set stalkrate to 10
	set stalkplayer to 1
	set stalkfollowers to 1

	set rateMM to 0
	set rateMF to 36
	set rateFM to 0
	set rateFF to 0

endif

; Check for fuckable followers
if vNPCFollowers.bCassHired == 1
	set pcass to 1
else
	set pcass to 0
endif
if vNPCFollowers.bVeronicaHired == 1
	set pveronica to 1
else
	set pveronica to 0
endif

;
; If in a restriced cell, don't create stalkers
;
short restrictscan
set restrictscan to ListGetCount SexoutListRestrictedCell
if restrictscan
	ref cell
	short count
	short found
	set count to 0
	set found to 0

	Label restrictwhile

	if count < restrictscan
		set cell to ListGetNthForm SexoutListRestrictedCell count
		set count to count + 1
		if player.GetInCell cell
			set found to 1
		else
			Goto restrictwhile
		endif
	endif

	if restricted != found
		set restricted to found
	endif
endif

if useGangers == 0 || restricted
	return
endif

;
; Build scanning list
;

; empty stalkable list
set count to ListGetCount SexoutKhansListStalkerScan
label emptywhile
if count
	set count to count - 1
	ListRemoveNthForm SexoutKhansListStalkerScan count
	goto emptywhile
endif

; Empty Stalkers list
set count to ListGetCount SexoutKhansListStalkers
label empty2while
if count
	set count to count - 1
	ListRemoveNthForm SexoutKhansListStalkers count
	goto empty2while
endif

; Set variables to see if men and women can be stalkers
short manStalk
short femStalk
set manStalk to rateMF + rateMM
set femStalk to rateFM + rateFF

; Populate list with surrounding NPCs
ref scan
set scan to GetFirstRef 200
Label populatewhile
if scan
	; Add to stalkable list
	if scan.IsInList SexoutListBannedActor || scan.GetDisabled || scan.GetDead || scan.GetUnconscious || scan.GetIsCreature || scan.IsChild || scan.IsInList SexoutKhansListBannedActor
		; Just get rid of the dead meat...
	elseif scan.GetPlayerTeammate && stalkfollowers
		ListAddForm SexoutKhansListStalkerScan scan
	endif

	; Check if suitable stalker
	if scan.IsInList SexoutKhansListBannedActor || scan.IsInList SexoutListBannedActor || scan.GetDead || scan.GetDisabled || scan.GetRestrained || scan.GetUnconscious || scan.GetKnockedState || scan.GetItemCount 00SexoutActor || scan.IsChild || scan.IsSpellTarget SexoutKhansOldEffect || scan.GetCombatTarget || scan.IsSpellTarget SexoutKhansEffect || scan.GetPlayerTeammate
	; Get rid of the unsuitable ones		
	else
		if manStalk && scan.GetIsSex Male && scan.GetInFaction vGreatKhansDialogueFaction
			ListAddForm SexoutKhansListStalkers scan
		elseif femStalk && scan.GetIsSex Female && scan.GetInFaction vGreatKhansDialogueFaction
			ListAddForm SexoutKhansListStalkers scan
		endif
	endif
	set scan to GetNextRef
	Goto populatewhile
endif

;
; Add player to list
;
if stalkplayer && 0 == player.IsInList SexoutListBannedActor && 0 == player.IsInList SexoutKhansListBannedActor
	ListAddForm SexoutKhansListStalkerScan player
elseif stalkplayer == 0 && player.IsInList SexoutKhansListStalkerScan
	ListRemoveForm SexoutKhansListStalkerScan player
endif

; Go through stalker list and select a few to become stalkers
short scanchance
set scanchance to ListGetCount SexoutKhansListStalkers
set count to scanchance
if count > 0
	set scanchance to 500 / scanchance
endif
ref stalker

label while
if count
	set count to count - 1
	set stalker to ListGetNthForm SexoutKhansListStalkers count
	if GetRandomPercent < scanchance
		stalker.CIOS SexoutKhansEffect
	endif
	goto while
endif

End

 

And here is the Effect script:

scn 00SexoutKhansEffectSCRIPT

ref self
short started
short chasing
short going
ref walkAI
ref goal

float chasetimer

Begin ScriptEffectStart


short hkhans
short khanschance
set self to GetSelf
if khanschance == 0
	set khanschance to 36
endif

if GetRandomPercent < khanschance
	set hkhans to 1
else
	set hkhans to 0
endif

if hkhans == 1 
	if player.GetItemCount 00SexoutActor == 0
		set goal to player
		set walkAI to SexoutKhansWalkToPlayer
	elseif SexoutKhans.pcass == 1 && RoseofSharonCassidyREF.GetItemCount 00SexoutActor == 0
		set goal to RoseofSharonCassidyREF
		set walkAI to SexoutKhansWalkToCass
	elseif SexoutKhans.pveronica == 1 && VeronicaREF.GetItemCount 00SexoutActor == 0
		set goal to VeronicaREF
		set walkAI to SexoutKhansWalkToVeronica
	endif
else
	self.CIOS SexoutKhansOldEffect
	dispel SexoutKhansEffect
	return
endif

set chasetimer to 30
set chasing to 1

End


Begin ScriptEffectUpdate

if 0 == self
	return
endif

if chasing
	if chasetimer > 0
		set chasetimer to chasetimer - GetSecondsPassed
	else
		; 30 seconds passed, haven't caught target yet, give up
		if self.GetIsCurrentPackage walkAI
			self.RemoveScriptPackage walkAI
		endif
		self.EvaluatePackage
		set self to 0

		dispel SexoutKhansEffect
		return		
	endif

	; If player starts having sex, go back to previous task
	if goal.GetItemCount 00SexoutActor
	short redirect
		if hkhans == 1
			if player.GetItemCount 00SexoutActor == 0
				set goal to player
				set walkAI to SexoutKhansWalktoPlayer
				set redirect to 1
			elseif SexoutKhans.pcass && RoseofSharonCassidyREF.GetItemCount 00SexoutActor == 0
				set goal to RoseofSharonCassidyREF
				set walkAI to SexoutKhansWalkToCass
				set redirect to 1
			elseif SexoutKhans.pveronica && VeronicaREF.GetItemCount 00SexoutActor == 0
				set goal to VeronicaREF
				set walkAI to SexoutKhansWalkToVeronica
				set redirect to 1
			endif
		endif

		if redirect
			self.AddScriptPackage walkAI
		else
			if self.GetIsCurrentPackage walkAI
				self.RemoveScriptPackage walkAI
			endif
			self.EvaluatePackage
			set self to 0
			set goal to 0
			set walkAI to 0

			dispel SexoutKhansEffect
			return
		endif
	endif

	; If self starts having sex with someon else, ignore this target
	if self.GetItemCount 00SexoutActor
		if self.GetIsCurrentPackage walkAI
			self.RemoveScriptPackage walkAI
		endif
		self.EvaluatePackage
		set self to 0
		dispel SexoutKhansEffect
		return
	endif


	; If walk package is removed, re-add it
	if 0 == self.GetIsCurrentPackage walkAI
		self.AddScriptPackage walkAI
	endif

	; If next to player, start sex
	if self.GetDistance goal < 150
		set chasing to 0

		if self.GetIsCurrentPackage walkAI
			self.RemoveScriptPackage walkAI
		endif

		if goal.IsSpellTarget SexoutCondom == 0 && self.IsSpellTarget SexoutCondom == 0
			if goal.GetItemCount SexoutCondom
				goal.EquipItem SexoutCondom
			else
				short random
				short karma
				set karma to ( self.GetAv Karma ) / 40 ; Range -25 to 25
				set random to GetRandomPercent
				if random < 75 + karma
					goal.Additem SexoutCondom 1 1
					goal.EquipItem SexoutCondom
				endif
			endif
		endif

		set started to 1
		if goal == player
			self.startconversation Player, KhansHello
		elseif self.GetIsSex Female && goal.GetIsSex Male
			set Sexout.female to self
			set Sexout.male to goal
			self.CIOS SexoutBegin
		elseif self.GetIsSex Male && goal.GetIsSex Female
			set Sexout.female to goal
			set Sexout.male to self
			self.CIOS SexoutBegin
		else
			set Sexout.female to goal
			set Sexout.male to self
			self.CIOS SexoutBegin
		endif
		self.CIOS SexoutKhansOldEffect
	endif
endif

if started
	if going
		if 0 == self.GetItemCount 00SexoutActor


			if self.GetIsCurrentPackage walkAI
				self.RemoveScriptPackage walkAI
			endif
			self.EvaluatePackage
			set self to 0

			dispel SexoutKhansEffect
			return

		endif
	else
		if self.GetItemCount 00SexoutActor
			; Self has begun fucking
			set going to 1
		endif
	endif
endif


End

 

I am using SexoutKhans as an exaple here, but they all use the same scripts.

 

Hope you can help!

Guest Loogie
Posted

Its seems to me whatever you did to the Sept 27 powder ganger plugin was working perfectly.

Posted

Its seems to me whatever you did to the Sept 27 powder ganger plugin was working perfectly.

 

You wouldn't have a copy of that lying around would you?

Guest Loogie
Posted

Its seems to me whatever you did to the Sept 27 powder ganger plugin was working perfectly.

 

You wouldn't have a copy of that lying around would you?

 

No. Maybe there's one in your geck backup folder; ther isn't in mine.

 

Posted

Its seems to me whatever you did to the Sept 27 powder ganger plugin was working perfectly.

 

You wouldn't have a copy of that lying around would you?

 

No. Maybe there's one in your geck backup folder; ther isn't in mine.

 

 

There probably is, there are just around 20-30 backupfiles, so hard to find the right one ;)

Posted

Found it. It is much like the one we use now, only removed all support for companions and many things like that. So I could use it, but then no companions would ever get approached.

Posted

Well at least that hopefully narrows down the search for the problem. It must be something wrong in the companion-enabling bits, right?

 

I'll have a look over the code itself in a bit, though I'm definitely just an amateur coder and not that familiar with the Fallout scripting language.

Guest Loogie
Posted

Stupid question. Very simple really, since I don't know how to work scripts. What code snippet would I use if I wanted to trigger sex with a male PC talking to a female NPC? What I want to do is have a male player say something to a female player, then a sex act in a specific hole triggers.

Posted

Hi. I use a custom race setup for my body replacers, and I'm looking to make a personal plugin to keep the upperbody-erect.nif compatible, but I'm terribly afraid of breaking all the complicated code in Sexout.

 

Basically, as far as my males go, they all use Roberts for NV, except Ghouls and my four custom Fiends races, which use BoG's ghastly ghouls and rotten raiders. Those textures are incompatible with Roberts, so I'm using Breeze for those five races.

 

Basically what I want to do is set up a plugin that will use upperbody2-erect.nif for any male participants who GetIsRace Ghoul or GetInFaction Fiends. Is this possible to do without breaking Sexout or causing compatibility issues when updating it?

 

(@ loogie, check the OP.

 

set Sexout.male to Player

set Sexout.female to GetSelf

set Sexout.SexType to [Vaginal or Oral or Anal]

CIOS SexoutBegin

Posted

If you add one line to what dogface wrote you can select the specific anim that plays for example set Sexout.anim to 54 (BJ standing). I use this in conjunction with tokens to make sure the dialogue fits the anim. That looks like something like this: "im gonna fuck you in the ass.." additem aaaWBanaltoken 1, "oh noes, not the ass" with this in the dialoguescript:

 

set Sexout.male to GetSelf

set Sexout.female to Player

if getitemcount aaaWBoraltoken == 1

set Sexout.anim to 54

set Sexout.sexType to Oral

endif

if getitemcount aaaWBanaltoken == 1

set Sexout.anim to 68

set Sexout.sexType to Anal

endif

if getitemcount aaaWBvaginaltoken == 1

set Sexout.anim to 76

set Sexout.sexType to vaginal

endif

CIOS SexoutBegin

additem aaaWBaftersextoken 1

 

The aftersexdialouge is giving me trouble though. If i use it in the above script directly, it does not trigger, because the sex anim starts. If i use it separately, the game crahes after finishing sex.

 

if Actor.GetItemCount 00SexoutActor

return

else

startconversation player, aaaWBaftersextopic (or add a package)

endif

end

 

I will try it with a script that checks for the token but i dont like constant checks during quests.

 

edit: and never forget to remove all tokens when finished or its going to fuck up things for further acts.

 

Posted

Found it. It is much like the one we use now' date=' only removed all support for companions and many things like that. So I could use it, but then no companions would ever get approached.

[/quote']

 

Hey, could you maybe post the contents of that script here as well, so we have something to compare against the current one?

 

 

edit: also, and this may be a stupid idea, I dunno - perhaps if none of us can get the problem here nailed down, you could use the known working companionless script for the player, and then use an entirely separate script for each of the companions. Rather than trying to run all the conditional checks and whatnot in the single script.

 

I've been twiddling with the scripts in GECK for a while now, but haven't yet turned up anything useful. Sorry. :/

 

 

edit2: what determines how long ScriptEffectUpdate runs? Or, er, how many iterations it goes through? See, I thought I remembered reading that it'd run as long as the first if/then statement were true, but the first if/then is false by default in your ScriptEffectUpdate. So... maybe I'm just confused.

 

I'll try to throw some debug messages in there tonight to see if I can determine more exactly where it's breaking.

 

 

edit3: just to avoid any misunderstandings, I have no idea what I'm doing. But I'm trying. Heh.

Guest Loogie
Posted

Noob question - if I want Cass or Veronica to have sex with a female NPC, with the NPC being the reciever of oral sex/dominant partner, what script do I use?

Posted

Noob question - if I want Cass or Veronica to have sex with a female NPC' date=' with the NPC being the reciever of oral sex/dominant partner, what script do I use?

[/quote']

 

The licker is usually set to "male" for consentual F/F scenes. If you want it to be more than just oral sex you might have to pick your animations out specifically, as the "male" partner is the dominant one in non-oral animations.

Posted

Noob question - if I want Cass or Veronica to have sex with a female NPC' date=' with the NPC being the reciever of oral sex/dominant partner, what script do I use?

[/quote']

 

That depends, do you want to activate it through dialogue? Are they standing next to each other? IF it starts through dialogue, dialogue with who, cass or the NPC? Is it a specific NPC all the time or is it supposed to be one NPC every time?

 

 

If in dialoge with cass and it's only one specific NPC

 

set sexout.male to GetSelf (you can also use the roseofsharoncassidyREF, but since it's her you are talking to it's easier to use GetSelf)

set sexout.female to NPCRef

set sexout.sextype to oral

set sexout.anim to 34, 39, 40, 41, 43, 45, 46, 47 or 48

CIOS SexoutBegin

 

Posted

What Bromm83 said is right on. I'd just like to make a small addition - you only need to say:

set Sexout.sexType to Oral

It will pick an oral anim randomly for you. You may also add the set Sexout.Anim to ## line afterwards if you'd like to specify which anim it hsould be.

Guest Loogie
Posted

Thanks!

 

My goal is to add this to Slave Mistress Marissa in the Legion Tryout plugin. I'm going to set it up so instead of entering regular dialog after the first time, she may demand sexual gratification from a female player, or Cass or Veronica if they're with her.

Posted

Hi UDLR,

 

Just a quick request, is there a chance in the next update you could add a LevelledList to the main Sexout file called SexoutRapeDrugs?

 

My thinking is then I and others could just add more drugs to the form list then Rapers would pull the drugs from the list. This way mods using them would only need to have the Sexout main as a master file.

 

I was also thinking if you could set Arousal as a variable in the main Quest Script for similar reasons.

 

I'm just thinking of ways of minimising the overwriting of other mods scripts etc as much as possible if they didn't have to be modified.

You wouldn't have to do any code changes, just create the blank variables. There may be others that could be added later, but I can't think of any ATM.

Posted

Okay, I'm actually starting to mod for reals now and need a bit of advice. I'm adding ingestable feral ghoul pheromones to Sewer Slave so they don't attack the player when she goes bumming around down there. However, the way I'm doing it sets them as allies, which makes them not stalk so good with rapers.

 

Basically, what I'm trying to figure out is what to add to the following script to make feral ghouls charge and rape the player, overriding the SexoutRapers settings.

 

scn SexoutSSGhoulPheremones

 

begin ScriptEffectStart

ClearFactionPlayerEnemyFlag FeralGhoulFaction

setAlly playerFaction FeralGhoulFaction 1 1 ;FRIEND

end

 

begin ScriptEffectFinish

setEnemy playerFaction FeralGhoulFaction ;ENEMY

end

Posted

Okay' date=' I'm actually starting to mod for reals now and need a bit of advice. I'm adding ingestable feral ghoul pheromones to Sewer Slave so they don't attack the player when she goes bumming around down there. However, the way I'm doing it sets them as allies, which makes them not stalk so good with rapers.

 

Basically, what I'm trying to figure out is what to add to the following script to make feral ghouls charge and rape the player, overriding the SexoutRapers settings.

 

scn SexoutSSGhoulPheremones

 

begin ScriptEffectStart

ClearFactionPlayerEnemyFlag FeralGhoulFaction

setAlly playerFaction FeralGhoulFaction 1 1 ;FRIEND

end

 

begin ScriptEffectFinish

setEnemy playerFaction FeralGhoulFaction ;ENEMY

end

Sorry I can't help with any experience on these functions, but it has given me some ideas on how to do a few things later if it works :)

Posted

The script I posted works - it'll ally me with the feral ghouls for the duration of the pheromones and make me an enemy as soon as they wear off. I just need to know what to add to it for rapiness.

 

It's actually just a really cut down version of the ghoul mask script from Fallout 3, which Symon was kind enough to provide me with.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...