Мод на беременность fallout new vegas

scn SexoutP1S0ObjTokenFertility

; *** Manages the fertility of Actor

ref rActor

ref rActorRace

int iCount

int iRandom

int iRemoving

int iDoOnceB

int iOkToRun

int iDeadTimer

int iDebug

int iDelay

float fDistanceToPlayer

int iValidActor

float fMenstruationLevelPerc

int iMenstLevel

ref rActorRace

int iRadRads

float fSemenTotal

float fCurrHour

float fLastUpdateHour

float fHoursPassed

float fCurrDay

float fLastUpdateDay

int iDaysPassed

float fHourStep

float fPercPerHour

float fPercAdd

int iActorIsInfertile

ref rRemovedOva

int iTokCountAdj

int fHoursTillBirth

float fWeatherEffect

float fRaceEffect

int iAmCreature

int iAmAfAmRace

int iAmAsianRace

int iAmCaucRace

int iAmHispRace

int iAmGhoulRace

int iAmAndroidRace

int iAmFoxRace

int iAmPonyRace

int iAmSporeHybridRace

int iAmSuperMutantRace

int iAmDogRace

int iAmCoyoteRace

int iAmAlienRace

int iAmBigHornerRace

int iAmBrahminRace

int iAmMoleRatRace

int iAmNightStalkerRace

int iAmRatRace

int iAmRavenRace

int iAmYaoGuaiRace

;float fDrugFertEz

;float fDrugBunX

float fDrugBunAway

float fDrugLevelFert

float fDrugFertFactor

int iNumCount

int iRemoveOva

int iOvaAdj

float fFertCycleDays

float fFertLengthHours

float fFertPercFertile

int iPercentInfertile

float fFertPeakPerc

float fFertCycleHours

float fFertCyclePerc

float fFertLevelPerc

float fAdjFertCycleDays

float fAdjFertPercFertile

float fAdjFertPeakPerc

float fFertMod

int iFertMenPerc

int iSetNumOva

int iCurrNumOva

int iSporeOvaCnt

float fPregChance

float fPregStagePerc

int iPregCount

int iPrevPregCount

int iOvaAddedThisCycle

ref rRemoveTokenType

int iRemoveTokenNum

ref rReplacementTokenType

int iReplacementTokenNum

int iPrevBellySize

int iCurrBellySize

int iApparBellySize

float fCurrBellySize

float fCumBloat

float fCumBloatPerc

int iPrevCumBloat

int iCurrCumBloat

float fBaseBreastSize

int iCurrBreastSize

float fCurrBreastSize

float fCurrBreastMilk

int iApparBreastSize

int iPrevBreastSize

ref rCurrOutfit

ref rCurrSlot17

ref rCurrSlot18

ref rPrevOutfit

ref rPrevSlot17

ref rPrevSlot18

int iCurrBodyType

int iPrevBodyType

int iCurrBodySuitHealth

int iBirthDrugBlock

Begin GameMode

Set rActor to GetContainer

Set fCurrHour to GetCurrentTime

Set fCurrDay to GameDaysPassed

if rActor && iRemoving < 1

Set iCount to iCount + 1

if iCount > 199 && gPregStartCounter > 1

Set iCount to 0

Set rCurrOutfit to rActor.GetEquippedObject 2

Set rCurrSlot17 to rActor.GetEquippedObject 17

Set rCurrSlot18 to rActor.GetEquippedObject 18

Set iCurrBodyType to rActor.NX_GetEVFl «SCR:fBodyType»

Set fBaseBreastSize to rActor.NX_GetEVFl «SCR:fBaseBreastSize»

Set iCurrBreastSize to rActor.NX_GetEVFl «SOP:fCurrBreastSize»

Set iApparBreastSize to rActor.NX_GetEVFl «SOP:fApparBreastSize»

Set rPrevOutfit to rCurrOutfit

Set rPrevSlot17 to rCurrSlot17

Set rPrevSlot18 to rCurrSlot18

Set iPrevCumBloat to iCurrCumBloat

Set iPrevBodyType to iCurrBodyType

Set iPrevBellySize to iApparBellySize

Set iPrevBreastSize to iCurrBreastSize

Set fDistanceToPlayer to rActor.GetDistance PlayerREF

if rActor == PlayerREF

Set fDistanceToPlayer to 1

endif

Set iDebug to 0

if fDistanceToPlayer > 0 && fDistanceToPlayer < 900

if SexoutP0QVAR.iDebug == 1

Set iDebug to 1

elseif SexoutP0QVAR.iDebug == 7 && rActor == PlayerREF

