An idea to give a character player diven personality.

Didjargo

Member
I'm working on a little side project that has some life-sim elements akin to Harvest Moon or Stardew Valley. Mostly forming relationships with the various townsfolk and ultimately marrying and raising a family with one.

One of the things I am experimenting with is to give your player character some sort of personality based on your input. In turn, certain NPCs will find certain personality traits more or less appealing. This is an attempt to remedy the RPG cliche where you play as an emotionless mute that everyone somehow loves and admires.

So what I am thinking is that many occasions when you are interacting with an NPC, they will prompt you to give a response. At which point you will be given a choice of not so much what you say, but how you say it. The following chart will pop up giving you a choice of 8 personality traits to express.

Each choice may present a piece of dialogue to go with it, but I am not attempting to make an 8 headed dialogue tree for every interaction here. The dialogue would essentially say the same thing, but with a different personality. So if an NPC, for example, asked you if you liked her hat. You can say yes or no, but you can choose to be an optimist and say "yes, it looks excellent on you" or a cynic and say "yeah, I guess. If you're into that kind of thing". The character will give a quick reaction to clue you in to if they like or disapprove of that response, and the interaction continues.

You'll notice on the example chart there are red dots with connected lines. Each choice nudges you toward that personality and away from the opposite type. So, for example, choosing to give frequent reserved responses will make you less boisterous and more reserved. So the image above shows witty courteous person who is rather reserved and a bit of an optimist.

As for a game play example, the Inkeeper's daughter might like people who are witty and boisterous. Having a personality that covers those traits will cause her to form a friendship with you more quickly. Not to say that she will never like you if are reserved and deadpan, but if will take much longer to form a friendship.

That's all I have to say about that aspect. I just wanted to get people's input on the idea. Is it good, is it bad? Has it been done before or has a better system been done before? Is it horrifically broken? Let me know what you think.
 
T

Triangle

Guest
I think that if you get this working properly, it will one day be industry standard and we will all sing your praises. Seriously. I want to play a game with this NOW.

But thinking about implementation gives me a headache. Lets say you have 12 NPCs, each of whom have 12 conversations with the player, each conversation having 2 opportunities for the player to respond. Thats 288 player response opportunities, not actually as bad as it sounds. But if each one of these response opportunities allows you to respond in each of these 8 ways, thats 2304 possible responses that the player can say total (if I did my math right, I am not certain as I am tired). That is brutal, but attainable. But you probably want either more then 12 NPCs or 12 conversations each, or just more flexibility in general. Chances are, your game will be much more complex then that in at least some ways. So if you are good at writing, confident with your data storage system in your game, and working with a small number of NPCs or conversations, I see nothing stopping you from implementing this wholesale.

If you want to do something more ambitious then that, and I know I would, I'd recommend figuring out some way to cut your workload first. I'm not saying that because I think this idea is overambitious or because I doubt your competency, but because I know I have fallen into the trap of creating a complex system that expands unexpectedly, and that with less interesting ideas then yours! I'm starting to fall into the habit of giving wishy-washy advice, so here are some things I might try myself to get a mechanic like this working (or just because) if I was going to do this myself - hope some of them might be useful to you.

1) - Have conversations only have a limited number of either-or responses, so that you might have to choose between a 'boisterous', 'reserved', 'cynical', or 'optimistic' choice instead of all 8 every time. I figure this probably makes sense anyway as people don't usually think their responses through between more then 3 or so options anyway, unless its a particularly heavy conversation, and the topic would also influence the options (like if the conversation is an NPC asking your opinion on some endeavor, cynical/optimisic would fit better then courtious/crude usually). Also, you could use this to help make meaningful conversations more immersive by only using all 8 options at once during those times.

