Jump to content

Sexlab Scripting and Modding Tutorials w/ How too Video and example script downloads


Guest

Recommended Posts

Posted
3 hours ago, DayTri said:

 

Sorry my example was bad, this function is defined in SexlabFramework.psc so you need to have a sexlab property and call it like: sexlab.GetCreatureAnimationsByRaceTags(...)

 

Nah, it was my bad should have guessed that

 

This script works now

 

actor[] sexActors = new actor[2]
sexActors[0] = akSpeaker
sexActors[1] = Game.GetPlayer()

sslBaseAnimation[] anims
ActorBase PlayerBase = Game.GetPlayer().GetActorBase()
ActorBase NPCBase = akspeaker.GetActorBase()

Keyword KWCreature = Keyword.GetKeyword("009Merilyn_KYWD_IsGiantess")
anims = sexlab.GetCreatureAnimationsByRaceTags(2, akspeaker.GetRace(), "FC", "Necro,gone,Panicforever", RequireAll=true)


Debug.Notification("Number of animations: " + anims.length)
SexLab.StartSex(sexActors, anims)

 

The coiche of multiple tags work.

 

I noticed that the sexlab integrated have weird tags.

I fond SLATE a mod with which you can edit the tags of the normal animations.

 

Unfortunately it doesn't work on creature animations.

 

So i have the choice to miss one animation when i use the tags above or, when changing them have all animation i want but one i don't want.

 

i know it is better to get the animations by tag, because you don't know what animations the user has installed, but is it possible to "deselect" a certain animation from the anims array, if it's activated. or to check animations by name and if activated to add them to the array?

 

Sorry for being such a pain in the ass ;-)

Posted
On 7/28/2021 at 4:53 PM, noreg said:

 

Nah, it was my bad should have guessed that

 

This script works now

 

actor[] sexActors = new actor[2]
sexActors[0] = akSpeaker
sexActors[1] = Game.GetPlayer()

sslBaseAnimation[] anims
ActorBase PlayerBase = Game.GetPlayer().GetActorBase()
ActorBase NPCBase = akspeaker.GetActorBase()

Keyword KWCreature = Keyword.GetKeyword("009Merilyn_KYWD_IsGiantess")
anims = sexlab.GetCreatureAnimationsByRaceTags(2, akspeaker.GetRace(), "FC", "Necro,gone,Panicforever", RequireAll=true)


Debug.Notification("Number of animations: " + anims.length)
SexLab.StartSex(sexActors, anims)

 

The coiche of multiple tags work.

 

I noticed that the sexlab integrated have weird tags.

I fond SLATE a mod with which you can edit the tags of the normal animations.

 

Unfortunately it doesn't work on creature animations.

 

So i have the choice to miss one animation when i use the tags above or, when changing them have all animation i want but one i don't want.

 

i know it is better to get the animations by tag, because you don't know what animations the user has installed, but is it possible to "deselect" a certain animation from the anims array, if it's activated. or to check animations by name and if activated to add them to the array?

 

Sorry for being such a pain in the ass ;-)

 

Well you can get the array, and then if there are ones in it you know you don't like, just remove them from the array. For adding specific ones by name only if they are around, I think the "get by name" functions should return None if none have that name, so you could use that to check somehow.

Posted

I want to thank you for your good English. I watch your lessons on YouTube with subtitles created automatically and everything is clear to me (Yes, in the 21st century there are still people who do not know English, sorry)

Posted
1 hour ago, wprarr said:

I want to thank you for your good English. I watch your lessons on YouTube with subtitles created automatically and everything is clear to me (Yes, in the 21st century there are still people who do not know English, sorry)

Glad they helped you, no need for sorry, in reality we should all be multilingual :)

Posted (edited)

I'm stuck with the compile. It keeps giving me blank error . I use MO , i have folder \scripts\Source with all the sources from skyrim skse sexlab in there but i can't even compile a scene facepalm 

image_2021-08-05_180240.png

Edited by kboom
Posted
4 hours ago, kboom said:

I'm stuck with the compile. It keeps giving me blank error . I use MO , i have folder \scripts\Source with all the sources from skyrim skse sexlab in there but i can't even compile a scene facepalm 

 

 

Can you post the script please?

Posted

Hi again folks, my script works now regarding to the animations everything runs as intended.

We have a sexy giantess with custom clothes, when the seks starts the PC undresses but not the giantess, i think she is not recognized as an "undressable" race.

 

I'm using this to undress her before the animation starts:

    akspeaker.SetOutfit(NakedOutfit)   ; given as a outfit property for the script
    aKspeaker.removeitem(equippedWeapon) 

 

The undressing works perfect.. but the problem is the redressing when the animation ends.

 

