Jump to content

Random Sex NG for SexLab


Recommended Posts

Posted

@Arizona_Steve

 

Just a quick 'heads up'

 

If you have 2 enemies lying paralysed, eg by having used something like the Silencer Bow & Arrows from a mod like 'Non-Hostile Weapons for Kind Guys-87714-1-1' (which unfortunately seems to have been removed from NexusMods), Random Sex NG can still manage to call both to participate in a scene which it generates. 

 

Obviously, 'sleeping sex' may actually be a thing, but it's a bit weird in this context, when you've just done everything you can to knock out the participants.  LOL.  And when the scene ends, it can leave the NPCs doing the moonwalking thing ( a Skyrim NPC weirdness which no one has ever managed to find a way of totally preventing ?)

 

I'm not sure if ...

 

1 - you can check NPC status before firing them into the scene to prevent this

2 - it's even worth the effort, and maybe processing time, which might result

 

... .but I thought I'd just mention it though, so as you know - if you don't already :smile:

 

Not at all a complaint, as in all other respects, the mod's played absolutely fine - at least, for me - so thanks for your efforts!

 

DQW

Posted

I have this installed in my game and if I try to adjust penis position with pageup or pagedown then after the animation is over the person that engaged me will be following me forever, and I couldn't find a way to make them stop. also, I'd like to see them ignore players that are doing stuff, ie. chopping wood, smelting stuff and smithing things ect. 

Posted

Since "upgrading" to this version I've been rather disappointed with it.

 

First of all, I can't change the settings per save game. I play both male and female characters and want different settings for each, but this version doesn't allow that. 

 

Second, because of your work around, it is often putting my male character in the female position in animations when it has absolutely no reason to do so. I have strap-on use turned off, and yet it still often switches the male and female roles. Even worse, this is triggering a "sex change" that is detected by other mods which adds my male character to the tracking in Fertility Mode, and I can't remove it without resetting the entire tracking list; VERY ANNOYING. Not even forcing sexlab to switch positions prevents this once the animation has started. I'm having to restart from my last save every time this mod messes up the roles which is far too often. The sex changing needs to be removed. This is not labeled as a rape mod, aggressor/victim should not even matter. If anything, it should be an optional checkbox in the settings. Setting it to consensual only removes far too many animations from the list, and still doesn't seem to prevent it switching roles, such as when it picks a mff animation for two males and one female. Something that shouldn't even happen anyway.

 

And lastly, why does it disable changing the sex scene selected? That is annoying as well.

Posted
On 2/17/2023 at 8:07 AM, Nossoloke said:

Since "upgrading" to this version I've been rather disappointed with it.

 

First of all, I can't change the settings per save game. I play both male and female characters and want different settings for each, but this version doesn't allow that. 

 

Second, because of your work around, it is often putting my male character in the female position in animations when it has absolutely no reason to do so. I have strap-on use turned off, and yet it still often switches the male and female roles. Even worse, this is triggering a "sex change" that is detected by other mods which adds my male character to the tracking in Fertility Mode, and I can't remove it without resetting the entire tracking list; VERY ANNOYING. Not even forcing sexlab to switch positions prevents this once the animation has started. I'm having to restart from my last save every time this mod messes up the roles which is far too often. The sex changing needs to be removed. This is not labeled as a rape mod, aggressor/victim should not even matter. If anything, it should be an optional checkbox in the settings. Setting it to consensual only removes far too many animations from the list, and still doesn't seem to prevent it switching roles, such as when it picks a mff animation for two males and one female. Something that shouldn't even happen anyway.

 

And lastly, why does it disable changing the sex scene selected? That is annoying as well.

 

The settings thing is a double-edged sword. Me on the other hand welcome settings that are not stored in the savegame. Saves me the trouble of automating it myself. For you I'd recommend considering MO2's profile system. One character per profile allows you to also have one of these settings file per character. Vortex may have a similar system.

 

As for the rest of it, gender swaps, disabled/missing animations and no bed use: I made a quick change to one function and so far it has fixed all of these issues. Performance went to shit though, especially if you set the cooldown to 10 seconds and disable arousal checks, ie. you can't have the entire population of Whiterun going down on eachother with this change. For me that doesn't matter, it's not how I play anyways. Also, I have not tested these changes enough to see if I broke something else in the process.

 

