Jump to content

ATTENTION SEXLAB MOD MAKERS: Important questions


Recommended Posts

Something like the following so you and other don't have to rewrite existing scripts that extends sslBaseAnimation

scriptname zzEstrusChaurusSex01 extends sslBaseAnimation

function LoadAnimation()
	name = "Chaurus 01"

	SetContent(Sexual)
	SetSFX(Squishing)

	int a1 = AddPosition(Female, addCum=Anal)
	AddPositionStage(a1, "EC_FEMc000", 0)
	AddPositionStage(a1, "EC_FEMc001", 0)
	AddPositionStage(a1, "EC_FEMc002", 0)
	AddPositionStage(a1, "EC_FEMc003", 0)

	int a2 = AddPosition(Male)
	AddPositionStage(a2, "EC_CHAc000", 0)
	AddPositionStage(a2, "EC_CHAc001", 0)
	AddPositionStage(a2, "EC_CHAc002", 0)
	AddPositionStage(a2, "EC_CHAc003", 0)

	AddTag("Chaurus")
	AddTag("Bite")
	BypassKeyword("ActorTypeCreature")
endFunction
Link to comment

 

Something like the following so you and other don't have to rewrite existing scripts that extends sslBaseAnimation

scriptname zzEstrusChaurusSex01 extends sslBaseAnimation

function LoadAnimation()
	name = "Chaurus 01"

	SetContent(Sexual)
	SetSFX(Squishing)

	int a1 = AddPosition(Female, addCum=Anal)
	AddPositionStage(a1, "EC_FEMc000", 0)
	AddPositionStage(a1, "EC_FEMc001", 0)
	AddPositionStage(a1, "EC_FEMc002", 0)
	AddPositionStage(a1, "EC_FEMc003", 0)

	int a2 = AddPosition(Male)
	AddPositionStage(a2, "EC_CHAc000", 0)
	AddPositionStage(a2, "EC_CHAc001", 0)
	AddPositionStage(a2, "EC_CHAc002", 0)
	AddPositionStage(a2, "EC_CHAc003", 0)

	AddTag("Chaurus")
	AddTag("Bite")
	BypassKeyword("ActorTypeCreature")
endFunction

 

 

1.20 animations no longer extend sslBaseAnimation at all. They are dynamically installed into open animation slots via mod events.

 

Here's an example of adding 2 animations in 1.20

scriptname sslAnimationDefaults extends sslAnimationFactory

function LoadAnimations()
	RegisterAnimation("ArrokBlowjob")
	RegisterAnimation("ArrokBoobjob")
endFunction

function ArrokBlowjob(string eventName, string id, float argNum, form sender)
	Name = "Arrok Blowjob"

	SetContent(Sexual)
	SetSFX(Sucking)

	int a1 = AddPosition(Female, addCum=Oral)
	AddPositionStage(a1, "Arrok_Blowjob_A1_S1", 0, silent = true, openMouth = true)
	AddPositionStage(a1, "Arrok_Blowjob_A1_S2", 0, silent = true, openMouth = true)
	AddPositionStage(a1, "Arrok_Blowjob_A1_S2", 0, silent = true, openMouth = true)
	AddPositionStage(a1, "Arrok_Blowjob_A1_S3", 0, silent = true, openMouth = true)

	int a2 = AddPosition(Male)
	AddPositionStage(a2, "Arrok_Blowjob_A2_S1", -120, side = -3.5, sos = -1)
	AddPositionStage(a2, "Arrok_Blowjob_A2_S2", -120, side = -3.5, sos = -1)
	AddPositionStage(a2, "Arrok_Blowjob_A2_S2", -120, side = -3.5, sos = 1)
	AddPositionStage(a2, "Arrok_Blowjob_A2_S3", -120, side = -3.5, sos = 2)

	AddTag("Arrok")
	AddTag("BBP")
	AddTag("Sex")
	AddTag("MF")
	AddTag("Oral")
	AddTag("Dirty")
	AddTag("Blowjob")
	AddTag("LeadIn")

	Save()
endFunction

