Jump to content

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


Recommended Posts

25 minutes ago, jap2015 said:

If you can explain how your attempts failed, someone will be more than willing to help you with that.

 

How did "Is it possible for my idea to work" turn into "I'm disappointed because I thought you would take someone else's mod, break it down, rewrite it to make it do what I want."

 

all I can do is shrug

Link to comment

Been playing around with scenes and had the bright idea of duplicating a vanilla scene and expanding on it. In the process of copying, I broke an original scene by somehow deleting 1 phase and the script that was attached to it. All my attempts to restore the original scene with back-ups have failed, even uninstalling and reinstalling game. Any idea how to fix my screw-up?

Link to comment
9 minutes ago, jap2015 said:

Been playing around with scenes and had the bright idea of duplicating a vanilla scene and expanding on it. In the process of copying, I broke an original scene by somehow deleting 1 phase and the script that was attached to it. All my attempts to restore the original scene with back-ups have failed, even uninstalling and reinstalling game. Any idea how to fix my screw-up?

 

Load your mod up in xEdit and look for the Scene you overwrote. Then delete the entry which causes the bug inside your mod

Link to comment
4 hours ago, Scrab said:

 

Load your mod up in xEdit and look for the Scene you overwrote. Then delete the entry which causes the bug inside your mod

Thanks for the reply. I tried your suggestion and replace all the esm's with my back-ups and still no luck.

So I completely deleted my plugin, then reinstalled game again. Still, the original scene is borked.

 

Link to comment
Guest AthenaESIV

Thank you for putting this together, it has been really helpful in making some updates to a mod that's about to release some big updates this summer.

 

Look forward to your mods updates and more of these guides!

Link to comment
2 hours ago, AthenaESIV said:

Thank you for putting this together, it has been really helpful in making some updates to a mod that's about to release some big updates this summer.

 

Look forward to your mods updates and more of these guides!

Thank you and glad you enjoy them, after I release this update this weekend, i will work on voicing Make Skyrim Straight again, but will release a couple tutorials first, , how to make a scene just happen with followers and in-depth on properties in scripts, will be releasing a "Full mod Trailer tonight, 4 minutes long, I think i have more fun making videos lol

Link to comment

I'm using "MY Sex Mod", and added the "MY Scenes Quest" to it. The Hulda and Saadia aliases are set up like in the Scenes tutorial and the scene plays out perfectly. So, my next step is trying to get an alias into my sex script.  Do I need to edit the Aliases, the properties, or the script?  Here is a pic of me adding a script to the handler: 

Could you point in the right direction...if it's to involved, don't hesitate to say so. I can wait for later videos.

 

Spoiler
  • Scripts.jpg.f0ad5f0a26e5c073d1855d807880968d.jpg

 

Edited by jap2015
Link to comment
49 minutes ago, jap2015 said:

I'm using "MY Sex Mod", and added the "MY Scenes Quest" to it. The Hulda and Saadia aliases are set up like in the Scenes tutorial and the scene plays out perfectly. So, my next step is trying to get an alias into my sex script.  Do I need to edit the Aliases, the properties, or the script?  Here is a pic of me adding a script to the handler: 

Could you point in the right direction...if it's to involved, don't hesitate to say so. I can wait for later videos.

 

  Hide contents
  • Scripts.jpg.f0ad5f0a26e5c073d1855d807880968d.jpg

 

will show you how when i get home tonight

 

Link to comment
1 hour ago, jap2015 said:

Do I need to edit the Aliases, the properties, or the script?

 

An Alias isnt an Actor

Think of an Alias as something like a sticker, the game picks some object (in this case your actors) and puts a sticker on them "Thats my Saadia-Reference over there!" 

If you as the programmer want to reference the Actor that the sticker is put on, you need to tell the game to stop staring at the bloody sticker and instead tell you what exactly is wearing the sticker. You do that by calling "GetReference()" on the Alias Object ( sexActors[0] = Saadia.GetReference() )

Now we got our Object that is wearing the sticker, unfortunately our game is a blind monke that forgot its glasses at home, it only sees a wishy washy figure there in the world but cant differentiate if this figure is an Actor or a House or a Tree or so. Lucky for you the game is very naive so you can just tell it that the thing there is an Actor and it will do that, so you just write sexActors[0] = Saadia.GetReference() as Actor