I added this code before the fragment code:

 

actor glb_aKspeaker

event AnimationEnd(int threadID, bool HasPlayer)
    glb_aKspeaker.SetOutfit(DefaultOutfit)
    glb_aKspeaker.additem(equippedWeapon)  
    unRegisterForModEvent("HookAnimationEnd")
endevent

 

and this within the fragment code:

 

glb_aKspeaker = akSpeakerRef as Actor

RegisterForModEvent("HookAnimationEnd", "AnimationEnd")

 

 

Compiles nut i don't even see messages in the console regarding the redressing.

Do you have any ideas what i did wrong?

 

thanks in advance.

Posted
2 hours ago, kboom said:

it's just simple script SetObjectiveDisplayed(0)

Is ist part of a kmy-Quest?

 

then test

GetOwningQuest().SetObjectiveDisplayed(0)

 

otherwise the whole thing should look like

 

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname <Name of your script> Extends Quest Hidden

 

;BEGIN FRAGMENT Fragment_0
Function Fragment_0()
;BEGIN CODE
QuestName.SetObjectiveDisplayed(0)
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment


Quest Property QuestName  Auto  

 

  • 3 weeks later...
Posted

Anyone know a simple way to implement sex between 3-5 actors. Via dialogue and or scenes.

 

Using previous posts I put this together:

 

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 2
Scriptname DFA_OrgyRandomScript Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_1
Function Fragment_1(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor


;BEGIN CODE
actor[] sexActors = new actor[3]
sexActors[0] = Game.GetPlayer()
sexActors[1] = akSpeaker
sexActors[2] = (Argis.GetRef() as Actor)
sslBaseAnimation[] anims
anims = SexLab.GetAnimationsByTag(3, "MMF, FMM",tagSuppress="Fisting")
SexLab.StartSex(sexActors, anims)
Debug.notification("......")
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

ReferenceAlias Property Argis  Auto
SexLabFramework property SexLab auto

 

I've done this and one that has 5 actors all defined with quest aliases. I'm not good at scripting but I plug and play pretty well if given an outline to work with. This and the script with 5 actors compiled but when I try to initiate in-game actors 3-5 return a "None" in the debug, saying something about them being undefined or not being able to find them or something. I thought at first it was because I was using aliases that pointed to a Faction and not specific NPCs but even that didn't work. I've gone over what little I can understand in the Framework Script Guide and SL archived Gitlab pages but they only talk about individual parts of the scripting not examples of putting it together so it's all a bit much for me. The script it's self is working in game because the Debug message is displayed at least, along with the None, None, None for the extra actors past 2. I have looked at other mods psc that involve 3-5 actors but they all had a lot of extra stuff to the point that I wasn't sure. I know i'm missing something and I'd just like to be given some clue. I suspect you can't trigger sex between more than 2 actors via dialogue, at least not with extends TopicInfo, but i'd love some confirmation.

 

I did get this one from the video and similar scripts, between just the PC and 1 other, working fine and i've gotten loads of none-sexlab related scripts working (with a lot of in depth guides/PlugandPlay).

 

sexActors[0] = Game.GetPlayer()
sexActors[1] = akSpeaker
sslBaseAnimation[] anims
anims = SexLab.GetAnimationsByTag(2, "Cowgirl",tagSuppress="Fisting")
SexLab.StartSex(sexActors, anims)
Debug.notification(".....")

Posted
24 minutes ago, GunslingerGirl93 said:

Anyone know a simple way to implement sex between 3-5 actors. Via dialogue and or scenes.

 

Using previous posts I put this together:

 

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 2
Scriptname DFA_OrgyRandomScript Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_1
Function Fragment_1(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor


;BEGIN CODE
actor[] sexActors = new actor[3]
sexActors[0] = Game.GetPlayer()
sexActors[1] = akSpeaker
sexActors[2] = (Argis.GetRef() as Actor)
sslBaseAnimation[] anims
anims = SexLab.GetAnimationsByTag(3, "MMF, FMM",tagSuppress="Fisting")
SexLab.StartSex(sexActors, anims)
Debug.notification("......")
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

ReferenceAlias Property Argis  Auto
SexLabFramework property SexLab auto

 

I've done this and one that has 5 actors all defined with quest aliases. I'm not good at scripting but I plug and play pretty well if given an outline to work with. This and the script with 5 actors compiled but when I try to initiate in-game actors 3-5 return a "None" in the debug, saying something about them being undefined or not being able to find them or something. I thought at first it was because I was using aliases that pointed to a Faction and not specific NPCs but even that didn't work. I've gone over what little I can understand in the Framework Script Guide and SL archived Gitlab pages but they only talk about individual parts of the scripting not examples of putting it together so it's all a bit much for me. The script it's self is working in game because the Debug message is displayed at least, along with the None, None, None for the extra actors past 2. I have looked at other mods psc that involve 3-5 actors but they all had a lot of extra stuff to the point that I wasn't sure. I know i'm missing something and I'd just like to be given some clue. I suspect you can't trigger sex between more than 2 actors via dialogue, at least not with extends TopicInfo, but i'd love some confirmation.

 

I did get this one from the video and similar scripts, between just the PC and 1 other, working fine and i've gotten loads of none-sexlab related scripts working (with a lot of in depth guides/PlugandPlay).

 

sexActors[0] = Game.GetPlayer()
sexActors[1] = akSpeaker
sslBaseAnimation[] anims
anims = SexLab.GetAnimationsByTag(2, "Cowgirl",tagSuppress="Fisting")
SexLab.StartSex(sexActors, anims)
Debug.notification(".....")

Have you set the property for Argis? Is Argis in the area, or is the alias not filling?

 

You can trigger sex with more than 2 but they have to be near by and in the Alias, if you created the alias in game when the quest is already running in a save alot of times the alias will not fill.

Posted
1 hour ago, -Caden- said:

Have you set the property for Argis? Is Argis in the area, or is the alias not filling?

 

You can trigger sex with more than 2 but they have to be near by and in the Alias, if you created the alias in game when the quest is already running in a save alot of times the alias will not fill.

 

Argis was nearby though I'm curious about the range it needs to pick up extra actors if it's triggered by dialogue, do you know?

I also decided to delete my previous scripts and redo the alias properties. I had 2 dialogue choices. 1 for a threesome. 1 for a foursome. It wasn't a new game but it was Start Game Enabled with an SEQ. Foursome triggered multiple times with testing. The threesome did not. I suppose you're right about this alias problem or I was just triggering them too close together. I know I need an entirely new game since scripts are involved but I've been testing this and other things in multiple ways with a new game every time so I was getting kind of annoyed earlier and just tested it as is. I suppose I'll fiddle around with it since I know it can actually work. Moving on from specific aliases, I was planning on testing faction aliases for a very basic prostitution system...... should be fun.

  • 2 weeks later...
Posted

Hi Folk, i am once again asking for your support ?

 

I have three custom races (which uses the giant skeleton) which i want to start snusnu with.

 

So i added this to the sslCreatureAnimationSlots.psc

 

Spoiler

    ClearRaceKey("Giants")
    AddRaceID("Giants", "GiantRace")
    AddRaceID("Giants", "DLC2GhostFrostGiantRace")
    AddRaceID("Giants", "_00GiantFrostRace")
    AddRaceID("Giants", "009Merilyn_DariaRace")
    AddRaceID("Giants", "009Merilyn_GiantRace")
    AddRaceID("Giants", "009Merilyn_MiosotisRace")

 

 

 

This is my script for having cowgirl sex with the Giantess which has the RaceID: 009Merilyn_DariaRace

 

Spoiler

Scriptname _009Merilyn_Daria_Sex_Cowgirl Extends TopicInfo Hidden

SexLabFramework Property SexLab auto
_009Merilyn_GiantSex_Questvariables Property QuestName Auto
;Race Property Raceref auto
Outfit Property NakedOutfit Auto
Armor Property JewelryRingSilver Auto
Outfit Property DefaultOutfit Auto
WEAPON Property equippedWeapon  Auto  

 

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)

;BEGIN CODE
Actor akSpeaker = akSpeakerRef as Actor

actor[] sexActors = new actor[2]
sexActors[0] = akSpeaker
sexActors[1] = Game.GetPlayer()

sslBaseAnimation[] giantesscowgirlanims
ActorBase PlayerBase = Game.GetPlayer().GetActorBase()
ActorBase NPCBase = akspeaker.GetActorBase()
Race Raceref = akspeaker.getrace()
String giantRaceKey = "Giants"
Keyword KWCreature = Keyword.GetKeyword("009Merilyn_KYWD_IsGiantess")

RegisterForModEvent("HookAnimationEnd", "AnimationEnd")


giantesscowgirlanims = sexlab.GetCreatureAnimationsByRaceKeyTags(2, giantRaceKey, "FC,Cowgirl", "Necro", RequireAll=true)

 

 

This script works with the Dariarace

but not with the other two, despite they are defined in the racekey.

 

I get errormessages

 

Spoiler

grafik.png.85c1ed8c6278a2379f9270ce6000155b.png

 

grafik.png.90782e63219c613a582d3fcdeae5de52.png

 

Could anybody tell me what i missed?

 

It is some dumb thing for sure.

 

Thanks for your help

 

 

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   1 member

×
×
  • Create New...