Jump to content

More variety with animations played?


Recommended Posts

I have 500 sex animations installed and all of them are registered as "aggressive".

But when mods start animations, I always get like the same few dozens... 

I am using SexLab Tools and when I open the Animation Selector with the "H" standard hotkey I always see the same bunch of animations to select. 
For example I have Leito Anims installed and toggled as aggressive, but they are never played by sexlab or can be selected in sexlab tools. 

I have to change the anim tag manually first to see them. 

This is quite annoying because its a tedious process :(

My question:
Is there a way to change that? Or an easier way to change the animations played? It has to work with the "aggressive" general tag because that is what most mods use... 

Subquestions:

why is Sexlab Tools only showing a set number of anims to select? I remember something about an engine restriction? 
And why is it selecting the same ones always and not a random number? And could it be changed somehow to be more random? 

Link to comment

How many animations is SexLab Tools showing?

 

SexLab is limited to a maximum of 125 animations and the random algorithm for removing the extra ones is pretty bad, just like the one for selecting random voices.

If you add an animation by inputing its full name via SexLab Tools, there is also a SexLab enforced limit of 128 animations, so you would need to clean the animation list first with SexLab Tools by inputing a tag that doesn't have that many animations and then adding the one you want by name.

 

As for fixing it, you can either fix the function GetList in sslAnimationSlots and recompile a core SexLab script, or create a new mod that will rebuild the animation list for the scene upon "HookAnimationStart".

Mind you, this problem is only present if the scene has more than 125 valid animations for this type of scene. Better tag filtering would solve this issue without any new mods or script changes.

Link to comment
9 hours ago, Hawk9969 said:

How many animations is SexLab Tools showing?

 

SexLab is limited to a maximum of 125 animations and the random algorithm for removing the extra ones is pretty bad, just like the one for selecting random voices.

If you add an animation by inputing its full name via SexLab Tools, there is also a SexLab enforced limit of 128 animations, so you would need to clean the animation list first with SexLab Tools by inputing a tag that doesn't have that many animations and then adding the one you want by name.

 

yeah, about 125 should be the count. I counted it long ago but cant remember exactly. 

 

9 hours ago, Hawk9969 said:

As for fixing it, you can either fix the function GetList in sslAnimationSlots and recompile a core SexLab script, or create a new mod that will rebuild the animation list for the scene upon "HookAnimationStart".

 

Hmm, that sounds like a Job for the inglorious Sexlabfixer :D  @osmelmc ???

 

9 hours ago, Hawk9969 said:

Mind you, this problem is only present if the scene has more than 125 valid animations for this type of scene. Better tag filtering would solve this issue without any new mods or script changes.

yeah, but as I understand it, it would require the mods that start the scenes to change their tags, so the problem is just elsewhere now. 
I am testing it with Prison Overhaul at the moment where there is a lot of sex but I can change the tags. 

I think in Defeat the tags can also be manipulated, but thats it. The most other mods I think only differentiate between consensual and non-consensual.

 

Wasnt there a mod that allows some "pre-scene-start" selection? Time to dig some more maybe. 
This is really annoying since it is basically issuing a hard limit of useable animations to the game... in a  time where it seems 750 anims for sexlab and 26k in FNIS is finally doable :(

 

 

Link to comment
1 hour ago, Nymra said:

This is really annoying since it is basically issuing a hard limit of useable animations to the game... in a  time where it seems 750 anims for sexlab and 26k in FNIS is finally doable :(

Skyrim LE is a 32-bits program and as such, limited to 2 GB of addressable random access memory by Windows. I am pretty sure Skyrim LE was not compiled with /LARGEADDRESSAWARE, which would've raised this limit to 4 GB.

If SexLab was to create a new 500+ length array for each thread (scene), it would be wasting a significant amount of RAM.

Assuming each object in the array is taken as a 32-bits (4 bytes) pointer, an array with 500 of them would total to about 2 KB just for the storage portion of it. While it may seem small, remember that a lot of data needs to be in the RAM (more so if you've lots of mods running). At 5 scenes running at the same time, you would be using around 10 KB just for storing the valid animations for the scenes.

While in SSE you've access to a much bigger address space, constant dynamic allocation and deallocation for these arrays may also cause memory fragmentation aswell as a Papyrus performance hit.

Link to comment
36 minutes ago, Hawk9969 said:

Skyrim LE is a 32-bits program and as such, limited to 2 GB of addressable random access memory by Windows. I am pretty sure Skyrim LE was not compiled with /LARGEADDRESSAWARE, which would've raised this limit to 4 GB.

If SexLab was to create a new 500+ length array for each thread (scene), it would be wasting a significant amount of RAM.

Assuming each object in the array is taken as a 32-bits (4 bytes) pointer, an array with 500 of them would total to about 2 KB just for the storage portion of it. While it may seem small, remember that a lot of data needs to be in the RAM (more so if you've lots of mods running). At 5 scenes running at the same time, you would be using around 10 KB just for storing the valid animations for the scenes.

While in SSE you've access to a much bigger address space, constant dynamic allocation and deallocation for these arrays may also cause memory fragmentation aswell as a Papyrus performance hit.

well, would it not be possible to do some kind of "two step" process?

Sexlab is called for Scene with "Aggressive" Tag. Sexlab then chooses a subtag at random (from all animations that also have aggressive tag), say "doggy" or "cowgirl" and then selects the animation to be played. 

In other words, since most mods do not allow user side tag editing, maybe a functin in Sexlab or Sexlab Tools could easily fix that for ALL mods? 

Even a Hotkey for "Sexlab Tools" to allow a really random process to start DURING a sexlab scene to change it to another scene would be awesome. 
 

What kills everything is that at the moment you have to go into MCM or open pop ups and write stuff. Its really not very user friendly or immersive :(

I m not even sure if the random animation switch of Apropos2 is able to call another than the 125 listet animations. 

Link to comment

If you are okay with the 125 limit, why not just fix the random algorithm in GetList?

 

Here, I'll even give it to you pro bono:

sslBaseAnimation[] function GetList(bool[] Valid)
    sslBaseAnimation[] anims

    int animCount = CountBool(Valid, true)

    if animCount < 1
        return anims
    endIf

    int[] animIdxs = Utility.CreateIntArray(animCount)

    int i = 0
    int j = 0

    while i < Valid.Length
        if Valid[i]
            animIdxs[j] = i
            j += 1
        endIf

        i += 1
    endWhile

    if animCount > 125
        i = 0

        while i < animCount
            j = Utility.RandomInt(0, animCount - 1)

            int a = animIdxs[i]
            int b = animIdxs[j]

            animIdxs[i] = b
            animIdxs[j] = a

            i += 1
        endWhile

        animCount = 125
    endIf

    anims = sslUtility.AnimationArray(animCount)

    i = 0

    while i < animCount
        int animIdx = animIdxs[i]
        anims[i] = Objects[animIdx] as sslBaseAnimation

        i += 1
    endWhile
    
    return anims
endFunction

Simply replace the GetList function in sslAnimationSlots.psc with this one and recompile.

Use something like this if you're using MO2 (download version 3.0.0 as I couldn't get version 4 to work for me).

  1. Copy and paste scripts/source/sslAnimationSlots.psc into your <MO2 overwrite>/scripts/source.
  2. Edit the copied file as instructed above.
  3. Make your overwrite folder into a new mod and place it below SexLab (overwriting SexLab).
  4. Unpack Papyrus Compiler App somewhere outside MO2's virtual file system.
  5. Set it on MO2 as an executable (Papyrus Compiler App.exe) and set "Start In" to your Skyrim installation directory (steamapps/common/Skyrim).
  6. Launch Papyrus Compiler App through MO2.
  7. Set your Skyrim info into the Preference tab. Import folder should be <Skyrim>/data/scripts/source. Output should be a new folder outside MO2's file system.
  8. Go to the Group tab and click the + button.
  9. Write a name for the group and write sslAnimationSlots.psc for scripts, press enter or comma and click the save button.
  10. Go to the Compile tab, select the group above and click the "Play" button.
  11. Once finished, your pex file will be in the configured Output folder. Just place it in the scripts (not scripts/source) folder of the newly created mod above.

If done correctly, the new mod should be overwriting 2 files from SexLab, scripts/sslAnimationSlots.pex and scripts/source/sslAnimationSlots.psc.

 

P.S. The hard limit on those arrays are 128 because the "new" statement in Papyrus only supports arrays up to 128 elements.

 

EDIT:

 

Ops, the previous code didn't work. Fixed it.

Link to comment
3 hours ago, Hawk9969 said:

If you are okay with the 125 limit, why not just fix the random algorithm in GetList?

 

Here, I'll even give it to you pro bono:


sslBaseAnimation[] function GetList(bool[] Valid)
    sslBaseAnimation[] anims

    int animCount = CountBool(Valid, true)

    if animCount < 1
        return anims
    endIf

    int[] animIdxs = Utility.CreateIntArray(animCount)

    int i = 0
    int j = 0

    while i < Valid.Length
        if Valid[i]
            animIdxs[j] = i
            j += 1
        endIf

        i += 1
    endWhile

    if animCount > 125
        i = 0

        while i < animCount
            j = Utility.RandomInt(0, animCount - 1)

            int a = animIdxs[i]
            int b = animIdxs[j]

            animIdxs[i] = b
            animIdxs[j] = a

            i += 1
        endWhile

        animCount = 125
    endIf

    anims = sslUtility.AnimationArray(animCount)

    i = 0

    while i < animCount
        int animIdx = animIdxs[i]
        anims[i] = Objects[animIdx] as sslBaseAnimation

        i += 1
    endWhile
    
    return anims
endFunction

Simply replace the GetList function in sslAnimationSlots.psc with this one and recompile.

Use something like this if you're using MO2 (download version 3.0.0 as I couldn't get version 4 to work for me).

  1. Copy and paste scripts/source/sslAnimationSlots.psc into your <MO2 overwrite>/scripts/source.
  2. Edit the copied file as instructed above.
  3. Make your overwrite folder into a new mod and place it below SexLab (overwriting SexLab).
  4. Unpack Papyrus Compiler App somewhere outside MO2's virtual file system.
  5. Set it on MO2 as an executable (Papyrus Compiler App.exe) and set "Start In" to your Skyrim installation directory (steamapps/common/Skyrim).
  6. Launch Papyrus Compiler App through MO2.
  7. Set your Skyrim info into the Preference tab. Import folder should be <Skyrim>/data/scripts/source. Output should be a new folder outside MO2's file system.
  8. Go to the Group tab and click the + button.
  9. Write a name for the group and write sslAnimationSlots.psc for scripts, press enter or comma and click the save button.
  10. Go to the Compile tab, select the group above and click the "Play" button.
  11. Once finished, your pex file will be in the configured Output folder. Just place it in the scripts (not scripts/source) folder of the newly created mod above.

If done correctly, the new mod should be overwriting 2 files from SexLab, scripts/sslAnimationSlots.pex and scripts/source/sslAnimationSlots.psc.

 

P.S. The hard limit on those arrays are 128 because the "new" statement in Papyrus only supports arrays up to 128 elements.

 

EDIT:

 

Ops, the previous code didn't work. Fixed it.

Osmel Sexlab Tweaks use the same file. I will try it with his then I guess. 
Lets see if I can get this done, my last adventure with compiling went sideways :(

Thank you for the code and the detailed instructions! I will report back :D

Link to comment

Just dumped TESV.exe headers with dumpbin and it DOES have the LARGEADDRESSAWARE flag set.

Dump of file TESV.exe

PE signature found

File Type: EXECUTABLE IMAGE

FILE HEADER VALUES
             14C machine (x86)
               6 number of sections
        51437CE5 time date stamp Fri Mar 15 16:56:21 2013
               0 file pointer to symbol table
               0 number of symbols
              E0 size of optional header
             122 characteristics
                   Executable
                   Application can handle large (>2GB) addresses
                   32 bit word machine

In theory, Skyrim LE could use up to 4 GB of RAM (between the stack and the heap), but I am not sure whether the engine has ad hoc limitations to 2 GB or not.

In the other hand, I am pretty sure Crash Fixes' allocator can use all those 4 GB in a 64-bits machine.

Quote

Info: Completely disable Skyrim's memory allocator and use regular C malloc.

 

Link to comment
  • 1 month later...

Try this: 

The problem I kept running into was the SexLab caching system, once it decided "These are the valid animations for this", it would always use those animations. The hack pretty much just disables caching, as well as the default animations because they are meh.

Link to comment
On 1/23/2020 at 1:03 AM, CodeNinja said:

Try this: 

The problem I kept running into was the SexLab caching system, once it decided "These are the valid animations for this", it would always use those animations. The hack pretty much just disables caching, as well as the default animations because they are meh.

Osmels latest version of Sexlab Utility fixes this  problem by making Sexlab choose animations more random. Works perfect for me. 
Some of the default animations are nice. I have a modified SL install somewhere where I just deleted the HKX files for the basic animations that I did not like.
Some mods call them and refuse to use any other animation. So I went back to have them installed *sigh
 

 

Link to comment

The SexLab cache refresh every 1 or 2 minutes so even if is made to return the same animations if the same parameters are set, after 2 minutes the animation list returned should be different if the matching animations exceed the 125

 

The cache helps when are running SexLab Animation to often reducing the response time in few seconds more if the installed animations count exceed the 256

Link to comment
4 hours ago, osmelmc said:

The cache helps when are running SexLab Animation to often reducing the response time in few seconds more if the installed animations count exceed the 256

 

so you say its good that the SL Animation cache exists? 
 

Link to comment

I edited said scripts, seems like i'm getting decent results though it could be way Im testing and I could be wrong on what I remember a certain mod did for me. 

 

I remember when using SexLab EagerNPCs, great mod, whenever I used dialogue "I want to make love to you" more than 50% of the time it was Leito Missionary 1 animation,great animation, love it.,over 50% no thanks.  

 

After editing and compiling scripts I went in with SL EagerNPCs active and used only "I want to make love to you" dialogue. 18 scenes and only 2 of them were Leito Missionary 1. Over all i seen 11 out of 18 different animations, 5 of them i think twice and Nibbles Cowgirl 6 played 3 times(sweet). I did have a back to back event with that particular animation, basically had sex and then stayed in cell and went to closest female and had sex again, it was the same animation?

 

Does anybody else recall EagerNPC having enduring affections for Leito Missionary 1 when going with "I want to make love to you" option, or am I being goofy?  

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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