lollllllllllnope Posted March 3, 2025 Posted March 3, 2025 Hello! Somewhat-experienced mod author and less-experienced coder here trying to get my first ever Sexlab mod off the ground. I've used two different helpful tutorials to help me write a script to start a Sexlab scene, but unfortunately I've gotten a bit stuck. The script is as follows: Scriptname CBTS_RapeSexLabScript extends Quest {Governs the SexLab integration, allowing the NPC named Keldarin to rape the player.} SexLabFramework Property SexLab Auto Actor Property Keldarin Auto Actor Property Player Auto ;I have triple-checked that the properties are correctly set to the Keldarin reference, the Player reference, and SexLabQuestFramework. Function StartKeldarinRape() ;The function where Keldarin rapes the player. debug.notification("Function called!") ;Create an actor array (Keldarin and the player) actor[] sexActors = new actor[2] sexActors[0] = Player sexActors[1] = Keldarin debug.notification("Actors picked!") ;Pick the animations sslBaseAnimation[] anims anims = SexLab.GetAnimationsByTag(2, "Rape", tagSuppress="BedOnly") debug.notification("Animations picked!") ;start sex sexlab.startsex(sexactors, anims, allowbed = false) debug.notification("Sexlab started!") EndFunction The function is called by a fragment at the end of a line of dialogue located within the same quest that the script is attached to. (I did it this way--rather than calling SexLab directly from the dialogue fragment--because I eventually plan to add many more quest dialogues, AND because I eventually also hope to add a register-for-event section to this script so that things can happen as soon as the SexLab scene is over.) When the line of dialogue is said in-game, the first few debug messages appear: "Function called", "Actors picked", and "Animations picked"). The final debug message never appears, however, and the SexLab scene never actually starts. Instead the NPCs continue doing their regular idle actions and dialogue indefinitely. The code compiles with no issues. I have confirmed that my quest has a lower priority (90) than the SexLabQuestFramework (99). I have confirmed that my installation of SexLab is complete and working correctly (other NSFW mods on the same test save file are working just fine). I've made certain the SexLab is a master to the mod I'm making. I've gone back over the tutorials a couple of times to see if there's anything I'm missing, and I can't find an issue... and yet, SexLab just refuses to play. Any suggestions?
Gristle Posted March 3, 2025 Posted March 3, 2025 Two suggestions: You should use "GetAnimationsByTags" and not "GetAnimationsByTag" - I know the latter is used in the video, but in the SexLabFramework file it's marked as "Deprecated". Are you sure you have at least one animation enabled with a "Rape" tag?
Seijin8 Posted March 3, 2025 Posted March 3, 2025 5 hours ago, lollllllllllnope said: Any suggestions? Would help to have a screenshot of the console logging for sexlab at this point. Papyrus output would also be useful. If it is an internal sexlab issue, there will be info there.
lollllllllllnope Posted March 4, 2025 Author Posted March 4, 2025 15 hours ago, Gristle said: Two suggestions: You should use "GetAnimationsByTags" and not "GetAnimationsByTag" - I know the latter is used in the video, but in the SexLabFramework file it's marked as "Deprecated". Are you sure you have at least one animation enabled with a "Rape" tag? Thanks. I've updated to GetAnimationsByTags; I didn't know about the SexLab Framework file but now that I've looked it up it explains a LOT about the animations tags that I didn't understand. (Also, turns out that ArrokRape does not actually have the tag "Rape". I'd just been assuming it did, because I'm a fucking idiot) The new script is as follows. I've now included multiple possible tags (to account for variability in author tagging/user setups) and set RequireAll to 0 so that it'll pick animations that fulfill any (not all) of them. Scriptname CBTS_RapeSexLabScript extends Quest {Governs the SexLab integration, allowing Keldarin to rape the player.} SexLabFramework Property SexLab Auto Actor Property Keldarin Auto Actor Property Player Auto Function StartKeldarinRape() ;The function where Keldarin rapes the player. debug.notification("Function called!") ;Create an actor array (Keldarin and the player) actor[] sexActors = new actor[2] sexActors[0] = Player sexActors[1] = Keldarin debug.notification("Actors picked!") ;Pick the animations sslBaseAnimation[] anims anims = SexLab.GetAnimationsByTags(2, "AggressiveDefault,Aggressive,Forced,Rape,Rough", tagSuppress="BedOnly", RequireAll=0) debug.notification("Animations picked!") ;start sex sexlab.startsex(sexactors, anims, allowbed = false) debug.notification("Sexlab started!") EndFunction The new script still isn't working, but I feel like you've helped me head off some problems before I even realized they were problems, so thanks for the tips lol I'll work on getting the screenshots and papyrus logs uploaded!
lollllllllllnope Posted March 4, 2025 Author Posted March 4, 2025 What the actual fuck lol Turns out that the act itself of opening the console triggers the scene to start and then it plays just fine If you don't open the console, the NPC will just idle forever, but as soon as you do, it triggers the "Sexlab started!" notification, and then once you close the console, the stripping, animations, etc. etc. do all start playing I have no earthly idea why this is happening, but here are screenshots and a couple of Papyrus logs (one where the console was not opened and the animation never played, and one where both happened.) Papyrus.0 (Console opened and animation began playing).log Papyrus.3(Console not opened, Animation Never Played).log
lollllllllllnope Posted March 5, 2025 Author Posted March 5, 2025 Resolution: After a bunch of Googling, I couldn't find a cause other than "Sexlab just does that sometimes", and I couldn't find a solution other than "Open the console or the menu to pause the game engine temporarily". Because I didn't want to tell the users that they have to open the console every time they want to see the scene play, my workaround was to force the menu open in a somewhat-immersive (or at least less-annoying and more idiot-proof) way: I stuck debug.messagebox("Keldarin begins undressing.") into the middle of the script, right before making the startsex call. So far it's been running smoothly, and hopefully the workaround isn't TOO annoying.
Seijin8 Posted March 5, 2025 Posted March 5, 2025 On 3/3/2025 at 4:03 PM, lollllllllllnope said: AggressiveDefault Glad you got it working. Just FYI, the "AggressiveDefault" tag tells Sexlab to add this animation to the list of aggressive animations. The tag itself generally isn't used otherwise and almost by definition, "aggressive" should get you the same result. Regarding other tags: "Rough" gets added to lots of animations that aren't necessarily "rape" based. Just browsing through Babo/Baka's SLAL pack, the following tags are included as possible alternatives for search: "Conquering", "Defeated", "Faint" (I assume that means weakened or somthing similar), "Resist" In general, "Aggressive", "Forced" and "Rape" should be enough to find what you want. The rest are always alongside at least one of those.
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