Separate sexuality from the trait system.

Started by Cibi, July 16, 2016, 11:34:13 PM

Previous topic - Next topic

SpaceDorf

Quote from: keylocke on July 22, 2016, 08:36:33 AM
if traits were dynamic :

-straight have a chance of going gay and vice versa (just like irl) i don't really see a problem with that.
-people that used to be cannibals can become vegetarians and vice versa. i don't really see a problem with that either.
-etc..

gist is : people that used to be X can become Y and vice versa, depending on both choice and circumstance.

i think the only thing that really changes from person to person is the predisposition to different types of traits. ie : some people have a higher probability of going gay compared to other people, or some people are more likely to go vegetarian compared to other people..

traits should be dynamic and predispositions would control the probability of each trait triggering to become active or inactive.

YES YES AND YES.
The trait descriptions read, most of the time,  like defining moments of live for a pawn.
So yeah, I will propagate dynamical traits every chance I get now.
Because no one can argue against the fact that being stranded on a rimworld and doing what has to be done is not a defining time in the life of the pawn.

Jon the farmer met the beautiful Glitterworld Model Jaques and finally came out of the closet.
The tiny and peaceful vegan elaine had to eat human meat to survive .. and liked it.

( well vegetarian and vegan .. that would be traits to screw the colony sideways :D )

FREE THE TRAITS !
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

skullywag

#76
Quote from: mumblemumble on July 22, 2016, 09:36:01 AM
Humn, in this case, I'm really confused...Since its the final build, it might of been changed last minute, but I don't know. it WAS NOT always this way, read the thread I referenced, where a bug was listed of "2 non gay girls flirting", and tynan responded with "not a bug".

So either, no offense, you are misinterpreting the code, or the code was changed on the last build of A13.  I'm inclined to believe the 2nd one, simply because I don't want to doubt you, but it surely was NOT always this way, the bug report proves this. Well, this leaves more questions than answers, I guess.

----

Actually, looking around.... A13 was released on  april 6th, the bug report for 2 straight girls flirting was on april 10th. There was no revision updates for A13, that I am aware of, and since the code didn't change as you say, I'm inclined to believe you showing that code MIGHT not actually mean this is impossible.

Sorry to doubt you, but something isn't adding up.

Totally could be me, but ive run it past the other modders on slack and theyve agreed with me.....??? I have never seen it in all the testing and all the games I played, that doesnt mean anything however as this game is heavily random. Ill do some more digging, this is fun.

Edit: there is a check directly after the one i posted:


if (generated.gender != other.gender && other.story.traits.HasTrait(TraitDefOf.Gay))
{
return 0f;
}


This states that 2 different genders where 1 is gay cannot have a relationship. So thats definite, just need to work out what that allowgay request thing is.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

JimmyAgnt007

Quote from: mumblemumble on July 22, 2016, 10:00:49 AM
Well, I suppose deviation wouldn't really apply to them because, genetically, nothing is wrong supposedly with their genetics, they just have different genetics. But as you hinted at, it can deviate...and frankly, I don't believe people simply "become" gay. I didn't simply "become" a by and large teetotaler, I went through experiences, had feelings formed by them, which then formed opinions, actions, and who I am today. I think the this applies to sexuality too.

But, yes, in a by and large white community, they would be a deviation from the average population, same for vice versa. Same for if I entered Detroit, I would be a deviation the average population. Its not the race itself, which is the deviation, but the race in the CONTEXT, meaning, a minority.

And yes, I know YOU aren't saying that most gays have that as a cause (obviously not, not all gays have been in jail) but I mean these sort of psychological changes are what cause most of them. But the main point is, since they are a deviation from the statistical average, and a deviation from the normal sexual drive (in the eyes of many, and with much evidence supporting) Then them having a trait is perfectly fitting, since it not normal (read : normal meaning within the norm, meaning average, meaning majority) and for everyone else, we assume they are straight generally speaking.

This is the nature vs nurture debate.  I consider sexuality to be mostly defined by nature with some influence based on nurture.  You believe the opposite from what I gather.

I dont consider minority to equal deviation.  You do, but the issue people have is that devient often is considered to equal wrong.  So in this context people are interpreting what you say as that being a minority is wrong.  Might not be what you mean, I get what you are trying to say, but thats what people might be reading.  For me, deviation for skin colour would be if there were normally NO members of a race at all in a group and then suddenly there was one, like an albino.  We simply have different interpretations of the same words.

OK, just didnt want you to think thats what I meant.  I disagree that a majority of gay people are only gay because something 'happened' to them.  But within the contest of the game that you are getting at, I actually dont have an issue with it being listed as a trait, simply that it is a low impact trait that shouldnt bump out something more useful.  Of course when children get thrown into the mix, depending on how its done, it might have a bigger impact.

