Dialogue Kit V2 // An easy way to create interactive Dialogues & Events

Good feature and good showcase! I think in the next patch/update, you could add something that closes the dialogue when they leave the NPC or whoever they’re talking to. Since I got within a distance away from your character in the place test, and the dialogue still continued even though I wasn’t near you.

I could give that one a try. Thanks for the suggestion!

1 Like

For some reason the buttons do not work and they will not show up. @AsadrithIsntHere

@AsadrithIsntHere The buttons only show up in the test place
image

Hi Yeah, I did some tests and experiments with it, but i’ve got another suggestion, what about instead of a continue button, u make it a option , since in my case, i need that when people clicks the dialogue box, or in any part of it, the dialogue also skips, this behavior It’s present on many rpg games, would help a lot, w system

this has been eating me up lately…
so in DialogueKit1 I had a piece of dialogue that executed a localscript depending if I agreed to help an NPC:

			Reply5 = {
				ReplyTitle = "Yeah, I'm in!";
				ReplyContent = {"Far out, man! You're really in tune with the cosmic vibes. Finding those Alien Power Cells will help us unlock some serious universal secrets. Come meet me back when you found them."}; -- Trigger the mission script
				ReplyButtonLayer = 6;

				ReplyPosition = 1;
				ReplyButtonLayerDisplay = 5;
				GridPosition = 1;

				ContentSound = "rbxassetid://";
			};

			Reply6 = {
				ReplyTitle = "Nah, I'm good.";
				ReplyContent = {"Aww, bummer, dude. Maybe another time."};
				ReplyButtonLayer =7;

				ReplyPosition = 1;
				ReplyButtonLayerDisplay = 5;
				GridPosition = 2;

				ContentSound = "rbxassetid://";
			};
		};

		DialogueCodeExecution = {	
			Script1 = {
				ScriptInstance = script.Parent.Parent.Parent.Missions.LocalScript;
				ScriptContentExecute = 1;  
				ScriptDialogueLayer = 6; 
			};
		};

I’m trying to port this to the Kit2 version but for some reason the localscript doesn’t get executed:

				LayerTitle = "Bobby the Hippy",

				Replies = {
					{ ReplyName = "reply1", ReplyText = "Yeah, I'm in!", ReplyLayer = "Layer5" },
					{ ReplyName = "reply2", ReplyText = "Nah, I'm good.", ReplyLayer = "Layer6" },
				},

				Exec = {}
			},

			Layer5 = {
				DialogueContent = {"Far out, man! You're really in tune with the cosmic vibes. Finding those Alien Power Cells will help us unlock some serious universal secrets. Come meet me back when you found them."},
				DialogueImage = "rbxassetid://13877485530",
				LayerTitle = "Bobby the Hippy",

				Replies = {
					{ ReplyName = "reply1", ReplyText = "Goodbye", ReplyLayer = nil },
				},

				Exec = {
					{
						Script1 = {
							ScriptInstance = script.Parent.Parent.Parent.Missions.LocalScript;
							ScriptContentExecute = 1,
							ScriptDialogueLayer = 5
						}
					}
				}
			},

would really appreciate if I could get some help with this because i’ve been struggling to fix this for the past few hours.

Try turning your graphics level up & try reimporting the model and see if the included starter popup works.

Code is not executed the same as in Dialogue Kit V1, This was explained further in the post.


local function customFunction1()
    print("Function Executed!")
end

Exec = { -- This is where you can run code in your dialogue if you want any custom functions. (Quests, Animations, etc.)
        --[[
                    
        func1 = { 
            Function = customFunction1, -- Set this to a function you have created. Do not leave the brackets at the end.
            ExecuteContent = nil, -- Set to a number or the name of a Reply. If set to 1, it will execute at the first piece of content on the dialogue.
        },
                    
        ]]--
}

You can do this already if you can customize the UI.

For a better explanation, if you scale the continue button to the size of your dialogue frame and then make the continue button text invisible, you should get the functionality you’re looking for.

