Jump to content

Altering or Reseeding Sexuality of all NPCs?


Recommended Posts

I've done an hour or two of research but haven't been able to find a way to adjust the default SLF sexuality ratios (for inclusion of mod generated NPCs eg OBIS bandits, so Sexlife isn't quite enough). There doesn't (currently) seem to be a mod solution, so I tried going through the .psc files, but all I could find is how the framework determines sexuality (based on an NPC's current stats I believe), not how the initial stats are seeded in the first place. Ideally I'd just like a more real-lifey ratio of gender preference that existing mods can make use of. I dig the variety. 

 

Very grateful for any help! 

Link to comment

Hmm interesting, thank you. I had seen that thread but was too hasty to notice that Ashal replied (got annoyed by the "it doesn't matter" responses). I noticed the improvement with the new version (eg bandits often having high "Aggressive" stat), but didn't notice any change in the infrequency of bisexual and especially homosexual NPCs. I did tweak how the framework determines bisexuality (weird for my mods + RL to have male NPCs with 10 male and 20 female intercourses be considered straight) but that's all I've been able to figure out.   

Link to comment
4 minutes ago, Francisco Javier Fumero said:

Hmm interesting, thank you. I had seen that thread but was too hasty to notice that Ashal replied (got annoyed by the "it doesn't matter" responses). I noticed the improvement with the new version (eg bandits often having high "Aggressive" stat), but didn't notice any change in the infrequency of bisexual and especially homosexual NPCs. I did tweak how the framework determines bisexuality (weird for my mods + RL to have male NPCs with 10 male and 20 female intercourses be considered straight) but that's all I've been able to figure out.   

 

'Sexuality' Stats of Framework determines homosexual (1-32?) / bisexual (33-64?)/ heterosexual (65+: default PC is set as 65) in default, but I don't know how the framework define the initial value of sexuality and other stats into NPCs (probably based on class? I've noticed that mercenaries often are high pervertness / low purity). Ashal certainly made use of vanilla NPC's relationship list that some people (included I) compiled ca. 3-4 years ago for his development of Sexlab 1.60+, but I don't think he set default values by each NPCID base. 

 

As for the frequency of homo/bi/hetero-sexual ratio, however, I don't agree with you: In old 1.59, the majority (70-80%) of NPCs were bi (and rather oriented to homosexual) people. In 1.62, I've seen a post that some people complained that 'there were too many heterosexual in Sexlab 1.61+). If I remember correctly, 1.61 had even higher ratio of hetero contra bi/ homosexual (and more realistic sexual experience stats....not over 500) than the current build (1.62).

 

I assume that some data should be stored in SSLActorStats.pex (.psc), but I have not been able to identify the exact data so far.

 

 

 

Link to comment
Quote

'Sexuality' Stats of Framework determines homosexual (1-32?) / bisexual (33-64?)/ heterosexual (65+: default PC is set as 65) in default, but I don't know how the framework define the initial value of sexuality and other stats into NPCs (probably based on class? I've noticed that mercenaries often are high pervertness / low purity). Ashal certainly made use of vanilla NPC's relationship list that some people (included I) compiled ca. 3-4 years ago for his development of Sexlab 1.60+, but I don't think he set default values by each NPCID base. 

 

As for the frequency of homo/bi/hetero-sexual ratio, however, I don't agree with you: In old 1.59, the majority (70-80%) of NPCs were bi (and rather oriented to homosexual) people. In 1.62, I've seen a post that some people complained that 'there were too many heterosexual in Sexlab 1.61+). If I remember correctly, 1.61 had even higher ratio of hetero contra bi/ homosexual (and more realistic sexual experience stats....not over 500) than the current build (1.62).

 

I assume that some data should be stored in SSLActorStats.pex (.psc), but I have not been able to identify the exact data so far.

 

You're definitely right--no idea what I was talking about/remembering, as 1.59 was the first version I used and there were definitely far more NPCs labelled as bisexual (though I don't know if that was due to experience seeding or sexuality ratio). The tweak I made to SSLActorStats was adjusting the bisexual ratio from 65-35 to 95-35.

 

I likewise pored over its respective .psc (and most others) for seeding data and couldn't find anything, but my programming experience is limited to a many-years-old intro java college course.

Link to comment
21 minutes ago, y_sengaku said:

I've just salvaged the two more relevant thread from LL:

It's a shame that BermerMiasma has not updated this WIP version of SLEN in public.

 

The following thread (page29) also includes some interesting posts.

 

 

I did see the first thread, and am similarly disappointed that that update hasn't seen the light of day. The second is definitely interesting. I'll probably try dissembling the SLF .dll first and seeing what I can figure out. If that doesn't work, I'll try editing the behavior of the individual mods relevant to me. Thanks again!

Link to comment
  • 1 month later...

Hi,

For what I understand when I read sslActorStats.psc is that the orientation of a NPC is set in the variable kSexuality.

This variable seems to be initialized at 65 and then you add the sex the NPC have with people from different gender and remove the sex the NPC have with people from the same gender.

If the kSexuality >= 65 the NPC is straight, between 35 and 65, he is bi and <= 35, he is gay.

So to have gay people, you need to find someone who had more sex with people from the same gender by 30 (that will not happen very often).

I wasn't able to rebuild the file sslActorStats.pex, but if someone can, maybe if you replace the line

_SetSkill(ActorRef, kSexuality, 65) _by SetSkill(ActorRef, kSexuality, 25)

you will have gay/bi people and no straight.

 

Link to comment

So I manage to build my pex file and it works, but not the way I want: it works when I reset NPC stats only. But If I clear all NPCs skills, it doesn't work. Stats are initialized by a native method: _SeedActor. This method is private and can't be modified.

Quote

// 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;


As you can see, it's complex. By reading this, I guess the odd to encounter gay NPC is very low.

 

So I modify the seedActor:

Quote

 function SeedActor(Actor ActorRef)
    float sexuality
    if ActorRef && ActorRef != PlayerRef && !IsSkilled(ActorRef)
        if Config.SeedNPCStats && ActorRef.HasKeyword(ActorTypeNPC)
            _SeedActor(ActorRef, Utility.GetCurrentRealTime(), Utility.GetCurrentGameTime())
            sexuality = randomFloat(1.0, 100.0)
            _SetSkill(ActorRef, kSexuality, sexuality)
            Log(ActorRef.GetLeveledActorBase().GetName()+" Seeded Stats: "+GetSkills(ActorRef))
        else
            EmptyStats(ActorRef)
            Log(ActorRef.GetLeveledActorBase().GetName()+" Init Empty Stats")
        endIf
        sslSystemConfig.StoreActor(ActorRef)
    endIf
endFunction

and the getsexuality method:

Quote

int function GetSexuality(Actor ActorRef)
    SeedActor(ActorRef)
    float Ratio = _GetSkill(ActorRef, kSexuality)
    if Ratio > 0.0
        return Ratio as int
    else
        return 100
    endIf
endFunction

 

And now, I have 1/3 gay people, 1/3 bi and 1/3 straight.

 

 

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