and should be done, now just do the same for the other 2 References

 

On a side note, because the game is such a blind, naive monke, you can tell them that a House is an Actor too and it will believe it, issue is just that when it then tries to fit the House into an "Actor" container (which has a different shape than the "static" container which the house is originally from) the game cant fit it in and will just ditch the house. That can be used to analyze certain objects if youre a bit more experienced :) 

 

Edited by Scrab
Link to comment

@Scrab

Wow, that worked on my first try.  That's a huge step forward for me and still a long ways to go till I really get it . Thanks for the explanation and your whit ? 

 

@-Caden-

Thank you too ?

 

Edit: Even though the script complied, it wouldn't play in game. Then it dawned on me what "now just do the same for the other 2 References" meant.

So, I added Player as an alias and used "sexActors[1] = Player.GetReference() as Actor" instead of "sexActors[1] = Game.GetPlayer()" and it worked.

 

Edited by jap2015
update
Link to comment
4 hours ago, jap2015 said:

@Scrab

Wow, that worked on my first try.  That's a huge step forward for me and still a long ways to go till I really get it . Thanks for the explanation and your whit ? 

 

@-Caden-

Thank you too ?

 

Edit: Even though the script complied, it wouldn't play in game. Then it dawned on me what "now just do the same for the other 2 References" meant.

So, I added Player as an alias and used "sexActors[1] = Player.GetReference() as Actor" instead of "sexActors[1] = Game.GetPlayer()" and it worked.

 

Very nice glad it worked for you

If you had a Alias named Hulda and a Alias named Saadia you can use the alias for sex as well first open up your source and put these lines under everything else:

 

SexLabFramework Property SexLab auto

ReferenceAlias Property Hulda  Auto

ReferenceAlias Property Saadia  Auto

 

Then save/compile

 

Then open properties and make sure they are All set right, example Hulda would be set to the alias you have as Hulda

 

Then once thats all done set your Script:

 

actor[] sexActors = new actor[2]
sexActors[0] = (Saadia.GetRef() as Actor)
sexActors[1] = (Hulda.GetRef() as Actor)
sslBaseAnimation[] anims
anims = SexLab.GetAnimationsByTag(2, "Blowjob",tagSuppress="Fisting")
SexLab.StartSex(sexActors, anims)

 

and compile, if your properties are set right this will work as well

 

If you wanted a threesome then:

 

actor[] sexActors = new actor[3]
sexActors[0] = Game.GetPlayer()
sexActors[1] = (Saadia.GetRef() as Actor)
sexActors[2] = (Hulda.GetRef() as Actor)
sslBaseAnimation[] anims
anims = SexLab.GetAnimationsByTag(3, "MMF, FMM",tagSuppress="Fisting")
SexLab.StartSex(sexActors, anims)

 

 

 

 

 

 

 

 

Edited by Guest
Link to comment

@-Caden-

Thanks for the tips and will put them to use. I was excited that I finally compiled a script that worked (although probably archaic)  and didn't involve using player or akSpeaker.

so it increases the types of scenes I can make. It won't be long before I hit the next wall, but today was a good day.

I tried that same threesome code on my scene but it wouldn't trigger in game. That was before I set up the player with an alias and I didn't try it again, but I will now.

Looking forward to your updates and your new revamped follower.

Link to comment
  • 2 weeks later...
  • 3 weeks later...

I would love to make a blackmail mod. How do i make an NPC forcegreet PC ? or even make an NPC undress PC on sight. The last one would look not nice without animations i guess but i can live with that. At least making the NPC move towards PC would be a nice handler. I want to go back playing Skyrim with heavliy modded by Loverslab mods but i want something of my taste in the game more. Get Stripped is a nice force undress mod but it is buggy when playing animations while naked but thats the whole point. Troubles of Heroine has an NPC in Solitude who undresses PC on sight in every in game hour or so which is not buggy and i want more NPC across Skyrim who does this. Maybe even a forcegreet outcome depending on PC's answer to blackmailer like not giving gold or something if i can figure these out. I watched your video from download section and from youtube "how to script sexlab" video. I think all i can do with them is creating dialoges that ends up with aggressive animations but no forcegreet or undress outcome.