skullywag

#78
OK gonna start a new post for this, So actually I think im right.....i have re edited this after thinking about it again.


// RimWorld.InteractionWorker_RomanceAttempt
public float SuccessChance(Pawn initiator, Pawn recipient)
{
float num = 0.6f;
num *= recipient.relations.AttractionTo(initiator);
num *= Mathf.InverseLerp(5f, 100f, (float)recipient.relations.OpinionOf(initiator));
float num2 = 1f;
Pawn pawn = null;
if (recipient.relations.GetFirstDirectRelationPawn(PawnRelationDefOf.Lover, (Pawn x) => !x.Dead) != null)
{
pawn = recipient.relations.GetFirstDirectRelationPawn(PawnRelationDefOf.Lover, null);
num2 = 0.6f;
}
else if (recipient.relations.GetFirstDirectRelationPawn(PawnRelationDefOf.Fiance, (Pawn x) => !x.Dead) != null)
{
pawn = recipient.relations.GetFirstDirectRelationPawn(PawnRelationDefOf.Fiance, null);
num2 = 0.1f;
}
else if (recipient.GetSpouse() != null && !recipient.GetSpouse().Dead)
{
pawn = recipient.GetSpouse();
num2 = 0.3f;
}
if (pawn != null)
{
num2 *= Mathf.InverseLerp(100f, 0f, (float)recipient.relations.OpinionOf(pawn));
num2 *= Mathf.Clamp01(1f - recipient.relations.AttractionTo(pawn));
}
num *= num2;
return Mathf.Clamp01(num);
}


the call near the top:

num *= recipient.relations.AttractionTo(initiator);

calls attractionTo:


// RimWorld.Pawn_RelationsTracker
public float AttractionTo(Pawn otherPawn)
{
if (this.pawn.def != otherPawn.def || this.pawn == otherPawn)
{
return 0f;
}
float num = 1f;
float num2 = 1f;
float ageBiologicalYearsFloat = this.pawn.ageTracker.AgeBiologicalYearsFloat;
float ageBiologicalYearsFloat2 = otherPawn.ageTracker.AgeBiologicalYearsFloat;
if (this.pawn.gender == Gender.Male)
{
if (this.pawn.RaceProps.Humanlike && this.pawn.story.traits.HasTrait(TraitDefOf.Gay))
{
if (otherPawn.gender == Gender.Female)
{
return 0f;
}
}
else if (otherPawn.gender == Gender.Male)
{
return 0f;
}
num2 = GenMath.FlatHill(16f, 20f, ageBiologicalYearsFloat, ageBiologicalYearsFloat + 15f, ageBiologicalYearsFloat2);
}
else if (this.pawn.gender == Gender.Female)
{
if (this.pawn.RaceProps.Humanlike && this.pawn.story.traits.HasTrait(TraitDefOf.Gay))
{
if (otherPawn.gender == Gender.Male)
{
return 0f;
}
}
else if (otherPawn.gender == Gender.Female)
{
num = 0.15f;
}
if (ageBiologicalYearsFloat2 < ageBiologicalYearsFloat - 10f)
{
return 0f;
}
if (ageBiologicalYearsFloat2 < ageBiologicalYearsFloat - 3f)
{
num2 = Mathf.InverseLerp(ageBiologicalYearsFloat - 10f, ageBiologicalYearsFloat - 3f, ageBiologicalYearsFloat2) * 0.2f;
}
else
{
num2 = GenMath.FlatHill(0.2f, ageBiologicalYearsFloat - 3f, ageBiologicalYearsFloat, ageBiologicalYearsFloat + 10f, ageBiologicalYearsFloat + 40f, 0.1f, ageBiologicalYearsFloat2);
}
}
float num3 = 1f;
num3 *= Mathf.Lerp(0.2f, 1f, otherPawn.health.capacities.GetEfficiency(PawnCapacityDefOf.Talking));
num3 *= Mathf.Lerp(0.2f, 1f, otherPawn.health.capacities.GetEfficiency(PawnCapacityDefOf.Manipulation));
num3 *= Mathf.Lerp(0.2f, 1f, otherPawn.health.capacities.GetEfficiency(PawnCapacityDefOf.Moving));
float num4 = 1f;
foreach (PawnRelationDef current in this.pawn.GetRelations(otherPawn))
{
num4 *= current.attractionFactor;
}
int num5 = 0;
if (otherPawn.RaceProps.Humanlike)
{
num5 = otherPawn.story.traits.DegreeOfTrait(TraitDefOf.Beauty);
}
float num6 = 1f;
if (num5 < 0)
{
num6 = 0.3f;
}
else if (num5 > 0)
{
num6 = 2.3f;
}
float num7 = Mathf.InverseLerp(15f, 18f, ageBiologicalYearsFloat);
float num8 = Mathf.InverseLerp(15f, 18f, ageBiologicalYearsFloat2);
return num * num2 * num3 * num4 * num7 * num8 * num6;
}


