Loomian Legacy Style Dialogue System

Made this today. It speaks for itself (pun intended.) What do you guys think?

5 Likes

Looks amazing! This definitely takes NPC dialogue to a new level and is a lot better than the old ones for sure. Mind sharing the script and the process you took to create it?

1 Like

I may use this for a future game so I don’t plan on releasing the source as of now. I will generally explain how I made it though, so as to encourage more people to get out of their comfort zone and try making something like this.

I made the speech tail by using EgoMoose’s 2D Triangle Generator and making 2 vertices arbitrary points on the speech bubble and the last be on the screen position of the NPC’s head (which gets updated every frame with RunService.) The way the dialogue is designed is slightly hacky; the text is fed into the dialogue module as a table (which is read using the ipairs() iterator so it reads in order) and depending on if I want delays, auto continues, yes or no questions, etc. I added a special 4 character long identifier (such as “[de]”, “[yn]”, or “[ac]”) to the end of each string which the write function detects and removes using string.sub(). I save those identifiers for after the text is written, and then carry out the corresponding action based on the identifier. If there’s no identifier, then I simply make the red arrow visible and wait for the player to click. I believe this is the way tbradm did it for PBB all those years ago, so there’s probably a better way of doing it. I move the text down based on changes of the Y value of the TextBounds property of the TextLabel.

Of course there’s more that goes into it like the framework and math behind it, but most of that is boring and likely unoptimized anyway so I won’t explain it.

1 Like