Link to comment
9 minutes ago, TwiceSwords said:

I would love to make a blackmail mod. How do i make an NPC forcegreet PC ? or even make an NPC undress PC on sight. The last one would look not nice without animations i guess but i can live with that. At least making the NPC move towards PC would be a nice handler. I want to go back playing Skyrim with heavliy modded by Loverslab mods but i want something of my taste in the game more. Get Stripped is a nice force undress mod but it is buggy when playing animations while naked but thats the whole point. Troubles of Heroine has an NPC in Solitude who undresses PC on sight in every in game hour or so which is not buggy and i want more NPC across Skyrim who does this. Maybe even a forcegreet outcome depending on PC's answer to blackmailer like not giving gold or something if i can figure these out. I watched your video from download section and from youtube "how to script sexlab" video. I think all i can do with them is creating dialoges that ends up with aggressive animations but no forcegreet or undress outcome.

I am taking a break for alittle bit cause the big mods kinda burnt me out, but a way to learn it is to take the mod that is doing it and open I up and look at the scripts, when I get back into this in a few weeks, I will make a tutorial on forcgreets, the conditions foe a force greet package and/or how to do it thru an Alias with a "timer" and a strip script.

Link to comment

 

28 minutes ago, TwiceSwords said:

I would love to make a blackmail mod. How do i make an NPC forcegreet PC ? or even make an NPC undress PC on sight. The last one would look not nice without animations i guess but i can live with that. At least making the NPC move towards PC would be a nice handler. I want to go back playing Skyrim with heavliy modded by Loverslab mods but i want something of my taste in the game more. Get Stripped is a nice force undress mod but it is buggy when playing animations while naked but thats the whole point. Troubles of Heroine has an NPC in Solitude who undresses PC on sight in every in game hour or so which is not buggy and i want more NPC across Skyrim who does this. Maybe even a forcegreet outcome depending on PC's answer to blackmailer like not giving gold or something if i can figure these out. I watched your video from download section and from youtube "how to script sexlab" video. I think all i can do with them is creating dialoges that ends up with aggressive animations but no forcegreet or undress outcome.

 

Use MQ201 stage 98 as a model.

 

This is where Delphine takes all your gear and transfers it to her chest in her basement.

 

You need to make a container to store the items set that container up with a reference alias so you can script it in.

In this case, It's a basic barrel base edited for a unique instance, then the reference alias was linked to it in the quest.

image.png.2b76df833ef400a246cd9645f2c64422.png

 

then in your dialogue, create a script.

 

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

referencealias Property Alias_PlayerGearContainer Auto

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
Game.GetPlayer().removeAllItems(Alias_PlayerGearContainer.GetReference(), true)
;END CODE
EndFunction
;END FRAGMENT

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

 

All the player's items will move to the barrel.

 

 

Edited by Guest
Link to comment
1 hour ago, -Caden- said:

I am taking a break for alittle bit cause the big mods kinda burnt me out, but a way to learn it is to take the mod that is doing it and open I up and look at the scripts, when I get back into this in a few weeks, I will make a tutorial on forcgreets, the conditions foe a force greet package and/or how to do it thru an Alias with a "timer" and a strip script.

 

This doesn't have a forcegreet. I had to insert a "placeholder" dialogue to trigger it. But there are plenty of tutorials on forcegreets. Also, if you want to make it look like the NPC is actually taking the items, that's going to get tricky. The best way I can think to do that is to try to work on the timing, and in the dialogue menus is CK where you have to link to your audio and lip files, you can also set idle animations between player and NPC. You can try to use IdleTake as a selection in the dropdown. It's not much, it's just a hand reaching out and that's about it. But it's better than nothing.......maybe?

 

 

You can set the NPC as the alias reference, and the NPC will take possession of the PC's belongings, but keep in mind, if the PCs items are in the NPC's inventory, they will attempt to equip gear that is considered an upgrade.

 

Although, that could be interesting too, I guess.

 

Edited by Guest
Link to comment