This is what I did on the Cinematic skin anyway, which has what you described.

image
nothing works…

Alright, it works, but i’d suggest to have it a option, and also, I would like it also skip and continue, I made my own test, it works, but it’s very buggy right now, I would love to see your approach/solution

This is what i modified, added this new function (and modified some things) , only works for default skin or blank ones you make

The errors i found were :

  • Sometimes Response Choices Duplicate
  • Sometimes The Response Choices Appears at the beginning of the dialogue and not when it ends the typewriting (you could also make this a option)
  • Sometimes Responses Choices Won’t appear and the dialogue will stay forever
local function connectContinueButton()
	if ContinueButtonConnection then
		ContinueButtonConnection:Disconnect()
	end
	ContinueButtonConnection = ContinueButton.MouseButton1Click:Connect(function()
		if isTyping then
			isTyping = false
		else
			stopAutoScroll = true
			dialogues.DisplayDialogue()
		end
	end)
end

local function connectClickInput()
	if UserInputService then
		if InputContinueButtonConnection then
			InputContinueButtonConnection:Disconnect()
		end
		task.wait()
		InputContinueButtonConnection = UserInputService.InputBegan:Connect(function(input: InputObject, gameProcessedEvent: boolean)
			if (not gameProcessedEvent) and input.UserInputType == Enum.UserInputType.MouseButton1 then
				if not dialogueActive then return end
		
				if canReply then return end
				
				
				if isTyping then
					isTyping = false
				else
					stopAutoScroll = true
--					InputContinueButtonConnection:Disconnect()
					dialogues.DisplayDialogue()
				end
				--InputContinueButtonConnection:Disconnect()
			end
		end)
	end
end
Settings = {
 ClickToSkip = true,
}

For ClickToSkip To work, you should have ContinueButtonVisibleDuringReply and ContinueButtonVisibleDuringTypewriter settings set to false

It required no scripting, you just need to scale the continue button to fill the whole frame and then set the continue button text to blank.

Also, ContinueButtonVisibleDuringTypewriter shouldn’t be enabled at the same time as the other setting, as I’ve had problems with it but I’ll see if I can fix it in Patch 2

1 Like

Is there a way so instead of a proximityprompt, you touch it in order to activate the sound?

You quite simply just change ProximityPrompt.Triggered to Part.Touched and then create the dialogue as you would.

When entering a dialogue that stops your movement in the test place, it doesn’t let you move again after the dialogue is over.
I haven’t checked out the code (of neither the test place or the system itself) yet but if you’re doing this by disabling the player’s Controls module, then I’m pretty sure you need to add a true as a parameter when calling the function to re-enable the controls to make it work

1 Like

The dialogue creation on the test place uses an older module, it should be fixed now!

1 Like

Is it possible to use RichText or some kind of formatting like that to do stuff like, for example, change the color or font of the text mid-dialogue? Or text animations? (Shaking, wavy text, etc)

If not, are there plans to add that eventually?

If you disable the typewriter, you can do this by writing the content in the RichText markdown, but with the typewriter it will write the individual sequence for rich text before properly displaying it.

I don’t exactly know how I can subtract text from the content to ignore on the dialogue but I’ll see what I can do.

I don’t have any plans for using the typewriter to create individual TextLabels either as I prefer things to be simple like this to allow custom skins to be created more easily.

1 Like

Got it. Another thing you could use in that case is Defaultio’s Rich Text module (Of course, you don’t have to use it, but it’d probably work very well for this imo), which can automatically convert normal textlabels to individual frames without needing you to change anything in the UIs themselves, meaning that it’d add support for proper Rich Text typewriting and text animations without changing the process for creating custom skins.

You know how you can set a reply layer to nil and then execute a function upon that reply’s name. I noticed that you can’t do that if you have a layer with content only and no replies. For example, if it’s a first person game and you want to lock the mouse back to center after pressing the final continue button.