Set iDebug to 1

elseif SexoutP0QVAR.iDebug > 7

Set iDebug to 1

endif

endif

Set iValidActor to 0

if rActor.GetIsSex Female || rActor.GetIsSex Male || rActor.GetIsCreature

Set iValidActor to 1

endif

; *** Check OK to run

Set iOkToRun to 1

if rActor.GetDead || iValidActor == 0 || (NX_IsInList SexoutSLActorDataNeverGetsPregnant rActor) || (SexoutP0QVAR.iFertEnableFemale < 1)

Set iOkToRun to 0

Set iDeadTimer to iDeadTimer + 1

if iDeadTimer > 5

Set iOkToRun to -1

DebugPrint «Preg5BodyCalc %n: Dead/Invalid Actor %1.0f» rActor iValidActor

endif

else

Set iDeadTimer to 0

endif

Set iAmCreature to 0

if rActor.GetIsCreature

Set iAmCreature to 1

endif

if iAmCreature < 1

Set rActorRace to PlayerREF.GetRace

; *** Check if Android whether can be Fertile

if (NX_IsInList SexoutSFLDataRaceAndroid rActorRace) || (NX_IsInList SexoutSFLDataNewNPCsAndroid PlayerREF)

if SexoutP0QVAR.iAndroidRacePreg == 0

Set iOkToRun to -1

endif

endif

endif

if (iDebug == 1) && eval(1 == call fnSexoutActorInuse rActor)

DebugPrint «Preg1FertF %n: Fertility locked out by Actor in use flag» rActor

endif

if iOkToRun > 0 && eval(0 == call fnSexoutActorInuse rActor)

if gSemenCountHappening < 1

Set gSemenCountHappening to 1

Call SexoutP1SUDFSemenSpermCount rActor

elseif iDebug == 1

DebugPrint «Preg1FertF %n: SemenCount Blocked by SemenCountHappening %1.0f» rActor gSemenCountHappening

endif

if gPregBellyCalcHappening < 1

Set gPregBellyCalcHappening to 1

Call SexoutP3SUDFBellyCalc rActor

elseif iDebug == 1

DebugPrint «Preg1FertF %n: PregBellyCalc Blocked by PregBellyCalcHappening %1.0f» rActor gPregBellyCalcHappening

endif

if iDoOnceB < 1

Set iDoOnceB to 1

rActor.NX_SetEVFo «SOP:rRemoveOvaType» HatParty

rActor.NX_SetEVFo «SOP:rRemovedPregToken» HatParty

rActor.NX_SetEVFo «SOP:rReplacementPregToken» HatParty

endif

Set iRadRads to rActor.GetActorValue RadiationRads

Set rActorRace to rActor.GetRace

Set fSemenTotal to rActor.NX_GetEVFl «SOP:fSemenTotalV»

Set iPregCount to rActor.NX_GetEVFl «SOP:iPregCount»

Set fPregStagePerc to rActor.NX_GetEVFl «SOP:fPregStagePerc»

Set fHoursTillBirth to rActor.NX_GetEVFl «SOP:fHoursTillBirth»

; *** Calculate Drug Fertility Factor

Set fDrugBunAway to rActor.NX_GetEVFl «SOD:fBunAway»

Set fDrugLevelFert to rActor.NX_GetEVFl «SOD:fDrugLevelFert»

Set fDrugFertFactor to 1 + (fDrugLevelFert / 200)

; Set fDrugFertFactor to 1

; if fDrugLevelFert > 0

; Set fDrugFertFactor to 1 + (fDrugLevelFert / 200)

; elseif fDrugLevelFert < 0

; Set fDrugFertFactor to 1 — ((fDrugLevelFert * -1) / 200)

; endif

if fDrugFertFactor < .1

Set fDrugFertFactor to .1

elseif fDrugFertFactor > 10

Set fDrugFertFactor to 10

endif

rActor.NX_SetEVFl «SOP:fDrugFertFactor» fDrugFertFactor

if iDebug == 1 && fDrugFertFactor != 1

DebugPrint «Preg1FertF %n: DrugLevelFert %1.3f, DrugFertFactor %1.3f» rActor fDrugLevelFert fDrugFertFactor

endif

; *** Count Number of Ova

Set iRemoveOva to 0

Set iCurrNumOva to rActor.GetItemCount SexoutP2TokenOvaAfAm

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaCauc

Читайте также:  Иммунохроматографический тест на беременность цена в аптеках

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaAsian

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaHisp

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaGhoul

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaFeralGhoul

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaSuperMutant

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaAndroid

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaEyeBot

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaFox

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaPony

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaSporeHybrid

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaDog

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaCoyote

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaRaven

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaRat

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaMoleRat

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaBrahmin

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaBigHorner

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaNightStalker

Set iCurrNumOva to iCurrNumOva + rActor.GetItemCount SexoutP2TokenOvaYaoGuai

; *** Get Info from SCR & Setup Fertility Parameters for Actor

if rActor == PlayerREF

Set fFertPercFertile to SexoutP0QVAR.fFertPercFertileF

Set fFertCycleDays to SexoutP0QVAR.fFertCycleDaysF

Set fFertPeakPerc to SexoutP0QVAR.fFertPeakPercF

else

Set fFertPercFertile to SexoutP0QVAR.fFertPercFertileFNPC

Set fFertCycleDays to SexoutP0QVAR.fFertCycleDaysFNPC

Set fFertPeakPerc to SexoutP0QVAR.fFertPeakPercFNPC

endif

Set fFertCyclePerc to rActor.NX_GetEVFl «SOP:fFertCyclePerc»

Set fFertLevelPerc to rActor.NX_GetEVFl «SOP:fFertLevelPerc»

Set iFertMenPerc to SexoutP0QVAR.fFertMenPerc

Set fMenstruationLevelPerc to rActor.NX_GetEVFl «SOP:fMenstruationLevelPerc»

Set iOvaAdj to 0

Set fRaceEffect to 1

Set iBirthDrugBlock to 0

if (rActor.IsSpellTarget SexoutP4EBirthExhaustion == 1)

Set iBirthDrugBlock to 1

if (iDebug == 1)

DebugPrint «Preg1FertF %n: Fertility blocked by Birth Exhaustion Spell» rActor

endif

endif

if (fDrugBunAway > 50)

Set iBirthDrugBlock to 1

if (iDebug == 1)

DebugPrint «Preg1FertF %n: Fertility blocked by BunAway %1.2f, DrugFertFactor %1.2f» rActor fDrugBunAway fDrugFertFactor

endif

endif

; *** If Actor not Pregnant run Fertility Calcs

if (iPregCount < 1) && (iBirthDrugBlock == 0)

if fFertCyclePerc <= 0

Set iOvaAddedThisCycle to 0

Set fFertCyclePerc to (GetRandomPercent / 2) + 20

DebugPrint «Preg1FertF %n: StartedOkRand, FertCycPercent %3.3f» rActor fFertCyclePerc

endif

Set iAmAfAmRace to 0

Set iAmAsianRace to 0

Set iAmCaucRace to 0

Set iAmHispRace to 0

Set iAmGhoulRace to 0

Set iAmAndroidRace to 0

Set iAmFoxRace to 0

Set iAmPonyRace to 0

Set iAmSporeHybridRace to 0

Set iAmSuperMutantRace to 0

if iAmCreature < 1

if (NX_IsInList SexoutSFLDataRaceAfAm rActorRace) || (NX_IsInList SexoutSFLDataNewNPCsAfAm rActor)

Set iAmAfAmRace to 1

elseif (NX_IsInList SexoutSFLDataRaceCauc rActorRace) || (NX_IsInList SexoutSFLDataNewNPCsCauc rActor)

Set iAmCaucRace to 1

elseif (NX_IsInList SexoutSFLDataRaceAsian rActorRace) || (NX_IsInList SexoutSFLDataNewNPCsAsian rActor)

Set iAmAsianRace to 1

elseif (NX_IsInList SexoutSFLDataRaceHisp rActorRace) || (NX_IsInList SexoutSFLDataNewNPCsHisp rActor)

Set iAmHispRace to 1

; *** Ghouls are less Fertile except Player

elseif (NX_IsInList SexoutSFLDataRaceGhoul rActorRace) || (NX_IsInList SexoutSFLDataNewNPCsGhoul rActor)

Set iAmGhoulRace to 1

Set fRaceEffect to 1

if rActor != PlayerREF

Set fFertPeakPerc to fFertPeakPerc / 2

endif

; *** Fox Races are hyper fetile

elseif (NX_IsInList SexoutSFLDataRaceFox rActorRace) || (NX_IsInList SexoutSFLDataNewNPCsFox rActor)

Set iAmFoxRace to 1

Set fRaceEffect to 1.1

Set fFertPeakPerc to fFertPeakPerc * 1.5

; *** Pony Races are hyper fetile

elseif (NX_IsInList SexoutSFLDataRacePony rActorRace) || (NX_IsInList SexoutSFLDataNewNPCsPony rActor)

