Jump to content
  • Advertisement
Sign in to follow this  
Rybo5001

A deeper way of representing opinions of NPCs

This topic is 843 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to think of a good way of calculating/showing an NPCs opinion of someone else (whether that be another npc or the player).

 

Games like Crusader Kings use a plus/minus of reasons but it can feel shallow

 

+50 - Has a nice face

-50 - Tried to kill me

 

Doesn't quite represent truly the complex relationships and opinions humans can have.

 

I thought of having several of these in one. For example one measurement of how much they like you personally, a measurement of how much they like what you do, a measurement of how much they agree with actions you've taken.

 

E.g

 

Personality opinion: +5 Friendly, - 10 Short temper

Actions opinion: -10 Insulted me

 

But I'm looking for a nicer solution that just more numbers.

 

Any ideas or suggestions?

Share this post


Link to post
Share on other sites
Advertisement


But I'm looking for a nicer solution that just more numbers.
 

 

its going to be hard to get away from numbers. you have to quantify the feelings/relationship somehow.

 

in the end, you'll have some combo of characteristics (looks, personality, etc) and actions (gave me gift, pee'd on my lawn, etc) that add up to a "score" or perhaps multiple scores on multiple scales (such as like vs love vs lust, IE friendship, caring, and sexual attraction). you are friends with your drinking buddy, you care for your parents, and you're attracted to the girl next door.

 

just cause you use numbers to track stuff doesn't necessarily mean you should show them to the player. descriptions rather than numbers, while more vague, might help to reduce the "its just a numbers game" feel.

 

Caveman 3.0 is famous for everything affecting everything in the game, even relationships - but it still just tracks them as a single number - and displays it.

 

when mating and relationships are added, it appears a second constant for sexual attraction of each person to every other person will be required. 

 

with relations you can often get away with a single number for both parties - IE they have the same feelings about each other. but with sexual attraction, you need a value for how attractive each person finds every other person.   A might think B is hot, but B might think a is not hot.  this accounts for "not my type" and models "no accounting for taste" and "love is blind".

 

you can also use two way variables for relations, IE what A thinks of B, and what B thinks of A,  never tried it myself to see if it made any difference. it might or might not, depending on what things affect relationships in your game.

 

to get rid of the "its just a numbers game" feel, try using descriptive terms instead of numbers. that's what people do in real life.

 

BTW  "a deeper way of representing" implies more in-depth modeling , which implies more variables and more numbers, not less.

Share this post


Link to post
Share on other sites

As Norman said, with computers it has to eventually come down to a number. Crusader Kings breaks it down into a fairly simple "love/hate" system, where everything has binary effect on NPC reaction. 

 

As you've started to explore, you can complicate the system (with hopefully beneficial effects) by getting rid of the simpler binary nature. Maybe an NPC has several "categories" of opinion towards the PC/each other: Personal opinion, professional opinion, religious opinion, etc. Different actions and considerations would use different combinations of the opinions. Deciding whether or not do do business with someone might use only personal/professional opinions and ignores religious opinion entirely. Deciding whether or not to marry someone uses personal opinion above all, but may be affected by religious opinion. 

Share this post


Link to post
Share on other sites

I tried doing something similiar to this for food, I created a vector with 5 values representing sweetness, saltiness, spicyness, etc... then, I gave each npc a random vecotor as their "Prefered" flavor, then the distance between the foods vector and the npcs vector was how far from their preferred taste the food was.... so I could then assign "Really like it!' "Like's it" "will eat it"... etc based on that dist.

 

Perhaps in this case you can find some other axis to track..

Share this post


Link to post
Share on other sites

I think it's hard because human nature is continuously evolving and transcending its own limitations. Any model you come up with will be static and fall short. Your best hope is to create a model that may be limited but serves to communicate a cohesive unifying theme that has depth. Think of an artist's painting. It may have very simple strokes, colors, shapes, it may not contain a fraction of the detail of e.g. a photograph - but its depth comes from what it points to that is beyond the painting itself. Similarly a NPC behavior/visuals may not come close to that of a real human being, it may walk in a strict path, say the same things, but if it fits a bigger theme, the character may come alive (you can probably remember being deeply emotionally invested in a pixelated video game character). 

 

So when coming up with a way of representing opinions, think in terms of your game's themes and how that system serves it. I've not played crusader kings but from what I can see it's about plotting, scheming, manipulation and conquest. In a world like that then all relationships comes down to weighing plus/minus columns. Now if the game is real good it also has a thing or so to say about that way of thinking and what kind of world it shapes. If it does that then that simplistic system like that actually carries a lot of depth.

Edited by Opwiz

Share this post


Link to post
Share on other sites

I don't think think there's a fair or fun way to manage an intricate personality system in games. Socializing occurs at a personal almost instinctual level, while your interaction with it in a game occurs at a logical level.

 

Most social situations in games are on a fairly shallow level. Buy/sell items, exchange information, deliver story, etc. If you slapped a personality system on top of that, it would just be an annoyance. Alot of the NPC reasons for the socialization are internal, so it wouldn't make sense for you to need a system. They want money, you have money, so you buy their stuff, etc.

 

If you go further than a buyer/seller relationship into friendship, love, hate, etc, any system you impose on a relationship is going to seem artificial.

 

The core problem is the player's reason for interacting. If a external actor was playing a human being in real-life as a video game, that person would come off as a complete psychopath. The only reason for interacting with others in a game is 100% pure selfish gain. So in the end, all systems just become a barrier against the player's psychopathic motovation to get what they want no matter what.
 

