Jump to content

Recommended Posts

Posted

I've read every single page of this forum and tried all suggestions. I cannot get the schlongs to show on horses, dogs, and wolves. Or any other animal. Here's a list of everything I've tried (in no particular order)

1. Did clean install.

2. Updated Creature Framework to 1.04 and updated JCon and whatever else.

3. Tried re registering in CF menu.

4. Did reset animations in SL menu.

5. Started a new game.

6. Tried from a clean save (One I made outside the cave after I installed Skyrim without touching the data folder yet.)

7. Tried rolling back to 1.01 CF.

8. No problems with FNIS. It all installs fine and my animations all work fine. My animals have sheaths just no dongs. Horses don't even have balls. It is my only problem.

9. Ran FNIS 1,000 times as administrator and every way I could think of.

10. Went to new cell

11. Loaded and reloaded the same save game 1,000 times while messing with settings and clicking re register buttons etc.

12. Installed Aroused redux.

13. Tried using other meshes from other mods. No change.

14. Messed around with load order. Tried it every way suggested and instructed.

15. I have Allow Creatures checked.

16. I have messed around with arousal settings, and disabled integration.

17. I have tried going into NC and swapping normal for alternatives.

 

That covers all I can think of.

 

Please. Help. Me. This is turning into like a 12 hour 3 day stump fest. And I'm beginning to come to the conclusion it's just broken. I have used older versions of this mod in the past and absolutely loved it but I really wanted to be able to use the new animations. But it seems it's nothing but problems.

Posted

I've read every single page of this forum and tried all suggestions. I cannot get the schlongs to show on horses, dogs, and wolves. Or any other animal. Here's a list of everything I've tried (in no particular order)

1. Did clean install.

2. Updated Creature Framework to 1.04 and updated JCon and whatever else.

3. Tried re registering in CF menu.

4. Did reset animations in SL menu.

5. Started a new game.

6. Tried from a clean save (One I made outside the cave after I installed Skyrim without touching the data folder yet.)

7. Tried rolling back to 1.01 CF.

8. No problems with FNIS. It all installs fine and my animations all work fine. My animals have sheaths just no dongs. Horses don't even have balls. It is my only problem.

9. Ran FNIS 1,000 times as administrator and every way I could think of.

10. Went to new cell

11. Loaded and reloaded the same save game 1,000 times while messing with settings and clicking re register buttons etc.

12. Installed Aroused redux.

13. Tried using other meshes from other mods. No change.

14. Messed around with load order. Tried it every way suggested and instructed.

15. I have Allow Creatures checked.

16. I have messed around with arousal settings, and disabled integration.

17. I have tried going into NC and swapping normal for alternatives.

 

That covers all I can think of.

 

Please. Help. Me. This is turning into like a 12 hour 3 day stump fest. And I'm beginning to come to the conclusion it's just broken. I have used older versions of this mod in the past and absolutely loved it but I really wanted to be able to use the new animations. But it seems it's nothing but problems.

 