rndsexactivityquest.psc:108 Replace the startSexlab method with this:

 

bool function startSexlab(Actor[] npcArray, int victimIndex, Alias animationAlias)
    SSLThreadModel thread = sexlab.newThread()

    if (thread)
        ;SSLBaseAnimation animation = animationAlias as SSLBaseAnimation
        ;SSLBaseAnimation[] animationArray = new SSLBaseAnimation[1]
        ;animationArray[0] = animation
        ;thread.setForcedAnimations(animationArray)
        ;setSexlabGenders(thread, npcArray, animation)
        victimIndexArray[thread.tid] = victimIndex
        
        ;if (thread.addActors(npcArray, none))
        
        int i = 0
        
        While (i < npcArray.Length)
            thread.AddActor(npcArray[i], i == victimIndex)
            i += 1
        EndWhile
        
        ;endif
        
        ;setActorStripOverrides(thread, npcArray, animation)
        ;thread.disableBedUse(true)
        
        If (!thread.CenterOnBed(true))
            thread.CenterOnObject(npcArray[0])
        EndIf
        
        thread.setHook("RndSex")
        return thread.startThread() != none

        ;resetActorGenders(npcArray)
        ;thread.initialize()
    endif

    return false
endfunction

 

As for @Arizona_Steve, if you want to use (part of) this, feel free to do so with or without credit. If you want me to remove it because I made a big boo-boo, let me know.

Posted

You have effectively neutralized the Random Sex evaluation code. Firstly, by removing the setForcedAnimation() call, you are instructing SexLab to plough through its list of animations and locate one or more animations that match the actor list - this is a massive performance killer as it's written entirely in Papyrus. SexLab also forcibly sorts the actors by gender, which is why you don't notice any other issues.

 

A few things to note here:

  • Random Sex takes the list of available participants and selects a matching animation. This code is written in C++ and is many, many times faster than SexLab's animation sorting algorithm. It is much smarter than SexLab's animation algorithm, allowing for participants to be reversed. An example would be a female having strapon anal sex with a male. Using the SexLab animation filter removes these possibilities, due to the actor sorting.
  • The remaining commented out code is there to override the actor sorting by temporarily assigning the animation position gender to each NPC where necessary. This is the magic that allows the aforementioned example of a female having strapon anal sex with a male.

I appreciate the effort, but I like my female followers to be demanding and domineering ?

Posted (edited)

Yes I am aware of all this. I would however recommend you implement the bed check, and since you're already filtering animations, an option for including all matching animations. I assume what it is doing now is filtering animations, then returning one from that filtered list. Returnin all would allow players the best of both worlds - speed and the option to choose.

 

The actor gender thing I can't comment on, I haven't looked into it. I removed that because it wasn't a thing that specifically interested me, and I was afraid my character would sprout a dick if SOS ever caught wind of some gender swapping going on. I noticed SL Solutions picked up on it.

 

Oh and this mod lacks the ability to make animations consensual if I'm not mistaken. Consensual animations can be included, sure, but animations are still considered hostile - something my mods react to. Adding "victimIndex = -1" on the line before or after "int i = 0" in my edit allows for this. Also something that you could wire up to the MCM relatively easily - again, giving more options for the player with little effort.

 

Edit: Note, I didn't read the previous posts in this thread. I'm assuming someone already requested animation selection etc etc. I'm not expecting a response here. This is not a challenge, not a "look I'm better than you". Just my thoughts, just me bending this to fit my own ideas. Just sharing. Throwing ideas at the wall to see if it sticks. That sort of thing.

Edited by traison
Posted

No worries, if you have the skills (and I suspect you have) feel free to change things to your liking. There's a reason I link my C++ source code in the original post and include the Papyrus source in my distribution - among other things it gives the veteran C++ programmers here something to laugh at ?.

Posted
On 2/19/2023 at 1:25 PM, Arizona_Steve said:

I appreciate the effort, but I like my female followers to be demanding and domineering ?

 