So given a gay male and female:


if (this.pawn.RaceProps.Humanlike && this.pawn.story.traits.HasTrait(TraitDefOf.Gay))
{
if (otherPawn.gender == Gender.Female)
{
return 0f;
}
}


We get a zero percent attraction. So back to the first method:


float num = 0.6f;
num *= recipient.relations.AttractionTo(initiator);


We still have 0 at this point and the next bit:

num *= Mathf.InverseLerp(5f, 100f, (float)recipient.relations.OpinionOf(initiator));

Would be 0 * whatever the outcome of the opinion is, so....0

As the main method ends with a:

num *= num2;

Would that mean that there is 0 percent chance its gonna happen.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

mumblemumble

Actually, I fully agree with its mostly nature, and partially nurture. Nature demands men get with women, women get with men, have kids, but nurture can DAMAGE this natural state into other ones. If you say otherwise, I'd like a theory on where it comes from, being gay then, and why it would be gay sometimes, and why nature would make it at the rate it does, and for what purpose.

To clarify, being a minority is ONLY a deviation from the AVERAGE. Saying something is a deviation from the average is essentially saying its uncommon, and it is. Many things uncommon, quality shoes, good friends, ect, but none of those are bad. And I don't hesitate to say that anyone who believes "deviation" by itself is bad, even when told otherwise is an idiot, and doesn't deserve to be taken seriously. But, I do understand your theory, and perhaps calling them uncommon would be better for statistical purposes, but I would argue psychologically they are still a deviation of the first definition.

@skully : humn odd... well, I have not SEEN straight people flirting recently, so it MIGHT be gone, but I'm still confused. Wish ijon, or Tynan could give 2 cents on this, if it was removed or still there. if it WAS removed, well, good, 2 straight girls getting married was just silly. But if its still there, well, I think it should be replaced with the bi trait, or that it should be completely disabled as we think it is now. But, I doubt they would poke their heads in this thread. Never the less, I appreciate the looking around. I'm just curious if it was changed, when, because the bug report is proof it used to be possible.

EDIT : Woah, way too much code.... wait a minute, you are running the code for a gay female, and a male right? This is because gay refuses attraction to opposite sex. What about 2 non gay females? Is that any different? Sorry if I'm asking redundant questions, my only experience with code is very basic zdoom scripting, so this is a bit confusing to read.  :-[ I mostly would like to know if this is in a change log anywhere
Why to people worry about following their heart? Its lodged in your chest, you won't accidentally leave it behind.

-----

Its bad because reasons, and if you don't know the reasons, you are horrible. You cannot ask what the reasons are or else you doubt it. But the reasons are irrefutable. Logic.

skullywag

check the full if statement:


if (this.pawn.gender == Gender.Male)
{
if (this.pawn.RaceProps.Humanlike && this.pawn.story.traits.HasTrait(TraitDefOf.Gay))
{
if (otherPawn.gender == Gender.Female)
{
return 0f;
}
}
else if (otherPawn.gender == Gender.Male)
{
return 0f;
}
num2 = GenMath.FlatHill(16f, 20f, ageBiologicalYearsFloat, ageBiologicalYearsFloat + 15f, ageBiologicalYearsFloat2);
}


If the instigating male is gay and is trying to chat up a female, 0.
If the instigating male is no gay and is chatting up a male, 0.

Same for females but inverse.

Then as stated, that 0 flows through the code all the way to the end using multiplication so 0* whatever is 0. so yeah I think its impossible based on the romance check.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

mumblemumble

Humn, possibly, but does 0 REALLY mean theres no possibility?


IIRC deformations can cause negative attraction, yet can still get romance if lucky, yes? So isn't a 0 still pheasable?
Why to people worry about following their heart? Its lodged in your chest, you won't accidentally leave it behind.

-----

Its bad because reasons, and if you don't know the reasons, you are horrible. You cannot ask what the reasons are or else you doubt it. But the reasons are irrefutable. Logic.

skullywag

Normally I would say yes but this method is success chance on a romance attempt, 0 is 0. Is there any other way bar romancing or on generation that a relationship can occur.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

mumblemumble

Humn alright, I will take your word for it. Sorry for this massive thread derail over this, but its good to have it cleared up. This said, if if find this happening, I will totally report it as a bug.

thanks for baring with me skully!
Why to people worry about following their heart? Its lodged in your chest, you won't accidentally leave it behind.

-----

Its bad because reasons, and if you don't know the reasons, you are horrible. You cannot ask what the reasons are or else you doubt it. But the reasons are irrefutable. Logic.