2) - Have non-verbal player actions count towards these values too. Yes, I'm serious. I don't know how many conversations are going to be in the game, but thinking of, say, Stardew Valley as an example, its probable that with this type of game conversations are only occasional and not the very fundamental core of the gameplay. This means your personality values might be too easily skewed by a single conversation, especially as it is ratio based (the player might be immediately branded a cynic for a single comment). This could lead to weird interactions where the player is confused as to why their reputation is the way it is, so adding more things to offset these values might help provide a more accurate picture. As for what sort of things could influence these values, you could do all sorts of clever subtle things. My ideas: wearing formal clothing counts towards 'courteous', wearing garish or no clothes counts towards 'crass'; planting high-yield plants counts towards 'optimistic', planting hardy plants counts towards 'cynical', the number of conversations you have daily counts towards reserved/boisterous, the kind of decor you put up counts towards witty/deadpan. Of course, this should all be weighted really lightly compared to the conversations.

3) - Another way to buffer the impact on your traits would be to set a minimum amount of any trait to actually get the effects of it, like if +1 Stoic through +1 Witty all counted as 'Neutral', but any further push either way would incur the effects.

4) - Is your reputation global, or based individually on who you talk to? Global would be much easier, and might make more sense depending on your goals, but having separate individual personality perception might be useful. After all, that's how it works in reality - people act differently in different contexts and their reputation varies. But of course fame and infamy for various things also pervade through all interactions, so it's not all totally localized either. I'm not suggesting you start trying to make a sociological simulation, but having independent perception for each NPC might be useful. After all, chances are the player is going to dislike one character or the other, and then be deliberately rude to them and them alone, which might mess with the system a little. But then again, that could also be exactly what you want - consequences!

5) - Make a lot of flowcharts. Any way you implement anything like this, even if it's less dramatic then my original example, is going to have a massive amount of dialog text, and it will be impossible to manage if it all isn't sorted very well. Also, back these, or whatever else you store your text in, up as often as possible. Losing backups of art assets sucks, but at least you can literally see what is missing. With writing, it can be hard to tell exactly what is missing out of huge chunks of text..

6) - You should probably figure out some way to write all of the game dialog to an external document if you aren't already, and have the game read it. That seems to be the best way to go with games that have lots of dialog, and would be easier to work with.

7) - The UI. So the player will chose something on the chart for their responses instead of choosing a response they can see word for word? Maybe I'm misinterpreting this, but I don't think this is a good idea. People like to see exactly what their character will say, and if they can't, there is often a strong chance of at least some dissonance when their character does something different then the player intended. Practically every 'dialog trees as story progression' game that shows abbreviated summaries for responses has at least one instance in it, and often multiple, where this happens, and people HATE it. Mostly this is magnitude - when the player sees the exact response, they'll know how harsh a 'cynical' comment is and won't be surprised when they alienate the NPC they are talking to. People are also suspicious that their responses don't actually fundamentally differ much, or change much, and if they can't see the responses they can say, they will question it. If I'm wrong, and the chart is just alongside the chat options, then I'm totally fine with it, it's a good visual.

So in summary - I really like the idea, it could help massively in disrupting a lot of tired RPG tropes and seems straightforward and adaptable; however, the idea of implementation scares me. The traits / countertraits system seems good too, it looks like a good representation of personality to me. I would just change 'deadpan' to 'stoic', personally. I say start with a small prototype and see how far you can go with it - but please, please, please plan it out first.
 

Toque

Member
Basically AI characteristics for an rpg....

Interesting. First thing that comes to mind how exponentially difficult that would be!

I would first cut down your list to make it manageable. Maybe 4.

In what practical way how would it influence or change the game? Or change the experience of the player?

How would the game reflect these changes?

Do you need 10 different dialogue boxes now per interaction pending on characteristic?

The arrays and math to track it...........yowser.


Like the game where you have to be nice to finish it..... sorry it’s 2:30 am and I’m old..... can’t think of the title.
 

Toque

Member
Very cool idea but cut your list to something that is manageable.

But I don’t know your game. Maybe this only effects a few variables and you can manage it.

But if it’s just dialogue boxes effected maybe you could do it??