That's your preference, and that's fine, but I can't stand all the clipping and odd animations (cupping non-existent breasts, rubbing through the guy's cock ect.) that comes with placing the genders in the opposite roles in animation not made for it. I originally went with this mod because it was simple; put together random couples/groups and trigger a sexlab scene. But now I can't switch what scene is selected, in case it picks one that doesn't fit the location, and I can't have half my animations included on a male character or it triggers a sex change messing up other mods, which still sometimes happens even with all "Aggressive" animations disabled. All because of the work around you added to fit your preferences. Not even disabling strap-on use in Sexlab prevents your mod from switching them. Sexlab has those settings for a reason, you should be working with them, not trying to bypass them.

Posted
On 2/19/2023 at 8:25 PM, Arizona_Steve said:

 

  • Random Sex takes the list of available participants and selects a matching animation. This code is written in C++ and is many, many times faster than SexLab's animation sorting algorithm. It is much smarter than SexLab's animation algorithm, allowing for participants to be reversed. An example would be a female having strapon anal sex with a male. Using the SexLab animation filter removes these possibilities, due to the actor sorting.
  • The remaining commented out code is there to override the actor sorting by temporarily assigning the animation position gender to each NPC where necessary. This is the magic that allows the aforementioned example of a female having strapon anal sex with a male.

 

 

I appreciate the effort, but I like my female followers to be demanding and domineering ?

 

Is there any way at all, please, that you can write anything into the code that would allow the player to indicate/select in the MCM that they do NOT want that?  So that we can have the OPTION to have female followers which are NOT demanding and domineering?  

 

This is probably THE best mod of its kind in speed of operation, and basic 'fire up and forget' capabilitiy, and I won't risk breraking my current game by removing it, but the non optional chance of F/M action is the one thing that would stop me putting it into future games.  The resultant weirdness that I can encounter in my present PAHE playthrough is a real downer wrt to my basic gameplay

 

So, if it's not a huge task requiring a lot of time, please? :smile:  Obviously, if it is, don't worry.  Life's too short to do everything ?

 

DQW

Posted
13 hours ago, DonQuiWho said:

 

Is there any way at all, please, that you can write anything into the code that would allow the player to indicate/select in the MCM that they do NOT want that?  So that we can have the OPTION to have female followers which are NOT demanding and domineering?  

 

This is probably THE best mod of its kind in speed of operation, and basic 'fire up and forget' capabilitiy, and I won't risk breraking my current game by removing it, but the non optional chance of F/M action is the one thing that would stop me putting it into future games.  The resultant weirdness that I can encounter in my present PAHE playthrough is a real downer wrt to my basic gameplay

 

So, if it's not a huge task requiring a lot of time, please? :smile:  Obviously, if it is, don't worry.  Life's too short to do everything ?

 

DQW

 

I'll have to think about the logistics of this before I implement anything first. It's not as simple as it sounds.

Posted
25 minutes ago, Arizona_Steve said:

 

I'll have to think about the logistics of this before I implement anything first. It's not as simple as it sounds.

 

I thought that might be the case.  If it were simple, you'd have done it at the outset :smile:

 

As ppl are saying, it's your mod.  It does what you and a lot of others want, and you've no real obligation to anyone else to pander to our tastes.  No one is going to think any the less of you if you leave it as is.  Well, I won't, anyway  ? LOL

 

DQW

Posted
On 2/19/2023 at 10:35 PM, traison said:

 

The settings thing is a double-edged sword. Me on the other hand welcome settings that are not stored in the savegame. Saves me the trouble of automating it myself. For you I'd recommend considering MO2's profile system. One character per profile allows you to also have one of these settings file per character. Vortex may have a similar system.

 

As for the rest of it, gender swaps, disabled/missing animations and no bed use: I made a quick change to one function and so far it has fixed all of these issues. Performance went to shit though, especially if you set the cooldown to 10 seconds and disable arousal checks, ie. you can't have the entire population of Whiterun going down on eachother with this change. For me that doesn't matter, it's not how I play anyways. Also, I have not tested these changes enough to see if I broke something else in the process.

 

