Handling many small deeds

Announcements, support questions, and discussion for Love/Hate.
Post Reply
NotVeryProfessional
Posts: 150
Joined: Mon Nov 23, 2020 6:35 am

Handling many small deeds

Post by NotVeryProfessional »

I have a number of small deeds, and should mention that I have DeedReporter scripts on NPCs automatically interacting with other NPCs.

Now I noticed that over time, affinity goes to +100. For just lots of small deeds. Like, buying something from a trader. Sure he'll start to like you, but +100 ?

What would be the best way to implement either deed limits (e.g. "this deed gives +5 but only up to +50 total") or diminshing returns (e.g. "sure I like you for trading with me, but come on, you've done that every day for the past year, I kind of expect it now.") ?
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Handling many small deeds

Post by Tony Li »

That’s a really good question. Currently the idea is that as characters do more positive deeds for each other, it solidifies their relationships further. You could replace the EvaluateRumor function to add some additional logic. Or I could add a feature to Love/Hate. Do you think limiting certain deeds to an absolute affinity range would sufficiently address this question?
NotVeryProfessional
Posts: 150
Joined: Mon Nov 23, 2020 6:35 am

Re: Handling many small deeds

Post by NotVeryProfessional »

Yes, I think it would and it would make sense to have a logic that says "I will like you more if you do small things for me, but I won't fall in love over that."

What might also work is a tie-in with memories, along the lines of "if the same deed is in recent memory, it doesn't count again". This could be further expanded with more logic once the basics are in place. For example "you murdered my wife, no matter how many good deeds you do, short of saving my life it won't change my attitude to you."

This is a common trope in computer games. Love/Hate would be the first to adequately address it. You know, the "present tiny presents to NPC often enough and they forgive you everything and make you their best friend" problem.

It might be worth thinking about it more than a quick fix. For my particular issue, where I am concerned about faction attitudes and not individual NPCs, an absolute limit would do. You know, it also works the other way around: If someone is rude to me, I won't like them, and the more often they are rude, the less I'll like them, but I'll never hate them enough for murder just because they're an asshole.
NotVeryProfessional
Posts: 150
Joined: Mon Nov 23, 2020 6:35 am

Re: Handling many small deeds

Post by NotVeryProfessional »

It might also be that this is where custom traits come in and I should leave attitude alone and evaluate a different attribute?
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Handling many small deeds

Post by Tony Li »

No, it makes sense to apply this to affinity , too.

I’ll give this thought, but I’ll probably go with absolute values. It seems the most practical and effective. And also deeds that don’t adjust further if spammed in a short time frame.
Deeds do have memory durations, where more impactful deeds stay in memory longer.
NotVeryProfessional
Posts: 150
Joined: Mon Nov 23, 2020 6:35 am

Re: Handling many small deeds

Post by NotVeryProfessional »

Tony Li wrote: Fri Dec 16, 2022 12:45 pm Deeds do have memory durations, where more impactful deeds stay in memory longer.
I know, that's what I was thinking about. But the spamming problem mostly affects small deeds = low impact = short memory.

Maybe deeds need a "reset time", i.e. "don't apply the deed again if it already happened with the last X seconds" - but that would require another per-actor list to remember those deeds + times.

Another idea I have is simply having diminishing returns. A simple deed+counter that never times out. Even a murder becomes less shocking. The big step is from "someone is a good citizen" to "someone is a murderer". The step from murder to double murder is already much, much smaller. So it could be to simply count and divide by count. First deed - full effect. 2nd deed - half effect, 3rd - 1/3rd, 4th - quarter, etc.

---

I'm having some ideas about this and they're not sorted, so ignore them. But one is to have deeds leave permanent marks that have one-time effects on reputation. You know, once you're known as a murderer, that sticks.
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Handling many small deeds

Post by Tony Li »

Please keep the ideas coming. Love/Hate has lots of hooks so you can implement things like permanent marks in your own projects.

For now, I'll plan to add two new fields to the definition of a deed: absolute limit to affinity change, and no-repeat duration. This means the affinity limit will be universal to all faction members, but it keeps the data management much simpler. If you need to handle it on a per-faction member basis, you can implement it by overriding EvaluateRumor. The Faction Member component's Acclimatization Curve already diminishing returns.
NotVeryProfessional
Posts: 150
Joined: Mon Nov 23, 2020 6:35 am

Re: Handling many small deeds

Post by NotVeryProfessional »

I didn't think of that curve, that's true. Though I need to check if it rounds down or up, because I've seen attitude go to +100 with a deed with impact 2.

I thought about it a bit more and I think an absolute limit should work. It should have an upper and lower bound, and the logic be "deed is only effective if witness attitude is in this range". Then it would address both the "I already like you a lot, but bringing me a hundred beautiful stones won't make me fall in love" (upper limit) case as well as the "you murdered my parents, that's something you can't smooth over with small presents" (lower limit) case.

I'm also thinking of a relationship equivalent to the StabilizePAD component. Some of my pre-defined relations express racial prejudice (e.g. what humans think of dwarves) and shouldn't change too easily (this is a fantasy world, not a modern post-enlightenment one).
NotVeryProfessional
Posts: 150
Joined: Mon Nov 23, 2020 6:35 am

Re: Handling many small deeds

Post by NotVeryProfessional »

Further thoughts: Maybe have temporary deeds - effects that only apply while the deed is in memory and then it reverts? That would solve most spamming problems (you can spam, but it wears off) and allow for an entire new class of deeds, especially small ones.
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Handling many small deeds

Post by Tony Li »

Faction members have short term memory and long term memory. When memories leave short term memory, they remove the effect they had on PAD. When they leave long term memory, they call IForgetDeedEventHandler.OnForgetDeed. Deeds have a customData field that you could set to the affinity change in an EvaluateRumor override and then undo that affinity change in OnForgetDeed.
Post Reply