SpaceDorf

There is the explained proof :

When the return value is not the chance but the actual answer to the question if a relationsship is formed then yes zero means no relationship will be formed.

My guess the ugly trait will work as a negative modifier for the chance, likely a 0.something

ah .. there it is ..

[u] int num5 = 0;
if (otherPawn.RaceProps.Humanlike)
{
[u] num5 = otherPawn.story.traits.DegreeOfTrait(TraitDefOf.Beauty);[/u]
}
float num6 = 1f;
[u] if (num5 < 0)
{
num6 = 0.3f;
}[/u]
[u] else if (num5 > 0)
{
num6 = 2.3f;
}[/u]
float num7 = Mathf.InverseLerp(15f, 18f, ageBiologicalYearsFloat);
float num8 = Mathf.InverseLerp(15f, 18f, ageBiologicalYearsFloat2);
[u] return num * num2 * num3 * num4 * num7 * num8 * num6;[/u]
}[/u]


    num2 is gayness
    num6 is beauty

So yeah. If num2 is returned zero in the coupling scenario it will set this whole calculation to zero and there will be no relationship. The chance is decreased 100%
Being ugly decreases the chance by 70% while being beautiful increases the chance by 230%
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

JimmyAgnt007

Quote from: mumblemumble on July 22, 2016, 10:53:37 AM
Actually, I fully agree with its mostly nature, and partially nurture. Nature demands men get with women, women get with men, have kids, but nurture can DAMAGE this natural state into other ones. If you say otherwise, I'd like a theory on where it comes from, being gay then, and why it would be gay sometimes, and why nature would make it at the rate it does, and for what purpose.

To clarify, being a minority is ONLY a deviation from the AVERAGE. Saying something is a deviation from the average is essentially saying its uncommon, and it is. Many things uncommon, quality shoes, good friends, ect, but none of those are bad. And I don't hesitate to say that anyone who believes "deviation" by itself is bad, even when told otherwise is an idiot, and doesn't deserve to be taken seriously. But, I do understand your theory, and perhaps calling them uncommon would be better for statistical purposes, but I would argue psychologically they are still a deviation of the first definition.

Sometimes nature changes things, with various results.  I consider the natural occurrence of gays to be within the norm and the DAMAGE to be the deviation.  Nobody knows why it happens in nature, for any of the animals it happens too.  We are still trying to figure it out. 

I get what you are saying and somewhat agree, just that the problem is that not everyone else does.  Uncommon would be a better term that causes less misunderstanding.  Deviant is, in my experience listening to others, equated with something bad. 

For example some people refer to criminals as deviants.  If most people obey the law then its proper usage but when you use the same word to describe the gay population then the mental logic is (criminal=deviant, deviant=gay, then gay must = criminal) Its absolutely wrong to think that way but it happens.  So even if gays should be considered technically deviant it still shouldnt be used because so many people wont see it that way. 

I think we both know what the other is trying to say (even if we dont agree), so lets just let this go because we have made our game related comments already.

mumblemumble

Hold on, I just realized, these number refer to romance attempt ODDS OF SUCCESS, not likely hood of romance attempt.

Why would 2 straight girls try to flirt?... The romance attempt should never occur?
Why to people worry about following their heart? Its lodged in your chest, you won't accidentally leave it behind.

-----

Its bad because reasons, and if you don't know the reasons, you are horrible. You cannot ask what the reasons are or else you doubt it. But the reasons are irrefutable. Logic.

SpaceDorf

Well I guess this is checked before the romance attemp occurs.

The functions on display are, like you said only about attraction and success chance of romance.
To avoid confusion and cpu-time ..
nope ..

Thought about it.

If there is no check before the flirt-attempt if the starter of the relationship is gay
there would be no other way for the pawn to find out if both are gay if not every relationship tryout combination was fair game.

Unlucky for me I don't have the tools and base knowledge of the code to check it out for myself. At least not in a timely manner.

But at least now we have a fair understanding on how traits are used in the relationship system and can guesstimate on the effort that would be needed to seperate sexuality from the trait system.

So again my new pet child : Make Traits Dynamic.

Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

mumblemumble

#88
 In that case, if its in there as flirting, as nothing else....this is.. ...just fucking weird. Imagine 2 straight men doing this.

"Hey man, you got a real nice ass on you, want to get some alone time?"
"Er....no thanks"
"Alright, no homo. I'm not gay or anything".

:-\???
This confuses the living shit out of me, if this can still happen, yet never happens with a relationship...
Why to people worry about following their heart? Its lodged in your chest, you won't accidentally leave it behind.

-----

Its bad because reasons, and if you don't know the reasons, you are horrible. You cannot ask what the reasons are or else you doubt it. But the reasons are irrefutable. Logic.