Set iAmPonyRace to 1

Set fRaceEffect to 1.1

Set fFertPeakPerc to fFertPeakPerc * 1.5

; *** Plantgirls are more fun in the sun

elseif (NX_IsInList SexoutSFLDataRaceSporeHybrid rActorRace) || (NX_IsInList SexoutSFLDataNewNPCsSporeHybrid rActor)

Set iAmSporeHybridRace to 1

Set fRaceEffect to 1

if rActor.IsInInterior < 1

if fCurrHour < 12

Set fWeatherEffect to (fCurrHour — 7) * 50

endif

If fCurrHour >= 12

Set fWeatherEffect to (17 — fCurrHour) * 50

endif

if fWeatherEffect > fFertPeakPerc

if rActor.IsRaining

Set fWeatherEffect to fWeatherEffect + 10

endif

Set fFertPeakPerc to fWeatherEffect

endif

endif

; *** Haven’t worked out a check for SuperMutant Race yet, we don’t have body meshes anyway.

elseif (NX_IsInList SexoutCListSuperMutant rActor) || (NX_IsInList SexoutSFLDataRaceSuperMutant rActorRace) || (NX_IsInList SexoutSFLDataNewNPCsSuperMutant rActor)

Set iAmSuperMutantRace to 1

Set fRaceEffect to 1

; *** Android Race is hyper fetile

elseif (NX_IsInList SexoutSFLDataRaceAndroid rActorRace) || (NX_IsInList SexoutSFLDataNewNPCsAndroid rActor)

Set iAmAndroidRace to 1

Set fRaceEffect to 1.1

Set fFertPeakPerc to fFertPeakPerc * 1.2

; *** Otherwise default to Cauc

else

Set iAmCaucRace to 1

endif

; *** Oldies less fertile

if rActor.GetIsRace AfricanAmericanOld || rActor.GetIsRace AsianOld || rActor.GetIsRace CaucasianOld || rActor.GetIsRace HispanicOld

Set fFertPeakPerc to fFertPeakPerc * .6

endif

; *** Creature Fertility

else

Set fRaceEffect to 1

if (NX_IsInList SexoutCListSupermutant rActor) || (NX_IsInList SexoutSFLDataRaceSuperMutant rActorRace) || (NX_IsInList SexoutSFLDataNewNPCsSuperMutant rActor)

Set iAmSuperMutantRace to 1

Set fRaceEffect to 1

elseif (NX_IsInList SexoutCListDog rActor)

Set iAmDogRace to 1

Set fRaceEffect to 2

elseif (NX_IsInList SexoutCListCoyote rActor)

Set iAmCoyoteRace to 1

Set fRaceEffect to 2

else

DebugPrint «Preg1FertF %n: ERROR Unknow creature race» rActor

endif

endif ; *** iAmCreature ?

; *** Brood Mother Perk makes more fetile

if rActor.HasPerk SexoutSBroodMother

Set fRaceEffect to fRaceEffect * 1.2

Set fFertPeakPerc to fFertPeakPerc * 1.2

endif

; *** Check if Actor is Fertile, note Infertile actors can still carry Ova, they just can’t produce them, so may be impregnated with Ova, but they need their fertility bumped up so they don’t discard the ova, I’m a sick person really

Set iActorIsInfertile to 0

If rActor.IsInList SexoutSLActorDataIsInfertile

Set iActorIsInfertile to 1

Set fFertPercFertile to 0

Set fFertPeakPerc to 0

endif

; *** Alter Script run Hours to catch up after Fast Travel / Wait / Sleep

if fLastUpdateHour <= 0 || fLastUpdateHour > 24

Set fLastUpdateHour to fCurrHour

Set fLastUpdateDay to fCurrDay

DebugPrint «Preg1Fert %n: Reset LastD %2.3f, LastH %2.3f» rActor fLastUpdateDay fLastUpdateHour

endif

Set iDaysPassed to fCurrDay — fLastUpdateDay

if iDaysPassed > 0

DebugPrint «Preg1FertF %n: iDaysPassed %4.5f, fHoursPassed %4.5f» rActor iDaysPassed fHoursPassed

endif

if iDaysPassed < 0

DebugPrint «Preg1Fert %n: FertToken Time Travel Occurance %5.4f» rActor iDaysPassed

Set fLastUpdateDay to fCurrDay

Set fLastUpdateHour to fCurrHour

endif

if iDaysPassed > 7

DebugPrint «Preg1Fert %n: FertToken Time Travel Occurance %5.4f» rActor iDaysPassed

