• Announcements

    • Ashal

      SITE MOVED - IN READ ONLY MODE   12/08/2015

      Please use http://www.loverslab.com moving forward. Site has been restored to a previous version, and this one placed into a read-only mode. This is available for a limited time so users may reference/copy content that has been lost in the transition. This will no longer be accessible by December 22nd, 2015.
Ashal

SexLab Framework Development - 1.61 Beta 1 - Nov 19th

3,418 posts in this topic

Sounds awesome then!  Will look forward to putting that to use. :)


0

Share this post


Link to post

Thank you for the script help... Umm... Unfortunately I need a bit more of it. I'm sorry. T_T


 


I've been working on a very simple script for the last couple of days (since I'm a seriously terrible scripter) and I keep failing to trigger a spell casting when animationEnd hooks. Everything else in the script works just as it should ingame, even the other hook, it's just the call for a spellcasting at the end of the script that I can't manage to get working.



Scriptname sslEnchantressMagicEffect extends ActiveMagicEffect

SexLabFramework property SexLab auto
sslEnchantress Property Enchantress auto hidden
spell property Calm auto
spell property CalmEnchant auto
spell property InfluenceAggDownFFAimedMellow auto

event OnEffectStart(actor target, actor caster)
actor[] sexActors = new actor[2]
sexActors[0] = target
sexActors[1] = caster
sexActors = SexLab.SortActors(sexActors, femaleFirst=true)
RegisterForModEvent("AnimationStart_Enchanted", "EnchantMessage")
RegisterForModEvent("AnimationEnd_Enchanted", "CalmMagicEffect")
sslBaseAnimation[] anims

SexLab.StartSex(sexActors, anims, allowBed=false, hook="Enchanted")
endEvent

event EnchantMessage(string eventName, string argString, float argNum, form sender)
sslThreadController controller = SexLab.HookController(argString)
actor[] actorList = SexLab.HookActors(argString)
int player = controller.GetPlayerPosition()
if player == 0
Debug.Notification("Your spell enchants " + actorList[1].GetLeveledActorBase().GetName() + " with uncontrollable lust")
elseIf player == 1
Debug.Notification("Your spell enchants " + actorList[0].GetLeveledActorBase().GetName() + " with uncontrollable lust")
endIf
UnregisterForModEvent("AnimationStart_Enchanted")
endEvent

event CalmMagicEffect(string eventName, string argString, float argNum, form sender)
sslThreadController controller = SexLab.HookController(argString)
actor[] actorList = SexLab.HookActors(argString)
int player = controller.GetPlayerPosition()
if player == 0
actorList[0].addSpell(CalmEnchant, false)
CalmEnchant.Cast(actorList[0], actorList[1])
actorList[0].removeSpell(CalmEnchant)
elseIf player == 1
actorList[1].addSpell(CalmEnchant, false)
CalmEnchant.Cast(actorList[1], actorList[0])
actorList[1].removeSpell(CalmEnchant)
endIf
UnregisterForModEvent("AnimationEnd_Enchanted")
endEvent

The CalmEnchant that I'm trying to cast at the end is a spell rather than a magic effect. My best guess is that I'm messing up the CalmEnchant.Cast line somehow, the info on how to phrase it I'm getting from creationkit.com or googling 'skyrim script spell cast' is pretty minimal.


0

Share this post


Link to post

magic effects can't register mod events, create a quest and attach a script to that which managed your hooks.


 


Look at MatchMakers esp and scripts for a basic example of exactly this.


0

Share this post


Link to post

Ah I see. :o


 


I'll do that. Thanks a ton! :lol:


0

Share this post


Link to post

Would it be possible to add clothes swapping support in the SexLab code? 


I was reading the breaking undies thread and some of the pictures there showed a miniskirt pulled up and the panties pulled down. Stuff like that would be great for SexLab too, and would add to the RP element in the plugins. is it possible to make it a general switch that does something like:


if clothing article 1 is in folder 1, swap it with clothing article 2 in folder 1. 


if clothing article 1 is in folder 2, swap it with clothing article 2 in folder 2. 


Folder example is a bad one, but at least a system where you have different folders for the models you would like to use and is easy to add to so that the system is just there in the bottom, letting people make their own verions of what they want swapped out.


 


I hope you could follow that thought, I sure had problems with it.. 


0

Share this post


Link to post

A question: Is it possible to add "invisible" stats to SexLab? Like I would like to be able to make responses like: "I heard you worked out of [Name of Inn]" with just a condition check in the dialogue if people use for example radiant prostitution. 


 


Another question: Could you add, or is there, a "HadSexWithPlayer" perk or spell to all the NPCs the player have sex with?


 


0

Share this post


Link to post

 

