Dialog systems play an important role when it comes to video games as this can make significant impacts on the NPC you choose to interact with, they are also the most simple type of mechanic to make as you don't need to run any complicated code in order for them to run successfully all you need is the dialog itself and the concept of nodes
But what is a node, well it consists of the Node ID so this would be the first character that would be the first person to talk, a layer ID for the first layer of text, The dialog text itself, any dialog options (such as responses to the dialog text) and the destination information as to where the node will go to next which will then create a new layer ID (from Layer 1 to Layer 2).
To understand about how node responses/dialog responses, you’d think about them as separate lanes so for each piece of NPC dialog and on each layer of dialog, there would be a bad option, a neutral option and a good option. So the character would start off with a running dialog score which would start at 0, when the player makes their choice, the score of the response will be added to the player score, the game would then calculate the player‘s score and loads the next layer’s correct NPC dialog node.

So for example, in the beginning of the NPC response, if the player chooses a negative response then in the 1st player layer response it would result in a bad NPC response and the player Dialog score would equal -1. In Layer 1, if the player chooses a neutral response, then the Dialog score would just stay the same (at -1) and on the next layer it would still be a negative player response (as the score hasn’t changed). If however the player decides to choose a positive response, then the dialog score would increase by 1 and it would change to 0 (as it was -1 before) and on the next layer, it would then become a neutral NPC response. If the player to choose a positive response, then the dialog score would increase by 1 and the new score is now 1 (from 0 to positive 1) and thus the sequence continues and the dialog score will continue to change depending on how many layers of dialog text you choose to include in your dialog system.
These types of dialog systems are very common in games such as Telltales; The Walking Dead game series as the dialog systems with the characters that you choose to interact with, will determine your relationship with your character depending on which dialog option you choose - if you mainly choose positive responses, then the relationship of the NPC will be mainly positive towards the player and vice versa. Though ongoing NPC relationships aren’t the only type of dialog grading system, you could determine the grading system from response times as if the player takes too long to respond to the NPC’s dialog within a certain amount of time, then this will automatically lead to a neutral response or a silent response - a silent response would look something like this “...” in a dialog text box - though this might make the NPC react negatively towards the player as the player didn’t respond to the NPC and they might presume that the player was not listening to the question or topic that the player was meant to respond quickly to.
Some important aspects that I need to think about for writing my own dialog for my game is that it should give the player more information about the world and the character that they are talking to - if it does neither than it is useless for the player - though saying that the character may or may not know certain things about the world so it isn’t necessary that they should know the entirety or the ins and outs about the whole world also they’re supposed to be sentient beings with their own mannerisms and their own personality and voice so therefore they shouldn’t sound like the player is talking to a completely different person other than this specific character. The character might also have a back story and some history behind them so I must make sure that I tailor what the character says stays true to that experience so they must sound and talk in relation to their backstory/history.
So I had a go at making my own dialog system that could possibly be in my game with an interaction between my character and an NPC they encounter whilst traversing through the world. The context behind this dialog is that the main character is about to approach and pick up a wild mushroom in order to use it to create a health potion to gain back the health that they lost from an intense battle, they spot the mushroom that they need and as they start approaching the mushroom suddenly the mushroom slowly starts to turn itself towards the player and to the players surprise their is a face on the stem of the mushroom as it did have its eyes partially closed which could possibly mean that it was sleeping and the main character seems to have rudely awakened them and of course is understandably quite cross at the main character.

How I would use a dialog system within my game is that it could work within a social interaction that my main character would have with an NPC but it should work in cut scene based scenario, as you would normally come across a dialog system through either a cutscene or when talking to a regular NPC - though it should be important to note that I won’t include a dialog system in every single social interaction that my main character would have with the people around them such as for social interactions that don’t necessarily would add more context to the games story like when a character interacts with a general store owner to buy items (that type of social interaction that wouldn’t necessarily add to the story).
Comments