Jump to content

[Idea & Papyrus question] Best method for "context aware" voices?


Recommended Posts

Posted

Hello all,

 

I am working up a set of context-aware Sexlab voices, but before driving into the scripting for it, I wanted to sound out some "best practices" for doing this.

 

In the script that is managing the sex scene, on every update loop I want it to be able to detect the scene this specific NPC is involved in, and change her Sexlab Voice to something that matches what is happening.  I assume this would be done through searching tags on the animation itself.

 

- How can I access the current scene's (thread's?) tags?

- What can I do to determine this actor's place in the scene? (script variable that attaches at scene start?)

- Is there a granular way to "intuitively" detect whether the actor is in a giving/receiving position relative to the stage/scene?  (And do this in a way that would play well with scenes generated by other mods?)

 

I am a novice scripter, but I'm not looking for anyone to write this for me (best way to learn is by doing, failing, and doing again).  Just throw some ideas on how this might be approached.

 

For instance:  as it stands, there are stages in the quest to determine the rough type of sex act that will take place, and it reassigns the voice based on this (SultryGiving, SultryReceiving, SultryAggressive, etc).  I would prefer a method that just scans to see if the NPC is in a sex scene (generated by another mod/script/event) and make the needed adjustment on the fly.  If it is tag-related, then I know that it will suffer from any incorrect/missing tags, but that is fixable through other mods.

 

Thoughts and ideas on implementation?

Posted

You have all the info in the sslThreadController.

When you start it, you can use it to check what you need.

I seriously advise to check the hooks you can place, for example at each stage change, so you can act accordingly.

 

If you just want to change voices (SexLab voices) when a SexLab anim starts, then just register for the AnimationStarting event, and then you will receive the ThreadController. From it you can get the anim played (and its tags) and all actors, so you can alter the voices if you need.

Posted

You have all the info in the sslThreadController.

When you start it, you can use it to check what you need.

I seriously advise to check the hooks you can place, for example at each stage change, so you can act accordingly.

 

If you just want to change voices (SexLab voices) when a SexLab anim starts, then just register for the AnimationStarting event, and then you will receive the ThreadController. From it you can get the anim played (and its tags) and all actors, so you can alter the voices if you need.

 

sslThreadController, got it.  I will look into it ASAP.  Thank you!

Posted

hmmm, I'm looking at sslThreadController and I don't see anything about tags in the "context sensitive" section.

 

I do see something like that in sslThreadModel.

 

(I know this a garbage that wouldn't work, but I'm trying to wrap my head around how I would do this):

 

NPCControlThread = Sexlab.FindActorController(NPCRef)

If NPCControlThread.HasTag(Anal)

   If Actor1 == NPCRef

      Sexlab.SaveVoice(NPCRef, Sexlab.GetVoiceByName("SultryReceiveAnal"))
   ElseIf Actor2 == NPCRef
      Sexlab.SaveVoice(NPCRef, Sexlab.GetVoiceByName("SultryGiveAnal"))
 
   ElseIf...
  

ElseIf ... // etc, etc

 

How would I be able to determine which character is the receiver in a 3+ actor animation?  For instance, I can search worn items by keywords to know that they aren't equipped to be the "giver" (no penis), but that doesn't necessarily indicate they are receiving in that specific stage, either.  I intend to have "observer" voice options for ambiguous situations where the specific NPC either isn't active in the animation, or may not be performing a specific action, but I still run into the same issues with determining who in the animation she's watching is giving/receiving.  Fair to expect the first actor in the array to be the receiver, but (for instance) with gay (MM+) animations, they can all be both on any given stage/scene.

 

Sorry, still trying to get a grip on how to do this.

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...