Guest Posted February 20, 2019 Posted February 20, 2019 @Erstam Hey, do I need to update my version or is everything already covered (just by looking at the changelog it seems so)? EDIT: I just took a quick look and the following came to mind: Hotkey for SexLab is broken. You can only do it once. You are also not unequipping, not sure how relevant that is. Avoid using the animating actors faction. I was using it on my SKSE plugin and eventually dropped it entirely because it isn't that reliable. You can use HasKeywordString("SexLabActive"). That keyword is present in all of SexLab threads and becomes visible on the actor as soon as he becomes an alias for a thread.
Erstam Posted February 20, 2019 Author Posted February 20, 2019 14 minutes ago, Hawk9969 said: @Erstam Hey, do I need to update my version or is everything already covered (just by looking at the changelog it seems so)? I don't think that you need to. I might have implemented the hotkey block for actors in a SexLab scene differently, but that shouldn't matter. Anyway, since you are going a different way with Cumshot Improvements (such as making the base module dependent on SexLab), you're like on your own branch now. Feel free to post CI as your own mod if you like - however I won't push you to do so. I consider Cumshot feature complete and pretty much final (barring important bug fixes, or compatibility updates for future Framework versions).
Erstam Posted February 20, 2019 Author Posted February 20, 2019 32 minutes ago, Hawk9969 said: Hotkey for SexLab is broken. You can only do it once. You are also not unequipping, not sure how relevant that is. Avoid using the animating actors faction. I was using it on my SKSE plugin and eventually dropped it entirely because it isn't that reliable. You can use HasKeywordString("SexLabActive"). That keyword is present in all of SexLab threads and becomes visible on the actor as soon as he becomes an alias for a thread. Hmm? 1 and 2. For me it works, I tested it and I could do it several times in a row. 3. Don't see how it could be unreliable. The official SexLab API function IsActorActive() does exactly this - checking for the faction. Btw. I actually tried calling that function in the first 2.0.4 upload, and had the same problem as you with the SAM function call - the game wouldn't load the script when SexLab isn't installed. So I went checking for the faction directly.
Guest Posted February 20, 2019 Posted February 20, 2019 1) If StorageUtil.HasFormValue(target, "CS2_ejaculating") If !isTargetInSLScene ; removing cumshots while in a SL scene causes redressing, let the animation end event handle that DebugMessage(target.GetLeveledActorBase().GetName() + ": Ejaculation stopped manually") RemoveCumshot(target) EndIf -> If you had a cumshot that didn't remove itself, it will end itself at this evaluation. Else DebugMessage(target.GetLeveledActorBase().GetName() + ": Ejaculation triggered manually") Ejaculate(target, autoRemove = !isTargetInSLScene) StorageUtil.SetFloatValue(target, "CS2_LastOrgasmTime", Utility.GetCurrentGameTime()) EndIf 3) The reason it isn't that reliable is because SexLab keeps constantly changing it. In fact I could never get its rank above 0 in C++, while the Papyrus SexLab code clearly uses 1 for when the animation is actually playing. As for Papyrus randomness, here is a new one for you: Function RegisterForWeapon(Actor a, int slot, string eventName) Register(a, eventName, "OnQueue_Item") if (weaponQueue == None) weaponQueue = Utility.CreateIntArray(1, slot) ; Produces a 0 length array weaponQueue = new int[1] ; also 0 length array MiscUtil.PrintConsole(Utility.CreateIntArray(100).Length as string) ; Prints 0 else weaponQueue = PushInt(weaponQueue, slot) endif EndFunction Function RegisterForWeapon(Actor a, int slot, string eventName) if (Register(a, eventName, "OnQueue_Item")) weaponQueue = Utility.CreateIntArray(1, slot) ; Works, lol else weaponQueue = PushInt(weaponQueue, slot) endif EndFunction
Guest Posted February 20, 2019 Posted February 20, 2019 @Erstam -OK, here is the problem. I'm using SL 1.62 and all my animations are SLAL. Cum shot mod works perfectly on time in some animations, but it doesn't work on time in most. I'm using only 15 animations, the ones my wife likes. The others are disabled and hidden by SL. So, there is something between SL, your mod and SLAL that doesn't start the cum shot in time. Btw, I tried Hybrid option before and again and the result is same. I can't send you papyrus log since I disabled it long time ago according to some gurus for Skyrim tweaks here on LL and Nexus.
Guest Posted February 20, 2019 Posted February 20, 2019 5 minutes ago, Elf Prince said: @Erstam -OK, here is the problem. I'm using SL 1.62 and all my animations are SLAL. Cum shot mod works perfectly on time in some animations, but it doesn't work on time in most. I'm using only 15 animations, the ones my wife likes. The others are disabled and hidden by SL. So, there is something between SL, your mod and SLAL that doesn't start the cum shot in time. Btw, I tried Hybrid option before and again and the result is same. I can't send you papyrus log since I disabled it long time ago according to some gurus for Skyrim tweaks here on LL and Nexus. Out of curiosity, are you in TFC during those cumshots?
Guest Posted February 20, 2019 Posted February 20, 2019 2 minutes ago, Hawk9969 said: Out of curiosity, are you in TFC during those cumshots? No, I set auto advanced stage in SL MCM and I don't even press space bar to go to next stage during the animation. But, the problem is the same in manual advance stage. So when animations starts I let them play till very end.
Guest Posted February 20, 2019 Posted February 20, 2019 6 minutes ago, Elf Prince said: No, I set auto advanced stage in SL MCM and I don't even press space bar to go to next stage during the animation. But, the problem is the same in manual advance stage. So when animations starts I let them play till very end. Try using manual cumshot with the hotkey and see if that is delayed too. If it's delayed, the problem is likely caused by script lag. In this case you could try increasing your papyrus update budget on Skyrim.ini: [Papyrus] fUpdateBudgetMS= I would not recommended going above 2 unless you've a newer high end GPU. For 60 FPS, your base time per frame is 16.67ms, at 2 your GPU has 14.67ms to render that frame (assuming your scripts use the whole budget time).
Erstam Posted February 20, 2019 Author Posted February 20, 2019 @Hawk9969 Now I can't follow your reasoning anymore. Quote If you had a cumshot that didn't remove itself, it will end itself at this evaluation. Are you talking about the theoretical possibility that the presence of CS2_ejaculating on an actor doesn't match the actual state of a cumshot object being equipped? This can only go out of sync if you're really spamming events, or have horrendous script lag. In every single instance where a cumshot object is equipped, removed, or unequipped, the StorageUtil variable is set or unset 1-2 lines next to it. Even in the unlikely event if that happens, using the hotkey on the actor outside of sex will rectify it.
Guest Posted February 20, 2019 Posted February 20, 2019 4 minutes ago, Erstam said: @Hawk9969 Now I can't follow your reasoning anymore. Are you talking about the theoretical possibility that the presence of CS2_ejaculating on an actor doesn't match the actual state of a cumshot object being equipped? This can only go out of sync if you're really spamming events, or have horrendous script lag. In every single instance where a cumshot object is equipped, removed, or unequipped, the StorageUtil variable is set or unset 1-2 lines next to it. Even in the unlikely event if that happens, using the hotkey on the actor outside of sex will rectify it. No. If If StorageUtil.HasFormValue(target, "CS2_ejaculating") evaluates true, the Else block will never be run, therefore, you won't call Ejaculate(). CS2_ejaculating is only unset by RemoveCumshot, which we don't want to call while the target is in a SexLab animation. If StorageUtil.HasFormValue(target, "CS2_ejaculating") If !isTargetInSLScene ; removing cumshots while in a SL scene causes redressing, let the animation end event handle that DebugMessage(target.GetLeveledActorBase().GetName() + ": Ejaculation stopped manually") RemoveCumshot(target) Return EndIf target.UnequipItem(StorageUtil.PluckFormValue(target, "CS2_ejaculating"), abPreventEquip = True, abSilent = True) EndIf DebugMessage(target.GetLeveledActorBase().GetName() + ": Ejaculation triggered manually") Ejaculate(target, autoRemove = !isTargetInSLScene) StorageUtil.SetFloatValue(target, "CS2_LastOrgasmTime", Utility.GetCurrentGameTime()) This should be the correct way. Unless I am missing something new you added to this version, because that was how it worked in 2.0.3 and from just my quick glance this doesn't seem to have changed.
Erstam Posted February 20, 2019 Author Posted February 20, 2019 RemoveCumshot is called by the CleanUpSL event handler in CS2SexLabScript. You won't want this to happen earlier, because of redressing.
Guest Posted February 20, 2019 Posted February 20, 2019 2 minutes ago, Erstam said: RemoveCumshot is called by the CleanUpSL event handler in CS2SexLabScript. You won't want this to happen earlier, because of redressing. Yes, but here we are not calling it, we are just unequipping and removing from CS2_ejaculating as to allow further Ejaculate calls to process. In fact you do the exactly same to the orgasm event handler: Form cumObject = StorageUtil.PluckFormValue(orgasmee, "CS2_ejaculating") If cumObject ; don't fully remove, it will cause NPCs to redress on second ejaculation during a scene orgasmee.UnequipItem(cumObject, abPreventEquip = True, abSilent = True) EndIf Main.Ejaculate(orgasmee) I am not sure why I am not being able to explain this out. You have only those two options, either the If StorageUtil.HasFormValue(target, "CS2_ejaculating") block, which does absolutely nothing if the target is in a SexLab animation, or the Else block, which does the Cumshot. If StorageUtil.HasFormValue(target, "CS2_ejaculating") will always evaluate true after the first in animation cumshot (both from animation and hotkey, as neither now calls RemoveCumshot()).
Erstam Posted February 20, 2019 Author Posted February 20, 2019 I think I understand now. Think this should work? Bool isTargetInSLScene = False If SexLabInstalled isTargetInSLScene = target.HasKeywordString("SexLabActive") EndIf If StorageUtil.HasFormValue(target, "CS2_ejaculating") DebugMessage(target.GetLeveledActorBase().GetName() + ": Ejaculation stopped manually") RemoveCumshot(target, unequipOnly = isTargetInSLScene) Else DebugMessage(target.GetLeveledActorBase().GetName() + ": Ejaculation triggered manually") Ejaculate(target, autoRemove = !isTargetInSLScene) StorageUtil.SetFloatValue(target, "CS2_LastOrgasmTime", Utility.GetCurrentGameTime()) EndIf and ; remove all possible cumshot armor objects that might have stacked up in the actor's inventory Function RemoveCumshot(Actor a, Bool unequipOnly = False) If unequipOnly Form cumObject = StorageUtil.PluckFormValue(a, "CS2_ejaculating") If cumObject ; don't fully remove, it will cause NPCs to redress on further ejaculations during a scene a.UnequipItem(cumObject, abPreventEquip = True, abSilent = True) EndIf Else a.RemoveItem(CS2UrethraAddons, 9999, True) ; a big heap of each item in this form list StorageUtil.UnsetFormValue(a, "CS2_ejaculating") EndIf If a == PlayerRef && Game.GetCameraState() == 3 ; TFC a.QueueNiNodeUpdate() ; fixes player geometry not updating in TFC mode If Config.maleBodyClass == 3 && a.GetActorBase().GetSex() == 0 ; QueueNiNodeUpdate() resets SAM body textures (SAM_Quest as SAM_QuestScript).UpdateActor(a, False, False, False, True, False, False) EndIf EndIf EndFunction Function RemoveCumshotLater(Actor a, Float time, Bool unequipOnly = False) Utility.Wait(time) If StorageUtil.HasFormValue(a, "CS2_ejaculating") ; check if it had already been removed in the meantime DebugMessage(a.GetLeveledActorBase().GetName() + ": Cumshot removed after " + time + " seconds", False) RemoveCumshot(a, unequipOnly) EndIf EndFunction PluckFormValue also unsets it.
Guest Posted February 20, 2019 Posted February 20, 2019 That works. It's the same approach I used, you just moved it to RemoveCumshot. Just one thing, do you think it's necessary to call QueueNiNodeUpdate() for that? During my testings I didn't notice any issues without it, but I don't use the drip myself.
Erstam Posted February 20, 2019 Author Posted February 20, 2019 If QueueNiNodeUpdate() doesn't have any negative side effects beside that SAM case, it's better to leave it in. There's always someone with some weird game settings or mods who might need it. I'll be testing the solution to death before I publish it. Update tomorrow.
Guest Posted February 20, 2019 Posted February 20, 2019 9 minutes ago, Erstam said: If QueueNiNodeUpdate() doesn't have any negative side effects beside that SAM case, it's better to leave it in. There's always someone with some weird game settings or mods who might need it. I'll be testing the solution to death before I publish it. Update tomorrow. By the way, since removing items from the player is redress safe, maybe this should work better? RemoveCumshot(target, unequipOnly = isTargetInSLScene && target != PlayerRef)
Erstam Posted February 20, 2019 Author Posted February 20, 2019 Ah yes, I actually noticed it after uploading 2.0.4, but then forgot about it in the haste of fixing the broken call into SexLabFramework.psc
Dredderson Posted February 21, 2019 Posted February 21, 2019 First of all, I love the new effects! I've been using this mod a lot and noticed one thing. When the Sexlab integration plugin is active, the specular maps of male PCs go nuts when they cum during a Sexlab animation, no matter if it's triggered via hotkey or a Sexlab event. I tried loose specular maps and Wetfunction Redux to apply specular maps, and both go haywire when the PC starts ejaculating. I observed that my argonian PC gets super shiny, whereas the specular maps on an Orc PC appear to get misaligned. NPCs don't appear to be affected by this. Using the hotkey while no sexlab animation is running creates no problems, either. EDIT: Ok, I didn't test this very well. The specular maps break on PCs when an ejaculation is triggered while in tfc mode. Sexlab has nothing to do with it. Don't know if that's a problem with Cumshot or something else entirely, then.
Erstam Posted February 21, 2019 Author Posted February 21, 2019 Updated to 2.0.5 - Fixed cases of premature redressing in Flower Girls as well - More fixes to hotkey ejaculation logic in SexLab animations It's crazy, when you go through the changelogs after v2.0, half of the fixes are for that "premature redressing syndrome" cropping up under various circumstances. Took a damn long time and many iterations, but I hope it's now fixed for good. And since I also want to do other things in the limited free time I have at my computer, I'm no longer taking requests. Unless a future SexLab or FG update breaks Cumshot's functionality, it's final now. If you have an idea for an improvement or a new feature, you can hang it above your bed and be happy looking at it. I mean it. ? @Dredderson Must be a mod conflict, probably with Wet Function Redux. I never had the problem, and no one else has reported it so far. Maybe it's the QueueNiNodeUpdate() function that has to be used when the player ejaculates in TFC mode - it also resets SAM body textures, might be a similar side effect. Try avoiding freecam then, or don't use WFR.
Dredderson Posted February 21, 2019 Posted February 21, 2019 17 minutes ago, Erstam said: @Dredderson Must be a mod conflict, probably with Wet Function Redux. I never had the problem, and no one else has reported it so far. Maybe it's the QueueNiNodeUpdate() function that has to be used when the player ejaculates in TFC mode - it also resets SAM body textures, might be a similar side effect. Try avoiding freecam then, or don't use WFR. I use SAM as well, so the QueuNiNodeUpdate() sounds reasonable. Gonna have to get creative, then ?
Guest Posted February 21, 2019 Posted February 21, 2019 Is it possible yet for this effect to apply on animals?
Erstam Posted February 21, 2019 Author Posted February 21, 2019 20 minutes ago, Reactem said: Is it possible yet for this effect to apply on animals? Sadly no; quoting myself from the v2.0 release post on the reasons why: Quote 1. To allow a cumshot object to be equipped on an actor, the race has to be added to its Armor Addon record. However, the CK always crashes when enabling more than 64 races for an Armor Addon. Don't push your luck trying to work around that limit in TES5Edit, it might make the game unstable. Since the humanoid NPC races already take a good chunk from these 64, it would have been just a few select creature races. 2. There's no consistent naming scheme for the skeleton nodes. The cumshot object needs to be attached to the pelvis node (if there are no schlong bones in the skeleton) to make it follow the actor's animation. However, that node is named differently for every major class of creatures. Cumshot already has 34 different equippable meshes (17 for SOS and 17 to be attached to the pelvis). Adding another 17 per creature class would be a nightmare. 3. This is what actually killed it: the most common way to have creatures with erect penises is through Creature Framework / More Nasty Critters / SexLab Nude Creatures. However, every time Cumshot tries to equip an ejaculation object on a creature, its "aroused armor" mesh gets unequipped and won't return afterward. This is weird, as cumshot objects only use armor slot 48, and none of the creature armors cover that slot. I haven't been able to find a solution for this.
Guest Posted February 22, 2019 Posted February 22, 2019 3 hours ago, Erstam said: Sadly no; quoting myself from the v2.0 release post on the reasons why: is it possible to maybe make an alternative version for creatures only? (and im not talking about draugr,dwemr, ect.) like for more main seen creatures like wolves,horses,giants,bears, ect?
Seijin8 Posted February 22, 2019 Posted February 22, 2019 4 hours ago, Reactem said: is it possible to maybe make an alternative version for creatures only? (and im not talking about draugr,dwemr, ect.) like for more main seen creatures like wolves,horses,giants,bears, ect? From 2: Adding another 17 per creature class would be a nightmare. I don't think that can much be clearer. Now, having said that, I always found it trying to equip to an armor slot to be odd. Similar effects can be gained through use of magic effect/artobject combinations, as many similar mods have done. I'm sure this comes with its own set of issues (it is the CK after all), but that method may make it more versatile for multiple species use. Just spitballing. Unlikely to be needed in the long run as many creature animators are already adding their own animobject effects for this purpose.
Guest Posted February 22, 2019 Posted February 22, 2019 @Erstam Did you have technical issues implementing actor collision for those drop objects or was it something else? EDIT: I was checking the code for your latest version, you forgot to add a PlayerRef evaluation. Ejaculate(target, autoRemove = !isTargetInSexScene || target == PlayerRef) If you don't add this, the player will have to press twice for every new cumshot after the first one.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now