Another question: Could you add, or is there, a "HadSexWithPlayer" perk or spell to all the NPCs the player have sex with?

I'm not sure if that's needed in the framework, SexLab Romance remembers every single NPC your character had sex with through it without such a function.

0

Share this post


Link to post

 

 

Another question: Could you add, or is there, a "HadSexWithPlayer" perk or spell to all the NPCs the player have sex with?

I'm not sure if that's needed in the framework, SexLab Romance remembers every single NPC your character had sex with through it without such a function.

 

They probably added them to a faction or something.  I do the same thing with Submit.

 

Either way, yeah, not sure of the benefit to having it in the Framework.  It only matters if the mod would make use of that information, in which case, it's fairly easy to add it yourself as needed.

0

Share this post


Link to post

 

 

 

Another question: Could you add, or is there, a "HadSexWithPlayer" perk or spell to all the NPCs the player have sex with?

I'm not sure if that's needed in the framework, SexLab Romance remembers every single NPC your character had sex with through it without such a function.

 

They probably added them to a faction or something.  I do the same thing with Submit.

 

Either way, yeah, not sure of the benefit to having it in the Framework.  It only matters if the mod would make use of that information, in which case, it's fairly easy to add it yourself as needed.

 

There is no problem adding a check if your own plugin was used, but people use many plugins and having it stored cross-plugins will let you write better dialogues that remembers that you have had sex before.

 

Edit: But if SexLab already remembers it, then my question is: How can my plugin access that memory?

0

Share this post


Link to post

Hi yall :)


 


Well i got a problem for some time already and i donno how to fix it :(


 


When i chat with npc and i agree to have an sex  animation , they just stand there but nothing happends ... how can i fix it ?  help please


 


NOTE : yes i did everything about fnis and all that stuff 


0

Share this post


Link to post

 

There is no problem adding a check if your own plugin was used, but people use many plugins and having it stored cross-plugins will let you write better dialogues that remembers that you have had sex before.

 

Edit: But if SexLab already remembers it, then my question is: How can my plugin access that memory?

Oh, indeed, a simple global "Has had sex Yes/No" check could be made.  However, if a mod wanted to know "Has had consensual sex Yes/No" vs "Has had nonconsensual sex Yes/No", such as mine, then either Ashal would have to build in several varieties of this to try to anticipate all scenarios, or individual mods would wind up having to add custom ones anyways.

0

Share this post


Link to post

Is it possible to make it so that schlongification only occurs after an actor is tagged by SL? So with "schlongify nearby NPCs" unticked in the SoS mcm menu you pretty much only see penises when the actor is about to initiate sex. 


0

Share this post


Link to post

One thing that might be really easy to work into animations would be bondage. Specifically the bondage animation from the beginning of the game. The hands tied behind the back could make for a lot of decent rapey animations where the character is more subdued. That hands behind the back posture would work great on both standing and kneeling forced blowjobs, forced cowboy (reverse and regular), forced doggy style with the hands held behind the back (as in one of the beast rape scenes) and many others.


 


It would work great for some of the softer foreplay scenes. Many of the kissing scenes would be quite interesting with the victim bound and being forced to smooch.


 


It could also be a cool intro to a stripping scene with the victim bound and standing there and the attacker approaching the victim and stripping them in a few moves that are obviously removing different clothing articles.


 


****************************************************************************************


 


I also wonder if there is perhaps a chance of seeing various "scenes" linked into one another to form a longer sexual experience? What I mean is currently we have stages within one scene. Some of the scenes are sex scenes and some are foreplay scenes.


 


It would be very cool to be able to choose a setting in Sexlab that played a opening foreplay scene that was then aiutomatically followed by a sex scene. So you would transition from the foreplay to a new sex scene.


 


If proper stripping animations were to be made that were story specific (some consensual sex, some rape themed, ect...) then you could link 3 scenes into one full session. Have an opening stripping scene followed by a foreplay scene and ending with a sex scene. Each scene would have their multiple stages.


 


The various scene types coudl each have catagories. Right now we have aggressive sex and can choose the animations we want to be possible in that group. If multiple scenes were allowed we could have aggresive sex, aggresive foreplay, and aggressive stripping, and we could click each scene we want to have a chance to play in each of the various sexual encounters. Much as we currently choose the active animations for consensual, aggressive, and beast sex. We would have 9 catagories instead of 3.


 


Consensual sex animations


Consensual stripping animations


Consensual foreplay animations


Aggressive sex animations


Aggressive foreplay animaions


Aggressive stripping animations


Beast sex animations


Beast stripping animations


Beast foreplay animations ( some beasts such as Falmer might have quite sinister/violent ideas of foreplay, vampires would likely include blood drinking from various areas of the body prior to sex)


1

Share this post


Link to post

magic effects can't register mod events, create a quest and attach a script to that which managed your hooks.

 

 

Really?  Because the sex magic in my Angrim's Apprentice mod does this all the time, and I've never had any problems with the hooks firing.

 

In particular the script AngrimTriggerSpell.psc (in the BSA for the mod) extends ActiveMagicEffect, and the whole purpose of the script it to trigger the appropriate spell on OrgasmEnd.

 

Not that the advice to centralize such hooks in an associated quest is wrong - but I'm not sure it is really necessary.

0

Share this post


Link to post

May be only so long as they don't expire before the event is received. If the magic effect expires there is nothing there to receive the event. I don't know for sure, haven't ever tested it or needed to, just going off what I've been told by other people saying they can't get their spell to receive callback events.


0

Share this post


Link to post

My triggering spells last 5 min., so problems with the effect expiring aren't too likely (still possible, just rare).  And if the effect expires before the sex act ends, well, I wouldn't expect the event to trigger.


 


This also wouldn't be an issue for a magic effect associated with a permanent ability (though that isn't the case with most of the Angrim spells).


 


