Dynamic Dialog System

I want to show you the Bert Brothers (not canon characters in the yet-to-be-named-and-yet-to-be-officially-in-progress RPG). My dynamic dialog system has brought some life into them! The conversation between these brothers, powered by scripts, is quite interesting:


I use a ModuleScript returning a function that changes the dialog depending on different factors (for example, with the case of the Bert Brothers, if the player accepts Noobert’s request to make Bertnoo happy). Here is what Bertnoo’s dialog script looks like:

Bertnoo's script
return function()
	local Bertnoo = script.Parent.Parent
	local HappyState = Bertnoo:GetAttribute("HappyState")

	if HappyState == "Happy" then return {}
	elseif HappyState == "MakeHappy" then
		return {
			{ "Profile", "rbxassetid://10594574340" },
			{ "Go away", "What's the matter?" },
			{
				"Choice", "Dumbert has been too dumb recently. Now he hates me.",
				["I can see that."] = {
					"Oh well. I won't trust anyone anymore so I don't like you."
				},
				["At least you have me!"] = {
					{ "Really?", "Of course!" },
					{ "Profile", "rbxassetid://10594669389" },
					function()
						script.Parent.Decal.Texture = "rbxasset://textures/face.png"
						Bertnoo:SetAttribute("HappyState", "Happy")
					end,
					{ "Thanks man. I appreciate it.", "You're welcome!" }
				}
			}
		}
	end

	return {
		{ "Profile", "rbxassetid://10594574340" },
		{ "Go away", "Why?" },
		"I don't like you."
	}
end

This is really turning out to be a proper RPG yet all I was doing was messing around with Rojo!

10 Likes

nothing quite wrong with the design, I quite like it. Only thing that bugs me is that the buttons for the dialog choices arent consistent with the style of the dialog itself, shouldnt take too long to fix that

the script itself is good but I think you’re going to have to restructure how the dialog works because I dont think this could be readable in the future where you have more advanced conversations with other characters

but other than that great system! rich text would add to this so much more!
good luck and have fun!

1 Like

i think it looks good

i’m just not very used to seeing the chat options above the gui dialogue thing