But draw out a flow chart and see how big it would get.

Not sure how I could do it.

But would the game change pending my personality or just dialogue boxes??
 
Last edited:

Smiechu

Member
Basically - Fallout series is a very good example of this kind of system. Your interactions with NPCs depend on your character traits, karma, appeal etc...

You can follow the basic concepts:
- there is the basic dialogue tree, with standard answers and questions - typical for "average" stats.
- depending on stats of the player - the set of questions/branches is cut or expanded - allowing the player to open some new conversation branches.
- the additional dialogue tree branches are quite small and short, and occur only with small number of NPCs - mainly the story critical situations.
- there is a "chance" factor of convincing the NPC during conversation.

But yeah you need a very good dialogue system to do that.
 

Didjargo

Member
6) - You should probably figure out some way to write all of the game dialog to an external document if you aren't already, and have the game read it. That seems to be the best way to go with games that have lots of dialog, and would be easier to work with.
.
Do you know of any tutorials on how to do that in Game Maker Studio?
 
T

Triangle

Guest
Do you know of any tutorials on how to do that in Game Maker Studio?
I don't know any that specifically focus on it, but the very basics of writing to external documents are brought up in Tom Francis's tutorial series in episode 16 at 9:45. He shows how to set up a basic save and load system using the basic Gamemaker system, then talks briefly about using external files, showing how to set up a file writing and file reading system for a basic inventory system set up earlier in the tutorial. He's just using it here to save 2 numbers in an array, but the same thing could be used for strings. I'm almost certain that you don't have to write these files solely in Gamemaker's code, so once you've got the basic reading code set up you should be able to just write into the TXT document like you would anywhere else. I know that the GM-made visual novel VA-HALL11A stores all of it's (hours) of dialog in about a half dozen TXT files (one for each language, pretty sure) so while I have no clue how that was done exactly, I know it's very possible. Hope that helps, I'm no expert.
 
T

Triangle

Guest
You'd just have to make sure that the code was set up right. You do have to tell it when to read a line and when to skip a line and what to do with the data on each line, so I'd study up on it before loading in your dialog. It's not entirely straightforward.
 
A

Ankokushin

Guest
Oh! Oh! I have a suggestion!

I like your initial concept. I myself am working on a conversation system a little out of the ordinary (but I don´t have the skills to implement it yet)

What I would like to suggest, in order to realize your idea IN SOME LEVEL, is that you create quantitative checkpoints where the conversation may stop or continue. I will write an example.

NPC LINE 1: Hello! Are you from around here?
If the player´s answer is less than 90% crude or less than 80% cynical, the NPC delivers a second line, more intimate.
NPC LINE 2: Well, nice to meet you. I am Anna.
If the players answer is less than 50% reserved and more than 10% optmistic, comes a third line, more intimate.
NPC LINE 3: You look like an adventurer or something.
If the player´s answer is more than 30% boisterous, comes a fourth line, more intimate.
NPC LINE 4: Well, maybe you are just the person I needed. A witch has settled in the forest and I would like to ask for a potion, but I am afraid of going there... witches are dangerous. Would you go there for me? I can pay.

So each NPC actually has only one sequence of lines to go. If the player fails a check, they produce some evasive standard sentence like "I see...", "Well, I have to work" or "I don´t like you"
It goes without saying that the players answer does not need any representation.
 

sylvain_l

Member
But thinking about implementation gives me a headache. Lets say you have 12 NPCs, each of whom have 12 conversations with the player, each conversation having 2 opportunities for the player to respond. Thats 288 player response opportunities, not actually as bad as it sounds. But if each one of these response opportunities allows you to respond in each of these 8 ways, thats 2304 possible responses that the player can say total (if I did my math right, I am not certain as I am tired). That is brutal, but attainable. But you probably want either more then 12 NPCs or 12 conversations each, or just more flexibility in general. Chances are, your game will be much more complex then that in at least some ways. So if you are good at writing, confident with your data storage system in your game, and working with a small number of NPCs or conversations, I see nothing stopping you from implementing this wholesale.
for smalltalk and even quests dialog:
driven procedural dialog generation.


