Qviddhartha Posted May 25, 2025 Posted May 25, 2025 I have a rather large WIP that makes heavy use of SL. I found that I had to make changes to SL scripts because (1) there is a bug where SL disrupts actors that were previously in an animation thread (at the rate I am starting animations, many actors that start new animations are disrupted by this leftover from a previous animation, and (2) SL does not provide any reliable means of detecting the end of animations (there are circumstances in which an "AnimationStarted" event is not followed by an "AnimationEnd" event, or where you get a positive return value on th.startThread but no animation and no events). I now want to find ways around these, but without modifying SL. To work around these issues, I would need a way to monitor ALL sexlab threads and aliases (not just the ones I start). I can only do that by assuming an upper bound on the number of threads and aliases. So, the question is: are there any mods out there that do change the number of threads or the number of actor aliases per thread? I'm on LE, using SL Version 1.62, released 2016/06/03, but I am also interested in answers applicable to SE.
Ashal Posted May 25, 2025 Posted May 25, 2025 Running SexLab.IsActorActive(Actor) on potential actors should pretty reliably tell you if an actor is cleared out of a previous thread/alias fully. It checks if the actor is in the animating faction, which is only added to them while filling an alias. But I'm not aware of any mods that change the number of threads/aliases, so it should be pretty reliably 15 threads with 5 aliases each. Except maybe SexLab P+, but if you're still stuck using LE that's unlikely to be a concern. 1
Qviddhartha Posted May 25, 2025 Author Posted May 25, 2025 Thank you for your reply. I have indeed been using the SexlabAnimatingFaction, as well as the SexlabActive keyword. However, being clear of these two still leaves actors in the sslActorAlias.ActorRef property which then leads sslActorAlias.Initialize to perform disruptive actions (RestoreActorDefaults) on the actor when the alias is prepared for the next animation. I'll be implementing my crazy work around... Fortunately ActorRef is a property so I can clear it easily. Still not sure how I'm going to track when threads start/end and aliases are forceRef'd/cleared. Having a finite number to worry about is a first step. Thanks again.
MadMansGun Posted May 26, 2025 Posted May 26, 2025 (edited) @pfB6cs if it helps this is my werewolf Orgy script: aaaWereProstitution_OrgySpell.psc and it's started by a spell (with a long duration so it stays active till the animation ends) that is casted by a dialogue script: aaaWereProstitution_Orgy.psc Edited May 26, 2025 by MadMansGun
Qviddhartha Posted May 28, 2025 Author Posted May 28, 2025 I successfully implemented my fixes without touching any existing scripts or plugin records. One quest, 15 scenes, 75 aliases, 150 conditions, 30 script fragments. Tedious does not begin to cover it. I cover five different bugs in SL LE: SexlabAnimatingFaction does not always come off. There is a race condition between the end of the thread and some reset actions in sllActorAlias where the alias script is trying to setFactionRank( ..., 0) before the thread clears the alias, and sometimes misses. sslThreadController sometimes returns a non negative tid (indicating success) but then enters Fatal() before sending out the AnimationStarting event. sslThreadModel sometimes aborts without sending out the AnimationEnd event but after sending AnimationStart. sslActorAlias keeps a reference to a previous actor in the property ActorRef, and then performs disruptive actions on that actor as part of setting up for the next animation. sslActorAlias fails to reset the actor's animation graph and fails to setRestrained( False) when the animation ends while the actor is in an unloaded cell. @Ashal It'd be cleaner to make those fixes in the SL code itself (except for #5; my current solution to this is quite heavy handed). PM me if you are interested in considering putting out an update for LE, or if you think my fixes might be relevant for SE. 1
Qviddhartha Posted May 28, 2025 Author Posted May 28, 2025 6 hours ago, pfB6cs said: One quest, 15 scenes, 75 aliases, 150 conditions, 30 script fragments. Tedious does not begin to cover it. Just to be clear, I have fixes that touch ~15 lines of code total in the SL base scripts and cover the first 4 bugs. This craziness is the work around to fix without touching the scripts.
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