Love/Hate Deed state and reporting help

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

Love/Hate Deed state and reporting help

Post by Nashnir »

Hi

I have recently started using Love/Hate and I am still to use the full capability of the framework.



Faction:

I have two factions: Player and Faction A

Faction A are mainly robots. I did so to narrow have a toned down version of emotional states since I just started using the framework and I trying to get a hang of it.

Relationship:
Faction A's relationship with Player Faction is 0 at the beginning.

Emotional State:
Faction A members only have 3 emotional states: Neutral, Cautious, Hunting.

Neutral: Faction members are not interested in player.
Cautious: Deeds by player has caused a faction member to be cautious and is either staying clear or searching to locate player
Hunting: Deeds by player have made a faction member hunt to capture or kill the player.

Deeds
My current intention is to tie deeds with player actions like attack, sneak, hack, lockpick etc.
My current issue is deed report system works well for for actions like attack which requires player input every time one wishes to attack.

How do I model the deed system/ deed reporting for things like sneak or hack where once the player enters that state, I want the player to be in that deed state.

My current thought process is
to just keep reporting the deed every frame till the player comes out of the state but am not sure about whether that is an efficient way.
or
To create a deed state class and to keep the player in a particular deed state till the player moves out of it and when other faction members are either within range/line of sight, they can query the class to find the deed state and act accordingly.

Edit:

I already have Dialogue system and Quest Machine and I have written my own wrappers for commonly used classes like Selector, Input Manager etc. and I will definitely be wrapping CanSeeAdvanced class as well since I want to use my own detection system;
So, I am used to customizing your very helpful frameworks depending upon my use.
I just wanted to make sure such a system doesn't exist already or you have a better solution for my problem statement.
User avatar
Tony Li
Posts: 20734
Joined: Thu Jul 18, 2013 1:27 pm

Re: Love/Hate Deed state and reporting help

Post by Tony Li »

Hi,

Love/Hate is primarily a reactive system. When a faction member learns about a deed -- either by witnessing it or through gossip -- it evaluates the deed and updates its relationships and emotional state.

Attack, and lockpick are straightforward. When the player does those actions, report the deed. When the player shoots a gun, report an attack deed.

To answer your question, Love/Hate doesn't include a continuous deed state. That's up to your other gameplay systems.

Is hacking a discrete activity, similar to attacking? If so, you can report the deed when the player executes the hack. If it's a continuous state, for example sitting at a computer terminal, then you report can the deed if and when a robot sees the player sitting at the computer terminal.

Similarly, you can report the sneak deed when the robot detects that the player is sneaking.
Nashnir
Posts: 11
Joined: Mon Aug 17, 2020 5:03 am

Re: Love/Hate Deed state and reporting help

Post by Nashnir »

Thanks for reply.

I have a made a Deed State class on each character that the character reports their current deed to.

It contains the deed and the list of the faction members that have already witnessed of the deed.
When a character finishes the deed, they remove the deed from the class and clear out the list of witnesses.

When a faction members is in range or can see, they access the deed state class to check if they have already witnessed the deed.
If they have not, they witness and add themselves to the list.

instantaneous deeds like the one's Love/hate is generally meant for are reported to the Faction Manager by the Deed State class and lets it handle the witnesses.
User avatar
Tony Li
Posts: 20734
Joined: Thu Jul 18, 2013 1:27 pm

Re: Love/Hate Deed state and reporting help

Post by Tony Li »

Hi,

That sounds fine.

BTW, every deed is assigned a GUID. You can always check FactionMember.KnowsAboutDeed(guid) to check if a faction member has already witnessed something.
Nashnir
Posts: 11
Joined: Mon Aug 17, 2020 5:03 am

Re: Love/Hate Deed state and reporting help

Post by Nashnir »

Thanks for the tidbit.

That helps a lot.

Just to clarify further.

Deeds, when witnessed are put in both short term as well as long term memory for a duration based on the perceived importance of the deed.

As long as the deed is in short term memory, it will affect PAD values.
As long as the deed is in long term memory, the character will be able to share the rumor to others.
User avatar
Tony Li
Posts: 20734
Joined: Thu Jul 18, 2013 1:27 pm

Re: Love/Hate Deed state and reporting help

Post by Tony Li »

Yes, that's correct. The duration that a deed stays in short term and long term memory is based on how much it changed the witness's affinity to the actor. For example, if the deed only results in a +/-5 change in affinity, the memory will only last 5% of the max short term and long term memory duration. If it results in +/-100 affinity, the memory will last the full max duration.

When the rumor leaves short term memory, it undoes the effect that it had on PAD.
Post Reply