Help With a Dialog System

Hey! So Ive been trying to create a Dialog system or whatever you know; and here’s what I’ve got:

return {
   ["A New Beginning"] = {
      ["NPC"] = "???",
	  ["Player"] = Player,
	  ["Options"] = {
         ["One"] = {
            ["NPC"] = "???",
	        ["Player"] = Player,
		    etc
		 },
         ["Two"] = {
            ["NPC"] = "???",
	        ["Player"] = Player,
			etc
		 }
	  }
   }

This code looks terrible and I really do not like it (although, I wrote it on my phone for demonstration purposes, my point still stands).

Not only that, but also the fact that I’m not sure how I’ll be able to include something that’ll call a function that’ll give the player a quest.

So I’m just looking for some insight on how to write it, that’s all.

Thank you.

Dialog systems are certainly a very common thing people wish to create/have, I myself once was like that(I realized story based games are a HUGE pain, which was why I personally wanted one)

I created one a while back, I don’t currently plan to use it for anything, so I un-copylocked it, and send people towards it so they can see my (rather sloppy) implementation of a dialog/quest system.

if you want to look at mine, go ahead, and honestly, if you want to, just go ahead and use it(please make it look slightly more reasonable for your use-case)

my method used OOP, and would create an entire NPC with dialog using a function call, and a method call on the returned metatable

If you check it out, just open up QuestModuleRunner in SSS and I’ve put rough documentation/instructions of using it(I might eventually create a forum post officially documenting and releasing it, but I doubt it)

not to look like I’m spoon feeding, but you did just ask for insight, and nothing quite like seeing someone else’s work to help figure how to do something

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.