Set fLastUpdateDay to fCurrDay + 7

Set fLastUpdateHour to fCurrHour

endif

Set iDaysPassed to fCurrDay — fLastUpdateDay

if fCurrHour > fLastUpdateHour

Set fHoursPassed to fCurrHour — fLastUpdateHour

elseif fCurrHour < fLastUpdateHour

Set fHoursPassed to (fCurrHour + 23.999999) — fLastUpdateHour

; DebugPrint «Preg1FertF %n: Midnight Passed, Days%2.0f, Curr%2.5f, Last %2.4f» rActor iDaysPassed fCurrHour fLastUpdateHour

endif

Set fHoursPassed to fHoursPassed + (iDaysPassed * 24)

Label 1

Set fHourStep to gHourStepFert

If fHoursPassed >= fHourStep

If fHoursPassed > 12

Set fHourStep to 2

endif

; *** Calculate Fertility Cycle Percentage 0 to 100%

Set fFertLengthHours to fFertCycleDays * 24

if fFertLengthHours > 0

Set fPercPerHour to 100 / fFertLengthHours

endif

Set fPercAdd to fPercPerHour * fDrugFertFactor * fHourStep

; if fDrugFertFactor < .5

; Set fPercAdd to -1

; endif

Set fFertCyclePerc to fFertCyclePerc + fPercAdd

if iDebug == 1

DebugPrint «Preg1FertF %n: PercPerHour %4.2f, PercAdd %2.4f, FertCyclePerc %3.4f» rActor fPercPerHour fPercAdd fFertCyclePerc

endif

if fFertCyclePerc < 0

Set fFertCyclePerc to .001

endif

if fFertCyclePerc > 100

Set fFertCyclePerc to 100

if fDrugLevelFert <= 10

if iDebug == 1

DebugPrint «Preg1FertF %n: FertCycleReset Perc %3.2f, FCHours %3.2f, FLPerc %3.2f, FertMod %3.2f, Ova %2.0f» rActor fFertCyclePerc fFertCycleHours fFertlevelPerc fFertMod iSetNumOva

endif

Set fFertCyclePerc to .001

Set iOvaAdj to -1

Set iSetNumOva to 0

endif

endif

Set fFertCycleHours to (fFertCyclePerc / 100) * fFertLengthHours

; *** Calculate Fertility Level Percentage

Set fFertLevelPerc to 0

Set fFertMod to fDrugLevelFert / 2 — (iRadRads / 20) + (fSemenTotal / 100)

if fFertMod < -100

Set fFertMod to -100

elseif fFertMod > 100

Set fFertMod to 100

endif

if fFertPercFertile > 100

Set fFertPercFertile to 100

endif

if fFertPeakPerc > 500

Set fFertPeakPerc to 500

endif

Set iPercentInfertile to 100 — fFertPercFertile

if fFertCyclePerc >= iPercentInfertile

Set fFertLevelPerc to (((fFertCyclePerc — iPercentInfertile) / fFertPercFertile) * fFertPeakPerc) + fFertMod

endif

if fFertLevelPerc < fFertMod

Set fFertLevelPerc to fFertMod

endif

if fFertLevelPerc > fFertPeakPerc + fFertMod

Set fFertLevelPerc to fFertPeakPerc + fFertMod

endif

if fFertLevelPerc > 500

Set fFertLevelPerc to 500

endif

if fFertCyclePerc < 1

Set fFertLevelPerc to 0

endif

; *** Set number of Ova

if fFertLevelPerc <= 0 || fFertCyclePerc <= 1

Set iSetNumOva to 0

elseif fFertLevelPerc > 5 && iSetNumOva < 1

if (Rand 500 0) + (Rand 500 0) < (fFertLevelPerc * 10)

Set iSetNumOva to 1

endif

endif

if fFertLevelPerc > 100

Set iSetNumOva to 1 + ((fFertLevelPerc — 100) / 50)

endif

if iDebug == 1

DebugPrint «Preg1FertF %n: FCPerc %2.3f, FCHours %2.2f, FLPerc %2.2f, FertMod %2.2f, Ova %1.0f» rActor fFertCyclePerc fFertCycleHours fFertlevelPerc fFertMod iCurrNumOva

endif

Set fLastUpdateHour to fCurrHour

Set fLastUpdateDay to fCurrDay

Set fHoursPassed to fHoursPassed — fHourStep

Goto 1

endif ; *** Catchup Time stuff

Set fPregChance to iCurrNumOva * SexoutP0QVAR.fFertPeakPercM / 100

; *** Clear any Pregnancy Variables & Remove unneeded Pregnancy Tokens