function ArrokBoobjob(string eventName, string id, float argNum, form sender)
	Name = "Arrok Boobjob"

	SetContent(Sexual)

	int a1 = AddPosition(Female, addCum=Oral)
	AddPositionStage(a1, "Arrok_Boobjob_A1_S1", 0)
	AddPositionStage(a1, "Arrok_Boobjob_A1_S2", 0)
	AddPositionStage(a1, "Arrok_Boobjob_A1_S3", 0)
	AddPositionStage(a1, "Arrok_Boobjob_A1_S4", 0, silent = true, openMouth = true)

	int a2 = AddPosition(Male) ; 102
	AddPositionStage(a2, "Arrok_Boobjob_A2_S1", -119, sos = 2)
	AddPositionStage(a2, "Arrok_Boobjob_A2_S2", -119, sos = 3)
	AddPositionStage(a2, "Arrok_Boobjob_A2_S3", -119, sos = -2)
	AddPositionStage(a2, "Arrok_Boobjob_A2_S4", -119, sos = -2)

	AddTag("Arrok")
	AddTag("BBP")
	AddTag("Sex")
	AddTag("MF")
	AddTag("Dirty")
	AddTag("Boobjob")
	AddTag("Breast")
	AddTag("LeadIn")

	Save()
endFunction

You basically add your loader script wherever you want, having it extend sslAnimationFactory, and then whenever you call RegisterAnimation("AnimationCallback") from that script, it will register the callback and send the mod event to trigger the individual events, each events content can be copy pasted from your animation scripts that previous extended sslBaseAnimation.

 

When the event is triggered via RegisterAnimation, it finds an empty animation slot, and then the subsequent functions and property calls inside that event will replicate onto that animation slot. The only thing you have to add over the previous extended script is Save() at the end of each event, which closes out the registration so the next callback can claim an empty slot and register it's animation.

 

The result is not having to have a ton of individual scripts for each individual animation set. When dealing with the animations outside of registering they work exactly the same.

 

As for creatures like you are suggesting there, there is going to be a new function for adding creatures, I haven't set it up yet, but it will look something like this:

FormList property ValidChaurus auto
function Chaurus01(string eventName, string id, float argNum, form sender)
	Name = "Chaurus 01"

	SetContent(Sexual)
	SetSFX(Squishing)

	int a1 = AddPosition(Female, addCum=Anal)
	AddPositionStage(a1, "EC_FEMc000", 0)
	AddPositionStage(a1, "EC_FEMc001", 0)
	AddPositionStage(a1, "EC_FEMc002", 0)
	AddPositionStage(a1, "EC_FEMc003", 0)

	int a2 = AddCreature(ValidChaurus)
	AddPositionStage(a2, "EC_CHAc000", 0)
	AddPositionStage(a2, "EC_CHAc001", 0)
	AddPositionStage(a2, "EC_CHAc002", 0)
	AddPositionStage(a2, "EC_CHAc003", 0)

	AddTag("Chaurus")
	AddTag("Bite")

	Save()
endFunction

Basically just instead of AddPosition(), use AddCreature(), passing it a formlist containing the valid base creature forms that the animation works with.

Link to comment

 

 

There's a function I've added to the thread making system in 1.20 that lets you disable it, Model.DisableUndressAnimation(true) will cause it to forcibly skip it regardless of user settings.

Yes, that's all I want!

 

Only question is will that be for all actors involved, or can you specify per actor, so I could have it be "skip victim's, play animation for aggressors"?

 