@Didjargo
take what I'm saying with not a grain of salt but a full hand ;) (because it was a few years ago, so my memories aren't reliable; the discussion was also more theoretical than detailed on how to implement it and chance are I'm also mixing more than one discussion into)

Already read about similar ideas on a forum but was more oriented around the D&D system and its alignment system (good-neutral-evil; lawful-neutral-chaos) the characteristics which should impact the dialog also (wisdom; intelligence; charisma) and other elements(races and in particular the native language; the relationship if friend or enemies; etc...) and of course past dialog with that person or even other. (current events that are widely known or privately only, etc...)
I don't remember the things well. But there are a lot of studies about language and social behavior.
intelligent people tend to use more precise/complex/wider vocabulary (it's not just a dog, it's an aggressive black rottweiler)
for race aka native languages, the idea is for example that in german verbs have often suffix that are split and put at the end of the phrase, which result that german usually don't interrupt each other as you have to wait for the end of the phrase to grasp the meaning.

each word represents a thing or a concept; but most importantly is attached to certain kind of context, value, etc.. (positive or negative, slang language, aggressive or assertive, etc... "yo, what's up man"/"Good evening my dear. How are you doing?")
there are grammar rules, etc...

As there are german-english translator program nowadays, it's should be possible to do the same with higher/macro dialog language program that would just translate into the required "language" depending of the 2 interacting persona and context/history of the quest/etc (aka if a very intelligent NPC with opposite alignment and not very friendly is talking to the player very dumb half-orc; he would in purpose use a complex vocabulary and the most complex word should be out of grasp of player half-orc so just be translated by incomprehensible glyphs; that would quite limit the dialog tree :D).

That means in that theorical higher/macro dialog language that you shouldn't have to handle something like @Triangle was saying 2304 responses. Those would be mostly automatically handled and generated by the program.

Of course that's for a highend solution; but you could still go for something interesting with simpler solutions.
Depends a lot how well written you want your dialog to be.
Think of the censorship on chat for insult,etc...; if I continue with my intelligence characteristic; it can be reused just to censure this time complex vocabulary words.
also you can use also very generic phrases like you use as example:
"yes, it looks excellent on you" or a cynic and say "yeah, I guess. If you're into that kind of thing".
those are very tainted tons of phrases and easly reusable.
But you could easily generate a bunch of phrases using template phrases.
"what do you think of my <clothes object>?" with a rule where the dialog system would pick a random clothes of the NPC (or the most valuable, or what rule you want)
" yes, your <clothes object> looks excellent on you"

just the fact of having a word different in the answer would introduce a bit of variety to the dialogs.

and you can go further if you are motivated:
"what do you think of my <exact clothes object>?" for example: a leather hat with a pheonix enchantement)
and the cinic answer could downgrade to the category of the object:
" yeah, I guess. If you're into that kind of <category clothes object>" (here a hat)
 
Last edited:

Yal

🐧 *penguin noises*
GMC Elder
Many big famous-for-their-writing RPGs (say, Fallout New Vegas) solved this by giving you the same choice several times, just worded differently. For instance, you could have a good, evil or neutral choice, with three versions of the good, five of the neutral, and two of the evil: these could have varying degrees of sass, sarcasm and piety depending on what fit the situation. Game mechanics-wise, they might be the same choice, but if they're presented differently to the player, they might resonate more with one than the others.

I guess it makes sense, though - people you kill don't care if you killed them out of religious zealotry, greed, personal grudges or madness - they're just the same kind of dead. And most games don't really need to track anything more than whether NPCs are dead or alive, perhaps their general disposition towards you (which might be very well represented with a signed integer).

So TLDR, KISS (Keep It Simple, Stupid). You don't need to model everything to be able to use it meaningfully. Let the player's mind do some work too, it's less work for you.
 
Top