Set iDelay to iDelay + 1

if iDelay > 5

Set iDelay to 0

rActor.NX_SetEVFl «SOP:fCurrPregSize» 0

rActor.NX_SetEVFl «SOP:fCurrBellySize» 0

rActor.NX_SetEVFl «SOP:fPregStagePerc» 0

rActor.NX_SetEVFl «SOP:fApparBellySize» 0

rActor.NX_SetEVFl «SOP:iPregCount» 0

rActor.NX_SetEVFl «SOP:iPregCountHumanoid» 0

rActor.NX_SetEVFl «SOP:fHoursTillBirth» 0

rActor.NX_SetEVFl «SOP:iBirthStage» 0

rActor.NX_SetEVFl «SOP:fMiscarryChance» 0

rActor.NX_SetEVFl «SOP:fMisMod» 0

rActor.NX_SetEVFl «SOP:fMutationChance» 0

rActor.NX_SetEVFl «SOP:fMutMod» 0

rActor.NX_SetEVFo «SOP:rRemovedPregToken» HatParty

rActor.NX_SetEVFo «SOP:rReplacementPregToken» HatParty

if rActor.GetItemCount SexoutP3TokenLumpyPreg > 0

rActor.RemoveItem SexoutP3TokenLumpyPreg 9 1

endif

endif

; *** Menstruation Effects if activated, less than Fertility Cycle & not Pregnant

if iFertMenPerc > 0 && fFertCyclePerc < iFertMenPerc

Set iSetNumOva to 0

Set iOvaAddedThisCycle to 0

if (iMenstLevel == 0) && (GetRandomPercent < iFertMenPerc)

Set iMenstLevel to 1

endif

if iMenstLevel > 0 ; *** Menstration is Happening

Set fMenstruationLevelPerc to ((iFertMenPerc — fFertCyclePerc) / iFertMenPerc) * 100

if fMenstruationLevelPerc > 90 && rActor.IsSpellTarget SexoutSEFFMenstruationHeavy < 1

rActor.Dispel SexoutSEFFMenstruationLight

rActor.Dispel SexoutSEFFMenstruation

rActor.AddSpell SexoutSEFFMenstruationHeavy

elseif fMenstruationLevelPerc > 45 && fMenstruationLevelPerc <= 90 && rActor.IsSpellTarget SexoutSEFFMenstruation < 1

rActor.Dispel SexoutSEFFMenstruationLight

rActor.AddSpell SexoutSEFFMenstruation

rActor.Dispel SexoutSEFFMenstruationHeavy

elseif fMenstruationLevelPerc > 10 && fMenstruationLevelPerc <= 45 && rActor.IsSpellTarget SexoutSEFFMenstruationLight < 1

rActor.AddSpell SexoutSEFFMenstruationLight

rActor.Dispel SexoutSEFFMenstruation

rActor.Dispel SexoutSEFFMenstruationHeavy

Читайте также:  1 группа крови отрицательный резус при беременности

else fMenstruationLevelPerc <= 10

rActor.Dispel SexoutSEFFMenstruationLight

rActor.Dispel SexoutSEFFMenstruation

rActor.Dispel SexoutSEFFMenstruationHeavy

endif

; *** Removing Ova at Menstruation if no fertility drugs

if iCurrNumOva > 0 && (fFertMod < 1)

if (GetRandomPercent + fFertMod) <= (5 + fMenstruationLevelPerc)

Set iOvaAdj to -1

endif

endif

rActor.NX_SetEVFl «SOP:fMenstruationLevelPerc» fMenstruationLevelPerc

if iDebug == 1

DebugPrint «Preg1FertF %n: Menstuating Perc %2.3f» rActor fMenstruationLevelPerc

endif

endif ; *** Menstration is Happening

else ; *** Menstration at 0% or over FertilityCyclePercent

Set iMenstLevel to 0

Set fMenstruationLevelPerc to 0

rActor.NX_SetEVFl «SOP:fMenstruationLevelPerc» 0

if rActor.IsSpellTarget SexoutSEFFMenstruationHeavy > 0

rActor.Dispel SexoutSEFFMenstruationHeavy

elseif rActor.IsSpellTarget SexoutSEFFMenstruation > 0

rActor.Dispel SexoutSEFFMenstruation

elseif rActor.IsSpellTarget SexoutSEFFMenstruationLight > 0

rActor.Dispel SexoutSEFFMenstruationLight

endif

endif

else ; *** Actor is Pregnant or suffering Birth Exhaustion

Set fFertCyclePerc to .0001

