From 838552a18ab51250b93fc9daca7f8f147f677280 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Sat, 19 Aug 2023 15:04:16 +0700 Subject: [PATCH 01/20] translate --- Scripts/Source/sr_inflateMessages.psc | 3 ++- Scripts/Source/sr_inflateQuest.psc | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Scripts/Source/sr_inflateMessages.psc b/Scripts/Source/sr_inflateMessages.psc index c5e5294..0c79fa3 100644 --- a/Scripts/Source/sr_inflateMessages.psc +++ b/Scripts/Source/sr_inflateMessages.psc @@ -18,7 +18,8 @@ EndProperty GlobalVariable Property sr_messageLength auto int property msgLength int Function Get() - return sr_messageLength.GetValueInt() + return 80 +; return sr_messageLength.GetValueInt() EndFunction EndProperty diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index f9d5d8d..e4f5ef2 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -2146,7 +2146,9 @@ Function StripCover(Actor akActor, bool isAnal) EndFunction Function UnstripActor(Actor akActor) - EquipArmor(akActor) + If config.strip + EquipArmor(akActor) + endIf EndFunction Function UnequipArmor(Actor target) From 4d0a2f047a5fe44f9e410b33b797e0caa9fb9789 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Tue, 5 Dec 2023 22:08:35 +0700 Subject: [PATCH 02/20] Allow Oral and fix equip --- .gitignore | 2 ++ Scripts/Source/sr_inflateQuest.psc | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..504c91a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +PAPYRUS +Scripts/BUILD_ALL.bat \ No newline at end of file diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index db6abc5..3c5c7b1 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -391,7 +391,7 @@ Event OrgasmSeparate(Form ActorRef, Int Thread) int actorGender = sexlab.GetGender(actors[i]) ; log(anim.name + " - cumSpot for position " + i + ": " + cumSpot) If akActor != actors[i] - If ((actorGender == 1 && config.femaleEnabled) || (actorGender == 0 && config.maleEnabled)) && cumSpot != -1 && cumSpot != 2 + If ((actorGender == 1 && config.femaleEnabled) || (actorGender == 0 && config.maleEnabled)) && cumSpot != -1; && cumSpot != 2 ; only inflate if the actor is female (or male pretending to be female!) and the animation position has cum effect set for something else than oral only If actors[i] == player && sr_CumEffectsEnabled.GetValueInt() > 0 RegisterForModEvent("fhu.playerInflated", "PlayerInflationDone") @@ -447,7 +447,7 @@ Event Orgasm(int thread, bool hasPlayer) int actorGender = sexlab.GetGender(actors[i]) ; log(anim.name + " - cumSpot for position " + i + ": " + cumSpot) ;If ((actorGender == 1 && config.femaleEnabled) || (actorGender == 0 && config.maleEnabled)) && cumSpot != -1 && cumSpot != 2 - If ((actorGender == 1 && config.femaleEnabled) || (actorGender == 0 && config.maleEnabled)) && cumSpot != -1 + If ((actorGender == 1 && config.femaleEnabled) || (actorGender == 0 && config.maleEnabled)) ;&& cumSpot != -1 ; only inflate if the actor is female (or male pretending to be female!) and the animation position has cum effect set for something else than oral only If actors[i] == player && sr_CumEffectsEnabled.GetValueInt() > 0 RegisterForModEvent("fhu.playerInflated", "PlayerInflationDone") From 3a031e9d6c576258d9201cc12b54f2ac3e518733 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Wed, 10 Jan 2024 18:34:39 +0700 Subject: [PATCH 03/20] support DD/UD/Defeat --- .gitignore | 1 + Scripts/Source/sr_inflateBurstEffect.psc | 2 +- Scripts/Source/sr_inflateQuest.psc | 26 +++++++++++++++++++----- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 504c91a..cf53026 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ PAPYRUS +*.pex Scripts/BUILD_ALL.bat \ No newline at end of file diff --git a/Scripts/Source/sr_inflateBurstEffect.psc b/Scripts/Source/sr_inflateBurstEffect.psc index a0d357c..0ee76c0 100644 --- a/Scripts/Source/sr_inflateBurstEffect.psc +++ b/Scripts/Source/sr_inflateBurstEffect.psc @@ -23,7 +23,7 @@ EndEvent Event OnUpdateGameTime() inflater.log("OnUpdateGameTime() burst effect for " + t.GetLeveledActorBase().GetName()) - If t.IsInFaction(slAnimatingFaction) || t.IsInCombat() || inflater.isPlugged(t) == 3 + If inflater.isAnimating(t) || t.IsInCombat() || inflater.isPlugged(t) == 3 inflater.log(t.GetLeveledActorBase().GetName() + " stays bursting.") If totalMultChange > -40.0 totalMultChange -= 5.0 diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index 3c5c7b1..f86b42e 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -78,6 +78,9 @@ Spell Property encumber25 Auto SexLabFramework Property sexlab auto Faction Property slAnimatingFaction auto +Faction Property zadAnimatingFaction auto +Faction Property DefeatFaction auto +Faction Property UDMinigameFaction auto Package Property stayStillPackage auto @@ -308,6 +311,15 @@ Function VersionUpdate() zad_DeviousBelt = Game.GetFormFromFile(0x00003330, "Devious Devices - Assets.esm") as Keyword zad_PermitAnal = Game.GetFormFromFile(0x0000FACA, "Devious Devices - Assets.esm") as Keyword EndIf + If Game.GetModByName("Devious Devices - Integration.esm") != 255 + zadAnimatingFaction = Game.GetFormFromFile(0x00029567, "Devious Devices - Integration.esm") as Faction + EndIf + If Game.GetModByName("SexLabDefeat.esp") != 255 + DefeatFaction = Game.GetFormFromFile(0x00001D92, "SexLabDefeat.esp") as Faction + EndIf + If Game.GetModByName("UnforgivingDevices.esp") != 255 + UDMinigameFaction = Game.GetFormFromFile(0x00150DA3, "UnforgivingDevices.esp") as Faction + EndIf SetIntValue(Player, "CI_CumInflation_ON", 1) eventManager.StartEvents() EndFunction @@ -1626,7 +1638,7 @@ int i while i > 0 i -= 1 Male = sr_InjectorFormlist.getat(i) as actor - if (Male.GetBaseObject() as Actorbase).getsex() == 0 + if Male && (Male.GetBaseObject() as Actorbase).getsex() == 0 FertilityEventGo("FertilityModeAddSperm", a as form, Male.Getleveledactorbase().getname(), Male as form) If fullness > sr_SendingSpermDataCriterion.getvalue() as int FertilityEventGo("FertilityModeImpregnate", a as form, Male.Getleveledactorbase().getname(), None) @@ -1639,7 +1651,7 @@ int i while i > 0 i -= 1 - if (injector[i].GetActorBase()).getsex() == 0 + if injector[i] && (injector[i].GetActorBase()).getsex() == 0 Male = injector[i] FertilityEventGo("FertilityModeAddSperm", a as form, Male.Getleveledactorbase().getname(), Male as form) If fullness > sr_SendingSpermDataCriterion.getvalue() as int @@ -1660,7 +1672,7 @@ int i while i > 0 i -= 1 Male = sr_InjectorFormlist.getat(i) as actor - if (Male.GetBaseObject() as Actorbase).getsex() == 0 + if Male && (Male.GetBaseObject() as Actorbase).getsex() == 0 Male.SendModEvent("BeeingFemale", "AddSperm", a.GetFormID()) Utility.wait(1.0) endif @@ -1670,7 +1682,7 @@ int i while i > 0 i -= 1 - if ((injector[i].GetActorBase()).getsex() == 0) && (Player != injector[i]) + if (injector[i] && (injector[i].GetActorBase()).getsex() == 0) && (Player != injector[i]) ;debug.notification("yes male") Male = injector[i] Male.SendModEvent("BeeingFemale", "AddSperm", a.GetFormID()) @@ -1710,7 +1722,7 @@ State MonitoringInflation n -= 1 Actor a = FormListGet(self, INFLATED_ACTORS, n) as Actor - if a && !a.IsDead() && !a.IsInCombat() && a.GetCurrentScene() == none && !a.IsInFaction(slAnimatingFaction) + if a && !a.IsDead() && !a.IsInCombat() && a.GetCurrentScene() == none && !isAnimating(a) float lastVagTime = GetFloatValue(a, LAST_TIME_VAG) float lastAnalTime = GetFloatValue(a, LAST_TIME_ANAL) float lastoralTime = GetFloatValue(a, LAST_TIME_ORAL) @@ -2604,3 +2616,7 @@ EndFunction Function SLIF_unregisterMorph(Actor akActor, String MorphName) ;Null EndFunction + +bool Function isAnimating(Actor akActor) + return akActor.IsInFaction(slAnimatingFaction) || akActor.IsInFaction(zadAnimatingFaction) || akActor.IsInFaction(DefeatFaction) || akActor.IsInFaction(UDMinigameFaction) +EndFunction \ No newline at end of file From f065ba193982bc5ae03f35a0c8c6782d1a98f189 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Wed, 10 Jan 2024 18:37:42 +0700 Subject: [PATCH 04/20] gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..59e7b1d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +PAPYRUS +*.pex +BUILD_ALL.bat \ No newline at end of file From 497447dec0d9cceb8380a1d21dce354b9528f4ec Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Mon, 19 Aug 2024 20:02:26 +0700 Subject: [PATCH 05/20] improve deflation fps --- Scripts/Source/sr_infDeflateAbility.psc | 43 ++++++++++++++++--------- Scripts/Source/sr_inflateConfig.psc | 2 +- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/Scripts/Source/sr_infDeflateAbility.psc b/Scripts/Source/sr_infDeflateAbility.psc index 4b0a203..c674855 100644 --- a/Scripts/Source/sr_infDeflateAbility.psc +++ b/Scripts/Source/sr_infDeflateAbility.psc @@ -138,6 +138,25 @@ Event OnKeyUp(int kc, float time) endIf EndEvent +Function doPushDeflate(String pool, Actor p, float currentInf) + if config.BodyMorph && (pool == inflater.CUM_VAGINAL || pool == inflater.CUM_ANAL) + ;inflater.SetBellyMorphValue(p, currentInf, "PregnancyBelly") + inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph) + if inflater.InflateMorph2 != "" + inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph2) + endIf + if inflater.InflateMorph3 != "" + inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph3) + endif + elseif config.BodyMorph && pool == inflater.CUM_ORAL + if inflater.InflateMorph4 != "" + inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph4) + endif + else + inflater.SetNodeScale(p, "NPC Belly", currentInf) + endif +EndFunction + Function doPush(int type) Actor p = GetActorReference() Game.DisablePlayerControls() @@ -169,28 +188,18 @@ Function doPush(int type) float originalCum = cum float originalInf = currentInf bAnimController = true + int tick = 10 ; log("Starting: inf: " + currentInf +", cum: " +cum + ", pool: " + pool) While keydown && p.GetActorValuePercentage("Stamina") > 0.02 && cum > 0.02 currentInf -= 0.05*(1.0/inflater.config.animMult) cum -= 0.05*(1.0/inflater.config.animMult) + tick -= 1 if bAnimController;Prevents serious FPS drop due to heavy code stacks. bAnimController = false - if config.BodyMorph && (pool == inflater.CUM_VAGINAL || pool == inflater.CUM_ANAL) - ;inflater.SetBellyMorphValue(p, currentInf, "PregnancyBelly") - inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph) - if inflater.InflateMorph2 != "" - inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph2) - endIf - if inflater.InflateMorph3 != "" - inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph3) - endif - elseif config.BodyMorph && pool == inflater.CUM_ORAL - if inflater.InflateMorph4 != "" - inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph4) - endif - else - inflater.SetNodeScale(p, "NPC Belly", currentInf) - endif + if(tick <= 0) + doPushDeflate(pool, p, currentInf) + tick = 10 + EndIf else bAnimController = true endif @@ -199,6 +208,8 @@ Function doPush(int type) Utility.wait(0.3) endWhile + doPushDeflate(pool, p, currentInf) + If cum < 0.02 cum = 0.0 If type == 1 diff --git a/Scripts/Source/sr_inflateConfig.psc b/Scripts/Source/sr_inflateConfig.psc index 15e7863..050ad44 100644 --- a/Scripts/Source/sr_inflateConfig.psc +++ b/Scripts/Source/sr_inflateConfig.psc @@ -416,7 +416,7 @@ Event OnVersionUpdate(int newVersion) EndIf Debug.Notification("Fill Her Up " + inflater.GetVersionString() + " initialized.") EndIf - debug.messagebox("Fill Her Up Update") + ;debug.messagebox("Fill Her Up Update") EndEvent From 04714600f83e30a2c3858d5fc75cdb7131fd9939 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Tue, 20 Aug 2024 02:01:13 +0700 Subject: [PATCH 06/20] Compile and fixes --- Build.ps1 | 131 +++++++++++++++++++++++ Scripts/Source/include.txt | 36 +++++++ Scripts/Source/sr_FTUDeliveryFrame.psc | 3 +- Scripts/Source/sr_FTUFavorRetryScene.psc | 4 +- Scripts/Source/sr_OrcPickup.psc | 2 +- Scripts/Source/sr_QSTCollarScript.psc | 4 +- Scripts/Source/sr_infDeflateAbility.psc | 50 ++++----- Scripts/Source/sr_inflateConfig.psc | 4 +- Scripts/Source/sr_inflateQuest.psc | 3 +- Scripts/Source/sr_inflateThread.psc | 105 ++++++++++-------- 10 files changed, 256 insertions(+), 86 deletions(-) create mode 100644 Build.ps1 create mode 100644 Scripts/Source/include.txt diff --git a/Build.ps1 b/Build.ps1 new file mode 100644 index 0000000..fcb71b6 --- /dev/null +++ b/Build.ps1 @@ -0,0 +1,131 @@ + +$SOURCE_FILES = ".\Scripts\Source\*.psc" + +$FORCE_RECOMPILE = $false +$PAPYRUS_FOLDER = ".\PAPYRUS" + +$LOG_LEVEL = 1 + +$STATUS_COMPILED_SUCCESS = 1 +$STATUS_COMPILED_FAILED = 2 +$STATUS_COMPILED_SKIPPED = 3 + +function Log { + + param ( + [int] $Level, + [string] $msg, + [object] $object + ) + + if ($Level -ge $LOG_LEVEL) { + if($object) { + Write-Host "$msg : $object" + } else { + Write-Host $msg + } + } +} + +function GenerateDiffFile { + param ( + $file1, + $file2, + $diffFile + ) + + $process = Start-Process -Wait -NoNewWindow -PassThru -FilePath "git.exe" -ArgumentList "diff --patch --no-index --output=`"$diffFile`" `"$file1`" `"$file2`"" + + $ret = [PSCustomObject]@{ + command = "git diff" + file = $diffFile + ExitCode = $process.ExitCode + Status = if($process.ExitCode -eq 1) {$STATUS_COMPILED_SUCCESS} else {$STATUS_COMPILED_FAILED} + } + $ret +} + +function Compile { + param ( + $file + ) + Log -Level 1 -msg "Compile" -object $file + $filePath = $file | Split-Path -Parent + $sourceBaseDir = $filePath | Split-Path -Parent + $includeFile = $filePath + "\include.txt" + $flagsFile = Resolve-Path "$PAPYRUS_FOLDER\Flags.flg" + [string]$include = $filePath + if([System.IO.File]::Exists($includeFile)) { + $lines = Get-Content -Path $includeFile + foreach ( $line in $lines ) { + $path = Resolve-Path "$PAPYRUS_FOLDER\$line" + $include = [string]::Join(';', $include, $path) + Log -Level 0 -msg "Include " -object $path + } + } + + $originalFile = $sourceBaseDir + "\source_original\" + $file.BaseName + ".psc" + if([System.IO.File]::Exists($originalFile)) { + $diffFile = $sourceBaseDir + "\source\" + $file.BaseName + ".patch"; + $ret = GenerateDiffFile -file1 $originalFile -file2 $file -diffFile $diffFile + if($ret.Status -ne $STATUS_COMPILED_SUCCESS) { + return $ret + } + } + + $process = Start-Process -Wait -NoNewWindow -PassThru -FilePath "$PAPYRUS_FOLDER\PapyrusCompiler.exe" -ArgumentList "`"$file`" -o=`"$sourceBaseDir`" -i=`"$include`" -optimize -f=`"$flagsFile`"" + + $ret = [PSCustomObject]@{ + command = "PapyrusCompiler" + file = $file + ExitCode = $process.ExitCode + Status = if($process.ExitCode -eq 0) {$STATUS_COMPILED_SUCCESS} else {$STATUS_COMPILED_FAILED} + } + $ret +} + +function CompileIfNewest { + param ( + $file + ) + + $sourceBaseDir = $file | Split-Path -Parent | Split-Path -Parent + $pexFile = $sourceBaseDir + "\" + $file.BaseName + ".pex" + Log -Level 0 -msg "Pex file" -object $pexFile + if($FORCE_RECOMPILE) { + Log -Level 0 -msg "Compile by force" -object $file + Compile -file $file + } else { + if([System.IO.File]::Exists($pexFile)) { + $pexFile = Get-Item $pexFile + if ($file.LastWriteTime -gt $pexFile.LastWriteTime) { + Log -Level 0 -msg "Compile by modification date" -object $file + Compile -file $file + } else { + Log -Level 0 -msg "Skip by modification date" -object $file + [pscustomobject]@{Status = $STATUS_COMPILED_SKIPPED} + } + } else { + Log -Level 0 -msg "Compile by not compiled yet" -object $file + Compile -file $file + } + } +} + +$pscFiles = Get-ChildItem -Path $SOURCE_FILES -Force -Recurse -Exclude $PAPYRUS_FOLDER + +foreach ( $pscFile in $pscFiles ) +{ + Log -Level 0 -msg "Process" -object $pscFile + $ret = CompileIfNewest -file $pscFile + if($ret.Status -eq $STATUS_COMPILED_FAILED) { + Write-Host "---" + Write-Host "Build failed:" + Write-Host "!" $ret.file.Name + Write-Host " -" $ret.command $ret.file + Log -Level 0 -msg "Process result" -object $ret + #Exit + } else { + Log -Level 0 -msg "Process result" -object $ret + } +} \ No newline at end of file diff --git a/Scripts/Source/include.txt b/Scripts/Source/include.txt new file mode 100644 index 0000000..f624c8b --- /dev/null +++ b/Scripts/Source/include.txt @@ -0,0 +1,36 @@ +SRC_DD +SRC_RM +SRC_PAPUTIL +SRC_MFG +SRC_SXL +SRC_SLA +SRC_ZAZ +SRC_ITF +SRC_DCUR +SRC_AYGAS +SRC_SLIF +SRC_HSH +SRC_PAH_SC +SRC_PAH +SRC_SLSW +SRC_SLAL +SRC_SXL +SRC_SD +SRC_DFW +SRC_SOS +SRC_ST +SRC_IWW +SRC_UIEXT +SRC_SKYUI +SRC_GCIP +SRC_OBODY +SRC_UILIB +SRC_PO3 +SRC_FNIS +SRC_XPMSE +SRC_UNK +SRC_PAPUTIL +SRC_JC +SRC_SKSE +SRC_CK +SRC \ No newline at end of file diff --git a/Scripts/Source/sr_FTUDeliveryFrame.psc b/Scripts/Source/sr_FTUDeliveryFrame.psc index 65e9109..644f7ac 100644 --- a/Scripts/Source/sr_FTUDeliveryFrame.psc +++ b/Scripts/Source/sr_FTUDeliveryFrame.psc @@ -151,7 +151,8 @@ Event PurityMonitor(int threadID, bool hasPlayer) Actor[] actors = SexLab.HookActors(threadId) actor pl = Game.GetPlayer() int pli = actors.Find(pl) - int cumSpot = anim.AccessPosition(pli, 1) + ;int cumSpot = anim.AccessPosition(pli, 1) + int cumSpot = anim.GetCum(pli) If ( ( anim.HasTag("vaginal") && ( blocked == 1 || blocked == 3 ) ) || (anim.HasTag("anal") && ( blocked == 2 || blocked == 3 ) ) ) && cumSpot != -1 && cumSpot != 2 int i = actors.length diff --git a/Scripts/Source/sr_FTUFavorRetryScene.psc b/Scripts/Source/sr_FTUFavorRetryScene.psc index 88cda55..da340bb 100644 --- a/Scripts/Source/sr_FTUFavorRetryScene.psc +++ b/Scripts/Source/sr_FTUFavorRetryScene.psc @@ -43,7 +43,7 @@ Function FillStart() EndIf ftu.StartMoanLoop(inflater.player) RegisterForModEvent("ftu-favor-retryscene", "FillCont") - inflater.InflateTo(inflater.player, 1, 30.0, targetLevel = -1.0, callback = "ftu-favor-retryscene") + inflater.InflateTo(inflater.player, 1, 30.0, callback = "ftu-favor-retryscene") EndFunction Event FillCont(Form akActor, float startVag, float startAn) @@ -51,7 +51,7 @@ Event FillCont(Form akActor, float startVag, float startAn) UnregisterForModEvent("ftu-favor-retryscene") RegisterForModEvent("ftu-favor-retryscene2", "FillFinish") - float target = (inflater.config.maxInflation - inflater.GetOriginalScale(inflater.player)) * 0.2 ; Fill anal pool 20%, not quite enough to trigger bursting which in reality is around ~126% of pool size + float target = (inflater.config.maxInflation - StorageUtil.GetFloatValue(inflater.player, inflater.ORIGINAL_SCALE, 1.0)) * 0.2 ; Fill anal pool 20%, not quite enough to trigger bursting which in reality is around ~126% of pool size inflater.InflateTo(inflater.player, 2, 10.0, target, callback = "ftu-favor-retryscene2") EndEvent diff --git a/Scripts/Source/sr_OrcPickup.psc b/Scripts/Source/sr_OrcPickup.psc index f562d2c..e682b8f 100644 --- a/Scripts/Source/sr_OrcPickup.psc +++ b/Scripts/Source/sr_OrcPickup.psc @@ -410,7 +410,7 @@ Function StartTransfer(Actor c) RegisterForModEvent(cb, cbf) inflater.QueueActor(pl, false, pool, plVag, vagTime, callback = cb, animate = -1) - inflater.QueueActor(courier, true, inflater.VAGINAL, (inflater.config.maxInflation - inflater.GetOriginalScale(courier)), (totalTime + 1)) + inflater.QueueActor(courier, true, inflater.VAGINAL, (inflater.config.maxInflation - StorageUtil.GetFloatValue(courier, inflater.ORIGINAL_SCALE, 1.0)), (totalTime + 1)) inflater.InflateQueued() EndFunction diff --git a/Scripts/Source/sr_QSTCollarScript.psc b/Scripts/Source/sr_QSTCollarScript.psc index 9307140..281e9ad 100644 --- a/Scripts/Source/sr_QSTCollarScript.psc +++ b/Scripts/Source/sr_QSTCollarScript.psc @@ -27,8 +27,8 @@ Function DeviceMenuRemoveWithoutKey() libs.PlayerRef.DamageAV("Magicka", 50) libs.Notify("You flood the "+deviceInventory.GetName()+" with arcane energies, but everything you cast gets absorbed by the " + deviceName + ".", messageBox=true) endif - elseif deviceRemoveOption == 2 ; Brute force - DeviceMenuBruteForce() + elseif deviceRemoveOption == 2 ; Cut Device + EscapeAttemptCut() elseif deviceRemoveOption == 3 DeviceMenuCarryOn() endif diff --git a/Scripts/Source/sr_infDeflateAbility.psc b/Scripts/Source/sr_infDeflateAbility.psc index c674855..79d2589 100644 --- a/Scripts/Source/sr_infDeflateAbility.psc +++ b/Scripts/Source/sr_infDeflateAbility.psc @@ -187,29 +187,26 @@ Function doPush(int type) float cum = StorageUtil.GetFloatValue(p, pool) float originalCum = cum float originalInf = currentInf - bAnimController = true - int tick = 10 + int deflationTick = 5 + int tick = deflationTick ; log("Starting: inf: " + currentInf +", cum: " +cum + ", pool: " + pool) While keydown && p.GetActorValuePercentage("Stamina") > 0.02 && cum > 0.02 + float deflateAmount = 0.05 * (1.0 / inflater.config.animMult) + If deflateAmount > cum + deflateAmount = cum + EndIf currentInf -= 0.05*(1.0/inflater.config.animMult) cum -= 0.05*(1.0/inflater.config.animMult) tick -= 1 - if bAnimController;Prevents serious FPS drop due to heavy code stacks. - bAnimController = false - if(tick <= 0) - doPushDeflate(pool, p, currentInf) - tick = 10 - EndIf - else - bAnimController = true - endif + if(tick <= 0) ;Prevents serious FPS drop due to heavy code stacks. + doPushDeflate(pool, p, currentInf) + tick = deflationTick + EndIf ; log("current: inf: " + currentInf +", cum: " +cum) p.DamageActorValue("Stamina", dps) Utility.wait(0.3) endWhile - doPushDeflate(pool, p, currentInf) - If cum < 0.02 cum = 0.0 If type == 1 @@ -228,27 +225,12 @@ Function doPush(int type) ; log("Final cum: "+cum+", cum diff from original: " + diff + ", final inflation: " + currentInf) - If currentInf < 1.0 + If currentInf <= 0.0 currentInf = 0.0 StorageUtil.FormListRemove(inflater, inflater.INFLATED_ACTORS, p, true) inflater.sr_plugged.SetValueInt(0) EndIf - if config.BodyMorph && (pool == inflater.CUM_VAGINAL || pool == inflater.CUM_ANAL) - ;inflater.SetBellyMorphValue(p, currentInf, "PregnancyBelly") - inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph) - if inflater.InflateMorph2 != "" - inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph2) - endIf - if inflater.InflateMorph3 != "" - inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph3) - endif - elseif config.BodyMorph && pool == inflater.CUM_ORAL - if inflater.InflateMorph4 != "" - inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph4) - endif - else - inflater.SetNodeScale(p, "NPC Belly", currentInf) - endif + doPushDeflate(pool, p, currentInf) if type < 3 StorageUtil.SetFloatValue(p, inflater.INFLATION_AMOUNT, currentInf) endif @@ -301,6 +283,14 @@ Function doPush(int type) p.additem(FHUVomitCum, cumcompare) endif endif + + if StorageUtil.GetFloatValue(p, inflater.CUM_ANAL) == 0.0 && StorageUtil.GetFloatValue(p, inflater.CUM_VAGINAL) == 0.0 && StorageUtil.GetFloatValue(p, inflater.CUM_ORAL) == 0.0 + StorageUtil.FormListRemove(inflater, inflater.INFLATED_ACTORS, p, true) + inflater.RemoveFaction(p) + inflater.UnencumberActor(p) + inflater.sr_plugged.setValueInt(0) + endif + EndFunction Function log(String msg) diff --git a/Scripts/Source/sr_inflateConfig.psc b/Scripts/Source/sr_inflateConfig.psc index 050ad44..ae402bc 100644 --- a/Scripts/Source/sr_inflateConfig.psc +++ b/Scripts/Source/sr_inflateConfig.psc @@ -787,8 +787,8 @@ State settings SetToggleOptionValue(loggingOID, logging) inflater.log("Logging set to: " + logging) ElseIf opt == FHUSLIFOID - FHUSLIF != FHUSLIF - sr_SLIF.setvalue(FHUSLIF as int) + FHUSLIF = !FHUSLIF + sr_SLIF.SetValueInt(FHUSLIF as int) SetToggleOptionValue(FHUSLIFOID, FHUSLIF) ElseIf opt == resetOID if !resetting diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index f86b42e..ec5d488 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -811,7 +811,7 @@ float CreatureCumAmount = 0 Return CreatureCumAmount EndFunction -Function InflateTo(Actor akActor, int h, float targetLevel = -1.0, float time, String callback = "") +Function InflateTo(Actor akActor, int h, float targetLevel = -1.0, float time = 2.0, String callback = "") if targetLevel <= 0.0 targetLevel = config.maxInflation endIf @@ -1103,6 +1103,7 @@ cumtypei = cumtype akActor.equipItem(sr_AnalLeak, abSilent=true) elseif CumType == 3 akActor.addItem(sr_OralLeak, 1, true) + Utility.Wait(0.5) akActor.equipItem(sr_OralLeak, abSilent=true) EndIf SetIntValue(akActor, ANIMATING, 2) diff --git a/Scripts/Source/sr_inflateThread.psc b/Scripts/Source/sr_inflateThread.psc index 5265a37..15e4e07 100644 --- a/Scripts/Source/sr_inflateThread.psc +++ b/Scripts/Source/sr_inflateThread.psc @@ -365,14 +365,17 @@ Function Deflate() Actor akActor = GetActorReference() log("Deflating") int Cumtype - isAnal = !isVaginal ; A bit of hack to have the same parameter on both inflate and deflate despite different usage + If !isOral + isAnal = !isVaginal ; A bit of hack to have the same parameter on both inflate and deflate despite different usage + EndIf float currentInflation float vagCum = GetFloatValue(akActor, inflater.CUM_VAGINAL) float analCum = GetFloatValue(akActor, inflater.CUM_ANAL) float oralCum = GetFloatValue(akActor, inflater.CUM_ORAL) - bAnimController = true + int deflationTick = 10 + int tick = deflationTick ; Starting values for the callback, current values can be fetched directly float startVag = vagCum float startAn = analCum @@ -400,6 +403,10 @@ Function Deflate() float deflateTarget = totalInf - cumAmount log("deflateTarget = "+vagCum+" + "+analCum+" - "+cumAmount) + + if deflateTarget < 0.0 + deflateTarget = 0.0 + endif If totalInf > maxInflation && deflateTarget < maxInflation log("Combined total higher than max and target lower than max! total: "+totalInf+", target: "+deflateTarget+", max: "+maxInflation, 1) @@ -430,8 +437,8 @@ Function Deflate() If akActor.Is3DLoaded() while currentInflation > deflateTarget currentInflation -= step - if bAnimController - bAnimController = false + tick -= 1 + if(tick <= 0) if config.BodyMorph && (isAnal || isVaginal) inflater.SetBellyMorphValue(akActor, currentInflation, inflater.InflateMorph) if inflater.InflateMorph2 != "" @@ -447,8 +454,7 @@ Function Deflate() Else inflater.SetNodeScale(akActor, inflater.BELLY_NODE, currentInflation) Endif - else - bAnimController = true + tick = deflationTick endif Utility.Wait(0.2) endWhile @@ -490,27 +496,33 @@ Function Deflate() if analCum < 0.1 analCum = 0.0 UnsetFloatValue(akActor, inflater.LAST_TIME_ANAL) + UnsetFloatValue(akActor, inflater.CUM_ANAL) + Else + SetFloatValue(akActor, inflater.CUM_ANAL, analCum) EndIf - SetFloatValue(akActor, inflater.CUM_ANAL, analCum) Elseif isVaginal vagCum -= cumAmount if vagCum < 0.1 vagCum = 0.0 UnsetFloatValue(akActor, inflater.LAST_TIME_VAG) + UnsetFloatValue(akActor, inflater.CUM_VAGINAL) + Else + SetFloatValue(akActor, inflater.CUM_VAGINAL, vagCum) EndIf - SetFloatValue(akActor, inflater.CUM_VAGINAL, vagCum) else oralCum -= cumAmount if oralCum < 0.1 oralCum = 0.0 UnsetFloatValue(akActor, inflater.LAST_TIME_ORAL) + UnsetFloatValue(akActor, inflater.CUM_ORAL) + Else + SetFloatValue(akActor, inflater.CUM_ORAL, oralCum) EndIf - SetFloatValue(akActor, inflater.CUM_ORAL, oralCum) EndIf - log("Cum amounts after deflation, v: "+ vagCum +", a: "+ analCum +", t: "+ (analCum+vagCum)) + log("Cum amounts after deflation, v: "+ vagCum +", a: "+ analCum +", t: "+ (analCum+vagCum) + ", o: " + oralCum) if Cumtype < 3 - if ( analCum <= 0.0 && vagCum <= 0.0 ) || deflateTarget <= 1.0 + if ( analCum <= 0.0 && vagCum <= 0.0 ) If(inflater.config.bellyScale) if config.BodyMorph ;inflater.SetBellyMorphValue(akActor, 0.0, inflater.PregnancyBelly) @@ -525,23 +537,13 @@ Function Deflate() inflater.SetNodeScale(akActor, inflater.BELLY_NODE, 0.0) Endif EndIf - SetFloatValue(akActor, inflater.CUM_ANAL, analCum) - ;SetFloatValue(akActor, inflater.CUM_VAGINAL, analCum) - SetFloatValue(akActor, inflater.CUM_VAGINAL, vagCum) - SetFloatValue(akActor, inflater.INFLATION_AMOUNT, 0.0) - log("Deflated to removal of NIO scale") - FormListRemove(inflater, inflater.INFLATED_ACTORS, akActor, true) - inflater.RemoveFaction(akActor) - inflater.UnencumberActor(akActor) - If akActor == inflater.player - inflater.sr_plugged.setValueInt(0) - EndIf + UnsetFloatValue(akActor, inflater.INFLATION_AMOUNT) else inflater.UpdateFaction(akActor) inflater.EncumberActor(akActor) endif elseif Cumtype == 3 - if OralCum <= 0.0 || deflateTarget <= 0.5 + if OralCum <= 0.0 If(inflater.config.bellyScale) if config.BodyMorph if inflater.InflateMorph4 != "" @@ -549,11 +551,19 @@ Function Deflate() endIf endif endif - SetFloatValue(akActor, inflater.CUM_ORAL, oralCum) Else inflater.UpdateOralFaction(akActor) EndIf endif + + if analCum == 0.0 && vagCum == 0.0 && OralCum == 0.0 + FormListRemove(inflater, inflater.INFLATED_ACTORS, akActor, true) + inflater.RemoveFaction(akActor) + inflater.UnencumberActor(akActor) + if akActor == inflater.player + inflater.sr_plugged.setValueInt(0) + endif + endif If cb != "" Int eid = ModEvent.Create(cb) @@ -586,14 +596,13 @@ Function Absorb() Actor akActor = GetActorReference() log("Absorbing") int Cumtype - isAnal = !isVaginal - float currentInflation float vagCum = GetFloatValue(akActor, inflater.CUM_VAGINAL) float analCum = GetFloatValue(akActor, inflater.CUM_ANAL) float oralCum = GetFloatValue(akActor, inflater.CUM_ORAL) - bAnimController = true + int deflationTick = 5 + int tick = deflationTick ; Starting values for the callback, current values can be fetched directly float startVag = vagCum float startAn = analCum @@ -629,7 +638,9 @@ Function Absorb() float deflateTarget = totalInf - cumAmount log("deflateTarget = "+vagCum+" + "+analCum+" - "+cumAmount) - + if deflateTarget < 0.0 + deflateTarget = 0.0 + endif If totalInf > maxInflation && deflateTarget < maxInflation log("Combined total higher than max and target lower than max! total: "+totalInf+", target: "+deflateTarget+", max: "+maxInflation, 1) ; deflateTarget = totalInf - cumAmount;Duplicate @@ -659,8 +670,8 @@ Function Absorb() If akActor.Is3DLoaded() while currentInflation > deflateTarget currentInflation -= step - if bAnimController - bAnimController = false + tick -= 1 + if(tick <= 0) if config.BodyMorph && (isAnal || isVaginal) ;inflater.SetBellyMorphValue(akActor, currentInflation, inflater.PregnancyBelly) inflater.SetBellyMorphValue(akActor, currentInflation, inflater.InflateMorph) @@ -677,8 +688,7 @@ Function Absorb() Else inflater.SetNodeScale(akActor, inflater.BELLY_NODE, currentInflation) Endif - else - bAnimController = true + tick = deflationTick endif Utility.Wait(0.2) endWhile @@ -738,12 +748,14 @@ Function Absorb() if oralCum < 0.1 oralCum = 0.0 UnsetFloatValue(akActor, inflater.LAST_TIME_ORAL) + UnsetFloatValue(akActor, inflater.CUM_ORAL) + Else + SetFloatValue(akActor, inflater.CUM_ORAL, oralCum) EndIf - SetFloatValue(akActor, inflater.CUM_ORAL, oralCum) EndIf - log("Cum amounts after deflation, v: "+ vagCum +", a: "+ analCum +", t: "+ (analCum+vagCum)) + log("Cum amounts after absorb, v: "+ vagCum +", a: "+ analCum +", t: "+ (analCum+vagCum) + ", o: " + oralCum) if Cumtype < 3 - if ( analCum <= 0.0 && vagCum <= 0.0 ) || deflateTarget <= 1.0 + if ( analCum <= 0.0 && vagCum <= 0.0 ) If(inflater.config.bellyScale) if config.BodyMorph ;inflater.SetBellyMorphValue(akActor, 0.0, inflater.PregnancyBelly) @@ -758,22 +770,13 @@ Function Absorb() inflater.SetNodeScale(akActor, inflater.BELLY_NODE, 0.0) Endif EndIf - SetFloatValue(akActor, inflater.CUM_ANAL, 0.0) - SetFloatValue(akActor, inflater.CUM_VAGINAL, 0.0) - SetFloatValue(akActor, inflater.INFLATION_AMOUNT, 0.0) - log("Deflated to removal of NIO scale") - FormListRemove(inflater, inflater.INFLATED_ACTORS, akActor, true) - inflater.RemoveFaction(akActor) - inflater.UnencumberActor(akActor) - If akActor == inflater.player - inflater.sr_plugged.setValueInt(0) - EndIf + UnsetFloatValue(akActor, inflater.INFLATION_AMOUNT) else inflater.UpdateFaction(akActor) inflater.EncumberActor(akActor) endif elseif Cumtype == 3 - if OralCum <= 0.0 || deflateTarget <= 0.5 + if OralCum <= 0.0 If(inflater.config.bellyScale) if config.BodyMorph if inflater.InflateMorph4 != "" @@ -781,12 +784,20 @@ Function Absorb() endIf endif endif - SetFloatValue(akActor, inflater.CUM_ORAL, 0.0) Else inflater.UpdateOralFaction(akActor) EndIf endif + if analCum == 0.0 && vagCum == 0.0 && OralCum == 0.0 + FormListRemove(inflater, inflater.INFLATED_ACTORS, akActor, true) + inflater.RemoveFaction(akActor) + inflater.UnencumberActor(akActor) + if akActor == inflater.player + inflater.sr_plugged.setValueInt(0) + endif + endif + If cb != "" Int eid = ModEvent.Create(cb) ModEvent.PushForm(eid, akActor) From b03431e3fe1cdbeb50d9261edc6277b945635b99 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Tue, 20 Aug 2024 09:35:27 +0700 Subject: [PATCH 07/20] fix undress and injector --- Scripts/Source/sr_QSTBeltScript.psc | 4 +- Scripts/Source/sr_inflateQuest.psc | 95 +++++++++++++++++++---------- Scripts/Source/sr_inflateThread.psc | 2 + 3 files changed, 67 insertions(+), 34 deletions(-) diff --git a/Scripts/Source/sr_QSTBeltScript.psc b/Scripts/Source/sr_QSTBeltScript.psc index cf9c485..85c5742 100644 --- a/Scripts/Source/sr_QSTBeltScript.psc +++ b/Scripts/Source/sr_QSTBeltScript.psc @@ -27,8 +27,8 @@ Function DeviceMenuRemoveWithoutKey() libs.PlayerRef.DamageAV("Magicka", 50) libs.Notify("You flood the "+deviceInventory.GetName()+" with arcane energies, but everything you cast gets absorbed by the " + deviceName + ".", messageBox=true) endif - elseif deviceRemoveOption == 2 ; Brute force - DeviceMenuBruteForce() + elseif deviceRemoveOption == 2 ; Cut Device + EscapeAttemptCut() elseif deviceRemoveOption == 3 DeviceMenuCarryOn() endif diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index ec5d488..dcb98ab 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -95,8 +95,8 @@ ImpactDataSet Property SFU_CumImpactDataSet Auto ImpactDataSet Property SFU_CumMidImpactDataSet Auto ImpactDataSet Property SFU_CumHighImpactDataSet Auto -Actor[] Property Injector Auto -Actor[] Property InjectorPlayer Auto +Actor[] Property Injector Auto ; deprecated +Actor[] Property InjectorPlayer Auto ; deprecated formlist Property sr_InjectorFormlist auto Actor Property Player Auto Actor DeflateActor @@ -347,18 +347,33 @@ event FHUSexlabEnd(int tid, bool HasPlayer) If anim.hasTag("Vaginal") if HasPlayer int i = actors.length - InjectorPlayer = actors while i > 1 i -= 1 sr_InjectorFormlist.addform(actors[i]) endwhile ; debug.notification(tid) -; Debug.Notification(victim.GetLeveledActorBase().GetName() + " took sperm from " + injectorPlayer[0].GetLeveledActorBase().GetName()) else - injector[0] = actors[1] - injector[1] = actors[2] - injector[2] = actors[3] - injector[3] = actors[4] + Actor[] injectorArray = new Actor[4] + int i = 0 + while i < 4 + if i < (actors.length - 1) + injectorArray[i] = actors[i + 1] + else + Actor last = FormListShift(Victim, "sr.inflater.injector") as Actor + if last + injectorArray[i] = last + endif + endif + i += 1 + endwhile + FormListClear(Victim, "sr.inflater.injector") + i = 0 + while i < 4 + If injectorArray[i] + FormListAdd(Victim, "sr.inflater.injector", injectorArray[i]) + EndIf + i += 1 + endwhile Debug.Notification(victim.GetLeveledActorBase().GetName() + " (NPC) took sperm from " + Male.GetLeveledActorBase().GetName()) endif else @@ -848,6 +863,9 @@ Function Absorbto(Actor akActor, int poolMask, float targetLevel = -1.0, float t EndFunction Function CheckingLastActor(actor akactor) + If akactor != player + ; TODO + EndIf form Male race malerace float chaurusnum = 0 @@ -859,18 +877,14 @@ float Spriggannum = 0 float StoneAtronachnum = 0 float beastcumnum = 0 float RaceAmount -;int i = injectorPlayer.length int actori = -1 int i = sr_InjectorFormlist.getsize() while i > 0 i -= 1 Male = sr_InjectorFormlist.getat(i) - actori = GetCreatureRaceint(Male as actor) - ;malerace = (injectorPlayer[i].GetActorBase()).getrace() - ;Debug.Notification(injectorPlayer[i].GetLeveledActorBase().GetName() + " sperm " + i) - ;if injectorPlayer[i] if Male + actori = GetCreatureRaceint(Male as actor) if actori == -1 humannum += 0.5 elseif actori == 0 @@ -1648,12 +1662,12 @@ int i endif endwhile else - i = injector.length - + i = FormListCount(a, "sr.inflater.injector") while i > 0 i -= 1 - if injector[i] && (injector[i].GetActorBase()).getsex() == 0 - Male = injector[i] + Male = FormListGet(a, "sr.inflater.injector", i) as Actor + if Male && (Male.GetActorBase()).getsex() == 0 + log("FertilityModeAddSperm to " + a + " from " + Male) FertilityEventGo("FertilityModeAddSperm", a as form, Male.Getleveledactorbase().getname(), Male as form) If fullness > sr_SendingSpermDataCriterion.getvalue() as int FertilityEventGo("FertilityModeImpregnate", a as form, Male.Getleveledactorbase().getname(), None) @@ -1668,7 +1682,6 @@ int i if sr_BeeingFemale.getvalue() == 1 if a == Player - ;i = injectorPlayer.length i = sr_InjectorFormlist.getsize() while i > 0 i -= 1 @@ -1679,13 +1692,13 @@ int i endif endwhile else - i = injector.length - + i = FormListCount(a, "sr.inflater.injector") while i > 0 i -= 1 - if (injector[i] && (injector[i].GetActorBase()).getsex() == 0) && (Player != injector[i]) + Male = FormListGet(a, "sr.inflater.injector", i) as Actor + if (Male && (Male.GetActorBase()).getsex() == 0) && (Player != Male) ;debug.notification("yes male") - Male = injector[i] + log("BeeingFemale AddSperm to " + a + " from " + Male) Male.SendModEvent("BeeingFemale", "AddSperm", a.GetFormID()) Utility.wait(1.0) else @@ -1818,6 +1831,7 @@ State MonitoringInflation ElseIf a == none || a.isDead() || a.isdisabled() warn("Found dead or none actor in inflated actor list, removing.") FormListRemoveAt(self, INFLATED_ACTORS, n) + FormListClear(a, "sr.inflater.injector") ; FormListRemove(self, INFLATED_ACTORS, FormListGet(self, INFLATED_ACTORS, n), true) EndIf EndWhile @@ -1885,6 +1899,7 @@ Function ResetActors(bool force = false) Else RemoveNodeScale(a, BELLY_NODE) Endif + FormListClear(a, "sr.inflater.injector") UnsetFloatValue(a, INFLATION_AMOUNT) UnsetFloatValue(a, CUM_ANAL) @@ -1964,6 +1979,7 @@ Function ResetActor(Actor a) UnencumberActor(a) RemoveFaction(a) FormListRemove(self, INFLATED_ACTORS, a, true) + FormListClear(a, "sr.inflater.injector") If a == player SendPlayerCumUpdate(0.0, true) SendPlayerCumUpdate(0.0, false) @@ -2130,6 +2146,7 @@ Function StripActor(Actor akActor) endIf EndFunction +; Unused Function StripCover(Actor akActor, bool isAnal) If config.strip int slot = 0x1000000 @@ -2150,7 +2167,8 @@ Function UnstripActor(Actor akActor) EndFunction Function UnequipArmor(Actor target) -wornforms = new Armor[32] +;wornforms = new Armor[32] +FormListClear(target, "sr.inflater.unequipped") ;int index = wornforms.length int index = 0 @@ -2166,8 +2184,9 @@ int thisSlot = 0x01 curr_armor = target.GetWornForm(thisSlot) as Armor if curr_armor if (!SexLabUtil.HasKeywordSub(curr_armor, "NoStrip")) - wornforms[index] = curr_armor + ;wornforms[index] = curr_armor Target.UnequipItem(curr_armor, false, true) + FormListAdd(target, "sr.inflater.unequipped", curr_armor) index += 1 EndIf endif @@ -2179,14 +2198,26 @@ EndFunction Function EquipArmor(Actor target) -int index = wornforms.length - - while index > 0 - index -= 1 - if wornforms[index] - Target.equipItem(wornforms[index], false, true) - EndIf - endWhile + int i = FormListCount(target, "sr.inflater.unequipped") + while(i > 0) + i -= 1 + Armor curr_armor = FormListGet(target, "sr.inflater.unequipped", i) as Armor + if(curr_armor && !target.IsEquipped(curr_armor) && !target.GetWornForm(curr_armor.GetSlotMask())) + bool inInventory = false + Int iIndex = target.GetNumItems() + While iIndex > 0 + iIndex -= 1 + If target.GetNthForm(iIndex) == curr_armor + inInventory = true + EndIf + EndWhile + If inInventory + Target.equipItem(curr_armor, false, true) + EndIf + endif + FormListRemoveAt(target, "sr.inflater.unequipped", i) + endwhile + FormListClear(target, "sr.inflater.unequipped") EndFunction diff --git a/Scripts/Source/sr_inflateThread.psc b/Scripts/Source/sr_inflateThread.psc index 15e4e07..a1e7bde 100644 --- a/Scripts/Source/sr_inflateThread.psc +++ b/Scripts/Source/sr_inflateThread.psc @@ -558,6 +558,7 @@ Function Deflate() if analCum == 0.0 && vagCum == 0.0 && OralCum == 0.0 FormListRemove(inflater, inflater.INFLATED_ACTORS, akActor, true) + FormListClear(inflater, "sr.inflater.injector") inflater.RemoveFaction(akActor) inflater.UnencumberActor(akActor) if akActor == inflater.player @@ -791,6 +792,7 @@ Function Absorb() if analCum == 0.0 && vagCum == 0.0 && OralCum == 0.0 FormListRemove(inflater, inflater.INFLATED_ACTORS, akActor, true) + FormListClear(inflater, "sr.inflater.injector") inflater.RemoveFaction(akActor) inflater.UnencumberActor(akActor) if akActor == inflater.player From 829d594a16cd328c7b34647e3c92bbe56e61b521 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Wed, 21 Aug 2024 17:41:32 +0700 Subject: [PATCH 08/20] fixes --- Scripts/Source/sr_inflateConfig.psc | 9 +++++++++ Scripts/Source/sr_inflateQuest.psc | 3 +++ Scripts/Source/sr_inflateThread.psc | 26 +++++++++++++++++++------- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/Scripts/Source/sr_inflateConfig.psc b/Scripts/Source/sr_inflateConfig.psc index ae402bc..a18fedf 100644 --- a/Scripts/Source/sr_inflateConfig.psc +++ b/Scripts/Source/sr_inflateConfig.psc @@ -606,7 +606,16 @@ Event OnPageReset(String page) AddTextOption("$FHU_VAG_AMOUNT", StringUtil.SubString(inflater.GetVaginalCum(a), 0, 5)) EndIf AddTextOption("$FHU_AN_AMOUNT", StringUtil.SubString(inflater.GetAnalCum(a), 0, 5)) + AddTextOption("$FHU_OR_AMOUNT", StringUtil.SubString(inflater.GetOralCum(a), 0, 5)) AddTextOption("$FHU_TOTAL_INF", StringUtil.SubString(inflater.GetInflation(a),0,5)) + + int iinjector = StorageUtil.FormListCount(a, "sr.inflater.injector") + while iinjector > 0 + iinjector -= 1 + Actor injector = StorageUtil.FormListGet(a, "sr.inflater.injector", iinjector) as Actor + AddTextOption(injector.GetLeveledActorBase().GetName(), DefineSex(injector)) + endwhile + EndIf EndWhile SetCursorPosition(1) diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index dcb98ab..9795ca4 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -1470,9 +1470,12 @@ Function StopLeakage(Actor akActor) if akActor == player Game.EnablePlayerControls() + Debug.SendAnimationEvent(akActor as ObjectReference,"IdleForceDefaultState") Else MfgConsoleFunc.ResetPhonemeModifier(akActor);Player expression is controlled here(OnKeyUp) ActorUtil.RemovePackageOverride(akActor, stayStillPackage) + Debug.SendAnimationEvent(akActor as ObjectReference,"IdleForceDefaultState") + akActor.EvaluatePackage() EndIf if spermtype == 1 diff --git a/Scripts/Source/sr_inflateThread.psc b/Scripts/Source/sr_inflateThread.psc index a1e7bde..c207830 100644 --- a/Scripts/Source/sr_inflateThread.psc +++ b/Scripts/Source/sr_inflateThread.psc @@ -58,6 +58,11 @@ Event StartInflation() running = true UnregisterForUpdate() Actor t = GetActorReference() + if !t + log("Can't process, Actor Reference is None.", 1) + clear() + return + endIf If t.IsInFaction(inflater.inflaterAnimatingFaction) log("Can't process, she is already animating.", 1) clear() @@ -381,20 +386,26 @@ Function Deflate() float startAn = analCum float startOral = oralCum float totalInf - float maxInflation = inflater.config.maxInflation + float maxInflation if isVaginal currentInflation = GetFloatValue(akActor, inflater.INFLATION_AMOUNT) totalInf = vagCum + analCum Cumtype = 1 + maxInflation = inflater.config.maxInflation + log("deflateTarget Vaginal = "+vagCum+" + "+analCum+" - "+cumAmount) elseif isAnal currentInflation = GetFloatValue(akActor, inflater.INFLATION_AMOUNT) totalInf = vagCum + analCum Cumtype = 2 + maxInflation = inflater.config.maxInflation + log("deflateTarget Anal = "+vagCum+" + "+analCum+" - "+cumAmount) elseif isOral currentInflation = oralCum totalInf = oralCum Cumtype = 3 + maxInflation = inflater.config.OralmaxInflation + log("deflateTarget Oral = "+oralCum+" - "+cumAmount) endif If (isAnal && analCum - cumAmount > 0.0 && vagCum > 0.0) || (!isAnal && vagCum - cumAmount > 0.0 && analCum > 0.0) || (isAnal && analCum - cumAmount > 0.0 && inflater.sexlab.GetGender(akActor)==0) @@ -402,7 +413,6 @@ Function Deflate() EndIf float deflateTarget = totalInf - cumAmount - log("deflateTarget = "+vagCum+" + "+analCum+" - "+cumAmount) if deflateTarget < 0.0 deflateTarget = 0.0 @@ -424,7 +434,7 @@ Function Deflate() ; step = deflationOralAmount / steps ; endif - log("cumAmount: " + cumAmount) + ;log("cumAmount: " + cumAmount) log("DefAmount: " + deflationAmount + ", total time: " + tme + ", steps: " + steps + ", step: " + step) inflater.StartLeakage(akActor, Cumtype, animate) @@ -481,8 +491,7 @@ Function Deflate() EndIf if isAnal || isVaginal - akActor.RemoveSpell(inflater.sr_inflateBurstSpell) - SetFloatValue(akActor, inflater.INFLATION_AMOUNT, deflateTarget) + akActor.RemoveSpell(inflater.sr_inflateBurstSpell) endif Else Utility.wait(tme) @@ -539,6 +548,8 @@ Function Deflate() EndIf UnsetFloatValue(akActor, inflater.INFLATION_AMOUNT) else + deflateTarget = analCum + vagCum + SetFloatValue(akActor, inflater.INFLATION_AMOUNT, deflateTarget) inflater.UpdateFaction(akActor) inflater.EncumberActor(akActor) endif @@ -716,8 +727,7 @@ Function Absorb() EndIf if isAnal || isVaginal - akActor.RemoveSpell(inflater.sr_inflateBurstSpell) - SetFloatValue(akActor, inflater.INFLATION_AMOUNT, deflateTarget) + akActor.RemoveSpell(inflater.sr_inflateBurstSpell) endif Else Utility.wait(tme) @@ -773,6 +783,8 @@ Function Absorb() EndIf UnsetFloatValue(akActor, inflater.INFLATION_AMOUNT) else + deflateTarget = analCum + vagCum + SetFloatValue(akActor, inflater.INFLATION_AMOUNT, deflateTarget) inflater.UpdateFaction(akActor) inflater.EncumberActor(akActor) endif From 70c234cbe73cdb8e359aeba719f2c2a77524dcbf Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Thu, 22 Aug 2024 05:07:05 +0700 Subject: [PATCH 09/20] spermtype, deflation animation, queue fixes --- Build.ps1 | 2 +- Scripts/Source/sr_infDeflateAbility.psc | 22 +- Scripts/Source/sr_inflateQuest.psc | 647 +++++++++++++----------- Scripts/Source/sr_inflateThread.psc | 10 +- 4 files changed, 356 insertions(+), 325 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index fcb71b6..5dc6484 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -124,7 +124,7 @@ foreach ( $pscFile in $pscFiles ) Write-Host "!" $ret.file.Name Write-Host " -" $ret.command $ret.file Log -Level 0 -msg "Process result" -object $ret - #Exit + Exit } else { Log -Level 0 -msg "Process result" -object $ret } diff --git a/Scripts/Source/sr_infDeflateAbility.psc b/Scripts/Source/sr_infDeflateAbility.psc index 79d2589..19f4df8 100644 --- a/Scripts/Source/sr_infDeflateAbility.psc +++ b/Scripts/Source/sr_infDeflateAbility.psc @@ -173,8 +173,8 @@ Function doPush(int type) else pool = inflater.CUM_ORAL EndIf - inflater.CheckingLastActor(p) - inflater.StartLeakage(p, type, 1) + int spermtype = inflater.GetSpermLastActor(p) + inflater.StartLeakage(p, type, 1, spermtype) float dps = ((p.GetActorValue("Stamina") / p.GetActorValuePercentage("Stamina")) * 0.01) float currentInf float startInf @@ -236,7 +236,7 @@ Function doPush(int type) endif StorageUtil.SetFloatValue(p, pool, cum) Utility.Wait(0.1) - inflater.StopLeakage(p) + inflater.StopLeakage(p, spermtype) inflater.UpdateFaction(p) inflater.UpdateOralFaction(p) inflater.SendPlayerCumUpdate(cum, type == 2) @@ -248,30 +248,30 @@ Function doPush(int type) if sr_Cumvariationingredients.getvalue() == 1 if type < 3 - if inflater.spermtype == 0;human + if spermtype == 0;human p.additem(FHUHumanCum, cumcompare) - elseif inflater.spermtype == 1;beast + elseif spermtype == 1;beast p.additem(FHUBeastCum, cumcompare) - elseif inflater.spermtype == 2;Draugr + elseif spermtype == 2;Draugr p.additem(FHURottenCum, cumcompare) - elseif inflater.spermtype == 3;spider + elseif spermtype == 3;spider p.additem(FHUSpiderEgg, cumcompare) - elseif inflater.spermtype == 4;chaurus + elseif spermtype == 4;chaurus if startInf > 3.0 p.additem(FHULarvae, 1) endif p.additem(FHUChaurusEggs, cumcompare) - elseif inflater.spermtype == 5;spriggan + elseif spermtype == 5;spriggan p.additem(SprigganSap, cumcompare) if startInf > 3.0 p.additem(FHUSlug, 1) endif - elseif inflater.spermtype == 6;Stone + elseif spermtype == 6;Stone p.additem(VoidSalts, cumcompare) if startInf > 3.0 p.additem(SoulGemBlack, 1) endif - elseif inflater.spermtype == 7;Ashhopper + elseif spermtype == 7;Ashhopper p.additem(DLC2AshHopperJelly, cumcompare) if startInf > 3.0 p.additem(FHUAshHopperEggs, 2) diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index 9795ca4..ea1b203 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -95,8 +95,8 @@ ImpactDataSet Property SFU_CumImpactDataSet Auto ImpactDataSet Property SFU_CumMidImpactDataSet Auto ImpactDataSet Property SFU_CumHighImpactDataSet Auto -Actor[] Property Injector Auto ; deprecated -Actor[] Property InjectorPlayer Auto ; deprecated +;Actor[] Property Injector Auto ; deprecated +;Actor[] Property InjectorPlayer Auto ; deprecated formlist Property sr_InjectorFormlist auto Actor Property Player Auto Actor DeflateActor @@ -222,8 +222,8 @@ Race Property FrostbiteSpiderRaceGiant Auto Race Property FrostbiteSpiderRaceLarge Auto Race Property DLC2ExpSpiderBaseRace Auto Race Property DLC2ExpSpiderPackmuleRace Auto -int Property spermtype Auto -Bool AnalDeflation +;int Property spermtype Auto ; deprecated +;Bool AnalDeflation Sound Property sr_FHUMoanMildMarker Auto Sound Property sr_FHUMoanHardMarker Auto @@ -862,26 +862,35 @@ Function Absorbto(Actor akActor, int poolMask, float targetLevel = -1.0, float t AbsorptionQueued() EndFunction -Function CheckingLastActor(actor akactor) - If akactor != player - ; TODO +; Get Sperm type for Actor +Int Function GetSpermLastActor(actor akactor) + form Male + race malerace + float chaurusnum = 0 + float spidernum = 0 + float humannum = 0 + float ashHoppernum = 0 + float Draugrnum = 0 + float Spriggannum = 0 + float StoneAtronachnum = 0 + float beastcumnum = 0 + float RaceAmount + int actori = -1 + int spermtype = 0 + int i + If akactor == player + i = sr_InjectorFormlist.getsize() + Else + i = FormListCount(akactor, "sr.inflater.injector") EndIf -form Male -race malerace -float chaurusnum = 0 -float spidernum = 0 -float humannum = 0 -float ashHoppernum = 0 -float Draugrnum = 0 -float Spriggannum = 0 -float StoneAtronachnum = 0 -float beastcumnum = 0 -float RaceAmount -int actori = -1 -int i = sr_InjectorFormlist.getsize() + while i > 0 i -= 1 - Male = sr_InjectorFormlist.getat(i) + If akactor == player + Male = sr_InjectorFormlist.getat(i) + Else + Male = FormListGet(akactor, "sr.inflater.injector", i) as Actor + EndIf if Male actori = GetCreatureRaceint(Male as actor) @@ -911,12 +920,14 @@ int i = sr_InjectorFormlist.getsize() beastcumnum += 1 endif else - sr_InjectorFormlist.RemoveAddedForm(Male) + If akactor == player + sr_InjectorFormlist.RemoveAddedForm(Male) + EndIf endif endwhile -RaceAmount = chaurusnum + Draugrnum + spidernum + humannum + ashHoppernum + beastcumnum + Spriggannum + StoneAtronachnum -float RandomSperm = Utility.randomfloat(0, RaceAmount) + RaceAmount = chaurusnum + Draugrnum + spidernum + humannum + ashHoppernum + beastcumnum + Spriggannum + StoneAtronachnum + float RandomSperm = Utility.randomfloat(0, RaceAmount) if RandomSperm > 0 if RandomSperm <= humannum @@ -940,7 +951,8 @@ float RandomSperm = Utility.randomfloat(0, RaceAmount) spermtype = 0 endif -akactor.setfactionrank(sr_DARAnimatingType, spermtype) + akactor.setfactionrank(sr_DARAnimatingType, spermtype) + return spermtype EndFunction ;0human @@ -1021,16 +1033,15 @@ else endif EndFunction -;Function StartLeakage(Actor akActor, bool isAnal, int animate) -Function StartLeakage(Actor akActor, int CumType, int animate) -bool isAnal -if Cumtype == 2 - isAnal = true -else - isAnal = false -endif +Function StartLeakage(Actor akActor, int CumType, int animate, int spermtype) + bool isAnal + if Cumtype == 2 + isAnal = true + else + isAnal = false + endif -cumtypei = cumtype + cumtypei = cumtype If !akActor.Is3DLoaded() ; log("Skipping animation for " + akActor.GetLeveledActorBase().GetName()) @@ -1051,11 +1062,16 @@ cumtypei = cumtype endif endif - If config.animDeflate - if Cumtype < 3;Nostrip when oral - StripActor(akActor) - endif - ;StripCover(akActor, isAnal) + If !config.animDeflate + SetIntValue(akActor, ANIMATING, -1) + return + EndIf + + if Cumtype < 3;Nostrip when oral + StripActor(akActor) + endif + + ;StripCover(akActor, isAnal) MfgConsoleFunc.ResetPhonemeModifier(akActor) If Utility.RandomInt(0, 99) < 40 && sr_TongueEffect.getvalue() == 1 EquiprandomTongue(akactor, true) @@ -1076,277 +1092,278 @@ cumtypei = cumtype ; sexlab.ApplyCum(akActor, 1) ; EndIf - If CumType == 1 - sexlab.AddCum(akActor, true, false, false) + If CumType == 1 + sexlab.AddCum(akActor, true, false, false) + elseif CumType == 2 + sexlab.AddCum(akActor, false, false, true) + elseif CumType == 3 + sexlab.AddCum(akActor, false, true, false) + else + sexlab.AddCum(akActor) + endif + + if animate < 0 + SetIntValue(akActor, ANIMATING, -1) + return + endIf + + if (config.SFU_PlacePuddles) + if Cumtype < 3 + ApplyPuddle(akActor, 0, 0, 1) + elseif Cumtype == 3;oral + ApplyPuddle(akActor, 26, 0, 1) + endif + endif + + If akActor.IsInCombat() || isAnimating(akActor) + SetIntValue(akActor, ANIMATING, 0) + log("StartLeakage Animation blocked for " + akActor.GetLeveledActorBase().GetName()) + return + EndIf + + If akActor == Player + Game.ForceThirdPerson() + EndIf + + If animate == 2 + ; Burst deflate + ; log(" burst deflate") + if CumType == 1 + akActor.addItem(sr_VagLeak, 1, true) + akActor.equipItem(sr_VagLeak, abSilent=true) elseif CumType == 2 - sexlab.AddCum(akActor, false, false, true) + akActor.addItem(sr_AnalLeak, 1, true) + akActor.equipItem(sr_AnalLeak, abSilent=true) elseif CumType == 3 - sexlab.AddCum(akActor, false, true, false) - else - sexlab.AddCum(akActor) - endif - - if animate < 0 - SetIntValue(akActor, ANIMATING, -1) - return - endIf - - AnalDeflation = isAnal - - If akActor == Player - Game.ForceThirdPerson() + akActor.addItem(sr_OralLeak, 1, true) + Utility.Wait(0.5) + akActor.equipItem(sr_OralLeak, abSilent=true) EndIf - - if (config.SFU_PlacePuddles) - if Cumtype < 3 - ApplyPuddle(akActor, 0, 0, 1) - elseif Cumtype == 3;oral - ApplyPuddle(akActor, 26, 0, 1) - endif - endif - - If !akActor.IsOnMount() - If animate == 2 - ; Burst deflate - ; log(" burst deflate") + SetIntValue(akActor, ANIMATING, 2) + If akActor == player + int handle = ModEvent.Create("dhlp-weapondrop") + ModEvent.PushBool(handle, true) + ModEvent.PushFloat(handle, 1.5) + ModEvent.PushString(handle, "$FHU_BURST_WEAPON_DROP") + ModEvent.PushString(handle, "$FHU_BURST_SPELL_DROP") + If animate >= 10 + akActor.PlayIdle(BaboAnimsStart[animate - 10]) + Else + animnum = Utility.RandomInt(0, BaboAnimsStart.length - 1) + akActor.PlayIdle(BaboAnimsStart[animnum]) + EndIf + If ModEvent.Send(handle) + Utility.Wait(1.2) + EndIf + EndIf + Debug.SendAnimationEvent(akActor, "BleedOutStart") + ElseIf animate == 1 || (animate == 0 && Utility.RandomInt(0, 99) < 80) || animate >= 10 + ; normal, less-violent deflate + ; log(" normal deflate") + If akActor.IsWeaponDrawn() + akActor.SheatheWeapon() + Utility.Wait(0.8) + EndIf + SetIntValue(akActor, ANIMATING, 1) + if akActor == player + Input.TapKey(Input.GetMappedKey("Forward")) + Game.DisablePlayerControls() + Else + ActorUtil.AddPackageOverride(akActor, stayStillPackage, 100) + EndIf + If animate >= 10 + akActor.PlayIdle(BaboAnimsStart[animate - 10]) + Else + if spermtype == 0 if CumType == 1 + animnum = Utility.RandomInt(0, BaboAnimsStart.length - 1) + akActor.PlayIdle(BaboAnimsStart[animnum]) akActor.addItem(sr_VagLeak, 1, true) akActor.equipItem(sr_VagLeak, abSilent=true) elseif CumType == 2 + animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) + akActor.PlayIdle(BaboAnimsAnusStart[animnum]) akActor.addItem(sr_AnalLeak, 1, true) akActor.equipItem(sr_AnalLeak, abSilent=true) elseif CumType == 3 + ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) + ;akActor.PlayIdle(BaboAnimsOral[animnum]) + akActor.PlayIdle(BaboAnimsOralStart[0]) akActor.addItem(sr_OralLeak, 1, true) - Utility.Wait(0.5) akActor.equipItem(sr_OralLeak, abSilent=true) - EndIf - SetIntValue(akActor, ANIMATING, 2) - If akActor == player - int handle = ModEvent.Create("dhlp-weapondrop") - ModEvent.PushBool(handle, true) - ModEvent.PushFloat(handle, 1.5) - ModEvent.PushString(handle, "$FHU_BURST_WEAPON_DROP") - ModEvent.PushString(handle, "$FHU_BURST_SPELL_DROP") - If animate >= 10 - akActor.PlayIdle(BaboAnimsStart[animate - 10]) - Else - animnum = Utility.RandomInt(0, BaboAnimsStart.length - 1) - akActor.PlayIdle(BaboAnimsStart[animnum]) - EndIf - If ModEvent.Send(handle) - Utility.Wait(1.2) - EndIf - EndIf - Debug.SendAnimationEvent(akActor, "BleedOutStart") - ElseIf animate == 1 || (animate == 0 && Utility.RandomInt(0, 99) < 80) || animate >= 10 - ; normal, less-violent deflate - ; log(" normal deflate") - If akActor.IsWeaponDrawn() - akActor.SheatheWeapon() - Utility.Wait(0.8) - EndIf - SetIntValue(akActor, ANIMATING, 1) - if akActor == player - Input.TapKey(Input.GetMappedKey("Forward")) - Game.DisablePlayerControls() - Else - ActorUtil.AddPackageOverride(akActor, stayStillPackage, 100) - EndIf - If animate >= 10 - akActor.PlayIdle(BaboAnimsStart[animate - 10]) - Else - if spermtype == 0 - if CumType == 1 - animnum = Utility.RandomInt(0, BaboAnimsStart.length - 1) - akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_VagLeak, 1, true) - akActor.equipItem(sr_VagLeak, abSilent=true) - elseif CumType == 2 - animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) - akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_AnalLeak, 1, true) - akActor.equipItem(sr_AnalLeak, abSilent=true) - elseif CumType == 3 - ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) - ;akActor.PlayIdle(BaboAnimsOral[animnum]) - akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeak, 1, true) - akActor.equipItem(sr_OralLeak, abSilent=true) - endif - elseif spermtype == 1;BeastCum - if CumType == 1 - animnum = Utility.RandomInt(0, BaboAnimsStart.length - 1) - akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_vagLeakBeast, 1, true) - akActor.equipItem(sr_vagLeakBeast, abSilent=true) - elseif CumType == 2 - animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) - akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_analLeakBeast, 1, true) - akActor.equipItem(sr_analLeakBeast, abSilent=true) - elseif CumType == 3 - ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) - ;akActor.PlayIdle(BaboAnimsOral[animnum]) - akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeakBeast, 1, true) - akActor.equipItem(sr_OralLeakBeast, abSilent=true) - endif - if sr_Cumvariation.getvalue() == 1 - if GetInflation(akactor) > 3.0 && CumType < 3 - akActor.addItem(sr_ThickCum, 1, true) - akActor.equipItem(sr_ThickCum, abSilent=true) - elseif GetOralCum(akactor) > 1.0 && CumType == 3 - akActor.addItem(sr_ThickCum, 1, true) - akActor.equipItem(sr_ThickCum, abSilent=true) - endif - endif - elseif spermtype == 2;dragur - if CumType == 1 - animnum = Utility.RandomInt(0, BaboAnimsStart.length - 1) - akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_vagLeakRotten, 1, true) - akActor.equipItem(sr_vagLeakRotten, abSilent=true) - elseif CumType == 2 - animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) - akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_analLeakRotten, 1, true) - akActor.equipItem(sr_analLeakRotten, abSilent=true) - elseif CumType == 3 - ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) - ;akActor.PlayIdle(BaboAnimsOral[animnum]) - akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeakRotten, 1, true) - akActor.equipItem(sr_OralLeakRotten, abSilent=true) - endif - elseif spermtype == 3;Spider - if CumType == 1 - animnum = 3 - akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_VagLeak, 1, true) - akActor.equipItem(sr_VagLeak, abSilent=true) - elseif CumType == 2 - animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) - akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_AnalLeak, 1, true) - akActor.equipItem(sr_AnalLeak, abSilent=true) - elseif CumType == 3 - ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) - ;akActor.PlayIdle(BaboAnimsOral[animnum]) - akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeak, 1, true) - akActor.equipItem(sr_OralLeak, abSilent=true) - endif - if sr_Cumvariation.getvalue() == 1 - akActor.addItem(sr_SpiderEggs, 1, true) - akActor.equipItem(sr_SpiderEggs, abSilent=true) - endif - elseif spermtype == 4;Chaurus - if CumType == 1 - animnum = 3 - akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_VagLeak, 1, true) - akActor.equipItem(sr_VagLeak, abSilent=true) - elseif CumType == 2 - animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) - akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_AnalLeak, 1, true) - akActor.equipItem(sr_AnalLeak, abSilent=true) - elseif CumType == 3 - ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) - ;akActor.PlayIdle(BaboAnimsOral[animnum]) - akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeak, 1, true) - akActor.equipItem(sr_OralLeak, abSilent=true) - endif - if sr_Cumvariation.getvalue() == 1 - if GetInflation(akactor) >= 3.0 && CumType < 3 - akActor.addItem(sr_ChaurusLarvaeEggs, 1, true) - akActor.equipItem(sr_ChaurusLarvaeEggs, abSilent=true) - elseif GetInflation(akactor) < 3.0 && CumType < 3 - akActor.addItem(sr_ChaurusEggs, 1, true) - akActor.equipItem(sr_ChaurusEggs, abSilent=true) - elseif CumType == 3 - akActor.addItem(sr_ChaurusEggs, 1, true) - akActor.equipItem(sr_ChaurusEggs, abSilent=true) - endif - endif - elseif spermtype == 5;Spriggan - if CumType == 1 - animnum = 3 - akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_vagLeakGreen, 1, true) - akActor.equipItem(sr_vagLeakGreen, abSilent=true) - elseif CumType == 2 - animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) - akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_analLeakGreen, 1, true) - akActor.equipItem(sr_analLeakGreen, abSilent=true) - elseif CumType == 3 - ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) - ;akActor.PlayIdle(BaboAnimsOral[animnum]) - akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeakGreen, 1, true) - akActor.equipItem(sr_OralLeakGreen, abSilent=true) - endif - if sr_Cumvariation.getvalue() == 1 - if GetInflation(akactor) >= 3.0 && CumType < 3 - akActor.addItem(sr_SprigganSlug, 1, true) - akActor.equipItem(sr_SprigganSlug, abSilent=true) - elseif GetInflation(akactor) < 3.0 && CumType < 3 - akActor.addItem(sr_ThickCumGreen, 1, true) - akActor.equipItem(sr_ThickCumGreen, abSilent=true) - elseif CumType == 3 - akActor.addItem(sr_ThickCumGreen, 1, true) - akActor.equipItem(sr_ThickCumGreen, abSilent=true) - endif - endif - elseif spermtype == 6;StoneAtronach - if CumType == 1 - animnum = 3 - akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_VagLeak, 1, true) - akActor.equipItem(sr_VagLeak, abSilent=true) - elseif CumType == 2 - animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) - akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_AnalLeak, 1, true) - akActor.equipItem(sr_AnalLeak, abSilent=true) - elseif CumType == 3 - ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) - ;akActor.PlayIdle(BaboAnimsOral[animnum]) - akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeak, 1, true) - akActor.equipItem(sr_OralLeak, abSilent=true) - endif - if sr_Cumvariation.getvalue() == 1 - akActor.addItem(sr_AtronachStones, 1, true) - akActor.equipItem(sr_AtronachStones, abSilent=true) - endif - elseif spermtype == 7;AshHopper - if CumType == 1 - animnum = 3 - akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_VagLeak, 1, true) - akActor.equipItem(sr_VagLeak, abSilent=true) - elseif CumType == 2 - animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) - akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_AnalLeak, 1, true) - akActor.equipItem(sr_AnalLeak, abSilent=true) - elseif CumType == 3 - ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) - ;akActor.PlayIdle(BaboAnimsOral[animnum]) - akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeak, 1, true) - akActor.equipItem(sr_OralLeak, abSilent=true) - endif - if sr_Cumvariation.getvalue() == 1 - akActor.addItem(sr_AshHopperEggs, 1, true) - akActor.equipItem(sr_AshHopperEggs, abSilent=true) - endif + endif + elseif spermtype == 1;BeastCum + if CumType == 1 + animnum = Utility.RandomInt(0, BaboAnimsStart.length - 1) + akActor.PlayIdle(BaboAnimsStart[animnum]) + akActor.addItem(sr_vagLeakBeast, 1, true) + akActor.equipItem(sr_vagLeakBeast, abSilent=true) + elseif CumType == 2 + animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) + akActor.PlayIdle(BaboAnimsAnusStart[animnum]) + akActor.addItem(sr_analLeakBeast, 1, true) + akActor.equipItem(sr_analLeakBeast, abSilent=true) + elseif CumType == 3 + ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) + ;akActor.PlayIdle(BaboAnimsOral[animnum]) + akActor.PlayIdle(BaboAnimsOralStart[0]) + akActor.addItem(sr_OralLeakBeast, 1, true) + akActor.equipItem(sr_OralLeakBeast, abSilent=true) + endif + if sr_Cumvariation.getvalue() == 1 + if GetInflation(akactor) > 3.0 && CumType < 3 + akActor.addItem(sr_ThickCum, 1, true) + akActor.equipItem(sr_ThickCum, abSilent=true) + elseif GetOralCum(akactor) > 1.0 && CumType == 3 + akActor.addItem(sr_ThickCum, 1, true) + akActor.equipItem(sr_ThickCum, abSilent=true) endif - EndIf - EndIf + endif + elseif spermtype == 2;dragur + if CumType == 1 + animnum = Utility.RandomInt(0, BaboAnimsStart.length - 1) + akActor.PlayIdle(BaboAnimsStart[animnum]) + akActor.addItem(sr_vagLeakRotten, 1, true) + akActor.equipItem(sr_vagLeakRotten, abSilent=true) + elseif CumType == 2 + animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) + akActor.PlayIdle(BaboAnimsAnusStart[animnum]) + akActor.addItem(sr_analLeakRotten, 1, true) + akActor.equipItem(sr_analLeakRotten, abSilent=true) + elseif CumType == 3 + ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) + ;akActor.PlayIdle(BaboAnimsOral[animnum]) + akActor.PlayIdle(BaboAnimsOralStart[0]) + akActor.addItem(sr_OralLeakRotten, 1, true) + akActor.equipItem(sr_OralLeakRotten, abSilent=true) + endif + elseif spermtype == 3;Spider + if CumType == 1 + animnum = 3 + akActor.PlayIdle(BaboAnimsStart[animnum]) + akActor.addItem(sr_VagLeak, 1, true) + akActor.equipItem(sr_VagLeak, abSilent=true) + elseif CumType == 2 + animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) + akActor.PlayIdle(BaboAnimsAnusStart[animnum]) + akActor.addItem(sr_AnalLeak, 1, true) + akActor.equipItem(sr_AnalLeak, abSilent=true) + elseif CumType == 3 + ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) + ;akActor.PlayIdle(BaboAnimsOral[animnum]) + akActor.PlayIdle(BaboAnimsOralStart[0]) + akActor.addItem(sr_OralLeak, 1, true) + akActor.equipItem(sr_OralLeak, abSilent=true) + endif + if sr_Cumvariation.getvalue() == 1 + akActor.addItem(sr_SpiderEggs, 1, true) + akActor.equipItem(sr_SpiderEggs, abSilent=true) + endif + elseif spermtype == 4;Chaurus + if CumType == 1 + animnum = 3 + akActor.PlayIdle(BaboAnimsStart[animnum]) + akActor.addItem(sr_VagLeak, 1, true) + akActor.equipItem(sr_VagLeak, abSilent=true) + elseif CumType == 2 + animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) + akActor.PlayIdle(BaboAnimsAnusStart[animnum]) + akActor.addItem(sr_AnalLeak, 1, true) + akActor.equipItem(sr_AnalLeak, abSilent=true) + elseif CumType == 3 + ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) + ;akActor.PlayIdle(BaboAnimsOral[animnum]) + akActor.PlayIdle(BaboAnimsOralStart[0]) + akActor.addItem(sr_OralLeak, 1, true) + akActor.equipItem(sr_OralLeak, abSilent=true) + endif + if sr_Cumvariation.getvalue() == 1 + if GetInflation(akactor) >= 3.0 && CumType < 3 + akActor.addItem(sr_ChaurusLarvaeEggs, 1, true) + akActor.equipItem(sr_ChaurusLarvaeEggs, abSilent=true) + elseif GetInflation(akactor) < 3.0 && CumType < 3 + akActor.addItem(sr_ChaurusEggs, 1, true) + akActor.equipItem(sr_ChaurusEggs, abSilent=true) + elseif CumType == 3 + akActor.addItem(sr_ChaurusEggs, 1, true) + akActor.equipItem(sr_ChaurusEggs, abSilent=true) + endif + endif + elseif spermtype == 5;Spriggan + if CumType == 1 + animnum = 3 + akActor.PlayIdle(BaboAnimsStart[animnum]) + akActor.addItem(sr_vagLeakGreen, 1, true) + akActor.equipItem(sr_vagLeakGreen, abSilent=true) + elseif CumType == 2 + animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) + akActor.PlayIdle(BaboAnimsAnusStart[animnum]) + akActor.addItem(sr_analLeakGreen, 1, true) + akActor.equipItem(sr_analLeakGreen, abSilent=true) + elseif CumType == 3 + ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) + ;akActor.PlayIdle(BaboAnimsOral[animnum]) + akActor.PlayIdle(BaboAnimsOralStart[0]) + akActor.addItem(sr_OralLeakGreen, 1, true) + akActor.equipItem(sr_OralLeakGreen, abSilent=true) + endif + if sr_Cumvariation.getvalue() == 1 + if GetInflation(akactor) >= 3.0 && CumType < 3 + akActor.addItem(sr_SprigganSlug, 1, true) + akActor.equipItem(sr_SprigganSlug, abSilent=true) + elseif GetInflation(akactor) < 3.0 && CumType < 3 + akActor.addItem(sr_ThickCumGreen, 1, true) + akActor.equipItem(sr_ThickCumGreen, abSilent=true) + elseif CumType == 3 + akActor.addItem(sr_ThickCumGreen, 1, true) + akActor.equipItem(sr_ThickCumGreen, abSilent=true) + endif + endif + elseif spermtype == 6;StoneAtronach + if CumType == 1 + animnum = 3 + akActor.PlayIdle(BaboAnimsStart[animnum]) + akActor.addItem(sr_VagLeak, 1, true) + akActor.equipItem(sr_VagLeak, abSilent=true) + elseif CumType == 2 + animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) + akActor.PlayIdle(BaboAnimsAnusStart[animnum]) + akActor.addItem(sr_AnalLeak, 1, true) + akActor.equipItem(sr_AnalLeak, abSilent=true) + elseif CumType == 3 + ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) + ;akActor.PlayIdle(BaboAnimsOral[animnum]) + akActor.PlayIdle(BaboAnimsOralStart[0]) + akActor.addItem(sr_OralLeak, 1, true) + akActor.equipItem(sr_OralLeak, abSilent=true) + endif + if sr_Cumvariation.getvalue() == 1 + akActor.addItem(sr_AtronachStones, 1, true) + akActor.equipItem(sr_AtronachStones, abSilent=true) + endif + elseif spermtype == 7;AshHopper + if CumType == 1 + animnum = 3 + akActor.PlayIdle(BaboAnimsStart[animnum]) + akActor.addItem(sr_VagLeak, 1, true) + akActor.equipItem(sr_VagLeak, abSilent=true) + elseif CumType == 2 + animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) + akActor.PlayIdle(BaboAnimsAnusStart[animnum]) + akActor.addItem(sr_AnalLeak, 1, true) + akActor.equipItem(sr_AnalLeak, abSilent=true) + elseif CumType == 3 + ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) + ;akActor.PlayIdle(BaboAnimsOral[animnum]) + akActor.PlayIdle(BaboAnimsOralStart[0]) + akActor.addItem(sr_OralLeak, 1, true) + akActor.equipItem(sr_OralLeak, abSilent=true) + endif + if sr_Cumvariation.getvalue() == 1 + akActor.addItem(sr_AshHopperEggs, 1, true) + akActor.equipItem(sr_AshHopperEggs, abSilent=true) + endif + endif EndIf EndIf EndFunction @@ -1444,8 +1461,11 @@ Function EmotionWhenLeakage(actor akActor) EndIf EndFunction -Function StopLeakage(Actor akActor) +Function StopLeakage(Actor akActor, int spermtype) int anim = GetIntValue(akActor, ANIMATING,0) + ;if(isAnimating(akActor)) + ; return + ;EndIf If anim > 0 If anim == 1 ;if AnalDeflation @@ -1469,13 +1489,17 @@ Function StopLeakage(Actor akActor) EndIf if akActor == player - Game.EnablePlayerControls() - Debug.SendAnimationEvent(akActor as ObjectReference,"IdleForceDefaultState") + If anim > 0 + Game.EnablePlayerControls() + Debug.SendAnimationEvent(akActor as ObjectReference,"IdleForceDefaultState") + EndIf Else MfgConsoleFunc.ResetPhonemeModifier(akActor);Player expression is controlled here(OnKeyUp) ActorUtil.RemovePackageOverride(akActor, stayStillPackage) - Debug.SendAnimationEvent(akActor as ObjectReference,"IdleForceDefaultState") akActor.EvaluatePackage() + If anim > 0 + Debug.SendAnimationEvent(akActor as ObjectReference,"IdleForceDefaultState") + EndIf EndIf if spermtype == 1 @@ -1736,16 +1760,18 @@ State MonitoringInflation int queued = 0 while queued < threads.length && n > 0 - n -= 1 Actor a = FormListGet(self, INFLATED_ACTORS, n) as Actor - if a && !a.IsDead() && !a.IsInCombat() && a.GetCurrentScene() == none && !isAnimating(a) + if a && !a.IsDead() && !a.IsInCombat() && a.GetCurrentScene() == none && !a.IsInFaction(slAnimatingFaction) float lastVagTime = GetFloatValue(a, LAST_TIME_VAG) float lastAnalTime = GetFloatValue(a, LAST_TIME_ANAL) float lastoralTime = GetFloatValue(a, LAST_TIME_ORAL) - bool deflateVag = lastVagTime > 0.0 && ( GameDaysPassed.GetValue() - lastVagTime ) * 24 >= config.minInflationTime; Needs improvement - bool deflateAnal = lastAnalTime > 0.0 && ( GameDaysPassed.GetValue() - lastAnalTime ) * 24 >= config.minInflationTime - bool deflateOral = lastoralTime > 0.0 && ( GameDaysPassed.GetValue() - lastoralTime ) * 24 >= config.minInflationTime + float vagCum = GetFloatValue(a, CUM_VAGINAL) + float analCum = GetFloatValue(a, CUM_ANAL) + float oralCum = GetFloatValue(a, CUM_ORAL) + bool deflateVag = vagCum > 0 && lastVagTime > 0.0 && ( GameDaysPassed.GetValue() - lastVagTime ) * 24 >= config.minInflationTime; Needs improvement + bool deflateAnal = analCum > 0 && lastAnalTime > 0.0 && ( GameDaysPassed.GetValue() - lastAnalTime ) * 24 >= config.minInflationTime + bool deflateOral = oralCum > 0 && lastoralTime > 0.0 && ( GameDaysPassed.GetValue() - lastoralTime ) * 24 >= config.minInflationTime If deflateAnal && deflateVag ; only deflate once per tic If Utility.RandomInt(0, 99) < 50 || isPlugged(a) == 2;Why either one at a time? @@ -1754,6 +1780,9 @@ State MonitoringInflation deflateVag = false EndIf EndIf + If deflateAnal || deflateVag + deflateOral = false + EndIf ; log("Deflate actor " + a.GetLeveledActorBase().GetName() + "? Anal: " + deflateAnal +", Vaginal: " + deflateVag) @@ -1813,7 +1842,7 @@ State MonitoringInflation endIf EndIf - if !deflateVag && !deflateAnal && Utility.RandomInt(0, 99) < GetDeflateChance(a) + if deflateOral && Utility.RandomInt(0, 99) < GetDeflateChance(a) if sr_OnEventNoDeflation.getvalue() == 0 tid = QueueActor(a, false, ORAL, Config.SpermRemovalAmountoral, defTime) queued += 1 @@ -1836,6 +1865,8 @@ State MonitoringInflation FormListRemoveAt(self, INFLATED_ACTORS, n) FormListClear(a, "sr.inflater.injector") ; FormListRemove(self, INFLATED_ACTORS, FormListGet(self, INFLATED_ACTORS, n), true) + Else + log("QueueActor blocked for " + a.GetLeveledActorBase().GetName()) EndIf EndWhile @@ -2653,5 +2684,5 @@ Function SLIF_unregisterMorph(Actor akActor, String MorphName) EndFunction bool Function isAnimating(Actor akActor) - return akActor.IsInFaction(slAnimatingFaction) || akActor.IsInFaction(zadAnimatingFaction) || akActor.IsInFaction(DefeatFaction) || akActor.IsInFaction(UDMinigameFaction) + return akActor.IsOnMount() || (akActor.GetSitState() != 0) || (slAnimatingFaction && akActor.IsInFaction(slAnimatingFaction) ) || (zadAnimatingFaction && akActor.IsInFaction(zadAnimatingFaction) ) || (DefeatFaction && akActor.IsInFaction(DefeatFaction) ) || (UDMinigameFaction && akActor.IsInFaction(UDMinigameFaction) ) EndFunction \ No newline at end of file diff --git a/Scripts/Source/sr_inflateThread.psc b/Scripts/Source/sr_inflateThread.psc index c207830..37f4d09 100644 --- a/Scripts/Source/sr_inflateThread.psc +++ b/Scripts/Source/sr_inflateThread.psc @@ -436,8 +436,11 @@ Function Deflate() ;log("cumAmount: " + cumAmount) log("DefAmount: " + deflationAmount + ", total time: " + tme + ", steps: " + steps + ", step: " + step) + + int spermtype = inflater.GetSpermLastActor(akActor) - inflater.StartLeakage(akActor, Cumtype, animate) + inflater.StartLeakage(akActor, Cumtype, animate, spermtype) + If akActor.Is3DLoaded() inflater.Moan(akActor) EndIf @@ -497,7 +500,7 @@ Function Deflate() Utility.wait(tme) endIf - inflater.StopLeakage(akActor) + inflater.StopLeakage(akActor, spermtype) log("Deflated to: " + deflateTarget +" (" +currentInflation + ")") if isAnal @@ -672,7 +675,6 @@ Function Absorb() log("cumAmount: " + cumAmount) log("DefAmount: " + deflationAmount + ", total time: " + tme + ", steps: " + steps + ", step: " + step) - ;inflater.StartLeakage(akActor, isAnal, animate) If akActor.Is3DLoaded() inflater.Moan(akActor) EndIf @@ -732,8 +734,6 @@ Function Absorb() Else Utility.wait(tme) endIf - - ;inflater.StopLeakage(akActor) log("Deflated to: " + deflateTarget +" (" +currentInflation + ")") if isAnal From 8de4af3e88c1d1124dc9349ea6b9e0aa851c1702 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Thu, 22 Aug 2024 17:26:14 +0700 Subject: [PATCH 10/20] fix undress, fix defaltion queue --- Scripts/Source/sr_inflateQuest.psc | 35 ++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index ea1b203..f75a400 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -1067,10 +1067,6 @@ Function StartLeakage(Actor akActor, int CumType, int animate, int spermtype) return EndIf - if Cumtype < 3;Nostrip when oral - StripActor(akActor) - endif - ;StripCover(akActor, isAnal) MfgConsoleFunc.ResetPhonemeModifier(akActor) If Utility.RandomInt(0, 99) < 40 && sr_TongueEffect.getvalue() == 1 @@ -1121,6 +1117,10 @@ Function StartLeakage(Actor akActor, int CumType, int animate, int spermtype) return EndIf + if Cumtype < 3;Nostrip when oral + StripActor(akActor) + endif + If akActor == Player Game.ForceThirdPerson() EndIf @@ -1784,14 +1784,16 @@ State MonitoringInflation deflateOral = false EndIf - ; log("Deflate actor " + a.GetLeveledActorBase().GetName() + "? Anal: " + deflateAnal +", Vaginal: " + deflateVag) + log("Deflate actor " + a.GetLeveledActorBase().GetName() + "? Anal: " + deflateAnal +", Vaginal: " + deflateVag +", Oral: " + deflateOral) - int plugged = isPlugged(a) - if sr_OnEventSpermNPC.getvalue() == 1 && !(a == player) - FertilityChance(a) - elseif sr_OnEventSpermPlayer.getvalue() == 1 && (a == player) - FertilityChance(a) - endif + int plugged = isPlugged(a) + If deflateVag + if sr_OnEventSpermNPC.getvalue() == 1 && !(a == player) + FertilityChance(a) + elseif sr_OnEventSpermPlayer.getvalue() == 1 && (a == player) + FertilityChance(a) + endif + EndIf If a == player sr_plugged.setValueInt(plugged) @@ -1842,7 +1844,7 @@ State MonitoringInflation endIf EndIf - if deflateOral && Utility.RandomInt(0, 99) < GetDeflateChance(a) + if deflateOral && Utility.RandomInt(0, 99) < GetOralDeflateChance(a) if sr_OnEventNoDeflation.getvalue() == 0 tid = QueueActor(a, false, ORAL, Config.SpermRemovalAmountoral, defTime) queued += 1 @@ -1908,6 +1910,15 @@ int Function GetDeflateChance(Actor akActor) return chance EndFunction +int Function GetOralDeflateChance(Actor akActor) + int chance = (GetOralPercentage(akActor) + 0.5) as int + chance += 33 + If chance > 90 + chance = 90 + endIf + return chance +EndFunction + Function ResetActors(bool force = false) GoToState("") From 90fbb2fd30f37952244f305fb314fc0c84ad76fe Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Sat, 24 Aug 2024 12:52:04 +0700 Subject: [PATCH 11/20] doPush fixes --- Scripts/Source/sr_infDeflateAbility.psc | 87 +++++-- Scripts/Source/sr_inflateQuest.psc | 295 ++++++++++++------------ Scripts/Source/sr_inflateThread.psc | 10 +- 3 files changed, 214 insertions(+), 178 deletions(-) diff --git a/Scripts/Source/sr_infDeflateAbility.psc b/Scripts/Source/sr_infDeflateAbility.psc index 19f4df8..f8da8e9 100644 --- a/Scripts/Source/sr_infDeflateAbility.psc +++ b/Scripts/Source/sr_infDeflateAbility.psc @@ -1,5 +1,7 @@ Scriptname sr_infDeflateAbility extends ReferenceAlias +import StorageUtil + sr_inflateConfig Property config auto sr_inflateQuest Property inflater auto Quest Property sr_inflateExternalEventManager Auto @@ -158,6 +160,7 @@ Function doPushDeflate(String pool, Actor p, float currentInf) EndFunction Function doPush(int type) + log("doPush") Actor p = GetActorReference() Game.DisablePlayerControls() Game.ForceThirdPerson() @@ -178,13 +181,26 @@ Function doPush(int type) float dps = ((p.GetActorValue("Stamina") / p.GetActorValuePercentage("Stamina")) * 0.01) float currentInf float startInf - if type == 1 || type == 2 + float cum + + float vagCum = GetFloatValue(p, inflater.CUM_VAGINAL) + float analCum = GetFloatValue(p, inflater.CUM_ANAL) + float oralCum = GetFloatValue(p, inflater.CUM_ORAL) + + if type == 1 currentInf = inflater.GetInflation(p) + cum = vagCum + log("doPush Vaginal = "+vagCum) + elseif type == 2 + currentInf = inflater.GetInflation(p) + cum = analCum + log("doPush Anal = "+analCum) elseif type == 3 currentInf = inflater.GetOralCum(p) + cum = oralCum + log("doPush Oral = "+oralCum) endif - startInf = currentInf - float cum = StorageUtil.GetFloatValue(p, pool) + float originalCum = cum float originalInf = currentInf int deflationTick = 5 @@ -207,34 +223,59 @@ Function doPush(int type) Utility.wait(0.3) endWhile - If cum < 0.02 + If cum <= 0.02 cum = 0.0 - If type == 1 - StorageUtil.UnsetFloatValue(p, inflater.LAST_TIME_VAG) - sr_InjectorFormlist.revert() - Elseif type == 2 - StorageUtil.UnsetFloatValue(p, inflater.LAST_TIME_ANAL) - elseif type == 3 - StorageUtil.UnsetFloatValue(p, inflater.LAST_TIME_ORAL) - EndIf EndIf ; try to get around some rounding errors and match the values float diff = originalCum - cum currentInf = originalInf - diff -; log("Final cum: "+cum+", cum diff from original: " + diff + ", final inflation: " + currentInf) - - If currentInf <= 0.0 - currentInf = 0.0 - StorageUtil.FormListRemove(inflater, inflater.INFLATED_ACTORS, p, true) - inflater.sr_plugged.SetValueInt(0) + log("Final cum: "+cum+", cum diff from original: " + diff + ", final inflation: " + currentInf) + + if type == 1 + vagCum = cum + if vagCum < 0.1 + vagCum = 0.0 + UnsetFloatValue(p, inflater.LAST_TIME_VAG) + UnsetFloatValue(p, inflater.CUM_VAGINAL) + sr_InjectorFormlist.revert() + Else + SetFloatValue(p, inflater.CUM_VAGINAL, vagCum) + EndIf + Elseif type == 2 + analCum = cum + if analCum < 0.1 + analCum = 0.0 + UnsetFloatValue(p, inflater.LAST_TIME_ANAL) + UnsetFloatValue(p, inflater.CUM_ANAL) + Else + SetFloatValue(p, inflater.CUM_ANAL, analCum) + EndIf + elseif type == 3 + oralCum = cum + if oralCum < 0.1 + oralCum = 0.0 + UnsetFloatValue(p, inflater.LAST_TIME_ORAL) + UnsetFloatValue(p, inflater.CUM_ORAL) + Else + SetFloatValue(p, inflater.CUM_ORAL, oralCum) + EndIf + EndIf + + If type < 3 + if ( analCum <= 0.0 && vagCum <= 0.0 ) + UnsetFloatValue(p, inflater.INFLATION_AMOUNT) + else + currentInf = analCum + vagCum + SetFloatValue(p, inflater.INFLATION_AMOUNT, currentInf) + endif EndIf + + log("Cum amounts after doPush, v: "+ vagCum +", a: "+ analCum +", t: "+ (analCum+vagCum) + ", o: " + oralCum) + doPushDeflate(pool, p, currentInf) - if type < 3 - StorageUtil.SetFloatValue(p, inflater.INFLATION_AMOUNT, currentInf) - endif - StorageUtil.SetFloatValue(p, pool, cum) + Utility.Wait(0.1) inflater.StopLeakage(p, spermtype) inflater.UpdateFaction(p) @@ -284,7 +325,7 @@ Function doPush(int type) endif endif - if StorageUtil.GetFloatValue(p, inflater.CUM_ANAL) == 0.0 && StorageUtil.GetFloatValue(p, inflater.CUM_VAGINAL) == 0.0 && StorageUtil.GetFloatValue(p, inflater.CUM_ORAL) == 0.0 + if analCum <= 0.0 && vagCum <= 0.0 && OralCum <= 0.0 StorageUtil.FormListRemove(inflater, inflater.INFLATED_ACTORS, p, true) inflater.RemoveFaction(p) inflater.UnencumberActor(p) diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index f75a400..c48b53a 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -1033,6 +1033,23 @@ else endif EndFunction +Function EquipLeak(Actor akActor, Armor leak) + Armor curr_armor = akActor.GetWornForm(leak.GetSlotMask()) as Armor + if curr_armor && SexLabUtil.HasKeywordSub(curr_armor, "NoStrip") + return + endif + If curr_armor + log("EquipLeak "+leak+" for " + akActor.GetLeveledActorBase().GetName() + " replace armor " + curr_armor) + FormListAdd(akActor, "sr.inflater.unequipped", curr_armor) + Else + log("EquipLeak "+leak+" for " + akActor.GetLeveledActorBase().GetName()) + EndIf + akActor.addItem(leak, 1, true) + Utility.Wait(0.5) + akActor.equipItem(leak, abSilent=true) + FormListAdd(akActor, "sr.inflater.equipped_leak", leak) +EndFunction + Function StartLeakage(Actor akActor, int CumType, int animate, int spermtype) bool isAnal if Cumtype == 2 @@ -1117,30 +1134,26 @@ Function StartLeakage(Actor akActor, int CumType, int animate, int spermtype) return EndIf - if Cumtype < 3;Nostrip when oral - StripActor(akActor) - endif - - If akActor == Player - Game.ForceThirdPerson() - EndIf + FormListClear(akActor, "sr.inflater.unequipped") + FormListClear(akActor, "sr.inflater.equipped_leak") + log("StartLeakage for " + akActor.GetLeveledActorBase().GetName() + "; animate:" + animate + "; CumType: " + CumType + "; spermtype: " + spermtype) If animate == 2 ; Burst deflate ; log(" burst deflate") if CumType == 1 - akActor.addItem(sr_VagLeak, 1, true) - akActor.equipItem(sr_VagLeak, abSilent=true) + EquipLeak(akActor, sr_VagLeak) elseif CumType == 2 - akActor.addItem(sr_AnalLeak, 1, true) - akActor.equipItem(sr_AnalLeak, abSilent=true) + EquipLeak(akActor, sr_AnalLeak) elseif CumType == 3 - akActor.addItem(sr_OralLeak, 1, true) - Utility.Wait(0.5) - akActor.equipItem(sr_OralLeak, abSilent=true) + EquipLeak(akActor, sr_OralLeak) EndIf + if Cumtype < 3;Nostrip when oral + StripActor(akActor) + endif SetIntValue(akActor, ANIMATING, 2) If akActor == player + Game.ForceThirdPerson() int handle = ModEvent.Create("dhlp-weapondrop") ModEvent.PushBool(handle, true) ModEvent.PushFloat(handle, 1.5) @@ -1160,17 +1173,52 @@ Function StartLeakage(Actor akActor, int CumType, int animate, int spermtype) ElseIf animate == 1 || (animate == 0 && Utility.RandomInt(0, 99) < 80) || animate >= 10 ; normal, less-violent deflate ; log(" normal deflate") - If akActor.IsWeaponDrawn() - akActor.SheatheWeapon() - Utility.Wait(0.8) - EndIf + SetIntValue(akActor, ANIMATING, 1) if akActor == player + if Cumtype < 3;Nostrip when oral + StripActor(akActor) + endif + Game.ForceThirdPerson() Input.TapKey(Input.GetMappedKey("Forward")) Game.DisablePlayerControls() Else - ActorUtil.AddPackageOverride(akActor, stayStillPackage, 100) + ActorUtil.AddPackageOverride(akActor, stayStillPackage, 100, 1) + akActor.EvaluatePackage() + akActor.SetRestrained(true) + akActor.SetDontMove(true) + akActor.StopTranslation() + EndIf + ;PyramidUtils.SetActorCalmed(akActor, true) + + ;Form RightHand = akActor.GetEquippedObject(1) + ;If(RightHand) + ; log("StartLeakage UnequipItemEX " + RightHand.GetName()) + ; akActor.UnequipItemEX(RightHand, akActor.EquipSlot_RightHand, false) + ;ret = PapyrusUtil.PushForm(ret, RightHand) + ;StorageUtil.SetIntValue(RightHand, "Hand", 1) + ;EndIf + ;Form LeftHand = akActor.GetEquippedObject(0) + ;If(LeftHand) + ; log("StartLeakage UnequipItemEX " + LeftHand.GetName()) + ; akActor.UnequipItemEX(LeftHand, akActor.EquipSlot_LeftHand, false) + ;ret = PapyrusUtil.PushForm(ret, LeftHand) + ;StorageUtil.SetIntValue(RightHand, "Hand", 2) + ;EndIf + + If akActor.IsWeaponDrawn() + + ;akActor.SheatheWeapon() + Utility.Wait(0.8) + int attempts = 10 + While attempts > 0 && akActor.IsWeaponDrawn() + attempts -= 1 + Utility.Wait(0.2) + EndWhile + Utility.Wait(1) EndIf + ;Utility.Wait(30) + If animate >= 10 akActor.PlayIdle(BaboAnimsStart[animate - 10]) Else @@ -1178,193 +1226,163 @@ Function StartLeakage(Actor akActor, int CumType, int animate, int spermtype) if CumType == 1 animnum = Utility.RandomInt(0, BaboAnimsStart.length - 1) akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_VagLeak, 1, true) - akActor.equipItem(sr_VagLeak, abSilent=true) + EquipLeak(akActor, sr_VagLeak) elseif CumType == 2 animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_AnalLeak, 1, true) - akActor.equipItem(sr_AnalLeak, abSilent=true) + EquipLeak(akActor, sr_AnalLeak) elseif CumType == 3 ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) ;akActor.PlayIdle(BaboAnimsOral[animnum]) akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeak, 1, true) - akActor.equipItem(sr_OralLeak, abSilent=true) + EquipLeak(akActor, sr_OralLeak) endif elseif spermtype == 1;BeastCum if CumType == 1 animnum = Utility.RandomInt(0, BaboAnimsStart.length - 1) akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_vagLeakBeast, 1, true) - akActor.equipItem(sr_vagLeakBeast, abSilent=true) + EquipLeak(akActor, sr_vagLeakBeast) elseif CumType == 2 animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_analLeakBeast, 1, true) - akActor.equipItem(sr_analLeakBeast, abSilent=true) + EquipLeak(akActor, sr_analLeakBeast) elseif CumType == 3 ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) ;akActor.PlayIdle(BaboAnimsOral[animnum]) akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeakBeast, 1, true) - akActor.equipItem(sr_OralLeakBeast, abSilent=true) + EquipLeak(akActor, sr_OralLeakBeast) endif if sr_Cumvariation.getvalue() == 1 if GetInflation(akactor) > 3.0 && CumType < 3 - akActor.addItem(sr_ThickCum, 1, true) - akActor.equipItem(sr_ThickCum, abSilent=true) + EquipLeak(akActor, sr_ThickCum) elseif GetOralCum(akactor) > 1.0 && CumType == 3 - akActor.addItem(sr_ThickCum, 1, true) - akActor.equipItem(sr_ThickCum, abSilent=true) + EquipLeak(akActor, sr_ThickCum) endif endif elseif spermtype == 2;dragur if CumType == 1 animnum = Utility.RandomInt(0, BaboAnimsStart.length - 1) akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_vagLeakRotten, 1, true) - akActor.equipItem(sr_vagLeakRotten, abSilent=true) + EquipLeak(akActor, sr_vagLeakRotten) elseif CumType == 2 animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_analLeakRotten, 1, true) - akActor.equipItem(sr_analLeakRotten, abSilent=true) + EquipLeak(akActor, sr_analLeakRotten) elseif CumType == 3 ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) ;akActor.PlayIdle(BaboAnimsOral[animnum]) akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeakRotten, 1, true) - akActor.equipItem(sr_OralLeakRotten, abSilent=true) + EquipLeak(akActor, sr_OralLeakRotten) endif elseif spermtype == 3;Spider if CumType == 1 animnum = 3 akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_VagLeak, 1, true) - akActor.equipItem(sr_VagLeak, abSilent=true) + EquipLeak(akActor, sr_VagLeak) elseif CumType == 2 animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_AnalLeak, 1, true) - akActor.equipItem(sr_AnalLeak, abSilent=true) + EquipLeak(akActor, sr_AnalLeak) elseif CumType == 3 ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) ;akActor.PlayIdle(BaboAnimsOral[animnum]) akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeak, 1, true) - akActor.equipItem(sr_OralLeak, abSilent=true) + EquipLeak(akActor, sr_OralLeak) endif if sr_Cumvariation.getvalue() == 1 - akActor.addItem(sr_SpiderEggs, 1, true) - akActor.equipItem(sr_SpiderEggs, abSilent=true) + EquipLeak(akActor, sr_SpiderEggs) endif elseif spermtype == 4;Chaurus if CumType == 1 animnum = 3 akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_VagLeak, 1, true) - akActor.equipItem(sr_VagLeak, abSilent=true) + EquipLeak(akActor, sr_VagLeak) elseif CumType == 2 animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_AnalLeak, 1, true) - akActor.equipItem(sr_AnalLeak, abSilent=true) + EquipLeak(akActor, sr_AnalLeak) elseif CumType == 3 ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) ;akActor.PlayIdle(BaboAnimsOral[animnum]) akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeak, 1, true) - akActor.equipItem(sr_OralLeak, abSilent=true) + EquipLeak(akActor, sr_OralLeak) endif if sr_Cumvariation.getvalue() == 1 if GetInflation(akactor) >= 3.0 && CumType < 3 - akActor.addItem(sr_ChaurusLarvaeEggs, 1, true) - akActor.equipItem(sr_ChaurusLarvaeEggs, abSilent=true) + EquipLeak(akActor, sr_ChaurusLarvaeEggs) elseif GetInflation(akactor) < 3.0 && CumType < 3 - akActor.addItem(sr_ChaurusEggs, 1, true) - akActor.equipItem(sr_ChaurusEggs, abSilent=true) + EquipLeak(akActor, sr_ChaurusEggs) elseif CumType == 3 - akActor.addItem(sr_ChaurusEggs, 1, true) - akActor.equipItem(sr_ChaurusEggs, abSilent=true) + EquipLeak(akActor, sr_ChaurusEggs) endif endif elseif spermtype == 5;Spriggan if CumType == 1 animnum = 3 akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_vagLeakGreen, 1, true) - akActor.equipItem(sr_vagLeakGreen, abSilent=true) + EquipLeak(akActor, sr_vagLeakGreen) elseif CumType == 2 animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_analLeakGreen, 1, true) - akActor.equipItem(sr_analLeakGreen, abSilent=true) + EquipLeak(akActor, sr_analLeakGreen) elseif CumType == 3 ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) ;akActor.PlayIdle(BaboAnimsOral[animnum]) akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeakGreen, 1, true) - akActor.equipItem(sr_OralLeakGreen, abSilent=true) + EquipLeak(akActor, sr_OralLeakGreen) endif if sr_Cumvariation.getvalue() == 1 if GetInflation(akactor) >= 3.0 && CumType < 3 - akActor.addItem(sr_SprigganSlug, 1, true) - akActor.equipItem(sr_SprigganSlug, abSilent=true) + EquipLeak(akActor, sr_SprigganSlug) elseif GetInflation(akactor) < 3.0 && CumType < 3 - akActor.addItem(sr_ThickCumGreen, 1, true) - akActor.equipItem(sr_ThickCumGreen, abSilent=true) + EquipLeak(akActor, sr_ThickCumGreen) elseif CumType == 3 - akActor.addItem(sr_ThickCumGreen, 1, true) - akActor.equipItem(sr_ThickCumGreen, abSilent=true) + EquipLeak(akActor, sr_ThickCumGreen) endif endif elseif spermtype == 6;StoneAtronach if CumType == 1 animnum = 3 akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_VagLeak, 1, true) - akActor.equipItem(sr_VagLeak, abSilent=true) + EquipLeak(akActor, sr_VagLeak) elseif CumType == 2 animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_AnalLeak, 1, true) - akActor.equipItem(sr_AnalLeak, abSilent=true) + EquipLeak(akActor, sr_AnalLeak) elseif CumType == 3 ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) ;akActor.PlayIdle(BaboAnimsOral[animnum]) akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeak, 1, true) - akActor.equipItem(sr_OralLeak, abSilent=true) + EquipLeak(akActor, sr_OralLeak) endif if sr_Cumvariation.getvalue() == 1 - akActor.addItem(sr_AtronachStones, 1, true) - akActor.equipItem(sr_AtronachStones, abSilent=true) + EquipLeak(akActor, sr_AtronachStones) endif elseif spermtype == 7;AshHopper if CumType == 1 animnum = 3 akActor.PlayIdle(BaboAnimsStart[animnum]) - akActor.addItem(sr_VagLeak, 1, true) - akActor.equipItem(sr_VagLeak, abSilent=true) + EquipLeak(akActor, sr_VagLeak) elseif CumType == 2 animnum = Utility.RandomInt(0, BaboAnimsAnusStart.length - 1) akActor.PlayIdle(BaboAnimsAnusStart[animnum]) - akActor.addItem(sr_AnalLeak, 1, true) - akActor.equipItem(sr_AnalLeak, abSilent=true) + EquipLeak(akActor, sr_AnalLeak) elseif CumType == 3 ;animnum = Utility.RandomInt(0, BaboAnimsOral.length - 1) ;akActor.PlayIdle(BaboAnimsOral[animnum]) akActor.PlayIdle(BaboAnimsOralStart[0]) - akActor.addItem(sr_OralLeak, 1, true) - akActor.equipItem(sr_OralLeak, abSilent=true) + EquipLeak(akActor, sr_OralLeak) endif if sr_Cumvariation.getvalue() == 1 - akActor.addItem(sr_AshHopperEggs, 1, true) - akActor.equipItem(sr_AshHopperEggs, abSilent=true) + EquipLeak(akActor, sr_AshHopperEggs) endif endif EndIf + + if akActor != player && Cumtype < 3;Nostrip when oral + StripActor(akActor) + endif + EndIf EndFunction @@ -1497,61 +1515,16 @@ Function StopLeakage(Actor akActor, int spermtype) MfgConsoleFunc.ResetPhonemeModifier(akActor);Player expression is controlled here(OnKeyUp) ActorUtil.RemovePackageOverride(akActor, stayStillPackage) akActor.EvaluatePackage() + akActor.SetRestrained(False) + akActor.SetDontMove(False) + ;PyramidUtils.SetActorCalmed(akActor, false) If anim > 0 Debug.SendAnimationEvent(akActor as ObjectReference,"IdleForceDefaultState") EndIf EndIf - - if spermtype == 1 - akActor.unequipItem(sr_analLeakBeast, abSilent=true) - akActor.unequipItem(sr_vagLeakBeast, abSilent=true) - akActor.unequipItem(sr_ThickCum, abSilent=true) - akActor.unequipItem(sr_OralLeakBeast, abSilent=true) - akActor.removeItem(sr_analLeakBeast, 99, true) - akActor.removeItem(sr_vagLeakBeast, 99, true) - akActor.removeItem(sr_ThickCum, 99, true) - akActor.removeItem(sr_OralLeakBeast, 99, true) - elseif spermtype == 2 - akActor.unequipItem(sr_analLeakRotten, abSilent=true) - akActor.removeItem(sr_vagLeakRotten, 99, true) - akActor.unequipItem(sr_OralLeakRotten, abSilent=true) - akActor.removeItem(sr_OralLeakRotten, 99, true) - elseif spermtype == 3 - akActor.unequipItem(sr_SpiderEggs, abSilent=true) - akActor.removeItem(sr_SpiderEggs, 99, true) - elseif spermtype == 4 - akActor.unequipItem(sr_ChaurusEggs, abSilent=true) - akActor.unequipItem(sr_ChaurusLarvaeEggs, abSilent=true) - akActor.removeItem(sr_ChaurusEggs, 99, true) - akActor.removeItem(sr_ChaurusLarvaeEggs, 99, true) - elseif spermtype == 5 - akActor.unequipItem(sr_analLeakGreen, abSilent=true) - akActor.unequipItem(sr_vagLeakGreen, abSilent=true) - akActor.unequipItem(sr_SprigganSlug, abSilent=true) - akActor.unequipItem(sr_ThickCumGreen, abSilent=true) - akActor.unequipItem(sr_OralLeakGreen, abSilent=true) - akActor.removeItem(sr_analLeakGreen, 99, true) - akActor.removeItem(sr_vagLeakGreen, 99, true) - akActor.removeItem(sr_SprigganSlug, 99, true) - akActor.removeItem(sr_ThickCumGreen, 99, true) - akActor.removeItem(sr_OralLeakGreen, 99, true) - elseif spermtype == 6 - akActor.unequipItem(sr_AtronachStones, abSilent=true) - akActor.removeItem(sr_AtronachStones, 99, true) - elseif spermtype == 7 - akActor.unequipItem(sr_AshHopperEggs, abSilent=true) - akActor.removeItem(sr_AshHopperEggs, 99, true) - endif - - akActor.unequipItem(sr_VagLeak, abSilent=true) - akActor.unequipItem(sr_AnalLeak, abSilent=true) - akActor.unequipItem(sr_OralLeak, abSilent=true) ;akActor.unequipItem(TongueA, abSilent=true) EquiprandomTongue(akactor, false) - akActor.removeItem(sr_VagLeak, 99, true) - akActor.removeItem(sr_AnalLeak, 99, true) - akActor.removeItem(sr_OralLeak, 99, true) ;akActor.removeItem(TongueA, 99, true) ;MfgConsoleFunc.ResetPhonemeModifier(akActor) ; Remove any previous modifiers and phenomes @@ -2187,6 +2160,7 @@ endfunction Function StripActor(Actor akActor) If config.strip + log("StripActor " + akActor) UnequipArmor(akActor) endIf EndFunction @@ -2206,14 +2180,12 @@ Function StripCover(Actor akActor, bool isAnal) EndFunction Function UnstripActor(Actor akActor) - If config.strip - EquipArmor(akActor) - endIf + log("UnstripActor " + akActor) + EquipArmor(akActor) EndFunction Function UnequipArmor(Actor target) ;wornforms = new Armor[32] -FormListClear(target, "sr.inflater.unequipped") ;int index = wornforms.length int index = 0 @@ -2228,9 +2200,10 @@ int thisSlot = 0x01 if (Math.LogicalAnd(thisSlot, slotsChecked) != thisSlot) curr_armor = target.GetWornForm(thisSlot) as Armor if curr_armor - if (!SexLabUtil.HasKeywordSub(curr_armor, "NoStrip")) + if !SexLabUtil.HasKeywordSub(curr_armor, "NoStrip") && (FormListFind(target, "sr.inflater.equipped_leak", curr_armor) == -1) ;wornforms[index] = curr_armor Target.UnequipItem(curr_armor, false, true) + log("UnequipArmor from " + target + ": " + curr_armor) FormListAdd(target, "sr.inflater.unequipped", curr_armor) index += 1 EndIf @@ -2244,26 +2217,44 @@ EndFunction Function EquipArmor(Actor target) int i = FormListCount(target, "sr.inflater.unequipped") + while(i > 0) i -= 1 Armor curr_armor = FormListGet(target, "sr.inflater.unequipped", i) as Armor - if(curr_armor && !target.IsEquipped(curr_armor) && !target.GetWornForm(curr_armor.GetSlotMask())) - bool inInventory = false - Int iIndex = target.GetNumItems() - While iIndex > 0 - iIndex -= 1 - If target.GetNthForm(iIndex) == curr_armor - inInventory = true - EndIf - EndWhile + if curr_armor && !target.IsEquipped(curr_armor) + bool inInventory = true ; false - TODO: need optimization + ;Int iIndex = target.GetNumItems() + ;While iIndex > 0 + ; iIndex -= 1 + ; If target.GetNthForm(iIndex) == curr_armor + ; inInventory = true + ; EndIf + ;EndWhile If inInventory + log("EquipArmor to " + target + ": " + curr_armor) Target.equipItem(curr_armor, false, true) + Else + log("EquipArmor to " + target + ": " + curr_armor + " failed by !inInventory") EndIf + Else + if(!curr_armor) + log("EquipArmor to " + target + ": " + curr_armor + " failed by !curr_armor") + endif + if(target.IsEquipped(curr_armor)) + log("EquipArmor to " + target + ": " + curr_armor + " failed by IsEquipped") + endif endif FormListRemoveAt(target, "sr.inflater.unequipped", i) endwhile FormListClear(target, "sr.inflater.unequipped") - + i = FormListCount(target, "sr.inflater.equipped_leak") + while(i > 0) + i -= 1 + Armor leak = FormListGet(target, "sr.inflater.equipped_leak", i) as Armor + target.unequipItem(leak, abSilent=true) + target.removeItem(leak, 99, true) + endwhile + FormListClear(target, "sr.inflater.equipped_leak") EndFunction diff --git a/Scripts/Source/sr_inflateThread.psc b/Scripts/Source/sr_inflateThread.psc index 37f4d09..88ca3c4 100644 --- a/Scripts/Source/sr_inflateThread.psc +++ b/Scripts/Source/sr_inflateThread.psc @@ -399,7 +399,7 @@ Function Deflate() totalInf = vagCum + analCum Cumtype = 2 maxInflation = inflater.config.maxInflation - log("deflateTarget Anal = "+vagCum+" + "+analCum+" - "+cumAmount) + log("deflateTarget Anal = "+analCum+" + "+analCum+" - "+cumAmount) elseif isOral currentInflation = oralCum totalInf = oralCum @@ -518,6 +518,11 @@ Function Deflate() vagCum = 0.0 UnsetFloatValue(akActor, inflater.LAST_TIME_VAG) UnsetFloatValue(akActor, inflater.CUM_VAGINAL) + if akActor == inflater.player + inflater.sr_InjectorFormlist.revert() + else + FormListClear(akActor, "sr.inflater.injector") + EndIf Else SetFloatValue(akActor, inflater.CUM_VAGINAL, vagCum) EndIf @@ -570,9 +575,8 @@ Function Deflate() EndIf endif - if analCum == 0.0 && vagCum == 0.0 && OralCum == 0.0 + if analCum <= 0.0 && vagCum <= 0.0 && OralCum <= 0.0 FormListRemove(inflater, inflater.INFLATED_ACTORS, akActor, true) - FormListClear(inflater, "sr.inflater.injector") inflater.RemoveFaction(akActor) inflater.UnencumberActor(akActor) if akActor == inflater.player From c34e1cdcb15b952ce2fe75ee451c4325aa65dd53 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Wed, 28 Aug 2024 03:02:13 +0700 Subject: [PATCH 12/20] fix inflation --- Scripts/Source/sr_inflateQuest.psc | 4 +- Scripts/Source/sr_inflateThread.psc | 70 +++++++++++++++-------------- 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index c48b53a..1ac7fcd 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -1735,7 +1735,7 @@ State MonitoringInflation while queued < threads.length && n > 0 n -= 1 Actor a = FormListGet(self, INFLATED_ACTORS, n) as Actor - if a && !a.IsDead() && !a.IsInCombat() && a.GetCurrentScene() == none && !a.IsInFaction(slAnimatingFaction) + if a && !a.IsDead() && !a.IsInCombat() && !a.IsInFaction(slAnimatingFaction) ; && a.GetCurrentScene() == none - we need it? moved to `isAnimating` function float lastVagTime = GetFloatValue(a, LAST_TIME_VAG) float lastAnalTime = GetFloatValue(a, LAST_TIME_ANAL) float lastoralTime = GetFloatValue(a, LAST_TIME_ORAL) @@ -2686,5 +2686,5 @@ Function SLIF_unregisterMorph(Actor akActor, String MorphName) EndFunction bool Function isAnimating(Actor akActor) - return akActor.IsOnMount() || (akActor.GetSitState() != 0) || (slAnimatingFaction && akActor.IsInFaction(slAnimatingFaction) ) || (zadAnimatingFaction && akActor.IsInFaction(zadAnimatingFaction) ) || (DefeatFaction && akActor.IsInFaction(DefeatFaction) ) || (UDMinigameFaction && akActor.IsInFaction(UDMinigameFaction) ) + return akActor.IsOnMount() || akActor.GetCurrentScene() != none || (akActor.GetSitState() != 0) || (slAnimatingFaction && akActor.IsInFaction(slAnimatingFaction) ) || (zadAnimatingFaction && akActor.IsInFaction(zadAnimatingFaction) ) || (DefeatFaction && akActor.IsInFaction(DefeatFaction) ) || (UDMinigameFaction && akActor.IsInFaction(UDMinigameFaction) ) EndFunction \ No newline at end of file diff --git a/Scripts/Source/sr_inflateThread.psc b/Scripts/Source/sr_inflateThread.psc index 88ca3c4..daa8fc0 100644 --- a/Scripts/Source/sr_inflateThread.psc +++ b/Scripts/Source/sr_inflateThread.psc @@ -146,13 +146,14 @@ Function Inflate() float vagCum = GetFloatValue(akActor, inflater.CUM_VAGINAL) float analCum = GetFloatValue(akActor, inflater.CUM_ANAL) float oralCum = GetFloatValue(akActor, inflater.CUM_ORAL) + float currentOralInflation = oralCum ;debug.notification("Oralcum = " + oralCum) ; if isOral ; debug.notification("IsOral") ; else ; debug.notification("!IsOral") ; endif - float maxInflation = inflater.config.maxInflation + float maxInflation = inflater.GetPoolSize(akActor) float OralmaxInflation = inflater.config.OralmaxInflation @@ -165,7 +166,6 @@ Function Inflate() log("both - halve the cum amount") cumAmount /= 2 EndIf - bAnimController = true float AnaltoOral = 0 float OralBursting = 0 @@ -177,13 +177,9 @@ Function Inflate() If isAnal If !inflater.isBelted(akActor, 2) analCum += cumAmount - If (analCum > inflater.GetPoolSize(akActor) && inflater.sexlab.GetGender(akActor) == 1) - AnaltoOral = analCum - inflater.GetPoolSize(akActor) - analCum = inflater.GetPoolSize(akActor) - ElseIf (analCum > inflater.GetPoolSize(akActor)*1.2 && inflater.sexlab.GetGender(akActor) == 0) - ;analCum = inflater.GetPoolSize(akActor)*1.2 - ;If we mess with this value here, we'll never manage to get male bursting working. - ;If we're working with an unbelted male, let this value pass through untouched. + If ((analCum + vagCum) > maxInflation) + AnaltoOral = (analCum + vagCum) - maxInflation + analCum -= cumAmount EndIf SetFloatValue(akActor, inflater.LAST_TIME_ANAL, inflater.GameDaysPassed.GetValue()) SetFloatValue(akActor, inflater.CUM_ANAL, analCum) @@ -199,8 +195,8 @@ Function Inflate() If isVaginal If !inflater.isBelted(akActor, 1) vagCum += cumAmount - If vagCum > inflater.GetPoolSize(akActor) - vagCum = inflater.GetPoolSize(akActor) + If (analCum + vagCum) > maxInflation + vagCum -= cumAmount EndIf SetFloatValue(akActor, inflater.LAST_TIME_VAG, inflater.GameDaysPassed.GetValue()) SetFloatValue(akActor, inflater.CUM_VAGINAL, vagCum) @@ -223,12 +219,14 @@ Function Inflate() SetFloatValue(akActor, inflater.CUM_ORAL, oralCum) EndIf - if AnaltoOral + if AnaltoOral > 0 oralCum += AnaltoOral If oralCum > inflater.GetOralPoolSize(akActor) OralBursting += oralCum - inflater.GetOralPoolSize(akActor); OralBursting Not Ready WIP oralCum = inflater.GetOralPoolSize(akActor) endif + SetFloatValue(akActor, inflater.LAST_TIME_ORAL, inflater.GameDaysPassed.GetValue()) + SetFloatValue(akActor, inflater.CUM_ORAL, oralCum) endif @@ -249,19 +247,21 @@ Function Inflate() float inflationOralAmount = oralCum - startOral float inflationAmount = inflationTarget - currentInflation - log("Status: current inflation: " + currentInflation + ", target: " + inflationTarget + ", vaginal cum: " + vagCum + ", anal cum: " +analCum ) + log("Status: current inflation: " + currentInflation + ", target: " + inflationTarget + ", vaginal cum: " + vagCum + ", anal cum: " + analCum + ", oral cum: " + oralCum ) if tme > 6.0 tme = 6.0 endif int steps = Math.Ceiling(tme / 0.2) float step = inflationAmount / steps float oralstep = inflationOralAmount / steps + int deflationTick = 10 + int tick = deflationTick if(inflater.config.bellyScale) while(currentInflation < inflationTarget) currentInflation += step - if bAnimController - bAnimController = false + tick -= 1 + if(tick <= 0) if config.BodyMorph inflater.SetBellyMorphValue(akActor, currentInflation, inflater.InflateMorph) if inflater.InflateMorph2 != "" @@ -273,8 +273,7 @@ Function Inflate() Else inflater.SetNodeScale(akActor, inflater.BELLY_NODE, currentInflation) Endif - else - bAnimController = true + tick = deflationTick endif Utility.wait(0.2) EndWhile @@ -289,25 +288,24 @@ Function Inflate() Else inflater.SetNodeScale(akActor, inflater.BELLY_NODE, inflationTarget) Endif - - while(startOral < oralCum) - startOral += oralstep - if bAnimController - bAnimController = false + + tick = deflationTick + while(currentOralInflation < oralCum) + currentOralInflation += oralstep + tick -= 1 + if(tick <= 0) if config.BodyMorph if inflater.InflateMorph4 != "" - inflater.SetBellyMorphValue(akActor, startOral, inflater.InflateMorph4) + inflater.SetBellyMorphValue(akActor, currentOralInflation, inflater.InflateMorph4) endIf Endif - else - bAnimController = true + tick = deflationTick endif Utility.wait(0.2) EndWhile - if config.BodyMorph - if inflater.InflateMorph4 != "" - inflater.SetBellyMorphValue(akActor, oralCum, inflater.InflateMorph4) - endif + + if config.BodyMorph && inflater.InflateMorph4 != "" + inflater.SetBellyMorphValue(akActor, oralCum, inflater.InflateMorph4) endif EndIf @@ -328,7 +326,6 @@ Function Inflate() FormListAdd(inflater, inflater.INFLATED_ACTORS, akActor, false) SetFloatValue(akActor, inflater.INFLATION_AMOUNT, inflationTarget) - SetFloatValue(akActor, inflater.CUM_ORAL, oralCum) inflater.UpdateFaction(akActor) inflater.UpdateOralFaction(akActor) inflater.EncumberActor(akActor) @@ -342,13 +339,14 @@ Function Inflate() ModEvent.Send(eid) EndIf + ; ??? ;Remember this complex if-statement? - If (analCum > inflater.GetPoolSize(akActor)*1.2 && inflater.sexlab.GetGender(akActor) == 0) - analCum = inflater.GetPoolSize(akActor)*1.2 + ;If (analCum > inflater.GetPoolSize(akActor)*1.2 && inflater.sexlab.GetGender(akActor) == 0) + ; analCum = inflater.GetPoolSize(akActor)*1.2 ;Now we need to mess with this value. ;This'll keep the amount of cum stored up this male's ass from going ; off into infinity as they have more and more (ill-advised) sex. - EndIf + ;EndIf If akActor == inflater.player;No Oral state is needed. If (isAnal && isVaginal) @@ -755,6 +753,11 @@ Function Absorb() vagCum = 0.0 UnsetFloatValue(akActor, inflater.LAST_TIME_VAG) UnsetFloatValue(akActor, inflater.CUM_VAGINAL) + if akActor == inflater.player + inflater.sr_InjectorFormlist.revert() + else + FormListClear(akActor, "sr.inflater.injector") + EndIf else SetFloatValue(akActor, inflater.CUM_VAGINAL, vagCum) EndIf @@ -808,7 +811,6 @@ Function Absorb() if analCum == 0.0 && vagCum == 0.0 && OralCum == 0.0 FormListRemove(inflater, inflater.INFLATED_ACTORS, akActor, true) - FormListClear(inflater, "sr.inflater.injector") inflater.RemoveFaction(akActor) inflater.UnencumberActor(akActor) if akActor == inflater.player From 9af3b99ea81de50513c70ea5e1e5ea147cd4c6dd Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Thu, 29 Aug 2024 04:06:57 +0700 Subject: [PATCH 13/20] more fixes --- Scripts/Source/sr_inflateThread.psc | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/Scripts/Source/sr_inflateThread.psc b/Scripts/Source/sr_inflateThread.psc index daa8fc0..f4ac672 100644 --- a/Scripts/Source/sr_inflateThread.psc +++ b/Scripts/Source/sr_inflateThread.psc @@ -179,7 +179,7 @@ Function Inflate() analCum += cumAmount If ((analCum + vagCum) > maxInflation) AnaltoOral = (analCum + vagCum) - maxInflation - analCum -= cumAmount + analCum = maxInflation - vagCum EndIf SetFloatValue(akActor, inflater.LAST_TIME_ANAL, inflater.GameDaysPassed.GetValue()) SetFloatValue(akActor, inflater.CUM_ANAL, analCum) @@ -196,7 +196,7 @@ Function Inflate() If !inflater.isBelted(akActor, 1) vagCum += cumAmount If (analCum + vagCum) > maxInflation - vagCum -= cumAmount + vagCum = maxInflation - analCum EndIf SetFloatValue(akActor, inflater.LAST_TIME_VAG, inflater.GameDaysPassed.GetValue()) SetFloatValue(akActor, inflater.CUM_VAGINAL, vagCum) @@ -209,8 +209,11 @@ Function Inflate() EndIf EndIf - If isOral - oralCum += OralcumAmount + If isOral || AnaltoOral > 0 + If isOral + oralCum += OralcumAmount + EndIf + oralCum += AnaltoOral If oralCum > inflater.GetOralPoolSize(akActor) OralBursting = oralCum - inflater.GetOralPoolSize(akActor); OralBursting Not Ready WIP oralCum = inflater.GetOralPoolSize(akActor) @@ -219,17 +222,6 @@ Function Inflate() SetFloatValue(akActor, inflater.CUM_ORAL, oralCum) EndIf - if AnaltoOral > 0 - oralCum += AnaltoOral - If oralCum > inflater.GetOralPoolSize(akActor) - OralBursting += oralCum - inflater.GetOralPoolSize(akActor); OralBursting Not Ready WIP - oralCum = inflater.GetOralPoolSize(akActor) - endif - SetFloatValue(akActor, inflater.LAST_TIME_ORAL, inflater.GameDaysPassed.GetValue()) - SetFloatValue(akActor, inflater.CUM_ORAL, oralCum) - endif - - If belted > 1 log("Fully belted, done.") return From 1255543855effde8c2588ed043861b8cd0406455 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Fri, 6 Sep 2024 06:22:37 +0700 Subject: [PATCH 14/20] fixes --- Scripts/Source/sr_infDeflateAbility.psc | 23 +++++- Scripts/Source/sr_inflateConfig.psc | 7 ++ Scripts/Source/sr_inflateQuest.psc | 100 +++++++++++++----------- Scripts/Source/sr_inflateThread.psc | 22 +++++- 4 files changed, 105 insertions(+), 47 deletions(-) diff --git a/Scripts/Source/sr_infDeflateAbility.psc b/Scripts/Source/sr_infDeflateAbility.psc index f8da8e9..9ae4a8f 100644 --- a/Scripts/Source/sr_infDeflateAbility.psc +++ b/Scripts/Source/sr_infDeflateAbility.psc @@ -159,6 +159,26 @@ Function doPushDeflate(String pool, Actor p, float currentInf) endif EndFunction +bool updateFHU = false +int updateCumType +int updateSpermType +Event OnUpdate() + if inflater.UpdateFHUmoan(GetReference(), updateCumType, updateSpermType) + RegisterForSingleUpdate(10.0) + Else + updateCumType = 0 + updateSpermType = 0 + updateFHU = false + EndIf +EndEvent + +Function RegisterFHUUpdate(int CumType, int SpermType) + updateCumType = CumType + updateFHU = true + updateSpermType = SpermType + RegisterForSingleUpdate(10.0) +EndFunction + Function doPush(int type) log("doPush") Actor p = GetActorReference() @@ -178,6 +198,7 @@ Function doPush(int type) EndIf int spermtype = inflater.GetSpermLastActor(p) inflater.StartLeakage(p, type, 1, spermtype) + RegisterFHUUpdate(type, spermtype) float dps = ((p.GetActorValue("Stamina") / p.GetActorValuePercentage("Stamina")) * 0.01) float currentInf float startInf @@ -277,7 +298,7 @@ Function doPush(int type) doPushDeflate(pool, p, currentInf) Utility.Wait(0.1) - inflater.StopLeakage(p, spermtype) + inflater.StopLeakage(p, type, spermtype) inflater.UpdateFaction(p) inflater.UpdateOralFaction(p) inflater.SendPlayerCumUpdate(cum, type == 2) diff --git a/Scripts/Source/sr_inflateConfig.psc b/Scripts/Source/sr_inflateConfig.psc index a18fedf..0bececd 100644 --- a/Scripts/Source/sr_inflateConfig.psc +++ b/Scripts/Source/sr_inflateConfig.psc @@ -320,15 +320,22 @@ Function SetDefaults() statusMsg = statusMsgDefault npcComments = npcCommentsDefault followerComments = followerCommentsDefault + If followerComments + sr_followerCommentChance.SetValueInt(26) + EndIf eventManager.interval = eventIntervalDefault SendeventChance = SendeventChanceDefault + sr_SendingSpermDataChance.setvalue(SendeventChance) SendeventCriterion = SendeventCriterionDefault + sr_SendingSpermDataCriterion.setvalue(SendeventCriterion) events = eventsDefault bellyScale = bellyScaleDefault BodyMorph = true FHUSLIF = true MoanSound = true + sr_MoanSound.setvalue(1) SexlabMoanSound = true + sr_SexlabMoanSound.setvalue(1) Deflatechance = DeflatechanceDefault sr_ExpelFaliure.setvalue(Deflatechance) VariousCum = VariousCumDefault diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index 1ac7fcd..2ce9c78 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -99,7 +99,7 @@ ImpactDataSet Property SFU_CumHighImpactDataSet Auto ;Actor[] Property InjectorPlayer Auto ; deprecated formlist Property sr_InjectorFormlist auto Actor Property Player Auto -Actor DeflateActor +;Actor DeflateActor Static Property xMarker Auto ;Spell Property puddleSpell Auto @@ -109,11 +109,11 @@ Keyword Property SLA_AnalPlugTail Auto Keyword Property SLA_VaginalBeads Auto int property Tongueri auto -int property cumtypei auto +;int property cumtypei auto sr_inflateThread[] Property threads auto -Bool TongueOut +;Bool TongueOut GlobalVariable Property sr_CumMultiplier Auto GlobalVariable Property sr_SLIF Auto @@ -210,7 +210,7 @@ Idle[] BaboAnimsAnusStart Idle[] BaboAnimsAnusEnd int animnum -int MoanType +;int MoanType Race Property ChaurusRace Auto Race Property ChaurusReaperRace Auto @@ -494,43 +494,44 @@ Event Orgasm(int thread, bool hasPlayer) EndIf EndEvent -Event OnUpdate() -MfgConsoleFunc.ResetPhonemeModifier(DeflateActor) -EmotionWhenLeakage(DeflateActor) +bool Function UpdateFHUmoan(ObjectReference aksource, int cumType, int spermtype) + Actor DeflateActor = aksource as Actor + MfgConsoleFunc.ResetPhonemeModifier(DeflateActor) + EmotionWhenLeakage(DeflateActor) + bool needUpdate = false if DeflateActor.isinfaction(inflaterAnimatingFaction) - if CumTypei < 3 + needUpdate = true + if cumType < 3 if GetInflationPercentage(DeflateActor) < 50 - FHUmoanSoundEffect(DeflateActor as ObjectReference, 1) + FHUmoanSoundEffect(aksource, 1, cumType) else - FHUmoanSoundEffect(DeflateActor as ObjectReference, 2) + FHUmoanSoundEffect(aksource, 2, cumType) endif - MouthOpen(DeflateActor, TongueOut, 0) - elseif CumTypei == 3 + MouthOpen(DeflateActor, GetIntValue(DeflateActor, "sr.inflater.tongue_out", 0), 0) + elseif cumType == 3 MouthOpen(DeflateActor, true, 0) if GetOralPercentage(DeflateActor) < 50 - FHUmoanSoundEffect(DeflateActor as ObjectReference, 1) + FHUmoanSoundEffect(aksource, 1, cumType) else - FHUmoanSoundEffect(DeflateActor as ObjectReference, 2) + FHUmoanSoundEffect(aksource, 2, cumType) endif endif else - FHUmoanSoundAfterEffect(DeflateActor as ObjectReference, 0) + FHUmoanSoundAfterEffect(aksource, 0, cumType) MouthOpen(DeflateActor, true, 5) endif -EndEvent - -Function RegisterFHUUpdate() - RegisterForSingleUpdate(10.0) + return needUpdate EndFunction -Function FHUmoanSoundEffect(ObjectReference aksource, int type); looping +Function FHUmoanSoundEffect(ObjectReference aksource, int type, int CumType); looping {type 1 = mild, type 2 = hard, type 3 = deflation fail} +log("FHUmoanSoundEffect for " + aksource + " " +sr_MoanSound.getvalue()) if sr_MoanSound.getvalue() == 1 ;if aksource == Player as objectreference && type < 3 - DeflateActor = aksource as actor - RegisterFHUUpdate() + ;DeflateActor = aksource as actor + ;RegisterFHUUpdate() ;endif - MoanType = Type + ;MoanType = Type if sr_SexlabMoanSound.getvalue() == 1 if type == 1 UseSexlabVoice(aksource as actor, 50, true) @@ -542,51 +543,60 @@ if sr_MoanSound.getvalue() == 1 UseSexlabVoice(aksource as actor, 40, false) endif else - if CumTypei == 1;Vaginal + if CumType == 1;Vaginal if type == 1 sr_FHUCumDeflationVaginalMildMarker.play(aksource) + log("FHUmoanSoundEffect Vaginal 1 " + aksource) elseif type == 2 sr_FHUCumDeflationVaginalHardMarker.play(aksource) + log("FHUmoanSoundEffect Vaginal 2 " + aksource) else sr_FHUMoanDenialMarker.play(aksource) + log("FHUmoanSoundEffect Vaginal 3 " + aksource) endif ;sr_FHUMoanMildMarker.play(aksource);No longer used. Save it for another update. Burst effect maybe - elseif CumTypei == 2 + elseif CumType == 2 ;sr_FHUMoanHardMarker.play(aksource);No longer used. Save it for another update. Burst effect maybe if type == 1 sr_FHUCumDeflationAnalMildMarker.play(aksource) + log("FHUmoanSoundEffect Anal 1 " + aksource) elseif type == 2 sr_FHUCumDeflationAnalHardMarker.play(aksource) + log("FHUmoanSoundEffect Anal 2 " + aksource) else sr_FHUMoanDenialMarker.play(aksource) + log("FHUmoanSoundEffect Anal 3 " + aksource) endif - elseif CumTypei == 3 + elseif CumType == 3 ;sr_FHUMoanOralMarker.play(aksource) if type == 1 sr_FHUCumDeflationOralMarker.play(aksource) + log("FHUmoanSoundEffect Oral 1 " + aksource) elseif type == 2 sr_FHUCumDeflationOralMarker.play(aksource) + log("FHUmoanSoundEffect Oral 2 " + aksource) else sr_FHUCumDeflationOralFailMarker.play(aksource) + log("FHUmoanSoundEffect Oral 3 " + aksource) endif endif endif endif EndFunction -Function FHUmoanSoundAfterEffect(ObjectReference aksource, int type);No loop +Function FHUmoanSoundAfterEffect(ObjectReference aksource, int type, int CumType);No loop if sr_MoanSound.getvalue() == 1 if sr_SexlabMoanSound.getvalue() == 1 ;Nothing else - if cumtypei == 3 + if CumType == 3 sr_FHUCumDeflationOralAfterMarker.play(aksource) endif endif endif Utility.wait(6.0) -MfgConsoleFunc.ResetPhonemeModifier(DeflateActor) +MfgConsoleFunc.ResetPhonemeModifier(aksource as Actor) EndFunction Function UseSexlabVoice(actor ActorRef, int Strength, bool isvictim) @@ -1058,24 +1068,24 @@ Function StartLeakage(Actor akActor, int CumType, int animate, int spermtype) isAnal = false endif - cumtypei = cumtype + ;cumtypei = cumtype If !akActor.Is3DLoaded() ; log("Skipping animation for " + akActor.GetLeveledActorBase().GetName()) return EndIf ; log("Starting animation for " + akActor.GetLeveledActorBase().GetName()) - if Cumtype < 3 + if CumType < 3 if GetInflationPercentage(akactor) < 50 - FHUmoanSoundEffect(akActor as ObjectReference, 1) + FHUmoanSoundEffect(akActor as ObjectReference, 1, CumType) else - FHUmoanSoundEffect(akActor as ObjectReference, 2) + FHUmoanSoundEffect(akActor as ObjectReference, 2, CumType) endif - elseif Cumtype == 3 + elseif CumType == 3 if GetOralPercentage(akactor) < 50 - FHUmoanSoundEffect(akActor as ObjectReference, 1) + FHUmoanSoundEffect(akActor as ObjectReference, 1, CumType) else - FHUmoanSoundEffect(akActor as ObjectReference, 2) + FHUmoanSoundEffect(akActor as ObjectReference, 2, CumType) endif endif @@ -1090,11 +1100,11 @@ Function StartLeakage(Actor akActor, int CumType, int animate, int spermtype) EquiprandomTongue(akactor, true) EmotionWhenLeakage(akActor) MouthOpen(akActor, true, 0) - TongueOut = true + SetIntValue(akActor, "sr.inflater.tongue_out", 1) Else EmotionWhenLeakage(akActor) MouthOpen(akActor, false, 0) - TongueOut = false + SetIntValue(akActor, "sr.inflater.tongue_out", 0) EndIf ; If Utility.RandomInt(0, 99) < 33 @@ -1391,11 +1401,11 @@ Function DeflateFailMotion(actor akactor, int cumi) if Utility.RandomInt(0, 99) < 40 && sr_TongueEffect.getvalue() == 1 EmotionWhenLeakage(akactor) MouthOpen(akActor, true, 0) - TongueOut = true + SetIntValue(akActor, "sr.inflater.tongue_out", 1) else EmotionWhenLeakage(akactor) MouthOpen(akActor, false, 0) - TongueOut = false + SetIntValue(akActor, "sr.inflater.tongue_out", 0) endif if cumi == 1 akActor.PlayIdle(BaboSpermExpel) @@ -1404,7 +1414,7 @@ Function DeflateFailMotion(actor akactor, int cumi) elseif cumi == 3 akActor.PlayIdle(BaboSpermOralOut) endif - FHUmoanSoundEffect(akactor as objectreference, 3) + FHUmoanSoundEffect(akactor as objectreference, 3, cumi) EndFunction @@ -1479,7 +1489,7 @@ Function EmotionWhenLeakage(actor akActor) EndIf EndFunction -Function StopLeakage(Actor akActor, int spermtype) +Function StopLeakage(Actor akActor, int cumType, int spermtype) int anim = GetIntValue(akActor, ANIMATING,0) ;if(isAnimating(akActor)) ; return @@ -1491,11 +1501,11 @@ Function StopLeakage(Actor akActor, int spermtype) ;else ; akActor.PlayIdle(BaboAnimsEnd[animnum]) ;endif - if cumtypei == 1 + if cumType == 1 akActor.PlayIdle(BaboAnimsEnd[animnum]) - elseif cumtypei == 2 + elseif cumType == 2 akActor.PlayIdle(BaboAnimsAnusEnd[animnum]) - elseif cumtypei == 3 + elseif cumType == 3 akActor.PlayIdle(BaboAnimsOralEnd[0]) endif ElseIf anim == 2 diff --git a/Scripts/Source/sr_inflateThread.psc b/Scripts/Source/sr_inflateThread.psc index f4ac672..7274813 100644 --- a/Scripts/Source/sr_inflateThread.psc +++ b/Scripts/Source/sr_inflateThread.psc @@ -356,6 +356,17 @@ Function Inflate() EndIf EndFunction +bool updateFHU = false +int updateCumType = 0 +int updateSpermType = 0 + +Function RegisterFHUUpdate(int CumType, int SpermType) + updateCumType = CumType + updateSpermType = SpermType + updateFHU = true + RegisterForSingleUpdate(10.0) +EndFunction + Function Deflate() Actor akActor = GetActorReference() log("Deflating") @@ -430,6 +441,7 @@ Function Deflate() int spermtype = inflater.GetSpermLastActor(akActor) inflater.StartLeakage(akActor, Cumtype, animate, spermtype) + RegisterFHUUpdate(Cumtype, spermtype) If akActor.Is3DLoaded() inflater.Moan(akActor) @@ -490,7 +502,7 @@ Function Deflate() Utility.wait(tme) endIf - inflater.StopLeakage(akActor, spermtype) + inflater.StopLeakage(akActor, Cumtype, spermtype) log("Deflated to: " + deflateTarget +" (" +currentInflation + ")") if isAnal @@ -841,6 +853,14 @@ Event OnUpdate() If !running log("Thread timed out, clearing.") clear() + ElseIf updateFHU + if inflater.UpdateFHUmoan(GetReference(), updateCumType, updateSpermType) + RegisterForSingleUpdate(10.0) + Else + updateCumType = 0 + updateSpermType = 0 + updateFHU = false + EndIf EndIf EndEvent From 5214acfdbd17da92a7966b83ca641fb1baffe0dc Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Wed, 11 Sep 2024 02:05:36 +0700 Subject: [PATCH 15/20] fix tongue --- Scripts/Source/sr_infDeflateAbility.psc | 3 +- Scripts/Source/sr_inflateQuest.psc | 90 ++++++++++--------------- 2 files changed, 37 insertions(+), 56 deletions(-) diff --git a/Scripts/Source/sr_infDeflateAbility.psc b/Scripts/Source/sr_infDeflateAbility.psc index 9ae4a8f..9625500 100644 --- a/Scripts/Source/sr_infDeflateAbility.psc +++ b/Scripts/Source/sr_infDeflateAbility.psc @@ -136,6 +136,7 @@ EndEvent Event OnKeyUp(int kc, float time) if kc == config.defkey keydown = false + inflater.EquiprandomTongue(GetActorReference(), false) MfgConsoleFunc.ResetPhonemeModifier(GetActorReference()) endIf EndEvent @@ -224,7 +225,7 @@ Function doPush(int type) float originalCum = cum float originalInf = currentInf - int deflationTick = 5 + int deflationTick = 2 int tick = deflationTick ; log("Starting: inf: " + currentInf +", cum: " +cum + ", pool: " + pool) While keydown && p.GetActorValuePercentage("Stamina") > 0.02 && cum > 0.02 diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index 2ce9c78..c530eb0 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -108,7 +108,7 @@ Keyword Property SLA_AnalPlugBeads Auto Keyword Property SLA_AnalPlugTail Auto Keyword Property SLA_VaginalBeads Auto -int property Tongueri auto +;int property Tongueri auto ;int property cumtypei auto sr_inflateThread[] Property threads auto @@ -507,9 +507,9 @@ bool Function UpdateFHUmoan(ObjectReference aksource, int cumType, int spermtype else FHUmoanSoundEffect(aksource, 2, cumType) endif - MouthOpen(DeflateActor, GetIntValue(DeflateActor, "sr.inflater.tongue_out", 0), 0) + MouthOpen(DeflateActor, 0) elseif cumType == 3 - MouthOpen(DeflateActor, true, 0) + MouthOpen(DeflateActor, 0) if GetOralPercentage(DeflateActor) < 50 FHUmoanSoundEffect(aksource, 1, cumType) else @@ -518,7 +518,7 @@ bool Function UpdateFHUmoan(ObjectReference aksource, int cumType, int spermtype endif else FHUmoanSoundAfterEffect(aksource, 0, cumType) - MouthOpen(DeflateActor, true, 5) + MouthOpen(DeflateActor, 5) endif return needUpdate EndFunction @@ -976,70 +976,57 @@ EndFunction Function EquiprandomTongue(actor akActor, Bool BEquip) if BEquip - Tongueri = Utility.RandomInt(1, 10) + int Tongueri = Utility.RandomInt(1, 10) if Tongueri == 1 akActor.addItem(sr_linga1armor, 1, true) akActor.equipItem(sr_linga1armor, abSilent=true) + FormListAdd(akActor, "sr.inflater.equipped_tongue", sr_linga1armor) elseif Tongueri == 2 akActor.addItem(sr_linga2armor, 1, true) akActor.equipItem(sr_linga2armor, abSilent=true) + FormListAdd(akActor, "sr.inflater.equipped_tongue", sr_linga2armor) elseif Tongueri == 3 akActor.addItem(sr_linga3armor, 1, true) akActor.equipItem(sr_linga3armor, abSilent=true) + FormListAdd(akActor, "sr.inflater.equipped_tongue", sr_linga3armor) elseif Tongueri == 4 akActor.addItem(sr_linga4armor, 1, true) akActor.equipItem(sr_linga4armor, abSilent=true) + FormListAdd(akActor, "sr.inflater.equipped_tongue", sr_linga4armor) elseif Tongueri == 5 akActor.addItem(sr_linga5armor, 1, true) akActor.equipItem(sr_linga5armor, abSilent=true) + FormListAdd(akActor, "sr.inflater.equipped_tongue", sr_linga5armor) elseif Tongueri == 6 akActor.addItem(sr_linga6armor, 1, true) akActor.equipItem(sr_linga6armor, abSilent=true) + FormListAdd(akActor, "sr.inflater.equipped_tongue", sr_linga6armor) elseif Tongueri == 7 akActor.addItem(sr_linga7armor, 1, true) akActor.equipItem(sr_linga7armor, abSilent=true) + FormListAdd(akActor, "sr.inflater.equipped_tongue", sr_linga7armor) elseif Tongueri == 8 akActor.addItem(sr_linga8armor, 1, true) akActor.equipItem(sr_linga8armor, abSilent=true) + FormListAdd(akActor, "sr.inflater.equipped_tongue", sr_linga8armor) elseif Tongueri == 9 akActor.addItem(sr_linga9armor, 1, true) akActor.equipItem(sr_linga9armor, abSilent=true) + FormListAdd(akActor, "sr.inflater.equipped_tongue", sr_linga9armor) elseif Tongueri == 10 akActor.addItem(sr_linga10armor, 1, true) akActor.equipItem(sr_linga10armor, abSilent=true) + FormListAdd(akActor, "sr.inflater.equipped_tongue", sr_linga10armor) endif else - if Tongueri == 1 - akActor.unequipItem(sr_linga1armor, abSilent=true) - akActor.removeItem(sr_linga1armor, 99, true) - elseif Tongueri == 2 - akActor.unequipItem(sr_linga2armor, abSilent=true) - akActor.removeItem(sr_linga2armor, 99, true) - elseif Tongueri == 3 - akActor.unequipItem(sr_linga3armor, abSilent=true) - akActor.removeItem(sr_linga3armor, 99, true) - elseif Tongueri == 4 - akActor.unequipItem(sr_linga4armor, abSilent=true) - akActor.removeItem(sr_linga4armor, 99, true) - elseif Tongueri == 5 - akActor.unequipItem(sr_linga5armor, abSilent=true) - akActor.removeItem(sr_linga5armor, 99, true) - elseif Tongueri == 6 - akActor.unequipItem(sr_linga6armor, abSilent=true) - akActor.removeItem(sr_linga6armor, 99, true) - elseif Tongueri == 7 - akActor.unequipItem(sr_linga7armor, abSilent=true) - akActor.removeItem(sr_linga7armor, 99, true) - elseif Tongueri == 8 - akActor.unequipItem(sr_linga8armor, abSilent=true) - akActor.removeItem(sr_linga8armor, 99, true) - elseif Tongueri == 9 - akActor.unequipItem(sr_linga9armor, abSilent=true) - akActor.removeItem(sr_linga9armor, 99, true) - elseif Tongueri == 10 - akActor.unequipItem(sr_linga10armor, abSilent=true) - akActor.removeItem(sr_linga10armor, 99, true) - endif + int i = FormListCount(akActor, "sr.inflater.equipped_tongue") + while(i > 0) + i -= 1 + Armor aTongue = FormListGet(akActor, "sr.inflater.equipped_tongue", i) as Armor + akActor.unequipItem(aTongue, abSilent=true) + akActor.removeItem(aTongue, 99, true) + endwhile + FormListClear(akActor, "sr.inflater.equipped_tongue") endif EndFunction @@ -1093,19 +1080,15 @@ Function StartLeakage(Actor akActor, int CumType, int animate, int spermtype) SetIntValue(akActor, ANIMATING, -1) return EndIf + FormListClear(akActor, "sr.inflater.equipped_tongue") ;StripCover(akActor, isAnal) MfgConsoleFunc.ResetPhonemeModifier(akActor) If Utility.RandomInt(0, 99) < 40 && sr_TongueEffect.getvalue() == 1 EquiprandomTongue(akactor, true) - EmotionWhenLeakage(akActor) - MouthOpen(akActor, true, 0) - SetIntValue(akActor, "sr.inflater.tongue_out", 1) - Else - EmotionWhenLeakage(akActor) - MouthOpen(akActor, false, 0) - SetIntValue(akActor, "sr.inflater.tongue_out", 0) EndIf + EmotionWhenLeakage(akActor) + MouthOpen(akActor, 0) ; If Utility.RandomInt(0, 99) < 33 ; sexlab.ApplyCum(akActor, 5) @@ -1399,14 +1382,10 @@ EndFunction Function DeflateFailMotion(actor akactor, int cumi) MfgConsoleFunc.ResetPhonemeModifier(akActor) if Utility.RandomInt(0, 99) < 40 && sr_TongueEffect.getvalue() == 1 - EmotionWhenLeakage(akactor) - MouthOpen(akActor, true, 0) - SetIntValue(akActor, "sr.inflater.tongue_out", 1) - else - EmotionWhenLeakage(akactor) - MouthOpen(akActor, false, 0) - SetIntValue(akActor, "sr.inflater.tongue_out", 0) + EquiprandomTongue(akactor, true) endif + EmotionWhenLeakage(akactor) + MouthOpen(akActor, 0) if cumi == 1 akActor.PlayIdle(BaboSpermExpel) elseif cumi == 2 @@ -1418,15 +1397,16 @@ Function DeflateFailMotion(actor akactor, int cumi) EndFunction -Function MouthOpen(actor akActor, bool Tongue, int randomi) +Function MouthOpen(actor akActor, int randomi) {randomi 1-3 normal, 4-5 oralcum, 0 covers all} +int aTongue = FormListCount(akActor, "sr.inflater.equipped_tongue") if randomi == 0 randomi = Utility.RandomInt(1, 5) elseif randomi < 4 randomi = Utility.RandomInt(1, 3) endif if randomi == 1 - if Tongue + if aTongue > 0 MfgConsoleFunc.SetPhoneme(akActor,1,70) MfgConsoleFunc.SetPhoneme(akActor,14,30) Else @@ -1435,7 +1415,7 @@ endif MfgConsoleFunc.SetPhoneme(akActor,7,50) Endif elseif randomi == 2 - if Tongue + if aTongue > 0 MfgConsoleFunc.SetPhoneme(akActor,1,70) MfgConsoleFunc.SetPhoneme(akActor,14,30) Else @@ -1443,7 +1423,7 @@ endif MfgConsoleFunc.SetPhoneme(akActor,12,70) Endif elseif randomi == 3 - if Tongue + if aTongue > 0 MfgConsoleFunc.SetPhoneme(akActor,0,40) MfgConsoleFunc.SetPhoneme(akActor,0,50) Else @@ -2210,7 +2190,7 @@ int thisSlot = 0x01 if (Math.LogicalAnd(thisSlot, slotsChecked) != thisSlot) curr_armor = target.GetWornForm(thisSlot) as Armor if curr_armor - if !SexLabUtil.HasKeywordSub(curr_armor, "NoStrip") && (FormListFind(target, "sr.inflater.equipped_leak", curr_armor) == -1) + if !SexLabUtil.HasKeywordSub(curr_armor, "NoStrip") && (FormListFind(target, "sr.inflater.equipped_leak", curr_armor) == -1) && (FormListFind(target, "sr.inflater.equipped_tongue", curr_armor) == -1) ;wornforms[index] = curr_armor Target.UnequipItem(curr_armor, false, true) log("UnequipArmor from " + target + ": " + curr_armor) From cc17a0f4f5ae6f4dfc4589f8ecaf47b273508565 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Sat, 18 Jan 2025 17:15:18 +0700 Subject: [PATCH 16/20] 0.11 fixes --- Scripts/Source/sr_infDeflateAbility.psc | 18 +++++++++--------- Scripts/Source/sr_inflateQuest.psc | 21 ++++++++++++++++++++- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/Scripts/Source/sr_infDeflateAbility.psc b/Scripts/Source/sr_infDeflateAbility.psc index 9625500..3c04aea 100644 --- a/Scripts/Source/sr_infDeflateAbility.psc +++ b/Scripts/Source/sr_infDeflateAbility.psc @@ -55,6 +55,7 @@ Event OnKeyDown(int kc) EndIf If p.GetActorValuePercentage("Stamina") >= 0.3 + SendModEvent("dhlp-Suspend") int type = inflater.GetMostRecentInflationType(p);Important int err = 0 log("Type: " + type) @@ -125,7 +126,8 @@ Event OnKeyDown(int kc) ElseIf err == 6 inflater.notify("$FHU_DEF_ORAL_FAIL");Anal to Oral WIP inflater.DeflateFailMotion(p, 3) - EndIf + EndIf + SendModEvent("dhlp-Resume") Else inflater.notify("$FHU_DEF_FIZZLE") EndIf @@ -202,7 +204,6 @@ Function doPush(int type) RegisterFHUUpdate(type, spermtype) float dps = ((p.GetActorValue("Stamina") / p.GetActorValuePercentage("Stamina")) * 0.01) float currentInf - float startInf float cum float vagCum = GetFloatValue(p, inflater.CUM_VAGINAL) @@ -306,10 +307,9 @@ Function doPush(int type) Game.EnablePlayerControls() p.RemoveFromFaction(inflater.inflaterAnimatingFaction) inflater.EncumberActor(p) ; Has a 2s wait in it, do it after returning controls to keep it responsive - float cumcomparefloat = startInf - currentInf - int cumcompare = Math.Ceiling(cumcomparefloat) + int cumcompare = Math.Ceiling(diff) - if sr_Cumvariationingredients.getvalue() == 1 + if sr_Cumvariationingredients.getvalue() == 1 && cumcompare > 0 if type < 3 if spermtype == 0;human p.additem(FHUHumanCum, cumcompare) @@ -320,23 +320,23 @@ Function doPush(int type) elseif spermtype == 3;spider p.additem(FHUSpiderEgg, cumcompare) elseif spermtype == 4;chaurus - if startInf > 3.0 + if originalCum > 3.0 p.additem(FHULarvae, 1) endif p.additem(FHUChaurusEggs, cumcompare) elseif spermtype == 5;spriggan p.additem(SprigganSap, cumcompare) - if startInf > 3.0 + if originalCum > 3.0 p.additem(FHUSlug, 1) endif elseif spermtype == 6;Stone p.additem(VoidSalts, cumcompare) - if startInf > 3.0 + if originalCum > 3.0 p.additem(SoulGemBlack, 1) endif elseif spermtype == 7;Ashhopper p.additem(DLC2AshHopperJelly, cumcompare) - if startInf > 3.0 + if originalCum > 3.0 p.additem(FHUAshHopperEggs, 2) endif else diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index c530eb0..1f542db 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -211,6 +211,7 @@ Idle[] BaboAnimsAnusEnd int animnum ;int MoanType +bool dhlpSuspend Race Property ChaurusRace Auto Race Property ChaurusReaperRace Auto @@ -330,6 +331,8 @@ Function maintenance() RegisterForModEvent("HookOrgasmStart", "Orgasm") RegisterForModEvent("HookAnimationEnd", "FHUSexlabEnd") RegisterForModEvent("SexLabOrgasmSeparate", "OrgasmSeparate") + RegisterForModEvent("dhlp-Suspend", "OnDhlpSuspend" ) + RegisterForModEvent("dhlp-Resume", "OnDhlpResume" ) RestoreActors() endif eventManager.Maintenance() @@ -337,6 +340,14 @@ Function maintenance() defAlias.Maintenance() EndFunction +;dhlp event handlers +Event OnDhlpSuspend( string eventName, string strArg, float numArg, Form sender ) + dhlpSuspend = True +EndEvent +Event OnDhlpResume( string eventName, string strArg, float numArg, Form sender ) + dhlpSuspend = False +EndEvent + event FHUSexlabEnd(int tid, bool HasPlayer) Actor[] actors = sexlab.HookActors(tid) sslBaseAnimation anim = sexlab.HookAnimation(tid) @@ -1182,6 +1193,7 @@ Function StartLeakage(Actor akActor, int CumType, int animate, int spermtype) akActor.SetDontMove(true) akActor.StopTranslation() EndIf + (akActor as ObjectReference).SetAnimationVariableInt("IsNPC", 0) ;PyramidUtils.SetActorCalmed(akActor, true) ;Form RightHand = akActor.GetEquippedObject(1) @@ -1513,6 +1525,8 @@ Function StopLeakage(Actor akActor, int cumType, int spermtype) EndIf EndIf + (akActor as ObjectReference).SetAnimationVariableInt("IsNPC", 1) + ;akActor.unequipItem(TongueA, abSilent=true) EquiprandomTongue(akactor, false) ;akActor.removeItem(TongueA, 99, true) @@ -1715,9 +1729,13 @@ State MonitoringInflation EndEvent Event OnUpdateGameTime() - int n = FormListCount(self, INFLATED_ACTORS) if n > 0 + If dhlpSuspend + RegisterForSingleUpdateGameTime(0.5) + return + EndIf + SendModEvent("dhlp-Suspend") float startTime = Utility.GetCurrentGameTime() While n > 0 @@ -1846,6 +1864,7 @@ State MonitoringInflation endif Utility.Wait(10.0) ; Wait for all queued threads to finish EndWhile + SendModEvent("dhlp-Resume") float duration = (Utility.GetCurrentGameTime() - startTime) * 24 float nextUpdate = 1.0 - duration If nextUpdate < 0.1 From ce578be2741cc2d3abcadb6336779b539a2bafe5 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Sat, 18 Jan 2025 18:08:47 +0700 Subject: [PATCH 17/20] RaceName "Wolf" https://www.loverslab.com/topic/156185-fill-her-up-baka-edition/page/57/#findComment-4238590 --- Scripts/Source/sr_inflateQuest.psc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index 1f542db..af79521 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -651,7 +651,7 @@ int Function GetCreatureRaceint(Actor Target) return 1 elseIf RaceName == "Boars" || RaceName == "BoarsAny" || RaceName == "BoarsMounted" return 2 - elseIf RaceName == "Canines" + elseIf RaceName == "Canines" || RaceName == "Wolf" ; https://www.loverslab.com/topic/156185-fill-her-up-baka-edition/page/57/#findComment-4238590 return 3 elseIf RaceName == "Chaurus" return 4 @@ -753,7 +753,7 @@ float CreatureCumAmount = 0 CreatureCumAmount = GetFloatValue(sr_CreatureRaceList.getat(1) as race, CREATURERACE_CUM_AMOUNT, 0.75) * cumMult elseIf RaceName == "Boars" || RaceName == "BoarsAny" || RaceName == "BoarsMounted" CreatureCumAmount = GetFloatValue(sr_CreatureRaceList.getat(2) as race, CREATURERACE_CUM_AMOUNT, 0.75) * cumMult - elseIf RaceName == "Canines" + elseIf RaceName == "Canines" || RaceName == "Wolf" ; https://www.loverslab.com/topic/156185-fill-her-up-baka-edition/page/57/#findComment-4238590 CreatureCumAmount = GetFloatValue(sr_CreatureRaceList.getat(3) as race, CREATURERACE_CUM_AMOUNT, 0.75) * cumMult elseIf RaceName == "Chaurus" CreatureCumAmount = GetFloatValue(sr_CreatureRaceList.getat(4) as race, CREATURERACE_CUM_AMOUNT, 0.75) * cumMult From d3095b5483c364391d386845450a053519e112e2 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Sat, 25 Jan 2025 17:06:54 +0700 Subject: [PATCH 18/20] 0.13 - fix 'Inflation Framework' option in MCM - add 'FHU Body Morph Apply Period' - how fast apply changes to morph (0.2 - means every 0.2 sec - but affect on performance) --- Scripts/Source/sr_infDeflateAbility.psc | 9 +- Scripts/Source/sr_inflateConfig.psc | 33 ++++++- Scripts/Source/sr_inflateThread.psc | 120 ++++++++++++++---------- 3 files changed, 106 insertions(+), 56 deletions(-) diff --git a/Scripts/Source/sr_infDeflateAbility.psc b/Scripts/Source/sr_infDeflateAbility.psc index 3c04aea..96adab0 100644 --- a/Scripts/Source/sr_infDeflateAbility.psc +++ b/Scripts/Source/sr_infDeflateAbility.psc @@ -144,6 +144,9 @@ Event OnKeyUp(int kc, float time) EndEvent Function doPushDeflate(String pool, Actor p, float currentInf) + If currentInf <= 0 + currentInf = 0 + EndIf if config.BodyMorph && (pool == inflater.CUM_VAGINAL || pool == inflater.CUM_ANAL) ;inflater.SetBellyMorphValue(p, currentInf, "PregnancyBelly") inflater.SetBellyMorphValue(p, currentInf, inflater.InflateMorph) @@ -226,8 +229,8 @@ Function doPush(int type) float originalCum = cum float originalInf = currentInf - int deflationTick = 2 - int tick = deflationTick + float deflationTick = inflater.config.BodyMorphApplyPeriod + float tick = deflationTick ; log("Starting: inf: " + currentInf +", cum: " +cum + ", pool: " + pool) While keydown && p.GetActorValuePercentage("Stamina") > 0.02 && cum > 0.02 float deflateAmount = 0.05 * (1.0 / inflater.config.animMult) @@ -236,7 +239,7 @@ Function doPush(int type) EndIf currentInf -= 0.05*(1.0/inflater.config.animMult) cum -= 0.05*(1.0/inflater.config.animMult) - tick -= 1 + tick -= 0.3 if(tick <= 0) ;Prevents serious FPS drop due to heavy code stacks. doPushDeflate(pool, p, currentInf) tick = deflationTick diff --git a/Scripts/Source/sr_inflateConfig.psc b/Scripts/Source/sr_inflateConfig.psc index 0bececd..342da99 100644 --- a/Scripts/Source/sr_inflateConfig.psc +++ b/Scripts/Source/sr_inflateConfig.psc @@ -177,6 +177,10 @@ bool property FHUMorphSLIF2 auto hidden bool property FHUMorphSLIF3 auto hidden bool property FHUMorphSLIF4 auto hidden +int BodyMorphApplyPeriodOID +float property BodyMorphApplyPeriod auto hidden +float property BodyMorphApplyPeriodDefault = 1.0 autoreadonly hidden + int BodyMorphOID bool property BodyMorph = true Auto hidden bool property BodyMorphdefault = true Auto hidden @@ -313,6 +317,7 @@ Function SetDefaults() addRaceKey = addRaceKeyDefault animDeflate = animDeflateDefault animMult = animMultDefault + BodyMorphApplyPeriod = BodyMorphApplyPeriodDefault encumber = encumberDefault enabled = true femaleEnabled = true @@ -331,7 +336,12 @@ Function SetDefaults() events = eventsDefault bellyScale = bellyScaleDefault BodyMorph = true - FHUSLIF = true + if SLIF_Installed + sr_SLIF.setvalue(1) + FHUSLIF = true + else + FHUSLIF = false + endif MoanSound = true sr_MoanSound.setvalue(1) SexlabMoanSound = true @@ -502,7 +512,12 @@ Event OnPageReset(String page) FHUMorphSLIF4OID = AddToggleOption("$FHU_MORPHSLIF4", false, OPTION_FLAG_DISABLED) endif endif - FHUSLIFOID = AddToggleOption("$FHU_SLIF", FHUSLIF) + if SLIF_Installed + FHUSLIFOID = AddToggleOption("$FHU_SLIF", FHUSLIF) + else + FHUSLIFOID = AddToggleOption("$FHU_SLIF", FHUSLIF, OPTION_FLAG_DISABLED) + endif + BodyMorphApplyPeriodOID = AddSliderOption("$FHU_BODYMORPH_APPLY_PERIOD", BodyMorphApplyPeriod, "{1}") addRaceKeyOID = AddKeyMapOption("$FHU_ADD_RACE", addRaceKey, OPTION_FLAG_WITH_UNMAP) consolePrintOID = AddToggleOption("$FHU_CONSOLE_PRINT", consolePrint) loggingOID = AddToggleOption("$FHU_LOGGING", logging) @@ -688,6 +703,11 @@ State settings SetSliderDialogDefaultValue(animMultDefault) SetSliderDialogRange(1.0, 20.0) SetSliderDialogInterval(1.0) + ElseIf opt == BodyMorphApplyPeriodOID + SetSliderDialogStartValue(BodyMorphApplyPeriod) + SetSliderDialogDefaultValue(BodyMorphApplyPeriodDefault) + SetSliderDialogRange(0.2, 2.0) + SetSliderDialogInterval(0.2) ElseIf opt == cumMultOID SetSliderDialogStartValue(inflater.cumMult) SetSliderDialogDefaultValue(1.00) @@ -723,6 +743,10 @@ State settings animMult = val SetSliderOptionValue(opt, animMult, "{1}") inflater.log("Animation duration multiplier set to: " + animMult) + ElseIf opt == BodyMorphApplyPeriodOID + BodyMorphApplyPeriod = val + SetSliderOptionValue(opt, BodyMorphApplyPeriod, "{1}") + inflater.log("BodyMorph Apply Period set to: " + animMult) ElseIf opt == cumMultOID inflater.cumMult = val SetSliderOptionValue(opt, val, "{2}") @@ -1010,6 +1034,8 @@ State settings SetInfoText("$FHU_STATUS_MESSAGES_CHANCE_HELP") ElseIf opt == animMultOID SetInfoText("$FHU_ANIM_MULT_HELP") + ElseIf opt == BodyMorphApplyPeriodOID + SetInfoText("$FHU_BODYMORPH_APPLY_PERIOD_HELP") ElseIf opt == bellyScaleOID SetInfoText("$FHU_VISUAL_BELLY_HELP") ElseIf opt == BodyMorphOID @@ -1318,6 +1344,9 @@ Event OnOptionDefault(int opt) ElseIf opt == animMultOID animMult = animMultDefault SetSliderOptionValue(opt, animMult, "{1}") + ElseIf opt == BodyMorphApplyPeriodOID + BodyMorphApplyPeriod = BodyMorphApplyPeriodDefault + SetSliderOptionValue(opt, BodyMorphApplyPeriod, "{1}") ElseIf opt == encumberOID encumber = encumberDefault SetToggleOptionValue(encumberOID, encumber) diff --git a/Scripts/Source/sr_inflateThread.psc b/Scripts/Source/sr_inflateThread.psc index 7274813..478a940 100644 --- a/Scripts/Source/sr_inflateThread.psc +++ b/Scripts/Source/sr_inflateThread.psc @@ -246,13 +246,15 @@ Function Inflate() int steps = Math.Ceiling(tme / 0.2) float step = inflationAmount / steps float oralstep = inflationOralAmount / steps - int deflationTick = 10 - int tick = deflationTick + float deflationTick = inflater.config.BodyMorphApplyPeriod + float tick = deflationTick + bool BodyMorphApplied = true if(inflater.config.bellyScale) while(currentInflation < inflationTarget) currentInflation += step - tick -= 1 + BodyMorphApplied = false + tick -= 0.2 if(tick <= 0) if config.BodyMorph inflater.SetBellyMorphValue(akActor, currentInflation, inflater.InflateMorph) @@ -266,25 +268,30 @@ Function Inflate() inflater.SetNodeScale(akActor, inflater.BELLY_NODE, currentInflation) Endif tick = deflationTick + BodyMorphApplied = true endif Utility.wait(0.2) EndWhile - if config.BodyMorph - inflater.SetBellyMorphValue(akActor, inflationTarget, inflater.InflateMorph) - if inflater.InflateMorph2 != "" - inflater.SetBellyMorphValue(akActor, inflationTarget, inflater.InflateMorph2) - endIf - if inflater.InflateMorph3 != "" - inflater.SetBellyMorphValue(akActor, inflationTarget, inflater.InflateMorph3) - endif - Else - inflater.SetNodeScale(akActor, inflater.BELLY_NODE, inflationTarget) + if !BodyMorphApplied + if config.BodyMorph + inflater.SetBellyMorphValue(akActor, inflationTarget, inflater.InflateMorph) + if inflater.InflateMorph2 != "" + inflater.SetBellyMorphValue(akActor, inflationTarget, inflater.InflateMorph2) + endIf + if inflater.InflateMorph3 != "" + inflater.SetBellyMorphValue(akActor, inflationTarget, inflater.InflateMorph3) + endif + Else + inflater.SetNodeScale(akActor, inflater.BELLY_NODE, inflationTarget) + Endif Endif tick = deflationTick + BodyMorphApplied = true while(currentOralInflation < oralCum) currentOralInflation += oralstep - tick -= 1 + tick -= 0.2 + BodyMorphApplied = false if(tick <= 0) if config.BodyMorph if inflater.InflateMorph4 != "" @@ -292,11 +299,12 @@ Function Inflate() endIf Endif tick = deflationTick + BodyMorphApplied = true endif Utility.wait(0.2) EndWhile - if config.BodyMorph && inflater.InflateMorph4 != "" + if !BodyMorphApplied && config.BodyMorph && inflater.InflateMorph4 != "" inflater.SetBellyMorphValue(akActor, oralCum, inflater.InflateMorph4) endif EndIf @@ -380,8 +388,9 @@ Function Deflate() float vagCum = GetFloatValue(akActor, inflater.CUM_VAGINAL) float analCum = GetFloatValue(akActor, inflater.CUM_ANAL) float oralCum = GetFloatValue(akActor, inflater.CUM_ORAL) - int deflationTick = 10 - int tick = deflationTick + float deflationTick = inflater.config.BodyMorphApplyPeriod + float tick = deflationTick + bool BodyMorphApplied = true ; Starting values for the callback, current values can be fetched directly float startVag = vagCum float startAn = analCum @@ -452,7 +461,8 @@ Function Deflate() If akActor.Is3DLoaded() while currentInflation > deflateTarget currentInflation -= step - tick -= 1 + tick -= 0.2 + BodyMorphApplied = false if(tick <= 0) if config.BodyMorph && (isAnal || isVaginal) inflater.SetBellyMorphValue(akActor, currentInflation, inflater.InflateMorph) @@ -470,26 +480,29 @@ Function Deflate() inflater.SetNodeScale(akActor, inflater.BELLY_NODE, currentInflation) Endif tick = deflationTick + BodyMorphApplied = true endif Utility.Wait(0.2) endWhile EndIf - if config.BodyMorph && (isAnal || isVaginal) - ;inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.PregnancyBelly) - inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph) - if inflater.InflateMorph2 != "" - inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph2) - endIf - if inflater.InflateMorph3 != "" - inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph3) - endif - elseif config.BodyMorph && isOral - if inflater.InflateMorph4 != "" - inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph4) - endif - Else - inflater.SetNodeScale(akActor, inflater.BELLY_NODE, deflateTarget) + if !BodyMorphApplied + if config.BodyMorph && (isAnal || isVaginal) + ;inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.PregnancyBelly) + inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph) + if inflater.InflateMorph2 != "" + inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph2) + endIf + if inflater.InflateMorph3 != "" + inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph3) + endif + elseif config.BodyMorph && isOral + if inflater.InflateMorph4 != "" + inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph4) + endif + Else + inflater.SetNodeScale(akActor, inflater.BELLY_NODE, deflateTarget) + Endif Endif Else Utility.wait(tme) @@ -622,8 +635,9 @@ Function Absorb() float vagCum = GetFloatValue(akActor, inflater.CUM_VAGINAL) float analCum = GetFloatValue(akActor, inflater.CUM_ANAL) float oralCum = GetFloatValue(akActor, inflater.CUM_ORAL) - int deflationTick = 5 - int tick = deflationTick + float deflationTick = inflater.config.BodyMorphApplyPeriod + float tick = deflationTick + bool BodyMorphApplied = true ; Starting values for the callback, current values can be fetched directly float startVag = vagCum float startAn = analCum @@ -690,7 +704,8 @@ Function Absorb() If akActor.Is3DLoaded() while currentInflation > deflateTarget currentInflation -= step - tick -= 1 + tick -= 0.2 + BodyMorphApplied = false if(tick <= 0) if config.BodyMorph && (isAnal || isVaginal) ;inflater.SetBellyMorphValue(akActor, currentInflation, inflater.PregnancyBelly) @@ -709,26 +724,29 @@ Function Absorb() inflater.SetNodeScale(akActor, inflater.BELLY_NODE, currentInflation) Endif tick = deflationTick + BodyMorphApplied = true endif Utility.Wait(0.2) endWhile EndIf - if config.BodyMorph && (isAnal || isVaginal) - ;inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.PregnancyBelly) - inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph) - if inflater.InflateMorph2 != "" - inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph2) - endIf - if inflater.InflateMorph3 != "" - inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph3) - endif - elseif config.BodyMorph && isOral - if inflater.InflateMorph4 != "" - inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph4) - endif - Else - inflater.SetNodeScale(akActor, inflater.BELLY_NODE, deflateTarget) + If !BodyMorphApplied + if config.BodyMorph && (isAnal || isVaginal) + ;inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.PregnancyBelly) + inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph) + if inflater.InflateMorph2 != "" + inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph2) + endIf + if inflater.InflateMorph3 != "" + inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph3) + endif + elseif config.BodyMorph && isOral + if inflater.InflateMorph4 != "" + inflater.SetBellyMorphValue(akActor, deflateTarget, inflater.InflateMorph4) + endif + Else + inflater.SetNodeScale(akActor, inflater.BELLY_NODE, deflateTarget) + Endif Endif Else Utility.wait(tme) From 7fd029d2212168ef32506a558d5b753bbf286874 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Tue, 28 Jan 2025 15:20:24 +0700 Subject: [PATCH 19/20] dependency refactoring, cum calculation for oral and SLSO, SLIF initialization, not cast spell on oral --- Scripts/Source/sr_inflateConfig.psc | 39 +++++-- Scripts/Source/sr_inflateQuest.psc | 157 ++++++++++++++++------------ Scripts/Source/sr_inflateThread.psc | 63 +++++------ 3 files changed, 152 insertions(+), 107 deletions(-) diff --git a/Scripts/Source/sr_inflateConfig.psc b/Scripts/Source/sr_inflateConfig.psc index 342da99..bb96682 100644 --- a/Scripts/Source/sr_inflateConfig.psc +++ b/Scripts/Source/sr_inflateConfig.psc @@ -254,6 +254,10 @@ bool BeeingFemale_Installed bool SLIF_Installed bool Property FHUSLIF = true Auto hidden +Faction Property zadAnimatingFaction auto +Faction Property DefeatFaction auto +Faction Property UDMinigameFaction auto +Faction Property BathinginSkyrimFaction auto bool property addedEvents = true autoreadonly hidden int runCount = 0 @@ -306,6 +310,23 @@ Function VerifyMods() Else SLIF_Installed = false Endif + + If Game.GetModByName("Devious Devices - Integration.esm") != 255 + zadAnimatingFaction = Game.GetFormFromFile(0x00029567, "Devious Devices - Integration.esm") as Faction + EndIf + + If Game.GetModByName("SexLabDefeat.esp") != 255 + DefeatFaction = Game.GetFormFromFile(0x00001D92, "SexLabDefeat.esp") as Faction + EndIf + + If Game.GetModByName("UnforgivingDevices.esp") != 255 + UDMinigameFaction = Game.GetFormFromFile(0x00150DA3, "UnforgivingDevices.esp") as Faction + EndIf + + If Game.GetModByName("Bathing in Skyrim.esp") != 255 + ; TODO: + ; BathinginSkyrimFaction = + EndIf EndFunction @@ -336,12 +357,6 @@ Function SetDefaults() events = eventsDefault bellyScale = bellyScaleDefault BodyMorph = true - if SLIF_Installed - sr_SLIF.setvalue(1) - FHUSLIF = true - else - FHUSLIF = false - endif MoanSound = true sr_MoanSound.setvalue(1) SexlabMoanSound = true @@ -398,7 +413,8 @@ Function PageReset() EndFunction Event OnVersionUpdate(int newVersion) - If newVersion != currentVersion + If newVersion != CurrentVersion + VerifyMods() ; Need know installed mods for setup ModName = "Fill her up" bool monitoring = inflater.GetState() == "MonitoringInflation" inflater.stop() @@ -421,6 +437,12 @@ Event OnVersionUpdate(int newVersion) If currentVersion == 0 SetDefaultCumAmounts() + if SLIF_Installed + sr_SLIF.setvalue(1) + FHUSLIF = true + else + FHUSLIF = false + endif EndIf InitCumMagicEffects() sr_inflatedCommentChance.SetValueInt(26) @@ -433,7 +455,7 @@ Event OnVersionUpdate(int newVersion) EndIf Debug.Notification("Fill Her Up " + inflater.GetVersionString() + " initialized.") EndIf - ;debug.messagebox("Fill Her Up Update") + ;debug.Notification("Fill Her Up Update from " + CurrentVersion + " to " + newVersion) EndEvent @@ -861,6 +883,7 @@ State settings Else inflater.UnregisterForModEvent("SexLabOrgasmSeparate") inflater.UnregisterForModEvent("HookOrgasmStart") + ;inflater.UnregisterForModEvent("Sexlab_AddCum") ; Not have source :( inflater.ResetActors() ; Eh, same thing couple of lines lower with a confirmation... StorageUtil.UnsetIntValue(Game.GetPlayer(), "CI_CumInflation_ON") SetOptionFlags(femaleEnabledOID, OPTION_FLAG_DISABLED) diff --git a/Scripts/Source/sr_inflateQuest.psc b/Scripts/Source/sr_inflateQuest.psc index af79521..56be893 100644 --- a/Scripts/Source/sr_inflateQuest.psc +++ b/Scripts/Source/sr_inflateQuest.psc @@ -78,9 +78,6 @@ Spell Property encumber25 Auto SexLabFramework Property sexlab auto Faction Property slAnimatingFaction auto -Faction Property zadAnimatingFaction auto -Faction Property DefeatFaction auto -Faction Property UDMinigameFaction auto Package Property stayStillPackage auto @@ -312,15 +309,6 @@ Function VersionUpdate() zad_DeviousBelt = Game.GetFormFromFile(0x00003330, "Devious Devices - Assets.esm") as Keyword zad_PermitAnal = Game.GetFormFromFile(0x0000FACA, "Devious Devices - Assets.esm") as Keyword EndIf - If Game.GetModByName("Devious Devices - Integration.esm") != 255 - zadAnimatingFaction = Game.GetFormFromFile(0x00029567, "Devious Devices - Integration.esm") as Faction - EndIf - If Game.GetModByName("SexLabDefeat.esp") != 255 - DefeatFaction = Game.GetFormFromFile(0x00001D92, "SexLabDefeat.esp") as Faction - EndIf - If Game.GetModByName("UnforgivingDevices.esp") != 255 - UDMinigameFaction = Game.GetFormFromFile(0x00150DA3, "UnforgivingDevices.esp") as Faction - EndIf SetIntValue(Player, "CI_CumInflation_ON", 1) eventManager.StartEvents() EndFunction @@ -331,6 +319,7 @@ Function maintenance() RegisterForModEvent("HookOrgasmStart", "Orgasm") RegisterForModEvent("HookAnimationEnd", "FHUSexlabEnd") RegisterForModEvent("SexLabOrgasmSeparate", "OrgasmSeparate") + ;RegisterForModEvent("Sexlab_AddCum", "AddCum") Not have source :( RegisterForModEvent("dhlp-Suspend", "OnDhlpSuspend" ) RegisterForModEvent("dhlp-Resume", "OnDhlpResume" ) RestoreActors() @@ -414,15 +403,12 @@ Event OrgasmSeparate(Form ActorRef, Int Thread) currentPool = Math.LogicalOr(currentPool, ORAL) ;Debug.notification("Oral " + currentPool as int) EndIf - - If sexlab.Threads[Thread].hasPlayer - dialogue.modMod(30) - currentActors = actors - currentType = currentPool - EndIf String callback = "" int i = actors.length + Actor[] cumSource = new Actor[1] + cumSource[0] = akActor + while i > 0 i -= 1 int cumSpot = anim.GetCum(i) @@ -432,18 +418,21 @@ Event OrgasmSeparate(Form ActorRef, Int Thread) If ((actorGender == 1 && config.femaleEnabled) || (actorGender == 0 && config.maleEnabled)) && cumSpot != -1; && cumSpot != 2 ; only inflate if the actor is female (or male pretending to be female!) and the animation position has cum effect set for something else than oral only If actors[i] == player && sr_CumEffectsEnabled.GetValueInt() > 0 + dialogue.modMod(30) + currentActors = cumSource + currentType = currentPool RegisterForModEvent("fhu.playerInflated", "PlayerInflationDone") callback = "fhu.playerInflated" Else callback = "" EndIf - int tid = QueueActor(actors[i], true, currentPool, GetCumAmountForActor(actors[i], actors), 3.0, callback) - ;sr_InjectorFormlist.addform(actors[i]) - if tid < 0 - warn("Inflaton slots full, skipping " + actors[i].GetLeveledActorBase().GetName() + "!") - Else - log(actors[i].GetLeveledActorBase().GetName() + " slotted to thread " + tid +".") - EndIf + int tid = QueueActor(actors[i], true, currentPool, GetCumAmountForActor(actors[i], cumSource), 3.0, callback) + ;sr_InjectorFormlist.addform(actors[i]) + if tid < 0 + warn("Inflaton slots full, skipping " + actors[i].GetLeveledActorBase().GetName() + "!") + Else + log(actors[i].GetLeveledActorBase().GetName() + " slotted to thread " + tid +".") + EndIf EndIf EndIf EndWhile @@ -470,12 +459,6 @@ Event Orgasm(int thread, bool hasPlayer) currentPool = Math.LogicalOr(currentPool, ORAL) ;Debug.notification("Oral " + currentPool as int) EndIf - - If hasPlayer - dialogue.modMod(30) - currentActors = actors - currentType = currentPool - EndIf String callback = "" int i = actors.length @@ -488,6 +471,9 @@ Event Orgasm(int thread, bool hasPlayer) If ((actorGender == 1 && config.femaleEnabled) || (actorGender == 0 && config.maleEnabled)) ;&& cumSpot != -1 ; only inflate if the actor is female (or male pretending to be female!) and the animation position has cum effect set for something else than oral only If actors[i] == player && sr_CumEffectsEnabled.GetValueInt() > 0 + dialogue.modMod(30) + currentActors = actors + currentType = currentPool RegisterForModEvent("fhu.playerInflated", "PlayerInflationDone") callback = "fhu.playerInflated" Else @@ -1971,6 +1957,7 @@ Function ResetActors(bool force = false) RemoveFaction(player) SendPlayerCumUpdate(0.0, true) SendPlayerCumUpdate(0.0, false) + sr_InjectorFormlist.revert() notify("$FHU_ACTORS_RESET") EndFunction @@ -2060,9 +2047,9 @@ Function PlayerInflationDone(Form a, float startVag, float startAn, float startO while n > 0 n -= 1 If currentActors[n] != none && currentActors[n] != player && currentActors[n].haskeyword(ActorTypeNPC) - ApplyCumEffect(currentActors[n].GetLeveledActorBase().GetRace(), currentType, startVag, startAn) + ApplyCumEffect(currentActors[n].GetLeveledActorBase().GetRace(), currentType, startVag, startAn, startOr) Elseif currentActors[n] != none && currentActors[n] != player && !currentActors[n].haskeyword(ActorTypeNPC) - ApplyCreatureCumEffect(sr_CreatureRaceList.getat(GetCreatureRaceint(currentActors[n])) as race, currentType, startVag, startAn) + ApplyCreatureCumEffect(sr_CreatureRaceList.getat(GetCreatureRaceint(currentActors[n])) as race, currentType, startVag, startAn, startOr) EndIf EndWhile @@ -2070,74 +2057,86 @@ Function PlayerInflationDone(Form a, float startVag, float startAn, float startO currentActors = new Actor[1] EndFunction -Function ApplyCreatureCumEffect(Race rce, int pool, float startVag, float startAn) +Function ApplyCreatureCumEffect(Race rce, int pool, float startVag, float startAn, float startOr) if pool <= 0 warn("Tried to apply cum effect without a pool.") return EndIf - log("Trying to apply cum effect for " + rce.GetName()) + log("Trying to apply cum effect for " + rce.GetName() + "; startVag=" + startVag + "; startAn=" + startAn + "; startOr=" + startOr) int n = FormListCount(rce, CREATURERACE_CUM_EFFECTS) log("Found " + n + " effects.") if n < 1 return EndIf - Spell theSpell = FormListGet(rce, CREATURERACE_CUM_EFFECTS, Utility.RandomInt(0, n - 1)) as Spell - log("Applying " + theSpell.GetName()) - bool isAnal + bool isVaginal = false + bool isAnal = false + bool isOral = false if(Math.LogicalAnd(pool, ANAL) && !Math.LogicalAnd(pool, VAGINAL)) isAnal = true elseIf(!Math.LogicalAnd(pool, ANAL) && Math.LogicalAnd(pool, VAGINAL)) - isAnal = false - Else ; both + isVaginal = true + ElseIf (Math.LogicalAnd(pool, ANAL) || Math.LogicalAnd(pool, VAGINAL)); both isAnal = Utility.RandomInt(0,1) == 1 + isVaginal = !isAnal EndIf - player.AddSpell(theSpell, abVerbose = false) - int evnt = ModEvent.Create("fhu.playerCumEffectStart") - If isAnal - ModEvent.pushFloat(evnt, startAn) - Else - ModEvent.pushFloat(evnt, startVag) + + If isAnal || isVaginal ;No Oral state is needed. Oral is Wip + Spell theSpell = FormListGet(rce, CREATURERACE_CUM_EFFECTS, Utility.RandomInt(0, n - 1)) as Spell + log("Applying " + theSpell.GetName()) + player.AddSpell(theSpell, abVerbose = false) + int evnt = ModEvent.Create("fhu.playerCumEffectStart") + If isAnal + ModEvent.pushFloat(evnt, startAn) + Else + ModEvent.pushFloat(evnt, startVag) + EndIf + ModEvent.pushBool(evnt, isAnal) + ModEvent.pushForm(evnt, theSpell) + Utility.Wait(0.75) + ModEvent.Send(evnt) EndIf - ModEvent.pushBool(evnt, isAnal) - ModEvent.pushForm(evnt, theSpell) - Utility.Wait(0.75) - ModEvent.Send(evnt) EndFunction -Function ApplyCumEffect(Race rce, int pool, float startVag, float startAn) +Function ApplyCumEffect(Race rce, int pool, float startVag, float startAn, float startOr) if pool <= 0 warn("Tried to apply cum effect without a pool.") return EndIf - log("Trying to apply cum effect for " + rce.GetName()) + log("Trying to apply cum effect for " + rce.GetName() + "; startVag=" + startVag + "; startAn=" + startAn + "; startOr=" + startOr) int n = FormListCount(rce, RACE_CUM_EFFECTS) log("Found " + n + " effects.") if n < 1 return EndIf - Spell theSpell = FormListGet(rce, RACE_CUM_EFFECTS, Utility.RandomInt(0, n - 1)) as Spell - log("Applying " + theSpell.GetName()) - bool isAnal + bool isVaginal = false + bool isAnal = false + bool isOral = false if(Math.LogicalAnd(pool, ANAL) && !Math.LogicalAnd(pool, VAGINAL)) isAnal = true elseIf(!Math.LogicalAnd(pool, ANAL) && Math.LogicalAnd(pool, VAGINAL)) - isAnal = false - Else ; both + isVaginal = true + ElseIf (Math.LogicalAnd(pool, ANAL) || Math.LogicalAnd(pool, VAGINAL)); both isAnal = Utility.RandomInt(0,1) == 1 + isVaginal = !isAnal EndIf - player.AddSpell(theSpell, abVerbose = false) - int evnt = ModEvent.Create("fhu.playerCumEffectStart") - If isAnal - ModEvent.pushFloat(evnt, startAn) - Else - ModEvent.pushFloat(evnt, startVag) + + If isAnal || isVaginal ;No Oral state is needed. Oral is Wip + Spell theSpell = FormListGet(rce, RACE_CUM_EFFECTS, Utility.RandomInt(0, n - 1)) as Spell + log("Applying " + theSpell.GetName()) + player.AddSpell(theSpell, abVerbose = false) + int evnt = ModEvent.Create("fhu.playerCumEffectStart") + If isAnal + ModEvent.pushFloat(evnt, startAn) + Else + ModEvent.pushFloat(evnt, startVag) + EndIf + ModEvent.pushBool(evnt, isAnal) + ModEvent.pushForm(evnt, theSpell) + Utility.Wait(0.75) + ModEvent.Send(evnt) EndIf - ModEvent.pushBool(evnt, isAnal) - ModEvent.pushForm(evnt, theSpell) - Utility.Wait(0.75) - ModEvent.Send(evnt) EndFunction Function SendPlayerCumUpdate(float current, bool isAnal) @@ -2694,6 +2693,26 @@ Function SLIF_unregisterMorph(Actor akActor, String MorphName) ;Null EndFunction -bool Function isAnimating(Actor akActor) - return akActor.IsOnMount() || akActor.GetCurrentScene() != none || (akActor.GetSitState() != 0) || (slAnimatingFaction && akActor.IsInFaction(slAnimatingFaction) ) || (zadAnimatingFaction && akActor.IsInFaction(zadAnimatingFaction) ) || (DefeatFaction && akActor.IsInFaction(DefeatFaction) ) || (UDMinigameFaction && akActor.IsInFaction(UDMinigameFaction) ) +bool Function isAnimating(Actor akActor) ; TODO too many dependency + If (akActor.IsOnMount() || akActor.GetCurrentScene() != none || akActor.GetSitState() != 0) + return true + EndIf + If (slAnimatingFaction && akActor.IsInFaction(slAnimatingFaction) ) + return true + EndIf + If (config.zadAnimatingFaction && akActor.IsInFaction(config.zadAnimatingFaction) ) + return true + EndIf + If (config.DefeatFaction && akActor.IsInFaction(config.DefeatFaction) ) + return true + EndIf + If (config.UDMinigameFaction && akActor.IsInFaction(config.UDMinigameFaction) ) + return true + EndIf + ; TODO: Not a faction + ;If (config.BathinginSkyrimFaction && akActor.IsInFaction(config.BathinginSkyrimFaction) ) + ; return true + ;EndIf + + return false EndFunction \ No newline at end of file diff --git a/Scripts/Source/sr_inflateThread.psc b/Scripts/Source/sr_inflateThread.psc index 478a940..6bfb694 100644 --- a/Scripts/Source/sr_inflateThread.psc +++ b/Scripts/Source/sr_inflateThread.psc @@ -8,7 +8,6 @@ bool inf = true bool isAnal = false bool isVaginal = false bool isOral = false -float OralcumAmount = 0.0 float cumAmount = 0.0 float tme = 0.0 Bool bAnimController @@ -41,7 +40,6 @@ Function SetUp(bool inflate, int poolMask, float amount, float time = 3.0, Strin EndIf cumAmount = amount - OralcumAmount = amount * 0.75 tme = time cb = callback animate = DoAnimate @@ -135,9 +133,13 @@ Event StartAbsorption() EndEvent Function Inflate() + If cumAmount == 0 + return + EndIf + Actor akActor = GetActorReference() - log("Inflating, anal: " + isAnal + ", vaginal: " + isVaginal + ", cum amount: " + cumAmount) + log("Inflating, anal: " + isAnal + ", vaginal: " + isVaginal + ", oral: " + isOral + ", cum amount: " + cumAmount) if inflater.GetState() == "" inflater.GoToState("MonitoringInflation") EndIf @@ -162,8 +164,21 @@ Function Inflate() maxInflation *= inflater.BURST_MULT EndIf + float OralcumAmount = 0 + if(isOral) + If isAnal && isVaginal + OralcumAmount = cumAmount/3 + cumAmount = cumAmount - OralcumAmount + ElseIf isAnal || isVaginal + OralcumAmount = cumAmount/2 + cumAmount = cumAmount - OralcumAmount + Else + OralcumAmount = cumAmount + EndIf + OralcumAmount = OralcumAmount * 0.75 + EndIf + If isAnal && isVaginal - log("both - halve the cum amount") cumAmount /= 2 EndIf float AnaltoOral = 0 @@ -348,18 +363,12 @@ Function Inflate() ; off into infinity as they have more and more (ill-advised) sex. ;EndIf - If akActor == inflater.player;No Oral state is needed. - If (isAnal && isVaginal) + If akActor == inflater.player;No Oral state is needed. Oral is Wip + If isVaginal inflater.SendPlayerCumUpdate(vagCum, false) + EndIf + If isAnal inflater.SendPlayerCumUpdate(analCum, true) - Else - float amount = 0.0 - If isAnal - amount = analCum - ElseIf isVaginal - amount = vagCum - EndIf - inflater.SendPlayerCumUpdate(amount, isAnal) EndIf EndIf EndFunction @@ -607,16 +616,13 @@ Function Deflate() ModEvent.Send(eid) EndIf - If akActor == inflater.player - float amount = 0.0 + If akActor == inflater.player;No Oral state is needed. Oral is Wip + If isVaginal + inflater.SendPlayerCumUpdate(vagCum, false) + EndIf If isAnal - amount = analCum - elseif isVaginal - amount = vagCum - else - amount = oralCum + inflater.SendPlayerCumUpdate(analCum, true) EndIf - inflater.SendPlayerCumUpdate(amount, isAnal) EndIf ; Update arousal @@ -848,16 +854,13 @@ Function Absorb() ModEvent.Send(eid) EndIf - If akActor == inflater.player - float amount = 0.0 + If akActor == inflater.player;No Oral state is needed. Oral is Wip + If isVaginal + inflater.SendPlayerCumUpdate(vagCum, false) + EndIf If isAnal - amount = analCum - elseif isVaginal - amount = vagCum - else - amount = oralCum + inflater.SendPlayerCumUpdate(analCum, true) EndIf - inflater.SendPlayerCumUpdate(amount, isAnal) EndIf ; Update arousal From f286b1e8447b9456cb947e6906ddb0760936e3c5 Mon Sep 17 00:00:00 2001 From: Andrej E Baranov Date: Wed, 29 Jan 2025 05:50:03 +0700 Subject: [PATCH 20/20] fix MCM papyrus error --- Scripts/Source/sr_inflateConfig.psc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Scripts/Source/sr_inflateConfig.psc b/Scripts/Source/sr_inflateConfig.psc index bb96682..4f15f0b 100644 --- a/Scripts/Source/sr_inflateConfig.psc +++ b/Scripts/Source/sr_inflateConfig.psc @@ -657,7 +657,11 @@ Event OnPageReset(String page) while iinjector > 0 iinjector -= 1 Actor injector = StorageUtil.FormListGet(a, "sr.inflater.injector", iinjector) as Actor - AddTextOption(injector.GetLeveledActorBase().GetName(), DefineSex(injector)) + If injector + AddTextOption(injector.GetLeveledActorBase().GetName(), DefineSex(injector)) + Else + AddTextOption("Unknown", "Unknown") + EndIf endwhile EndIf @@ -667,7 +671,12 @@ Event OnPageReset(String page) int iinjector = sr_InjectorFormlist.getsize() while iinjector > 0 iinjector -= 1 - AddTextOption((sr_InjectorFormlist.getat(iinjector) as actor).GetLeveledActorBase().GetName(), DefineSex(sr_InjectorFormlist.getat(iinjector) as actor)) + Actor injector = sr_InjectorFormlist.getat(iinjector) as actor + If injector + AddTextOption(injector.GetLeveledActorBase().GetName(), DefineSex(injector)) + Else + AddTextOption("Unknown", "Unknown") + EndIf EndWhile ElseIf page == pages[3] ; Human Cum Amounts GoToState("humancumamount")