Jump to content

New to modding. I have some questions.


Recommended Posts

Hi, I am new to modding and I started learning about mods like two days ago. I am learning about mods by reading the source code on some of the mods. I am modifying available mods to actually have enough knowledge to start my own. So, I am examining this mod which uses a scene. It uses only the first stage of a scene. Also, the scene is short.

 

Now, I went ahead and checked the documentation on the cached SexLab GIT. I could not find how to summon a single stage. Here is what I want to do. I want to summon the next stage of a scene. I also want to extend the stage time. I found out the function SetTimers and i have done this:

 

;My code block

float[] blablabla = new float[1];
blablabla[0]=60;
make.SetTimers(blablabla)

 

;Original code starts here
make.SetHook(hookName)

 

I even did it with 4 arguments. That did not help at all. The time is being ignored. So, I might not be doing it right. Does anyone have information on how to control the sex scene stage / time wise? The mod I am trying to modify is puppet master if that makes any difference. Also, I want to add another option to the menu of puppet master. I noticed that the menu options are on the PuppetMaster.esp. I have no idea how to add the option and reference it in the source files, though. Any information is appreciated. Thanks.

Link to comment

For clarity, you're talking about a SexLab scene, not a CK scene?

 

To play just the first stage, start the animation as normal, and set up a custom StageStart hook with it. Every time you receive the event, you check the current stage; if 2 or higher, you call EndAnimation on the thread. If this is what you need, I can explain in more detail.

Link to comment

Your blablabla is a Array. I dont know, if SetTimers works without index.

 

maybe: make.SetTimers(blablabla) ->  make.SetTimers(blablabla[0]) ?

 

It accepts only an array of float.

 

 

For clarity, you're talking about a SexLab scene, not a CK scene?

 

To play just the first stage, start the animation as normal, and set up a custom StageStart hook with it. Every time you receive the event, you check the current stage; if 2 or higher, you call EndAnimation on the thread. If this is what you need, I can explain in more detail.

 

Yes, I am talking about a SL scene. Though, I am not sure what are you trying to say. I want to extend the time of the scenes based on a value I choose.

Link to comment

Oh, I completely misread what you said in the first post.

 

It might be because your new array instance isn't the correct size, stage timers are always 5-float arrays. Try the following:

float[] customTimers = make.Config.StageTimer
customTimers[0]=60;
customTimers[1]=60;
customTimers[2]=60;
customTimers[3]=60;
customTimers[4]=60;
make.SetTimers(customTimers)

That should make the animation take 60 seconds on each stage, regardless of stage count. Let me know if that works and we'll continue from there.

 

 

Alternatively, if you don't mind editing the stage timer of the base animation, rather than just the SexLab thread you're creating (this will change the timer for every SexLab mod that uses the animation), you can alternatively do the following:

SslBaseAnimation anim = SexLab.AnimSlots.GetByRegistrar("YOUR_ANIMATION_ID")
anim.SetStageTimer(stage = 1, timer = 60.0)

Replace YOUR_ANIMATION_ID with the registrar of the animation you want to edit. This code only needs to be run once every time you reset the SexLab animation registry. Though for the purposes of testing, you can call it before you start instancing your sslThreadModel thread.

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • 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