Set iOvaAddedThisCycle to 0

Set fFertCycleHours to 0

Set fFertLevelPerc to 0

Set iSetNumOva to 0

Set iRemoveOva to 1

Set fPregChance to 0

Set fLastUpdateHour to fCurrHour

Set fLastUpdateDay to fCurrDay

if iPregCount > 0

; *** Calculate Miscarry/Mutation

if (SexoutP0QVAR.fMiscarryAdj > 0) || (SexoutP0QVAR.fMutationAdj > 0) || (fDrugBunAway > 9)

if gPregMutMisCalcHappening < 1 && fPregStagePerc > 5 && fPregStagePerc < 90 && rActor.GetItemCount SexoutP4BirthingTokenF < 1 && fHoursTillBirth > 9

Set gPregMutMisCalcHappening to 1

Call SexoutP3SMutationMiscarryUDFCalc rActor

else

rActor.NX_SetEVFl «SOP:fMiscarryChance» 0

rActor.NX_SetEVFl «SOP:fMisMod» 0

rActor.NX_SetEVFl «SOP:fMutationChance» 0

rActor.NX_SetEVFl «SOP:fMutMod» 0

endif

else

rActor.NX_SetEVFl «SOP:fMiscarryChance» 0

rActor.NX_SetEVFl «SOP:fMisMod» 0

rActor.NX_SetEVFl «SOP:fMutationChance» 0

rActor.NX_SetEVFl «SOP:fMutMod» 0

endif

; *** Keep nude bodies at 100% health

if rCurrOutfit

if rActor.GetEquipped SexoutSLOutfitNaked

Set iCurrBodySuitHealth to rActor.GetEquippedCurrentHealth 2

if iCurrBodySuitHealth < 90 ; *** Make sure nude bodies never damaged causing swap

rActor.SetEquippedCurrentHealth 100 2

endif

endif

else

Set rCurrOutfit to SexoutSNudeToken

endif

if (0 == NX_IsInList SexoutPPregActors rActor)

ListAddForm SexoutPPregActors rActor

endif

else ; *** Actor is not pregnant (Birth Exhaustion)

if (1 == NX_IsInList SexoutPPregActors rActor)

ListRemoveForm SexoutPPregActors rActor

endif

endif ; *** Actor is Pregnant

if iDebug == 1

DebugPrint «Preg1FertF %n: PregCnt %2.0f, PregPercent %3.2f, HoursToBirth %3.1f» rActor iPregCount fPregStagePerc fHoursTillBirth

endif

endif ; *** Actor Pregnant or not?

; *** Removing Ova if Pregnant or Adding Ova if needed

if iPregCount > 0 && iCurrNumOva > 0

if (GetRandomPercent + fFertMod) <= (20 + iPregCount)

Set iOvaAdj to -1

endif

else

if iCurrNumOva < iSetNumOva && iOvaAddedThisCycle < iSetNumOva && iActorIsInfertile < 1

Set iOvaAdj to 1

endif

endif

if gPregOvaNumAdjHappening < 1 && iOvaAdj != 0

Set gPregOvaNumAdjHappening to 1

Set iOvaAddedThisCycle to iOvaAddedThisCycle + iOvaAdj

Call SexoutP1SUDFOvaNumAdj rActor iSetNumOva iCurrNumOva iOvaAdj

if iDebug == 1

DebugPrint «Preg1FertF %n: Ova Adjust Called, SetNum %1.0f, CurrNum %1.0f, AdjOva %1.0f» rActor iSetNumOva iCurrNumOva iOvaAdj

endif

endif

; *** Removing Tokens if called

Set rRemoveTokenType to rActor.NX_GetEVFo «SOP:rRemoveTokenType»

Set iRemoveTokenNum to rActor.NX_GetEVFl «SOP:iRemoveTokenNum»

if rRemoveTokenType

if rRemoveTokenType != HatParty && iRemoveTokenNum > 0

rActor.RemoveItem rRemoveTokenType iRemoveTokenNum 1

rActor.NX_SetEVFo «SOP:rRemoveTokenType» HatParty

rActor.NX_SetEVFl «SOP:iRemoveTokenNum» 0

endif

else

rActor.NX_SetEVFo «SOP:rRemoveTokenType» HatParty

rActor.NX_SetEVFl «SOP:iRemoveTokenNum» 0

endif

Set rReplacementTokenType to rActor.NX_GetEVFo «SOP:rReplacementTokenType»

Set iReplacementTokenNum to rActor.NX_GetEVFl «SOP:iReplacementTokenNum»

if rReplacementTokenType

