Jump to content

Problem filtering SexLab MFC Animations.


Recommended Posts

I'm trying you make use of a function in SexLabFramework to get a tag for FMC animations for filtering:

 

Here's the description in the script:

 

;/* MakeAnimationGenderTag
* * Create a gender tag from a list of actors, in order: F for female, M for male, C for creatures
* * All animations in SexLab have this GenderTag automatically generated based on the animation definition.
* * 
* * @param: Actor[] Positions - A list of actors to create a tag for
* * @return: string - A usable tag for filtering animations by tag and gender. If given an array with 1 male and 1 female, the return will be "FM"
* *
* * EXAMPLE: if the animation expects in the first position is Female, and in the next two positions are a Male, you will get "FMM" as result.
*/;
string function MakeAnimationGenderTag(Actor[] Positions)
    return ActorLib.MakeGenderTag(Positions)
endFunction

 

But when I build a function like this:

 

Function StartCreatureDoubleSex(Actor akActor1, Actor akActor2, Actor akActor3)
    actor[] sexActors = new actor[3]
    sexactors[0] = Playerref
    sexactors[1] = akActor2
    sexActors[2] = akActor3
    SexLab.MakeAnimationGenderTag(sexActors)
    sslBaseAnimation[] anims
    anims = SexLab.GetAnimationsByTags(3, "FCC", "FMC",True)
    SexLab.StartSex(sexActors, anims, victim = PlayerRef, AllowBed = false, Hook = "DoubleCreature")
Endfunction

 

First I build the array of actors, then make the animation gender tags from that array, and then suppress that tag in get animations by tags.

 

But, this is not working, SexLab continues to pull FMC/MFC animations as if they were valid.

 

What to do differently?

Link to comment

Two things wrong with your script:

 

1)

 

SexLab.MakeAnimationGenderTag(sexActors)

This line isn't doing anything. MakeAnimationGenderTag() has a String return value, you're supposed to use that value to filter for animations. Something like:

 

String gendersTag = SexLab.MakeAnimationGenderTag(sexActors)
anims = SexLab.GetAnimationsByTags(3, gendersTag) 

 

2)

 

You're using GetAnimationsByTags(), which searches the registry of human animations. Any animation involving creatures (such as FMC/FCC,etc) is part of the creature registry, so when you call SexLab.GetAnimationsByTags(3, "FCC", "FMC",True), SexLab finds literally nothing, because there are no human animations with those tags. And since you then attempt to start a scene with an empty anims array, the framework defaults to using the full set of animations that are valid for the involved actors, with no gender filtering, which is why you're getting both FCC and FMC in the animation list. What you want to use is SexLab.GetCreatureAnimationsByTags().

 

 

 

With those two points corrected, your script should look something like:
 

Function StartCreatureDoubleSex(Actor akActor1, Actor akActor2, Actor akActor3)
    actor[] sexActors = new actor[3]
    sexactors[0] = Playerref
    sexactors[1] = akActor2
    sexActors[2] = akActor3
    String gendersTag = SexLab.MakeAnimationGenderTag(sexActors)
    sslBaseAnimation[] anims = SexLab.GetCreatureAnimationsByTags(3, gendersTag)
    SexLab.StartSex(sexActors, anims, victim = PlayerRef, AllowBed = false, Hook = "DoubleCreature")
Endfunction 

 

Also, something unrelated to your issue but that may be worth mentioning: this function has 3 actor parameters but you're only using the last 2. You should either use the 3 parameters and pass PlayerRef as the akActor1 parameter where you're calling this function, or just remove akActor1 so you don't later assume this function can be used for 3 NPC actors.

Link to comment

@WraithSlayer

 

Nice suggestion, that did look promising. Unfortunately, upon testing after compiling I was getting the same results.

 

I actually have 2 functions, one is setup to handle MFC sex, and the other is setup to handle everything else, mostly FCC. I find that with the handle creature genders options selected in SexLab MCM, the FFC creature sex will work fine as well with the regular function.

 

In my case, there will always be exactly 3 actors, and I also know which position each actor will be in, what gender they are etc. because the logic is all handled upstream of these functions.

 

Tried this for all FCC/FFC

Function StartCreatureDoubleSex(Actor akActor1, Actor akActor2, Actor akActor3)
	actor[] sexActors = new actor[3]
	sexactors[0] = Playerref
	sexactors[1] = akActor2
	sexActors[2] = akActor3
	String gendersTag = Sexlab.MakeAnimationGenderTag(sexActors)
	sslBaseAnimation[] anims
	anims = SexLab.GetAnimationsByTags(3, gendersTag)
	SexLab.StartSex(sexActors, anims, victim = PlayerRef, AllowBed = false, Hook = "DoubleCreature")
Endfunction

And this for MFC

 

Function StartCreatureDoubleMFCSex(Actor akActor1, Actor akActor2, Actor akActor3)
Debug.Notification("MFC Sex")
	actor[] sexActors = new actor[3]
	sexactors[0] = akActor1
	sexactors[1] = Playerref
	sexActors[2] = akActor3
	String gendersTag = Sexlab.MakeAnimationGenderTag(sexActors)
	sslBaseAnimation[] anims
	anims = SexLab.GetAnimationsByTags(3, gendersTag)
	SexLab.StartSex(sexActors, anims, victim = PlayerRef, AllowBed = false, Hook = "DoubleMFCCreature")
Endfunction

 

Unfortunately I'm still getting broken MFC in the FCC/FFC function, and broken FCC/FFC in the MFC function.

 

The actor positions are a bit different for the two functions to match the positions used in all MFC animations in SLAL: (On the idea that Player is a Female)

 

image.png.d0d5484a1919f7fbf7a29d341a1b522e.png

 

I've suggested in MNC thread if they could just add a MFC tag in the .txt and compile to JSON that it would save a lot of trouble... Not sure if it will happen though.

 

Let me know if you have any other ideas, and thx for the help! 

 

Link to comment

Going by the scripts in your reply, you're still using SexLab.GetAnimationsByTags() instead of SexLab.GetCreatureAnimationsByTags(). You want to use the latter for the framework to find the animations you're looking for. That was point #2 of my initial post, in case you missed it.

 

Regarding MNC tags, that shouldn't be necessary. Even though they're not defined in MNC's JSON, the SexLab framework automatically adds them whenever it registers those animations, based on the actor types defined. For the two animations you showed, the framework adds the following tags: mfc, cFM, FMc, cMF. You can confirm this in-game by opening the animations list in MCM and checking the tooltip for these animations.

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