I'll be sure to have it unregister explicitly in the OnEffectFinish, just in case a later event might still try to execute the hook and crash.  Though in general, ActiveMagicEffect-registered events unregister automatically when the effect ends.


0

Share this post


Link to post

Hello Ashal,thanks for the great work!


 


I use Ver1.24 now and found "Fixed SOS schlongs bending far to the side" of 1.22 seems not worked in1.24.


 


Is it only me have this problem?


0

Share this post


Link to post

Quick update on development, I've pushed a bunch of changes to the development branch on Git.


 


Highlights:


  • Fully functioning mfg preset system that applies applicable facial emotions to characters during sex. Just missing enough good expressions to fill it out, please read www.loverslab.com/topic/22448-sexlab-expressions-submit-mfg-presets/

  • Added stat tracking for how many times a NPC has had sex with the player, along with applicable functions:
    • bool HadPlayerSex(actor) tells you if player has had sex with the given actor

    • int PlayerSexCount(actor) tells you how many tims a given actor has had sex with the player

    • AddPlayerSex(actor) adds +1 to a given actors play sex tally, this is called automatically on npcs at the end of a scene if the play was involved. 


  • A bunch of optimizations aimed at speeding up the time it takes to start an animatiobs.
    • By my benchmarks, starting a scene from cold NewThread()/StartSex() to fully animation, has gone from ~2.1 to ~0.8 seconds


  • Bug fixes n' shit.

6

Share this post


Link to post

Hey Ashal.


 


I was thinking, could you put in a masturbation hotkey? I know there are plugins for SexLab that adds spells for it, but I don't want the excess that the mods add. I don't want to clutter my spells or have a glowing orb in my hand just to get my character to masturbate - it's extremely immersion-breaking. I know that Sexout adds a hotkey for it and iirc so does lovers with pk. And sure the defeat plugin adds a hotkey, but again, I don't want the excess that the mod adds. I use submit and prefer the simple 1-key submit with a chance over a huge, complex mini-game for submitting.


0

Share this post


Link to post

I would love to see the possibility of hotkeys for rotation an individual animation set, as opposed to the entire "scene".  Some of the animations face opposite directions, and there's no easy way to make them blend well in that event.


 


Thanks once again, Ashal, for all your hard work on this.  The framework is amazing!


0

Share this post


Link to post

has anyone asked for a DP animation, cause I would love to see that.


0

Share this post


Link to post

I've created a function to dispel the cum effect on my own.



Function CleanUp(Actor akPlayer)
    If(akPlayer.HasMagicEffectWithKeyword(CumAnal) || akPlayer.HasMagicEffectWithKeyword(CumOral) || akPlayer.HasMagicEffectWithKeyword(CumVaginal))
        If(CleanUpMsg.Show() == 0)
            CleanUpSpell.Cast(akPlayer)
        EndIf
    EndIf
EndFunction

It casts a spell which dispels all effects with the cum keywords from SexLab.


 


Now instead of doing it on my own I thought about a way to directly use it from SexLab itself. So my suggestion for a next release would be this:


 


In SexLabFramework after ApplyCum function



function DispelCum()
    ActorLib.bDispelCumEffect = true
endfunction

Somewhere in sslActorLibrary



bool bDispelCumEffect auto hidden

Altered sslActorCumEffect



event OnUpdate()
    if GetTargetActor().IsSwimming() || GetTimeElapsed() > timer || Lib.bDispelCumEffect
        Dispel()
        return
    endIf
    RegisterForSingleUpdate(5.0)
endEvent

0

Share this post


Link to post

It would be great if this was compatible with UndiesUnderneath, or perhaps incorporated similar functionality.


0

Share this post


Link to post