Jump to content

SexLab Framework Development


Recommended Posts

 

A proper fix for SL I think would be to simply use the modifier key to flip 180 degress... so rotate button would remain 15 deg and SHIFT + rotate button (or whatever your keys are) would be 180 degrees (or vice versa, I'd prefer 180 default and 15 degree with the modifier actually but maybe others might get annoyed by the sudden change).

shift+u rotates the scene the other way, therefor you would need a different modifier key.

 

 

There exists a function to fix this. It is, however, rarely used, sslBaseAnimation.SetBedOffsets(x,y,z,r). Intended for cases where the default positioning on a bed is backward, or better displayed rotated 90 degrees so the animation is playing on the "side" of the bed.

 

It's used by a handful of the default sexlab animations to correct this type of problem as an example and proof and concept. The bigger problem is that none of the current animators make use of this option - likely because SLAL doesn't support it; which most of the animation packs use. 

 

Until this option is widely adopted, (which I'll admit is unlikely to happen...) you're right, a 180-degree flip option would be fantastic. Next update to sexlab, I'll have it so using ctrl+alt+u does a full 180 degrees so you don't have to repeatedly tap the rotate key 

Link to comment

There exists a function to fix this. It is, however, rarely used, sslBaseAnimation.SetBedOffsets(x,y,z,r). Intended for cases where the default positioning on a bed is backward, or better displayed rotated 90 degrees so the animation is playing on the "side" of the bed.

 

It's used by a handful of the default sexlab animations to correct this type of problem as an example and proof and concept. The bigger problem is that none of the current animators make use of this option - likely because SLAL doesn't support it; which most of the animation packs use.

 

sadly my SLAL editing knowledge is limited to lines 56-113 of the pyw file, i have no clue in hell how to add that command to SLAL, in fact i have no clue what i'm doing most of the time anyways.

Link to comment

A proper fix for SL I think would be to simply use the modifier key to flip 180 degress... so rotate button would remain 15 deg and SHIFT + rotate button (or whatever your keys are) would be 180 degrees (or vice versa, I'd prefer 180 default and 15 degree with the modifier actually but maybe others might get annoyed by the sudden change).

 

 

Or, a project to identify (and eventually fix) all those anims...

Link to comment

 

Or, a project to identify (and eventually fix) all those anims...

 

Well, like I said, I already fixed all my own installed anims, they are all facing the same way, but that doesn't solve the problem where animations are starting with different headings based on if I use the bed teleport or not. To repeat my example, if I use the reposition key and jump onto a bed and stand right in the center of the bed and face forward (looking towards the headboard), all my anims start correctly. If I use the bed teleport, all my anims start backwards, which means I press my 180 deg rotate key at the start of every bed anim, basically a habit at this point. If I were to "fix" all my anims and rotate them the opposite way, it would just mean they start wrong when not using the bed teleport.

 

As for a project to align all the animations to a standard heading, I don't use many animations, so it wasn't a problem for me to add the 180 degree rotate tag to all my SLAL anims that needed it (as well as in sslAnimationDefaults.psc). But that rotation tag simply rotates the scene for you after the animation starts, it doesn't fix the animation itself; a true fix requires new hkx files, so only the mod authors can do it, which is probably not going to happen. However, adding the 180 degree rotate tag to everything that needs it might be doable with some initiative.

 

 

There exists a function to fix this. It is, however, rarely used, sslBaseAnimation.SetBedOffsets(x,y,z,r). Intended for cases where the default positioning on a bed is backward, or better displayed rotated 90 degrees so the animation is playing on the "side" of the bed.

 

It's used by a handful of the default sexlab animations to correct this type of problem as an example and proof and concept. The bigger problem is that none of the current animators make use of this option - likely because SLAL doesn't support it; which most of the animation packs use. 

 

Until this option is widely adopted, (which I'll admit is unlikely to happen...) you're right, a 180-degree flip option would be fantastic. Next update to sexlab, I'll have it so using ctrl+alt+u does a full 180 degrees so you don't have to repeatedly tap the rotate key 

You got me thinking and I just did some testing and fixed this issue for myself.

 

Since I already aligned all my animations with each other and I just needed my bed and standing rotations to match, I just added this line at line 842 in sslThreadModel and it's completely fixed all issues for me with the character I just tested with, now all my animations start correctly both standing and with bed teleport, it's just automating a 180 deg rotate for me whenever starting on a bed, no more need to press the hotkey every time.

CenterLocation[5] = CenterLocation[5] + 180

Obviously, fixing the animations is up to the mod creators or users, but assuming you do get all your animations aligned to a standard, you might still run into the bed offset vs standing offset hurdle, so maybe an MCM option like "Flip All Bed Animations" or something might be useful for people who at least have all their anims facing the same way.

Link to comment

Sexlab 1.62 is soooo close to running on SE. With SKSE64, SkyUI, and MCM, a straight port of Sexlab loads and the initialization messages look good.

The MCM menu looks good. The only pieces obviously missing are the SexLabUtil and StorageUtil dlls, which need a 64 bit version.

I don't think we have access to the source for those.

There is a minor change required to the code that checks for Skyrim version. Change 1.9 to 1.5.

 

I should add - Sexlab Lite represents a ton of work by the author to get us something while missing SKSE64.

It is no substitute for the real thing.

Link to comment

While I was replying about SL first person camera stuff in this thread I remembered something I edited in SL a long time ago. In one of the SL scripts there's a line of code somewhere that forces the player's camera back into third person whenever an SL scene finishes which is really annoying for players like me that always play in first person, so I changed that line to force the camera into first person instead, which really improved my gameplay and made SL much more seamless with camera mods and gameplay style. I think an MCM option to let the user decide if the game should revert back to first or third person would be a nice addition.

 

Actually, SL hasn't been updated in so long I starting hacking all sorts of stuff into the scripts to suit my tastes (which is going to make updating a serious pain haha), most are pointless to mention because they are so specific to my game but maybe a few might seem like good ideas to someone:

 

- I changed the stage forward key so that if you are on the final stage and press forward, instead of exiting the scene it repeats the stage, allowing you to orgasm again. I exit the scene by pressing the actual exit key... You can do fun stuff with this like mash the stage forward button to do a super explosive chain orgasm, or combining with the SL Anim Speed mod (orgasm, speed up the stage to get more thrusting, orgasm again).

 

- I changed the exit scene key so that it only exits the scene when on the final stage. If on any other stage, it jumps to the final stage, this lets you orgasm from any stage you want which works really well with a lot of animations, especially when paired with the SL Anim Speed mod. Can still exit from early stages by holding modifier key.

Link to comment
  • 3 weeks later...

Is there a way to view what the formula used for CalcEnjoyment and _SeedActor is? I'm interested in seeing how they get the values they do (and maybe fiddling around with it a bit), but there's only one declaration of each in the source and they're both native functions without a body (so I can only see what parameters they use, not how they use said parameters).

 

I'm assuming the code is located in one of the .dll files, so I understand if for whatever reason you'd like it to remain private, but I'd love to at least have a vague understanding of what the formulas are--even if so I only know somewhat how they factor into the game.

 

Some notes:

  • The NPC skill seeding seems to be borked. It regularly results in nearly all NPCs being Master or Grandmaster level in all skills because it doesn't seem to have a reasonable range in which it generates its random numbers. I'm not sure what number values exactly correlate to someone being, for example, Journeyman instead of Grandmaster, but according to what SL Stats Manipulator tells me, the range is something like 20-ish per "skill tier" and the values generated for the NPCS are usually way over 150+, which is apparently above Grandmaster level.
  • If it means anything, my #1 main objective when dealing with the CalcEnjoyment formula is to alter it so that actors can last longer based upon their own skill/experience, rather than the current system where enjoyment is only based on the opposing partner's stats. The current system makes any mod that wants to introduce game mechanics that play around with the enjoyment value problematic--if your character immediately orgasms on the second animation stage by Vaginal Grandmaster Lydia or something and there's nothing you can do about it, it makes a minigame based on something like edging, or making your partner orgasm before you, a rather futile endeavour. Hell, SL Separate Orgasms had to force its own system in Papyrus just to get their sex minigame working. If what I ask is actually possible via Papyrus, I'd love to know!

 

 

 

Irrelevant question below:

 

 

I vaguely recall some sex minigame from Oblivion where it used the mana/stamina bars as meters towards partner orgasm/your orgasm, respectively. Clicking, or otherwise pressing some input, increased your partner's enjoyment while also increasing your own, and the goal was to get your partner to orgasm before you did, which immediately failed the minigame. The in-game animation would change stage depending on your partner's enjoyment, the speed was quite cleverly tied to every time you clicked (which played 1 "thrust" that would pause on the "out" position until you clicked again), and I believe there were also some game stats tied to both NPCs and the player which would respectively make the minigame harder or easier depending on how high the stats were. Does anyone recognize what I'm talking about? I thought it had a pretty nifty approach, and I'd like to recreate my own version in SexLab, but I need to find the original mod first to take a peek in it.

 

Link to comment

Is there a way to view what the formula used for CalcEnjoyment and _SeedActor is? I'm interested in seeing how they get the values they do (and maybe fiddling around with it a bit), but there's only one declaration of each in the source and they're both native functions without a body (so I can only see what parameters they use, not how they use said parameters).

 

I'm assuming the code is located in one of the .dll files, so I understand if for whatever reason you'd like it to remain private, but I'd love to at least have a vague understanding of what the formulas are--even if so I only know somewhat how they factor into the game.

 

Some notes:

  • The NPC skill seeding seems to be borked. It regularly results in nearly all NPCs being Master or Grandmaster level in all skills because it doesn't seem to have a reasonable range in which it generates its random numbers. I'm not sure what number values exactly correlate to someone being, for example, Journeyman instead of Grandmaster, but according to what SL Stats Manipulator tells me, the range is something like 20-ish per "skill tier" and the values generated for the NPCS are usually way over 150+, which is apparently above Grandmaster level.
  • If it means anything, my #1 main objective when dealing with the CalcEnjoyment formula is to alter it so that actors can last longer based upon their own skill/experience, rather than the current system where enjoyment is only based on the opposing partner's stats. The current system makes any mod that wants to introduce game mechanics that play around with the enjoyment value problematic--if your character immediately orgasms on the second animation stage by Vaginal Grandmaster Lydia or something and there's nothing you can do about it, it makes a minigame based on something like edging, or making your partner orgasm before you, a rather futile endeavour. Hell, SL Separate Orgasms had to force its own system in Papyrus just to get their sex minigame working. If what I ask is actually possible via Papyrus, I'd love to know!
Irrelevant question below:

 

 

I vaguely recall some sex minigame from Oblivion where it used the mana/stamina bars as meters towards partner orgasm/your orgasm, respectively. Clicking, or otherwise pressing some input, increased your partner's enjoyment while also increasing your own, and the goal was to get your partner to orgasm before you did, which immediately failed the minigame. The in-game animation would change stage depending on your partner's enjoyment, the speed was quite cleverly tied to every time you clicked (which played 1 "thrust" that would pause on the "out" position until you clicked again), and I believe there were also some game stats tied to both NPCs and the player which would respectively make the minigame harder or easier depending on how high the stats were. Does anyone recognize what I'm talking about? I thought it had a pretty nifty approach, and I'd like to recreate my own version in SexLab, but I need to find the original mod first to take a peek in it.

 

Nope, the SOURCE code is in the *.PSC files which are in Data\Scripts\Source\.

Link to comment

 

Is there a way to view what the formula used for CalcEnjoyment and _SeedActor is? I'm interested in seeing how they get the values they do (and maybe fiddling around with it a bit), but there's only one declaration of each in the source and they're both native functions without a body (so I can only see what parameters they use, not how they use said parameters).

 

I'm assuming the code is located in one of the .dll files, so I understand if for whatever reason you'd like it to remain private, but I'd love to at least have a vague understanding of what the formulas are--even if so I only know somewhat how they factor into the game.

 

Some notes:

  • The NPC skill seeding seems to be borked. It regularly results in nearly all NPCs being Master or Grandmaster level in all skills because it doesn't seem to have a reasonable range in which it generates its random numbers. I'm not sure what number values exactly correlate to someone being, for example, Journeyman instead of Grandmaster, but according to what SL Stats Manipulator tells me, the range is something like 20-ish per "skill tier" and the values generated for the NPCS are usually way over 150+, which is apparently above Grandmaster level.
  • If it means anything, my #1 main objective when dealing with the CalcEnjoyment formula is to alter it so that actors can last longer based upon their own skill/experience, rather than the current system where enjoyment is only based on the opposing partner's stats. The current system makes any mod that wants to introduce game mechanics that play around with the enjoyment value problematic--if your character immediately orgasms on the second animation stage by Vaginal Grandmaster Lydia or something and there's nothing you can do about it, it makes a minigame based on something like edging, or making your partner orgasm before you, a rather futile endeavour. Hell, SL Separate Orgasms had to force its own system in Papyrus just to get their sex minigame working. If what I ask is actually possible via Papyrus, I'd love to know!
Irrelevant question below:

 

 

I vaguely recall some sex minigame from Oblivion where it used the mana/stamina bars as meters towards partner orgasm/your orgasm, respectively. Clicking, or otherwise pressing some input, increased your partner's enjoyment while also increasing your own, and the goal was to get your partner to orgasm before you did, which immediately failed the minigame. The in-game animation would change stage depending on your partner's enjoyment, the speed was quite cleverly tied to every time you clicked (which played 1 "thrust" that would pause on the "out" position until you clicked again), and I believe there were also some game stats tied to both NPCs and the player which would respectively make the minigame harder or easier depending on how high the stats were. Does anyone recognize what I'm talking about? I thought it had a pretty nifty approach, and I'd like to recreate my own version in SexLab, but I need to find the original mod first to take a peek in it.

 

Nope, the SOURCE code is in the *.PSC files which are in Data\Scripts\Source\.

 

 

No, it's not. I mean, yes it technically is, but as I said in my post, it's literally one line of a function declaration that calls a global native function. Case in point here:

int function CalcEnjoyment(float[] XP, float[] SkillsAmounts, bool IsLeadin, bool IsFemaleActor, float Timer, int OnStage, int MaxStage) global native

That's literally all it is. No function body or anything, it's a global native function which the creation kit wiki describes as a "function located in the game itself," so I'm assuming it's referring to a function included in one of the provided .dll files in the SexLab Framework directory (since it would be hilarious but weird if it was located in vanilla Skyrim). CalcEnjoyment shows up exactly two times in sslActorAlias.psc, and the only other time is when it's invoked during the main script loop to return how much enjoyment the character(s) should have.

 

I admit, I'm terrible with Papyrus, but I'm pretty sure nobody except Ashal could describe how CalcEnjoyment produces its value from that one line alone.

 

The function _SeedActor is the same. It is declared in a single line in sslActorStats:

function _SeedActor(Actor ActorRef, float RealTime, float GameTime) global native

Perhaps I should be more clear here. What I'm asking is what those two functions represent. They both produce a value--what is that value and how is it produced? Specifically, what formula does CalcEnjoyment use to decide how much enjoyment a character gets per script fire, and how large is the range of random numbers that _SeedActor can generate its values in?

Link to comment

...

 

No, it's not. I mean, yes it technically is, but as I said in my post, it's literally one line of a function declaration that calls a global native function. Case in point here:

int function CalcEnjoyment(float[] XP, float[] SkillsAmounts, bool IsLeadin, bool IsFemaleActor, float Timer, int OnStage, int MaxStage) global native
That's literally all it is. No function body or anything, it's a global native function which the creation kit wiki describes as a "function located in the game itself," so I'm assuming it's referring to a function included in one of the provided .dll files in the SexLab Framework directory (since it would be hilarious but weird if it was located in vanilla Skyrim). CalcEnjoyment shows up exactly two times in sslActorAlias.psc, and the only other time is when it's invoked during the main script loop to return how much enjoyment the character(s) should have.

 

I admit, I'm terrible with Papyrus, but I'm pretty sure nobody except Ashal could describe how CalcEnjoyment produces its value from that one line alone.

 

The function _SeedActor is the same. It is declared in a single line in sslActorStats:

function _SeedActor(Actor ActorRef, float RealTime, float GameTime) global native
Perhaps I should be more clear here. What I'm asking is what those two functions represent. They both produce a value--what is that value and how is it produced? Specifically, what formula does CalcEnjoyment use to decide how much enjoyment a character gets per script fire, and how large is the range of random numbers that _SeedActor can generate its values in?

 

That word "native" at the very end tells me that this is a function written in a SKSE addon DLL, most likely the SexlabUtil.DLL which means you probably need to look at the github for the Sexlab Framework for the source to that DLL.

Link to comment

That word "native" at the very end tells me that this is a function written in a SKSE addon DLL, most likely the SexlabUtil.DLL which means you probably need to look at the github for the Sexlab Framework for the source to that DLL.

that page has been down forever, you need to use this to see it now: http://archive.org/web/web.php

eg: https://web.archive.org/web/20160816125813/http://git.loverslab.com/sexlab/framework/tree/development

Link to comment

 

That word "native" at the very end tells me that this is a function written in a SKSE addon DLL, most likely the SexlabUtil.DLL which means you probably need to look at the github for the Sexlab Framework for the source to that DLL.

that page has been down forever, you need to use this to see it now: http://archive.org/web/web.php

eg: https://web.archive.org/web/20160816125813/http://git.loverslab.com/sexlab/framework/tree/development

 

The actual source for the DLL does not appear to have been cached on the wayback pages.

Is there a copy available anywhere else?

Link to comment

CalcEnjoyment:

 


	inline float WeighSkill(float weight, float amount, float skill) {
		return amount < 0.5f ? 0.0f : ((amount * 1.5f) + ((skill * 1.7f) * weight));
	}

	UInt32 CalcEnjoyment(StaticFunctionTag* base, VMArray<float> Amounts, VMArray<float> Skills, bool IsLeadIn, bool IsFemale, float Timer, UInt32 Stage, UInt32 MaxStage){
		if (Amounts.Length() == 6 && Skills.Length() >= 4) {

			if (Timer < 1.0f)
				Timer = 1.0f;
			if (Stage < 1)
				Stage = 1;
			if (Stage > MaxStage)
				MaxStage = Stage;

			//std::stringstream ss;
			// Set weight holders
			float pure, lewd, foreplay, vaginal, anal, oral;

			// purity weights for skill types
			Skills.Get(&pure, 4);
			Skills.Get(&lewd, 5);
			pure = pure <= 0.0f ? 0.0f : pure / 10.0f;
			lewd = lewd <= 0.0f ? 0.0f : lewd / 10.0f;

			// Set weights for gender
			if (IsFemale) {
				foreplay = 1.70f + pure;
				vaginal = 1.65f + pure + lewd;
				anal = 1.00f + lewd;
				oral = 1.00f + lewd;
				//ss << "Female -- ";
			}
			else {
				foreplay = 1.00f + pure;
				vaginal = 1.70f + pure + lewd;
				anal = 1.80f + lewd;
				oral = 1.80f + lewd;
				//ss << "Male -- ";
			}

			// Base enjoyment from skills
			float amount, skill, SkillBonus, TimeBonus, StageBonus;
			Amounts.Get(&amount, 0);
			Skills.Get(&skill, 0);
			SkillBonus = WeighSkill(foreplay, amount, skill);

			Amounts.Get(&amount, 1);
			Skills.Get(&skill, 1);
			SkillBonus += WeighSkill(vaginal, amount, skill);

			Amounts.Get(&amount, 2);
			Skills.Get(&skill, 2);
			SkillBonus += WeighSkill(anal, amount, skill);

			Amounts.Get(&amount, 3);
			Skills.Get(&skill, 3);
			SkillBonus += WeighSkill(oral, amount, skill);

			// Timer and stage progression
			TimeBonus = Timer / 8.0f;
			StageBonus = ((float)Stage / (float)MaxStage) * 49.0f;

			// Decrease amounts for leadin
			if (IsLeadIn) {
				SkillBonus *= 0.5f;
				TimeBonus *= 0.7f;
				StageBonus *= 0.5f;
			}

			//ss << "Foreplay: " << foreplay << " Vaginal: " << vaginal << " Anal: " << anal << " Oral: " << oral << " Pure: " << pure << " Lewd: " << lewd;
			//ss << " SkillBonus: " << SkillBonus << " TimeBonus: " << TimeBonus << " StageBonus: " << Stage << "/" << MaxStage << " = " << StageBonus;
			//Console_Print(ss.str().c_str());

			return std::floor(SkillBonus + TimeBonus + StageBonus);
		}
		else {
			return 1;
		}
	} 

 


 
SeedActor:

 

	void ActorStats::SeedActor(Actor* ActorRef, float RealTime, float GameTime) {
		if (!ActorRef || DYNAMIC_CAST(ActorRef, Actor, PlayerCharacter) != NULL) return;

		_MESSAGE("SeedActor: %lu", ActorRef->formID);

		s_dataLock.Enter();

		// Gather data for seeding
		float Level, Energy, Assistance, Aggression, Confidence, Morality, Mood, Mass, Arousability, ArouseScale(1.0f), TimeSpent(0.0f), Straight(0.0f), Gay(0.0f);

		Level      = (float)CALL_MEMBER_FN(ActorRef, GetLevel)() + (GetAV(ActorRef, "Speechcraft") * 0.4f);
		Energy     = GetAV(ActorRef, "Energy");
		Assistance = GetAV(ActorRef, "Assistance");
		Aggression = GetAV(ActorRef, "Aggression");
		Confidence = GetAV(ActorRef, "Confidence");
		Morality   = GetAV(ActorRef, "Morality");
		Mood       = GetAV(ActorRef, "Mood"); // 0..11
		Mass       = GetAV(ActorRef, "Mass"); // 0..8 (but always close to 1 for humans)
		TESNPC* npc = DYNAMIC_CAST(ActorRef->baseForm, TESForm, TESNPC);
		UInt32 Sex  = npc ? CALL_MEMBER_FN(npc, GetSex)() : 0;

		Arousability = rand(0.1f, 1.0f); // Small random start to have some differences for different actors with the same actor base.
		/* -- Arousability --
		Arousability is a temporary variable that will calculate how often the Actor does sex
		mood will increase linear
		confidence will increase quadratic
		assistance will increase linear
		mass will decrease by how far is from 1
		morality will reduce by square root
		Energy will increase by quad root with a minimum capped at 50
		level will reduce by how far is from 25
		*/
		Arousability += (Mood + 1.01f) * (Confidence + 0.8f) * (Confidence + 1.0f) * (Assistance + 1.2f);
		Arousability /= (1.0f + std::abs(Mass - 1.0f));
		Arousability /= std::sqrt(Morality + 1.0f);
		Arousability *= std::sqrt(std::sqrt((Energy < 50.0f ? 50.0f : Energy) - 48.5f));
		ArouseScale = (Arousability / (1.0f + std::abs(Level - 25.0f)));

		_MESSAGE("\tMood: %.4f / Mass: %.4f / Arousability: %.4f / %.4f", Mood, Mass, Arousability, (Arousability / (1.0f + std::abs(Level - 25.0f))));

		List &Skills = Data[ActorRef->formID];

		// Seed Sexuality
		if (rand(1, (Morality == 3.0f || Confidence == 0.0f || ArouseScale < 1.0f) ? 6 : 12) != 1) {
			Straight = rand((Level * 0.10f), (Level * 0.7f)) + std::sqrt(Energy * rand(0.3f, 0.8f)) + (Assistance * 1.50f);
			Gay      = rand((Level * 0.01f), (Level * 0.3f)) + std::sqrt(Energy * rand(0.1f, 0.5f)) + (Assistance * 1.20f);
			// Very aggressive / frenzied - make more likely to have had more
			if (Aggression > 1.0f) {
				Straight *= rand(1.2f, 1.6f);
				Gay *= rand(1.0f, 1.3f);
			}
			// Cowardly - less likely to have had partners
			if (Confidence == 0.0f) {
				Straight *= rand(0.2f, 0.7f);
				Gay *= rand(0.0f, 0.5f);
			}
			// Brave of foolhardly - willing to put their selves out there more
			else if (Confidence >= 3.0f) {
				Straight *= rand(1.0f, 1.5f);
				Gay *= rand(1.0f, 1.3f);
			}
			// Very morale, less likely to have slept around
			if (Morality == 3.0f) {
				Straight *= rand(0.3f, 1.0f);
				Gay *= rand(0.1f, 0.7f);
			}

			// Chance for never having had a certain type
			Straight = rand(1, 8) == 1 ? 0.0f : std::floor(Straight);
			Gay = rand(1, 8) >= 3 ? 0.0f : std::floor(Gay);
			// Seed time spent
			TimeSpent = (Straight + Gay) * rand(6.0f, 25.0f);

			// Save info we have so far
			Skills[kStat_TimeSpent] = TimeSpent;
			Skills[kStat_SexCount] = (Straight + Gay);
			if (Sex == 1) {
				Skills[kStat_Males] = Straight;
				Skills[kStat_Females] = Gay;
			}
			else {
				Skills[kStat_Males] = Gay;
				Skills[kStat_Females] = Straight;
			}
		}
		else {
			_MESSAGE("\tVirgin");
		}


		// Seed sexuality
		float diff = (Straight - Gay);
		if (Straight == 0.0f && Gay == 0.0f)
			Skills[kStat_Sexuality] = std::floor(rand(50.0f, 90.0f));
		else if (Gay < 1.0f)
			Skills[kStat_Sexuality] = std::floor(rand(65.0f, 100.0f));
		else if (Straight < 1.0f)
			Skills[kStat_Sexuality] = std::floor(rand(1.0f, 50.0f));
		else if (std::abs(diff) <= 5.0f)
			Skills[kStat_Sexuality] = std::floor(rand(40.0f, 70.0f));
		else if (std::abs(diff) <= 10.0f)
			Skills[kStat_Sexuality] = diff < 0.0f ? 40.0f : 75.0f;
		else
			Skills[kStat_Sexuality] = diff < 0.0f ? 25.0f : 80.0f;


		//_MESSAGE("\tSeed skills...");

		// Sex Skills
		float Foreplay, Vaginal, Anal, Oral, Low(Level * rand(0.5f, 1.0f)), High((Level * 1.1f) + Arousability);
		Foreplay = ((TimeSpent * 0.2f) + rand(Low, High));
		Vaginal  = ((TimeSpent * 0.5f) + rand(Low, High));
		Anal     = ((TimeSpent * 0.3f) + rand(Low, High));
		Oral     = ((TimeSpent * 0.4f) + rand(Low, High));

		// Alter by sexuality
		if (Gay > Straight){
			if (Sex == 1){
				Vaginal *= 1.6f;
				Anal    *= 0.4f;
				Oral    *= 1.1f;
			}
			else{
				Vaginal *= 0.4f;
				Anal    *= 1.6f;
				Oral    *= 1.2f;
			}
		}

		//_MESSAGE("\tSeed Pure...");


		// Seed Pure
		float Pure = (Morality * 1.25f) - (Aggression * 0.75f);
		Pure += Morality <= 0.0f ? -1.5f : 0.0f;
		Pure += Morality >= 3.0f ? -3.1f : 0.0f;
		Pure += Aggression <= 1.0f ? 2.5f : 0.0f;
		Pure += Assistance <= 0.0f ? -1.5f : 0.0f;
		Pure += Assistance >= 2.0f ? 2.0f : 0.0f;
		Pure += Assistance >= 2.0f && Morality <= 0.0f ? 1.2f : 0.0f;
		if (Pure < 0.0f) Pure = rand(0.0f, std::abs(Pure) * 0.5f);

		//_MESSAGE("\tSeed Lewd...");

		// Seed Lewd
		float Lewd = (Aggression * 1.5f);
		Lewd += Morality <= 0.0f ? 2.5f : 0.0f;
		Lewd += Morality >= 3.0f ? -1.5f : 0.0f;
		Lewd += Assistance <= 0.0f ? 2.3f : 0.0f;
		Lewd += Assistance >= 2.0f ? -1.5f : 0.0f;
		Lewd += Morality <= 0.0f && Aggression > 1.0f ? 3.1f : 0.0f;
		if (Lewd < 0.0f) Lewd = rand(0.0f, std::abs(Lewd) * 0.5f);

		//_MESSAGE("\tCurved increase...");

		// Curved increase with actor level and slight randomness
		float Curve = std::abs(std::sqrt(((Level * Level) / 2.3f) * (3.0f + rand(-1.5f, 2.0f))));
		Pure = std::abs(Pure * Curve);
		Lewd = std::abs(Lewd * Curve);
		
		//_MESSAGE("\tSave Skills...");

		Skills[kStat_Aggressor]       = (Skills[kStat_SexCount] && (Aggression > 1.0f || (Assistance == 0.0f || Morality == 0.0f))) ? std::floor(rand(0.8f, Skills[kStat_SexCount] + 1.0f)) : 0.0f;
		Skills[kStat_LastSexRealTime] = rand(0.0f, std::abs(RealTime - 800.0f));
		Skills[kStat_LastSexGameTime] = rand(0.0f, std::abs(GameTime - 0.4f));

		Skills[kStat_Foreplay]  = Foreplay;
		Skills[kStat_Vaginal]   = Vaginal;
		Skills[kStat_Anal]      = Anal;
		Skills[kStat_Oral]      = Oral;
		Skills[kStat_Pure]      = Pure;
		Skills[kStat_Lewd]      = Lewd;

		//_MESSAGE("Unlock...");

		s_dataLock.Leave();
	}

 

 

Link to comment
  • 4 weeks later...
  • 2 weeks later...
29 minutes ago, mentalmike72 said:

can we somehow get over the 500 animations limit?

at this time the only thing you can do is turn off any unused animations in SLAL, Eg: unregister the falmer animations when your nowhere near any falmers.

Link to comment
46 minutes ago, tuxagent7 said:

Maybe with 1.63 it will go to 750 I hope so ! :) i want to reinstall some human packs

It already has. I set my current dev version to 750 awhile ago at this point. I don't want to give an estimate for 1.63, seeing as I already promised it would happen within a few weeks/months nearly a year ago. But now that the new loverslab forum stuff is mostly finished, sexlab is my next focus and I plan to make 1.63 release at the same time as when I release sexlab for skyrim SE.

Link to comment
8 minutes ago, Ashal said:

It already has. I set my current dev version to 750 awhile ago at this point. I don't want to give an estimate for 1.63, seeing as I already promised it would happen within a few weeks/months nearly a year ago. But now that the new loverslab forum stuff is mostly finished, sexlab is my next focus and I plan to make 1.63 release at the same time as when I release sexlab for skyrim SE.

 

That is ggggreat :)  maybe even more that is good news  thanks

 

Edit : Oups thought the estimate was for the animation limit hehe my bad

Link to comment
17 minutes ago, MadMansGun said:

that's still too low, to truly future proof it we need something like 2000 and up.:naughty:

I already consider 500 more than enough, increasing it to 750 next version feels like overkill to me. I know there's plenty of animations out now that make filling that number doable, but every animation increase slows the mod down significantly all around... The animation filtering/search at the start of every sex animation is by far the slowest part of SexLab. Everybody asking for more animation slots are essentially asking me to make the mod perform increasingly worse. Animations are already slow to start with 500 animations installed, increasing it even further from 750 feels ridiculous.

 

At a certain point, the number of animations that can be installed is ridiculous and the player is better served by simply being more selective of the animations they install rather than installing everything they can find.

 

But players will always want more, even if it isn't in their best interests... so we'll see what happens going forward...

Link to comment

In any case, next versions limit WILL be at least 750, possibly upwards of 1000. But I make this change begrudgingly, knowing how badly it's going to affect the mod's performance for anybody who makes use of it.  

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