rndsexactivityquest.psc:108 Replace the startSexlab method with this:

 

bool function startSexlab(Actor[] npcArray, int victimIndex, Alias animationAlias)
    SSLThreadModel thread = sexlab.newThread()

    if (thread)
        ;SSLBaseAnimation animation = animationAlias as SSLBaseAnimation
        ;SSLBaseAnimation[] animationArray = new SSLBaseAnimation[1]
        ;animationArray[0] = animation
        ;thread.setForcedAnimations(animationArray)
        ;setSexlabGenders(thread, npcArray, animation)
        victimIndexArray[thread.tid] = victimIndex
        
        ;if (thread.addActors(npcArray, none))
        
        int i = 0
        
        While (i < npcArray.Length)
            thread.AddActor(npcArray[i], i == victimIndex)
            i += 1
        EndWhile
        
        ;endif
        
        ;setActorStripOverrides(thread, npcArray, animation)
        ;thread.disableBedUse(true)
        
        If (!thread.CenterOnBed(true))
            thread.CenterOnObject(npcArray[0])
        EndIf
        
        thread.setHook("RndSex")
        return thread.startThread() != none

        ;resetActorGenders(npcArray)
        ;thread.initialize()
    endif

    return false
endfunction

 

As for @Arizona_Steve, if you want to use (part of) this, feel free to do so with or without credit. If you want me to remove it because I made a big boo-boo, let me know.

 

Any chance of a precompiled version of this? Getting scripts to compile remains one of the biggest bugbears I've ever had with CK.

Posted (edited)
On 2/22/2023 at 12:08 PM, BreezeIndigo said:

 

Any chance of a precompiled version of this? Getting scripts to compile remains one of the biggest bugbears I've ever had with CK.

 

As long as the mod author does not mind it. Otherwise I remove it.

 

This is with:

  1. Non-restricted animation list - changing animations is enabled. Tanks performance.
  2. No gender swapping.
  3. Animations no longer considered non-consensual. Whether consensual animations are enabled or not is different.
  4. Disabled call to setActorStripOverrides without inspecting what it does. I just went by the name - I'd rather have SL do the stripping. Maybe that's not what it was intended for.
  5. Enabled bed use. Side-effect may be that some npcs teleport away if a bed is nearby, not tested enough.

And just to make sure it's clear: Do not complain to the mod author if this does not work or breaks something - now or in the future.

 

Edit: See my post on the following page of this thread for a version of this with fixed bed prompts and (potentially) restored performance with minor drawbacks.

 

rnd_alt_without_typos.7z

Edited by traison
Posted
1 hour ago, traison said:

As long as the mod author does not mind it. Otherwise I remove it.

 

I'm good with this.

 

One thing that can be done is to uncheck the "Use Strapons" checkbox in SexLab. While this will affect all SexLab mods, this particular flag is taken into account by Random Sex and will prevent male positions from being substituted with strapon-wielding females.

 

When I get time I may add a post-filter to pull in all animations that are appropriate for the selected participant list and pass it as an array into SexLab. This should restore the ability to cycle through relevant animations while maintaining the advantage of my C++ implementation.

 

On another note, I do filter out animations marked as "BedOnly", so there's that too. But if you're using traison's code it uses SexLab to figure out the animations so that shouldn't be an issue there.

Posted

I don't know why, Nothing happens even though MCM has activated random sex. Can anyone give me a hint on why this is happening?

Posted (edited)
19 hours ago, traison said:

 

As long as the mod author does not mind it. Otherwise I remove it.

 

This is with:

  1. Non-restricted animation list - changing animations is enabled. Tanks performance.
  2. No gender swapping.
  3. Animations no longer considered non-consensual. Whether consensual animations are enabled or not is different.
  4. Disabled call to setActorStripOverrides without inspecting what it does. I just went by the name - I'd rather have SL do the stripping. Maybe that's not what it was intended for.
  5. Enabled bed use. Side-effect may be that some npcs teleport away if a bed is nearby, not tested enough.

And just to make sure it's clear: Do not complain to the mod author if this does not work or breaks something - now or in the future.

