Some relationships not changing?

Announcements, support questions, and discussion for Love/Hate.
Post Reply
SysOp
Posts: 8
Joined: Thu May 09, 2024 7:52 pm

Some relationships not changing?

Post by SysOp »

Hello! I love the asset but there's some things I am not understanding. For disclosure, been using Unity for the past 10 years, so I'm puzzled as to why such basic feature is out of my grasp.

So, say I've got 3 factions. Player, Bad People and Good People. Good people dislikes Bad People and Bad People dislikes Good People. Player is neutral.

When my player, which belongs to the Player faction attacks Bad People (and reports an Attack deed) Good People faction members become happy. In the inspector, you can see Relationships now include the Player, and relationship value increases. Simirarily, Bad People members now have Player in their Relationships, with a decreased value.

The thing I expect is for the player itself (as a member of Player faction) have his Relationships status changed (Good People +10, Bad People -10 for example) but this is not happening.

Is there something that I am missing? I'm sorry for asking this basic question but any info would be super appreciated, thank you!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Some relationships not changing?

Post by Tony Li »

Hi,

If the Player doesn't have a relationship with either faction (that is, no feelings either way about them), then he won't care what happens to them, even if he's doing the bad thing. Unfortunately some people in the real world behave this way, too. If you want the player to care, add relationship values right before the deed, even if it's -1.
SysOp
Posts: 8
Joined: Thu May 09, 2024 7:52 pm

Re: Some relationships not changing?

Post by SysOp »

Hello, thanks for such a quick reply!

Unfortunately I already setup the player to dislike some factions by default:

Image

Cannibals is bad people, Sixers are good people.

When player kills Cannibals, he becomes happier, Cannibals hate the Player and their relationship towards the player becomes negative, as expected. Sixers become happier, Player relationship gets better. This is for example, a faction member of Sixers:

Image

The problem I see is that the player, as member of faction Player, becomes happier when he kills Cannibals, but relationships do not change:

Image

I expect the relationships towards them to be affected so I can report this to the player (ie: "your relationships towards Sixers increased!") but I don't see how I can access this.

Then again, sorry if this is such a dumb question and thanks again for the help!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Some relationships not changing?

Post by Tony Li »

Hi,

On your Faction Manager, have you ticked Can Witness Self?
SysOp
Posts: 8
Joined: Thu May 09, 2024 7:52 pm

Re: Some relationships not changing?

Post by SysOp »

Hi!

Sadly, I already ticked that:

Image

Thanks again for your help so far!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Some relationships not changing?

Post by Tony Li »

Hi,
SysOp wrote: Fri May 10, 2024 5:08 pm The problem I see is that the player, as member of faction Player, becomes happier when he kills Cannibals, but relationships do not change:

Image

I expect the relationships towards them to be affected so I can report this to the player (ie: "your relationships towards Sixers increased!") but I don't see how I can access this.
Do you want to get the player's affinity to Cannibal or Sixers, or Cannibal/Sixers' affinity to the player?

If you tick the player's Faction Member > Debug Eval Func, what does the Console report when the player does a deed?
SysOp
Posts: 8
Joined: Thu May 09, 2024 7:52 pm

Re: Some relationships not changing?

Post by SysOp »

Hi, I want to see Player relationship towards them, so I can notify the player his reputation changed towards Sixers (they like him more) or Cannibals (they hate him more).

Here's the console in debug mode:

Image

Zombie are the Cannibals, SK_SurvGirl is a member of Sixers, PlayerCopper is the player on Player faction.

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

Re: Some relationships not changing?

Post by Tony Li »

If I understand you correctly, you want to know when an NPC's feelings toward the player change. NPCs belong to factions like Sixers and Cannibals.

In the screenshot you shared, it looks like when the player attacks a cannibal, the cannibals correctly get negative affinity (hate) and the Sixers get positive affinity (love) to the player. If you want to be notified in script, you can add a Faction Member Events component (page 36 of the manual) or Deed Reaction Events component (page 29), or implement the IRememberDeedEventHandler interface. There are some code examples starting on page 33.
SysOp
Posts: 8
Joined: Thu May 09, 2024 7:52 pm

Re: Some relationships not changing?

Post by SysOp »

Alrighty, will try that, thanks so much for the help!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Some relationships not changing?

Post by Tony Li »

Glad to help!
Post Reply