I am making a dialogue system similar to the game Fears to Fathom for fun. I managed to do it, but it is a LOT of different code. Is there an easier way to do this or are there nodes/methods I am not aware of??
Very low picture resolution. I can’t see nothing…
I feel OP is asking for general approaches rather than help with the script.
Perhaps show us how it works (timestamped YT vid would work); the scipt looks neat - whether it can be organised better is hard to tell, since we don’t know how it’s supposed to work.
for fun
This kind of thing can get really complex, even though you want to develop it yourself, do have a look at the marketplace - see what kind of functionality dialogue plugins offer and compare the feature set to what you currently have.
One thing that immediately jumps out as odd, though, is this part:
Normally you’d keep the text in a Data Table and query specific rows for data. This would also allow you to very quickly adjust the text inside and outside the editor (spreadsheet) rather than find one of the 500 functions that has the text you need… Hunting typos will be a chore, not even going to mention support for another language / VO.
Do have a look at a Data Table before you dig too deep.
I apologize. I will make a yt video with link.
Thank you I will post a youtube video with link when I get home as well as yes I am looking for more general concept. I did not know about data tables until now and I will study them. Basically I had Dialogue of the character, Option A response and option B response as variables within the widget itself. Then I simplified the multiple optional widget selections by making it a function with an input pin for each text needed. Its a lot and looked unnecessary but i am not knowledgeable enough to know how to improve it. It absolutely works but its SUPER hard to work with.
Imagine any line of text could contain information regarding which lines of text to display next. That’s what you’re aiming at and that’s what a Data Table
+ Struct
combo would allow you to do. And much, much more, since we can now associate any kind of data with a simple line of text:
- image of the speaker and their name
- VO, translations
- how long it stays on screen
- how the text looks like
- quest item to spawn when you reach a specific line…
The options really open up.
That sounds amazing! Here is a video of what I have and my idea of how a “dialogue tree” can work
Do you know C++ (or would like to learn it)? You only need one custom node to have a truly developer-friendly dialog system.
To create a chain of deferred events, you need to bind to delegates for each dialog response option, and this can be automated using C++.
You will be able to create a literal dialogue tree thanks to it.
In this node you will be able to dynamically add answer options, and depending on them, corresponding output contacts will be created, which you can connect to the next stages of the dialogue, etc.
Could you elaborate what you mean by struct?
I mean it would just be nice to keep it to blueprint
Struct - a data structure, a collection of variables. You can have a single struct contains text, image, float, class and a vector for example. Data Tables use those structs to represent its rows - think spreadsheet. See any Data Table tutorial and you will learn about structs, too, or look up struct tuts specifically - it’s a common topic.
There is a massive difference between C++ structs and blueprint structs. You can stick to BP if you prefer. That’s why I suggested looking at the marketplace first - you would find actual hierarchical trees with exposed nodes one simply plops text inside of and defines some rules. So you could decide to either buy a plugin, learn how to use it and start developing content, or have the “fun” you mentioned developing your own system from scratch.
And yes, while you can make complex systems with objects and delegates, you can also make a simple one with just a dialogue manager actor fetching rows of data from the DT. I’d suggest you tried that first.
It will still require quite a bit of work, especially if you’re starting out and experience having wires, ehm, crossed.
Too sad, YouTube blocked in Russia. Locked very tight, VPN helpless. Really we have no any access to YoyTube videos, all content.