rnd_alt.7z 5.56 kB · 2 downloads

 

To be honest, I'm getting a bug with creature anims where the female NPC plays the wrong animation while the male creature plays no animations. I was hoping this change would fix that too. I'll see how it goes.

 

How bad is the performance hit if you're really only playing one animation at a time?

Edited by BreezeIndigo
Posted
11 minutes ago, BreezeIndigo said:

How bad is the performance hit if you're really only playing one animation at a time?

 

No worse than what it would be if you started it with matchmaker. If random sex is the only mod you're using (unlikely) the papyrus engine may even be able to keep up with the entire whiterun population banging eachother, who knows. Mine died with the few characters that are in bannered mare, but then again, I'm already pushing the limits as it is.

 

And unless that  wrong animation issue you're having is specific to random sex, this will not fix that. That sounds more like a nemesis issue; or the bug where sometimes the creature glitches back to its idle animation during the first stage of an animation. For the latter issue, just skip to stage 3, then revert back to stage 2.

Posted
21 hours ago, traison said:

 

As long as the mod author does not mind it. Otherwise I remove it.

 

This is with:

  1. Non-restricted animation list - changing animations is enabled. Tanks performance.
  2. No gender swapping.
  3. Animations no longer considered non-consensual. Whether consensual animations are enabled or not is different.
  4. Disabled call to setActorStripOverrides without inspecting what it does. I just went by the name - I'd rather have SL do the stripping. Maybe that's not what it was intended for.
  5. Enabled bed use. Side-effect may be that some npcs teleport away if a bed is nearby, not tested enough.

And just to make sure it's clear: Do not complain to the mod author if this does not work or breaks something - now or in the future.

rnd_alt.7z 5.56 kB · 3 downloads

 

Is the folder name in this file wrong?  Or is that whats in the original being patched?

 

TIA for any help

 

DQW

Posted
55 minutes ago, traison said:

 

No worse than what it would be if you started it with matchmaker. If random sex is the only mod you're using (unlikely) the papyrus engine may even be able to keep up with the entire whiterun population banging eachother, who knows. Mine died with the few characters that are in bannered mare, but then again, I'm already pushing the limits as it is.

 

And unless that  wrong animation issue you're having is specific to random sex, this will not fix that. That sounds more like a nemesis issue; or the bug where sometimes the creature glitches back to its idle animation during the first stage of an animation. For the latter issue, just skip to stage 3, then revert back to stage 2.

 

I'm pretty sure it's related to RandomSexNG since Matchmaker plays the animations just fine. I only see animations going weird when RS triggers them. Mind you, it doesn't look like this script change fixes it, so it might be a different bug.

Posted
21 minutes ago, DonQuiWho said:

Is the folder name in this file wrong?

 

Yes it is. I already fixed that once, not sure what happened there. I removed the old download and uploaded again.

 

19 minutes ago, BreezeIndigo said:

Mind you, it doesn't look like this script change fixes it, so it might be a different bug.

 

Spelling is difficult as it turns out. The script folder name was wrong, download and test again.

Posted
3 hours ago, traison said:

 

Yes it is. I already fixed that once, not sure what happened there. I removed the old download and uploaded again.

 

 

 

 

Thanks

 

DQW

Posted
23 hours ago, traison said:

 

Yes it is. I already fixed that once, not sure what happened there. I removed the old download and uploaded again.

 

 

Spelling is difficult as it turns out. The script folder name was wrong, download and test again.

 

I don't think that's the problem, sadly. I'd copied the script files directly to the right folder the first time. Oh well.

Posted
On 2/23/2023 at 11:11 AM, traison said:

 

Yes it is. I already fixed that once, not sure what happened there. I removed the old download and uploaded again.

 

 

Spelling is difficult as it turns out. The script folder name was wrong, download and test again.

 

Haven't tried it extensively, or systematically, but seems to work.  My machine isn't too much of a potato, and I don't overdo the scheduled action, so I can't really comment on actual performance issues

 

But thanks anyway.  Just miss the ability to filter out non aggressive anims, but it's a small price to pay for everything being 'right way up' ?

 

DQW

  • 4 weeks later...

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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