Another problem is input. There's too many variables to make it anything except artificial. In the end, you can only make it complicated and artificial, or simple and artificial.

Share this post


Link to post
Share on other sites

if you don't need to quantify how much a person feels towards you about a specific thing, and instead can get away with a set of true/false opinions, you can capture this in a bitset.
You could also capture NPC personality in a bitset.

For example,
[bitset of history with player]
bit0 = 1 if insulted
bit1 = 1 if victimized (if your game allows stealing or assaulting NPCs)
bit2 = 1 if intimidated (if your game allows intimidation, blackmail, etc)
bit3 = 1 if not intimidated
bit4 = 1 if last persuasion attempt failed (if your game has a persuasion feature)
bit5 = 1 if last persuasion attempt succeeded
bit6 = 1 if player has helped the NPC by completing their quest
bit7 = 1 if player has failed the NPC's quest
[bitset of NPC personality]
bit0 = 1 if easily offended
bit1 = 1 if vengeful or judgemental
bit2 = 1 if fearful
bit3 = 1 if challenging
bit4 = 1 if unreasonable
bit5 = 1 if reasonable
bit6 = 1 if grateful
bit7 = 1 if vengeful or unreasonable
You can then mask these two bitsets (opinion & personality) to obtain a useful approximation of the NPC's feelings toward the player as a third bitset.
You can then use additional response masks to determine if an NPC should be angry, fearful, respectful, amicable, etc towards the player. Using the above examples:
angry = 1001 1011
afraid = 0000 0100
respectful = 0110 0100
amicable = 0110 0000
If you need a way to quantify these feelings to determine what face an NPC should make or the tone of their responses to the player, you could use a combination of population count (= number of reasons an NPC has to be angry, afraid, respectful, amicable, etc) and a multiplier (= NPC's relative valuation of the reasons for each emotion).

I've never used such a system or know of it being deployed previously, so I don't know how well it would work in practice. I just like bitsets. :)

Share this post


Link to post
Share on other sites

It'll all come down to numbers, of course, but you can possibly use the numbers to tell a story in a way that feels a little more real.

 

One aspect of Crusader Kings II's opinion system that's kind of nice (albeit minor) is that a character's traits also cause them to feel more or less strongly about others' traits.  Like Zealous increases the different-religion penalty.  (And, of course, no one cares about your lustiness unless they're chaste, etc.)

 

You could expand this a bit to give a bit more of a personal touch to these stories, where each character has traits but also priorities that acts as weights.  (Like we might have a big difference in trait X, but my priority for axis X is only 0.1 and so I don't really care.  Whereas someone who values axis X at 1.0, a difference like that is a dealbreaker.)  

 

You can then look at the results, choose the weights and axes that contribute the most to the opinion, and generate a small story about it.  Like if Bob has a high priority against Pride, and also a high priority against Talkative, and Carla is Proud and Talkative and Intelligent, but he himself also is Proud and Talkative, you could have the result, "Bob dislikes Carla because he thinks she spends too much time talking about her own accomplishments, not realizing that that could describe him just as well."  Or with a different set of priorities, where he values Intelligence highly and is only mildly against Pride, "Bob respects Carla very highly for her intelligence, so much so that he's willing to overlook her sometimes-inflated opinion of herself." 

 

The number of traits would have to be pretty small, lest the combinatoric possibilities for the text explode out of control, but the priorities can be fairly complex.  They just rank what you're going to talk about, they don't really complicate the text itself.  (Like Bob might value ambition in young men but contentment in older men, and barely think about it for women of either age, while valuing talkativeness in older men and women while not liking it for younger men and women.  He might have a complex preference curve for each trait, but that doesn't complicate his story about Carla, it just makes it less likely that he has the exact same story for whole swaths of his acquaintances, which would get pretty tiresome.)

Share this post


Link to post
Share on other sites

I'm trying to think of a good way of calculating/showing an NPCs opinion of someone else

 

 

 


But I'm looking for a nicer solution than just more numbers.

 

for more in-depth modeling, more numbers is the answer. track more stuff. make more stuff affect other stuff.

 

but relations in the real world are not a numbers game, so don't show numbers, just descriptions, or even better, via npc behavior: "i'll do no business with you - stinking christian!".

 

and all numbers should have a real tangible affect on gameplay.

Edited by Norman Barrows

Share this post


Link to post
Share on other sites

I'm trying to think of a good way of calculating/showing an NPCs opinion of someone else (whether that be another npc or the player).

 

Games like Crusader Kings use a plus/minus of reasons but it can feel shallow

 

+50 - Has a nice face

-50 - Tried to kill me

 

Doesn't quite represent truly the complex relationships and opinions humans can have.

 

I thought of having several of these in one. For example one measurement of how much they like you personally, a measurement of how much they like what you do, a measurement of how much they agree with actions you've taken.

 

E.g

 

Personality opinion: +5 Friendly, - 10 Short temper

Actions opinion: -10 Insulted me

 

But I'm looking for a nicer solution that just more numbers.

 

Any ideas or suggestions?

 

I think creating a network of flags might be more complex and less "calculative" than the sort of faction standing. With ranks of emotions, you have a lot of room to measure how angry someone is compared to someone else, but not a lot of room for different kinds of anger: the seething passive-aggressive personal kind, the chip on your shoulder me against the world kind, the focused 'i'll prove them all wrong' kind. So having checks for certain flags or flag combinations, as though they are item requirements to cross a threshold might give you the depth you're looking for, however, that's a whole hecukva lot of content to create.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!