if rReplacementTokenType != HatParty

rActor.AddItem rReplacementTokenType iReplacementTokenNum 1

rActor.NX_SetEVFo «SOP:rReplacementTokenType» HatParty

rActor.NX_SetEVFl «SOP:iReplacementTokenNum» 0

endif

else

rActor.NX_SetEVFo «SOP:rReplacementTokenType» HatParty

rActor.NX_SetEVFl «SOP:iReplacementTokenNum» 0

endif

; *** Add high fertility effects

if iCurrNumOva == 1 && rActor.GetInSameCell PlayerREF

if rActor.IsSpellTarget SexoutP2EFertile < 1

rActor.CIOS SexoutP2EFertile

endif

rActor.Dispel SexoutP2EVeryFertile

rActor.Dispel SexoutP2ESuperFertile

elseif iCurrNumOva == 2 && rActor.GetInSameCell PlayerREF

rActor.Dispel SexoutP2EFertile

if rActor.IsSpellTarget SexoutP2EVeryFertile < 1

rActor.CIOS SexoutP2EVeryFertile

endif

rActor.Dispel SexoutP2ESuperFertile

elseif iCurrNumOva > 2 && rActor.GetInSameCell PlayerREF

rActor.Dispel SexoutP2EFertile

rActor.Dispel SexoutP2EVeryFertile

if rActor.IsSpellTarget SexoutP2ESuperFertile < 1

rActor.CIOS SexoutP2ESuperFertile

endif

else

rActor.Dispel SexoutP2EFertile

rActor.Dispel SexoutP2EVeryFertile

rActor.Dispel SexoutP2ESuperFertile

endif

; *** Synch PregStagePercTokens for Dialogue users

Set iTokCountAdj to fPregStagePerc — (rActor.GetItemCount SexoutSPTokenPregPercent)

if iTokCountAdj > 2

rActor.AddItem SexoutSPTokenPregPercent iTokCountAdj 1

elseif iTokCountAdj < -2

Set iTokCountAdj to iTokCountAdj * -1

rActor.RemoveItem SexoutSPTokenPregPercent iTokCountAdj 1

endif

if fPregStagePerc < .5 && rActor.GetItemCount SexoutSPTokenPregPercent > 0

rActor.RemoveItem SexoutSPTokenPregPercent 9 1

endif

; *** Add Bodyswap Token

if rActor.GetItemCount SexoutP5BodySwapTokenF < 1

rActor.AddItem SexoutP5BodySwapTokenF 1 1

DebugPrint «Preg1SynchSperm %n: BodySwap Token Added» rActor

elseif rActor.GetItemCount SexoutP5BodySwapTokenF > 1

rActor.RemoveItem SexoutP5BodySwapTokenF 1 1

DebugPrint «Preg1SynchSperm %n: Extra BodySwap Token Removed» rActor

endif

; *** Add to list for variable clearing

if NX_IsInList SexoutSFLDataActorsUsingNX rActor == 0

ListAddForm SexoutSFLDataActorsUsingNX rActor

endif

; *** Add Lactation Token

; if iCurrNumOva > 0 && rActor.GetItemCount SexoutP4TokenBirthCount && rActor.GetItemCount SexoutP4TokenLactatingF < 1

; rActor.AddItem SexoutP4TokenLactatingF 1 1

; else

; rActor.RemoveItem SexoutP4TokenLactatingF 1 1

; rActor.Dispel SexoutP3ELactating

; endif

rActor.NX_SetEVFl «SOP:fRaceEffect» fRaceEffect

rActor.NX_SetEVFl «SOP:fFertCyclePerc» fFertCyclePerc

rActor.NX_SetEVFl «SOP:fFertLevelPerc» fFertLevelPerc

rActor.NX_SetEVFl «SOP:fPregChance» fPregChance

endif

if iPregCount <1 && iPregCount != iPrevPregCount

rActor.AddItem SexoutP9TokenRemovePregnancy 1 1

endif

Set iPrevPregCount to iPregCount

; *** Actor not OK, Remove Fertility Token

if iOkToRun < 0

DebugPrint «Preg1FertF %n: RemovingSelf» rActor

rActor.AddItem SexoutP9TokenRemovePregnancy 1 1

rActor.AddItem SexoutP9TokenRemoveFertility 1 1

rActor.AddItem SexoutP9TokenRemoveSemen 1 1

Set iRemoving to 1

RemoveMe

endif ; *** End Actor Dead or Alive

endif ; *** iCount && iPregMainStartedEnd && iRemoving

endif : *** rActor

End

Источник