Jump to content

Welcome to LoversLab
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

SexLab Framework Development


  • Please log in to reply
1709 replies to this topic

#621
UrbiOrbi

UrbiOrbi

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

- Some animation "tweating" would be nice :

the AP one with the legs turned at 90° on the side ...

 

- Limit the use of pillory like stuff to the equiped zone/cells, yes it is a little bit disturbing to see a random bandit wandering with a ready to use pillory in his pocket :blush: .

- abillity to use other activator/stuff like the tables, chair, bench...

- maybe a tag restriction for the animation example :

 

use bed = yes then only not standing animations would start


  • 1

AdBot

AdBot
  • Advert

#622
Liuli

Liuli

    Enchantress

  • Members
  • PipPipPipPip
  • 515 posts

Could use a bit of script help. I'm almost done with a small mod, and I wonder if there's a function which triggers on a sexlab animation ending, to apply either a magic effect or a spell on one of the actors? Or can I only hook to the last stage and apply the effect when the last stage starts?


  • 0

#623
Ashal

Ashal

    Administrator

  • Administrators
  • 2,970 posts

You can hook the event "AnimationEnd" which is sent when sex ends just before sexlab releases the thread back into selection.


  • 0

#624
dkatryl

dkatryl

    Mega Poster

  • Contributor
  • PipPipPipPipPip
  • 1,861 posts

actor FindAvailableActor()

Idea for this one was given to by NYINEGY, and it's so obvious I feel stupid for having not added this function before.

 

It'll find a valid actor who is available for SexLab animation within the given radius of another actor or object. You can define what gender it is you want to find, or just ignore gender, and give it a list of up to 4 actors + the given center object/actor to forcibly ignore in the search radius.

If I am reading the FindAvailableActor() idea properly, that will be useful for adding spillover assailants to now properly assault your follower during player surrender. Spiffy!

 

Now, when you say valid actor available, would it consider an actor that is already tagged and in another animation as invalid.  So if I had 4 bandits, 2 were already paired off with the player, then FindAvailableActor() would only see bandit #3 & 4 as valid, and not try to grab #1 or 2?


  • 0

#625
Ashal

Ashal

    Administrator

  • Administrators
  • 2,970 posts

 

actor FindAvailableActor()

Idea for this one was given to by NYINEGY, and it's so obvious I feel stupid for having not added this function before.

 

It'll find a valid actor who is available for SexLab animation within the given radius of another actor or object. You can define what gender it is you want to find, or just ignore gender, and give it a list of up to 4 actors + the given center object/actor to forcibly ignore in the search radius.

If I am reading the FindAvailableActor() idea properly, that will be useful for adding spillover assailants to now properly assault your follower during player surrender. Spiffy!

 

Now, when you say valid actor available, would it consider an actor that is already tagged and in another animation as invalid.  So if I had 4 bandits, 2 were already paired off with the player, then FindAvailableActor() would only see bandit #3 & 4 as valid, and not try to grab #1 or 2?

 

 

 

If they are already animating they will be considered as invalid, and not returned from the function.

 

It checks for 3 things, in this order, before looking for a new actor or returning the one if it passes all 3:

  1. They aren't in the ignore list, which consists of actors manually ignored from the arguments, the actor/object used as the center of your search radius, any actor that has already failed the other 2 checks in a previous loop.
     
  2. If they match the gender, if any, you specified in the function arguments. 
     
  3. If they pass a sslActorLibrary.ValidateActor() check, which is the same check that gets called when attempting to add an actor to a scene. They will fail if they are
    • already in another scene
    • have the SexLabForbid keyword or are in the SexLab Forbidden Faction
    • are dead or disabled
    • don't have their 3d loaded into the cell
    • are currently flying (as of v1.25)
    • are a creature race that doesn't have a registered animation.

 

The function itself if interested:

actor function FindAvailableActor(ObjectReference centerRef, float radius = 5000.0, int findGender = -1, actor ignore1 = none, actor ignore2 = none, actor ignore3 = none, actor ignore4 = none)
	if centerRef == none || findGender > 2 || findGender < -1 || radius < 0
		return none ; // Invalid args
	endIf
	; // Create supression list
	form[] supress = new form[5]
	supress[0] = centerRef
	supress[1] = ignore1
	supress[2] = ignore2
	supress[3] = ignore3
	supress[4] = ignore4
	; // Attempt 30 times before giving up.
	int attempt = 30
	while attempt
		attempt -= 1
		; // Get random actor
		actor foundRef = Game.FindRandomActorFromRef(centerRef, radius)
		; // Validate actor
		int gender
		bool valid = foundRef != none && supress.Find(foundRef) == -1
		if valid
			; // Get their gender if we need it
			gender = GetGender(foundRef)
			; // Supress from future validation attempts
			supress = sslUtility.PushForm(foundRef, supress)
		endIf
		valid = valid && (findGender != 2 && gender != 2) ; // Supress creatures
		valid = valid && (findGender == -1 || findGender == gender) ; // Validate gender
		valid = valid && IsValidActor(foundRef) ; // Actor Validate
		if valid
			return foundRef ; // Actor passed validation, end loop/function
		endIf
	endWhile
	; // No actor found in attempts
	return none
endFunction

  • 3

#626
dkatryl

dkatryl

    Mega Poster

  • Contributor
  • PipPipPipPipPip
  • 1,861 posts

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


  • 0

#627
Liuli

Liuli

    Enchantress

  • Members
  • PipPipPipPip
  • 515 posts

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

#628
Ashal

Ashal

    Administrator

  • Administrators
  • 2,970 posts

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

#629
Liuli

Liuli

    Enchantress

  • Members
  • PipPipPipPip
  • 515 posts

Ah I see. :o

 

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


  • 0

#630
Bromm83

Bromm83

    Senior Member

  • Contributor
  • PipPipPipPip
  • 738 posts

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

#631
Bromm83

Bromm83

    Senior Member

  • Contributor
  • PipPipPipPip
  • 738 posts

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

#632
Liuli

Liuli

    Enchantress

  • Members
  • PipPipPipPip
  • 515 posts

 

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

#633
dkatryl

dkatryl

    Mega Poster

  • Contributor
  • PipPipPipPipPip
  • 1,861 posts

 

 

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

#634
Bromm83

Bromm83

    Senior Member

  • Contributor
  • PipPipPipPip
  • 738 posts

 

 

 

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

#635
D_ManXX2

D_ManXX2

    Mega Poster

  • Contributor
  • PipPipPipPipPip
  • 2,177 posts

I posted this in the other thread but since sexlab uses it now

http://skyrim.nexusmods.com/mods/44596

MFG released a new version who fixes pc eye blinking and also adding new option to MFG new version 1.1


  • 0

#636
Shaomarc

Shaomarc

    Member

  • Members
  • PipPip
  • 28 posts

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

#637
Ashal

Ashal

    Administrator

  • Administrators
  • 2,970 posts

This is NOT a tech support thread. Goto http://www.loverslab...-read-me-first/


  • 0

#638
dkatryl

dkatryl

    Mega Poster

  • Contributor
  • PipPipPipPipPip
  • 1,861 posts

 

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

#639
ballsy

ballsy

    wot

  • Members
  • PipPipPipPip
  • 273 posts

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

#640
Stiletos

Stiletos

    Member

  • Members
  • PipPip
  • 17 posts

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