Love/Hate in an adventure game

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

Love/Hate in an adventure game

Post by NotVeryProfessional »

I'm currently working on a visual novel / point-and-click adventure game, so the pace of the game is largely based on the Dialogue System with players reading and choosing answers. I'd like to get some feedback from people already using Love/Hate in their projects to see if it would add to my game what I hope it would.

I'm thinking about adding Love/Hate to track not just quests but also overall attitude of various NPCs that could unlock further quests or conversation choices. So far, check. Now for questions:

1. - NPCs can belong to several factions. Does this work well in a tree configuration? For example, my NPCs all have a religion, a cultural identity and a home village. The village belongs to a region, which belongs to a kingdom. If the character does something good for the kingdom, everyone in the kingdom should - if they hear rumours about it - improve his respect for the PC slightly. Do I have to assign them to the village faction or to village, region and kingdom factions? Also, if he does something in the neighbouring village, does it propagate upwards, to the region, and then downwards again to the neighbour village?

2. - my game isn't realtime, but I keep track of time, i.e. time-of-day and days. I can trigger things per hour or per day, such as rumours spreading. Is that use-case well supported? Many NPCs would be not on the current map when it happens, but they would be in the Dialogue System.

3. - also about rumour spreading - since I don't have a 3D world and can't use things like line-of-sight to discern if NPCs spot the character doing something, how easy is it to add my own logic like "when he does it in the temple, all the priests will see it and every NPC in town has a 2% chance of being in the temple at that time."? Or something similar.


I want to say that I'm extremely happy with the Dialogue System and Love/Hate looks like a great companion for a point-and-click adventure game, but its examples are 2D action adventures, so I want to avoid being disappointed if it's not a good fit.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Love/Hate in an adventure game

Post by Tony Li »

Hi,

I can answer the technical questions. I'll leave the designer feedback for others. Please also feel free to give the evaluation version a try. (Read the note on DLLs since you're also using the Dialogue System.)
NotVeryProfessional wrote: Mon May 24, 2021 8:16 am1. - NPCs can belong to several factions. Does this work well in a tree configuration? For example, my NPCs all have a religion, a cultural identity and a home village. The village belongs to a region, which belongs to a kingdom. If the character does something good for the kingdom, everyone in the kingdom should - if they hear rumours about it - improve his respect for the PC slightly. Do I have to assign them to the village faction or to village, region and kingdom factions?
It's an inheritance tree. You only need to assign the NPC to the village. From there, it will inherit village -> region -> kingdom.
NotVeryProfessional wrote: Mon May 24, 2021 8:16 amAlso, if he does something in the neighbouring village, does it propagate upwards, to the region, and then downwards again to the neighbour village?
Yes. It's scaled by parents' and children's affinities. If the neighboring village doesn't have 100% affinity to the affected village, the effect on the neighboring village will be lessened. Note that this can be completely overridden by setting a faction's personal affinity. For example, two villages may be completely friendly, but an evil necromancer NPC in one village may override that with a personal affinity that hates the other village.
NotVeryProfessional wrote: Mon May 24, 2021 8:16 am2. - my game isn't realtime, but I keep track of time, i.e. time-of-day and days. I can trigger things per hour or per day, such as rumours spreading. Is that use-case well supported? Many NPCs would be not on the current map when it happens, but they would be in the Dialogue System.
Yes, you can trigger rumors manually by calling FactionMember.ShareRumors().

Faction members remember rumors for a duration of time. You can control the time using the GameTime class -- for example, setting it to Manual to manually advance time every turn. The only catch is that the Dialogue System also uses GameTime internally. (The Dialogue System's DialogueTime class is a wrapper for GameTime.) This may come into consideration, but it's not a show-stopper. I just mention it so you're aware.
NotVeryProfessional wrote: Mon May 24, 2021 8:16 am3. - also about rumour spreading - since I don't have a 3D world and can't use things like line-of-sight to discern if NPCs spot the character doing something, how easy is it to add my own logic like "when he does it in the temple, all the priests will see it and every NPC in town has a 2% chance of being in the temple at that time."? Or something similar.
It's easy. Assign a method to the delegate FactionMember.CanSee. Example:

Code: Select all

GetComponent<FactionMember>().CanSee = IsActorNearby;

bool IsActorNearby(FactionMember actor, Dimension dimension)
{
    // If actor is in temple, return true if I'm a priest. If I'm in town, return true 2% of the time.
    // etc.
}
NotVeryProfessional
Posts: 150
Joined: Mon Nov 23, 2020 6:35 am

Re: Love/Hate in an adventure game

Post by NotVeryProfessional »

Thanks. One follow-up question on 2.:

Do I need to assign affinities between all villages, or only if I want their relations to be somehow special and in most default case it will automatically relate them via the tree (region and/or kingdom)?
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Love/Hate in an adventure game

Post by Tony Li »

Only between special cases.
NotVeryProfessional
Posts: 150
Joined: Mon Nov 23, 2020 6:35 am

Re: Love/Hate in an adventure game

Post by NotVeryProfessional »

Bought it and trying to wrap my head around it now.

Is there Ink integration for the functions like ReportDeed() or GetAffinity() ? Probably not difficult to write myself, but if it already exists, I don't have to.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Love/Hate in an adventure game

Post by Tony Li »

Hi,

No, there isn't an Ink integration for Love/Hate, but you can register your EXTERNAL functions in Ink, and have those functions call the Love/Hate API.
Post Reply