I searched for forcegreet tutorial and made it happen (i think. I didn't get the chance to test it because of errors below).

I tried both your method and simply this Game.GetPlayer().UnequipAll() but got compile fails. This is the fail from unequipall:

 

Starting 1 compile threads for 1 files...
Compiling "TIF__02001837"...
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Perk.psc(24,21): unknown type leveleditem
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Perk.psc(25,56): unknown type leveleditem
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\MagicEffect.psc(72,23): unknown type impactdataset
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\MagicEffect.psc(73,40): unknown type impactdataset
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\MagicEffect.psc(78,28): unknown type imagespacemodifier
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\MagicEffect.psc(79,45): unknown type imagespacemodifier
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Actor.psc(454,28): unknown type idle
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Actor.psc(457,38): unknown type idle
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(251,57): unknown type imagespacemodifier
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(391,8): variable ActorValueInfo is undefined
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(391,23): none is not a known user-defined type
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(391,59): none is not a known user-defined type
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(391,1): cannot return a none from getskilllegendarylevel, the types do not match (cast missing or types unrelated)
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(397,1): variable ActorValueInfo is undefined
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(397,16): none is not a known user-defined type
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(397,52): none is not a known user-defined type
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\ObjectReference.psc(477,45): unknown type impactdataset
No output generated for TIF__02001837, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on TIF__02001837

 

Something as simple as this gives this much error. Doesn't make any sense to me.

Edited by TwiceSwords
Link to comment

Those errors are thrown when you attempt to reference something that the script doesn't know what it is. For example, you are specifically referencing an actor, so you need to create an alias for that actor in the quest. Take a look at how MQ201 adds Delphine as an Alias in the quest, then makes a reference to that alias in the script. It means you need to do something similar. Then add that reference line into the script. 

 

Any object used by the quest has to be known to the script you are compiling.  Also, if your script references other mods, Make sure those mods are active in your load order when you launch CK and that all the files are loose.  I didn't see any references in your error to them, but often times, you will need to make sure the BSA files are unpacked and loose for mods like FNIS, RaceMenu, SKYUI, etc. Very commonly, your compiler will need to be able to read the scripts in those mods too.

 

 

In that 1st error you have a referece to an SKSE script (At least I think it is) called Perk.psc (Script source)

In the error it's saying 24,21

Looking at that script, line 24 position 21

 

LveledItem Function GetNthEntryLeveledList(int n) native

 

position 21 ends after the word Function. meaning "GetNthEntryLeveledList"

 

so you need to create an alias for whatever leveled item this line is trying to reference in your quest.

Edited by Guest
Link to comment
6 hours ago, TwiceSwords said:

I searched for forcegreet tutorial and made it happen (i think. I didn't get the chance to test it because of errors below).

I tried both your method and simply this Game.GetPlayer().UnequipAll() but got compile fails. This is the fail from unequipall:

 

Starting 1 compile threads for 1 files...
Compiling "TIF__02001837"...
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Perk.psc(24,21): unknown type leveleditem
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Perk.psc(25,56): unknown type leveleditem
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\MagicEffect.psc(72,23): unknown type impactdataset
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\MagicEffect.psc(73,40): unknown type impactdataset
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\MagicEffect.psc(78,28): unknown type imagespacemodifier
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\MagicEffect.psc(79,45): unknown type imagespacemodifier
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Actor.psc(454,28): unknown type idle
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Actor.psc(457,38): unknown type idle
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(251,57): unknown type imagespacemodifier
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(391,8): variable ActorValueInfo is undefined
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(391,23): none is not a known user-defined type
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(391,59): none is not a known user-defined type
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(391,1): cannot return a none from getskilllegendarylevel, the types do not match (cast missing or types unrelated)
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(397,1): variable ActorValueInfo is undefined
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(397,16): none is not a known user-defined type
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Game.psc(397,52): none is not a known user-defined type
C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\ObjectReference.psc(477,45): unknown type impactdataset
No output generated for TIF__02001837, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on TIF__02001837

 

Something as simple as this gives this much error. Doesn't make any sense to me.

 

10 minutes ago, bishlapped said:

I need to correct something in my previus post about perks.

In that 1st error you have a referece to an SKSE script (At least I think it is) called Perk.psc (Script source)

That script is posted below:

In the error it's saying 24,21

That's line 24, 21'st character. Line 24 is 

 

LveledItem Function GetNthEntryLeveledList(int n) native

 

position 21 ends after the word Function. meaning "GetNthEntryLeveledList"

so you need to create an alias for whatever leveled item this line is trying to reference in your quest.

 

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

 

Scriptname Perk extends Form Hidden


; SKSE additions built 2015-05-24 00:46:48.937000 UTC
Perk Function GetNextPerk() native

int Function GetNumEntries() native

int Function GetNthEntryRank(int n) native
bool Function SetNthEntryRank(int n, int rank) native

int Function GetNthEntryPriority(int n) native
bool Function SetNthEntryPriority(int n, int priority) native

Quest Function GetNthEntryQuest(int n) native
bool Function SetNthEntryQuest(int n, Quest newQuest) native

int Function GetNthEntryStage(int n) native
bool Function SetNthEntryStage(int n, int stage) native

Spell Function GetNthEntrySpell(int n) native
bool Function SetNthEntrySpell(int n, Spell newSpell) native

LeveledItem Function GetNthEntryLeveledList(int n) native
bool Function SetNthEntryLeveledList(int n, LeveledItem lList) native

string Function GetNthEntryText(int n) native
bool Function SetNthEntryText(int n, string newText) native

float Function GetNthEntryValue(int n, int i) native
bool Function SetNthEntryValue(int n, int i, float value) native

 

 

I am pretty sure these errors are all because of missing files, not anything to do with aliases. For example, this:

 

C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Actor.psc(454,28): unknown type idle

 

means that in the script Actor.psc, and unknown type Idle is being referenced. Actor.psc is a script that comes in the base game, and is overridden by SKSE. When it sees type "Idle", it is looking for Idle.psc. This is also a script that comes with the base game, but it is not overridden by SKSE, and also you don't seem to have it in your Scripts/Source directory.

 

Almost certainly, your problem is that you are missing the source files for the scripts that come with Skyrim out of the box. You need to find Scripts.rar in your Skyrim/Data  directory where you have installed the game.

 

If you are using a mod manager, you can either extract scripts.rar into the data folder (the correct path for the files should be Skyrim/Data/Scripts/Source/Idle.psc for source files, and Skyrim/Data/Scripts/Idle.pex for compiled scripts). You could also try to get your mod manager to handle Scripts.rar as a mod, but they are all vanilla files so IMO it's fine to just dump them into the installation folder.

 

If you are not using a mod manager or you have other mods you've already installed into your base install folder, then when you extract this folder make sure not to overwrite any existing files, for example the SKSE script or source files that seem to already be in your installation.

 

Good luck~

Link to comment
42 minutes ago, DayTri said:

 

 

 

I am pretty sure these errors are all because of missing files, not anything to do with aliases. For example, this:

 

C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source\Actor.psc(454,28): unknown type idle

 

means that in the script Actor.psc, and unknown type Idle is being referenced. Actor.psc is a script that comes in the base game, and is overridden by SKSE. When it sees type "Idle", it is looking for Idle.psc. This is also a script that comes with the base game, but it is not overridden by SKSE, and also you don't seem to have it in your Scripts/Source directory.

 

Almost certainly, your problem is that you are missing the source files for the scripts that come with Skyrim out of the box. You need to find Scripts.rar in your Skyrim/Data  directory where you have installed the game.

 

If you are using a mod manager, you can either extract scripts.rar into the data folder (the correct path for the files should be Skyrim/Data/Scripts/Source/Idle.psc for source files, and Skyrim/Data/Scripts/Idle.pex for compiled scripts). You could also try to get your mod manager to handle Scripts.rar as a mod, but they are all vanilla files so IMO it's fine to just dump them into the installation folder.

 

If you are not using a mod manager or you have other mods you've already installed into your base install folder, then when you extract this folder make sure not to overwrite any existing files, for example the SKSE script or source files that seem to already be in your installation.

 

Good luck~

Sorry, yes, I mentioned unpacking bsa's from other mods, but I forgot to mention unzipping Scripts.rar. Thanks.

When I referenced that script in my install, I just assumed it would be in his as well. I completely forgot that I had to unpack that file 1st. But also, depending on how his quest references, his NPC, he may require an Alias. But yeah, before that, I'd have to back track here and go with what @DayTri said 1st.

Edited by Guest
Link to comment

HAHA!

These are just antics.

I'm working on one that's a bit more serious. I'll probably turn it into a scene and put it in a quest......maybe

 

Edited by Guest
Link to comment

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use