Search Unity

Handling relations with NPCs

Discussion in 'Game Design' started by TrueGota, Jan 17, 2017.

  1. TrueGota

    TrueGota

    Joined:
    Dec 3, 2016
    Posts:
    53
    I don't mean only romantic relationships (although they will be there, too) but rather relationships in general.
    I really like the Social Links in Persona games but I still think they are a bit too "mechanical" and the ranks make them feel quite artificial (but I still love them). I don't want to copy Persona in that way, just giving an example of what I mean.
    I would like to make the relations you can have with the NPCs feel real, so I would abolish things like "friend points" and which "friend level" you have with them (although it's still possible to use something similar in the code). I think it would be better if you can see how much they like you by how they interact with you. Like, there is an old man who can't stand you at the beginning but after some time he opens up to you and tells you more about himself. Getting to know people would be optional but if you just ignore them you would really miss out on a lot of things because we'd give them all their own personalities and little sides stories (so we won't make TOO many). Of course, befriending them can also be benefical, like you can learn a new move from another fighter you wouldn't otherwise get or they give you something as a gift.
    One way would be - which is obvious - to talk to them after some time and they will always tell you something different (and if they have nothing new to say they will just be busy or something, repeating the same line is pretty boring in my opinion and it's not a game like Harvest Moon, anyway). If you know them good enough you could invite them (or they you) to hang out or actually do something instead of only talking. Like events which are always different per character. This could also work well for dates (which are completely optional). Of course, this are just the basics and I'm sure I'll have new ideas in the future.
    What do you think would be a good way of handling things like this?
    (Additionally: Should there also be a possibility that, if you have a girlfriend, she can get fed up with you and break up when things go really bad? It's a pre-defined main character, not one the player makes him/herself. Maybe even friends could end their connections to you if you really mess up or do something that hurts them horribly.)
     
    Last edited: Jan 17, 2017
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    I'd be remiss if I didn't mention Love/Hate. Even if you don't use it, the manual might spur some ideas for your own designs. Briefly, the main concepts are:
    • Characters have personality values (e.g., how much they value Justice, Compassion, etc.).
    • Characters have emotional states (current degree of feeling of Pleasure, Arousal, and Dominance).
    • Characters have relationships to others. Those relationships have values (Affinity [like/dislike], Respect, etc.)
    • Characters can witness deeds directly or share memories of deeds with others (gossip).
    • When a character learns of a deed, it judges it against its personality values, emotional state, and relationships. Then it updates its memory, emotional state, and relationships in response.
    The idea is that "ranks" aren't hard-coded but fluid and based on what's actually going on in the game.
     
    Teila, Ryiah and JoeStrout like this.
  3. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    I feel like the temptation here is to try and get a feeling of realism in the relationship between the player and the NPC by adding complexity to the straight like/dislike metric. If all the actions boil down to simply doing a check to see if you have enough rapport with that character, I'd think hard on if the extra complexity adds depth/realism or just bother. I think it's important to keep the focus on if earning a relationship with the NPC is actually a fun process.

    The best experiences I've had with this sort of thing usually involve a storyline or sequence of events focused around the NPC in question. Performing certain actions to fulfill criteria to unlock content.
     
  4. TrueGota

    TrueGota

    Joined:
    Dec 3, 2016
    Posts:
    53
    Well, we actually had something like this in mind. Every NPC has his/her own events and sometimes it's neccessary to e.g. do something like a side mission you have to complete in order to solve the event (which are sometimes a diversion from the usual gameplay to keep it varied).
     
  5. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    Some examples that I remember:

    Harvest Moon on the GameCube had an interesting feature where if you tried to enter a store around the time that a potential love-interest was supposed to exit it, (they were on a weekly routine) a special event would happen where you would have a dialogue opportunity to score some points with her. The interesting bit was that it wasn't an interaction initiated by the player, and was almost certainly unexpected- as bumping into someone should feel.

    Guile from Chrono Cross (Playstation) was a mysterious character dressed in fine clothes and a mask that you would find at an inn whilst you were trying to figure out how to get into a castle. If I recall, all he would say was something about a bet that he had going with a friend. You had to do something to trigger a conversation where he would offer to sneak you into the castle, as his bet was that he was to steal an item from there. This was one of several ways of solving the "Castle" dilemma of the story.

    Witcher 3 had fantastic NPC characters as well- you'd usually unlock a gift or an event after doing a sidequest or two that concerned them or their family. Proof that cliche and tried-and-true are often the same.

    An example of what not to do might be Xenoblade Chronicles for the Wii- boy was that game a slog through an interminable mountain of un-interesting NPCs and fetch quests. I only liked the mentor character and the one dude with the cowboy mustache.

    Either which way, Everything I'm thinking of requires actual designed content rather than a mechanical system. NPC's you would want to have a relationship with would seem to be expensive in terms of labor.
     
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    That's a good point. I really enjoy well-written narrative games. But it's jarring when hand-written content doesn't match gameplay actions ("ludonarrative dissonance" for pedants). I wrote Love/Hate to make it easier to tie hand-written content into gameplay more naturally, not to replace hand-written content (although it can do that, if that's your thing). Mechanical systems, used wisely, can enhance the effectiveness of hand-written content.
     
    TeagansDad and LMan like this.
  7. TrueGota

    TrueGota

    Joined:
    Dec 3, 2016
    Posts:
    53
    Yeah, I actually enjoy that more, too (like the SLs in Persona) and didn't intend to replace hand-written content. Sorry if it seemed that way. I guess I explained it pretty poorly in the beginning. I want it to "feel" real and of course that requires a lot of mechanical stuff. The Harvest Moon example is a pretty good idea (if I can make them move around later on or there's a chance to bump into someone when entering a place but without being able to exploit it by going in and out). I think the best way would be to make an illusion of it feeling real while there is still a lot of things scripted. Like, if you do that and this the option to move to the next "level" with them will be available but is presented like in one of the examples. Or that if you make a dialogue choice they will remember it (like with a bool that is set to true) and stuff happens later.
    I guess you don't really have to reinvent the wheel but it's rather a matter of presentation.
     
    Last edited: Jan 17, 2017
  8. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Have you ever played a Bioware game? That's exactly how their games work with party members.

    And your system where a person "opens up to you over time" is literally a "friend points" system. You just want it to not be visible to the player.

    Bioware does that in Mass Effect (and KotOR).
     
  9. TrueGota

    TrueGota

    Joined:
    Dec 3, 2016
    Posts:
    53
    That seems pretty plausible and I guess I will start with an approach like that and tweak it a bit. If we ever make a second game we could try new stuff there.
     
  10. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    To be clear you can have both a "points" system that updates based on the character's opinion of you, and on how much you've talked together. So, say there are four unique, character-defining conversations. 1, 2, 3, 4. And the character also has a changing opinion of you. So you might have a branching structure where each conversation progresses differently based on the character's opinion of you. A simple positive/negative opinion would be like

     
  11. TrueGota

    TrueGota

    Joined:
    Dec 3, 2016
    Posts:
    53
    So, it's like when you imagine (just for easier understanding) a person like a "game" with different paths and endings?
     
  12. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Yeah. Now obviously that's a ton of work. You might not go to all that work. You might simply have a few lines in a conversation where a character makes a comment based on their opinion of you, so there's only a small amount of unique content.. For instance...

    Character: "Hey, I need your help. I just got a message from my mother saying that bandits have been harassing her village."

    Character: "I know that you're a good person who helps out those in need. I'll mark the village on your map, and when you're near there you can take a look. You'll have my eternal gratitude."

    or

    Character: "Hey, I need your help. I just got a message from my mother saying that bandits have been harassing her village."

    Character: "I know we haven't always seen eye to eye. But if you could do this for her, and her village, I would appreciate it. I'll mark the village on your map. If you get the chance, I hope you'll help me out. I can pay you for it, if that helps."

    But the branching method obviously allows for more dynamic content.
     
  13. TrueGota

    TrueGota

    Joined:
    Dec 3, 2016
    Posts:
    53
    Something very interesting about this method is that choosing an answer doesn't alter the time you need for the next event. Like, in Persona 4 if you said something not so good it wouldn't give you many points and if you don't have enough points for the next rank you have to waste time in no-conversation hang outs with them which were kind of annoying. This method, on the other hand, wouldn't give you points for the next rank so you don't need something like the time-wasting-to-get-points-event to earn extra points for the next event.
     
  14. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Yeah. In the end, it's a choice you have to make. Is it a gameplay mechanic? Or is it simply a layer of "depth" for the player to witness but not be hindered by? Your choice.
     
  15. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,546
    Personally, I feel like a lot of the social aspects of games have been gimmicky at best.

    Bethesda and Bioware are by far the worst offenders.

    Bethesda straight up lied about "radiant AI" and often shoe-horn mechanics that are clearly meant to be able to get around anyway, which often is less rewarding than if you decide to kill the person. "Oh, I need 9 personality to unlock this dialog tree? Mentabs! Whiskey! And.... Now let's kill him anyway for the loot and XP!"

    Bioware on the other hand is like "You want to unlock this character's ultimate ability? Yeah, I'm going to need you to have sex with them then, you pathetic nerd...."

    What I think would be better would be to have a flowchart for character interactions and for the story, all of which does not require some sort of dialog skill (because those are an artificial hindrance).

    More important is that you do what Ubi does. Don't get me wrong, I'm usually pretty critical of them. BUT one thing that they do is that they "tent-pole" characters and events.

    "Tent-pole" meaning that rather than having a consistent quality throughout the game they choose key points to really punctuate and polish. The character on screen suddenly has ultra high res textures and mesh, they are 100% motion captured and voice acted by a top notch actor, and the 90% of the writing goes into that one scene. And when you first meet an important character they do this in the first scene. The result is that while only 1% of the time that's the quality you get, you on the other hand are filling in the blanks for the other 99% of the time.

    Vaas from Farcry 3 is a prime example of this. They guy has like 2 good scenes, but is often regarded as one of the greatest villains of all time.

    My point is that when you're developing characters, make sure to think of when you can give them their own little spot light moments. Everything in between, like the relationship building, is really secondary.
     
  16. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Can you give an example where Bioware required you to romance a character for anything? They really don't for anything. In KotOR the main plot took on an additional depth for a male
    Revan
    and Bastilla, but you didn't get special abilities.

    So I would disagree that they're gimmicky. They're very game-y, for sure, but they don't act as gimmicks to gate other content (for the most part).

    And the problem is you call it gimmicky--but that's also just reality. I'm not about to ask some random person off of the street for help with something. I'll ask for help from someone I know well.

    How does one define "gimmick" separate from reality?
     
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    The romances aren't any more gimmicky than other facets of Bioware's relationship systems. Although I'm a huge fan of their games, I dislike the transparent and obviously hard-coded manner in which the player's actions affect relationships. KoTOR 2's influence system was the worst offender in this regard, although I really enjoyed the game for its writing in general. It was too tempting to try to max out influence in a mechanical way, which detracted from the narrative. (Maybe this appeals to people who like to game the system, however.) I understand that it would have been too time-consuming to design finer gradations and hard-code an influence factor for every single action the player could take in relation to every single subject. That was the impetus for Love/Hate -- to provide a framework to handle this more automatically. I don't think this is incompatible with Not_Sure's mention of tentpole moments, either. (BTW, I agree that tentpole moments are really important.) If a writer is going to base tentpole moments on relationship thresholds, the gradations to those thresholds would simply be finer and better integrated with the player's actual gameplay choices.
     
    EternalAmbiguity likes this.
  18. TrueGota

    TrueGota

    Joined:
    Dec 3, 2016
    Posts:
    53
    Well, it won't have a big party or something. It's just the main character on his own and all the NPCs are living in the same town, similar to how it is in Harvest Moon/Rune Factory and Persona games. I never played The Witcher III but it's only Geralt as well, right? So I don't think it will be really comparable to Mass Effect because the other characters are not your party members.
    Apropos romances, I wonder how it would be possible to make them a bit more special/interesting but not gimmicky. I liked these little dates you could have in Rune Factory 4 after getting together with someone. (I don't really like it if it just "ends" after they get together - there is so much more after that.)
     
  19. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    Thinking about system-driven relationships, I remembered this video on The Last Guardian. He talks about how mechanics can communicate in a distinct way and uses a part where the Guardian breaks established mechanics rules un-announced, demonstrating a change in relationship to the player character. The event that he mentions is still technically narrative-bound, but it's easy to imagine a mechanical behaviour shift in an NPC having a similar effect and being driven by an invisible value system.
     
    Last edited: Jan 19, 2017
    TonyLi likes this.
  20. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    I'll be honest, I don't quite get your complaint here about "the transparent and hard-coded manner in which the player's actions affect relationships." Are you referring to the approval system? Are you referring to the generic NPCs-all-like-a-Light-Side/Paragon-character thing? Are you referring to the gating of content (like a loyalty mission or something) behind character approval? Are you referring to the fact that big things affect the relationships while everyday interactions don't?

    It seems like player actions are guaranteed to affect relationships, at least in a game that gives that choice. And I don't see how it can be anything but "hard-coded" in some sense.

    I'm not saying I disagree, but I don't quite understand what you're referring to.
     
  21. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Mostly the first thing. The example I often cite is a specific, hard-coded event in Mass Effect 1. In the game, you can drive around on planets. Some of these planets have space monkeys, native life forms, that you can run over if you're not careful. On one specific planet, if you hit 6 or more monkeys a potential romantic interest makes a negative comment, and your relationship value drops. However, on all other planets you can run over as many monkeys as you want, and she/he won't appear to care in the least.

    Once you know the "rules" -- in this case that the space monkey counter is only in effect on one planet -- you can game the system. It may be more advantageous to drive a straight line through a crowd of monkeys. You might do this on every single planet except one. And on that one planet, completely out of the character you've established, you'd avoid all the monkeys, simply because you know the underlying implementation. It breaks the suspension of disbelief that the narrative is trying to create.

    KotOR 2 has a similar issue. The player has an Influence value with each companion. Higher Influence values open new dialogue options. Some actions add, say, +1 to Influence without any restriction. Knowing this, you can just repeat that action a hundred times to max out a companion's Influence instead of letting it develop naturally over the course of the story that the writers had intended. I don't have an issue with the gating of content, but rather how those gates are opened through gameplay. I agree with you that the actual gated content will almost always have to be hard-coded in some sense, especially if you're talking about content that's created by human writers.
     
    EternalAmbiguity likes this.
  22. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Fanboy comment: KotOR 2 was Obsidian, not Bioware. From how you describe it, yeah that sounds bad. But the solution there is to make it so the player can't "game" the system (and I would question whether that was intentional or not--I doubt it).

    And I get your comment about the space monkey. But does the game (and do their games) do that anywhere else? I mean, on that one planet you had the shifty-looking cow siphon your credits if you turn your back, but not every cow does that. Outside of that (humorous) example, I can't think of any other situation. Outside of the obvious ludonarrative dissonance thing most games suffer from of course (kill 100 men getting to Harkin, have "moral dilemma" over killing him or not--though that's slightly justified what with his defenseless state).

    It doesn't seem like it was a systemic problem across the series or across all their games.
     
  23. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Bioware and Obsidian writers know their stuff. In one sense, because they put so much attention and manual effort into handling all the edge cases, it isn't a systemic problem in their games. But that's what made the space monkey event so jarring to me -- enough that it was the inspiration for Love/Hate: to provide a solution that makes it harder for the player to game the system, and easier to match gameplay with story (ludonarrative synthesis if you prefer).

    However, in another sense, it is a systemic problem in their development process because the writers have to manually consider all the edge cases. Again, they're good, and they do it well in most cases (although spamming for influence in KoTOR 2 being another instance they missed), but it's a lot of what I would argue is unnecessary manual work that they could automate, freeing up their time for more artistic content.
     
    EternalAmbiguity likes this.
  24. thegreatone

    thegreatone

    Joined:
    Jul 19, 2017
    Posts:
    3
    Hey was I was hoping to know if you were able to implement this into a game and if so how, bescuse i want to implement npc relationships in a game
     
  25. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    You mean like Love/Hate? Version 1.8.7 just released, and it will let you implement NPC relationships in your game.
     
  26. thegreatone

    thegreatone

    Joined:
    Jul 19, 2017
    Posts:
    3
    I was looking at that would you be able to use it with a 3d game, and how do i use it i'm new to game development I didn't find any tutorial on you-tube.
     
  27. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Yes, it works with 3D or 2D. You can download the free evaluation version here if you want to try it out. There aren't any YouTube tutorials, but it comes with a detailed manual.

    Since you're new to game development (welcome to the exciting world of game development, BTW!), I really recommend watching some of Unity's excellent video tutorials first. They'll give you a good foundation in using Unity itself, which will help when you start using Love/Hate. If you have any questions about Love/Hate, let's bring them to the Love/Hate forum thread.
     
    EternalAmbiguity likes this.