Search Unity

NPC Personality Traits

Discussion in 'Game Design' started by TonyLi, Jan 5, 2015.

  1. Zaladur

    Zaladur

    Joined:
    Oct 20, 2012
    Posts:
    392
    What about the concept of a 'mood scale' on these traits? Imagine a character is fairly neutral on the violence scale, but if you keep pissing him off he wants to smash things, and his violence trait moves up. Make him happy again, and he doesn't need to vent anymore, so violence isn't as appealing. Or a character who, when in a good mood, appreciates wit and humor, but as he gets into a bad mood, all that goofing around really makes him upset.

    Now as you perform actions that affect the mood/approval of other characters, their traits and what they find acceptable adjusts to the situation they are in.
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,690
    Great idea! Currently the system does this to a small degree. If a character is unhappy and witnesses a bad deed, it will affect him more (because he's in a bad mood). If he's happy and witnesses a good deed, it will also affect him more (because it reinforces his sunny outlook). I'll generalize this instead so you can hook in your own, different modifier routine such as the one you described. Thanks!
     
  3. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    I guess my thoughts are a node based system. I'm no programmer but I would think that you could basically have a brain node and a custom trait node, where you could make it affinity (Love to Hate), Friend to Enemy, etc. Buy simply pulling down a node and assigning it a trait. The designer can have just what they need, and it wouldn't be just for Relations but also could be for perks, fighting bosses or developing weapons and that could translate to how your status in the game is changed, if your status is that your a great warrior NPC's of lesser skills would run away. etc. (It's the DragonBorn run for your lives!)

    You could then have a node that ports in your Dialogue system that would bring in variables from conversations that you had with NPC's that would contribute to the different traits for how a feeling is processed in your Relationship Designer.

    You could then have a node at the end of a conversation that would add a designer determined amount of points that would go towards the player that could help or hurt the relationship to the target NPC.

    Everything could then go to a NPC brain node that could then be applied to your NPC characters and in the inspector you would now see your sliders to adjust the traits that define your character. And in the case of multiple war like characters you assign just the nodes you want to the brain and in the inspector you could choose random and assign it to your prefab so when you spawn or populate your prefabs each one could react differently without having to reinvent the wheel for each character.

    You could have several brain nodes and could label each one then assign the trait nodes that you created to those brains. You could have warrior brains, villager brains, wizard brains and with just a handful of traits you could have several different types of personalities, skills, perks, factions without the designer of the software having to build a gazillion node possibilities.

    Just a thought...

    Added thought to motion where you could assign a playmaker fsm controller or mechanim controller to the node for custom animations assigned to that node as well and then tie the different animation states to how the NPC feels about you...

    Maybe this is all crazy talk...
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,690
    No, you just described the system pretty well. It does all this, including Mecanim, PlayMaker, and Dialogue System integration. I just need to update it so you can specify your own traits rather than using a predefined list of traits, and provide the ability to define presets of those traits (warrior, villager, etc.). Traits will be focused on personality aspects, but I'll keep in mind the possibility of using them more generally. Thanks for the feedback!
     
  5. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I can't wait!!! :) Guess I need to use that NPC creator that my dear programmer made me. :p
     
  6. evan140

    evan140

    Joined:
    Jul 15, 2014
    Posts:
    72
    I have a lot of concepts drawn out on paper that are like what you're talking about and more. A lot of my concepts involve real world psychology. If I ever get my RPG off the ground (still in the phase of learning to program anything), game mechanics like these are going to be implemented first.
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,690
    Great! Please share any ideas that you'd like to. The more perspectives, the better!
     
  8. evan140

    evan140

    Joined:
    Jul 15, 2014
    Posts:
    72
    One premise I want to do is bring an MBTI-like system into a game.

    First, what sucks about MBTI is it's taught horribly. Like to the point people write about how fake and inaccurate it is. So let me describe what MBTI is as I understand it, and I am NOT an expert on it, but I do have at least an okay/good understanding of it.

    It's a system that gives you a vocabulary to describe your neurological behaviors. It is not your personality. In the end it's how you think first, not what you think.

    Introverted Sensor:
    • You may internalize your sense of competition. You're an introvert with regard to your sense of accomplishment.
    • You practice something (like a sport or art) because you want to better than yourself.
    Extroverted Sensor
    • You may externalize your sense of competition. You're an extrovert with regard to your sense of accomplishment.
    • You practice something (like a sport of art) because you want to be better than others

    By adding in a system where an NPC (or dialog options or whatever) where you can flag something as +1 or -1 in different ways, or a bigger scale (+72, -31, etc) you can affect what happens in the immerse aspects of the game.

    Example of implementation

    Imagine you're playing Skyrim. Remember Skyrim? It's that game where an NPC practically sees you with binoculars and they make a comment at you. An MBTI-like system in an RPG like this could be used to decide how an NPC would react to you when you entered his/her store. It could decide if your follower NPC will speak up if they are worried or not.

    Basically it's one way you could think about automating immersion with regard to NPC behavior. You could also implement as your own character's stat, which would influence choices you can make.

    All of the above I would like to see in my own game. Some day.
     
  9. evan140

    evan140

    Joined:
    Jul 15, 2014
    Posts:
    72
    Just thinking about more examples that may be familiar with someone in the popular game Skyrim.

    When a guard sees you in Skyrim, they say stuff to you almost at random.

    Extroverted guards:
    Sees an Argonian walk by, "Need something, Argonian?

    Introverted guards:
    Silent until the Argonian is MUCH closer than the extroverted guard, then says "Is something wrong?"

    There's a subtle difference in the logic of how you would combine those strings. The extrovert welcomed the character as part of his ongoing experience (like emotional perception), the introvert practically ignored him until he couldn't.

    The extrovert mentioned the race of the character and asked what the character "needs" - the introvert phrases his questions from the perspective of what the guard is responsible for. Sort of like asking "Is there something I need to do"

    This is all abstract stuff, but it automates the process of have a group of "identical" NPCs having different reactions to the player, thus adding to immersion.
     
    TonyLi, randomperson42 and JoeStrout like this.
  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,690
    Nice ideas, @evan140! 'Extroversion' could be another [-100,+100] trait that, for example, Dialogue System bark conditions trigger on.
     
  11. beige

    beige

    Joined:
    Mar 1, 2013
    Posts:
    18
    it looks like a good system. simple enough to implement, but variable enough to get some pretty good npcs going
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,690
    Thanks! I'm resuming work on it today!
     
  13. This_Game_Lags

    This_Game_Lags

    Joined:
    Jun 7, 2014
    Posts:
    25
    [Beware: VERY OPINIONATED]

    Ugh... I don't like this at all... You are trying to classify actions into emotions and traits but it doesn't seem like you understand how this is done naturally. Emotions are human because we can describe how actions relate to us. But we don't expect animals to have emotions because we cannot communicate to them. But we assign them faux emotions.

    Why something does something is often because it has too. How it feels about it depends on it's background.

    In you "Mass Effect Monkey Analogy" you describe a scripted event of an NPC's reaction to an amount of monkey's being ran over. If the NPC never seen those creatures before would she feel the same? If the creature was massively scaled up would she still feel bad about you killing them?

    For humans, we don't like killing things smaller than us because we naturally view things smaller with patronage. Babies are small and defenseless so we relate that with other things. "If it's small it must be defenseless."

    This way of thinking then comes about too.

    Woman sees a man saving a puppy from an agressive animal.
    [Woman's thought is: "If it's small it must be defenseless]
    [If man is defending defenseless puppy from agressive animal man appears altruistic.] (He could have gotten bit.)
    [Woman now feels man may be potential love partner because he can defend small child.]
    Man punts puppy away.
    [Woman now feels that the man attacked a defenseless puppy]


    There is a lot to how emotions are defined in just "What can I get from this humaniod?"

    Also, you don't describe how situational emotions can be. How did that puppy get there? Maybe the man was actually defending the aggressive animal because it was his pet. He transformed an evil devil beast into a defenseless puppy to save the world. His emotions got the best of him and he punted a puppy because he was still relating it to being evil.


    What I am trying to say is: Emotions are formed from past relationships and how well we understand them.

    Frustration came from only having one action from birth. "RUN EVERYTHING!" So we cry and flail and scream because we have yet to discover how to control individual parts. Fear is a strong factor because of our instinctual "DON'T DIE!". I think that was probably the first thought ever. Then we become frustrated because fear that unknown may kill us and not knowing how to not die.

    Then pleasure comes from realizing your not dying. Then it's calming to your disposition.

    So maybe we can break it down to smaller pieces.

    Disposition : Dead <------->Not Dead

    Pleasure being something that can be positive or negative to disposition.

    Then we have relationship values. Like discovering food.

    Food is pleasurable because it takes us further from being dead.
     
    Last edited: Jan 14, 2015
  14. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,690
    Thanks for the feedback. I'll give it some thought.
     
  15. This_Game_Lags

    This_Game_Lags

    Joined:
    Jun 7, 2014
    Posts:
    25
    I guess what I am trying to say is: Emotions can be directly tied with how an AI decides what is most beneficial for it on a subconscious level.

    Maybe you should develop three separate AI trees that have to agree before an action is made: Super Ego, Ego and Id. Both trying to decide the most beneficial route. Then maybe a third consciousness to make the final decision.
     
  16. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    You don't code much do you? Coding is about turning everything into a series of numbers. Does it capture the human experiance exactly? No. Well enough for a fictional game? Yes.

    System seems to work well enough. I would advise against havin too many traits. There is a point at where the subtle differences in behaviour will no longer bring noticable gameplay advantages. Diminishing returns, as you will.
     
    DanSuperGP likes this.
  17. This_Game_Lags

    This_Game_Lags

    Joined:
    Jun 7, 2014
    Posts:
    25

    Different coding philosophy. I prefer to make very simple mechanics and let them build their own relationships. For a structure of emotions you are tricking the human mind into empathizing with the medium through which you are trying to convey emotions.

    You aren't setting up emotions for an AI, you are trying to trick the player into believing your AI has emotions. Think more abstractly about how you go about this. Yes, Numbers. The numbers will reveal themselves when you approach the formula.

    You as a designer need to have a connection to each NPC and understand why they feel they do; not just this is the way they feel.

    If the AI doesn't come to a natural decision then the human mind may see the choice as being to logical and catch the pattern and stereotype you NPC. Stereotyping isn't always bad but in this situation it is. Stereotyping an NPC means a loss of its unique identity. Then chances the player will not develop a connection to it over that it's a tool to progress.

    Emotions themselves are a large debate.
    • Charity: -1=greedy, +1=altruistic
    What if the person is giving to a charity specifically for personal gain?

    • Integrity: -1=treacherous, +1=loyal
    False Integrity is one specifically a treacherous move to extract loyalty.

    This... is what I have a problem with. There is more to emotion than that. If you want faux emotions then you have to know how emotions become expressed through the medium of your choice. You can't simply write an AI and expect it to behave and express emotion.

    Emotion specifically keeps us from behaving and it makes us human.

    Also, awareness comes into play when it comes to emotions. Personal emotions as well. Some people are delusional. Maybe the Mass Effect woman was too. Maybe she was crazy. I bet if we run some psyche evals on the Destiny NPCs we will get some interesting results.
     
    Last edited: Jan 14, 2015
  18. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Oddly enough, this sort of thing is one of my most requested features. Players, or at least in my niche group, really want the "appearance" of more interactive NPCs. Will they completely resemble humans and their thought process? No. Will they be fun and interesting and add to the game? Yes.

    One can be a purist and have everything "real" or you can do what most games do and simply give the perception that something is happening. Emotions are not the goal here. Instead, we want reactions to things that are done in game.

    Everything we do in a game is perception. The little pixel people...they are not flesh and blood. The lighting is not real and is instead a complex series of numbers. The ground does not erode or evolve through time and does not soak up the pixel rain that falls. The plants do not usually naturally grow, imperceptibly so one does not notice from one day to the next. The characters in the game are behaving as they do based on programmed dialogue and movements. Actions are based on animations, and if the animation doesn't exist, one cannot learn it. Players know this and they accept it.

    You can write AI to resemble behaviors and reactions and you can program to allow players to express their emotions in a game through chat or triggered movements of their avatars (smiles, stomping feet, etc.). NPCs will only behave based according to scripts. I don't think anyone here believes that NPCs actually have emotions....that would be a little odd. :)

    This discussion is starting to resemble an argument about robots vs. humans rather than about game design.
     
    TonyLi likes this.
  19. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,690
    Exactly. Thank you. That's the point of this system. I really appreciate all the feedback everyone has given on enumerating personality traits. A separate thread would be more appropriate for the discussion of robots vs. humans.
     
    Kiwasi and Teila like this.
  20. evan140

    evan140

    Joined:
    Jul 15, 2014
    Posts:
    72
    It seems entirely reasonable to me. Almost every person on earth right now is a product of manipulated hormone levels. Your reactions and behaviors, yes you as a person, can be calculated out with enough detail to make it scary to some people. I know because I do this on a somewhat regular basis for work.
     
    Kiwasi likes this.
  21. iKonrad

    iKonrad

    Joined:
    Jun 23, 2013
    Posts:
    179
    Didn't read the whole thread but think you might find it useful

     
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,690
  23. Mullmeister

    Mullmeister

    Joined:
    Jul 23, 2013
    Posts:
    4
    Looks good! Cant wait till its on the asset store!