Clarification regarding Emotional State and Trait alignment Evaluation

Announcements, support questions, and discussion for Love/Hate.
Post Reply
Nashnir
Posts: 11
Joined: Mon Aug 17, 2020 5:03 am

Clarification regarding Emotional State and Trait alignment Evaluation

Post by Nashnir »

Does a faction member have a single or multiple emotional states?
Considering the emotions can have overlapping PAD values, how is this evaluated?

Also, what is the trait alignment evaluation formula? Edit : Got it in traits.cs

In the following,

Code: Select all

Δaffinity-to-actor += |Δaffinity-to-actor| X trait-alignment / trait-alignment-importance
Does alignment and alignment importance being 0 evaluate trait-alignment / trait-alignment-importance to 0?

Happy New Year!
User avatar
Tony Li
Posts: 22098
Joined: Thu Jul 18, 2013 1:27 pm

Re: Clarification regarding Emotional State and Trait alignment Evaluation

Post by Tony Li »

Hi and Happy New Year!
Nashnir wrote: Sun Jan 03, 2021 2:43 amDoes a faction member have a single or multiple emotional states?
Considering the emotions can have overlapping PAD values, how is this evaluated?
A character always has 3 PAD values, which you can interpret as a 3D vector <P,A,D>.

The default emotional state model chooses the emotional state that's closest to the <P,A,D> position in 3D space:

Image
(Image snagged off the web from: http://virtualhumansbook.blogspot.com/p/mind-mood.html)

Nashnir wrote: Sun Jan 03, 2021 2:43 amIn the following,

Code: Select all

Δaffinity-to-actor += |Δaffinity-to-actor| X trait-alignment / trait-alignment-importance
Does alignment and alignment importance being 0 evaluate trait-alignment / trait-alignment-importance to 0?
Yes. If the character doesn't care about that trait (i.e., alignment importance is zero), then it won't nudge the final affinity change up or down. The character will just ignore the influence of that trait.
Nashnir
Posts: 11
Joined: Mon Aug 17, 2020 5:03 am

Re: Clarification regarding Emotional State and Trait alignment Evaluation

Post by Nashnir »

Thanks for the clarification.

1.
The Emotional state explanation makes perfect sense.
I was talking about a particular combination of PAD values.

Code: Select all

Example:
                  P             A               D
Fear:         -75  -50     -50   -25        -100   -25
Terror:      -100  -25      -60  -15         -75   -50
When a character has P A D of 62.5 42.5 62.5
what is their emotional state?

I am asking this mainly since there is no inherent check to make sure two emotional states don't share the same PAD.
IF they do, how does it get resolved.

2.
I was looking at the trait alignment calculation in Trait.cs line 140 - 151
It seems to me like the d value varies from 0 to 1, rather than -1 to 1.
Did I miss a calculation somewhere?

Also, seems to like trait alignment checks the alignment of all traits.
So, if I had a deed like attack and want it to be affected by only one trait, that is not possible.
Since even if I set all other traits to 0, 0 does affect trait alignment and consequentially affect other parameters.
Last edited by Nashnir on Sun Jan 03, 2021 8:18 pm, edited 1 time in total.
User avatar
Tony Li
Posts: 22098
Joined: Thu Jul 18, 2013 1:27 pm

Re: Clarification regarding Emotional State and Trait alignment Evaluation

Post by Tony Li »

Hi,
Nashnir wrote: Sun Jan 03, 2021 7:22 pm1. When a character has P A D of 62.5 42.5 62.5
what is their emotional state?

I am asking this mainly since there is no inherent check to make sure two emotional states don't share the same PAD.
IF they do, how does it get resolved.
The default way it interprets PAD values into a Temperament is quite simplistic, but it's efficient and seems to cover most devs' needs. (See GetTemperament() in Pad.cs.) It simply checks which P,A,D values are above the character's excitability threshold and goes through the list of temperaments in a set order. For example, if the character's excitability threshold is 40, then it will register high pleasure, arousal, and dominance, and so GetTemperament() will return Temperament.Exuberant. This is really just a shorthand way to boil down the numbers. If you want more precise simulation, use the P,A,D numbers directly.

You can also define your own interpretations of PAD values by defining adding an EmotionalState component to the faction member. This lets you define each emotion using a [min,max] range for each PAD. When determining the current emotional state, it goes through the list of emotions sequentially.
Nashnir wrote: Sun Jan 03, 2021 7:22 pm2. I was looking at the trait alignment calculation in Trait.cs line 140 - 151
It seems to me like the d value varies from 0 to 1.

Also, seems to like trait alignment checks the alignment of all traits.
So, if I had a deed like attack and want it to be affected by only one trait, that is not possible.
Since even if I set all other traits to 0, 0 does affect trait alignment and consequentially affect other parameters.
Yes, that's correct. (Sorry, I misspoke earlier. This changed early on in Love/Hate versions.) If you want to ignore values that are zero, you can assign a replacement function to FactionMember.GetTraitAlignment. Example:

Code: Select all

myFactionMember = GetComponent<FactionMember>();
myFactionMember.GetTraitAlignment = MyCustomTraitAlignmentFunction;

float MyCustomTraitAlignmentFunction(float[] traits)
{
    // Your code here to compare alignment of traits and myFactionMember.faction.traits.
}
Nashnir
Posts: 11
Joined: Mon Aug 17, 2020 5:03 am

Re: Clarification regarding Emotional State and Trait alignment Evaluation

Post by Nashnir »

Perfect!

Thanks.
User avatar
Tony Li
Posts: 22098
Joined: Thu Jul 18, 2013 1:27 pm

Re: Clarification regarding Emotional State and Trait alignment Evaluation

Post by Tony Li »

Glad to help!
Post Reply