It works and works every time for me.  Try using the steps I outlined in the link in my sig.  This has always worked for me (this is when starting a new game).  I am using the current MNC with Creature Framework updated to 1.04 (and I don't use Hentai creatures).  The only creatures I cannot confirm are undead related (and spiders - I have never and will never activate spider for sex.  EVER) - I don't use draugr, skeletons, etc.  However, dogs, horses, wolves, giants, falmer, deer, foxes, etc always work.  Well, almost always.  For some reason, the horse added by ETAC to Riverwood will sometimes not get a schlong.  Not sure why, and only happens the first time that particular horse "does the nasty".

Posted

Thanks so much for your reply.

I'm a little confused on which versions of what you are using. It isn't really clear in your post. You start off saying it all works fine, and that you're using 8.33 MNC, then say you're using 9.3, and latest versions of CF. Then you edit and say updated to 1.01. From what, 1.04? I'm just confused. Could you tell me point blank which versions of what I need? I just deleted and replaced my entire Skyrim folder from a backup and I'm starting from scratch and want to do this right.

 

I tried the other suggestion mentioned also where you check and uncheck integration etc. Didn't work.

 

EDIT: I took my best educated guesses as to what versions and re-read your post (been tired from trying to get this working) and I have finally resolved the issue. Followed your instructions and it worked. I can't thank you enough. I will be back later to give a full description as to how I fixed it for anyone else who has this problem.

Posted
Creatures Framework API reference not found

Good evening, I just want to leave some feedback. After updating this mod from 8.33, I got this famous error: "Creates Framework API references not found". Sometimes it worked, sometimes it didn't. I had a clean Skyrim installation and only core mods like Sexlab and FNIS.

 

Installing "SexLabAroused_V27a" fixed that issue.

Posted

Creatures Framework API reference not found

Good evening, I just want to leave some feedback. After updating this mod from 8.33, I got this famous error: "Creates Framework API references not found". Sometimes it worked, sometimes it didn't. I had a clean Skyrim installation and only core mods like Sexlab and FNIS.

 

Installing "SexLabAroused_V27a" fixed that issue.

DO NOT USE ORIGINAL SEXLAB AROUSED, use sexlab aroused redux.

Posted

loadorder.txt

# This file was automatically generated by Mod Organizer.
Skyrim.esm
Update.esm
Unofficial Skyrim Patch.esp
Dawnguard.esm
Unofficial Dawnguard Patch.esp
SexLab.esm
SexLabAroused.esm
CreatureFramework.esm
Schlongs of Skyrim - Core.esm
[..snip..]
XPMSE.esp
smakit_house_markers.esp

 

Okay, from the looks of it, your installation order (modlist.txt) seems to be mostly nice and correct. At least I can't see any glaring problems.

 

Your plugins load order, however, is a bit messed up.

For starters, you should probably move the .esp for Realistic Ragdolls and Force MUCH, MUCH higher (earlier) in the load order, followed by the .esp for XPMSE. Try putting them before the ESPs for Schlongs and such. (Right after the Enhanced Blood might be nice.. Ragdolls first, then XPMSE.) You should also try to keep everything Schlongs of Skyrim-related pretty close to its main .esp, except for the shop which you might need to juggle around towards the end of the load order a bit. The FNIS.esp should come LAST. Absolutely. The very last thing in your load order.

 

Next, put anything related to More Nasty Critters after Schlongs and its things. Also, put WerewolfMastery AFTER Mighty Beasts, just to be sure. (It actually includes the Mighty Beasts meshes and all.. simply change to it in its MCM menu and disable WerewolfMastery's skin system.)

 

I'm a little unsure about FriendlyCreatures.. and maybe Werewolves Jump Higher.. you have to be somewhat careful with pretty much anything that changes werewolves. When in doubt, disable those, leave only the bare minimum enabled that SHOULD give you schlongs on werewolves and try that. (Which are, in this case Schlongs of Skyrim and Mighty Beasts.. these two alone should be enough to give you schlongified werewolves when you adjust the schlong distribution correctly. Try disabling the rest of the werewolf-related mods, see if those two give you schlongs and then re-enable one by one to see which of the ESPs reverts the changes or conflicts.)

Posted

Dies kann, bevor er angenommen worden, aber durch Skimming konnte es nicht sehen.

 

Ich habe all die Animationen ganz gut, alle Konzept für die Tatsache, dass es läuft sind kein Pferd Penis 'überhaupt auftauchen. Das Einzige, was ich vermisst, jetzt die Animationen richtig abgehen, aber kein Penis zeigt, ungerade.

 

Hmm, das Lesen über BDIC Messing vielleicht ist es auf?

Ich habe das gleiche Problem. Aber habt ihr einen Abküfi (abkürzungsfimmel) was ist denn BDIC?

Posted

The Hentai Creatures plugin in this package is different from the original standalone.

 

What exactly does the "Train" option do? Does it increase Health / Stamina / Magicka? Does it increase attack damage? When I tested it, I didn't notice an increase in stats, unless there is a cap.

 

And are the summoned creatures essential or killable?

Posted

I feel like this has defs been covered but anyway; why is it during the animations the beasts don't have any, well, penises? I'm sure this used to work for me but I'm not having any luck, am I missing something? Any help appreciated~ <3

Posted

is there a way to change the dremora animation , as right now he always take the female role on sexlab animation 

 

Thanks

Posted

I feel like this has defs been covered but anyway; why is it during the animations the beasts don't have any, well, penises? I'm sure this used to work for me but I'm not having any luck, am I missing something? Any help appreciated~ <3

 

Penises are added by Creature Framework. Try to install the latest version (after MNC) from the specific download page. And be sure you configure it accordingly.

 

 

is there a way to change the dremora animation , as right now he always take the female role on sexlab animation 

 

Thanks

 

The position took by all involved actors is defined by the mod that starts the animation. Check what mod are you using, and check if there is a way to alter the position of the actors.

Just keep in mind that if the animation was done explicitly by the animator to have the creature as passive, then there is no way to change it. You need a different animation.

Posted

is there a way to change the dremora animation , as right now he always take the female role on sexlab animation 

 

Thanks

 

The position took by all involved actors is defined by the mod that starts the animation. Check what mod are you using, and check if there is a way to alter the position of the actors.

Just keep in mind that if the animation was done explicitly by the animator to have the creature as passive, then there is no way to change it. You need a different animation.

 

it uses sexlab animations , as dremora is like an npc not a creature ,  so i though that changing the actor position is possible , thanks for your reply

 

 

 

is there a way to change the dremora animation , as right now he always take the female role on sexlab animation 

 

Thanks

 

http://www.loverslab.com/files/file/2763-hentai-dremora-fix-for-more-nasty-critters/

 

 

 

i tried it , but it didn't fix reversing the position , but thanks bro

 

Posted

Alright I need some help with this I've installed all the things i need to make this work and yet their junks are not erectin I've been trying to fix this for hours and no luck anyone wanna help?

Posted

Ok i also have a problem with getting this to work only that i already fail in the FNIS. When i run it, it tells me that no creature pack has been installed and therefore i cant run it. Any idea i have installed everything as said on the download page and it still doesn't work.

If it says you have no creature pack then you either didn't download and install the optional creature pack file from the FNIS download page or you failed to install it properly. Concentrate your efforts there.

Posted

i never use sexlab aroused and never intended to use it, 

heck, Mnc works fine on me..

 

sure, those problems sometimes occured when i got Ctd's several times (because of other mods or because its skyrim ).

but here's my way to make it works again.

 

required : NMM (for me), Mnc 9.3 fomod, Fnis Creature 6.1, creature framework 1.03 (i use it "just-because")

 

- open Fnis, deinstall creature, close Fnis

- open Nmm, uninstall Fnis, Creature Framework, and Mnc

- Reinstall in order -> Fnis creature, Creature Framework, Mnc

- Open Fnis, Update Fnis behaviour

- open the game, (optional: make another save)

- open Mod configuration, pick Sexlab

- click Animation setting, untick "allow creature animation" or something like that.

- close Mod Configuration and menu. wait for a while

- Open menu, Mod configuration, -> Sexlab

- click animation setting, Tick "allow creature animation"

- wait until creature animation installed.

- go to mod configuration -> creature framework and click re-register all mod

 

 

works like a charm for me..

Posted

What might be the reason of this:

The black and brown lines and cones I've seen instead of the beast's body when Farkas got himself transformed into werewolf in Dustman's Cairn. I mean 'Proving Honor' quest and getting trapped. 

http://imgdepo.com/id/i9213639

http://imgdepo.com/id/i9213640

Hope this can be clearly seen in these pictures.

Here in the Description to this mod it is said that 'If you DONT install any other Werewolf mods dont forget to ENABLE Werewolves in SL Nude Creatures Menu'. So I've decided to place my complaint here, though I have Mighty Beasts-Werewolf installed. It stays higher then MNC in my load order. Some times ago I've given a try to Hentai werewolf by summoning him. He looked great...

Posted

Two things, when is the frost atronach gonna be in the mod and why do spriggans take the female role in animations? I always wanted to see spriggans rape my pc why wouldn't they have a big wood thing for that lol? Would be nice to have some additional dwarven centurion anims too.

Posted

im confused in what im meant to install to get creatures to have sex animations  :s

its different from oblivion, where you just install one mod but in the skyrim section theres like 3 different ones!

 

is MNC the only mod i need? for the creature side of SL? 

why would i need creature framework?

Posted

I'm not sure where to look for this next....

 

All the animations work, all the dicks work, but when the draugr animations start, the PC does her part of the animation, but the male, and female, draugr (and skeletons) just stand there.

 

Any other "creature" like fire elementals, spriggans and such animate properly.  I even, accidentally, got another female NPC along with my PC and a draugr using the matchmaker spell, and both human actors animated correctly, with my PC happening to take one of the draugr slots in a 3p gangbang.

Posted

im confused in what im meant to install to get creatures to have sex animations :s

its different from oblivion, where you just install one mod but in the skyrim section theres like 3 different ones!

 

is MNC the only mod i need? for the creature side of SL?

why would i need creature framework?

This is taken directly from creature framework page:

"This is a framework that allows other modders to easily provide body replacements and integration with SexLab and SexLab Aroused. This mod does nothing by itself, but other mods can hook into it.

The framework will handle body swaps for SexLab sex scenes, and SexLab Aroused arousal, but neither are required."

 

and more nasty critters hooks into it.

 

it is basiclly a compat thing if you had 3 mods that did it their own way they might conflict with each other and you could/would get ctds or worse corrupted saved games

Posted

 

im confused in what im meant to install to get creatures to have sex animations :s

its different from oblivion, where you just install one mod but in the skyrim section theres like 3 different ones!

 

is MNC the only mod i need? for the creature side of SL?

why would i need creature framework?

This is taken directly from creature framework page:

"This is a framework that allows other modders to easily provide body replacements and integration with SexLab and SexLab Aroused. This mod does nothing by itself, but other mods can hook into it.

The framework will handle body swaps for SexLab sex scenes, and SexLab Aroused arousal, but neither are required."

 

and more nasty critters hooks into it.

 

it is basiclly a compat thing if you had 3 mods that did it their own way they might conflict with each other and you could/would get ctds or worse corrupted saved games

 

 

so i dont need creature framework? 

should just install MNC? if ive understood this correctly MNC, does the same thing? 

Posted

I get some random crashes when setting Hentai Creatures to 'train'.  Summoning, having them follow or fight, all seems to work fine.  If I start scenes with some other means, like matchmaker, they seem to be fine.  Just using the 'train' command is what seems to cause the issues.

 

It also seems that the creatures sometimes end up running more than one 'training cycle', initiating two or more scenes simultaneously.. bouncing between the scenes when they advance stages.

 

Looking at the code, there's at least couple places that seem off to me.

 

HentaiCreaturesQuest script / FindTrainee function:

 

The while loop doesn't seem to have any safeguards that I could tell - what would happen f.ex. if you set 'only collared' actors, and don't give collar to anyone?  'while trainee == none' - yes, it'll remain 'none' since no one has collar, and so trainee always resets to 'none'.  'ValidateActor(source) == 1' should always remain true as well, as long as the creature exists?  Unless I'm missing something, that leads to infinite loop, without any wait.

 

I added a limit to 10 interations:

 

 

 

Actor function FindTrainee(Actor source)
    player = Game.GetPlayer()
    
    Actor found = None
    Actor trainee = None
    Cell parentCell = source.getParentCell()
    int maxloop = 10
    int refCount = parentCell.getNumRefs(43)
    ; Changed this from indexing through the NPCs until it finds a hit since a large block of unusable NPCs before a usable one
    ; can drastically skew the random selection and would over train that one NPC to the relief of other NPCs uneagerly waiting
    ; their turn.
    ; Now each time we fail to find a valid NPC we perform another random call, the alternative was to build a shorter list of
    ; available trainees and then randomly select from only that list.  
    ;Debug.trace("Cell has " + refCount + " occupants")
    While (maxloop > 0 && Trainee == none && SexLab.ValidateActor(source) == 1)  ; Loop until trainee found or trainer is no longer valid (banished)
        maxloop -= 1
        int j = Utility.randomInt(0,refCount)
        found = parentCell.getNthRef(j, 43) as Actor
        ;Debug.Notification("Found " + found.GetActorBase().GetName())
        If found != None && !found.IsInCombat() && !found.IsDead() && found != source && (hcConfig.AllowRemoteTraining || found.Is3DLoaded()) && SexLab.ValidateActor(found) == 1
            ;Debug.Trace("Checking available: Race=" + found.GetRace() + " Name=" + found.GetActorBase().GetName() + " Index=" + j + " of " + refCount)
            int sex = SexLab.GetGender(found)
            if hcConfig.AllowPlayer && found == player
                trainee = getPreferredTrainee(source, found, trainee)
            elseif hcConfig.AllowMaleNPC && sex == 0 && found != player
                trainee = getPreferredTrainee(source, found, trainee)
            elseif hcConfig.AllowFemaleNPC && sex == 1 && found != player
                trainee = getPreferredTrainee(source, found, trainee)
            EndIf
            if(trainee != none)
                if hcConfig.CollaredActorsOnly && !trainee.IsEquipped(HentaiCollar)
                    trainee = none        ; Collared actors only, clear trainee and try again
                endif
            endif
        EndIf
        if (trainee == none)
            ;Debug.Trace("Not accepted as valid trainee")
        endif
    EndWhile
    if (trainee != none)
        If hcConfig.DisplayExplicitNotifications
            Debug.Notification(source.GetLeveledActorBase().GetName() + " is lusting after " + trainee.GetLeveledActorBase().GetName())
        EndIf
    endif
    return trainee
endfunction

 

 

 

Even if I missed something and it's not necessary, I still feel more comfortable when a loop has clear hard limit that terminates it.

 

There's another potentially infinite while loop in the HentaiCreaturesActor script / Train function, if I'm reading it correctly, although this one does have a 1 second wait between iterations.  Alternate approach would be to scratch the while loop and make it a simple if - endif, and use RegisterForSingleUpdate(1) to loop it.  I prefer it because it lets the script run it's course, and returns the control to papyrus engine.  Also changed the findTrainee call to check afterwards if match was found, and if not, register for another try after one second.  This should go together with limiting search to 10 iterations.

 

 

function Train()
    int SexLabTID = -1
    if ( (config.BanishAllCreatures) || (!config.AllowRemoteTraining && !self.Is3dLoaded()) || self == none)
        debug.Notification(self.GetLeveledActorBase().GetName() + " not loaded, banishing")
        UnregisterForUpdate()
        hCreatures.Banish(self)
        gotoState("Waiting")
    ElseIf (SexLab.ValidateActor(self) == 1)  ; Don't do the work to select a new partner if you are still having sex with the last one
        if(trainActor==none || !hCreatures.trainOnePartner())
            trainActor = hCreatures.findTrainee(self)
;MODIFIED
            if (trainActor==none)
                RegisterForSingleUpdate(1)
                return
            endIf
;!MODIFIED
        else
            checkCell()
            if(trainActor.IsDead() || !traineeInCell)
                trainActor = none
            endIf
        endif
        if(trainActor!=none && !trainActor.IsInCombat() && !trainActor.IsOnMount() && (config.AllowRemoteTraining || playerInCell))
;MODIFIED
;            While SexLabTID < 0 && SexLab.ValidateActor(trainActor) == 1 && SexLab.ValidateActor(self) == 1  ; Loop until the trainer is fucking the trainee or the trainer or trainee becomes unavailable
            If SexLab.ValidateActor(trainActor) == 1 && SexLab.ValidateActor(self) == 1  ; Loop until the trainer is fucking the trainee or the trainer or trainee becomes unavailable
;!MODIFIED
                self.SetLookAt(trainActor,true)                ; Trainer should look at the trainee while waiting to get it on
                SexLabTID = hCreatures.Train(self, trainActor)
                if SexLabTID < 0    ; Wait a moment and try again if there are no slots in Sexlab to get the action going
;                    Utility.Wait(1)
;MODIFIED
                    RegisterForSingleUpdate(1)
                    return
;!MODIFIED
                else
                    MfgConsoleFunc.ResetPhonemeModifier(trainActor) ; Remove any previous modifiers and phenomes
                    trainActor.SetExpressionOverride(9,100)    ; Give the actor a "this hurts like hell look"
                    MfgConsoleFunc.SetModifier(trainActor,2,100)
                    MfgConsoleFunc.SetModifier(trainActor,3,100)
                    MfgConsoleFunc.SetModifier(trainActor,4,100)
                    MfgConsoleFunc.SetModifier(trainActor,5,100)
                    MfgConsoleFunc.SetModifier(trainActor,11,90)
                    MfgConsoleFunc.SetPhoneme(trainActor,0,30)
                    MfgConsoleFunc.SetPhoneme(trainActor,2,30)
                EndIf
;MODIFIED
            ;EndWhile
            EndIf
;!MODIFIED
        endif
        RegisterForSingleUpdate(hCreatures.getTrainingWait())
    else
        RegisterForSingleUpdate(hCreatures.getTrainingWait())
    endif
endFunction

 

 

 

I haven't done extensive testing with this, but it did work in-game, and I didn't get any crashes from it - it may have improved stability, or it may be just chance.. the crashes aren't coming constantly anyway.  I'm still getting the same multiple-scenes issue though and I'm not sure why.  The code seems to use SexLab.ValidateActor, which should keep this from happening.

 

There's also a smaller problem with the hCreatures.getTrainingWait() use.  As it is now, the counter starts from the moment the scene starts playing, but the results depend on how long the scene actually takes to play out.  If wait time is say, 20 seconds, and scene plays for 35 seconds, then during the scene the wait cycle goes through once, and after the scene stops playing, the next one starts in 5 seconds.  In other words, the wait time isn't really so much the wait between scenes as it is 'how long to wait between checking if we can start a scene'.

 

One option would be to add another state 'Playing', and move to it when a scene is successfully initiated.  Then during 'Playing' state, just check every few seconds for ValidateActor(self), and as soon as this checks out, go to state 'Training'.  OnBeginState() of 'Training' could then start out with RegisterForSingleUpdate(hCreatures.getTrainingWait()) - this would imply that first training should also wait for the set pause, which would generally work out fine.

 

 

 

function Train()
    int SexLabTID = -1
    if ( (config.BanishAllCreatures) || (!config.AllowRemoteTraining && !self.Is3dLoaded()) || self == none)
        debug.Notification(self.GetLeveledActorBase().GetName() + " not loaded, banishing")
        UnregisterForUpdate()
        hCreatures.Banish(self)
        gotoState("Waiting")
    ElseIf (SexLab.ValidateActor(self) == 1)  ; Don't do the work to select a new partner if you are still having sex with the last one
        if(trainActor==none || !hCreatures.trainOnePartner())
            trainActor = hCreatures.findTrainee(self)
;MODIFIED
            if (trainActor==none)
                RegisterForSingleUpdate(1)
                return
            endIf
;!MODIFIED
        else
            checkCell()
            if(trainActor.IsDead() || !traineeInCell)
                trainActor = none
            endIf
        endif
        if(trainActor!=none && !trainActor.IsInCombat() && !trainActor.IsOnMount() && (config.AllowRemoteTraining || playerInCell))
;MODIFIED
;            While SexLabTID < 0 && SexLab.ValidateActor(trainActor) == 1 && SexLab.ValidateActor(self) == 1  ; Loop until the trainer is fucking the trainee or the trainer or trainee becomes unavailable
            If SexLab.ValidateActor(trainActor) == 1 && SexLab.ValidateActor(self) == 1  ; Loop until the trainer is fucking the trainee or the trainer or trainee becomes unavailable
;!MODIFIED
                self.SetLookAt(trainActor,true)                ; Trainer should look at the trainee while waiting to get it on
                SexLabTID = hCreatures.Train(self, trainActor)
                if SexLabTID < 0    ; Wait a moment and try again if there are no slots in Sexlab to get the action going
;                    Utility.Wait(1)
;MODIFIED
                    RegisterForSingleUpdate(2)
                    return
;!MODIFIED
                else
                    Utility.Wait(1)
                    MfgConsoleFunc.ResetPhonemeModifier(trainActor) ; Remove any previous modifiers and phenomes
                    trainActor.SetExpressionOverride(9,100)    ; Give the actor a "this hurts like hell look"
                    MfgConsoleFunc.SetModifier(trainActor,2,100)
                    MfgConsoleFunc.SetModifier(trainActor,3,100)
                    MfgConsoleFunc.SetModifier(trainActor,4,100)
                    MfgConsoleFunc.SetModifier(trainActor,5,100)
                    MfgConsoleFunc.SetModifier(trainActor,11,90)
                    MfgConsoleFunc.SetPhoneme(trainActor,0,30)
                    MfgConsoleFunc.SetPhoneme(trainActor,2,30)
                    
                    GotoState("Playing")
                    return
                EndIf
;MODIFIED
            ;EndWhile
            EndIf
;!MODIFIED
        endif
        RegisterForSingleUpdate(2)
    else
        GotoState("Playing")
    endif
endFunction

State Training

    Event OnBeginState()
        ;Debug.Notification("Training")
;MODIFIED
        UnregisterForUpdate()
        RegisterForSingleUpdate(hCreatures.getTrainingWait())
;        Train()
;!MODIFIED
    EndEvent
    
    Event OnUpdate()
        Train()
    EndEvent
    
    Event OnUpdateGameTime()

    EndEvent
        
    event OnEndState()
        UnregisterForUpdate()
    endEvent        
    
    event OnDeath(Actor akKiller)
        UnregisterForUpdate()
        GoToState("Waiting")
    EndEvent    
EndState

State Playing
    Event OnBeginState()
        UnregisterForUpdate()
        RegisterForSingleUpdate(2)
    EndEvent
    
    Event OnUpdate()
        if(SexLab.ValidateActor(self) == 1)
            GotoState("Training")
        else
            RegisterForSingleUpdate(2)
        endIf
    EndEvent
    
    Event OnUpdateGameTime()

    EndEvent
        
    event OnEndState()

    endEvent        
    
    event OnDeath(Actor akKiller)
        UnregisterForUpdate()
        GoToState("Waiting")
    EndEvent        
EndState


 

 

 

With short testing in-game, this seems to work.  If I now set the wait between training to say, 15 seconds, it'll keep to this fairly well regardless of scene length.  There's some variation, in busy cell it can take longer to find a match especially if the selection is limited (f.ex. only collared actor, but having very few collared actors).  I don't think that's a big issue though, some randomness is fine.

 

Alternate with less randomness in time and more robust and efficient way of finding matches would be to shuffle the reference array of actors in cell, then iterate through the shuffled array to find the first match.  Relatively fast and easy way would be to take array size (int i = arraySize-1) and then loop i --> 1, with each iteration swap array <--> array[random(0,i-1)].  You could combine this to seeking the match - every time you swap an element, you could test the replacing element (the new array) for potential match.  This would make second pass redundant.

 

--- edit ---

 

I'm actually not sure what the intent behind current selection is.  In practice it loops random stabs at actor list on the cell, until it finds first valid hit.. and then picks that.  Does it ever actually test the distance between actors (getPreferredTrainee), or is that just a relic from some earlier version?  As soon as it has anything to compare against (except null pointer), it already returns the first found match.

 

On the other hand if it really did test the distance and used it as the only criteria, then unless the creature or trainees moved around, it would always pick the same victim (the closest one).  The comments in code suggest it should rather pick something at random (which is the current behaviour).

 

If it's supposed to weigh the decision based on some criteria, while still maintaining some randomness and avoiding infinite loops in case there's no one valid (e.g. pass the list only once), it could do something like this:

 

 


Actor function FindTrainee(Actor source)
    player = Game.GetPlayer()
    
    Actor trainee = None
    Actor found = None
    Cell parentCell = source.getParentCell()

    ;Debug.trace("Cell has " + refCount + " occupants")

    Actor[] refs = new Actor[50]
    int i = parentCell.getNumRefs(43)
    int j = 0
    while (i > 0 && j < 50)
        found = parentCell.getNthRef(i, 43) as Actor
        if (found != none && (!hcConfig.CollaredActorsOnly || found.IsEquipped(HentaiCollar)) && !found.IsInCombat() && !found.IsDead() && found != source && (hcConfig.AllowRemoteTraining || found.Is3DLoaded()) && SexLab.ValidateActor(found) == 1)

            if (found == player)
                if(hcConfig.AllowPlayer)
                    refs[j] = found
                    j += 1
                endIf
            else
                int sex = SexLab.GetGender(found)
                if ((hcConfig.AllowMaleNPC && sex == 0) || (hcConfig.AllowFemaleNPC && sex == 1))
                    refs[j] = found
                    j += 1
                endIf
            endIf
        endIf
        i -= 1
    endWhile
    i = j

    if (i == 0)
    ; no valid candidates
        return none
    endIf
    if (i == 1)
    ; only one valid candidate
        return refs[0]
    endIf

    int x = i / 2
    While (i > x)
        i -= 1
        j = Utility.randomInt(0,i - 1)
        found = Refs[j]
        trainee = getPreferredTrainee(source, found, trainee)
        refs[j] = refs[i]
    EndWhile
    if (trainee != none)
        If hcConfig.DisplayExplicitNotifications
            Debug.Notification(source.GetLeveledActorBase().GetName() + " is lusting after " + trainee.GetLeveledActorBase().GetName())
        EndIf
    endif
    return trainee
endfunction


 

 

 

This will find up to 50 valid candidates from ref list, then go through that list in random order - picking the candidate based on getPreferredTrainee - with the only criteria right now being distance.  So initially this just ends up picking the closest one - unless there are more than 50 valid candidates.  However the script only checks half the possible candidates ( x = i / 2 ), thus essentially starting the look from closest valid candidates, going towards the furthest away, and each time there's 50% chance to pick the candidate, and 50% to move to next.

 

Over time the creature should sort of wander along the trainees, usually picking either the same one again, or one close by, sometimes skipping a bit further away.. maybe returning back to previous one, or wandering to different direction.

 

-- edit 2 --

 

After the changes though, I'm still getting the double-scene bug.  Still no idea why.  It can even end up with same trainee picked twice, thus the creature running two scenes at once with same actor.  And once it starts running two scenes, it'll keep picking new scenes after each one has finished, so constantly running two (or more) scenes simultaneously.

 

After some more testing with this, and throwing in some debug prints, it seems that for whatever reason SexLab starts the animation but doesn't register the actors - SexLab.ValidateActor returns 1 for both the creature and the trainee.  Even so I don't understand why it keeps running 2+ parallel scenes constantly from there on.  Do states break the thread tracking?

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...