NPC Dialogue System
I'm trying to think of how to tackle a lot of written dialogue between a character and various NPCs. After some thought on the matter I decided that my blue print design for said dialogue would be as such:
PlayerCharacter (PC) Blueprint(BP):
When pressing the action button within range of an NPC that can be spoken to, and is not currently in dialogue with the PC, the PC BP fires off a request to initiate dialogue. If the NPC is in dialogue with the PC it will instead fire off a request to move forward in the dialogue.
When pressing the jump button within range of an NPC that the PC is currently in dialogue with the PC BP will fire off a request to move backwards in the dialogue.
When pressing the cancel button within range of an NPC that the PC is currently in dialogue with the PC BP will fire off a request to close all dialogue with that NPC.
I used requests as a way to divorce the PC BP from any kind of direct interaction so I would only have the bare minimum of logic required inside of the BP.
When receiving a request to open dialogue the NPC BP will, if it has any, open its very own dialogue widget with all possible conversation variations.
When receiving a request to step forward in dialogue the NPC BP will call the function inside of its personal dialogue widget to move forward in the dialogue.
Step backwards and cancel dialogue use the same functionality as step forwards with their own respective functions inside of the NPC specific dialogue widget.
NPC Dialogue Widget:
Will contain every bit of dialogue possible between the NPC and PC, including the logic tree for determining what piece of dialogue to display next based on an answer chosen previously.
When receiving the step forward, backward, or cancel command from its corresponding NPC BP the dialogue widget will perform the respective action.
I hope you're still with me, because now I can finally ask my question:
With the way I have it set up now, every unique NPC has its own BP and dialogue Widget. The decision to have them all have their own dialogue widget was simply so I could keep the dialogue as neat as possible. I tested having just one dialogue widget and upon getting to three NPCs with only straight forward dialogue (no choices to be made changing dialogue) I realized it just looked really cluttered and had a feeling that it would affect my ability to make a widget that was easy to follow and not all over the place.
What this means is that for every unique NPC BP I have to go in and make them also call a dialogue widget unique to them. This means creating a dialogue widget for every unique NPC (and dialogue widgets that can be shared by common NPCs).
While I am absolutely happy to set about this task, I had a nagging feeling that such repetition on my part might mean I'm overlooking a tool (or a separate way of setting it all up) that would be easier or faster.
So, to make a very short question super long: Is this a good way to go about what I have in mind or am I overlooking something/looking at it completely wrong?
Follow this question
Once you sign in you will be able to subscribe for any updates here