It's not super important, but I'd also prefer to have that setting on a per-actor basis. This would also mesh better with the rest of the function on the model which all take an actor argument as input (where it's relevant).

 

 

Sure, changed it to per actor, so now it's sslThreadModel.DisableUndressAnimation(ActorRef, true)

 

In a similar vein, I've also added sslThreadModel.DisableRagdollEnd(ActorRef, true) which will stop that actor from ragdolling at the end of a scene.

Link to comment

Another suggestion: I studied alot of mods now and alot simulate a refractory period for example. How about including it into the framework so that we have a uniformed way to provide the "side" effects (refractory period, sense of pleasure etc,) of having sex?

 

Modders could then implement a spell of their own and use the magic effect from the framework if they wish to simulate such things.

Link to comment

 

 

 

There's a function I've added to the thread making system in 1.20 that lets you disable it, Model.DisableUndressAnimation(true) will cause it to forcibly skip it regardless of user settings.

Yes, that's all I want!

 

Only question is will that be for all actors involved, or can you specify per actor, so I could have it be "skip victim's, play animation for aggressors"?

 

It's not super important, but I'd also prefer to have that setting on a per-actor basis. This would also mesh better with the rest of the function on the model which all take an actor argument as input (where it's relevant).

 

 

Sure, changed it to per actor, so now it's sslThreadModel.DisableUndressAnimation(ActorRef, true)

 

In a similar vein, I've also added sslThreadModel.DisableRagdollEnd(ActorRef, true) which will stop that actor from ragdolling at the end of a scene.

 

Awesome!

Link to comment

Another suggestion: I studied alot of mods now and alot simulate a refractory period for example. How about including it into the framework so that we have a uniformed way to provide the "side" effects (refractory period, sense of pleasure etc,) of having sex?

 

Modders could then implement a spell of their own and use the magic effect from the framework if they wish to simulate such things.

If I understand what you are saying, that is currently accomplished with a hook that is set to AnimationEnd or something.  Don't remember the syntax off the top.

Link to comment

What am I trying to say: Let's say Mod A and Mod B each simulate a refractory period. Both use a version of their own magic effect. Now let's say both have different dialogues to initiate the sex scene and applying the spell afterwards. Now if you have sex with an NPC by a trigger from Mod A and get the effect applied afterwards, Then you go to another NPC and have sex by a trigger from Mod B.

The situation is now the following: Both mods have applied a magic effect, which essentially does the same. But none of the mods have knowledge about each other and can not decide if they want to apply the effect or not (or want to stack it). So my solution would be: Implement such effects in the SexLab framework itself and let Mod A and Mod B calling it. So the only thing both mods have to do is to implement a spell which points at the SexLab magic effect thus allowing each modder to set the magnitude and duration as they like. But now you can check if such a magic effect is applied or not whether it comes from your mod itself or from another one does not matter.

Link to comment

One other thing that would be useful (And maybe already exists and I just don't know what to look at) but some kind of mechanism to abort a sex scene mid copulation.

 

For instance, I have a deal where Guards will fine the player if they are trying to have sex in public.  Now, since I don't know of a way to abort the sex scene, I only make the a check for any Guards with current LOS immediately before I make the StartSex() call (And then I wouldn't make the call).  Otherwise, the Guard will come over, try to issue the arrest dialog, but since the player can't respond due to mid-boink, the Guard times out and goes into default "Resisting arrest. ATTACK!" mode, again, which the player can't respond to until after they finish the scene.

 

 

Link to comment

I am still mostly dabbling with mods, so I didn't get much further than simply calling StartSex and ApplyCum.

 

One thing I found cumbersome while trying to understand SexLab is the lack of discovery function. By that I mean a way to display a list of known animation types or tags to use with StartSex.

 

Other than that, I have to say this mod (and derived plugins) are giving so much more depth and tension to Skyrim... keep it up! :)

Link to comment
  • 3 weeks later...

Is anybody using the AddExtras() functionality of SexLab Animations, or have any plans to?

 

If you don't know, when defining custom sexlab animations you can add "extras" to certain positions, and the actor in that position will equip the items added to that animations position.

 

I'd really like to just remove it, as I'm fairly certain nobody is using it and likely never will. Keeping support for it has been a hassle I feel wasted, and much of the support for it in the scripts is kinda cluttered and convoluted. It's especially kind of pointless now since items can be given to actors via FNIS animobjects.

 

Being able to just remove the functionality would help me cleanup the scripting for preparing/resetting/swapping actor transitions.

Link to comment

sometimes you just have to abandon a code culdesac in favor of a better way to do things, irrespective of whether or not someone is using the old implementation. The questions you have to ask yourself are pretty simple: is the new way functionally better? Is the old way strangling your code? The more it strangles, the less important the improved functionality. After a certain point of strangulation, as long as the new functionality at least gets the job done everyone will benefit if the bad code is simply laid to rest.

 

This is particularly true early in a library's life cycle.

Link to comment

Ashal - This should be something you can add quickly for 1.21 - I need to pull the list of creature races that are associated with each animation. Right now you have HaveRace() and AddRace() in the SslBaseAnimation script. If you can add "Form[] Function GetRaces()" to that script it would be extremely helpful as I would not have to update my Random Sex code every time a new creature type receives animations.

Link to comment

Ashal - This should be something you can add quickly for 1.21 - I need to pull the list of creature races that are associated with each animation. Right now you have HaveRace() and AddRace() in the SslBaseAnimation script. If you can add "Form[] Function GetRaces()" to that script it would be extremely helpful as I would not have to update my Random Sex code every time a new creature type receives animations.

 

Added a form[] CreatureRaces read only property to sslBaseAnimation & sslCreatureAnimationSlots

 

The one on sslBaseAnimation will return the array of races that are specific to the given animation

 

The one on sslCreatureAnimationSlots will return a list of ALL races that have an animation registered.

Link to comment

 

Ashal - This should be something you can add quickly for 1.21 - I need to pull the list of creature races that are associated with each animation. Right now you have HaveRace() and AddRace() in the SslBaseAnimation script. If you can add "Form[] Function GetRaces()" to that script it would be extremely helpful as I would not have to update my Random Sex code every time a new creature type receives animations.

 

Added a form[] CreatureRaces read only property to sslBaseAnimation & sslCreatureAnimationSlots

 

The one on sslBaseAnimation will return the array of races that are specific to the given animation

 

The one on sslCreatureAnimationSlots will return a list of ALL races that have an animation registered.

 

 

Great! Thanks a lot.

 

Link to comment

Hi Ashal

 

Since you asked ideas that could be useful for mods, I have two mods that could use the following stats in different ways:

 

:: game time since last sex
:: count of sexlab acts today
:: count of acts total
:: last actor ID 
:: last action performed 
 
I know I can set up these stats using hooks (and i probably will for now) but this kind of stats would be useful if they came directly from the framework (for mods about ex addiction, fetish for instance or to detect who you lat had sex with so that their spouse can turn against you if you meet them shortly after).
Link to comment
Guest kimbale

Is anybody using the AddExtras() functionality of SexLab Animations, or have any plans to?

 

If you don't know, when defining custom sexlab animations you can add "extras" to certain positions, and the actor in that position will equip the items added to that animations position.

 

I'd really like to just remove it, as I'm fairly certain nobody is using it and likely never will. Keeping support for it has been a hassle I feel wasted, and much of the support for it in the scripts is kinda cluttered and convoluted. It's especially kind of pointless now since items can be given to actors via FNIS animobjects.

 

Being able to just remove the functionality would help me cleanup the scripting for preparing/resetting/swapping actor transitions.

 

I'm thinking about making a mod for masturbating with weapons (no, not the sharp parts you sickos... -.-). Basically i would start on an animation where a female charater rams her sword into the ground and rides the hilt. I thought it would be awesome to be able to use the weapon that is currently equipped for this, would that be possible with that hook? Using FNIS animObjects would require animations for all weapons and could not accomodate custom stuff afaik.

Sorry to post this late, i'm just now getting really into modding again...

EDIT: I just thought about my planned animations (f rape on m) and thought i'd like to use the equipped weapons in this too. Like using an 2h hammer as bar to keep his arms down or something.

Link to comment

 

I'm thinking about making a mod for masturbating with weapons (no, not the sharp parts you sickos... -.-). Basically i would start on an animation where a female charater rams her sword into the ground and rides the hilt. I thought it would be awesome to be able to use the weapon that is currently equipped for this, would that be possible with that hook? Using FNIS animObjects would require animations for all weapons and could not accomodate custom stuff afaik.

Sorry to post this late, i'm just now getting really into modding again...

EDIT: I just thought about my planned animations (f rape on m) and thought i'd like to use the equipped weapons in this too. Like using an 2h hammer as bar to keep his arms down or something.

 

Nice ideas! Careful with the masturbation though. Even if you go hilt first, it still has its risks  ;) 

http://oglaf.com/hilting/

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