Recently I realized that I haven’t done much for the community. This has caused to me to make a little set of blueprints that will hopefully be useful to someone!
And yes, this system was based on Fallout’s style of Dialog. But of course, you can do whatever you want. <3
Alright, so this project consists of 3 parts. InteractionComponent, DialogComponent, and Example. This whole deal is very very simple, but I think DialogComponent is my favorite way of dealing with dialog, since it’s super easy to attach to NPC’s, and it uses the power of blueprints, so you can create your own macros and stuff! Win-win!
Quick Explanation of all the parts
This was implemented just cause I wanted to make it somewhat easy for anyone to implement the dialog system. If you have your own interaction system, don’t use this. And if you don’t, I’d advise you don’t use this. It was thrown together for this project.
The meat of the project! This is designed to easily and quickly create dialog chains and all sorts of junk! It allows you to add any sort of logic and really anything else you want, since you build the conversation in blueprints!
Contains all the stuff that’s not needed for your specific use, other than seeing how to implement the InteractionComponent, and the gui.
How to use this Stuff
This is the messiest to implement, since it requires the editing of your npc’s and your player blueprint. TUTORIAL TO COME LATER
This is super easy, which means super fun!
- Implement the “Dialog_PlayerInterface” Interface on the player, and attach your in-game widget to the function “Get GUI”
- Whenever you want to enable the dialog, just run the “EnableDialogWithNPC” function with the NPC variable attached!
- Now create a blueprint with a parent “DialogComponent”. This is your custom dialog!
- Override the function “Enable Dialog”, and add the parent function as well
- Create your dialog!
- Now on whatever NPC you want, simply drag the component onto said Actor! This can be either in the blueprint editor, or even on the level itself!
- Tutorial Pictures:
Use these in the Dialog Component! And make sure to add your own, too!
[table=“width: 1000, class: grid”]
**Name** **Image** **Use** SimpleSpeak ![46288592376218aadb3595223a7ac7b30fccdea7.png|245x185](upload://a0EeU7GcrAJaeyBH4e5FqghQex1.png) Simply display the subtitle for a certain delay, and then continue or exit dialog CreateDialogBox ![0556e60418c7f9fdd4c8a2b4965a6dc4b52c3258.png|272x228](upload://Lez7JVKkEp1bjFEWgEvdMAg3nW.png) Create a list of options the player can select to continue the conversation. The selected option will run the corresponding executive node. The "Out" pin is there just cause I want the other pins to line up. Exit Dialog ![8c6cec1c2b145401825b01f5c91a64c584d45ba2.png|140x73](upload://k2gd4pq3Ul7wEZf8qdQNbzJgCbM.png) Quite Simple, this exits the dialog to resume the game!